{"version":3,"file":"Random.17enPIXY.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/yc1eoArd7Ej3tZECCt5a/Xz23LvTWczFPTk5duIcK/Random.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// Set to 0 to show all items in random order, or any number > 0 to limit how many are shown\nlet NUMBER_TO_SHOW=0;const COLLECTION_ID=\"random-collection-marker\";export function RandomCollectionOverride(){return{style:{border:`1px solid transparent`,position:\"relative\"},\"data-collection-type\":COLLECTION_ID,animate:{scale:1,transition:{duration:.1}},onAnimationComplete(){console.log(\"Random collection override activated\");const collectionElement=document.querySelector(`[data-collection-type=\"${COLLECTION_ID}\"]`);if(collectionElement){const children=Array.from(collectionElement.children);console.log(`Collection found with ${children.length} children`);const indices=Array.from({length:children.length},(_,i)=>i);for(let i=indices.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[indices[i],indices[j]]=[indices[j],indices[i]];}const itemsToShow=NUMBER_TO_SHOW===0?children.length:NUMBER_TO_SHOW;if(itemsToShow<children.length){children.forEach(child=>{child.style.display=\"none\";});const selectedIndices=indices.slice(0,itemsToShow);selectedIndices.forEach(index=>{children[index].style.display=\"\";});console.log(`Randomly showing ${itemsToShow} children at indices:`,selectedIndices);}else{indices.forEach((originalIndex,newPosition)=>{collectionElement.appendChild(children[originalIndex]);});console.log(`Showing all ${children.length} children in random order`);}}else{console.log(\"Collection element not found\");}}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withRandomCollectionOverride(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...RandomCollectionOverride(props)});};}withRandomCollectionOverride.displayName=\"RandomCollectionOverride\";\nexport const __FramerMetadata__ = {\"exports\":{\"RandomCollectionOverride\":{\"type\":\"override\",\"name\":\"RandomCollectionOverride\",\"annotations\":{\"framerContractVersion\":\"1\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