1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fa6f7ce7-99e8-5b34-9afb-4d3d7b2a165e")}catch(e){}}(); 3import{s as e}from"./jsx-runtime-D4ePz0Hl.js";import{t}from"./react-BXH-GOAS.js";import{D as n}from"./components-CDo3yjgw.js";import{t as r}from"./utils-CjUr88hv.js";import{r as i}from"./useSignupRedirects-BSkdT_4N.js";import{i as a}from"./pushSubscription-vzO9AQ6U.js";var o=e(t(),1),s=`active_upgrade_2`,c=[`popup_closed`,`email_capture_disabled`,s,`language`,`visit_token`,`referral_id`,`form_preview_banner_disabled`,`last_resource_guid`,`admin_logged_in`,`notifications_read`,`beehiiv_honey`,i],l=[`email_capture_modal_closed_`],u={popup_closed:{name:`popup_closed`,value:`true`,days:4},email_capture_disabled:{name:`email_capture_disabled`,value:`true`,days:30},[s]:{name:s,value:`true`,days:30}},d=({initialCookies:e})=>{let[t]=n(),[r,i]=(0,o.useState)({}),[a,s]=(0,o.useState)(!1),[d,f]=(0,o.useState)({}),p=(0,o.useCallback)(()=>{let e=document.cookie.split(`; `),t={};for(let n of e){let[e,r]=n.split(`=`),i=e||r,a=c.includes(e)||l.some(t=>e.startsWith(t));i&&a&&(t[e]=decodeURIComponent(r))}return t},[]),m=({name:e,value:t,days:n,minutes:r})=>{let i=new Date;if(r!==void 0)i.setTime(i.getTime()+r*60*1e3);else if(n!==void 0)i.setTime(i.getTime()+n*24*60*60*1e3);else throw Error(`Either days or minutes must be provided`);document.cookie=`${e}=${encodeURIComponent(t)};expires=${i.toUTCString()};path=/`,d[e]=t,f({...d})},h=e=>{document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;let t={...d};delete t?.[e],f({...t}),i(t=>{let n={...t};return delete n[e],n})};return(0,o.useEffect)(()=>{if(a)return;i(p());for(let[t,n]of Object.entries(e)){let e=u[t];n&&e&&m(e)}let n=t.get(`ref`);n&&m({name:`referral_id`,value:n,days:30}),s(!0)},[]),{setCookie:m,cookies:{...r,...d},cookiesSet:a,removeCookie:h}},f=async e=>{e===`token`&&await a(),document.cookie=`${e}=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT`,window.location.href=window.location.pathname},p=()=>{let e=r();return!!e&&e.VITE_STYTCH_DEVICE_FINGERPRINTING_ENABLED===`true`},m=async()=>{if(!p())return;let e=r(),t=e.VITE_STYTCH_PUBLIC_TOKEN;if(!t||typeof window.GetTelemetryID!=`function`)return;let n=e.VITE_STYTCH_SUBMIT_URL;try{return await window.GetTelemetryID(n?{publicToken:t,submitURL:n}:{publicToken:t})}catch{return}};export{d as a,s as i,p as n,f as r,m as t}; 4//# sourceMappingURL=stytch-CmmoOQzG.js.map 5//# debugId=fa6f7ce7-99e8-5b34-9afb-4d3d7b2a165e
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.