{"version":3,"file":"FAQExplorer.DLi5aYOU.mjs","names":["React.useState","React.useRef","React.useId","__esmMin","init_npm_react_18_3_1","ie","_e","p","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_CKT6jEEQ","ControlType","srcOf","img","FAQExplorer","props","items","it","open","setOpen","hover","setHover","width","setWidth","ref","uid","el","ro","w","entries","prev","compact","small","num","i","src","image","photo","imageAlt","imagePosition","SERIF","heading","intro","SANS","list","LINE","isOpen","isHover","qid","aid","GREEN","INK","pi","para","style","init_FAQExplorer"],"sources":["https:/framerusercontent.com/modules/e1QKklYlpDvgqaTzxQvX/u17zCMuPdAEpwSLIuHk5/FAQExplorer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const SERIF=\"'Instrument Serif', serif\";const SANS=\"'Instrument Sans', system-ui, sans-serif\";const INK=\"#14231B\";const GREEN=\"#19683a\";const LINE=\"#DCE3E6\";function srcOf(img){if(!img)return undefined;if(typeof img===\"string\")return img;return img.src;}/**\n * FAQ with a large photo beside clickable questions. One question is open at a time.\n * Answers stay in the page (hidden, not removed) so search engines can read them.\n * Stacks the photo above the questions when narrower than 860px.\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQExplorer(props){const{heading,intro,image,imageAlt,imagePosition,style}=props;const items=(props.items??[]).filter(it=>it&&it.question);const[open,setOpen]=React.useState(0);const[hover,setHover]=React.useState(-1);const[width,setWidth]=React.useState(1280);const ref=React.useRef(null);const uid=\"faq\"+React.useId().replace(/[^a-zA-Z0-9]/g,\"\");React.useEffect(()=>{const el=ref.current;if(!el||typeof ResizeObserver===\"undefined\")return;const ro=new ResizeObserver(entries=>{const w=Math.round(entries[0].contentRect.width);if(w>0)setWidth(prev=>Math.abs(prev-w)>4?w:prev);});ro.observe(el);return()=>ro.disconnect();},[]);const compact=width<860;const small=width<520;const num=i=>(i+1<10?\"0\":\"\")+(i+1);const src=srcOf(image);const photoH=compact?small?300:380:620;const photo=/*#__PURE__*/_jsxs(\"div\",{style:{position:compact?\"relative\":\"sticky\",top:compact?undefined:112,alignSelf:\"start\",borderRadius:6,overflow:\"hidden\",height:photoH,background:\"#2a3b33\"},children:[src&&/*#__PURE__*/_jsx(\"img\",{src:src,alt:imageAlt||\"\",loading:\"lazy\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:imagePosition||\"50% 50%\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:\"linear-gradient(0deg, rgba(10,24,17,0.78) 0%, rgba(10,24,17,0.35) 38%, rgba(10,24,17,0) 62%)\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",left:small?20:32,right:small?20:32,bottom:small?20:32,color:\"#F7F9FA\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{margin:0,fontFamily:SERIF,fontWeight:400,fontSize:small?34:compact?42:52,lineHeight:1.05,letterSpacing:\"-0.01em\"},children:heading}),intro?/*#__PURE__*/_jsx(\"p\",{style:{margin:\"12px 0 0\",fontFamily:SANS,fontSize:small?15:17,lineHeight:1.5,opacity:.92,maxWidth:460},children:intro}):null]})]});const list=/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",borderTop:\"1px solid \"+LINE},children:items.map((it,i)=>{const isOpen=open===i;const isHover=hover===i;const qid=uid+\"q\"+i;const aid=uid+\"a\"+i;return /*#__PURE__*/_jsxs(\"div\",{style:{borderBottom:\"1px solid \"+LINE,position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,bottom:0,width:3,background:GREEN,transform:isOpen?\"scaleY(1)\":\"scaleY(0)\",transformOrigin:\"top\",transition:\"transform 300ms ease\"}}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0},children:/*#__PURE__*/_jsxs(\"button\",{id:qid,type:\"button\",\"aria-expanded\":isOpen,\"aria-controls\":aid,onClick:()=>setOpen(isOpen?-1:i),onMouseEnter:()=>setHover(i),onMouseLeave:()=>setHover(-1),style:{all:\"unset\",boxSizing:\"border-box\",cursor:\"pointer\",width:\"100%\",display:\"flex\",alignItems:\"center\",gap:small?14:20,padding:small?\"18px 4px 18px 14px\":\"24px 8px 24px 22px\",minHeight:44},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:SANS,fontSize:13,fontWeight:600,color:isOpen?GREEN:\"#6b7a72\",letterSpacing:\"0.04em\",minWidth:22,transition:\"color 200ms\"},children:num(i)}),/*#__PURE__*/_jsx(\"span\",{style:{flex:1,fontFamily:SANS,fontWeight:600,fontSize:small?17:19,lineHeight:1.35,color:isOpen||isHover?GREEN:INK,transition:\"color 200ms\"},children:it.question}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{flex:\"0 0 auto\",width:36,height:36,borderRadius:18,border:\"1.5px solid \"+(isOpen?GREEN:LINE),background:isOpen?GREEN:isHover?\"#EEF1F4\":\"transparent\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"all 250ms ease\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 14 14\",style:{transform:isOpen?\"rotate(45deg)\":\"rotate(0deg)\",transition:\"transform 250ms ease\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M7 1v12M1 7h12\",stroke:isOpen?\"#F7F9FA\":INK,strokeWidth:\"1.6\",strokeLinecap:\"round\"})})})]})}),/*#__PURE__*/_jsx(\"div\",{id:aid,role:\"region\",\"aria-labelledby\":qid,style:{display:\"grid\",gridTemplateRows:isOpen?\"1fr\":\"0fr\",transition:\"grid-template-rows 320ms ease\"},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{padding:small?\"0 14px 20px 50px\":\"0 64px 26px 64px\",opacity:isOpen?1:0,transition:\"opacity 300ms ease\"},children:String(it.answer||\"\").split(/\\n\\s*\\n/).map((para,pi)=>/*#__PURE__*/_jsx(\"p\",{style:{margin:pi===0?0:\"14px 0 0\",fontFamily:SANS,fontSize:small?16:17,lineHeight:1.6,color:\"#3c4a43\"},children:para},pi))})})})]},i);})});return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{...style,display:\"grid\",gridTemplateColumns:compact?\"1fr\":\"minmax(0, 5fr) minmax(0, 6fr)\",gap:compact?28:64,alignItems:\"start\",width:\"100%\"},children:[photo,list]});}FAQExplorer.defaultProps={heading:\"Which tour is right for you?\",intro:\"\",imageAlt:\"\",imagePosition:\"50% 50%\",items:[{question:\"What's the difference between the tours?\",answer:\"Add an answer.\"},{question:\"Which tour is better if I'm short on time?\",answer:\"Add an answer.\"}]};addPropertyControls(FAQExplorer,{heading:{type:ControlType.String,title:\"Heading\"},intro:{type:ControlType.String,title:\"Intro\",displayTextArea:true},image:{type:ControlType.ResponsiveImage,title:\"Photo\"},imageAlt:{type:ControlType.String,title:\"Photo alt\"},imagePosition:{type:ControlType.String,title:\"Photo focus\",placeholder:\"50% 50%\"},items:{type:ControlType.Array,title:\"Questions\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQExplorer\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQExplorer.map"],"mappings":"A,sMAAsS,SAASe,EAAM,EAAI,CAAC,GAAIC,EAAyD,OAAjC,OAAOA,GAAM,SAAgBA,EAAWA,EAAI,GAAI,CAMnY,SAAwBC,EAAY,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,QAAM,WAAS,gBAAc,SAAOC,EAAYC,GAAOD,EA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