{"version":3,"file":"WithRandomThreeGuides.C_f7AzT3.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/VLCZJzHUTyn5rjoc8x5T/KnM72uXXd1XCyClNRdFk/WithRandomThreeGuides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";function createRandomGuidesOverride(Component,getMaxVisible,watchResize){return /*#__PURE__*/forwardRef(function RandomGuidesOverride(props,ref){const containerRef=useRef(null);const pageSeedRef=useRef(Math.random()||.5);useEffect(()=>{if(typeof window===\"undefined\")return;const root=containerRef.current;if(!root)return;const originalDisplay=new Map;const seededScore=index=>{const x=Math.sin((index+1)*999+pageSeedRef.current*1e5);return x-Math.floor(x);};const applySelection=()=>{const children=Array.from(root.children);const total=children.length;if(total===0)return;const limit=Math.min(getMaxVisible(),total);const selectedIndexes=new Set(children.map((_,index)=>({index,score:seededScore(index)})).sort((a,b)=>b.score-a.score).slice(0,limit).map(item=>item.index));children.forEach((child,index)=>{const shouldShow=selectedIndexes.has(index);if(shouldShow){if(originalDisplay.has(child)){child.style.display=originalDisplay.get(child)||\"\";originalDisplay.delete(child);}}else{if(!originalDisplay.has(child)){originalDisplay.set(child,child.style.display);}child.style.display=\"none\";}});};applySelection();const observer=new MutationObserver(()=>{applySelection();});observer.observe(root,{childList:true});const handleResize=()=>{applySelection();};if(watchResize){window.addEventListener(\"resize\",handleResize);}return()=>{observer.disconnect();if(watchResize){window.removeEventListener(\"resize\",handleResize);}const children=Array.from(root.children);children.forEach(child=>{if(originalDisplay.has(child)){child.style.display=originalDisplay.get(child)||\"\";}});};},[getMaxVisible,watchResize]);return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{containerRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&typeof ref===\"object\"){ref.current=node;}}});});}export function withRandomThreeGuides(Component){return createRandomGuidesOverride(Component,()=>{if(typeof window===\"undefined\")return 3;const width=window.innerWidth;return width>=810&&width<1200?2:3;},true);}export function withRandomTwoGuides(Component){return createRandomGuidesOverride(Component,()=>2,false);}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomThreeGuides\":{\"type\":\"reactHoc\",\"name\":\"withRandomThreeGuides\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomTwoGuides\":{\"type\":\"reactHoc\",\"name\":\"withRandomTwoGuides\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithRandomThreeGuides.map"],"mappings":"yIAA0F,SAAS,EAA2B,EAAU,EAAc,EAAY,CAAC,OAAoB,EAAW,SAA8B,EAAM,EAAI,CAAC,IAAM,EAAaA,EAAO,KAAK,CAAO,EAAYA,EAAO,KAAK,QAAQ,EAAE,GAAG,CAA62C,OAA52C,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAK,EAAa,QAAQ,GAAG,CAAC,EAAK,OAAO,IAAM,EAAgB,IAAI,IAAU,EAAY,GAAO,CAAC,IAAM,EAAE,KAAK,KAAK,EAAM,GAAG,IAAI,EAAY,QAAQ,IAAI,CAAC,OAAO,EAAE,KAAK,MAAM,EAAE,EAAS,MAAmB,CAAC,IAAM,EAAS,MAAM,KAAK,EAAK,SAAS,CAAO,EAAM,EAAS,OAAO,GAAG,IAAQ,EAAE,OAAO,IAAM,EAAM,KAAK,IAAI,GAAe,CAAC,EAAM,CAAO,EAAgB,IAAI,IAAI,EAAS,KAAK,EAAE,KAAS,CAAC,QAAM,MAAM,EAAY,EAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,EAAM,CAAC,IAAI,GAAM,EAAK,MAAM,CAAC,CAAC,EAAS,SAAS,EAAM,IAAQ,CAAkB,EAAgB,IAAI,EAAM,CAAmB,EAAgB,IAAI,EAAM,GAAE,EAAM,MAAM,QAAQ,EAAgB,IAAI,EAAM,EAAE,GAAG,EAAgB,OAAO,EAAM,GA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