{"version":3,"file":"Examples.rmQ8KSEZ.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/QhIxRhEv8LJGR0mevvL4/NxlayazJTkypteBxlEAe/Examples.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useEffect,useMemo,useRef,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";import{useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withSoftCursorLight(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const[state,setState]=useState({x:0,y:0,opacity:0,enabled:true});const radius=Math.max(40,Number(props.radius??220));const intensity=Math.max(0,Math.min(1,Number(props.intensity??.42)));const lightColor=String(props.lightColor??\"rgba(218, 235, 252, 1)\");useEffect(()=>{if(typeof window===\"undefined\")return;const motionQuery=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const updateSupport=()=>{startTransition(()=>{setState(prev=>({...prev,enabled:!motionQuery.matches,opacity:0}));});};updateSupport();motionQuery.addEventListener(\"change\",updateSupport);return()=>{motionQuery.removeEventListener(\"change\",updateSupport);};},[]);const setRefs=useMemo(()=>node=>{elementRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;},[ref]);const onMouseEnter=event=>{props.onMouseEnter?.(event);if(!state.enabled||!elementRef.current)return;const rect=elementRef.current.getBoundingClientRect();const x=event.clientX-rect.left;const y=event.clientY-rect.top;startTransition(()=>{setState(prev=>({...prev,x,y,opacity:1}));});};const onMouseMove=event=>{props.onMouseMove?.(event);if(!state.enabled||!elementRef.current)return;const rect=elementRef.current.getBoundingClientRect();const x=event.clientX-rect.left;const y=event.clientY-rect.top;startTransition(()=>{setState(prev=>({...prev,x,y,opacity:1}));});};const onMouseLeave=event=>{props.onMouseLeave?.(event);if(!state.enabled)return;startTransition(()=>{setState(prev=>({...prev,opacity:0}));});};const existingBackgroundImage=props.style?.backgroundImage;const existingBoxShadow=props.style?.boxShadow;const glowStrength=Math.min(1,intensity*state.opacity);const gradient=state.enabled?`radial-gradient(${radius}px circle at ${state.x}px ${state.y}px, rgba(255,255,255,${Math.min(1,glowStrength*.4)}) 0%, color-mix(in srgb, ${lightColor} ${Math.min(100,glowStrength*42)}%, transparent) 24%, rgba(218,235,252,${Math.min(1,glowStrength*.3)}) 44%, color-mix(in srgb, ${lightColor} ${Math.min(100,glowStrength*22)}%, transparent) 58%, rgba(218,235,252,${Math.min(1,glowStrength*.16)}) 62%, rgba(218,235,252,0) 80%)`:undefined;const mergedBackgroundImage=gradient?existingBackgroundImage?`${gradient}, ${existingBackgroundImage}`:gradient:existingBackgroundImage;const glowShadow=state.enabled?`inset 0 0 ${Math.round(radius*.24)}px color-mix(in srgb, ${lightColor} ${Math.min(100,glowStrength*24)}%, transparent)`:\"\";const mergedBoxShadow=glowShadow?existingBoxShadow?`${existingBoxShadow}, ${glowShadow}`:glowShadow:existingBoxShadow;return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,onMouseEnter:onMouseEnter,onMouseMove:onMouseMove,onMouseLeave:onMouseLeave,style:{...props.style,backgroundImage:mergedBackgroundImage,backgroundRepeat:\"no-repeat\",boxShadow:mergedBoxShadow,transition:\"background-image 220ms ease, box-shadow 220ms ease\"}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function AnimatedClaimsRing(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const ringRef=useRef(null);const isInView=useInView(ringRef,{amount:.2});const isStatic=useIsStaticRenderer();const shouldAnimate=!isStatic&&isInView;const setRefs=useMemo(()=>node=>{ringRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;if(isStatic)return;const root=ringRef.current;if(!root)return;let frameId=0;const durationMs=18e3;const children=Array.from(root.children).filter(child=>child instanceof HTMLElement);const baseRootTransform=window.getComputedStyle(root).transform;const baseRootTransformValue=baseRootTransform&&baseRootTransform!==\"none\"?baseRootTransform:\"\";const childBases=children.map(child=>{const current=window.getComputedStyle(child).transform;return current&&current!==\"none\"?current:\"\";});root.style.transformOrigin=\"50% 50%\";const applyAngle=angle=>{root.style.transform=`${baseRootTransformValue} rotate(${angle}deg)`.trim();for(let index=0;index<children.length;index++){const child=children[index];child.style.transformOrigin=\"50% 50%\";child.style.transform=`${childBases[index]} rotate(${-angle}deg)`.trim();}};const startTime=window.performance.now();if(!shouldAnimate){applyAngle(0);return()=>{root.style.transform=baseRootTransformValue;for(let index=0;index<children.length;index++){children[index].style.transform=childBases[index];}};}const tick=now=>{const elapsed=now-startTime;const progress=elapsed%durationMs/durationMs;const angle=progress*360;applyAngle(angle);frameId=window.requestAnimationFrame(tick);};frameId=window.requestAnimationFrame(tick);return()=>{if(frameId)window.cancelAnimationFrame(frameId);root.style.transform=baseRootTransformValue;for(let index=0;index<children.length;index++){children[index].style.transform=childBases[index];}};},[isStatic,shouldAnimate]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}function parseFormattedCount(raw){const trimmed=raw.trim();const match=trimmed.match(/(\\d[\\d,]*(?:\\.\\d+)?)(\\+)?/);if(!match)return null;const numericPart=match[1];const hasPlus=Boolean(match[2]);const normalized=numericPart.replace(/,/g,\"\").trim();if(!/^\\d+(\\.\\d+)?$/.test(normalized))return null;const value=Number(normalized);if(!Number.isFinite(value))return null;return{value,hasPlus,raw:`${numericPart}${hasPlus?\"+\":\"\"}`};}function formatCount(value,hasPlus){const formatted=new Intl.NumberFormat(\"en-US\",{maximumFractionDigits:0}).format(Math.round(value));return hasPlus?`${formatted}+`:formatted;}function getNodeDepth(node){let depth=0;let current=node;while(current?.parentNode){depth+=1;current=current.parentNode;}return depth;}function findDeepestCountTextNode(root){if(typeof document===\"undefined\")return null;const walker=document.createTreeWalker(root,NodeFilter.SHOW_TEXT);let current=walker.nextNode();let best=null;while(current){const textNode=current;const raw=(textNode.nodeValue||\"\").trim();const meta=parseFormattedCount(raw);if(meta){const depth=getNodeDepth(textNode);if(!best||depth>=best.depth){best={textNode,meta,depth};}}current=walker.nextNode();}if(!best)return null;return{textNode:best.textNode,meta:best.meta};}export function withCountUp(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const hasStartedRef=useRef(false);const hasCompletedRef=useRef(false);const frameRef=useRef(null);const mountFrameRef=useRef(null);const observerRef=useRef(null);useEffect(()=>{if(typeof window===\"undefined\")return;const node=elementRef.current;if(!node)return;const duration=1200;const easeOutCubic=t=>1-Math.pow(1-t,3);const startAnimation=(textNode,meta,finalText)=>{if(hasStartedRef.current||hasCompletedRef.current)return;hasStartedRef.current=true;const startTime=window.performance.now();textNode.nodeValue=formatCount(0,meta.hasPlus);const tick=now=>{const elapsed=now-startTime;const progress=Math.min(elapsed/duration,1);const eased=easeOutCubic(progress);const currentValue=meta.value*eased;textNode.nodeValue=formatCount(currentValue,meta.hasPlus);if(progress<1){frameRef.current=window.requestAnimationFrame(tick);}else{hasCompletedRef.current=true;frameRef.current=null;textNode.nodeValue=finalText;}};frameRef.current=window.requestAnimationFrame(tick);};mountFrameRef.current=window.requestAnimationFrame(()=>{const matched=findDeepestCountTextNode(node);if(!matched)return;const{textNode,meta}=matched;const finalText=formatCount(meta.value,meta.hasPlus);textNode.nodeValue=meta.raw;observerRef.current=new window.IntersectionObserver(entries=>{const entry=entries[0];if(!entry||!entry.isIntersecting)return;observerRef.current?.disconnect();observerRef.current=null;startAnimation(textNode,meta,finalText);},{threshold:.35});observerRef.current.observe(node);});return()=>{if(mountFrameRef.current!==null){window.cancelAnimationFrame(mountFrameRef.current);mountFrameRef.current=null;}observerRef.current?.disconnect();observerRef.current=null;if(frameRef.current!==null){window.cancelAnimationFrame(frameRef.current);frameRef.current=null;}};},[]);const setRefs=node=>{elementRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;};return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCountUp\":{\"type\":\"reactHoc\",\"name\":\"withCountUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSoftCursorLight\":{\"type\":\"reactHoc\",\"name\":\"withSoftCursorLight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AnimatedClaimsRing\":{\"type\":\"reactHoc\",\"name\":\"AnimatedClaimsRing\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"yQAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,CAAC,CAAC,EACjD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,CAAQ,CAAC,CAAE,EACjI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,EAAE,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,CAAU,GAAG,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GAAG,CAAQ,CAAC,EAAE,EACjJ,EAAa,QAAQ,GAAQ,EAAO,CAAU,CAAC,CAAE,EACjD,SAAS,GAAU,CACnB,GAAK,CAAC,EAAM,GAAUA,EAAS,CAAU,EAKzC,OAHA,OACA,EAAa,IAAI,CA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