{"version":3,"file":"Navigation.B0YcNgra.mjs","names":[],"sources":["https:/framerusercontent.com/modules/MnjZUP24m4UFEVAo4MPz/ORjABYGQDTz2FZrMumt6/goToMarket.js","https:/framerusercontent.com/modules/04WpEFqEVveGuVlUO8xE/U04L7jUIc4nZeQYh6uER/guards.js","https:/framerusercontent.com/modules/kSMCNeBYpO4VGJ0nrZPP/dSnR9qYhnzDMQnuvvArL/log.js","https:/framerusercontent.com/modules/WsLN4XQfJdeqkYSXsIEd/1FseRCOcpBo8XGbgXtgA/Navigation.js"],"sourcesContent":["// !!!\n// THIS FILE IS FOR MANAGING GOOLGE TAG MANAGER.\n// IT IS CALLED goToMarket.tsx BECAUSE GTM.tsx WILL BE BLOCKED BY AD BLOCKERS.\n// !!!\nexport const goToMarket={enableCookies(){if(!window.dataLayer)return;window.dataLayer.push({event:\"cookieConsentAllow\",cookieConsent:\"allow\"});},trackEvent(data,cb){if(!data.category||!data.action||!window.dataLayer){return;}window.dataLayer.push({event:\"eventTracking\",trackingEventCategory:data.category,trackingEventAction:data.action,trackingEventLabel:data.label||\"\",trackingEventValue:data.value||\"\",nonInteraction:data.nonInteraction||false,eventCallback:cb});}};\nexport const __FramerMetadata__ = {\"exports\":{\"goToMarket\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"EventCategory\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./goToMarket.map","import{isBrowser}from\"framer-motion\";export const isString=value=>{return typeof value===\"string\";};export const isProductionSite=()=>{if(isBrowser){return window.location.host.includes(\"framer.com\");}else{return false;}};\nexport const __FramerMetadata__ = {\"exports\":{\"isString\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isProductionSite\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./guards.map","import{isProductionSite}from\"https://framerusercontent.com/modules/04WpEFqEVveGuVlUO8xE/U04L7jUIc4nZeQYh6uER/guards.js\";export function log(output){if(!isProductionSite()){console.log(output);}}\nexport const __FramerMetadata__ = {\"exports\":{\"log\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,forwardRef,useRef,startTransition}from\"react\";import{goToMarket}from\"https://framerusercontent.com/modules/MnjZUP24m4UFEVAo4MPz/ORjABYGQDTz2FZrMumt6/goToMarket.js\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{log}from\"https://framerusercontent.com/modules/kSMCNeBYpO4VGJ0nrZPP/dSnR9qYhnzDMQnuvvArL/log.js\";export function OpenType(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,fontFeatureSettings:`\"salt\", \"kern\", \"cv05\", \"cv11\", \"ccmp\"`}});});}// Auth Buttons\nconst useStore=createStore({userHasInitialized:false,user:null});function isUser(data){return data?.name!==undefined;}export function withUser(Component){return props=>{const[{user},setStore]=useStore();useEffect(()=>{const fetchUser=async()=>{log(\"Fetching user\");const data=await fetch(\"https://api.framer.com/site/users/me\",{credentials:\"include\"});const user=await data.json();if(isUser(user)){goToMarket.trackEvent({category:\"HasFramerUser\",action:\"true\"});startTransition(()=>setStore({user,userHasInitialized:true}));}else{goToMarket.trackEvent({category:\"HasFramerUser\",action:\"false\"});startTransition(()=>setStore({userHasInitialized:true}));}};if(![\"www.framer.com\",\"framer.com\"].includes(window.location.hostname)){console.log(\"Skipping the login state because we're not on framer.com\");return;}fetchUser().catch(console.error);},[]);let authenticatedProps={};if(isUser(user)){authenticatedProps={label:\"Open Framer\",avatarImage:user.avatar,avatar:!!user.avatar,link:\"https://framer.com/projects\",variant:!!user.avatar?\"Nav\":props.variant};}let componentProps={...props,...authenticatedProps};return /*#__PURE__*/_jsx(Component,{...props,...componentProps});};}const useOutsideClick=callback=>{const ref=useRef();const[{isOpen}]=useBrandMenuStore();useEffect(()=>{const handleClick=event=>{if(ref.current&&!ref.current.contains(event.target)){callback();}};document.addEventListener(\"click\",handleClick,true);return()=>{document.removeEventListener(\"click\",handleClick,true);};},[ref,isOpen]);return ref;};export function hideWhenAuthenticated(Component){return props=>{const[{user,userHasInitialized}]=useStore();const isAuthenticated=userHasInitialized&&isUser(user);return!isAuthenticated&&/*#__PURE__*/_jsx(Component,{...props});};}const useBrandMenuStore=createStore({isOpen:false});export function withRightClickTrigger(Component){return props=>{const[{isOpen},setStore]=useBrandMenuStore();const handleClick=e=>{e.preventDefault();if(e.type===\"contextmenu\"){startTransition(()=>setStore({isOpen:!isOpen}));}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick,onContextMenu:handleClick});};}export function withBrandMenuOpenState(Component){return props=>{const[{isOpen},setStore]=useBrandMenuStore();const initialized=false;useEffect(()=>{if(!initialized){startTransition(()=>setStore({isOpen:false}));}},[]);const handleClickOutside=()=>{if(isOpen){startTransition(()=>setStore({isOpen:false}));}};const ref=useOutsideClick(handleClickOutside);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:280,top:40,left:0,pointerEvents:isOpen?\"all\":\"none\",zIndex:props.style?.zIndex},ref:ref,children:/*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:isOpen?1:0,transform:isOpen?\"scale(1)\":\"scale(0.95)\",transition:\"ease 0.2s\",position:\"relative\"}})});};}export function withCloseOnClick(Component){return props=>{const[{isOpen},setStore]=useBrandMenuStore();const handleClick=e=>{startTransition(()=>setStore({isOpen:false}));};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}export function withCloseBrandMenuOnHover(Component){return props=>{const[{isOpen},setStore]=useBrandMenuStore();const handleMouseEnter=e=>{startTransition(()=>setStore({isOpen:false}));};return /*#__PURE__*/_jsx(Component,{...props,onHoverStart:handleMouseEnter});};}export function withCopyLogo(Component){return props=>{const[{isOpen},setStore]=useBrandMenuStore();const handleClick=e=>{startTransition(()=>setStore({isOpen:false}));navigator.clipboard?.writeText('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"140\" height=\"140\"><path d=\"M 44.65 33.992 L 95.35 33.992 L 95.35 59.341 L 70 59.341 Z M 44.65 59.341 L 70 59.341 L 95.35 84.691 L 44.65 84.691 Z M 44.65 84.691 L 70 84.691 L 70 110.041 Z\" fill=\"rgb(0, 0, 0)\"></path></svg>');};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withUser\":{\"type\":\"reactHoc\",\"name\":\"withUser\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OpenType\":{\"type\":\"reactHoc\",\"name\":\"OpenType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCloseBrandMenuOnHover\":{\"type\":\"reactHoc\",\"name\":\"withCloseBrandMenuOnHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideWhenAuthenticated\":{\"type\":\"reactHoc\",\"name\":\"hideWhenAuthenticated\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCopyLogo\":{\"type\":\"reactHoc\",\"name\":\"withCopyLogo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBrandMenuOpenState\":{\"type\":\"reactHoc\",\"name\":\"withBrandMenuOpenState\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRightClickTrigger\":{\"type\":\"reactHoc\",\"name\":\"withRightClickTrigger\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCloseOnClick\":{\"type\":\"reactHoc\",\"name\":\"withCloseOnClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Navigation.map"],"mappings":"gYAMsC,GAAA,YCNtC,AAEkC,GAAA,CAFlC,GAAqC,YCArC,GAAwH,GCAqR,SAAgB,EAAS,EAAU,CA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