{"version":3,"file":"Animations.DPi3dDdK.mjs","names":["useStore","_window"],"sources":["https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/YszmfeHPKXUvtsfA5TXO/z0shzw23sobeS9M7g1Ri/Animations.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","var _window;import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({showIntro:(_window=window)===null||_window===void 0?void 0:_window.showIntro});export function withTextAppear(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{opacity:1},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function blockScrollEffect(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props});};}export function HomeAnimationNavEffect(Component){return props=>{useEffect(()=>{var _window,_window1;if(!((_window=window)===null||_window===void 0?void 0:_window.showIntro)||!Math.floor((new Date().getTime()-((_window1=window)===null||_window1===void 0?void 0:_window1.showIntro))/864e5)){props={...props,animate:{opacity:1,scale:1,transition:{delay:2,duration:1,ease:[.44,0,.56,1],type:\"tween\"},x:0,y:0},initial:{opacity:.001,scale:1,x:0,y:-100}};window.showIntro=new Date().getTime();}},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function HomeAnimationGPTEffect(Component){return props=>{useEffect(()=>{var _window;if(!((_window=window)===null||_window===void 0?void 0:_window.showIntro)){props={...props,animate:{opacity:1,transition:{delay:2,duration:1,ease:[.44,0,.56,1],type:\"tween\"},y:0},initial:{opacity:.001,y:100}};}},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function HomeAnimationHeroSection(Component){return props=>{const[store]=useStore();const[variant,setVariant]=useState(props.variant);useEffect(()=>{if(store.showIntro){setVariant(\"VPNj5IIxZ\");}},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function withHomeBlogTitleAnimation(Component){return props=>{const variants=[\"Variant 1\",\"Variant 2\",\"Variant 3\"];const[index,setIndex]=useState(0);const variant=variants[index];useEffect(()=>{const interval=setInterval(()=>{setIndex(currentIndex=>(currentIndex+1)%variants.length);},2e3);return()=>clearInterval(interval);},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function withCountUp(Component){return props=>{const[count,setCount]=useState(0);useEffect(()=>{const interval=setInterval(()=>{setCount(count=>count+1);},2e3);console.log(props);return()=>clearInterval(interval);},[]);return /*#__PURE__*/_jsx(\"span\",{});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTextAppear\":{\"type\":\"reactHoc\",\"name\":\"withTextAppear\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HomeAnimationHeroSection\":{\"type\":\"reactHoc\",\"name\":\"HomeAnimationHeroSection\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HomeAnimationNavEffect\":{\"type\":\"reactHoc\",\"name\":\"HomeAnimationNavEffect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"blockScrollEffect\":{\"type\":\"reactHoc\",\"name\":\"blockScrollEffect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HomeAnimationGPTEffect\":{\"type\":\"reactHoc\",\"name\":\"HomeAnimationGPTEffect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCountUp\":{\"type\":\"reactHoc\",\"name\":\"withCountUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHomeBlogTitleAnimation\":{\"type\":\"reactHoc\",\"name\":\"withHomeBlogTitleAnimation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Animations.map"],"mappings":"sSAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,CAAO,EAAC,AAAC,EAAC,CAClD,EAAa,GAAU,CACwC,OAA3D,GAAW,aAAY,EAAS,EAAS,EAAU,MAAM,EAAE,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,CAAS,EAAC,AAAE,EAClI,SAAkB,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,CAAO,EAAC,CAAC,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAE9B,OADU,GAAW,aAAY,EAAS,EAAS,EAAW,E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