{"version":3,"file":"LegalPageLayout.DLs8kIGX.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/4xWbVyCmAkMGGmq84HOZ/N82FLuSsl2TTZUM19g2e/LegalPageLayout.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";const LINK_RE=/\\[([^\\]]+)\\]\\(([^)]+)\\)/g;const CREAM=\"rgb(233,226,214)\";const WHITE=\"rgb(255,255,255)\";function useViewport(){const[width,setWidth]=useState(typeof window!==\"undefined\"?window.innerWidth:1400);useEffect(()=>{if(typeof window===\"undefined\")return;const onResize=()=>setWidth(window.innerWidth);onResize();window.addEventListener(\"resize\",onResize);return()=>window.removeEventListener(\"resize\",onResize);},[]);return width;}function renderBody(text){if(!text)return null;const parts=[];let lastIndex=0;let match;let key=0;LINK_RE.lastIndex=0;while((match=LINK_RE.exec(text))!==null){if(match.index>lastIndex){parts.push(text.slice(lastIndex,match.index));}const label=match[1];const url=match[2];const isExternal=/^https?:/i.test(url);parts.push(/*#__PURE__*/_jsx(\"a\",{href:url,target:isExternal?\"_blank\":undefined,rel:isExternal?\"noopener noreferrer\":undefined,style:{color:\"rgb(30,30,36)\",textDecoration:\"underline\",textUnderlineOffset:\"2px\",fontWeight:500},children:label},`lnk-${key++}`));lastIndex=match.index+match[0].length;}if(lastIndex<text.length){parts.push(text.slice(lastIndex));}return parts;}export default function LegalPageLayout({eyebrow=\"Legal\",title=\"Page title\",subtitle=\"\",lastUpdated=\"\",heading1=\"\",body1=\"\",heading2=\"\",body2=\"\",heading3=\"\",body3=\"\",heading4=\"\",body4=\"\",heading5=\"\",body5=\"\",heading6=\"\",body6=\"\",heading7=\"\",body7=\"\",heading8=\"\",body8=\"\",heading9=\"\",body9=\"\",heading10=\"\",body10=\"\",heading11=\"\",body11=\"\",heading12=\"\",body12=\"\",contactLine=\"\",disclaimer=\"\",initialVisibleCount=5}){const[expanded,setExpanded]=useState(false);const vw=useViewport();const isPhone=vw<640;const isTablet=vw>=640&&vw<1e3;const sections=[{heading:heading1,body:body1},{heading:heading2,body:body2},{heading:heading3,body:body3},{heading:heading4,body:body4},{heading:heading5,body:body5},{heading:heading6,body:body6},{heading:heading7,body:body7},{heading:heading8,body:body8},{heading:heading9,body:body9},{heading:heading10,body:body10},{heading:heading11,body:body11},{heading:heading12,body:body12}].filter(s=>s.heading||s.body);const hasMore=sections.length>initialVisibleCount;const visibleSections=expanded||!hasMore?sections:sections.slice(0,initialVisibleCount);const showContactBlock=(!hasMore||expanded)&&(contactLine||disclaimer);const heroMinHeight=isPhone?360:480;const heroPadding=isPhone?\"92px 18px 56px 18px\":\"100px 24px 60px 24px\";const titleSize=isPhone?34:isTablet?42:52;const bodyPadding=isPhone?\"56px 18px 72px 18px\":\"80px 24px 100px 24px\";return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",fontFamily:\"Manrope, sans-serif\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",minHeight:heroMinHeight,backgroundColor:\"rgb(30,30,36)\",padding:heroPadding,boxSizing:\"border-box\",textAlign:\"center\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:1080,margin:\"0 auto\",width:\"100%\"},children:[eyebrow&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"11px\",fontWeight:600,letterSpacing:\"0.08em\",textTransform:\"uppercase\",color:\"rgba(233,226,214,0.6)\",margin:\"0 0 18px 0\"},children:eyebrow}),/*#__PURE__*/_jsx(\"h1\",{style:{fontFamily:\"Manrope, sans-serif\",fontSize:`${titleSize}px`,fontWeight:600,letterSpacing:\"-0.04em\",lineHeight:1.1,color:CREAM,margin:\"0 auto 20px auto\",maxWidth:\"760px\"},children:title}),subtitle&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"'Libre Franklin', sans-serif\",fontSize:isPhone?\"15px\":\"17px\",lineHeight:1.55,color:WHITE,margin:\"0 auto\",maxWidth:\"640px\"},children:subtitle}),lastUpdated&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"Manrope, sans-serif\",fontSize:\"12px\",fontWeight:500,letterSpacing:\"0.06em\",textTransform:\"uppercase\",color:\"rgba(233,226,214,0.5)\",margin:\"24px 0 0 0\"},children:lastUpdated})]})}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",backgroundColor:\"rgb(255,255,255)\",padding:bodyPadding,boxSizing:\"border-box\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:\"880px\",margin:\"0 auto\"},children:[visibleSections.map((s,i)=>{const isLastVisible=i===visibleSections.length-1;const fullyExpanded=!hasMore||expanded;const showBorder=fullyExpanded?!isLastVisible:true;return /*#__PURE__*/_jsxs(\"article\",{style:{marginBottom:isPhone?\"28px\":\"40px\",paddingBottom:isPhone?\"22px\":\"32px\",borderBottom:showBorder?\"1px solid rgba(30,30,36,0.1)\":\"none\"},children:[s.heading&&/*#__PURE__*/_jsx(\"h2\",{style:{fontFamily:\"Manrope, sans-serif\",fontSize:isPhone?\"19px\":\"22px\",fontWeight:600,letterSpacing:\"-0.02em\",color:\"rgb(30,30,36)\",margin:\"0 0 14px 0\"},children:s.heading}),s.body&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"'Libre Franklin', sans-serif\",fontSize:isPhone?\"14px\":\"15px\",lineHeight:1.65,color:\"rgba(30,30,36,0.78)\",margin:0,whiteSpace:\"pre-wrap\"},children:renderBody(s.body)})]},i);}),hasMore&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",marginTop:\"8px\",marginBottom:\"8px\"},children:/*#__PURE__*/_jsx(\"button\",{onClick:()=>setExpanded(v=>!v),style:{display:\"inline-flex\",alignItems:\"center\",gap:\"8px\",padding:\"12px 28px\",borderRadius:\"100px\",border:expanded?\"1.5px solid rgb(30,30,36)\":\"none\",backgroundColor:expanded?\"transparent\":\"rgb(30,30,36)\",color:expanded?\"rgb(30,30,36)\":\"rgb(237,239,247)\",fontFamily:\"Manrope, sans-serif\",fontSize:\"13px\",fontWeight:600,letterSpacing:\"-0.01em\",cursor:\"pointer\",outline:\"none\",transition:\"all 0.15s ease\"},children:expanded?\"Show Less\":`View More (${sections.length-initialVisibleCount})`})}),showContactBlock&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:\"40px\",paddingTop:\"32px\",borderTop:\"1px solid rgba(30,30,36,0.1)\",display:\"flex\",flexDirection:\"column\",gap:\"16px\"},children:[contactLine&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"'Libre Franklin', sans-serif\",fontSize:\"13px\",lineHeight:1.65,color:\"rgba(30,30,36,0.55)\",margin:0,whiteSpace:\"pre-wrap\"},children:renderBody(contactLine)}),disclaimer&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"'Libre Franklin', sans-serif\",fontSize:\"13px\",lineHeight:1.65,color:\"rgba(30,30,36,0.5)\",margin:0,fontStyle:\"italic\"},children:disclaimer})]})]})})]});}const sectionControl=n=>({[`heading${n}`]:{type:ControlType.String,title:`Section ${n} — heading`,defaultValue:\"\"},[`body${n}`]:{type:ControlType.String,title:`Section ${n} — body`,defaultValue:\"\",displayTextArea:true}});addPropertyControls(LegalPageLayout,{eyebrow:{type:ControlType.String,title:\"Eyebrow\",defaultValue:\"Legal\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Page title\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"\",displayTextArea:true},lastUpdated:{type:ControlType.String,title:\"Last updated\",defaultValue:\"\"},initialVisibleCount:{type:ControlType.Number,title:\"Show N sections first\",defaultValue:5,min:1,max:12,step:1,displayStepper:true},...sectionControl(1),...sectionControl(2),...sectionControl(3),...sectionControl(4),...sectionControl(5),...sectionControl(6),...sectionControl(7),...sectionControl(8),...sectionControl(9),...sectionControl(10),...sectionControl(11),...sectionControl(12),contactLine:{type:ControlType.String,title:\"Contact line\",defaultValue:\"\",displayTextArea:true},disclaimer:{type:ControlType.String,title:\"Disclaimer (italic)\",defaultValue:\"\",displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LegalPageLayout\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LegalPageLayout.map"],"mappings":"sMAA0P,SAAS,GAAa,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAgB,IAAS,OAA8B,KAAlB,EAAO,UAAe,EAA0N,OAAxN,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAa,EAAS,EAAO,UAAU,EAAwD,OAAtD,EAAS,EAAE,EAAO,iBAAiB,SAAS,CAAQ,MAAY,EAAO,oBAAoB,SAAS,CAAQ,CAAE,EAAE,CAAC,CAAC,EAAS,CAAM,CAAC,SAAS,EAAW,EAAK,CAAC,GAAG,CAAC,EAAK,OAAO,KAAK,IAAM,EAAM,CAAC,EAAM,EAAU,EAAM,EAAU,EAAI,EAAsB,IAApB,EAAQ,UAAU,GAAS,EAAM,EAAQ,KAAK,CAAI,KAAK,MAAK,CAAI,EAAM,MAAM,GAAW,EAAM,KAAK,EAAK,MAAM,EAAU,EAAM,KAAK,CAAC,EAAG,IAAM,EAAM,EAAM,GAAS,EAAI,EAAM,GAAS,EAAW,YAAY,KAAK,CAAG,EAAE,EAAM,KAAkB,EAAK,IAAI,CAAC,KAAK,EAAI,OAAO,EAAW,SAAS,IAAA,GAAU,IAAI,EAAW,sBAAsB,IAAA,GAAU,MAAM,CAAC,MAAM,gBAAgB,eAAe,YAAY,oBAAoB,MAAM,WAAW,GAAG,EAAE,SAAS,CAAK,EAAE,OAAO,KAAO,CAAC,EAAE,EAAU,EAAM,MAAM,EAAM,EAAE,CAAC,MAAO,CAA8D,OAA1D,EAAU,EAAK,QAAQ,EAAM,KAAK,EAAK,MAAM,CAAS,CAAC,EA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