{"version":3,"file":"RandomSortCMS.NFCCTKRB.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/K3u5VhvP5JNSKXxgf4tB/3gmv2ue9WXv6D1uBuuoZ/RandomSortCMS.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export const withShuffledItems3=Component=>{const ShuffledComponent=props=>{const componentRef=useRef(null);const shuffleAndDisplayItems=()=>{const container=componentRef.current;if(!container)return;let items=Array.from(container.children);// If there are fewer than 3, do nothing\nif(items.length<=3)return;// Shuffle the list\nfor(let i=items.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[items[i],items[j]]=[items[j],items[i]];}// Show only the first 3 items\nitems.forEach((item,index)=>{if(index>=3){item.style.visibility=\"hidden\";item.style.position=\"absolute\";item.style.width=\"0px\";item.style.height=\"0px\";item.style.overflow=\"hidden\";}});};useEffect(()=>{shuffleAndDisplayItems();},[]);return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};return ShuffledComponent;};export const withShuffledItems6=Component=>{const ShuffledComponent=props=>{const componentRef=useRef(null);const shuffleAndDisplayItems=()=>{const container=componentRef.current;if(!container)return;let items=Array.from(container.children);// If there are fewer than 6, do nothing\nif(items.length<=9)return;// Shuffle the list\nfor(let i=items.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[items[i],items[j]]=[items[j],items[i]];}// Show only the first 6 items\nitems.forEach((item,index)=>{if(index>=9){item.style.visibility=\"hidden\";item.style.position=\"absolute\";item.style.width=\"0px\";item.style.height=\"0px\";item.style.overflow=\"hidden\";}});};useEffect(()=>{shuffleAndDisplayItems();},[]);return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};return ShuffledComponent;};\nexport const __FramerMetadata__ = {\"exports\":{\"withShuffledItems3\":{\"type\":\"reactHoc\",\"name\":\"withShuffledItems3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShuffledItems6\":{\"type\":\"reactHoc\",\"name\":\"withShuffledItems6\",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