{"version":3,"file":"Examples.BL9CPcdW.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/d2YdEIGgLdLocGuN0O9k/9usPTUyxlRJooLnnVgpj/Examples.js"],"sourcesContent":["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\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export const useIpwhois=ip=>{const[val,setval]=useState(null);useEffect(()=>{const fetchData=async()=>{const BASE_URL=\"https://ipwhois.pro/?key=MjdM2iBKJn5AXnCH\";try{const result=await fetch(BASE_URL);const data=await result.json();setval(data);}catch(e){console.log(e);}};void fetchData();},[ip]);return val;};/**\n * @summary Redirects non-US users to Typeform based on country_code value.\n */export function withLinkRedirect(Component){const queryString=window?.location.search;const params=queryString?`&${queryString.substring(1)}`:\"\";return props=>{const data=useIpwhois();return /*#__PURE__*/_jsx(Component,{...props,link:data?.success===true&&data?.country_code!==\"US\"?\"https://levels.link/waitlist-international?utm_campaign=homepage\":`https://app.levels.com/join?quiz=true${params}`});};}export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLinkRedirect\":{\"type\":\"reactHoc\",\"name\":\"withLinkRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIpwhois\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"sTAGG,SAAgB,EAAiB,EAAU,CAAC,IAAM,EAAY,GAAQ,SAAS,OAAa,EAAO,EAAY,IAAI,EAAY,UAAU,EAAE,GAAG,GAAG,MAAO,IAAO,CAAC,IAAM,EAAK,GAAY,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAM,UAAU,IAAM,GAAM,eAAe,KAAK,mEAAmE,wCAAwC,IAAS,CAAC,yBAHvW,IAAsC,IAAqE,IAAqE,CAC5M,EAAY,CAAC,WAAW,UAAU,CAAC,CAAc,EAAW,GAAI,CAAC,GAAK,CAAC,EAAI,GAAQA,EAAS,KAAK,CAA6O,OAA5O,MAAc,EAAiB,SAAS,CAA4D,GAAG,CAAoC,IAAM,EAAK,MAAjC,MAAM,MAAM,4CAAS,EAAyB,MAAM,CAAC,EAAO,EAAK,OAAQ,EAAE,CAAC,QAAQ,IAAI,EAAE,KAAoB,EAAG,CAAC,EAAG,CAAC,CAAQ"}