PageSourceSearch

https://itsraw.ai/_next/static/chunks/pages/_app-dc67ef9867277fa3.js

js itsraw.ai collected 2026-10-05 12:04:57 UTC 374,858 bytes, 203 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{120:(e,t,r)=>{"use strict";r.d(t,{T5:()=>m,nO:()=>_,_R:()=>v,kX:()=>p});var n=r(2384),i=r(1117);async function s(e="",t){let{async:r,defer:n,beforeLoad:o,crossOrigin:a,nonce:l}=t||{};return(0,i.L)(()=>new Promise((t,i)=>{e||i(Error("loadScript cannot be called without a src")),document&&document.body||i(Error("loadScript cannot be called when document does not exist"));let s=document.createElement("script");a&&s.setAttribute("crossorigin",a),s.async=r||!1,s.defer=n||!1,s.addEventListener("load",()=>{s.remove(),t(s)}),s.addEventListener("error",t=>{s.remove(),i(t.error??Error(`failed to load script: ${e}`))}),s.src=e,s.nonce=l,o?.(s),document.body.appendChild(s)}),{shouldRetry:(e,t)=>t<=5})}var o=r(5262);function a(e){return e.startsWith("/")}var l=r(7389);let u="failed_to_load_clerk_js",c="Failed to load Clerk",{isDevOrStagingUrl:d}=(0,o.RZ)(),h=(0,n._r)({packageName:"@clerk/shared"});function p(e){h.setPackageName({packageName:e})}function f(){if("undefined"==typeof window||!window.Clerk)return!1;let e=window.Clerk;return"object"==typeof e&&"function"==typeof e.load}function g(e,t){return new Promise((r,i)=>{let s=!1,o=(e,t)=>{clearTimeout(e),clearInterval(t)};t?.addEventListener("error",()=>{o(l,d),i(new n.cR(c,{code:u}))});let a=()=>{!s&&f()&&(s=!0,o(l,d),r(null))},l=setTimeout(()=>{s||(s=!0,o(l,d),f()?r(null):i(new n.cR(c,{code:"failed_to_load_clerk_js_timeout"})))},e);a();let d=setInterval(()=>{if(s)return void clearInterval(d);a()},100)})}let v=async e=>{let t=e?.scriptLoadTimeout??15e3;if(f())return null;if(!e?.publishableKey)return h.throwMissingPublishableKeyError(),null;let r=_(e),i=document.querySelector("script[data-clerk-js-script]");if(i)if(function(e){if("undefined"==typeof window||!window.performance)return!1;let t=performance.getEntriesByName(e,"resource");if(0===t.length)return!1;let r=t[t.length-1];if(0===r.transferSize&&0===r.decodedBodySize&&(0===r.responseEnd||r.responseEnd>0&&r.responseStart>0||"responseStatus"in r&&(r.responseStatus>=400||0===r.responseStatus)))return!0;return!1}(r))i.remove();else try{return await g(t,i),null}catch{i.remove()}let o=g(t);return s(r,{async:!0,crossOrigin:"anonymous",nonce:e.nonce,beforeLoad:y(e)}).catch(e=>{throw new n.cR(c+(e.message?`, ${e.message}`:""),{code:u,cause:e})}),o},_=e=>{let{clerkJSUrl:t,clerkJSVariant:r,clerkJSVersion:n,proxyUrl:i,domain:s,publishableKey:u}=e;if(t)return t;let c="";c=i&&function(e){var t;return!e||(t=e,/^http(s)?:\/\//.test(t||""))||a(e)}(i)?(function(e){return e?a(e)?new URL(e,window.location.origin).toString():e:""})(i).replace(/http(s)?:\/\//,""):s&&!d((0,o.q5)(u)?.frontendApi||"")?(0,l.TV)(s):(0,o.q5)(u)?.frontendApi||"";let h=r?`${r.replace(/\.+$/,"")}.`:"",p=((e,t="5.125.9")=>{let r;if(e)return e;let n=(r=t,r.trim().replace(/^v/,"").match(/-(.+?)(\.|$)/)?.[1]);if(n)return"snapshot"===n?"5.125.9":n;return t.trim().replace(/^v/,"").split(".")[0]})(n);return`https://${c}/npm/@clerk/clerk-js@${p}/dist/clerk.${h}browser.js`},m=e=>{let t={};return e.publishableKey&&(t["data-clerk-publishable-key"]=e.publishableKey),e.proxyUrl&&(t["data-clerk-proxy-url"]=e.proxyUrl),e.domain&&(t["data-clerk-domain"]=e.domain),e.nonce&&(t.nonce=e.nonce),t},y=e=>t=>{let r=m(e);for(let e in r)t.setAttribute(e,r[e])}},293:(e,t,r)=>{"use strict";r.d(t,{$R:()=>n.$R,LR:()=>n.LR,_r:()=>n._r,cp:()=>n.cp,u$:()=>n.u$});var n=r(2384)},431:(e,t,r)=>{"use strict";r.d(t,{I:()=>s});var n=r(3636),i=r(4935);let s=!r(6763).M0&&(0,n.b_)()&&!i.ev},512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{StaticGenBailoutError:function(){return n},isStaticGenBailoutError:function(){return i}});let r="NEXT_STATIC_GEN_BAILOUT";class n extends Error{constructor(...e){super(...e),this.code=r}}function i(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},763:(e,t,r)=>{"use strict";e.exports=r(4410)},837:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});let n=e=>"undefined"!=typeof atob&&"function"==typeof atob?atob(e):"undefined"!=typeof global&&global.Buffer?new global.Buffer(e,"base64").toString():e},854:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return l}});let n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(1462));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}let s={current:null},o="function"==typeof n.cache?n.cache:e=>e,a=console.warn;function l(e){return function(...t){a(e(...t))}}o(e=>{try{a(s.current)}finally{s.current=null}})},1117:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});let n={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},i=async e=>new Promise(t=>setTimeout(t,e)),s=(e,t)=>t?e*(1+Math.random()):e,o=async(e,t={})=>{let r=0,{shouldRetry:o,initialDelay:a,maxDelayBetweenRetries:l,factor:u,retryImmediately:c,jitter:d,onBeforeRetry:h}={...n,...t},p=(e=>{let t=0;return async()=>{await i((()=>{let r=e.initialDelay*Math.pow(e.factor,t);return r=s(r,e.jitter),Math.min(e.maxDelayBetweenRetries||r,r)})()),t++}})({initialDelay:a,maxDelayBetweenRetries:l,factor:u,jitter:d});for(;;)try{return await e()}catch(e){if(!o(e,++r))throw e;h&&await h(r),c&&1===r?await i(s(100,d)):await p()}}},1393:()=>{},1515:(e,t,r)=>{"use strict";r.d(t,{M2:()=>c,MR:()=>u,_F:()=>l});let n={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},i=new Set(["first_factor","second_factor","multi_factor"]),s=new Set(["strict_mfa","strict","moderate","lax"]),o=e=>e.replace(/^(org:)*/,"org:"),a=(e,t)=>{let{org:r,user:n}=l(e),[i,s]=t.split(":"),o=s||i;return"org"===i?r.includes(o):"user"===i?n.includes(o):[...r,...n].includes(o)},l=e=>{let t=e?e.split(",").map(e=>e.trim()):[];return{org:t.filter(e=>e.split(":")[0].includes("o")).map(e=>e.split(":")[1]),user:t.filter(e=>e.split(":")[0].includes("u")).map(e=>e.split(":")[1])}},u=e=>t=>{if(!e.userId)return!1;let r=((e,t)=>{let{features:r,plans:n}=t;return e.feature&&r?a(r,e.feature):e.plan&&n?a(n,e.plan):null})(t,e),l=((e,t)=>{let{orgId:r,orgRole:n,orgPermissions:i}=t;return(e.role||e.permission)&&r&&n&&i?e.permission?i.includes(o(e.permission)):e.role?o(n)===o(e.role):null:null})(t,e),u=((e,{factorVerificationAge:t})=>{if(!e.reverification||!t)return null;let r=(e=>{let t;if(!e)return!1;let r="string"==typeof e&&s.has(e),o="object"==typeof e&&(t=e.level,i.has(t))&&(e=>"number"==typeof e&&e>0)(e.afterMinutes);return(!!r||!!o)&&(e=>"string"==typeof e?n[e]:e).bind(null,e)})(e.reverification);if(!r)return null;let{level:o,afterMinutes:a}=r(),[l,u]=t,c=-1!==l?a>l:null,d=-1!==u?a>u:null;switch(o){case"first_factor":return c;case"second_factor":return -1!==u?d:c;case"multi_factor":return -1===u?c:c&&d}})(t,e);return[r||l,u].some(e=>null===e)?[r||l,u].some(e=>!0===e):[r||l,u].every(e=>!0===e)},c=({authObject:{sessionId:e,sessionStatus:t,userId:r,actor:n,orgId:i,orgRole:s,orgSlug:o,signOut:a,getToken:l,has:u,sessionClaims:c},options:{treatPendingAsSignedOut:d=!0}})=>void 0===e&&void 0===r?{isLoaded:!1,isSignedIn:void 0,sessionId:e,sessionClaims:void 0,userId:r,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:a,getToken:l}:null===e&&null===r?{isLoaded:!0,isSignedIn:!1,sessionId:e,userId:r,sessionClaims:null,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:a,getToken:l}:d&&"pending"===t?{isLoaded:!0,isSignedIn:!1,sessionId:null,userId:null,sessionClaims:null,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:a,getToken:l}:e&&c&&r&&i&&s?{isLoaded:!0,isSignedIn:!0,sessionId:e,sessionClaims:c,userId:r,actor:n||null,orgId:i,orgRole:s,orgSlug:o||null,has:u,signOut:a,getToken:l}:e&&c&&r&&!i?{isLoaded:!0,isSignedIn:!0,sessionId:e,sessionClaims:c,userId:r,actor:n||null,orgId:null,orgRole:null,orgSlug:null,has:u,signOut:a,getToken:l}:void 0},1594:(e,t,r)=>{e.exports=r(6570)},1902:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_HEADER:function(){return n},FLIGHT_HEADERS:function(){return d},NEXT_ACTION_NOT_FOUND_HEADER:function(){return m},NEXT_DID_POSTPONE_HEADER:function(){return f},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return l},NEXT_HMR_REFRESH_HEADER:function(){return a},NEXT_IS_PRERENDER_HEADER:function(){return _},NEXT_REWRITTEN_PATH_HEADER:function(){return g},NEXT_REWRITTEN_QUERY_HEADER:function(){return v},NEXT_ROUTER_PREFETCH_HEADER:function(){return s},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return o},NEXT_ROUTER_STALE_TIME_HEADER:function(){return p},NEXT_ROUTER_STATE_TREE_HEADER:function(){return i},NEXT_RSC_UNION_QUERY:function(){return h},NEXT_URL:function(){return u},RSC_CONTENT_TYPE_HEADER:function(){return c},RSC_HEADER:function(){return r}});let r="rsc",n="next-action",i="next-router-state-tree",s="next-router-prefetch",o="next-router-segment-prefetch",a="next-hmr-refresh",l="__next_hmr_refresh_hash__",u="next-url",c="text/x-component",d=[r,i,s,a,o],h="_rsc",p="x-nextjs-stale-time",f="x-nextjs-postponed",g="x-nextjs-rewritten-path",v="x-nextjs-rewritten-query",_="x-nextjs-prerender",m="x-nextjs-action-not-found";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1981:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(8900)}])},2062:(e,t,r)=>{"use strict";let n,i;r.d(t,{ED:()=>ey,pc:()=>ek,TS:()=>eI,IC:()=>eP,Rs:()=>ew,Rx:()=>eC,rg:()=>eK,kH:()=>eV,e3:()=>e_,MZ:()=>eB,Kz:()=>eA,ho:()=>eN,hQ:()=>eb,Jd:()=>eW}),r(1515),r(2384),r(4466);var s=r(7407),o=r(1462),a=r(763),l=Object.prototype.hasOwnProperty;let u=new WeakMap,c=()=>{},d=c(),h=Object,p=e=>e===d,f=(e,t)=>({...e,...t}),g={},v={},_="undefined",m=typeof window!=_,y=typeof document!=_,b=m&&"Deno"in window,w=(e,t)=>{let r=u.get(e);return[()=>!p(t)&&e.get(t)||g,n=>{if(!p(t)){let i=e.get(t);t in v||(v[t]=i),r[5](t,f(i,n),i||g)}},r[6],()=>!p(t)&&t in v?v[t]:!p(t)&&e.get(t)||g]},E=!0,[k,S]=m&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[c,c],P={initFocus:e=>(y&&document.addEventListener("visibilitychange",e),k("focus",e),()=>{y&&document.removeEventListener("visibilitychange",e),S("focus",e)}),initReconnect:e=>{let t=()=>{E=!0,e()},r=()=>{E=!1};return k("online",t),k("offline",r),()=>{S("online",t),S("offline",r)}}},x=!o.useId,R=!m||b,O=R?o.useEffect:o.useLayoutEffect,C="undefined"!=typeof navigator&&navigator.connection,T=!R&&C&&(["slow-2g","2g"].includes(C.effectiveType)||C.saveData),j=new WeakMap,I=(e,t)=>e===`[object ${t}]`,A=0,M=e=>{let t,r,n=typeof e,i=h.prototype.toString.call(e),s=I(i,"Date"),o=I(i,"RegExp"),a=I(i,"Object");if(h(e)!==e||s||o)t=s?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=j.get(e))return t;if(t=++A+"~",j.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=M(e[r])+",";j.set(e,t)}if(a){t="#";let n=h.keys(e).sort();for(;!p(r=n.pop());)p(e[r])||(t+=r+":"+M(e[r])+",");j.set(e,t)}}return t},L=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?M(e):"",t]},F=0,U=()=>++F;async function $(...e){let[t,r,n,i]=e,s=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),o=s.populateCache,a=s.rollbackOnError,l=s.optimisticData,c=s.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(h))}return h(r);async function h(r){let i,[h]=L(r);if(!h)return;let[f,g]=w(t,h),[v,_,m,y]=u.get(t),b=()=>{let e=v[h];return("function"==typeof s.revalidate?s.revalidate(f().data,r):!1!==s.revalidate)&&(delete m[h],delete y[h],e&&e[0])?e[0](2).then(()=>f().data):f().data};if(e.length<3)return b();let E=n,k=!1,S=U();_[h]=[S,0];let P=!p(l),x=f(),R=x.data,O=x._c,C=p(O)?R:O;if(P&&g({data:l="function"==typeof l?l(C,R):l,_c:C}),"function"==typeof E)try{E=E(C)}catch(e){i=e,k=!0}if(E&&"function"==typeof E.then){let e;if(E=await E.catch(e=>{i=e,k=!0}
1),S!==_[h][0]){if(k)throw i;return E}k&&P&&(e=i,"function"==typeof a?a(e):!1!==a)&&(o=!0,g({data:C,_c:d}))}if(o&&!k&&("function"==typeof o?g({data:o(E,C),error:d,_c:d}):g({data:E,error:d,_c:d})),_[h][1]=U(),Promise.resolve(b()).then(()=>{g({_c:d})}),k){if(c)throw i;return}return E}}let D=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},N=(e,t)=>{if(!u.has(e)){let r=f(P,t),n=Object.create(null),i=$.bind(d,e),s=c,o=Object.create(null),a=(e,t)=>{let r=o[e]||[];return o[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},l=(t,r,n)=>{e.set(t,r);let i=o[t];if(i)for(let e of i)e(r,n)},h=()=>{if(!u.has(e)&&(u.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,l,a]),!R)){let t=r.initFocus(setTimeout.bind(d,D.bind(d,n,0))),i=r.initReconnect(setTimeout.bind(d,D.bind(d,n,1)));s=()=>{t&&t(),i&&i(),u.delete(e)}}};return h(),[e,i,h,s]}return[e,u.get(e)[4]]},[z,W]=N(new Map),B=f({onLoadingSlow:c,onSuccess:c,onError:c,onErrorRetry:(e,t,r,n,i)=>{let s=r.errorRetryCount,o=i.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;(p(s)||!(o>s))&&setTimeout(n,a,i)},onDiscarded:c,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:T?5e3:3e3,compare:function e(t,r){var n,i;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(l.call(t,n)&&++i&&!l.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},isPaused:()=>!1,cache:z,mutate:W,fallback:{}},{isOnline:()=>E,isVisible:()=>{let e=y&&document.visibilityState;return p(e)||"hidden"!==e}}),H=(e,t)=>{let r=f(e,t);if(t){let{use:n,fallback:i}=e,{use:s,fallback:o}=t;n&&s&&(r.use=n.concat(s)),i&&o&&(r.fallback=f(i,o))}return r},K=(0,o.createContext)({}),q="$inf$",V=m&&window.__SWR_DEVTOOLS_USE__,G=V?window.__SWR_DEVTOOLS_USE__:[],X=e=>"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Y=G.concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=L(t),[,,,i]=u.get(z);if(n.startsWith(q))return r(...e);let s=i[n];return p(s)?r(...e):(delete i[n],s)});return e(t,i,n)});V&&(window.__SWR_DEVTOOLS_REACT__=o);let J=()=>{},Q=J();new WeakMap;let Z=o.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),ee={dedupe:!0},et=h.defineProperty(e=>{let{value:t}=e,r=(0,o.useContext)(K),n="function"==typeof t,i=(0,o.useMemo)(()=>n?t(r):t,[n,r,t]),s=(0,o.useMemo)(()=>n?i:H(r,i),[n,r,i]),a=i&&i.provider,l=(0,o.useRef)(d);a&&!l.current&&(l.current=N(a(s.cache||z),i));let u=l.current;return u&&(s.cache=u[0],s.mutate=u[1]),O(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,o.createElement)(K.Provider,f(e,{value:s}))},"defaultValue",{value:B}),er=(n=(e,t,r)=>{let{cache:n,compare:i,suspense:s,fallbackData:l,revalidateOnMount:c,revalidateIfStale:h,refreshInterval:g,refreshWhenHidden:v,refreshWhenOffline:y,keepPreviousData:b}=r,[E,k,S,P]=u.get(n),[C,T]=L(e),j=(0,o.useRef)(!1),I=(0,o.useRef)(!1),A=(0,o.useRef)(C),M=(0,o.useRef)(t),F=(0,o.useRef)(r),D=()=>F.current.isVisible()&&F.current.isOnline(),[N,z,W,B]=w(n,C),H=(0,o.useRef)({}).current,K=p(l)?p(r.fallback)?d:r.fallback[C]:l,q=(e,t)=>{for(let r in H)if("data"===r){if(!i(e[r],t[r])&&(!p(e[r])||!i(en,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},V=(0,o.useMemo)(()=>{let e=!!C&&!!t&&(p(c)?!F.current.isPaused()&&!s&&!1!==h:c),r=t=>{let r=f(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=N(),i=B(),o=r(n),a=n===i?o:r(i),l=o;return[()=>{let e=r(N());return q(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]},[n,C]),G=(0,a.useSyncExternalStore)((0,o.useCallback)(e=>W(C,(t,r)=>{q(r,t)||e()}),[n,C]),V[0],V[1]),X=!j.current,Y=E[C]&&E[C].length>0,J=G.data,Q=p(J)?K&&"function"==typeof K.then?Z(K):K:J,et=G.error,er=(0,o.useRef)(Q),en=b?p(J)?p(er.current)?Q:er.current:J:Q,ei=(!Y||!!p(et))&&(X&&!p(c)?c:!F.current.isPaused()&&(s?!p(Q)&&h:p(Q)||h)),es=!!(C&&t&&X&&ei),eo=p(G.isValidating)?es:G.isValidating,ea=p(G.isLoading)?es:G.isLoading,el=(0,o.useCallback)(async e=>{let t,n,s=M.current;
1if(!C||!s||I.current||F.current.isPaused())return!1;let o=!0,a=e||{},l=!S[C]||!a.dedupe,u=()=>x?!I.current&&C===A.current&&j.current:C===A.current,c={isValidating:!1,isLoading:!1},h=()=>{z(c)},f=()=>{let e=S[C];e&&e[1]===n&&delete S[C]},g={isValidating:!0};p(N().data)&&(g.isLoading=!0);try{if(l&&(z(g),r.loadingTimeout&&p(N().data)&&setTimeout(()=>{o&&u()&&F.current.onLoadingSlow(C,r)},r.loadingTimeout),S[C]=[s(T),U()]),[t,n]=S[C],t=await t,l&&setTimeout(f,r.dedupingInterval),!S[C]||S[C][1]!==n)return l&&u()&&F.current.onDiscarded(C),!1;c.error=d;let e=k[C];if(!p(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return h(),l&&u()&&F.current.onDiscarded(C),!1;let a=N().data;c.data=i(a,t)?a:t,l&&u()&&F.current.onSuccess(t,C,r)}catch(r){f();let e=F.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,l&&u())&&(e.onError(r,C,e),(!0===t||"function"==typeof t&&t(r))&&(!F.current.revalidateOnFocus||!F.current.revalidateOnReconnect||D())&&e.onErrorRetry(r,C,e,e=>{let t=E[C];t&&t[0]&&t[0](3,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0}))}return o=!1,h(),!0},[C,n]),eu=(0,o.useCallback)((...e)=>$(n,A.current,...e),[]);if(O(()=>{M.current=t,F.current=r,p(J)||(er.current=J)}),O(()=>{if(!C)return;let e=el.bind(d,ee),t=0;F.current.revalidateOnFocus&&(t=Date.now()+F.current.focusThrottleInterval);let r=((e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}})(C,E,(r,n={})=>{if(0==r){let r=Date.now();F.current.revalidateOnFocus&&r>t&&D()&&(t=r+F.current.focusThrottleInterval,e())}else if(1==r)F.current.revalidateOnReconnect&&D()&&e();
1else if(2==r)return el();else if(3==r)return el(n)});return I.current=!1,A.current=C,j.current=!0,z({_k:T}),ei&&!S[C]&&(p(Q)||R?e():(e=>m&&typeof window.requestAnimationFrame!=_?window.requestAnimationFrame(e):setTimeout(e,1))(e)),()=>{I.current=!0,r()}},[C]),O(()=>{let e;function t(){let t="function"==typeof g?g(N().data):g;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!N().error&&(v||F.current.isVisible())&&(y||F.current.isOnline())?el(ee).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,v,y,C]),(0,o.useDebugValue)(en),s&&p(Q)&&C){if(!x&&R)throw Error("Fallback data is required when using Suspense in SSR.");M.current=t,F.current=r,I.current=!1;let e=P[C];if(p(e)||Z(eu(e)),p(et)){let e=el(ee);p(en)||(e.status="fulfilled",e.value=!0),Z(e)}else throw et}return{mutate:eu,get data(){return H.data=!0,en},get error(){return H.error=!0,et},get isValidating(){return H.isValidating=!0,eo},get isLoading(){return H.isLoading=!0,ea}}},function(...e){let t=f(B,(0,o.useContext)(K)),[r,i,s]=X(e),a=H(t,s),l=n,{use:u}=a,c=(u||[]).concat(Y);for(let e=c.length;e--;)l=c[e](l);return l(r,i||a.fetcher||null,a)}),en=()=>{},ei=en(),es=Object,eo=e=>e===ei,ea=new WeakMap,el=(e,t)=>e===`[object ${t}]`,eu=0,ec=e=>{let t,r,n=typeof e,i=es.prototype.toString.call(e),s=el(i,"Date"),o=el(i,"RegExp"),a=el(i,"Object");if(es(e)!==e||s||o)t=s?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=ea.get(e))return t;if(t=++eu+"~",ea.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=ec(e[r])+",";ea.set(e,t)}if(a){t="#";let n=es.keys(e).sort();for(;!eo(r=n.pop());)eo(e[r])||(t+=r+":"+ec(e[r])+",");ea.set(e,t)}}return t},ed=Promise.resolve(),eh=(i=e=>(t,r,n)=>{let i,s=(0,o.useRef)(!1),{cache:l,initialSize:c=1,revalidateAll:h=!1,persistSize:f=!1,revalidateFirstPage:g=!0,revalidateOnMount:v=!1,parallel:_=!1}=n,[,,,m]=u.get(z);try{(i=(e=>(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?ec(e):"",t]})(e?e(0,null):null)[0])(t))&&(i=q+i)}catch(e){}let[y,b,E]=w(l,i),k=(0,o.useCallback)(()=>p(y()._l)?c:y()._l,[l,i,c]);(0,a.useSyncExternalStore)((0,o.useCallback)(e=>i?E(i,()=>{e()}):()=>{},[l,i]),k,k);let S=(0,o.useCallback)(()=>{let e=y()._l;return p(e)?c:e},[i,c]),P=(0,o.useRef)(S());O(()=>{if(!s.current){s.current=!0;return}i&&b({_l:f?P.current:S()})},[i,l]);let x=v&&!s.current,R=e(i,async e=>{let i=y()._i,s=y()._r;b({_r:d});let o=[],a=S(),[u]=w(l,e),c=u().data,f=[],v=null;for(let e=0;e<a;++e){let[a,u]=L(t(e,_?null:v));if(!a)break;let[d,y]=w(l,a),b=d().data,E=h||i||p(b)||g&&!e&&!p(c)||x||c&&!p(c[e])&&!n.compare(c[e],b);if(r&&("function"==typeof s?s(b,u):E)){let t=async()=>{if(a in m){let e=m[a];delete m[a],b=await e}else b=await r(u);y({data:b,_k:u}),o[e]=b};_?f.push(t):await t()}else o[e]=b;_||(v=b)}return _&&await Promise.all(f.map(e=>e())),b({_i:d}),o},n),C=(0,o.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return i?(n&&(p(e)?b({_i:!0,_r:r.revalidate}):b({_i:!1,_r:r.revalidate})),arguments.length?R.mutate(e,{...r,revalidate:n}):R.mutate()):ed},[i,l]),T=(0,o.useCallback)(e=>{let r;if(!i)return ed;let[,n]=w(l,i);if("function"==typeof e?r=e(S()):"number"==typeof e&&(r=e),"number"!=typeof r)return ed;n({_l:r}),P.current=r;let s=[],[o]=w(l,i),a=null;for(let e=0;e<r;++e){let[r]=L(t(e,a)),[n]=w(l,r),i=r?n().data:d;if(p(i))return C(o().data);s.push(i),a=i}return C(s)},[i,l,C,S]);return{size:S(),setSize:T,mutate:C,get data(){return R.data},get error(){return R.error},get isValidating(){return R.isValidating},get isLoading(){return R.isLoading}}},(...e)=>{let[t,r,n]=X(e),s=(n.use||[]).concat(i);return er(t,r,{...n,use:s})});var ep=Object.prototype.hasOwnProperty;function ef(e,t,r){for(r of e.keys())if(eg(r,t))return r}function eg(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&eg(e[n],t[n]););return -1===n}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if((i=n)&&"object"==typeof i&&!(i=ef(t,i))||!t.has(i))return!1;return!0}
1if(r===Map){if(e.size!==t.size)return!1;for(n of e)if((i=n[0])&&"object"==typeof i&&!(i=ef(t,i))||!eg(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return -1===n}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return -1===n}if(!r||"object"==typeof e){for(r in n=0,e)if(ep.call(e,r)&&++n&&!ep.call(t,r)||!(r in t)||!eg(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!=e&&t!=t}function ev(e,t){if(!e)throw"string"==typeof t?Error(t):Error(`${t.displayName} not found`)}let e_=(e,t)=>{let{assertCtxFn:r=ev}=t||{},n=o.createContext(void 0);return n.displayName=e,[n,()=>{let t=o.useContext(n);return r(t,`${e} not found`),t.value},()=>{let e=o.useContext(n);return e?e.value:{}}]};function em({swrConfig:e,children:t}){return o.createElement(et,{value:e},t)}let[ey,eb]=e_("ClerkInstanceContext"),[ew,eE]=e_("UserContext"),[ek,eS]=e_("ClientContext"),[eP,ex]=e_("SessionContext");o.createContext({});let[eR,eO]=e_("CheckoutContext"),eC=({children:e,...t})=>o.createElement(eR.Provider,{value:{value:t}},e),[eT,ej]=e_("OrganizationContext"),eI=({children:e,organization:t,swrConfig:r})=>o.createElement(em,{swrConfig:r},o.createElement(eT.Provider,{value:{value:{organization:t}}},e));function eA(e){if(!o.useContext(ey)){if("function"==typeof e)return void e();throw Error(`${e} can only be used within the <ClerkProvider /> component.
2
3Possible fixes:
41. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
52. Check for multiple versions of the \`@clerk/shared\` package in your project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
6
7Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}let eM={PLANS_KEY:"billing-plans",SUBSCRIPTION_KEY:"billing-subscription",PAYMENT_METHODS_KEY:"billing-payment-methods",PAYMENT_ATTEMPTS_KEY:"billing-payment-attempts",STATEMENTS_KEY:"billing-statements"};function eL(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function eF(e){let{queryKey:t}=e;return{type:t[0],...t[2],...t[3].args}}function eU(e,t){let r=new Set(Object.keys(t)),n={};for(let t of Object.keys(e))r.has(t)||(n[t]=e[t]);return n}let e$={dedupingInterval:6e4,focusThrottleInterval:12e4},eD={...e$,revalidateFirstPage:!1},eN=()=>(eA("useClerk"),eb());"undefined"!=typeof window?o.useLayoutEffect:o.useEffect;let ez="useUser";function eW(){eA(ez);let e=eE();return(eb().telemetry?.record((0,s.FJ)(ez)),void 0===e)?{isLoaded:!1,isSignedIn:void 0,user:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}let eB=eg;function eH({hookName:e,resourceType:t,useFetcher:r,options:n}){return function(i){let{for:a,enabled:l,...u}=i||{},c=a||"user";eA(e);let d=r(c),h=((e,t)=>{let r="boolean"==typeof e&&e,n=(0,o.useRef)(r?t.initialPage:e?.initialPage??t.initialPage),i=(0,o.useRef)(r?t.pageSize:e?.pageSize??t.pageSize),s={};for(let n of Object.keys(t))s[n]=r?t[n]:e?.[n]??t[n];return{...s,initialPage:n.current,pageSize:i.current}})(u,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),p=eb(),f=eE(),{organization:g}=ej();p.telemetry?.record((0,s.FJ)(e));let v="organization"===c,_=function(e){let t=eb(),r=e?.enabled??!0,n=t.__unstable__environment,i=eE(),{organization:s}=ej(),o=e?.for==="organization",a=o?n?.commerceSettings.billing.organization.enabled:n?.commerceSettings.billing.user.enabled,l=!(e?.authenticated??!0)||(!o||!!s?.id)&&!!i?.id;return a&&r&&t.loaded&&l}({for:c,enabled:l,authenticated:!n?.unauthenticated}),m=void 0===u?void 0:{initialPage:h.initialPage,pageSize:h.pageSize,...n?.unauthenticated?{}:v?{orgId:g?.id}:{}},y=!!m&&p.loaded&&!!_;return(e=>{let{fetcher:t,config:r,keys:n}=e,[i,s]=(0,o.useState)(r.initialPage??1),a=(0,o.useRef)(r.initialPage??1),l=(0,o.useRef)(r.pageSize??10),u=r.enabled??!0,c="cache"===r.__experimental_mode,d=r.infinite??!1,h=r.keepPreviousData??!1,p=r.isSignedIn,f={...eF(n),initialPage:i,pageSize:l.current},g=function(e){let t=(0,o.useRef)(e),r=(0,o.useRef)(null);return t.current!==e&&(r.current=t.current,t.current=e),r.current}(p),v=!d&&u&&(!!c||!!t),{data:_,isValidating:m,isLoading:y,error:b,mutate:w}=er("boolean"==typeof p?!0===g&&!1===p||p&&v?f:null:v?f:null,!c&&t?e=>!1===p||!1===v?null:t(eU(e,{type:n.queryKey[0],...n.queryKey[2]})):null,{keepPreviousData:h,...e$}),{data:E,isLoading:k,isValidating:S,error:P,size:x,setSize:R,mutate:O}=eh(e=>d&&u&&!1!==p?{...eF(n),initialPage:a.current+e,pageSize:l.current}:null,e=>{let r=eU(e,{type:n.queryKey[0],...n.queryKey[2]});return t?.(r)},eD),C=(0,o.useMemo)(()=>d?x:i,[d,x,i]),T=(0,o.useCallback)(e=>d?void R(e):s(e),[R,d]),j=(0,o.useMemo)(()=>d?E?.map(e=>e?.data).flat()??[]:_?.data??[],[d,_,E]),I=(0,o.useMemo)(()=>d?E?.[E?.length-1]?.total_count||0:_?.total_count??0,[d,_,E]),A=d?k:y,M=d?S:m,L=(d?P:b)??null,F=(0,o.useCallback)(()=>{T(e=>Math.max(0,e+1))},[T]),U=(0,o.useCallback)(()=>{T(e=>Math.max(0,e-1))},[T]),$=(a.current-1)*l.current;return{data:j,count:I,error:L,isLoading:A,isFetching:M,isError:!!L,page:C,pageCount:Math.ceil((I-$)/l.current),fetchPage:T,fetchNext:F,fetchPrevious:U,hasNextPage:I-$*l.current>C*l.current,hasPreviousPage:(C-1)*l.current>$*l.current,revalidate:d?()=>O():()=>w(),setData:d?e=>O(e,{revalidate:!1}):e=>w(e,{revalidate:!1})}})({fetcher:d,config:{keepPreviousData:h.keepPreviousData,infinite:h.infinite,enabled:y,...n?.unauthenticated?{}:{isSignedIn:null!==f},__experimental_mode:h.__experimental_mode,initialPage:h.initialPage,pageSize:h.pageSize},keys:eL({stablePrefix:t,authenticated:!n?.unauthenticated,tracked:n?.unauthenticated?{for:c}:{userId:f?.id,...v?{_orgId:g?.id}:{}},untracked:{args:m}})})}}
7eH({hookName:"useStatements",resourceType:eM.STATEMENTS_KEY,useFetcher:()=>{let e=eb();if(e.loaded)return e.billing.getStatements}}),eH({hookName:"usePaymentAttempts",resourceType:eM.PAYMENT_ATTEMPTS_KEY,useFetcher:()=>{let e=eb();if(e.loaded)return e.billing.getPaymentAttempts}}),eH({hookName:"usePaymentMethods",resourceType:eM.PAYMENT_METHODS_KEY,useFetcher:e=>{let{organization:t}=ej(),r=eE();return"organization"===e?t?.getPaymentMethods:r?.getPaymentMethods}});let eK=eH({hookName:"usePlans",resourceType:eM.PLANS_KEY,useFetcher:e=>{let t=eb();if(t.loaded)return r=>t.billing.getPlans({...r,for:e})},options:{unauthenticated:!0}}),eq="useSubscription";function eV(e){eA(eq);let t=eb(),r=eE(),{organization:n}=ej(),i=t.__unstable__environment;t.telemetry?.record((0,s.FJ)(eq));let a=e?.for==="organization"?i?.commerceSettings.billing.organization.enabled:i?.commerceSettings.billing.user.enabled,l=(e?.enabled??!0)&&a,{queryKey:u}=function(e){let{userId:t,orgId:r,for:n}=e;return(0,o.useMemo)(()=>{let e="organization"===n?r:void 0;return eL({stablePrefix:eM.SUBSCRIPTION_KEY,authenticated:!0,tracked:{userId:t,orgId:e},untracked:{args:{orgId:e}}})},[t,r,n])}({userId:r?.id,orgId:n?.id,for:e?.for}),c=er(l?{queryKey:u}:null,({queryKey:e})=>{let r=e[3].args;return e[2].userId?t.billing.getSubscription(r):null},{dedupingInterval:6e4,keepPreviousData:e?.keepPreviousData}),d=(0,o.useCallback)(()=>{c.mutate()},[c]);return{data:c.data,error:c.error,isLoading:c.isLoading,isFetching:c.isValidating,revalidate:d}}let eG=(e,t,r)=>{let n=!!r,i=(0,o.useRef)(r);(0,o.useEffect)(()=>{i.current=r},[r]),(0,o.useEffect)(()=>{if(!n||!e)return()=>{};let r=(...e)=>{i.current&&i.current(...e)};return e.on(t,r),()=>{e.off(t,r)}},[n,t,e,i])},eX=o.createContext(null);eX.displayName="ElementsContext";let eY=e=>null!==e&&"object"==typeof e,eJ="[object Object]",eQ=(e,t)=>{if(!eY(e)||!eY(t))return e===t;let r=Array.isArray(e);if(r!==Array.isArray(t))return!1;let n=Object.prototype.toString.call(e)===eJ;if(n!==(Object.prototype.toString.call(t)===eJ))return!1;if(!n&&!r)return e===t;let i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;let o={};for(let e=0;e<i.length;e+=1)o[i[e]]=!0;for(let e=0;e<s.length;e+=1)o[s[e]]=!0;let a=Object.keys(o);return a.length===i.length&&a.every(r=>eQ(e[r],t[r]))},eZ=e=>((e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e})(o.useContext(eX),e);((e,t)=>{let r=`${(e=>e.charAt(0).toUpperCase()+e.slice(1))(e)}Element`,n=t?e=>{eZ(`mounts <${r}>`);let{id:t,className:n}=e;return o.createElement("div",{id:t,className:n})}:({id:t,className:n,fallback:i,options:s={},onBlur:a,onFocus:l,onReady:u,onChange:c,onEscape:d,onClick:h,onLoadError:p,onLoaderStart:f,onNetworksChange:g,onConfirm:v,onCancel:_,onShippingAddressChange:m,onShippingRateChange:y})=>{let b,w=eZ(`mounts <${r}>`),E="elements"in w?w.elements:null,[k,S]=o.useState(null),P=o.useRef(null),x=o.useRef(null),[R,O]=(0,o.useState)(!1);eG(k,"blur",a),eG(k,"focus",l),eG(k,"escape",d),eG(k,"click",h),eG(k,"loaderror",p),eG(k,"loaderstart",f),eG(k,"networkschange",g),eG(k,"confirm",v),eG(k,"cancel",_),eG(k,"shippingaddresschange",m),eG(k,"shippingratechange",y),eG(k,"change",c),u&&(b=()=>{O(!0),u(k)}),eG(k,"ready",b),o.useLayoutEffect(()=>{if(null===P.current&&null!==x.current&&E){let t=null;E&&(t=E.create(e,s)),P.current=t,S(t),t&&t.mount(x.current)}},[E,s]);let C=(e=>{let t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e},[e]),t.current})(s);return o.useEffect(()=>{if(!P.current)return;let e=((e,t,r)=>eY(e)?Object.keys(e).reduce((n,i)=>{let s=!eY(t)||!eQ(e[i],t[i]);return r.includes(i)?(s&&console.warn(`Unsupported prop change: options.${i} is not a mutable property.`),n):s?{...n||{},[i]:e[i]}:n},null):null)(s,C,["paymentRequest"]);e&&"update"in P.current&&P.current.update(e)},[s,C]),o.useLayoutEffect(()=>()=>{if(P.current&&"function"==typeof P.current.destroy)try{P.current.destroy(),P.current=null}catch{}},[]),o.createElement(o.Fragment,null,!R&&i,o.createElement("div",{id:t,style:{height:R?"unset":"0px",visibility:R?"visible":"hidden"},className:n,ref:x}))};return n.displayName=r,n.__elementType=e})("payment","undefined"==typeof window);let[e0,e1]=e_("PaymentElementContext"),[e2,e3]=e_("StripeUtilsContext")},2123:(e,t,r)=>{"use strict";
7Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return c},RedirectType:function(){return i.RedirectType},forbidden:function(){return o.forbidden},notFound:function(){return s.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect},unauthorized:function(){return a.unauthorized},unstable_isUnrecognizedActionError:function(){return d},unstable_rethrow:function(){return l.unstable_rethrow}});let n=r(3574),i=r(5605),s=r(6598),o=r(6031),a=r(7028),l=r(2368);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class c extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}function d(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2249:e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function o(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function a(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function l(e){if(!e)return;let[[t,r],...n]=a(e),{domain:i,expires:s,httponly:o,maxage:l,path:d,samesite:h,secure:p,partitioned:f,priority:g}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var v,_,m={name:t,value:decodeURIComponent(r),domain:i,...s&&{expires:new Date(s)},...o&&{httpOnly:!0},..."string"==typeof l&&{maxAge:Number(l)},path:d,...h&&{sameSite:u.includes(v=(v=h).toLowerCase())?v:void 0},...p&&{secure:!0},...g&&{priority:c.includes(_=(_=g).toLowerCase())?_:void 0},...f&&{partitioned:!0}};let e={};for(let t in m)m[t]&&(e[t]=m[t]);return e}}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(s,{RequestCookies:()=>d,ResponseCookies:()=>h,parseCookie:()=>a,parseSetCookie:()=>l,stringifyCookie:()=>o}),e.exports=((e,s,o,a)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let l of n(s))i.call(e,l)||l===o||t(e,l,{get:()=>s[l],enumerable:!(a=r(s,l))||a.enumerable});return e})(t({},"__esModule",{value:!0}),s);var u=["strict","lax","none"],c=["low","medium","high"],d=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of a(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>o(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>o(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:function(e){if(!e)return[];var t,r,n,i,s,o=[],a=0;function l(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;l();)if(","===(r=e.charAt(a))){for(n=a,a+=1,l(),i=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=i,o.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!s||a>=e.length)&&o.push(e.substring(t,e.length))}return o}(i)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}
7({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=o(r);t.append("set-cookie",e)}}(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(o).join("; ")}}},2317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"afterTaskAsyncStorage",{enumerable:!0,get:function(){return n.afterTaskAsyncStorageInstance}});let n=r(7916)},2368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return n}});let n=r(3490).unstable_rethrow;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2384:(e,t,r)=>{"use strict";function n(e){return function(t){let r=t??this;if(!r)throw TypeError(`${e.kind||e.name} type guard requires an error object`);return!!e.kind&&"object"==typeof r&&null!==r&&"constructor"in r&&r.constructor?.kind===e.kind||r instanceof e}}r.d(t,{$R:()=>l,LR:()=>a,_r:()=>c,cR:()=>d,cp:()=>o,u$:()=>s});var i=class{static kind="ClerkApiError";code;message;longMessage;meta;constructor(e){let t={code:e.code,message:e.message,longMessage:e.long_message,meta:{paramName:e.meta?.param_name,sessionId:e.meta?.session_id,emailAddresses:e.meta?.email_addresses,identifiers:e.meta?.identifiers,zxcvbn:e.meta?.zxcvbn,plan:e.meta?.plan,isPlanUpgradePossible:e.meta?.is_plan_upgrade_possible}};this.code=t.code,this.message=t.message,this.longMessage=t.longMessage,this.meta=t.meta}};function s(e){return new i(e)}n(i);var o=class e extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]
8Message:${this.message}`}static formatMessage(e,t,r,n){let i="Clerk:",s=RegExp(i.replace(" ","\\s*"),"i");return t=t.replace(s,""),t=`${i} ${t.trim()}
9
10(code="${r}")
11
12`,n&&(t+=`
13
14Docs: ${n}`),t}},a=class e extends o{static kind="ClerkAPIResponseError";status;clerkTraceId;retryAfter;errors;constructor(t,r){let{data:n,status:s,clerkTraceId:o,retryAfter:a}=r;super({...r,message:t,code:"api_response_error"}),Object.setPrototypeOf(this,e.prototype),this.status=s,this.clerkTraceId=o,this.retryAfter=a,this.errors=(n||[]).map(e=>new i(e))}toString(){let e=`[${this.name}]
15Message:${this.message}
16Status:${this.status}
17Serialized errors: ${this.errors.map(e=>JSON.stringify(e))}`;return this.clerkTraceId&&(e+=`
18Clerk Trace ID: ${this.clerkTraceId}`),e}static formatMessage(e,t,r,n){return t}};let l=n(a),u=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invali
18d. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function c({packageName:e,customMessages:t}){let r=e;function n(e,t){if(!t)return`${r}: ${e}`;let n=e;for(let r of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[r[1]]||"").toString();n=n.replace(`{{${r[1]}}}`,e)}return`${r}: ${n}`}let i={...u,...t};return{setPackageName({packageName:e}){return"string"==typeof e&&(r=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(n(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(n(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(n(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(n(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(n(i.MissingClerkProvider,e))},throw(e){throw Error(n(e))}}}var d=class e extends o{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(t,r){super({...r,message:t}),Object.setPrototypeOf(this,e.prototype)}};n(d)},2657:(e,t,r)=>{e.exports=r(6764)},2714:(e,t,r)=>{"use strict";r.d(t,{FJ:()=>n.FJ,RR:()=>n.RR,YF:()=>n.YF}),r(4466);var n=r(7407)},2717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isRequestAPICallableInsideAfter:function(){return l},throwForSearchParamsAccessInUseCache:function(){return a},throwWithStaticGenerationBailoutError:function(){return s},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return o}});let n=r(512),i=r(2317);function s(e,t){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${e} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E576",enumerable:!1,configurable:!0})}function o(e,t){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function a(e,t){let r=Object.defineProperty(Error(`Route ${e.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E779",enumerable:!1,configurable:!0});throw Error.captureStackTrace(r,t),e.invalidDynamicUsageError??=r,r}function l(){let e=i.afterTaskAsyncStorage.getStore();return(null==e?void 0:e.rootTaskSpawnPhase)==="action"}},2721:e=>{"use strict";
18e.exports=JSON.parse('{"name":"next","version":"15.5.15","description":"The React Framework","main":"./dist/server/next.js","license":"MIT","repository":"vercel/next.js","bugs":"https://github.com/vercel/next.js/issues","homepage":"https://nextjs.org","types":"index.d.ts","files":["dist","app.js","app.d.ts","babel.js","babel.d.ts","client.js","client.d.ts","compat","cache.js","cache.d.ts","config.js","config.d.ts","constants.js","constants.d.ts","document.js","document.d.ts","dynamic.js","dynamic.d.ts","error.js","error.d.ts","future","legacy","script.js","script.d.ts","server.js","server.d.ts","head.js","head.d.ts","image.js","image.d.ts","link.js","link.d.ts","form.js","form.d.ts","router.js","router.d.ts","jest.js","jest.d.ts","amp.js","amp.d.ts","og.js","og.d.ts","root-params.js","root-params.d.ts","types.d.ts","types.js","index.d.ts","types/global.d.ts","types/compiled.d.ts","image-types/global.d.ts","navigation-types/navigation.d.ts","navigation-types/compat/navigation.d.ts","font","navigation.js","navigation.d.ts","headers.js","headers.d.ts","navigation-types","web-vitals.js","web-vitals.d.ts","experimental/testing/server.js","experimental/testing/server.d.ts","experimental/testmode/playwright.js","experimental/testmode/playwright.d.ts","experimental/testmode/playwright/msw.js","experimental/testmode/playwright/msw.d.ts","experimental/testmode/proxy.js","experimental/testmode/proxy.d.ts"],"bin":{"next":"./dist/bin/next"},"scripts":{"dev":"cross-env NEXT_SERVER_NO_MANGLE=1 taskr","release":"taskr release","build":"pnpm release","prepublishOnly":"cd ../../ && turbo run build","types":"tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist","typescript":"tsec --noEmit","ncc-compiled":"taskr ncc","storybook":"BROWSER=none storybook dev -p 6006","build-storybook":"storybook build","test-storybook":"test-storybook"},"taskr":{"requires":["./taskfile-webpack.js","./taskfile-ncc.js","./taskfile-swc.js","./taskfile-watch.js"]},"dependencies":{"@next/env":"15.5.15","@swc/helpers":"0.5.15","caniuse-lite":"^1.0.30001579","postcss":"8.4.31","styled-jsx":"5.1.6"},"peerDependencies":{"@opentelemetry/api":"^1.1.0","@playwright/test":"^1.51.1","babel-plugin-react-compiler":"*","react":"^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0","react-dom":"^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0","sass":"^1.3.0"},"peerDependenciesMeta":{"babel-plugin-react-compiler":{"optional":true},"sass":{"optional":true},"@opentelemetry/api":{"optional":true},"@playwright/test":{"optional":true}},"optionalDependencies":{"sharp":"^0.34.3","@next/swc-darwin-arm64":"15.5.15","@next/swc-darwin-x64":"15.5.15","@next/swc-linux-arm64-gnu":"15.5.15","@next/swc-linux-arm64-musl":"15.5.15","@next/swc-linux-x64-gnu":"15.5.15","@next/swc-linux-x64-musl":"15.5.15","@next/swc-win32-arm64-msvc":"15.5.15","@next/swc-win32-x64-msvc":"15.5.15"},"devDependencies":{"@ampproject/toolbox-optimizer":"2.8.3","@babel/code-frame":"7.26.2","@babel/core":"7.26.10","@babel/eslint-parser":"7.24.6","@babel/generator":"7.27.0","@babel/plugin-syntax-bigint":"7.8.3","@babel/plugin-syntax-dynamic-import":"7.8.3","@babel/plugin-syntax-import-attributes":"7.26.0","@babel/plugin-syntax-jsx":"7.25.9","@babel/plugin-syntax-typescript":"7.25.4","@babel/plugin-transform-class-properties":"7.25.9","@babel/plugin-transform-export-namespace-from":"7.25.9","@babel/plugin-transform-modules-commonjs":"7.26.3","@babel/plugin-transform-numeric-separator":"7.25.9","@babel/plugin-transform-object-rest-spread":"7.25.9","@babel/plugin-transform-runtime":"7.26.10","@babel/preset-env":"7.26.9","@babel/preset-react":"7.26.3","@babel/preset-typescript":"7.27.0","@babel/runtime":"7.27.0","@babel/traverse":"7.27.0","@babel/types":"7.27.0","@base-ui-components/react":"1.0.0-beta.2","@capsizecss/metrics":"3.4.0","@edge-runtime/cookies":"6.0.0","@edge-runtime/ponyfill":"4.0.0","@edge-runtime/primitives":"6.0.0","@hapi/accept":"5.0.2","@jest/transform":"29.5.0","@jest/types":"29.5.0","@mswjs/interceptors":"0.23.0","@napi-rs/triples":"1.2.0","@next/font":"15.5.15","@next/polyfill-module":"15.5.15","@next/polyfill-nomodule":"15.5.15","@next/react-refresh-utils":"15.5.
1815","@next/swc":"15.5.15","@opentelemetry/api":"1.6.0","@playwright/test":"1.51.1","@rspack/core":"1.4.5","@storybook/addon-a11y":"8.6.0","@storybook/addon-essentials":"8.6.0","@storybook/addon-interactions":"8.6.0","@storybook/addon-webpack5-compiler-swc":"3.0.0","@storybook/blocks":"8.6.0","@storybook/react":"8.6.0","@storybook/react-webpack5":"8.6.0","@storybook/test":"8.6.0","@storybook/test-runner":"0.21.0","@swc/core":"1.11.24","@swc/types":"0.1.7","@taskr/clear":"1.1.0","@taskr/esnext":"1.1.0","@types/amphtml-validator":"1.0.0","@types/babel__code-frame":"7.0.6","@types/babel__core":"7.20.5","@types/babel__generator":"7.27.0","@types/babel__template":"7.4.4","@types/babel__traverse":"7.20.7","@types/bytes":"3.1.1","@types/ci-info":"2.0.0","@types/compression":"0.0.36","@types/content-disposition":"0.5.4","@types/content-type":"1.1.3","@types/cookie":"0.3.3","@types/cross-spawn":"6.0.0","@types/debug":"4.1.5","@types/express-serve-static-core":"4.17.33","@types/fresh":"0.5.0","@types/glob":"7.1.1","@types/jsonwebtoken":"9.0.0","@types/lodash":"4.14.198","@types/lodash.curry":"4.1.6","@types/path-to-regexp":"1.7.0","@types/picomatch":"2.3.3","@types/platform":"1.3.4","@types/react":"19.0.8","@types/react-dom":"19.0.3","@types/react-is":"18.2.4","@types/semver":"7.3.1","@types/send":"0.14.4","@types/shell-quote":"1.7.1","@types/tar":"6.1.5","@types/text-table":"0.2.1","@types/ua-parser-js":"0.7.36","@types/webpack-sources1":"npm:@types/[email protected]","@types/ws":"8.2.0","@vercel/ncc":"0.34.0","@vercel/nft":"0.27.1","@vercel/turbopack-ecmascript-runtime":"*","acorn":"8.14.0","amphtml-validator":"1.0.38","anser":"1.4.9","arg":"4.1.0","assert":"2.0.0","async-retry":"1.2.3","async-sema":"3.0.0","axe-playwright":"2.0.3","babel-loader":"10.0.0","babel-plugin-react-compiler":"19.1.0-rc.2","babel-plugin-transform-define":"2.0.0","babel-plugin-transform-react-remove-prop-types":"0.4.24","browserify-zlib":"0.2.0","browserslist":"4.24.4","buffer":"5.6.0","busboy":"1.6.0","bytes":"3.1.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","cli-select":"1.1.2","client-only":"0.0.1","commander":"12.1.0","comment-json":"3.0.3","compression":"1.7.4","conf":"5.0.0","constants-browserify":"1.0.0","content-disposition":"0.5.3","content-type":"1.0.4","cookie":"0.4.1","cross-env":"6.0.3","cross-spawn":"7.0.3","crypto-browserify":"3.12.0","css-loader":"7.1.2","css.escape":"1.5.1","cssnano-preset-default":"7.0.6","data-uri-to-buffer":"3.0.1","debug":"4.1.1","devalue":"2.0.1","domain-browser":"4.19.0","edge-runtime":"4.0.1","events":"3.3.0","find-up":"4.1.0","fresh":"0.5.2","glob":"7.1.7","gzip-size":"5.1.1","http-proxy":"1.18.1","http-proxy-agent":"5.0.0","https-browserify":"1.0.0","https-proxy-agent":"5.0.1","icss-utils":"5.1.0","ignore-loader":"0.1.2","image-size":"1.2.1","is-docker":"2.0.0","is-wsl":"2.2.0","jest-worker":"27.5.1","json5":"2.2.3","jsonwebtoken":"9.0.0","loader-runner":"4.3.0","loader-utils2":"npm:[email protected]","loader-utils3":"npm:[email protected]","lodash.curry":"4.1.1","mini-css-extract-plugin":"2.4.4","msw":"2.3.0","nanoid":"3.1.32","native-url":"0.3.4","neo-async":"2.6.1","node-html-parser":"5.3.3","ora":"4.0.4","os-browserify":"0.3.0","p-limit":"3.1.0","p-queue":"6.6.2","path-browserify":"1.0.1","path-to-regexp":"6.3.0","picomatch":"4.0.1","postcss-flexbugs-fixes":"5.0.2","postcss-modules-extract-imports":"3.0.0","postcss-modules-local-by-default":"4.2.0","postcss-modules-scope":"3.0.0","postcss-modules-values":"4.0.0","postcss-preset-env":"7.4.3","postcss-safe-parser":"6.0.0","postcss-scss":"4.0.3","postcss-value-parser":"4.2.0","process":"0.11.10","punycode":"2.1.1","querystring-es3":"0.2.1","raw-body":"2.4.1","react-refresh":"0.12.0","recast":"0.23.11","regenerator-runtime":"0.13.4","safe-stable-stringify":"2.5.0","sass-loader":"15.0.0","schema-utils2":"npm:[email protected]","schema-utils3":"npm:[email protected]","semver":"7.3.2","send":"0.18.0","server-only":"0.0.1","setimmediate":"1.0.5","shell-quote":"1.7.3","source-map":"0.6.1","source-map-loader":"5.0.0","source-map08":"npm:[email protected]","stacktrace-parser":"0.1.10","storybook":"8.6.0","stream-browserify":"3.0.0","stream-http":"3.1.1","strict-event-emitter":"0.5.0","string-hash":"1.1.3","string_decoder":"1.3.0","strip-ansi":"6.0.0","style-loader":"4.0.0","superstruct":"1.0.3","tar":"6.1.15","taskr":"1.1.0","terser":"5.27.0","terser-webpack-plugin":"5.3.9","text-table":"0.2.0","timers-browserify":"2.0.12","tty-browserify":"0.0.1","typescript":"5.8.2","ua-parser-js":"1.0.35","unistore":"3.4.1","util":"0.12.4","vm-browserify":"1.1.2","watchpack":"2.4.0","web-vitals":"4.2.1","webpack":"5.98.0","webpack-sources1":"npm:[email protected]","webpack-sources3":"npm:[email protected]","ws":"8.2.3","zod":"3.25.76","zod-validation-error":"3.4.0"},"keywords":["react","framework","nextjs","web","server","node","front-end","backend","cli","vercel"],"engines":{"node":"^18.18.0 || ^19.8.0 || >= 20.0.0"}}')},2843:(e,t,r)=>{"use strict";
18Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let n=r(1532)._(r(1462)),i=r(4217),s=[],o=[],a=!1;function l(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),s=null;function l(){if(!s){let t=new u(e,r);s={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return s.promise()}if(!a){let e=r.webpack&&1?r.webpack():r.modules;e&&o.push(t=>{for(let r of e)if(t.includes(r))return l()})}function c(e,t){l();let o=n.default.useContext(i.LoadableContext);o&&Array.isArray(r.modules)&&r.modules.forEach(e=>{o(e)});let a=n.default.useSyncExternalStore(s.subscribe,s.getCurrentValue,s.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:s.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(r.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:s.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return c.preload=()=>l(),c.displayName="LoadableComponent",n.default.forwardRef(c)}(l,e)}function d(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{d(s).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(a=!0,t());d(o,e).then(r,r)})),window.__NEXT_PRELOADREADY=c.preloadReady;let h=c},3185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getCacheSignal:function(){return f},getDraftModeProviderForCacheScope:function(){return p},getHmrRefreshHash:function(){return c},getPrerenderResumeDataCache:function(){return l},getRenderResumeDataCache:function(){return u},getRuntimeStagePromise:function(){return g},getServerComponentsHmrCache:function(){return h},isHmrRefresh:function(){return d},throwForMissingRequestStore:function(){return o},throwInvariantForMissingStore:function(){return a},workUnitAsyncStorage:function(){return n.workUnitAsyncStorageInstance}});let n=r(5416),i=r(1902),s=r(4662);function o(e){throw Object.defineProperty(Error(`\`${e}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E251",enumerable:!1,configurable:!0})}function a(){throw Object.defineProperty(new s.InvariantError("Expected workUnitAsyncStorage to have a store."),"__NEXT_ERROR_CODE",{value:"E696",enumerable:!1,configurable:!0})}function l(e){switch(e.type){case"prerender":case"prerender-runtime":case"prerender-ppr":case"prerender-client":return e.prerenderResumeDataCache;case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return null;default:return e}}function u(e){switch(e.type){case"request":return e.renderResumeDataCache;case"prerender":case"prerender-runtime":case"prerender-client":if(e.renderResumeDataCache)return e.renderResumeDataCache;case"prerender-ppr":return e.prerenderResumeDataCache;case"cache":case"private-cache":case"unstable-cache":case"prerender-legacy":return null;default:return e}}function c(e,t){if(e.dev)switch(t.type){case"cache":case"private-cache":case"prerender":case"prerender-runtime":return t.hmrRefreshHash;case"request":var r;return null==(r=t.cookies.get(i.NEXT_HMR_REFRESH_HASH_COOKIE))?void 0:r.value}}function d(e,t){if(e.dev)switch(t.type){case"cache":case"private-cache":case"request":return t.isHmrRefresh??!1}return!1}function h(e,t){if(e.dev)switch(t.type){case"cache":case"private-cache":case"request":return t.serverComponentsHmrCache}}function p(e,t){if(e.isDraftMode)switch(t.type){case"cache":case"private-cache":case"unstable-cache":case"prerender-runtime":case"request":return t.draftMode}}function f(e){switch(e.type){case"prerender":case"prerender-client":case"prerender-runtime":return e.cacheSignal;case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return null;default:return e}}function g(e){switch(e.type){case"prerender-runtime":case"private-cache":return e.runtimeStagePromise;case"prerender":case"prerender-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"unstable-cache":return null;default:return e}}},3214:(e,t,r)=>{"use strict";
18Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies},stringifyCookie:function(){return n.stringifyCookie}});let n=r(2249)},3233:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{METADATA_BOUNDARY_NAME:function(){return r},OUTLET_BOUNDARY_NAME:function(){return i},ROOT_LAYOUT_BOUNDARY_NAME:function(){return s},VIEWPORT_BOUNDARY_NAME:function(){return n}});let r="__next_metadata_boundary__",n="__next_viewport_boundary__",i="__next_outlet_boundary__",s="__next_root_layout_boundary__"},3364:(e,t,r)=>{"use strict";r.d(t,{Fj:()=>s,MC:()=>i,b_:()=>n});let n=()=>!1,i=()=>!1,s=()=>{try{return!0}catch{}return!1}},3458:(e,t,r)=>{"use strict";r.d(t,{uF:()=>$,jC:()=>u,rI:()=>h,ql:()=>c,V5:()=>d,wm:()=>f});var n=r(3750),i=r(3636),s=r(1462),o=r(7993);let a=(e,...t)=>{let r={...e};for(let e of t)delete r[e];return r};var l=r(2062),u=e=>t=>{try{return s.Children.only(e)}catch{return n.sb.throw((0,n.Wq)(t))}},c=(e,t)=>(e||(e=t),"string"==typeof e&&(e=s.createElement("button",null,e)),e),d=e=>(...t)=>{if(e&&"function"==typeof e)return e(...t)};function h(e){return"function"==typeof e}var p=new Map;function f(e,t,r){let i=e.displayName||e.name||t||"Component",o=i=>(!function(e,t,r=1){s.useEffect(()=>{let i=p.get(e)||0;return i==r?n.sb.throw(t):(p.set(e,i+1),()=>{p.set(e,(p.get(e)||1)-1)})},[])}(t,r),s.createElement(e,{...i}));return o.displayName=`withMaxAllowedInstancesGuard(${i})`,o}var g=e=>{let[t,r]=(0,s.useState)(new Map);return e.map(e=>({id:e.id,mount:t=>r(r=>new Map(r).set(String(e.id),t)),unmount:()=>r(t=>{let r=new Map(t);return r.set(String(e.id),null),r}),portal:()=>{let r=t.get(String(e.id));return r?(0,o.createPortal)(e.component,r):null}}))},v=(e,t)=>!!e&&s.isValidElement(e)&&(null==e?void 0:e.type)===t,_=(e,t)=>b({children:e,reorderItemsLabels:["account","security","billing","apiKeys"],LinkComponent:A,PageComponent:I,MenuItemsComponent:L,componentName:"UserProfile"},t),m=(e,t)=>b({children:e,reorderItemsLabels:["general","members","billing","apiKeys"],LinkComponent:N,PageComponent:D,componentName:"OrganizationProfile"},t),y=e=>{let t=[],r=[N,D,L,I,A];return s.Children.forEach(e,e=>{r.some(t=>v(e,t))||t.push(e)}),t},b=(e,t)=>{let{children:r,LinkComponent:o,PageComponent:a,MenuItemsComponent:l,reorderItemsLabels:u,componentName:c}=e,{allowForAnyChildren:d=!1}=t||{},h=[];s.Children.forEach(r,e=>{if(!v(e,a)&&!v(e,o)&&!v(e,l)){e&&!d&&(0,i.s2)((0,n.n)(c));return}let{props:t}=e,{children:r,label:s,url:p,labelIcon:f}=t;if(v(e,a))if(w(t,u))h.push({label:s});else{if(!E(t))return void(0,i.s2)((0,n.sR)(c));h.push({label:s,labelIcon:f,children:r,url:p})}if(v(e,o))if(!k(t))return void(0,i.s2)((0,n.D)(c));else h.push({label:s,labelIcon:f,url:p})});let p=[],f=[],_=[];h.forEach((e,t)=>{if(E(e)){p.push({component:e.children,id:t}),f.push({component:e.labelIcon,id:t});return}k(e)&&_.push({component:e.labelIcon,id:t})});let m=g(p),y=g(f),b=g(_),S=[],P=[];return h.forEach((e,t)=>{if(w(e,u))return void S.push({label:e.label});if(E(e)){let{portal:r,mount:n,unmount:i}=m.find(e=>e.id===t),{portal:s,mount:o,unmount:a}=y.find(e=>e.id===t);S.push({label:e.label,url:e.url,mount:n,unmount:i,mountIcon:o,unmountIcon:a}),P.push(r),P.push(s);return}if(k(e)){let{portal:r,mount:n,unmount:i}=b.find(e=>e.id===t);S.push({label:e.label,url:e.url,mountIcon:n,unmountIcon:i}),P.push(r);return}}),{customPages:S,customPagesPortals:P}},w=(e,t)=>{let{children:r,label:n,url:i,labelIcon:s}=e;return!r&&!i&&!s&&t.some(e=>e===n)},E=e=>{let{children:t,label:r,url:n,labelIcon:i}=e;return!!t&&!!n&&!!i&&!!r},k=e=>{let{children:t,label:r,url:n,labelIcon:i}=e;return!t&&!!n&&!!i&&!!r},S=(e,t)=>{let{children:r,label:n,onClick:i,labelIcon:s}=e;return!r&&!i&&!s&&t.some(e=>e===n)},P=e=>{let{label:t,labelIcon:r,onClick:n,open:i}=e;return!!r&&!!t&&("function"==typeof n||"string"==typeof i)},x=e=>{let{label:t,href:r,labelIcon:n}=e;return!!r&&!!n&&!!t},R=(e=>{let t=null==e?void 0:e.isReady;return r=>new Promise((n,i)=>{let{root:s=null==document?void 0:document.body,selector:o,timeout:a=0}=r;if(!s)return void i(Error("No root element provided"));let l=s;if(o&&(l=null==s?void 0:s.querySelector(o)),t(l,o))return void n();let u=new MutationObserver(r=>{for(let i of r)if(!l&&o&&(l=null==s?void 0:s.querySelector(o)),(e.childList&&"childList"===i.type||e.attributes&&"attributes"===i.type)&&t(l,o)){u.disconnect(),n();return}});u.observe(s,e),a>0&&setTimeout(()=>{u.disconnect(),i(Error(`Timeout waiting for ${o}`))},a)})})({childList:!0,subtree:!0,isReady:(e,t)=>{var r;return!!(null==e?void 0:e.childElementCount)&&(null==(r=null==e?void 0:e.matches)?void 0:r.call(e,t))&&e.childElementCount>0}});
18function O(e,t){let r=(0,s.useRef)(),[n,i]=(0,s.useState)("rendering");return(0,s.useEffect)(()=>{if(!e)throw Error("Clerk: no component name provided, unable to detect mount.");if("undefined"!=typeof window&&!r.current){let n=`[data-clerk-component="${e}"]`,s=null==t?void 0:t.selector;r.current=R({selector:s?n+s:n}).then(()=>{i("rendered")}).catch(()=>{i("error")})}},[e,null==t?void 0:t.selector]),n}var C=e=>null==e?void 0:e.map(({mountIcon:e,unmountIcon:t,...r})=>r),T=class extends s.PureComponent{constructor(){super(...arguments),this.rootRef=s.createRef()}componentDidUpdate(e){var t,r,n,i;if(!("mount"in e)||!("mount"in this.props))return;let s=a(e.props,"customPages","customMenuItems","children"),o=a(this.props.props,"customPages","customMenuItems","children"),u=(null==(t=s.customPages)?void 0:t.length)!==(null==(r=o.customPages)?void 0:r.length),c=(null==(n=s.customMenuItems)?void 0:n.length)!==(null==(i=o.customMenuItems)?void 0:i.length),d=C(e.props.customMenuItems),h=C(this.props.props.customMenuItems);(!(0,l.MZ)(s,o)||!(0,l.MZ)(d,h)||u||c)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&("mount"in this.props&&this.props.mount(this.rootRef.current,this.props.props),"open"in this.props&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&("mount"in this.props&&this.props.unmount(this.rootRef.current),"open"in this.props&&this.props.close())}render(){let{hideRootHtmlElement:e=!1}=this.props,t={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return s.createElement(s.Fragment,null,!e&&s.createElement("div",{...t}),this.props.children)}},j=e=>{var t,r;return s.createElement(s.Fragment,null,null==(t=null==e?void 0:e.customPagesPortals)?void 0:t.map((e,t)=>(0,s.createElement)(e,{key:t})),null==(r=null==e?void 0:e.customMenuItemsPortals)?void 0:r.map((e,t)=>(0,s.createElement)(e,{key:t}
18)))};function I({children:e}){return(0,i.s2)(n.$n),s.createElement(s.Fragment,null,e)}function A({children:e}){return(0,i.s2)(n._I),s.createElement(s.Fragment,null,e)}(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"SignIn",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"SignUp",renderWhileLoading:!0}),Object.assign((0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=_(n.children);return s.createElement(s.Fragment,null,i&&r,s.createElement(T,{component:t,mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__unstable__updateProps,props:{...n,customPages:a},rootProps:o},s.createElement(j,{customPagesPortals:l})))},{component:"UserProfile",renderWhileLoading:!0}),{Page:I,Link:A});var M=(0,s.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}});function L({children:e}){return(0,i.s2)(n.UX),s.createElement(s.Fragment,null,e)}function F({children:e}){return(0,i.s2)(n.aU),s.createElement(s.Fragment,null,e)}function U({children:e}){return(0,i.s2)(n.Uw),s.createElement(s.Fragment,null,e)}var $=Object.assign((0,n.Q)(({clerk:e,component:t,fallback:r,...o})=>{let a="rendering"===O(t)||!e.loaded,l={...a&&r&&{style:{display:"none"}}},{customPages:u,customPagesPortals:c}=_(o.children,{allowForAnyChildren:!!o.__experimental_asProvider}),d={...o.userProfileProps,customPages:u},{customMenuItems:h,customMenuItemsPortals:p}=((e,t)=>{var r;return(({children:e,MenuItemsComponent:t,MenuActionComponent:r,MenuLinkComponent:o,UserProfileLinkComponent:a,UserProfilePageComponent:l,reorderItemsLabels:u,allowForAnyChildren:c=!1})=>{let d=[],h=[],p=[];s.Children.forEach(e,e=>{if(!v(e,t)&&!v(e,a)&&!v(e,l)){e&&!c&&(0,i.s2)(n.P6);return}if(v(e,a)||v(e,l))return;let{props:h}=e;s.Children.forEach(h.children,e=>{if(!v(e,r)&&!v(e,o)){e&&(0,i.s2)(n.wm);return}let{props:t}=e,{label:s,labelIcon:a,href:l,onClick:c,open:h}=t;if(v(e,r))if(S(t,u))d.push({label:s});else{if(!P(t))return void(0,i.s2)(n.Wv);let e={label:s,labelIcon:a};if(void 0!==c)d.push({...e,onClick:c});else{if(void 0===h)return void(0,i.s2)("Custom menu item must have either onClick or open property");d.push({...e,open:h.startsWith("/")?h:`/${h}`})}}if(v(e,o))if(!x(t))return void(0,i.s2)(n.ld);else d.push({label:s,labelIcon:a,href:l})})});let f=[],_=[];d.forEach((e,t)=>{P(e)&&f.push({component:e.labelIcon,id:t}),x(e)&&_.push({component:e.labelIcon,id:t})});let m=g(f),y=g(_);return d.forEach((e,t)=>{if(S(e,u)&&h.push({label:e.label}),P(e)){let{portal:r,mount:n,unmount:i}=m.find(e=>e.id===t),s={label:e.label,mountIcon:n,unmountIcon:i};"onClick"in e?s.onClick=e.onClick:"open"in e&&(s.open=e.open),h.push(s),p.push(r)}if(x(e)){let{portal:r,mount:n,unmount:i}=y.find(e=>e.id===t);h.push({label:e.label,href:e.href,mountIcon:n,unmountIcon:i}),p.push(r)}}),{customMenuItems:h,customMenuItemsPortals:p}})({children:e,reorderItemsLabels:["manageAccount","signOut"],MenuItemsComponent:L,MenuActionComponent:F,MenuLinkComponent:U,UserProfileLinkComponent:A,UserProfilePageComponent:I,allowForAnyChildren:null!=(r=null==t?void 0:t.allowForAnyChildren)&&r})})(o.children,{allowForAnyChildren:!!o.__experimental_asProvider}),f=y(o.children),m={mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__unstable__updateProps,props:{...o,userProfileProps:d,customMenuItems:h}};return s.createElement(M.Provider,{value:m},a&&r,e.loaded&&s.createElement(T,{component:t,...m,hideRootHtmlElement:!!o.__experimental_asProvider,rootProps:l},o.__experimental_asProvider?f:null,s.createElement(j,{customPagesPortals:c,customMenuItemsPortals:p})))},{component:"UserButton",renderWhileLoading:!0}),{UserProfilePage:I,UserProfileLink:A,MenuItems:L,Action:F,Link:U,__experimental_Outlet:function(e){let t=(0,s.useContext)(M),r={...t,props:{...t.props,...e}};return s.createElement(T,{...r})}});function D({children:e}){return(0,i.s2)(n.vb),s.createElement(s.Fragment,null,e)}function N({children:e}){return(0,i.s2)(n.kf),s.createElement(s.Fragment,null,e)}Object.assign((0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=m(n.children);return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__unstable__updateProps,props:{...n,customPages:a},rootProps:o},s.createElement(j,{customPagesPortals:l})))},{component:"OrganizationProfile",renderWhileLoading:!0}),{Page:D,Link:N}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"CreateOrganization",renderWhileLoading:!0});var z=(0,s.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}});Object.assign((0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=m(n.children,{allowForAnyChildren:!!n.__experimental_asProvider}),u={...n.organizationProfileProps,customPages:a},c=y(n.children),d={mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__unstable__updateProps,props:{...n,organizationProfileProps:u},rootProps:o,component:t};return e.__experimental_prefetchOrganizationSwitcher(),s.createElement(z.Provider,{value:d},s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{...d,hideRootHtmlElement:!!n.__experimental_asProvider}
18,n.__experimental_asProvider?c:null,s.createElement(j,{customPagesPortals:l}))))},{component:"OrganizationSwitcher",renderWhileLoading:!0}),{OrganizationProfilePage:D,OrganizationProfileLink:N,__experimental_Outlet:function(e){let t=(0,s.useContext)(z),r={...t,props:{...t.props,...e}};return s.createElement(T,{...r})}}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"OrganizationList",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,open:e.openGoogleOneTap,close:e.closeGoogleOneTap,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"GoogleOneTap",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountWaitlist,unmount:e.unmountWaitlist,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"Waitlist",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t,{selector:'[data-component-status="ready"]'})||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountPricingTable,unmount:e.unmountPricingTable,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"PricingTable",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountAPIKeys,unmount:e.unmountAPIKeys,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"ApiKeys",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountUserAvatar,unmount:e.unmountUserAvatar,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"UserAvatar",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountTaskChooseOrganization,unmount:e.unmountTaskChooseOrganization,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"TaskChooseOrganization",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountTaskResetPassword,unmount:e.unmountTaskResetPassword,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"TaskResetPassword",renderWhileLoading:!0}),(0,n.Q)(({clerk:e,component:t,fallback:r,...n})=>{let i="rendering"===O(t)||!e.loaded,o={...i&&r&&{style:{display:"none"}}};return s.createElement(s.Fragment,null,i&&r,e.loaded&&s.createElement(T,{component:t,mount:e.mountTaskSetupMFA,unmount:e.unmountTaskSetupMFA,updateProps:e.__unstable__updateProps,props:n,rootProps:o}))},{component:"TaskSetupMFA",renderWhileLoading:!0})},3485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{UnrecognizedActionError:function(){return r},unstable_isUnrecognizedActionError:function(){return n}});class r extends Error{constructor(...e){super(...e),this.name="UnrecognizedActionError"}}function n(e){return!!(e&&"object"==typeof e&&e instanceof r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
18dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return function e(t){if((0,i.isNextRouterError)(t)||(0,n.isBailoutToCSRError)(t))throw t;t instanceof Error&&"cause"in t&&e(t.cause)}}});let n=r(3729),i=r(7349);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3516:(e,t,r)=>{"use strict";r.d(t,{T5:()=>i.T5,hP:()=>n.hP,kX:()=>i.kX,nO:()=>i.nO,wV:()=>n.wV}),r(6791);var n=r(3750),i=r(120)},3551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(8861).createAsyncLocalStorage)()},3574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRedirectError:function(){return o},getRedirectStatusCodeFromError:function(){return d},getRedirectTypeFromError:function(){return c},getURLFromRedirectError:function(){return u},permanentRedirect:function(){return l},redirect:function(){return a}});let n=r(2479),i=r(5605),s=void 0;function o(e,t,r){void 0===r&&(r=n.RedirectStatusCode.TemporaryRedirect);let s=Object.defineProperty(Error(i.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return s.digest=i.REDIRECT_ERROR_CODE+";"+t+";"+e+";"+r+";",s}function a(e,t){var r;throw null!=t||(t=(null==s||null==(r=s.getStore())?void 0:r.isAction)?i.RedirectType.push:i.RedirectType.replace),o(e,t,n.RedirectStatusCode.TemporaryRedirect)}function l(e,t){throw void 0===t&&(t=i.RedirectType.replace),o(e,t,n.RedirectStatusCode.PermanentRedirect)}function u(e){return(0,i.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function c(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function d(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3636:(e,t,r)=>{"use strict";r.d(t,{VK:()=>i,b_:()=>n.b_,s2:()=>s});var n=r(3364);function i(e,t,r){return"function"==typeof e?e(t):void 0!==e?e:void 0!==r?r:void 0}let s=e=>{(0,n.b_)()&&console.error(`Clerk: ${e}`)}},3661:(e,t,r)=>{e.exports=r(7197)},3750:(e,t,r)=>{"use strict";r.d(t,{$n:()=>_,As:()=>A,D:()=>k,Jd:()=>a.Jd,Kz:()=>j,P6:()=>S,Q:()=>L,SW:()=>h,UX:()=>x,Uw:()=>O,Vo:()=>v,Wq:()=>g,Wv:()=>T,_I:()=>m,aU:()=>R,cy:()=>c,hP:()=>M,ho:()=>a.ho,kf:()=>b,ld:()=>C,n:()=>w,sR:()=>E,sb:()=>l,vb:()=>y,wV:()=>u,wm:()=>P,yN:()=>f});var n=r(293),i=r(8064),s=r(2714),o=r(1462),a=r(2062),l=(0,n._r)({packageName:"@clerk/clerk-react"});function u(e){l.setMessages(e).setPackageName(e)}var[c,d]=(0,a.e3)("AuthContext"),h=a.ED,p=a.hQ,f="You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",g=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,v="Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",_="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",m="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",y="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",b="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",w=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,E=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,k=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,S="<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.",P="<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.",x="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",R="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",O="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",C="Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.",T="Missing props. <UserButton.Action /> component requires the following props: label.",j=e=>{(0,a.Kz)(()=>{l.throwMissingClerkProviderError({source:e})})},I=e=>new Promise(t=>{let r=n=>{["ready","degraded"].includes(n)&&(t(),e.off("status",r))};e.on("status",r,{notify:!0})}),A=(e={})=>{var t;j("useAuth");let{treatPendingAsSignedOut:r,...n}=null!=e?e:{},i=d();void 0===i.sessionId&&void 0===i.userId&&(i=null!=n?n:{});let a=p(),l=(0,o.useCallback)((e=>async t=>
18(await I(e),e.session)?e.session.getToken(t):null)(a),[a]),u=(0,o.useCallback)((e=>async(...t)=>(await I(e),e.signOut(...t)))(a),[a]);return null==(t=a.telemetry)||t.record((0,s.FJ)("useAuth",{treatPendingAsSignedOut:r})),M({...i,getToken:l,signOut:u},{treatPendingAsSignedOut:r})};function M(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:r,orgId:n,orgRole:s,has:a,signOut:u,getToken:c,orgPermissions:d,factorVerificationAge:h,sessionClaims:p}=null!=e?e:{},f=(0,o.useCallback)(e=>a?a(e):(0,i.MR)({userId:r,orgId:n,orgRole:s,orgPermissions:d,factorVerificationAge:h,features:(null==p?void 0:p.fea)||"",plans:(null==p?void 0:p.pla)||""})(e),[a,r,n,s,d,h,p]),g=(0,i.M2)({authObject:{...e,getToken:c,signOut:u,has:f},options:{treatPendingAsSignedOut:t}});return g||l.throw("Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support")}var L=(e,t)=>{let r=("string"==typeof t?t:null==t?void 0:t.component)||e.displayName||e.name||"Component";e.displayName=r;let n="string"==typeof t?void 0:t,i=t=>{j(r||"withClerk");let i=p();return i.loaded||(null==n?void 0:n.renderWhileLoading)?o.createElement(e,{...t,component:r,clerk:i}):null};return i.displayName=`withClerk(${r})`,i}},3896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},forbidden:function(){return l.forbidden},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return c.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return l.unstable_rethrow},useParams:function(){return g},usePathname:function(){return p},useRouter:function(){return f},useSearchParams:function(){return h},useSelectedLayoutSegment:function(){return _},useSelectedLayoutSegments:function(){return v},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});let n=r(1462),i=r(6644),s=r(5649),o=r(5741),a=r(8612),l=r(2123),u=r(9139),c=r(3485),d=void 0;function h(){let e=(0,n.useContext)(s.SearchParamsContext);return(0,n.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function p(){return null==d||d("usePathname()"),(0,n.useContext)(s.PathnameContext)}function f(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return e}function g(){return null==d||d("useParams()"),(0,n.useContext)(s.PathParamsContext)}function v(e){void 0===e&&(e="children"),null==d||d("useSelectedLayoutSegments()");let t=(0,n.useContext)(i.LayoutRouterContext);return t?function e(t,r,n,i){let s;if(void 0===n&&(n=!0),void 0===i&&(i=[]),n)s=t[1][r];else{var l;let e=t[1];s=null!=(l=e.children)?l:Object.values(e)[0]}if(!s)return i;let u=s[0],c=(0,o.getSegmentValue)(u);return!c||c.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(c),e(s,r,!1,i))}(t.parentTree,e):null}function _(e){void 0===e&&(e="children"),null==d||d("useSelectedLayoutSegment()");let t=v(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===a.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3987:(e,t,r)=>{e.exports=r(3896)},4004:(e,t,r)=>{"use strict";r.d(t,{l$:()=>Q,Ay:()=>Z});var n,i=r(1462);let s={data:""},o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|  +/g,l=/\n+/g,u=(e,t)=>{let r="",n="",i="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?r=s+" "+o+";":n+="f"==s[1]?u(o,s):s+"{"+u(o,"k"==s[1]?"":t)+"}":"object"==typeof o?n+=u(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=u.p?u.p(s,o):s+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},c={},d=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+d(e[r]);return t}return e};function h(e){let t,r,n=this||{},i=e.call?e(n.p):e;return((e,t,r,n,i)=>{var s,h,p,f;let g=d(e),v=c[g]||(c[g]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(g));if(!c[v]){let t=g!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(a,""));)t[4]?n.shift():t[3]?(r=t[3].replace(l," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(l," ").trim();return n[0]})(e);c[v]=u(i?{["@keyframes "+v]:t}:t,r?"":"."+v)}let _=r&&c.g?c.g:null;return r&&(c.g=c[v]),s=c[v],h=t,p=n,(f=_)?h.data=h.data.replace(f,s):-1===h.data.indexOf(s)&&(h.data=p?s+h.data:h.data+s),v}
vendor: 4,755 bytes, lines 18-113
18)(i.unshift?i.raw?(t=[].slice.call(arguments,1),r=n.p,i.reduce((e,n,i)=>{let s=t[i];if(s&&s.call){let e=s(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":u(e,""):!1===e?"":e}return e+n+(null==s?"":s)},"")):i.reduce((e,t)=>Object.assign(e,t&&t.call?t(n.p):t),{}):i,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||s})(n.target),n.g,n.o,n.k)}h.bind({g:1});let p,f,g,v=h.bind({k:1});function _(e,t){let r=this||{};return function(){let n=arguments;function i(s,o){let a=Object.assign({},s),l=a.className||i.className;r.p=Object.assign({theme:f&&f()},a),r.o=/ *go\d+/.test(l),a.className=h.apply(r,n)+(l?" "+l:""),t&&(a.ref=o);let u=e;return e[0]&&(u=a.as||e,delete a.as),g&&u[0]&&g(a),p(u,a)}return t?t(i):i}}var m=(e,t)=>"function"==typeof e?e(t):e,y=(()=>{let e=0;return()=>(++e).toString()})(),b=(()=>{let e;return()=>{if(void 0===e&&"u">typeof window){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),w="default",E=(e,t)=>{let{toastLimit:r}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:n}=t;return E(e,{type:+!!e.toasts.find(e=>e.id===n.id),toast:n});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(e=>e.id===i||void 0===i?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+s}))}}},k=[],S={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},P={},x=(e,t=w)=>{P[t]=E(P[t]||S,e),k.forEach(([e,r])=>{e===t&&r(P[t])})},R=e=>Object.keys(P).forEach(t=>x(e,t)),O=(e=w)=>t=>{x(t,e)},C={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},T=e=>(t,r)=>{let n,i=((e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||y()}))(t,e,r);return O(i.toasterId||(n=i.id,Object.keys(P).find(e=>P[e].toasts.some(e=>e.id===n))))({type:2,toast:i}),i.id},j=(e,t)=>T("blank")(e,t);j.error=T("error"),j.success=T("success"),j.loading=T("loading"),j.custom=T("custom"),j.dismiss=(e,t)=>{let r={type:3,toastId:e};t?O(t)(r):R(r)},j.dismissAll=e=>j.dismiss(void 0,e),j.remove=(e,t)=>{let r={type:4,toastId:e};t?O(t)(r):R(r)},j.removeAll=e=>j.remove(void 0,e),j.promise=(e,t,r)=>{let n=j.loading(t.loading,{...r,...null==r?void 0:r.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let i=t.success?m(t.success,e):void 0;return i?j.success(i,{id:n,...r,...null==r?void 0:r.success}):j.dismiss(n),e}).catch(e=>{let i=t.error?m(t.error,e):void 0;i?j.error(i,{id:n,...r,...null==r?void 0:r.error}):j.dismiss(n)}),e};var I=1e3,A=v`
19from {
20  transform: scale(0) rotate(45deg);
21	opacity: 0;
22}
23to {
24 transform: scale(1) rotate(45deg);
25  opacity: 1;
26}`,M=v`
27from {
28  transform: scale(0);
29  opacity: 0;
30}
31to {
32  transform: scale(1);
33  opacity: 1;
34}`,L=v`
35from {
36  transform: scale(0) rotate(90deg);
37	opacity: 0;
38}
39to {
40  transform: scale(1) rotate(90deg);
41	opacity: 1;
42}`,F=_("div")`
43  width: 20px;
44  opacity: 0;
45  height: 20px;
46  border-radius: 10px;
47  background: ${e=>e.primary||"#ff4b4b"};
48  position: relative;
49  transform: rotate(45deg);
50
51  animation: ${A} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
52    forwards;
53  animation-delay: 100ms;
54
55  &:after,
56  &:before {
57    content: '';
58    animation: ${M} 0.15s ease-out forwards;
59    animation-delay: 150ms;
60    position: absolute;
61    border-radius: 3px;
62    opacity: 0;
63    background: ${e=>e.secondary||"#fff"};
64    bottom: 9px;
65    left: 4px;
66    height: 2px;
67    width: 12px;
68  }
69
70  &:before {
71    animation: ${L} 0.15s ease-out forwards;
72    animation-delay: 180ms;
73    transform: rotate(90deg);
74  }
75`,U=v`
76  from {
77    transform: rotate(0deg);
78  }
79  to {
80    transform: rotate(360deg);
81  }
82`,$=_("div")`
83  width: 12px;
84  height: 12px;
85  box-sizing: border-box;
86  border: 2px solid;
87  border-radius: 100%;
88  border-color: ${e=>e.secondary||"#e0e0e0"};
89  border-right-color: ${e=>e.primary||"#616161"};
90  animation: ${U} 1s linear infinite;
91`,D=v`
92from {
93  transform: scale(0) rotate(45deg);
94	opacity: 0;
95}
96to {
97  transform: scale(1) rotate(45deg);
98	opacity: 1;
99}`,N=v`
1000% {
101	height: 0;
102	width: 0;
103	opacity: 0;
104}
10540% {
106  height: 0;
107	width: 6px;
108	opacity: 1;
109}
110100% {
111  opacity: 1;
112  height: 10px;
113}`,z=_("div")`
114  width: 20px;
115  opacity: 0;
116  height: 20px;
117  border-radius: 10px;
118  background: ${e=>e.primary||"#61d345"};
119  position: relative;
120  transform: rotate(45deg);
121
122  animation: ${D} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
123    forwards;
124  animation-delay: 100ms;
125  &:after {
126    content: '';
127    box-sizing: border-box;
128    animation: ${N} 0.2s ease-out forwards;
129    opacity: 0;
130    animation-delay: 200ms;
131    position: absolute;
132    border-right: 2px solid;
133    border-bottom: 2px solid;
134    border-color: ${e=>e.secondary||"#fff"};
135    bottom: 6px;
136    left: 6px;
137    height: 10px;
138    width: 6px;
139  }
140`,W=_("div")`
141  position: absolute;
142`,B=_("div")`
143  position: relative;
144  display: flex;
145  justify-content: center;
146  align-items: center;
147  min-width: 20px;
148  min-height: 20px;
149`,H=v`
150from {
151  transform: scale(0.6);
152  opacity: 0.4;
153}
154to {
155  transform: scale(1);
156  opacity: 1;
157}`,K=_("div")`
158  position: relative;
159  transform: scale(0.6);
160  opacity: 0.4;
161  min-width: 20px;
162  animation: ${H} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
163    forwards;
164`,q=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return void 0!==t?"string"==typeof t?i.createElement(K,null,t):t:"blank"===r?null:i.createElement(B,null,i.createElement($,{...n}),"loading"!==r&&i.createElement(W,null,"error"===r?i.createElement(F,{...n}):i.createElement(z,{...n})))},V=_("div")`
165  display: flex;
166  align-items: center;
167  background: #fff;
168  color: #363636;
169  line-height: 1.3;
170  will-change: transform;
171  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
172  max-width: 350px;
173  pointer-events: auto;
174  padding: 8px 10px;
175  border-radius: 8px;
176`,G=_("div")`
177  display: flex;
178  justify-content: center;
179  margin: 4px 10px;
180  color: inherit;
181  flex: 1 1 auto;
182  white-space: pre-line;
183`,X=i.memo(({toast:e,position:t,style:r,children:n})=>{let s=e.height?((e,t)=>{let r=e.includes("top")?1:-1,[n,i]=b()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[`
1840% {transform: translate3d(0,${-200*r}%,0) scale(.6); opacity:.5;}
185100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
186`,`
1870% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
188100% {transform: translate3d(0,${-150*r}%,-1px) scale(.6); opacity:0;}
189`];return{animation:t?`${v(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${v(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},o=i.createElement(q,{toast:e}),a=i.createElement(G,{...e.ariaProps},m(e.message,e));return i.createElement(V,{className:e.className,style:{...s,...r,...e.style}},"function"==typeof n?n({icon:o,message:a}):i.createElement(i.Fragment,null,o,a))});n=i.createElement,u.p=void 0,p=n,f=void 0,g=void 0;var Y=({id:e,className:t,style:r,onHeightUpdate:n,children:s})=>{let o=i.useCallback(t=>{if(t){let r=()=>{n(e,t.getBoundingClientRect().height)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return i.createElement("div",{ref:o,className:t,style:r},s)},J=h`
190  z-index: 9999;
191  > * {
192    pointer-events: auto;
193  }
194`,Q=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:s,toasterId:o,containerStyle:a,containerClassName:l})=>{let{toasts:u,handlers:c}=((e,t="default")=>{let{toasts:r,pausedAt:n}=((e={},t=w)=>{let[r,n]=(0,i.useState)(P[t]||S),s=(0,i.useRef)(P[t]);(0,i.useEffect)(()=>(s.current!==P[t]&&n(P[t]),k.push([t,n]),()=>{let e=k.findIndex(([e])=>e===t);e>-1&&k.splice(e,1)}),[t]);let o=r.toasts.map(t=>{var r,n,i;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(r=e[t.type])?void 0:r.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||C[t.type],style:{...e.style,...null==(i=e[t.type])?void 0:i.style,...t.style}}});return{...r,toasts:o}})(e,t),s=(0,i.useRef)(new Map).current,o=(0,i.useCallback)((e,t=I)=>{if(s.has(e))return;let r=setTimeout(()=>{s.delete(e),a({type:4,toastId:e})},t);s.set(e,r)},[]);(0,i.useEffect)(()=>{if(n)return;let e=Date.now(),i=r.map(r=>{if(r.duration===1/0)return;let n=(r.duration||0)+r.pauseDuration-(e-r.createdAt);if(n<0){r.visible&&j.dismiss(r.id);return}return setTimeout(()=>j.dismiss(r.id,t),n)});return()=>
194{i.forEach(e=>e&&clearTimeout(e))}},[r,n,t]);let a=(0,i.useCallback)(O(t),[t]),l=(0,i.useCallback)(()=>{a({type:5,time:Date.now()})},[a]),u=(0,i.useCallback)((e,t)=>{a({type:1,toast:{id:e,height:t}})},[a]),c=(0,i.useCallback)(()=>{n&&a({type:6,time:Date.now()})},[n,a]),d=(0,i.useCallback)((e,t)=>{let{reverseOrder:n=!1,gutter:i=8,defaultPosition:s}=t||{},o=r.filter(t=>(t.position||s)===(e.position||s)&&t.height),a=o.findIndex(t=>t.id===e.id),l=o.filter((e,t)=>t<a&&e.visible).length;return o.filter(e=>e.visible).slice(...n?[l+1]:[0,l]).reduce((e,t)=>e+(t.height||0)+i,0)},[r]);return(0,i.useEffect)(()=>{r.forEach(e=>{if(e.dismissed)o(e.id,e.removeDelay);else{let t=s.get(e.id);t&&(clearTimeout(t),s.delete(e.id))}})},[r,o]),{toasts:r,handlers:{updateHeight:u,startPause:l,endPause:c,calculateOffset:d}}})(r,o);return i.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:l,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(r=>{let o=r.position||t,a=((e,t)=>{let r=e.includes("top"),n=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:b()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...r?{top:0}:{bottom:0},...n}})(o,c.calculateOffset(r,{reverseOrder:e,gutter:n,defaultPosition:t}));return i.createElement(Y,{id:r.id,key:r.id,onHeightUpdate:c.updateHeight,className:r.visible?J:"",style:a},"custom"===r.type?m(r.message,r):s?s(r):i.createElement(X,{toast:r,position:o}))}))},Z=j},4161:(e,t,r)=>{e.exports.cookies=r(8487).cookies,e.exports.headers=r(8926).headers,r(6533)},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(1532)._(r(1462)).default.createContext(null)},4410:(e,t,r)=>{"use strict";var n=r(1462),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=n.useState,o=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=s({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return a(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},4466:(e,t,r)=>{"use strict";r.d(t,{zz:()=>i});let n=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let n={...r};for(let r of Object.keys(n)){let i=e(r.toString());i!==r&&(n[i]=n[r],delete n[r]),"object"==typeof n[i]&&(n[i]=t(n[i]))}return n};return t};function i(e){if("boolean"==typeof e)return e;if(null==e)return!1;if("string"==typeof e){if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1}let t=parseInt(e,10);return!isNaN(t)&&t>0}n(function(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}),n(function(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""})},4479:(e,t,r)=>{"use strict";r.d(t,{zz:()=>n.zz});var n=r(4466)},4662:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"InvariantError",{enumerable:!0,get:function(){return r}});class r extends Error{constructor(e,t){super("Invariant: "+(e.endsWith(".")?e:e+".")+" This is a bug in Next.js.",t),this.name="InvariantError"}}},4935:(e,t,r)=>{"use strict";r.d(t,{H$:()=>d,mG:()=>a,V2:()=>h,fS:()=>f,ev:()=>m,Fx:()=>u,Rg:()=>p,At:()=>c,tm:()=>g,rB:()=>l,Mh:()=>_,nN:()=>v});var n=r(9236),i=r(5262),s=r(4479),o=r(7351);o.env.NEXT_PUBLIC_CLERK_JS_VERSION,o.env.NEXT_PUBLIC_CLERK_JS_URL;let a=o.env.CLERK_API_VERSION||"v1",l=o.env.CLERK_SECRET_KEY||"",u=o.env.CLERK_MACHINE_SECRET_KEY||"",c="pk_live_Y2xlcmsuaXRzcmF3LmFpJA";o.env.CLERK_ENCRYPTION_KEY;let d=o.env.CLERK_API_URL||(e=>{let t=(0,i.q5)(e)?.frontendApi;return t?.startsWith("clerk.")&&n.iM.some(e=>t?.endsWith(e))?n.FW:n.mG.some(e=>t?.endsWith(e))?n.Vc:n.ub.some(e=>t?.endsWith(e))?n.HG:n.FW})(c),h=o.env.NEXT_PUBLIC_CLERK_DOMAIN||"",p=o.env.NEXT_PUBLIC_CLERK_PROXY_URL||"",f=(0,s.zz)(o.env.NEXT_PUBLIC_CLERK_IS_SATELLITE)||!1;o.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL,o.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL;let g={name:"@clerk/nextjs",version:"6.39.2",environment:"production"},v=(0,s.zz)(o.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),_=(0,s.zz)(o.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG),m=(0,s.zz)(o.env.NEXT_PUBLIC_CLERK_KEYLESS_DISABLED)||!1},4968:e=>{!function(){var t={229:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:s}
194catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],u=!1,c=-1;function d(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||u||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},o=!0;try{t[e](s,s.exports,n),o=!1}finally{o&&delete r[e]}return s.exports}n.ab="//",e.exports=n(229)}()},5262:(e,t,r)=>{"use strict";r.d(t,{RZ:()=>u,qS:()=>d,ky:()=>h,mC:()=>c,rA:()=>l,q5:()=>a});var n=r(9236),i=r(837);let s="pk_live_";function o(e){if(!e.endsWith("$"))return!1;let t=e.slice(0,-1);return!t.includes("$")&&t.includes(".")}function a(e,t={}){let r;if(!(e=e||"")||!l(e)){if(t.fatal&&!e)throw Error("Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys");if(t.fatal&&!l(e))throw Error("Publishable key not valid.");return null}let n=e.startsWith(s)?"production":"development";try{r=(0,i.y)(e.split("_")[2])}catch{if(t.fatal)throw Error("Publishable key not valid: Failed to decode key.");return null}if(!o(r)){if(t.fatal)throw Error("Publishable key not valid: Decoded key has invalid format.");return null}let u=r.slice(0,-1);return t.proxyUrl?u=t.proxyUrl:"development"!==n&&t.domain&&t.isSatellite&&(u=`clerk.${t.domain}`),{instanceType:n,frontendApi:u}}function l(e=""){try{if(!(e.startsWith(s)||e.startsWith("pk_test_")))return!1;let t=e.split("_");if(3!==t.length)return!1;let r=t[2];if(!r)return!1;return o((0,i.y)(r))}catch{return!1}}function u(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let r="string"==typeof t?t:t.hostname,i=e.get(r);return void 0===i&&(i=n.gE.some(e=>r.endsWith(e)),e.set(r,i)),i}}}function c(e){return e.startsWith("test_")||e.startsWith("sk_test_")}async function d(e,t=globalThis.crypto.subtle){var r;let n=new TextEncoder().encode(e);return(r=String.fromCharCode(...new Uint8Array(await t.digest("sha-1",n))),"undefined"!=typeof btoa&&"function"==typeof btoa?btoa(r):"undefined"!=typeof global&&global.Buffer?new global.Buffer(r).toString("base64"):r).replace(/\+/gi,"-").replace(/\//gi,"_").substring(0,8)}let h=(e,t)=>`${e}_${t}`},5416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(8861).createAsyncLocalStorage)()},5741:(e,t)=>{"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5819:(e,t,r)=>{"use strict";r.d(t,{ai:()=>d,AZ:()=>h});var n=r(4161);r(3987);let i=(0,r(293)._r)({packageName:"@clerk/nextjs"});var s=r(7351);let o="__clerk_keys_";async function a(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("").slice(0,16)}async function l(){let e=s.env.PWD;if(!e)return`${o}0`;
194let t=e.split("/").filter(Boolean).slice(-3).reverse().join("/"),r=await a(t);return`${o}${r}`}var u=r(431);let c={secure:!1,httpOnly:!1,sameSite:"lax"};async function d(){if(!u.I)return null;let e=await Promise.all([r.e(146),r.e(719),r.e(129)]).then(r.bind(r,9129)).then(e=>e.createOrReadKeyless()).catch(()=>null);if(!e)return i.throwMissingPublishableKeyError(),null;let{clerkDevelopmentCache:t,createKeylessModeMessage:s}=await r.e(749).then(r.bind(r,1749));null==t||t.log({cacheKey:e.publishableKey,msg:s(e)});let{claimUrl:o,publishableKey:a,secretKey:d,apiKeysUrl:h}=e;return(await (0,n.cookies)()).set(await l(),JSON.stringify({claimUrl:o,publishableKey:a,secretKey:d}),c),{claimUrl:o,publishableKey:a,apiKeysUrl:h}}async function h(){if(u.I)try{let{detectKeylessEnvDrift:e}=await Promise.all([r.e(146),r.e(719),r.e(603)]).then(r.bind(r,4603));await e()}catch{}}},6031:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"forbidden",{enumerable:!0,get:function(){return n}}),r(4703).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6533:(e,t,r)=>{"use strict";let n=r(3185),i=r(7990),s=r(9603),o=r(854),a=r(512),l=r(8684),u=r(4662);r(8845);new WeakMap;(0,o.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`draftMode()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E377",enumerable:!1,configurable:!0})})},6598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return i}});let n=""+r(4703).HTTP_ERROR_FALLBACK_ERROR_CODE+";404";function i(){let e=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw e.digest=n,e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6763:(e,t,r)=>{"use strict";r.d(t,{M0:()=>l});var n,i,s,o,a=r(2721);let l=null!=(i=null==(n=null==a?void 0:a.version)?void 0:n.startsWith("13."))&&i||null!=(o=null==(s=null==a?void 0:a.version)?void 0:s.startsWith("14.0"))&&o;!function(e){if(null==a?void 0:a.version)isNaN(parseInt(a.version.split(".")[0],10))}(0)},6764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return a},noSSR:function(){return o}});let n=r(1532);r(3798),r(1462);let i=n._(r(2843));function s(e){return{default:(null==e?void 0:e.default)||e}}function o(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let r=i.default,n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let a=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=a?a().then(s):Promise.resolve(s(()=>null))}):(delete n.webpack,delete n.modules,o(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6791:(e,t,r)=>{"use strict";r.d(t,{Bl:()=>a,EH:()=>l,iB:()=>o});var n=r(3750),i=r(7476),s=r(1462);r(2062);var o=({children:e,treatPendingAsSignedOut:t})=>{(0,n.Kz)("SignedIn");let{userId:r}=(0,n.As)({treatPendingAsSignedOut:t});return r?e:null},a=({children:e,treatPendingAsSignedOut:t})=>{(0,n.Kz)("SignedOut");let{userId:r}=(0,n.As)({treatPendingAsSignedOut:t});return null===r?e:null},l=({children:e,fallback:t,treatPendingAsSignedOut:r,...i})=>{(0,n.Kz)("Protect");let{isLoaded:s,has:o,userId:a}=(0,n.As)({treatPendingAsSignedOut:r});if(!s)return null;let l=null!=t?t:null;return a?"function"==typeof i.condition?i.condition(o)?e:l:i.role||i.permission||i.feature||i.plan?o(i)?e:l:e:l};(0,n.Q)(({clerk:e,...t})=>{let{client:r,session:n}=e,i=r.signedInSessions?r.signedInSessions.length>0:r.activeSessions&&r.activeSessions.length>0;return s.useEffect(()=>{null===n&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},"RedirectToSignIn"),(0,n.Q)(({clerk:e,...t})=>(s.useEffect(()=>{e.redirectToSignUp(t)},[]),null),"RedirectToSignUp"),(0,n.Q)(({clerk:e,...t})=>(s.useEffect(()=>{e.redirectToTasks(t)},[]),null),"RedirectToTasks"),(0,n.Q)(({clerk:e})=>(s.useEffect(()=>{(0,i.io)("RedirectToUserProfile","Use the `redirectToUserProfile()` method instead."),e.redirectToUserProfile()},[]),null),"RedirectToUserProfile"),(0,n.Q)(({clerk:e})=>(s.useEffect(()=>{(0,i.io)("RedirectToOrganizationProfile","Use the `redirectToOrganizationProfile()` method instead."),e.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile"),(0,n.Q)(({clerk:e})=>(s.useEffect(()=>{(0,i.io)("RedirectToCreateOrganization","Use the `redirectToCreateOrganization()` method instead."),e.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization"),(0,n.Q)(({clerk:e,...t})=>(s.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),"AuthenticateWithRedirectCallback")},6996:(e,t,r)=>{e.exports=r(1972)},7005:(e,t,r)=>{"use strict";r.d(t,{lJ:()=>$,EH:()=>h.EH,hZ:()=>j,Ny:()=>I,iB:()=>h.iB,Bl:()=>h.Bl,uF:()=>p.uF,As:()=>f.As,ho:()=>f.ho,Jd:()=>f.Jd});var n,i,s,o,a,l,u,c,d,h=r(6791),p=r(3458),f=r(3750),g=e=>{throw TypeError(e)},v=(e,t,r)=>t.has(e)||g("Cannot "+r),_=(e,t,r)=>(v(e,t,"read from private field"),r?r.call(e):t.get(e)),m=(e,t,r)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),y=(e,t,r,n)=>(v(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),b=(e,t,r)=>(v(e,t,"access private method"),r),w=r(120),E=r(1462),k=r(5262),S=r(2062),P=r(8084);let x=(e,t,r,n,i)=>{let{notify:s}=i||{},o=e.get(r);o||(o=[],e.set(r,o)),o.push(n),s&&t.has(r)&&n(t.get(r))},R=(e,t,r)=>(e.get(t)||[]).map(e=>e(r)),O=(e,t,r)=>{let n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},C={Status:"status"};var T=r(3636);"undefined"==typeof window||window.global||(window.global="undefined"==typeof global?window:global);var j=(0,f.Q)(({clerk:e,children:t,...r})=>{let{appearance:n,signUpFallbackRedirectUrl:i,forceRedirectUrl:s,fallbackRedirectUrl:o,signUpForceRedirectUrl:a,mode:l,initialValues:u,withSignUp:c,oauthFlow:d,...h}=r;t=(0,p.ql)(t,"Sign in");let f=(0,p.jC)(t)("SignInButton"),g=async t=>(f&&"object"==typeof f&&"props"in f&&await (0,p.V5)(f.props.onClick)(t),(()=>{let t={forceRedirectUrl:s,fallbackRedirectUrl:o,signUpFallbackRedirectUrl:i,signUpForceRedirectUrl:a,initialValues:u,withSignUp:c,oauthFlow:d};return"modal"===l?e.openSignIn({...t,appearance:n}):e.redirectToSignIn({...t,signInFallbackRedirectUrl:o,signInForceRedirectUrl:s})})()),v={...h,onClick:g};return E.cloneElement(f,v)}
194,{component:"SignInButton",renderWhileLoading:!0});(0,f.Q)(({clerk:e,children:t,...r})=>{let{redirectUrl:n,...i}=r;t=(0,p.ql)(t,"Sign in with Metamask");let s=(0,p.jC)(t)("SignInWithMetamaskButton"),o=async()=>{!async function(){await e.authenticateWithMetamask({redirectUrl:n||void 0})}()},a=async e=>(await (0,p.V5)(s.props.onClick)(e),o()),l={...i,onClick:a};return E.cloneElement(s,l)},{component:"SignInWithMetamask",renderWhileLoading:!0}),(0,f.Q)(({clerk:e,children:t,...r})=>{let{redirectUrl:n="/",signOutOptions:i,...s}=r;t=(0,p.ql)(t,"Sign out");let o=(0,p.jC)(t)("SignOutButton"),a=async t=>(await (0,p.V5)(o.props.onClick)(t),e.signOut({redirectUrl:n,...i})),l={...s,onClick:a};return E.cloneElement(o,l)},{component:"SignOutButton",renderWhileLoading:!0});var I=(0,f.Q)(({clerk:e,children:t,...r})=>{let{appearance:n,unsafeMetadata:i,fallbackRedirectUrl:s,forceRedirectUrl:o,signInFallbackRedirectUrl:a,signInForceRedirectUrl:l,mode:u,initialValues:c,oauthFlow:d,...h}=r;t=(0,p.ql)(t,"Sign up");let f=(0,p.jC)(t)("SignUpButton"),g=async t=>(f&&"object"==typeof f&&"props"in f&&await (0,p.V5)(f.props.onClick)(t),(()=>{let t={fallbackRedirectUrl:s,forceRedirectUrl:o,signInFallbackRedirectUrl:a,signInForceRedirectUrl:l,initialValues:c,oauthFlow:d};return"modal"===u?e.openSignUp({...t,appearance:n,unsafeMetadata:i}):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:s,signUpForceRedirectUrl:o})})()),v={...h,onClick:g};return E.cloneElement(f,v)},{component:"SignUpButton",renderWhileLoading:!0}),A=class{constructor(e){this.isomorphicClerk=e,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}buildSignInProxy(){let e=this.gateProperty.bind(this),t=()=>this.client.signIn.__internal_future;return{errors:{fields:{identifier:null,password:null,code:null},raw:null,global:null},fetchStatus:"idle",signIn:{status:"needs_identifier",availableStrategies:[],isTransferable:!1,get id(){return e(t,"id",void 0)},get supportedFirstFactors(){return e(t,"supportedFirstFactors",[])},get supportedSecondFactors(){return e(t,"supportedSecondFactors",[])},get secondFactorVerification(){return e(t,"secondFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")}})},get identifier(){return e(t,"identifier",null)},get createdSessionId(){return e(t,"createdSessionId",null)},get userData(){return e(t,"userData",{})},get firstFactorVerification(){return e(t,"firstFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")}})},create:this.gateMethod(t,"create"),password:this.gateMethod(t,"password"),sso:this.gateMethod(t,"sso"),finalize:this.gateMethod(t,"finalize"),emailCode:this.wrapMethods(()=>t().emailCode,["sendCode","verifyCode"]),emailLink:this.wrapStruct(()=>t().emailLink,["sendLink","waitForVerification"],["verification"],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>t().resetPasswordEmailCode,["sendCode","verifyCode","submitPassword"]),phoneCode:this.wrapMethods(()=>t().phoneCode,["sendCode","verifyCode"]),mfa:this.wrapMethods(()=>t().mfa,["sendPhoneCode","verifyPhoneCode","verifyTOTP","verifyBackupCode"]),ticket:this.gateMethod(t,"ticket"),passkey:this.gateMethod(t,"passkey"),web3:this.gateMethod(t,"web3")}}}buildSignUpProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),r=this.wrapMethods.bind(this),n=()=>this.client.signUp.__internal_future;return{errors:{fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null},fetchStatus:"idle",signUp:{get id(){return e(n,"id",void 0)},get requiredFields(){return e(n,"requiredFields",[])},get optionalFields(){return e(n,"optionalFields",[])},get missingFields(){return e(n,"missingFields",[])},get username(){return e(n,"username",null)},get firstName(){return e(n,"firstName",null)},get lastName(){return e(n,"lastName",null)},get emailAddress(){return e(n,"emailAddress",null)},get phoneNumber(){return e(n,"phoneNumber",null)},get web3Wallet(){return e(n,"web3Wallet",null)},get hasPassword(){return e(n,"hasPassword",!1)},get unsafeMetadata(){return e(n,"unsafeMetadata",{})}
194,get createdSessionId(){return e(n,"createdSessionId",null)},get createdUserId(){return e(n,"createdUserId",null)},get abandonAt(){return e(n,"abandonAt",null)},get legalAcceptedAt(){return e(n,"legalAcceptedAt",null)},get locale(){return e(n,"locale",null)},get status(){return e(n,"status","missing_requirements")},get unverifiedFields(){return e(n,"unverifiedFields",[])},get isTransferable(){return e(n,"isTransferable",!1)},create:t(n,"create"),update:t(n,"update"),sso:t(n,"sso"),password:t(n,"password"),ticket:t(n,"ticket"),web3:t(n,"web3"),finalize:t(n,"finalize"),verifications:r(()=>n().verifications,["sendEmailCode","verifyEmailCode","sendPhoneCode","verifyPhoneCode"])}}}__internal_effect(e){throw Error("__internal_effect called before Clerk is loaded")}__internal_computed(e){throw Error("__internal_computed called before Clerk is loaded")}get client(){let e=this.isomorphicClerk.client;if(!e)throw Error("Clerk client not ready");return e}gateProperty(e,t,r){return(0,P.M)()&&this.isomorphicClerk.loaded?e()[t]:r}gateMethod(e,t){return async(...r)=>{if(!(0,P.M)())return f.sb.throw(`Attempted to call a method (${t}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(e=>this.isomorphicClerk.addOnLoaded(e));let n=e();return n[t].apply(n,r)}}wrapMethods(e,t){return Object.fromEntries(t.map(t=>[t,this.gateMethod(e,t)]))}wrapStruct(e,t,r,n){let i={};for(let r of t)i[r]=this.gateMethod(e,r);for(let t of r)Object.defineProperty(i,t,{get:()=>this.gateProperty(e,t,n[t]),enumerable:!0});return i}};void 0===globalThis.__BUILD_DISABLE_RHC__&&(globalThis.__BUILD_DISABLE_RHC__=!1);var M={name:"@clerk/clerk-react",version:"5.61.5",environment:"production"},L=class e{constructor(e){m(this,c),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetails=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],m(this,n,"loading"),m(this,i),m(this,s),m(this,o),m(this,a,(()=>{let e=new Map,t=new Map,r=new Map;return{on:(...r)=>x(e,t,...r),prioritizedOn:(...e)=>x(r,t,...e),emit:(n,i)=>{t.set(n,i),R(r,n,i),R(e,n,i)},off:(...t)=>O(e,...t),prioritizedOff:(...e)=>O(r,...e),internal:{retrieveListeners:t=>e.get(t)||[]}}})()),m(this,l),this.buildSignInUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignInUrl(e))||""};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildSignInUrl",t)},this.buildSignUpUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignUpUrl(e))||""};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildSignUpUrl",t)},this.buildAfterSignInUrl=(...e)=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildAfterSignInUrl(...e))||""};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildAfterSignInUrl",t)},this.buildAfterSignUpUrl=(...e)=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildAfterSignUpUrl(...e))||""};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildAfterSignUpUrl",t)},this.buildAfterSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignOutUrl())||""};
194if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildAfterSignOutUrl",e)},this.buildNewSubscriptionRedirectUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildNewSubscriptionRedirectUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildNewSubscriptionRedirectUrl",e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterMultiSessionSingleSignOutUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildAfterMultiSessionSingleSignOutUrl",e)},this.buildUserProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildUserProfileUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildUserProfileUrl",e)},this.buildCreateOrganizationUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildCreateOrganizationUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildCreateOrganizationUrl",e)},this.buildOrganizationProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildOrganizationProfileUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildOrganizationProfileUrl",e)},this.buildWaitlistUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildWaitlistUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildWaitlistUrl",e)},this.buildTasksUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildTasksUrl())||""};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildTasksUrl",e)},this.buildUrlWithAuth=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildUrlWithAuth(e))||""};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildUrlWithAuth",t)},this.handleUnauthenticated=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.handleUnauthenticated()};this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("handleUnauthenticated",e)},this.on=(...e)=>{var t;if(null==(t=this.clerkjs)?void 0:t.on)return this.clerkjs.on(...e);_(this,a).on(...e)}
194,this.off=(...e)=>{var t;if(null==(t=this.clerkjs)?void 0:t.off)return this.clerkjs.off(...e);_(this,a).off(...e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.beforeLoad=e=>{if(!e)throw Error("Failed to hydrate latest Clerk JS")},this.hydrateClerkJS=e=>{var t,r;if(!e)throw Error("Failed to hydrate latest Clerk JS");return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,r)=>{t.nativeUnsubscribe=e.addListener(r)}),null==(t=_(this,a).internal.retrieveListeners("status"))||t.forEach(e=>{this.on("status",e,{notify:!0})}),null==(r=_(this,a).internal.retrieveListeners("queryClientStatus"))||r.forEach(e=>{this.on("queryClientStatus",e,{notify:!0})}),null!==this.preopenSignIn&&e.openSignIn(this.preopenSignIn),null!==this.preopenCheckout&&e.__internal_openCheckout(this.preopenCheckout),null!==this.preopenPlanDetails&&e.__internal_openPlanDetails(this.preopenPlanDetails),null!==this.preopenSubscriptionDetails&&e.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),null!==this.preopenSignUp&&e.openSignUp(this.preopenSignUp),null!==this.preopenUserProfile&&e.openUserProfile(this.preopenUserProfile),null!==this.preopenUserVerification&&e.__internal_openReverification(this.preopenUserVerification),null!==this.preopenOneTap&&e.openGoogleOneTap(this.preopenOneTap),null!==this.preopenOrganizationProfile&&e.openOrganizationProfile(this.preopenOrganizationProfile),null!==this.preopenCreateOrganization&&e.openCreateOrganization(this.preopenCreateOrganization),null!==this.preOpenWaitlist&&e.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&e.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((t,r)=>{e.mountSignIn(r,t)}),this.premountSignUpNodes.forEach((t,r)=>{e.mountSignUp(r,t)}),this.premountUserProfileNodes.forEach((t,r)=>{e.mountUserProfile(r,t)}),this.premountUserAvatarNodes.forEach((t,r)=>{e.mountUserAvatar(r,t)}),this.premountUserButtonNodes.forEach((t,r)=>{e.mountUserButton(r,t)}),this.premountOrganizationListNodes.forEach((t,r)=>{e.mountOrganizationList(r,t)}),this.premountWaitlistNodes.forEach((t,r)=>{e.mountWaitlist(r,t)}),this.premountPricingTableNodes.forEach((t,r)=>{e.mountPricingTable(r,t)}),this.premountAPIKeysNodes.forEach((t,r)=>{e.mountAPIKeys(r,t)}),this.premountOAuthConsentNodes.forEach((t,r)=>{e.__internal_mountOAuthConsent(r,t)}),this.premountTaskChooseOrganizationNodes.forEach((t,r)=>{e.mountTaskChooseOrganization(r,t)}),this.premountTaskResetPasswordNodes.forEach((t,r)=>{e.mountTaskResetPassword(r,t)}),this.premountTaskSetupMFANodes.forEach((t,r)=>{e.mountTaskSetupMFA(r,t)}),void 0===this.clerkjs.status&&_(this,a).emit(C.Status,"ready"),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...e)=>{var t;return null==(t=this.clerkjs)?void 0:t.__experimental_checkout(...e)},this.__unstable__updateProps=async e=>{let t=await b(this,c,d).call(this);if(t&&"__unstable__updateProps"in t)return t.__unstable__updateProps(e)},this.setActive=e=>this.clerkjs?this.clerkjs.setActive(e):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(e):this.preopenCheckout=e},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(e):this.preopenPlanDetails=e},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null},this.__internal_openSubscriptionDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(e):this.preopenSubscriptionDetails=null!=e?e:null}
194,this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetails=null},this.__internal_openReverification=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(e):this.preopenUserVerification=e},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(e):this.preopenEnableOrganizationsPrompt=e},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=e=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(e):this.preOpenWaitlist=e},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserAvatar=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(e,t):this.premountUserAvatarNodes.set(e,t)},this.unmountUserAvatar=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(e):this.premountUserAvatarNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.__experimental_prefetchOrganizationSwitcher=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.__experimental_prefetchOrganizationSwitcher()};this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("__experimental_prefetchOrganizationSwitcher",e)},this.mountOrganizationList=(e,t)=>
194{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.mountWaitlist=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(e,t):this.premountWaitlistNodes.set(e,t)},this.unmountWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(e):this.premountWaitlistNodes.delete(e)},this.mountPricingTable=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(e,t):this.premountPricingTableNodes.set(e,t)},this.unmountPricingTable=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(e):this.premountPricingTableNodes.delete(e)},this.mountAPIKeys=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(e,t):this.premountAPIKeysNodes.set(e,t)},this.unmountAPIKeys=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(e):this.premountAPIKeysNodes.delete(e)},this.__internal_mountOAuthConsent=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(e,t):this.premountOAuthConsentNodes.set(e,t)},this.__internal_unmountOAuthConsent=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(e):this.premountOAuthConsentNodes.delete(e)},this.mountTaskChooseOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(e,t):this.premountTaskChooseOrganizationNodes.set(e,t)},this.unmountTaskChooseOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(e):this.premountTaskChooseOrganizationNodes.delete(e)},this.mountTaskResetPassword=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(e,t):this.premountTaskResetPasswordNodes.set(e,t)},this.unmountTaskResetPassword=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(e):this.premountTaskResetPasswordNodes.delete(e)},this.mountTaskSetupMFA=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(e,t):this.premountTaskSetupMFANodes.set(e,t)},this.unmountTaskSetupMFA=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(e):this.premountTaskSetupMFANodes.delete(e)},this.addListener=e=>{if(this.clerkjs)return this.clerkjs.addListener(e);{let t=()=>{var t;let r=this.premountAddListenerCalls.get(e);r&&(null==(t=r.nativeUnsubscribe)||t.call(r),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{unsubscribe:t,nativeUnsubscribe:void 0}),t}},this.navigate=e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.navigate(e)};this.clerkjs&&this.loaded?t():this.premountMethodCalls.set("navigate",t)},this.redirectWithAuth=async(...e)=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectWithAuth(...e)};return this.clerkjs&&this.loaded?t():void this.premountMethodCalls.set("redirectWithAuth",t)},this.redirectToSignIn=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignIn(e)};return this.clerkjs&&this.loaded?t():void this.premountMethodCalls.set("redirectToSignIn",t)},this.redirectToSignUp=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignUp(e)};return this.clerkjs&&this.loaded?t():void this.premountMethodCalls.set("redirectToSignUp",t)},this.redirectToUserProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToUserProfile()};return this.clerkjs&&this.loaded?e():void this.premountMethodCalls.set("redirectToUserProfile",e)},this.redirectToAfterSignUp=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignUp()};if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToAfterSignUp",e)},this.redirectToAfterSignIn=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignIn()};this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("redirectToAfterSignIn",e)},this.redirectToAfterSignOut=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignOut()};this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("redirectToAfterSignOut",e)},this.redirectToOrganizationProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToOrganizationProfile()};return this.clerkjs&&this.loaded?e():void this.premountMethodCalls.set("redirectToOrganizationProfile",e)},this.redirectToCreateOrganization=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToCreateOrganization()};return this.clerkjs&&this.loaded?e():void this.premountMethodCalls.set("redirectToCreateOrganization",e)},this.redirectToWaitlist=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToWaitlist()};return this.clerkjs&&this.loaded?e():void this.premountMethodCalls.set("redirectToWaitlist",e)},this.redirectToTasks=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToTasks(e)};return this.clerkjs&&this.loaded?t():void this.premountMethodCalls.set("redirectToTasks",t)},this.handleRedirectCallback=async e=>{var t;let r=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleRedirectCallback(e)};this.clerkjs&&this.loaded?null==(t=r())||t.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",r)},this.handleGoogleOneTapCallback=async(e,t)=>{var r;let n=()=>{var r;return null==(r=this.clerkjs)?void 0:r.handleGoogleOneTapCallback(e,t)};this.clerkjs&&this.loaded?null==(r=n())||r.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",n)},this.handleEmailLinkVerification=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleEmailLinkVerification(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("handleEmailLinkVerification",t)},this.authenticateWithMetamask=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithMetamask(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithMetamask",t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithCoinbaseWallet(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithCoinbaseWallet",t)},this.authenticateWithBase=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithBase(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithBase",t)},this.authenticateWithOKXWallet=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithOKXWallet(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithOKXWallet",t)},this.authenticateWithSolana=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithSolana(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithSolana",t)},this.authenticateWithWeb3=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithWeb3(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithWeb3",t)},this.authenticateWithGoogleOneTap=async e=>(await b(this,c,d).call(this)).authenticateWithGoogleOneTap(e),this.__internal_loadStripeJs=async()=>(await b(this,c,d).call(this)).__internal_loadStripeJs(),this.createOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.createOrganization(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("createOrganization",t)},this.getOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.getOrganization(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("getOrganization",t)},this.joinWaitlist=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.joinWaitlist(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("joinWaitlist",t)},this.signOut=async(...e)=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.signOut(...e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("signOut",t)},this.__internal_attemptToEnableEnvironmentSetting=e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.__internal_attemptToEnableEnvironmentSetting(e)};if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting",t)};let{Clerk:t=null,publishableKey:r}=e||{};y(this,o,r),y(this,s,null==e?void 0:e.proxyUrl),y(this,i,null==e?void 0:e.domain),this.options=e,this.Clerk=t,this.mode=(0,P.M)()?"browser":"server",y(this,l,new A(this)),this.options.sdkMetadata||(this.options.sdkMetadata=M),_(this,a).emit(C.Status,"loading"),_(this,a).prioritizedOn(C.Status,e=>y(this,n,e)),_(this,o)&&this.loadClerkJS()}get publishableKey(){return _(this,o)}get loaded(){var e;return(null==(e=this.clerkjs)?void 0:e.loaded)||!1}get status(){var e;return this.clerkjs?(null==(e=this.clerkjs)?void 0:e.status)||(this.clerkjs.loaded?"ready":"loading"):_(this,n)}static getOrCreateInstance(t){return(0,P.M)()&&_(this,u)&&(!t.Clerk||_(this,u).Clerk===t.Clerk)&&_(this,u).publishableKey===t.publishableKey||y(this,u,new e(t)),_(this,u)}static clearInstance(){y(this,u,null)}get domain(){return"undefined"!=typeof window&&window.location?(0,T.VK)(_(this,i),new URL(window.location.href),""):"function"==typeof _(this,i)?f.sb.throw(f.Vo):_(this,i)||""}get proxyUrl(){return"undefined"!=typeof window&&window.location?(0,T.VK)(_(this,s),new URL(window.location.href),""):"function"==typeof _(this,s)?f.sb.throw(f.Vo):_(this,s)||""}__internal_getOption(e){var t,r;return(null==(t=this.clerkjs)?void 0:t.__internal_getOption)?null==(r=this.clerkjs)?void 0:r.__internal_getOption(e):this.options[e]}get sdkMetadata(){var e;return(null==(e=this.clerkjs)?void 0:e.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var e;return null==(e=this.clerkjs)?void 0:e.instanceType}get frontendApi(){var e;return(null==(e=this.clerkjs)?void 0:e.frontendApi)||""}get isStandardBrowser(){var e;return(null==(e=this.clerkjs)?void 0:e.isStandardBrowser)||this.options.standardBrowser||!1}get __internal_queryClient(){var e;return null==(e=this.clerkjs)?void 0:e.__internal_queryClient}get isSatellite(){return"undefined"!=typeof window&&window.location?(0,T.VK)(this.options.isSatellite,new URL(window.location.href),!1):"function"==typeof this.options.isSatellite&&f.sb.throw(f.Vo)}async loadClerkJS(){var e;if("browser"===this.mode&&!this.loaded){"undefined"!=typeof window&&(window.__clerk_publishable_key=_(this,o),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let e;(0,p.rI)(this.Clerk)?(e=new this.Clerk(_(this,o),{proxyUrl:this.proxyUrl,domain:this.domain}),this.beforeLoad(e),await e.load(this.options)):(e=this.Clerk).loaded||(this.beforeLoad(e),await e.load(this.options)),global.Clerk=e}else if(!__BUILD_DISABLE_RHC__){if(global.Clerk||await (0,w._R)({...this.options,publishableKey:_(this,o),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.Clerk)throw Error("Failed to download latest ClerkJS. Contact [email protected].");this.beforeLoad(global.Clerk),await global.Clerk.load(this.options)}if(null==(e=global.Clerk)?void 0:e.loaded)return this.hydrateClerkJS(global.Clerk);return}catch(e){_(this,a).emit(C.Status,"error"),console.error(e.stack||e.message||e);return}}}get version(){var e;return null==(e=this.clerkjs)?void 0:e.version}get client(){return this.clerkjs?this.clerkjs.client:void 0}get session(){return this.clerkjs?this.clerkjs.session:void 0}get user(){return this.clerkjs?this.clerkjs.user:void 0}get organization(){return this.clerkjs?this.clerkjs.organization:void 0}get telemetry(){return this.clerkjs?this.clerkjs.telemetry:void 0}get __unstable__environment(){return this.clerkjs?this.clerkjs.__unstable__environment:void 0}get isSignedIn(){return!!this.clerkjs&&this.clerkjs.isSignedIn}get billing(){var e;
194return null==(e=this.clerkjs)?void 0:e.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:_(this,l)}get apiKeys(){var e;return null==(e=this.clerkjs)?void 0:e.apiKeys}__unstable__setEnvironment(...e){this.clerkjs&&"__unstable__setEnvironment"in this.clerkjs&&this.clerkjs.__unstable__setEnvironment(e)}};function F(e){var t;let{isomorphicClerkOptions:r,initialState:n,children:i}=e,{isomorphicClerk:s,clerkStatus:o}=U(r),[a,l]=E.useState({client:s.client,session:s.session,user:s.user,organization:s.organization});E.useEffect(()=>s.addListener(e=>l({...e})),[]);let u=(t=s.loaded,!t&&n?(e=>{let t=e.userId,r=e.user,n=e.sessionId,i=e.sessionStatus,s=e.sessionClaims;return{userId:t,user:r,sessionId:n,session:e.session,sessionStatus:i,sessionClaims:s,organization:e.organization,orgId:e.orgId,orgRole:e.orgRole,orgPermissions:e.orgPermissions,orgSlug:e.orgSlug,actor:e.actor,factorVerificationAge:e.factorVerificationAge}})(n):(e=>{let t=e.user?e.user.id:e.user,r=e.user,n=e.session?e.session.id:e.session,i=e.session,s=e.session?.status,o=e.session?e.session.lastActiveToken?.jwt?.claims:null,a=e.session?e.session.factorVerificationAge:null,l=i?.actor,u=e.organization,c=e.organization?e.organization.id:e.organization,d=u?.slug,h=u?r?.organizationMemberships?.find(e=>e.organization.id===c):u,p=h?h.permissions:h;return{userId:t,user:r,sessionId:n,session:i,sessionStatus:s,sessionClaims:o,organization:u,orgId:c,orgRole:h?h.role:h,orgSlug:d,orgPermissions:p,actor:l,factorVerificationAge:a}})(a)),c=E.useMemo(()=>({value:s}),[o]),d=E.useMemo(()=>({value:a.client}),[a.client]),{sessionId:h,sessionStatus:p,sessionClaims:g,session:v,userId:_,user:m,orgId:y,actor:b,organization:w,orgRole:k,orgSlug:P,orgPermissions:x,factorVerificationAge:R}=u,O=E.useMemo(()=>({value:{sessionId:h,sessionStatus:p,sessionClaims:g,userId:_,actor:b,orgId:y,orgRole:k,orgSlug:P,orgPermissions:x,factorVerificationAge:R}}),[h,p,_,b,y,k,P,R,null==g?void 0:g.__raw]),C=E.useMemo(()=>({value:v}),[h,v]),T=E.useMemo(()=>({value:m}),[_,m]),j=E.useMemo(()=>({value:{organization:w}}),[y,w]);return E.createElement(f.SW.Provider,{value:c},E.createElement(S.pc.Provider,{value:d},E.createElement(S.IC.Provider,{value:C},E.createElement(S.TS,{...j.value},E.createElement(f.cy.Provider,{value:O},E.createElement(S.Rs.Provider,{value:T},E.createElement(S.Rx,{value:void 0},i)))))))}n=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakSet,d=function(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})},m(L,u);var U=e=>{let t=E.useRef(L.getOrCreateInstance(e)),[r,n]=E.useState(t.current.status);return E.useEffect(()=>{t.current.__unstable__updateProps({appearance:e.appearance})},[e.appearance]),E.useEffect(()=>{t.current.__unstable__updateProps({options:e})},[e.localization]),E.useEffect(()=>(t.current.on("status",n),()=>{t.current&&t.current.off("status",n),L.clearInstance()}),[]),{isomorphicClerk:t.current,clerkStatus:r}},$=(0,p.wm)(function(e){let{initialState:t,children:r,__internal_bypassMissingPublishableKey:n,...i}=e,{publishableKey:s="",Clerk:o}=i;return o||n||(s?s&&!(0,k.rA)(s)&&f.sb.throwInvalidPublishableKeyError({key:s}):f.sb.throwMissingPublishableKeyError()),E.createElement(F,{initialState:t,isomorphicClerkOptions:i},r)},"ClerkProvider",f.yN);$.displayName="ClerkProvider",(0,f.wV)({packageName:"@clerk/clerk-react"}),(0,w.kX)("@clerk/clerk-react")},7028:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unauthorized",{enumerable:!0,get:function(){return n}}),r(4703).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7197:(e,t,r)=>{"use strict";
194Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return s}});let n=r(1462),i=r(2638);function s(){return(0,n.useContext)(i.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7351:(e,t,r)=>{"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(4968)},7389:(e,t,r)=>{"use strict";r.d(t,{Ab:()=>o,TV:()=>i,sB:()=>s});var n=r(9236);function i(e){let t;if(!e)return"";if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}return`clerk.${e.replace(t,"")}`}function s(e){return n.iM.some(t=>e.startsWith("accounts.")&&e.endsWith(t))}function o(e){return n.aG.some(t=>e.endsWith(t)&&!e.endsWith(".clerk"+t))}},7407:(e,t,r)=>{"use strict";r.d(t,{FJ:()=>h,RR:()=>d,YF:()=>p});var n=r(5262),i=r(4466),s=r(7351),o=class{#e;#t=864e5;constructor(e){this.#e=e}isEventThrottled(e){let t=Date.now(),r=this.#r(e),n=this.#e.getItem(r);return!!n&&!(t-n>this.#t)||(this.#e.setItem(r,t),!1)}#r(e){let{sk:t,pk:r,payload:n,...i}=e,s={...n,...i};return JSON.stringify(Object.keys({...n,...i}).sort().map(e=>s[e]))}},a=class{#n="clerk_telemetry_throttler";getItem(e){return this.#i()[e]}setItem(e,t){try{let r=this.#i();r[e]=t,localStorage.setItem(this.#n,JSON.stringify(r))}catch(e){e instanceof DOMException&&("QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&localStorage.length>0&&localStorage.removeItem(this.#n)}}removeItem(e){try{let t=this.#i();delete t[e],localStorage.setItem(this.#n,JSON.stringify(t))}catch{}}#i(){try{let e=localStorage.getItem(this.#n);if(!e)return{};return JSON.parse(e)}catch{return{}}}static isSupported(){return"undefined"!=typeof window&&!!window.localStorage}},l=class{#e=new Map;#s=1e4;getItem(e){return this.#e.size>this.#s?void this.#e.clear():this.#e.get(e)}setItem(e,t){this.#e.set(e,t)}removeItem(e){this.#e.delete(e)}};let u=new Set(["error","warn","info","debug","trace"]),c={samplingRate:1,maxBufferSize:5,endpoint:"https://clerk-telemetry.com"};var d=class{#o;#a;#l={};#u=[];#c=null;constructor(e){this.#o={maxBufferSize:e.maxBufferSize??c.maxBufferSize,samplingRate:e.samplingRate??c.samplingRate,perEventSampling:e.perEventSampling??!0,disabled:e.disabled??!1,debug:e.debug??!1,endpoint:c.endpoint},e.clerkVersion||"undefined"!=typeof window?this.#l.clerkVersion=e.clerkVersion??"":this.#l.clerkVersion="",this.#l.sdk=e.sdk,this.#l.sdkVersion=e.sdkVersion,this.#l.publishableKey=e.publishableKey??"";let t=(0,n.q5)(e.publishableKey);t&&(this.#l.instanceType=t.instanceType),e.secretKey&&(this.#l.secretKey=e.secretKey.substring(0,16)),this.#a=new o(a.isSupported()?new a:new l)}get isEnabled(){return!("development"!==this.#l.instanceType||this.#o.disabled||void 0!==s&&s.env&&(0,i.zz)(s.env.CLERK_TELEMETRY_DISABLED)||"undefined"!=typeof window&&window?.navigator?.webdriver)}get isDebug(){return this.#o.debug||void 0!==s&&s.env&&(0,i.zz)(s.env.CLERK_TELEMETRY_DEBUG)}record(e){try{let t=this.#d(e.event,e.payload);if(this.#h(t.event,t),!this.#p(t,e.eventSamplingRate))return;this.#u.push({kind:"event",value:t}),this.#f()}catch(e){console.error("[clerk/telemetry] Error recording telemetry event",e)}}recordLog(e){try{if(!this.#g(e))return;let t="string"==typeof e?.level&&u.has(e.level),r="string"==typeof e?.message&&e.message.trim().length>0,n=null,i=e?.timestamp;if("number"==typeof i||"string"==typeof i){let e=new Date(i);Number.isNaN(e.getTime())||(n=e)}if(!t||!r||null===n){this.isDebug&&"undefined"!=typeof console&&console.warn("[clerk/telemetry] Dropping invalid telemetry log entry",{levelIsValid:t,messageIsValid:r,timestampIsValid:null!==n});return}let s=this.#v(),o={sdk:s.name,sdkv:s.version,cv:this.#l.clerkVersion??"",lvl:e.level,msg:e.message,ts:n.toISOString(),pk:this.#l.publishableKey||null,payload:this.#_(e.context)};this.#u.push({kind:"log",value:o}),this.#f()}catch(e){console.error("[clerk/telemetry] Error recording telemetry log entry",e)}}#p(e,t){return this.isEnabled&&!this.isDebug&&this.#m(e,t)}#g(e){return!0}#m(e,t){let r=Math.random();return!!(r<=this.#o.samplingRate&&(!1===this.#o.perEventSampling||void 0===t||r<=t))&&!this.#a.isEventThrottled(e)}
vendor: 1,084 bytes, line 194
194#f(){if("undefined"==typeof window)return void this.#y();if(this.#u.length>=this.#o.maxBufferSize){this.#c&&("undefined"!=typeof cancelIdleCallback?cancelIdleCallback(Number(this.#c)):clearTimeout(Number(this.#c))),this.#y();return}this.#c||("requestIdleCallback"in window?this.#c=requestIdleCallback(()=>{this.#y(),this.#c=null}):this.#c=setTimeout(()=>{this.#y(),this.#c=null},0))}#y(){let e=[...this.#u];if(this.#u=[],this.#c=null,0===e.length)return;let t=e.filter(e=>"event"===e.kind).map(e=>e.value),r=e.filter(e=>"log"===e.kind).map(e=>e.value);t.length>0&&fetch(new URL("/v1/event",this.#o.endpoint),{headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",body:JSON.stringify({events:t})}).catch(()=>void 0),r.length>0&&fetch(new URL("/v1/logs",this.#o.endpoint),{headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",body:JSON.stringify({logs:r})}).catch(()=>void 0)}#h(e,t){this.isDebug&&(void 0!==console.groupCollapsed?(console.groupCollapsed("[clerk/telemetry]",e),console.log(t),console.groupEnd()):console.log("[clerk/telemetry]",e,t))}
194#v(){let e={name:this.#l.sdk,version:this.#l.sdkVersion};if("undefined"!=typeof window){let t=window;if(t.Clerk){let r=t.Clerk;if("object"==typeof r&&null!==r&&"constructor"in r&&"function"==typeof r.constructor&&r.constructor.sdkMetadata){let{name:t,version:n}=r.constructor.sdkMetadata;void 0!==t&&(e.name=t),void 0!==n&&(e.version=n)}}}return e}#d(e,t){let r=this.#v();return{event:e,cv:this.#l.clerkVersion??"",it:this.#l.instanceType??"",sdk:r.name,sdkv:r.version,...this.#l.publishableKey?{pk:this.#l.publishableKey}:{},...this.#l.secretKey?{sk:this.#l.secretKey}:{},payload:t}}#_(e){if(null==e||"object"!=typeof e)return null;try{let t=JSON.parse(JSON.stringify(e));if(t&&"object"==typeof t&&!Array.isArray(t))return t;return null}catch{return null}}};function h(e,t){return{event:"METHOD_CALLED",eventSamplingRate:.1,payload:{method:e,...t}}}function p(e){return{event:"FRAMEWORK_METADATA",eventSamplingRate:.1,payload:e}}},7476:(e,t,r)=>{"use strict";r.d(t,{io:()=>s});var n=r(3364);let i=new Set,s=(e,t,r)=>{let s=(0,n.MC)()||(0,n.Fj)(),o=r??e;i.has(o)||s||(i.add(o),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.
195${t}`))}},7574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HeadersAdapter:function(){return s},ReadonlyHeadersError:function(){return i}});let n=r(8845);class i extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new i}}class s extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,i){if("symbol"==typeof r)return n.ReflectAdapter.get(t,r,i);let s=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===s);if(void 0!==o)return n.ReflectAdapter.get(t,o,i)},set(t,r,i,s){if("symbol"==typeof r)return n.ReflectAdapter.set(t,r,i,s);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);return n.ReflectAdapter.set(t,a??r,i,s)},has(t,r){if("symbol"==typeof r)return n.ReflectAdapter.has(t,r);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0!==s&&n.ReflectAdapter.has(t,s)},deleteProperty(t,r){if("symbol"==typeof r)return n.ReflectAdapter.deleteProperty(t,r);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===s||n.ReflectAdapter.deleteProperty(t,s)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return i.callable;default:return n.ReflectAdapter.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new s(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}},7778:(e,t)=>{"use strict";function r(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isHangingPromiseRejectionError:function(){return r},makeDevtoolsIOAwarePromise:function(){return l},makeHangingPromise:function(){return o}});let n="HANGING_PROMISE_REJECTION";class i extends Error{constructor(e,t){super(`During prerendering, ${t} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${t} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${e}".`),this.route=e,this.expression=t,this.digest=n}}let s=new WeakMap;function o(e,t,r){if(e.aborted)return Promise.reject(new i(t,r));{let n=new Promise((n,o)=>{let a=o.bind(null,new i(t,r)),l=s.get(e);if(l)l.push(a);else{let t=[a];s.set(e,t),e.addEventListener("abort",()=>{for(let e=0;e<t.length;e++)t[e]()},{once:!0})}});return n.catch(a),n}}function a(){}function l(e){return new Promise(t=>{setTimeout(()=>{t(e)},0)})}},7916:(e,t,r)=>{"use strict";
195Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"afterTaskAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(8861).createAsyncLocalStorage)()},7990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(3551)},8064:(e,t,r)=>{"use strict";r.d(t,{M2:()=>n.M2,MR:()=>n.MR});var n=r(1515)},8084:(e,t,r)=>{"use strict";function n(){return"undefined"!=typeof window}r.d(t,{M:()=>n}),RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i")},8456:(e,t,r)=>{"use strict";r.d(t,{lJ:()=>N,iB:()=>z,Bl:()=>W});var n=r(3661),i=r(1462),s=r(7005),o=r(8084);let a=new Set,l={warnOnce:e=>{a.has(e)||(a.add(e),console.warn(e))},logOnce:e=>{a.has(e)||(console.log(e),a.add(e))}};var u=r(2657),c=r.n(u),d=r(3987),h=r(2721);let p="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,f=i.createContext(void 0);f.displayName="ClerkNextOptionsCtx";let g=()=>{let e=i.useContext(f);return null==e?void 0:e.value},v=e=>{let{children:t,options:r}=e;return i.createElement(f.Provider,{value:{value:r}},t)};var _=r(3516),m=r(1594),y=r.n(m);function b(e){let{publishableKey:t,clerkJSUrl:r,clerkJSVersion:n,clerkJSVariant:o,nonce:a}=g(),{domain:l,proxyUrl:u}=(0,s.ho)();if(!t)return null;let c={domain:l,proxyUrl:u,publishableKey:t,clerkJSUrl:r,clerkJSVersion:n,clerkJSVariant:o,nonce:a},d=(0,_.nO)(c),h="app"===e.router?"script":y();return i.createElement(h,{src:d,"data-clerk-js-script":!0,async:!0,defer:"pages"!==e.router&&void 0,crossOrigin:"anonymous",strategy:"pages"===e.router?"beforeInteractive":void 0,...(0,_.T5)(c)})}var w=r(431),E=r(4479),k=r(4935),S=r(7351);let P=e=>{var t;return{...e,publishableKey:e.publishableKey||"pk_live_Y2xlcmsuaXRzcmF3LmFpJA",clerkJSUrl:e.clerkJSUrl||S.env.NEXT_PUBLIC_CLERK_JS_URL,clerkJSVersion:e.clerkJSVersion||S.env.NEXT_PUBLIC_CLERK_JS_VERSION,proxyUrl:e.proxyUrl||S.env.NEXT_PUBLIC_CLERK_PROXY_URL||"",domain:e.domain||S.env.NEXT_PUBLIC_CLERK_DOMAIN||"",isSatellite:e.isSatellite||(0,E.zz)(S.env.NEXT_PUBLIC_CLERK_IS_SATELLITE),signInUrl:e.signInUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL||"",signUpUrl:e.signUpUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL||"",signInForceRedirectUrl:e.signInForceRedirectUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL||"",signUpForceRedirectUrl:e.signUpForceRedirectUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL||"",signInFallbackRedirectUrl:e.signInFallbackRedirectUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL||"",signUpFallbackRedirectUrl:e.signUpFallbackRedirectUrl||S.env.NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL||"",afterSignInUrl:e.afterSignInUrl||S.env.NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL||"",afterSignUpUrl:e.afterSignUpUrl||S.env.NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL||"",newSubscriptionRedirectUrl:e.newSubscriptionRedirectUrl||S.env.NEXT_PUBLIC_CLERK_CHECKOUT_CONTINUE_URL||"",telemetry:null!=(t=e.telemetry)?t:{disabled:(0,E.zz)(S.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),debug:(0,E.zz)(S.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG)},sdkMetadata:k.tm}};var x=r(2714);let R=()=>{var e,t;let r=(0,s.ho)(),{pagesRouter:i}={pagesRouter:(0,n.useRouter)()};return null==(t=r.telemetry)||t.record((0,x.YF)({router:i?"pages":"app",...(null==(e=null==globalThis?void 0:globalThis.next)?void 0:e.version)?{nextjsVersion:globalThis.next.version}:{}})),null};var O=r(6763),C=r(5819),T=r(4161);async function j(){(await (0,T.cookies)()).delete(`__clerk_invalidate_cache_cookie_${Date.now()}`)}let I=e=>{var t;return null!=window.__clerk_internal_navigations||(window.__clerk_internal_navigations={}),null!=(t=window.__clerk_internal_navigations)[e]||(t[e]={}),window.__clerk_internal_navigations[e]},A=e=>{let{windowNav:t,routerNav:r,name:n}=e,s=(0,d.usePathname)(),[o,a]=(0,i.useTransition)();t&&(I(n).fun=(e,i)=>new Promise(s=>{var o,l;null!=(o=I(n)).promisesBuffer||(o.promisesBuffer=[]),null==(l=I(n).promisesBuffer)||l.push(s),a(()=>{var n,s,o,a;(null==(n=null==i?void 0:i.__internal_metadata)?void 0:n.navigationType)==="internal"?t((null!=(o=null==(s=window.next)?void 0:s.version)?o:"")<"14.1.0"?history.state:null,"",e):r(a=e)})}));let l=()=>{var e;
195null==(e=I(n).promisesBuffer)||e.forEach(e=>e()),I(n).promisesBuffer=[]};return(0,i.useEffect)(()=>(l(),l),[]),(0,i.useEffect)(()=>{o||l()},[s,o]),(0,i.useCallback)((e,t)=>I(n).fun(e,t),[])},M=c()(()=>r.e(306).then(r.bind(r,1306)).then(e=>e.KeylessCreatorOrReader)),L=e=>{if(O.M0){let e=`Clerk:
196Your current Next.js version (${h.version}) will be deprecated in the next major release of "@clerk/nextjs". Please upgrade to [email protected] or later.`;(0,o.M)()?l.warnOnce(e):l.logOnce(`
197\x1b[43m----------
198${e}
199----------\x1b[0m
200`)}let{__unstable_invokeMiddlewareOnAuthStateChange:t=!0,children:r}=e,n=(0,d.useRouter)(),a=(()=>{let e=(0,d.useRouter)();return A({windowNav:"undefined"!=typeof window?window.history.pushState.bind(window.history):void 0,routerNav:e.push.bind(e),name:"push"})})(),u=(()=>{let e=(0,d.useRouter)();return A({windowNav:"undefined"!=typeof window?window.history.replaceState.bind(window.history):void 0,routerNav:e.replace.bind(e),name:"replace"})})(),[c,f]=(0,i.useTransition)();if(p(()=>{w.I&&(0,C.AZ)()},[]),g())return e.children;(0,i.useEffect)(()=>{var e;c||null==(e=window.__clerk_internal_invalidateCachePromise)||e.call(window)},[c]),p(()=>{window.__unstable__onBeforeSetActive=e=>new Promise(t=>{var r;window.__clerk_internal_invalidateCachePromise=t;let i=(null==(r=null==window?void 0:window.next)?void 0:r.version)||"";i.startsWith("13")?f(()=>{n.refresh()}):(i.startsWith("15")||i.startsWith("16"))&&"sign-out"===e?t():j().then(()=>t())}),window.__unstable__onAfterSetActive=()=>{if(t)return n.refresh()}},[]);let _=P({...e,routerPush:a,routerReplace:u});return i.createElement(v,{options:_},i.createElement(s.lJ,{..._},i.createElement(R,null),i.createElement(b,{router:"app"}),r))},F=e=>{let{children:t,disableKeyless:r=!1,...n}=e;return P(n).publishableKey||!w.I||r?i.createElement(L,{...n},t):i.createElement(M,null,i.createElement(L,{...n},t))};var U=r(6996);let $=()=>{if("undefined"==typeof window)return;let e=e=>{Object.keys(e).forEach(t=>{delete e[t]})};try{e(window.next.router.sdc),e(window.next.router.sbc)}catch{return}};function D({children:e,...t}){var r;let{__unstable_invokeMiddlewareOnAuthStateChange:n=!0}=t,{push:o,replace:a}=(0,U.useRouter)();s.lJ.displayName="ReactClerkProvider",p(()=>{window.__unstable__onBeforeSetActive=$},[]),p(()=>{window.__unstable__onAfterSetActive=()=>{n&&o(window.location.href)}},[]);let l=P({...t,routerPush:e=>o(e),routerReplace:e=>a(e)}),u=(null==(r=t.authServerSideProps)?void 0:r.__clerk_ssr_state)||t.__clerk_ssr_state;return i.createElement(v,{options:l},i.createElement(s.lJ,{...l,initialState:u},i.createElement(R,null),i.createElement(b,{router:"pages"}),e))}(0,_.wV)({packageName:"@clerk/nextjs"}),(0,_.kX)("@clerk/nextjs");let N=function(e){let t=(0,n.useRouter)();return i.createElement(t?D:F,{...e})},z=s.iB,W=s.Bl;s.EH},8487:(e,t,r)=>{"use strict";Object.defineProperty(t,"cookies",{enumerable:!0,get:function(){return p}});let n=r(8739),i=r(3214),s=r(7990),o=r(3185),a=r(9603),l=r(512),u=r(7778),c=r(854),d=r(2717),h=r(4662);function p(){let e="cookies",t=s.workAsyncStorage.getStore(),r=o.workUnitAsyncStorage.getStore();if(t){if(r&&"after"===r.phase&&!(0,d.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${t.route} used "cookies" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "cookies" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E88",enumerable:!1,configurable:!0});if(t.forceStatic)return g(n.RequestCookiesAdapter.seal(new i.RequestCookies(new Headers({}))));if(t.dynamicShouldError)throw Object.defineProperty(new l.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E549",enumerable:!1,configurable:!0});if(r)switch(r.type){case"cache":let s=Object.defineProperty(Error(`Route ${t.route} used "cookies" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E398",enumerable:!1,
200configurable:!0});throw Error.captureStackTrace(s,p),t.invalidDynamicUsageError??=s,s;case"unstable-cache":throw Object.defineProperty(Error(`Route ${t.route} used "cookies" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E157",enumerable:!1,configurable:!0});case"prerender":var c=t,v=r;let o=f.get(v);if(o)return o;let _=(0,u.makeHangingPromise)(v.renderSignal,c.route,"`cookies()`");return f.set(v,_),_;case"prerender-client":let m="`cookies`";throw Object.defineProperty(new h.InvariantError(`${m} must not be used within a client component. Next.js should be preventing ${m} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E693",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,a.postponeWithTracking)(t.route,e,r.dynamicTracking);case"prerender-legacy":return(0,a.throwToInterruptStaticGeneration)(e,t,r);case"prerender-runtime":return(0,a.delayUntilRuntimeStage)(r,function(e){let t=f.get(e);if(t)return t;let r=Promise.resolve(e);return f.set(e,r),r}(r.cookies));case"private-cache":return g(r.cookies);case"request":return(0,a.trackDynamicDataInDynamicRender)(r),g((0,n.areCookiesMutableInCurrentPhase)(r)?r.userspaceMutableCookies:r.cookies)}}(0,o.throwForMissingRequestStore)(e)}r(8845);let f=new WeakMap;function g(e){let t=f.get(e);if(t)return t;let r=Promise.resolve(e);return f.set(e,r),Object.defineProperties(r,{[Symbol.iterator]:{value:e[Symbol.iterator]?e[Symbol.iterator].bind(e):v.bind(e)},size:{get:()=>e.size},get:{value:e.get.bind(e)},getAll:{value:e.getAll.bind(e)},has:{value:e.has.bind(e)},set:{value:e.set.bind(e)},delete:{value:e.delete.bind(e)},clear:{value:"function"==typeof e.clear?e.clear.bind(e):_.bind(e,r)},toString:{value:e.toString.bind(e)}}),r}function v(){return this.getAll().map(e=>[e.name,e]).values()}function _(e){for(let e of this.getAll())this.delete(e.name);return e}(0,c.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`cookies()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E223",enumerable:!1,configurable:!0})})},8684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return n},isDynamicServerError:function(){return i}});let r="DYNAMIC_SERVER_USAGE";class n extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{MutableRequestCookiesAdapter:function(){return d},ReadonlyRequestCookiesError:function(){return o},RequestCookiesAdapter:function(){return a},appendMutableCookies:function(){return c},areCookiesMutableInCurrentPhase:function(){return p},createCookiesWithMutableAccessCheck:function(){return h},getModifiedCookieValues:function(){return u},responseCookiesToRequestCookies:function(){return g}});let n=r(3214),i=r(8845),s=r(7990);class o extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new o}}class a{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return o.callable;default:return i.ReflectAdapter.get(e,t,r)}}})}}let l=Symbol.for("next.mutated.cookies");function u(e){let t=e[l];return t&&Array.isArray(t)&&0!==t.length?t:[]}function c(e,t){let r=u(t);if(0===r.length)return!1;let i=new n.ResponseCookies(e),s=i.getAll();for(let e of r)i.set(e);for(let e of s)i.set(e);return!0}class d{static wrap(e,t){let r=new n.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let o=[],a=new Set,u=()=>{let e=s.workAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),o=r.getAll().filter(e=>a.has(e.name)),t){let e=[];for(let t of o){let r=new n.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}},c=new Proxy(r,{get(e,t,r){switch(t){case l:return o;
200case"delete":return function(...t){a.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.delete(...t),c}finally{u()}};case"set":return function(...t){a.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t),c}finally{u()}};default:return i.ReflectAdapter.get(e,t,r)}}});return c}}function h(e){let t=new Proxy(e.mutableCookies,{get(r,n,s){switch(n){case"delete":return function(...n){return f(e,"cookies().delete"),r.delete(...n),t};case"set":return function(...n){return f(e,"cookies().set"),r.set(...n),t};default:return i.ReflectAdapter.get(r,n,s)}}});return t}function p(e){return"action"===e.phase}function f(e,t){if(!p(e))throw new o}function g(e){let t=new n.RequestCookies(new Headers);for(let r of e.getAll())t.set(r);return t}},8845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return r}});class r{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},8861:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return s},createSnapshot:function(){return a}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let i="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function s(){return i?new i:new n}function o(e){return i?i.bind(e):n.bind(e)}function a(){return i?i.snapshot():function(e,...t){return e(...t)}}},8900:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>sG});var n,i=r(3798);r(1393);var s=r(4004),o=r(9652),a=r.n(o),l="undefined"!=typeof window?window:void 0,u="undefined"!=typeof globalThis?globalThis:l;"undefined"==typeof self&&(u.self=u),"undefined"==typeof File&&(u.File=function(){});var c=null==u?void 0:u.navigator,d=null==u?void 0:u.document,h=null==u?void 0:u.location,p=null==u?void 0:u.fetch,f=null!=u&&u.XMLHttpRequest&&"withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:void 0,g=null==u?void 0:u.AbortController,v=null==u?void 0:u.CompressionStream,_=null==c?void 0:c.userAgent,m=null!=l?l:{},y="1.367.0",b={DEBUG:!1,LIB_VERSION:y,LIB_NAME:"web",JS_SDK_VERSION:y};function w(e,t,r,n,i,s,o){try{var a=e[s](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,i)}function E(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function o(e){w(s,n,i,o,a,"next",e)}function a(e){w(s,n,i,o,a,"throw",e)}o(void 0)})}}function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function S(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function P(){return(P=E(function*(e,t){void 0===t&&(t=!0);try{var r=new Blob([e],{type:"text/plain"}).stream().pipeThrough(new CompressionStream("gzip"));return yield new Response(r).blob()}catch(e){return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var x=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],R=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hub
200spot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],O=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var r=e.toLowerCase();return R.concat(t).some(e=>{var t=e.toLowerCase();return -1!==r.indexOf(t)})};function C(e,t){return -1!==e.indexOf(t)}var T=function(e){return e.trim()},j=function(e){return e.replace(/^\$/,"")},I=Object.prototype,A=I.hasOwnProperty,M=I.toString,L=Array.isArray||function(e){return"[object Array]"===M.call(e)},F=e=>"function"==typeof e,U=e=>e===Object(e)&&!L(e),$=e=>{if(U(e)){for(var t in e)if(A.call(e,t))return!1;return!0}return!1},D=e=>void 0===e,N=e=>"[object String]"==M.call(e),z=e=>N(e)&&0===e.trim().length,W=e=>D(e)||null===e,B=e=>"[object Number]"==M.call(e)&&e==e,H=e=>B(e)&&e>0,K=e=>"[object Boolean]"===M.call(e),q=e=>C(x,e);function V(e){return null===e||"object"!=typeof e}function G(e,t){return({}).toString.call(e)==="[object "+t+"]"}function X(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var Y=[!0,"true",1,"1","yes"],J=e=>C(Y,e),Q=[!1,"false",0,"0","no"];function Z(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),B(e)?e>r?(n.warn(" cannot be  greater than max: "+r+". Using max value instead."),r):t>e?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+i),Z(i||r,t,r,n))}class ee{constructor(e){this.Pt={},this.Dt=e.Dt,this.jt=Z(e.bucketSize,0,100,e.qt),this.$t=Z(e.refillRate,0,this.jt,e.qt),this.Ht=Z(e.refillInterval,0,864e5,e.qt)}Vt(e,t){var r=Math.floor((t-e.lastAccess)/this.Ht);r>0&&(e.tokens=Math.min(e.tokens+r*this.$t,this.jt),e.lastAccess=e.lastAccess+r*this.Ht)}consumeRateLimit(e){var t,r=Date.now(),n=String(e),i=this.Pt[n];return i?this.Vt(i,r):this.Pt[n]=i={tokens:this.jt,lastAccess:r},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this.Dt)||t.call(this,e)),0===i.tokens)}stop(){this.Pt={}}}var et,er,en,ei="Mobile",es="Android",eo="Tablet",ea=es+" "+eo,el="iPad",eu="Apple",ec=eu+" Watch",ed="Safari",eh="BlackBerry",ep="Samsung",ef=ep+"Browser",eg=ep+" Internet",ev="Chrome",e_=ev+" OS",em=ev+" iOS",ey="Internet Explorer",eb=ey+" "+ei,ew="Opera",eE=ew+" Mini",ek="Edge",eS="Microsoft "+ek,eP="Firefox",ex=eP+" iOS",eR="Nintendo",eO="PlayStation",eC="Xbox",eT=es+" "+ei,ej=ei+" "+ed,eI="Windows",eA=eI+" Phone",eM="Nokia",eL="Ouya",eF="Generic",eU=eF+" "+ei.toLowerCase(),e$=eF+" "+eo.toLowerCase(),eD="Konqueror",eN="(\\d+(\\.\\d+)?)",ez=RegExp("Version/"+eN),eW=Reg
200Exp(eC,"i"),eB=RegExp(eO+" \\w+","i"),eH=RegExp(eR+" \\w+","i"),eK=RegExp(eh+"|PlayBook|BB10","i"),eq={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},eV=function(e,t){var r;return t=t||"",C(e," OPR/")&&C(e,"Mini")?eE:C(e," OPR/")?ew:eK.test(e)?eh:C(e,"IE"+ei)||C(e,"WPDesktop")?eb:C(e,ef)?eg:C(e,ek)||C(e,"Edg/")?eS:C(e,"FBIOS")?"Facebook "+ei:C(e,"UCWEB")||C(e,"UCBrowser")?"UC Browser":C(e,"CriOS")?em:C(e,"CrMo")||C(e,ev)?ev:C(e,es)&&C(e,ed)?eT:C(e,"FxiOS")?ex:C(e.toLowerCase(),eD.toLowerCase())?eD:(r=t)&&C(r,eu)||C(e,ed)&&!C(e,ev)&&!C(e,es)?C(e,ei)?ej:ed:C(e,eP)?eP:C(e,"MSIE")||C(e,"Trident/")?ey:C(e,"Gecko")?eP:""},eG={[eb]:[RegExp("rv:"+eN)],[eS]:[RegExp(ek+"?\\/"+eN)],[ev]:[RegExp("("+ev+"|CrMo)\\/"+eN)],[em]:[RegExp("CriOS\\/"+eN)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+eN)],[ed]:[ez],[ej]:[ez],[ew]:[RegExp("(Opera|OPR)\\/"+eN)],[eP]:[RegExp(eP+"\\/"+eN)],[ex]:[RegExp("FxiOS\\/"+eN)],[eD]:[RegExp("Konqueror[:/]?"+eN,"i")],[eh]:[RegExp(eh+" "+eN),ez],[eT]:[RegExp("android\\s"+eN,"i")],[eg]:[RegExp(ef+"\\/"+eN)],[ey]:[RegExp("(rv:|MSIE )"+eN)],Mozilla:[RegExp("rv:"+eN)]},eX=function(e,t){var r=eG[eV(e,t)];if(D(r))return null;for(var n=0;r.length>n;n++){var i=e.match(r[n]);if(i)return parseFloat(i[i.length-2])}return null},eY=[[RegExp(eC+"; "+eC+" (.*?)[);]","i"),e=>[eC,e&&e[1]||""]],[RegExp(eR,"i"),[eR,""]],[RegExp(eO,"i"),[eO,""]],[eK,[eh,""]],[RegExp(eI,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eA,""];if(new RegExp(ei).test(t)&&!/IEMobile\b/.test(t))return[eI+" "+ei,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var n=eq[r[1]]||"";return/arm/i.test(t)&&(n="RT"),[eI,n]}return[eI,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=D(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+es+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+es+")","i"),e=>e&&e[2]?[es,[e[2],e[3],e[4]||"0"].join(".")]:[es,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[e_,""]],[/Linux|debian/i,["Linux",""]]],eJ=function(e){return eH.test(e)?eR:eB.test(e)?eO:eW.test(e)?eC:RegExp(eL,"i").test(e)?eL:RegExp("("+eA+"|WPDesktop)","i").test(e)?eA:/iPad/.test(e)?el:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ec:eK.test(e)?eh:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eM,"i").test(e)?eM:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(ei).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?es:ea:RegExp("(pda|"+ei+")","i").test(e)?eU:RegExp(eo,"i").test(e)&&!RegExp(eo+" pc","i").test(e)?e$:""},eQ=e=>e instanceof Error;class eZ{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),i=this.buildParsingContext(t),s=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(s,r),$exception_level:"error"}}modifyFrames(e){var t=this;return E(function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&L(r.stacktrace.frames)&&(r.stacktrace.frames=yield t.applyModifiers(r.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r,n;return null!=e.cause&&(r=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(n=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),k({},e,{cause:r,stack:n})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return E(function*(){var r=e;for(var n of t.modifiers)r=yield n(r);return r})()}convertToExceptionList(e,t){var r,n,i,s={type:e.type,value:e.value,mechanism:{type:null!=(r=t.type)?r:"generic",handled:null==(n=t.handled)||n,synthetic:null!=(i=e.synthetic)&&i}};e.stack&&(s.stacktrace={type:"raw",frames:e.stack});var o=[s];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,k({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return en&&r.length===er||(er=r.length,en=r.reduce((r,n)=>{et||(et={});var i=et[n];if(i)r[i[0]]=i[1];else for(var s=e(n),o=s.length-1;o>=0;o--){var a=s[o],l=null==a?void 0:a.filename,u=t[n];if(l&&u){r[l]=u,et[n]=[l,u];break}}return r},{})),en}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,r){void 0===r&&(r=0);var n=(r,n)=>{if(4>=n){var i=this.buildCoercingContext(e,t,n);return this.applyCoercers(r,i)}};return k({},t,{syntheticException:0==r?t.syntheticException:void 0,mechanism:e,apply:e=>n(e,r),next:e=>n(e,r+1)})}}function e0(e,t,r,n,i){var s={platform:e,filename:t,function:"<anonymous>
200"===r?"?":r,in_app:!0};return D(n)||(s.lineno=n),D(i)||(s.colno=i),s}var e1=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:"?",r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},e2=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,e3=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,e5=/\((\S*)(?::(\d+))(?::(\d+))\)/,e4=(e,t)=>{var r=e2.exec(e);if(r){var[,n,i,s]=r;return e0(t,n,"?",+i,+s)}var o=e3.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=e5.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=e1(o[1]||"?",o[2]);return e0(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},e6=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,e7=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,e8=(e,t)=>{var r=e6.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=e7.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var i=r[3],s=r[1]||"?";return[s,i]=e1(s,i),e0(t,i,s,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},e9=/\(error: (.*)\)/;class te{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=N(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return G(e,"DOMException")}isDOMError(e){return G(e,"DOMError")}}class tt{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return String(r.error&&"string"==typeof r.error.message?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}}class tr{constructor(){}match(e){return G(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var r;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}var tn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ti{match(e){return"string"==typeof e}coerce(e,t){var r,[n,i]=this.getInfos(e);return{type:null!=n?n:"Error",value:null!=i?i:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,n=e.match(tn);return n&&(t=n[1],r=n[2]),[t,r]}}var ts=["fatal","error","warning","log","info","debug"];function to(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(t>=i.length)return n===r.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class ta{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null==(r=t.syntheticException)?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return X(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+to(e)}isSeverityLevel(e){return N(e)&&!z(e)&&ts.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var r=e[t];if(eQ(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tl{match(e){return X(e)}coerce(e,t){var r,n=e.constructor.name;return{type:n,value:n+" captured as exception with keys: "+to(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class tu{match(e){return V(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class tc{match(e){return G(e,"PromiseRejectionEvent")||this.isCu
200stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!X(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var r,n=this.getUnhandledRejectionReason(e);return V(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var td=function(e,t){var{debugEnabled:r}=void 0===t?{}:t,n={C(t){if(l&&(b.DEBUG||m.POSTHOG_DEBUG||r)&&!D(l.console)&&l.console){for(var n=("__rrweb_original__"in l.console[t])?l.console[t].__rrweb_original__:l.console[t],i=arguments.length,s=Array(i>1?i-1:0),o=1;i>o;o++)s[o-1]=arguments[o];n(e,...s)}},info(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];n.C("log",...t)},warn(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];n.C("warn",...t)},error(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];n.C("error",...t)},critical(){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(t,r)=>td(e+" "+t,r)};return n},th=td("[PostHog.js]"),tp=th.createLogger,tf=tp("[ExternalScriptsLoader]"),tg=(e,t,r)=>{if(e.config.disable_external_dependency_loading)return tf.warn(t+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=null==d?void 0:d.querySelectorAll("script");if(n){for(var i,s=0;n.length>s;s++)if(i=function(){if(n[s].src===t){var e=n[s];return e.__posthog_loading_callback_fired?{v:r()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,r(void 0,t)}),e.onerror=e=>r(e),{v:void 0})}}())return i.v}var o=()=>{if(!d)return r("document not found");var n=d.createElement("script");if(n.type="text/javascript",n.crossOrigin="anonymous",n.src=t,n.onload=e=>{n.__posthog_loading_callback_fired=!0,r(void 0,e)},n.onerror=e=>r(e),e.config.prepare_external_dependency_script&&(n=e.config.prepare_external_dependency_script(n)),!n)return r("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)d.head.appendChild(n);else{var i,s=d.querySelectorAll("body > script");s.length>0?null==(i=s[0].parentNode)||i.insertBefore(n,s[0]):d.body.appendChild(n)}};null!=d&&d.body?o():null==d||d.addEventListener("DOMContentLoaded",o)};m.__PosthogExtensions__=m.__PosthogExtensions__||{},m.__PosthogExtensions__.loadExternalDependency=(e,t,r)=>{if("remote-config"!==t)if(e._resolvedSdkVersion){var n=e.requestRouter.endpointFor("assets","/static/"+e._resolvedSdkVersion+"/"+t+".js");tg(e,n,r)}else{var i="/static/"+t+".js?v="+e.version;"toolbar"===t&&(i=i+"&t="+3e5*Math.floor(Date.now()/3e5));var s=e.requestRouter.endpointFor("assets",i);tg(e,s,r)}else{var o=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");tg(e,o,r)}},m.__PosthogExtensions__.loadSiteApp=(e,t,r)=>{var n=e.requestRouter.endpointFor("api",t);tg(e,n,r)};var tv="$people_distinct_id",t_="$device_id",tm="__alias",ty="__timers",tb="$autocapture_disabled_server_side",tw="$heatmaps_enabled_server_side",tE="$exception_capture_enabled_server_side",tk="$error_tracking_suppression_rules",tS="$error_tracking_capture_extension_exceptions",tP="$web_vitals_enabled_server_side",tx="$dead_clicks_enabled_server_side",tR="$product_tours_enabled_server_side",tO="$web_vitals_allowed_metrics",tC="$session_recording_remote_config",tT="$sesid",tj="$session_is_sampled",tI="$enabled_feature_flags",tA="$early_access_features",tM="$feature_flag_details",tL="$stored_person_properties",tF="$stored_group_properties",tU="$surveys",t$="$flag_call_reported",tD="$flag_call_reported_session_id",tN="$feature_flag_errors",tz="$feature_flag_evaluated_at",tW="$user_state",tB="$client_session_props",tH="$capture_rate_limit",tK="$initial_campaign_params",tq="$initial_referrer_info",tV="$initial_person_info",tG="$epp",tX="__POSTHOG_TOOLBAR__",tY="$posthog_cookieless",tJ=[tv,tm,"__cmpns",ty,"$session_recording_enabled_server_side",tw,tT,tI,tk,tW,tA,tM,tF,tL,tU,t$,tD,tN,tz,tB,tH,tK,tq,tG,tV],tQ="PostHog loadExternalDependency extension not found.",tZ="on_reject",t0="always",t1="anonymous",t2="identified",t3="identified_only",t5="visibilitychange",t4="beforeunload",t6="$pageview",t7="$pageleave",t8="$identify",t9="$groupidentify";function re(e,t){L(e)&&e.forEach(t)}function rt(e,t){if(!W(e))if(L(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,r)=>t(e,r));else for(var r in e)A.call(e,r)&&t(e[r],r)}var rr=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];for(var i of r)for(var s in i)void 0!==i[s]&&(e[s]=i[s]);return e};function rn(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}var ri=function(e){try{return e()}catch(e){return}},rs=function(e){return function(){try{for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];return e.apply(this,r)}catch(e){th.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),th.critical(e)}}},ro=function(e){var t={};return rt(e,function(e,r){(N(e)&&e.length>0||B(e))&&(t[r]=e)}),t},ra=["herokuapp.com","vercel.app","netlify.app"];function rl(e,t,r,n){var{capture:i=!1,passive:s=!0}=null!=n?n:{};null==e||e.addEventListener(t,r,{capture:i,passive:s})}function ru(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return B(e)&&isFinite(e)&&Math.floor(e)===e});class rc{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||0>e||0>t||0>r||0>n||e>0xffffffffffff||t>4095||r>0x3fffffff||n>0xffffffff)throw RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/0x10000000000,i[1]=e/0x100000000,i[2]=e/0x1000000,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new rc(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new rc(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class rd{constructor(){this.I=0,this.S=0,this.k=new rf}generate(){var e=this.generateOrAbort();if(D(e)){this.I=0;var t=this.generateOrAbort();if(D(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.I)this.I=e,this.A();else{if(this.I>=e+1e4)return;this.S++,this.S>0x3ffffffffff&&(this.I++,this.A())}return rc.fromFieldsV7(this.I,Math.trunc(this.S/0x40000000),0x3fffffff&this.S,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var rh,rp=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};l&&!D(l.crypto)&&crypto.getRandomValues&&(rp=e=>crypto.getRandomValues(e));class rf{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(rp(this.T),this.N=0),this.T[this.N++]}}var rg=()=>rv().toString(),rv=()=>(rh||(rh=new rd)).generate(),r_="",rm=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,ry={Yt:()=>!!d,Ut(e){th.error("cookieStore error: "+e)},Wt(e){if(d){try{for(var t=e+"=",r=d.cookie.split(";").filter(e=>e.length),n=0;r.length>n;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},Gt(e){var t;try{t=JSON.parse(ry.Wt(e))||{}}catch(e){}return t},Xt(e,t,r,n,i){if(d)try{var s="",o="",a=function(e,t){if(t){var r=function(e,t){if(void 0===t&&(t=d),r_)return r_;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var r=e.split("."),n=Math.min(r.length,8),i="dmn_chk_"+rg();!r_&&n--;){var s=r.slice(n).join("."),o=i+"=1;domain=."+s+";path=/";t.cookie=o+";max-age=3",t.cookie.includes(i)&&(t.cookie=o+";max-age=0",r_=s)}return r_}(e);if(!r){var n,i=(n=e.match(rm))?n[0]:"";i!==r&&th.info("Warning: cookie subdomain discovery mismatch",i,r),r=i}return r?"; domain=."+r:""}return""}(d.location.hostname,n);if(r){var l=new Date;l.setTime(l.getTime()+864e5*r),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&th.warn("cookieStore warning: large cookie, len="+u.length),d.cookie=u,u}catch(e){return}},Jt(e,t){if(null!=d&&d.cookie)try{ry.Xt(e,"",-1,t)}catch(e){return}}},rb=null,rw={Yt(){if(null!==rb)return rb;var e=!0;if(D(l))e=!1;
200else try{var t="__mplssupport__";rw.Xt(t,"xyz"),'"xyz"'!==rw.Wt(t)&&(e=!1),rw.Jt(t)}catch(t){e=!1}return e||th.error("localStorage unsupported; falling back to cookie store"),rb=e,e},Ut(e){th.error("localStorage error: "+e)},Wt(e){try{return null==l?void 0:l.localStorage.getItem(e)}catch(e){rw.Ut(e)}return null},Gt(e){try{return JSON.parse(rw.Wt(e))||{}}catch(e){}return null},Xt(e,t){try{null==l||l.localStorage.setItem(e,JSON.stringify(t))}catch(e){rw.Ut(e)}},Jt(e){try{null==l||l.localStorage.removeItem(e)}catch(e){rw.Ut(e)}}},rE=[t_,"distinct_id",tT,tj,tG,tV,tW],rk={},rS={Yt:()=>!0,Ut(e){th.error("memoryStorage error: "+e)},Wt:e=>rk[e]||null,Gt:e=>rk[e]||null,Xt(e,t){rk[e]=t},Jt(e){delete rk[e]}},rP=null,rx={Yt(){if(null!==rP)return rP;if(rP=!0,D(l))rP=!1;else try{var e="__support__";rx.Xt(e,"xyz"),'"xyz"'!==rx.Wt(e)&&(rP=!1),rx.Jt(e)}catch(e){rP=!1}return rP},Ut(e){th.error("sessionStorage error: ",e)},Wt(e){try{return null==l?void 0:l.sessionStorage.getItem(e)}catch(e){rx.Ut(e)}return null},Gt(e){try{return JSON.parse(rx.Wt(e))||null}catch(e){}return null},Xt(e,t){try{null==l||l.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){rx.Ut(e)}},Jt(e){try{null==l||l.sessionStorage.removeItem(e)}catch(e){rx.Ut(e)}}};class rR{constructor(e){this._instance=e}get Rt(){return this._instance.config}get consent(){return this.Kt()?0:this.Qt}isOptedOut(){return this.Rt.cookieless_mode===t0||0===this.consent||-1===this.consent&&(this.Rt.opt_out_capturing_by_default||this.Rt.cookieless_mode===tZ)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}optInOut(e){this.tr.Xt(this.er,+!!e,this.Rt.cookie_expiration,this.Rt.cross_subdomain_cookie,this.Rt.secure_cookie)}reset(){this.tr.Jt(this.er,this.Rt.cross_subdomain_cookie)}get er(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:r}=this._instance.config;return r||(t?t+e:"__ph_opt_in_out_"+e)}get Qt(){var e=this.tr.Wt(this.er);return J(e)?1:C(Q,e)?0:-1}get tr(){var e=this.Rt.opt_out_capturing_persistence_type,t="localStorage"===e?rw:ry;if(!this.rr||this.rr!==t){this.rr=t;var r="localStorage"===e?ry:rw;r.Wt(this.er)&&(this.rr.Wt(this.er)||this.optInOut(J(r.Wt(this.er))),r.Jt(this.er,this.Rt.cross_subdomain_cookie))}return this.rr}Kt(){return!!this.Rt.respect_dnt&&[null==c?void 0:c.doNotTrack,null==c?void 0:c.msDoNotTrack,m.doNotTrack].some(e=>J(e))}}var rO=tp("[Dead Clicks]"),rC=()=>!0,rT=e=>{var t,r=!(null==(t=e.instance.persistence)||!t.get_property(tx)),n=e.instance.config.capture_dead_clicks;return K(n)?n:!!U(n)||r};class rj{get lazyLoadedDeadClicksAutocapture(){return this.ir}constructor(e,t,r){this.instance=e,this.isEnabled=t,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[tx]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.nr(()=>{this.sr()}):this.stop()}nr(e){var t,r;null!=(t=m.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?rO.error("failed to load script",t):e()})}sr(){var e;if(d){if(!this.ir&&null!=(e=m.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=U(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ir=m.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ir.start(d),rO.info("starting...")}}else rO.error("`document` not found. Cannot start.")}stop(){this.ir&&(this.ir.stop(),this.ir=void 0,rO.info("stopping..."))}}var rI=tp("[SegmentIntegration]"),rA="posthog-js";function rM(e,t){var{organization:r,projectId:n,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if("*"!==s&&!s.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var a=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=a,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,d,h,p,f=(null==(l=t.exception)?void 0:l.values)||[],g=f.map(e=>k({},e,{stacktrace:e.stacktrace?k({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>k({},e,{platform:"web:javascript"}))}):void 0})),v={$exception_message:(null==(u=f[0])?void 0:u.value)||t.message,$exception_type:null==(c=f[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(d=f[0])?void 0:d.value)||t.message,$sentry_exception_type:null==(h=f[0])?void 0:h.type,$sentry_tags:t.tags};return r&&n&&(v.$sentry_url=(i||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+t.event_id),o&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}class rL{constructor(e,t,r,n,i,s){this.name=rA,this.setupOnce=function(o){o(rM(e,{organization:t,projectId:r,prefix:n,severityAllowList:i,sendExceptionsToPostHog:null==s||s}))}}}class rF{constructor(e){this.ar=(e,t,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength)&&(th.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:r}),this.lr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.ur()}ur(){var e;this.hr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.ar)}destroy(){var e;null==(e=this.hr)||e.call(this),this.hr=void 0}doPageView(e,t){var r,n=this.cr(e,t);return this.lr={pathname:null!=(r=null==l?void 0:l.location.pathname)?r:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){var t;return this.cr(e,null==(t=this.lr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.lr)?void 0:e.pageViewId}}cr(e,t){var r=this.lr;if(!r)return{$pageview_id:t};var n={$pageview_id:t,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:s,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:u,maxContentY:c}=i;
200if(!(D(s)||D(o)||D(a)||D(l)||D(u)||D(c))){s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var d=s>1?Z(o/s,0,1,th):1,h=s>1?Z(a/s,0,1,th):1,p=l>1?Z(u/l,0,1,th):1,f=l>1?Z(c/l,0,1,th):1;n=rr(n,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:f})}}return r.pathname&&(n.$prev_pageview_pathname=r.pathname),r.timestamp&&(n.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),n}}var rU=e=>{var t=null==d?void 0:d.createElement("a");return D(t)?null:(t.href=e,t)},r$=function(e,t){for(var r,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;n.length>i;i++){var s=n[i].split("=");if(s[0]===t){r=s;break}}if(!L(r)||2>r.length)return"";var o=r[1];try{o=decodeURIComponent(o)}catch(e){th.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},rD=function(e,t,r){if(!e||!t||!t.length)return e;for(var n=e.split("#"),i=n[1],s=(n[0]||"").split("?"),o=s[1],a=s[0],l=(o||"").split("&"),u=[],c=0;l.length>c;c++){var d=l[c].split("=");L(d)&&(t.includes(d[0])?u.push(d[0]+"="+r):u.push(l[c]))}var h=a;return null!=o&&(h+="?"+u.join("&")),null!=i&&(h+="#"+i),h},rN=function(e,t){var r=e.match(RegExp(t+"=([^&]*)"));return r?r[1]:null},rz="https?://(.*)",rW=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rB=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...rW],rH="<masked>",rK=["li_fat_id"];function rq(e,t,r){if(!d)return{};var n,i=t?[...rW,...r||[]]:[],s=rV(rD(d.URL,i,rH),e);return rr((n={},rt(rK,function(e){var t=ry.Wt(e);n[e]=t||null}),n),s)}function rV(e,t){var r=rB.concat(t||[]),n={};return rt(r,function(t){var r=r$(e,t);n[t]=r||null}),n}function rG(e){var t=e?0===e.search(rz+"google.([^/?]*)")?"google":0===e.search(rz+"bing.com")?"bing":0===e.search(rz+"yahoo.com")?"yahoo":0===e.search(rz+"duckduckgo.com")?"duckduckgo":null:null,r={};if(null!==t){r.$search_engine=t;var n=d?r$(d.referrer,"yahoo"!=t?"q":"p"):"";n.length&&(r.ph_keyword=n)}return r}function rX(){return navigator.language||navigator.userLanguage}var rY="$direct";function rJ(){return(null==d?void 0:d.referrer)||rY}function rQ(e,t){var r=e?[...rW,...t||[]]:[],n=null==h?void 0:h.href.substring(0,1e3);return{r:rJ().substring(0,1e3),u:n?rD(n,r,rH):void 0}}function rZ(e){var t,{r:r,u:n}=e,i={$referrer:r,$referring_domain:null==r?void 0:r==rY?rY:null==(t=rU(r))?void 0:t.host};if(n){i.$current_url=n;var s=rU(n);i.$host=null==s?void 0:s.host,i.$pathname=null==s?void 0:s.pathname,rr(i,rV(n))}return r&&rr(i,rG(r)),i}function r0(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var r1=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class r2{constructor(e,t){this.Rt=e,this.props={},this.dr=!1,this.vr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.tr=this.pr(e),this.load(),e.debug&&th.info("Persistence loaded",e.persistence,k({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.gr}pr(e){-1===r1.indexOf(e.persistence.toLowerCase())&&(th.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,r,n=(void 0===(t=e.cookie_persisted_properties||[])&&(t=[]),r=[...rE,...t],k({},rw,{Gt(e){try{var t={};try{t=ry.Gt(e)||{}}catch(e){}var r=rr(t,JSON.parse(rw.Wt(e)||"{}"));return rw.Xt(e,r),r}catch(e){}return null},Xt(e,t,n,i,s,o){try{rw.Xt(e,t,void 0,void 0,o);var a={};r.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&ry.Xt(e,a,n,i,s,o)}catch(e){rw.Ut(e)}},Jt(e,t){try{null==l||l.localStorage.removeItem(e),ry.Jt(e,t)}catch(e){rw.Ut(e)}}})),i=e.persistence.toLowerCase();return"localstorage"===i&&rw.Yt()?rw:"localstorage+cookie"===i&&n.Yt()?n:"sessionstorage"===i&&rx.Yt()?rx:"memory"===i?rS:"cookie"===i?ry:n.Yt()?n:ry}mr(e){var t=null!=e?e:this.Rt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var r=this.props[tz];return!r||"number"!=typeof r||Date.now()-r>t}properties(){var e={};return rt(this.props,(t,r)=>{if(r===tI&&U(t)){if(!this.mr())for(var n=Object.keys(t),i=0;n.length>i;i++)e["$feature/"+n[i]]=t[n[i]]}else -1===tJ.indexOf(r)&&(e[r]=t)}),e}load(){if(!this.gr){var e=this.tr.Gt(this.vr);e&&(this.props=rr({},e))}}save(){this.gr||this.tr.Xt(this.vr,this.props,this.yr,this.br,this.wr,this.Rt.debug)}remove(){this.tr.Jt(this.vr,!1),this.tr.Jt(this.vr,!0)}clear(){this.remove(),this.props={}}register_once(e,t,r){if(U(e)){D(t)&&(t="None"),this.yr=D(r)?this._r:r;var n=!1;if(rt(e,(e,r)=>{this.props.hasOwnProperty(r)&&this.props[r]!==t||(this.props[r]=e,n=!0)}),n)return this.save(),!0}return!1}register(e,t){if(U(e)){this.yr=D(t)?this._r:t;var r=!1;if(rt(e,(t,n)=>{e.hasOwnProperty(n)&&this.props[n]!==t&&(this.props[n]=t,r=!0)}),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.dr){var e=rq(this.Rt.custom_campaign_params,this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties);$(ro(e))||this.register(e),this.dr=!0}}update_search_keyword(){var e;this.register((e=null==d?void 0:d.referrer)?rG(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rJ(),$referring_domain:null!=d&&d.referrer&&(null==(e=rU(d.referrer))?void 0:e.host)||rY},void 0)}set_initial_person_info(){this.props[tK]||this.props[tq]||this.register_once({[tV]:rQ(this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};rt([tq,tK],t=>{var r=this.props[t];r&&rt(r,function(t,r){e["$initial_"+j(r)]=t})});var t,r,n=this.props[tV];return n&&rr(e,(t=rZ(n),r={},rt(t,function(e,t){r["$initial_"+j(t)]=e}),r)),e}safe_merge(e){return rt(this.props,function(t,r){r in e||(e[r]=t)}),e}
200update_config(e,t,r){if(this._r=this.yr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var r=[...e].sort(),n=[...t].sort();return r.every((e,t)=>e===n[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var n=this.pr(e),i=this.props;this.clear(),this.tr=n,this.props=i,this.save()}}set_disabled(e){this.gr=e,this.gr?this.remove():this.save()}set_cross_subdomain(e){e!==this.br&&(this.br=e,this.remove(),this.save())}set_secure(e){e!==this.wr&&(this.wr=e,this.remove(),this.save())}set_event_timer(e,t){var r=this.props[ty]||{};r[e]=t,this.props[ty]=r,this.save()}remove_event_timer(e){var t=(this.props[ty]||{})[e];return D(t)||(delete this.props[ty][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var r3={Activation:"events",Cancellation:"cancelEvents"},r5={Popover:"popover",API:"api",Widget:"widget"},r4={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},r6={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},r7={Popover:"popover",Inline:"inline"},r8={SHOWN:"product tour shown"},r9={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},ne=tp("[RateLimiter]");class nt{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{ne.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void ne.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,r,n,{captureEventsBurstLimit:i,captureEventsPerSecond:s}=this,o=(new Date).getTime(),a=null!=(t=null==(r=this.instance.persistence)?void 0:r.get_property(tH))?t:{tokens:i,last:o};a.tokens+=(o-a.last)/1e3*s,a.last=o,a.tokens>i&&(a.tokens=i);var l=1>a.tokens;return l||e||(a.tokens=Math.max(0,a.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+s+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(n=this.instance.persistence)||n.set_property(tH,a),{isRateLimited:l,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var nr=tp("[RemoteConfig]");class nn{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Ir(e){var t,r;null!=(t=m.__PosthogExtensions__)&&t.loadExternalDependency?null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Cr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return nr.info("Using preloaded remote config",this.remoteConfig),this.Sr(this.remoteConfig),void this.kr();if(this._instance.Tr())return void nr.warn("Remote config is disabled. Falling back to local config.");this.Ir(e=>{if(!e)return nr.info("No config found after loading remote JS config. Falling back to JSON."),void this.Cr(e=>{this.Sr(e),this.kr()});this.Sr(e),this.kr()})}catch(e){nr.error("Error loading remote config",e)}}stop(){this.Ar&&(clearInterval(this.Ar),this.Ar=void 0)}refresh(){this._instance.Tr()||"hidden"===(null==d?void 0:d.visibilityState)||this._instance.reloadFeatureFlags()}kr(){var e;if(!this.Ar){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.Ar=setInterval(()=>{this.refresh()},t))}}Sr(e){var t;e||nr.error("Failed to fetch remote config from PostHog."),this._instance.Sr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var ni={GZipJS:"gzip-js",Base64:"base64"},ns=Uint8Array,no=Uint16Array,na=Uint32Array,nl=new ns([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nu=new ns([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),nc=new ns([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nd=function(e,t){for(var r=new no(31),n=0;31>n;++n)r[n]=t+=1<<e[n-1];var i=new na(r[30]);for(n=1;30>n;++n)for(var s=r[n];r[n+1]>s;++s)i[s]=s-r[n]<<5|n;return[r,i]},nh=nd(nl,2),np=nh[1];nh[0][28]=258,np[258]=28;for(var nf=nd(nu,0)[1],ng=new no(32768),nv=0;32768>nv;++nv){var n_=(43690&nv)>>>1|(21845&nv)<<1;ng[nv]=((65280&(n_=(61680&(n_=(52428&n_)>>>2|(13107&n_)<<2))>>>4|(3855&n_)<<4))>>>8|(255&n_)<<8)>>>1}var nm=function(e,t,r){for(var n=e.length,i=0,s=new no(t);n>i;++i)++s[e[i]-1];var o,a=new no(t);for(i=0;t>i;++i)a[i]=a[i-1]+s[i-1]<<1;if(r){o=new no(1<<t);var l=15-t;for(i=0;n>i;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,h=d|(1<<c)-1;h>=d;++d)o[ng[d]>>>l]=u}else for(o=new no(n),i=0;n>i;++i)o[i]=ng[a[e[i]-1]++]>>>15-e[i];return o},ny=new ns(288);for(nv=0;144>nv;++nv)ny[nv]=8;for(nv=144;256>nv;++nv)ny[nv]=9;for(nv=256;280>nv;++nv)ny[nv]=7;for(nv=280;288>nv;++nv)ny[nv]=8;var nb=new ns(32);for(nv=0;32>nv;++nv)nb[nv]=5;var nw=nm(ny,9,0),nE=nm(nb,5,0),nk=function(e){return(e/8|0)+(7&e&&1)},nS=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof no?no:e instanceof na?na:ns)(r-t);return n.set(e.subarray(t,r)),n},nP=function(e,t,r){var n=t/8|0;e[n]|=r<<=7&t,e[n+1]|=r>>>8},nx=function(e,t,r){var n=t/8|0;e[n]|=r<<=7&t,e[n+1]|=r>>>8,e[n+2]|=r>>>16},nR=function(e,t){for(var r=[],n=0;e.length>n;
200++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return[new ns(0),0];if(1==i){var o=new ns(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],u=0,c=1,d=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=r[r[d].f>r[u].f?u++:d++],l=r[u!=c&&r[d].f>r[u].f?u++:d++],r[c++]={s:-1,f:a.f+l.f,l:a,r:l};var h=s[0].s;for(n=1;i>n;++n)s[n].s>h&&(h=s[n].s);var p=new no(h+1),f=nO(r[c-1],p,0);if(f>t){n=0;var g=0,v=f-t,_=1<<v;for(s.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>n;++n){var m=s[n].s;if(t>=p[m])break;g+=_-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var y=s[n].s;t>p[y]?g-=1<<t-p[y]++-1:++n}for(;n>=0&&g;--n){var b=s[n].s;p[b]==t&&(--p[b],++g)}f=t}return[new ns(p),f]},nO=function(e,t,r){return -1==e.s?Math.max(nO(e.l,t,r+1),nO(e.r,t,r+1)):t[e.s]=r},nC=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new no(++t),n=0,i=e[0],s=1,o=function(e){r[n++]=e},a=1;t>=a;++a)if(e[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[a]}return[r.subarray(0,n),t]},nT=function(e,t){for(var r=0,n=0;t.length>n;++n)r+=e[n]*t[n];return r},nj=function(e,t,r){var n=r.length,i=nk(t+2);e[i]=255&n,e[i+1]=n>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;n>s;++s)e[i+s+4]=r[s];return 8*(i+4+n)},nI=function(e,t,r,n,i,s,o,a,l,u,c){nP(t,c++,r),++i[256];for(var d=nR(i,15),h=d[0],p=d[1],f=nR(s,15),g=f[0],v=f[1],_=nC(h),m=_[0],y=_[1],b=nC(g),w=b[0],E=b[1],k=new no(19),S=0;m.length>S;++S)k[31&m[S]]++;for(S=0;w.length>S;++S)k[31&w[S]]++;for(var P=nR(k,7),x=P[0],R=P[1],O=19;O>4&&!x[nc[O-1]];--O);var C,T,j,I,A=u+5<<3,M=nT(i,ny)+nT(s,nb)+o,L=nT(i,h)+nT(s,g)+o+14+3*O+nT(k,x)+(2*k[16]+3*k[17]+7*k[18]);if(M>=A&&L>=A)return nj(t,c,e.subarray(l,l+u));if(nP(t,c,1+(M>L)),c+=2,M>L){C=nm(h,p,0),T=h,j=nm(g,v,0),I=g;var F=nm(x,R,0);for(nP(t,c,y-257),nP(t,c+5,E-1),nP(t,c+10,O-4),c+=14,S=0;O>S;++S)nP(t,c+3*S,x[nc[S]]);c+=3*O;for(var U=[m,w],$=0;2>$;++$){var D=U[$];for(S=0;D.length>S;++S)nP(t,c,F[N=31&D[S]]),c+=x[N],N>15&&(nP(t,c,D[S]>>>5&127),c+=D[S]>>>12)}}else C=nw,T=ny,j=nE,I=nb;for(S=0;a>S;++S)if(n[S]>255){nx(t,c,C[257+(N=n[S]>>>18&31)]),c+=T[N+257],N>7&&(nP(t,c,n[S]>>>23&31),c+=nl[N]);var N,z=31&n[S];nx(t,c,j[z]),c+=I[z],z>3&&(nx(t,c,n[S]>>>5&8191),c+=nu[z])}else nx(t,c,C[n[S]]),c+=T[n[S]];return nx(t,c,C[256]),c+T[256]},nA=new na([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nM=function(){for(var e=new na(256),t=0;256>t;++t){for(var r=t,n=9;--n;)r=(1&r&&0xedb88320)^r>>>1;e[t]=r}return e}(),nL=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},nF=!!f||!!p,nU="text/plain",n$=function(e,t,r){void 0===r&&(r=!0);var n,i,s,o,a,[l,u]=e.split("?"),c=k({},t),d=null!=(a=null==u?void 0:u.split("&").map(e=>{var t,[n,i]=e.split("="),s=r&&null!=(t=c[n])?t:i;return delete c[n],n+"="+s}))?a:[],h=(void 0===n&&(n="&"),o=[],rt(c,function(e,t){D(e)||D(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),s=encodeURIComponent(t),o[o.length]=s+"="+i)}),o.join(n));return h&&d.push(h),l+"?"+d.join("&")},nD=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),nN=e=>{if(e.zt)return e.zt;var{data:t,compression:r}=e;if(t){if(r===ni.GZipJS){var n=function(e,t){void 0===t&&(t={});var r=(i=0xffffffff,{p(e){for(var t=i,r=0;e.length>r;++r)t=nM[255&t^e[r]]^t>>>8;i=t},d:()=>0xffffffff^i}),n=e.length;r.p(e);var i,s,o,a,l=(a=10+((s=t).filename&&s.filename.length+1||0),function(e,t,r,n,i,s){var o=e.length,a=new ns(n+o+5*(1+Math.floor(o/7e3))+8),l=a.subarray(n,a.length-8),u=0;if(!t||8>o)for(var c=0;o>=c;c+=65535){var d=c+65535;o>
200d?u=nj(l,u,e.subarray(c,d)):(l[c]=!0,u=nj(l,u,e.subarray(c,o)))}else{for(var h=nA[t-1],p=h>>>13,f=8191&h,g=(1<<r)-1,v=new no(32768),_=new no(g+1),m=Math.ceil(r/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&g},w=new na(25e3),E=new no(288),k=new no(32),S=0,P=0,x=(c=0,0),R=0,O=0;o>c;++c){var C=b(c),T=32767&c,j=_[C];if(v[T]=j,_[C]=T,c>=R){var I=o-c;if((S>7e3||x>24576)&&I>423){u=nI(e,l,0,w,E,k,P,x,O,c-O,u),x=S=P=0,O=c;for(var A=0;286>A;++A)E[A]=0;for(A=0;30>A;++A)k[A]=0}var M=2,L=0,F=f,U=T-j&32767;if(I>2&&C==b(c-U))for(var $=Math.min(p,I)-1,D=Math.min(32767,c),N=Math.min(258,I);D>=U&&--F&&T!=j;){if(e[c+M]==e[c+M-U]){for(var z=0;N>z&&e[c+z]==e[c+z-U];++z);if(z>M){if(M=z,L=U,z>$)break;var W=Math.min(U,z-2),B=0;for(A=0;W>A;++A){var H=c-U+A+32768&32767,K=H-v[H]+32768&32767;K>B&&(B=K,j=H)}}}U+=(T=j)-(j=v[T])+32768&32767}if(L){w[x++]=0x10000000|np[M]<<18|nf[L];var q=31&np[M],V=31&nf[L];P+=nl[q]+nu[V],++E[257+q],++k[V],R=c+M,++S}else w[x++]=e[c],++E[e[c]]}}u=nI(e,l,!0,w,E,k,P,x,O,c-O,u)}return nS(a,0,n+nk(u)+i)}(e,null==(o=t).level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,a,8)),u=l.length;return function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&nL(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;r.length>=n;++n)e[n+10]=r.charCodeAt(n)}}(l,t),nL(l,u-8,r.d()),nL(l,u-4,n),l}(function(e,t){var r=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new ns(e.length+(e.length>>>1)),i=0,s=function(e){n[i++]=e},o=0;r>o;++o){if(i+5>n.length){var a=new ns(i+8+(r-o<<1));a.set(n),n=a}var l=e.charCodeAt(o);128>l?s(l):(2048>l?s(192|l>>>6):(l>55295&&57344>l?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63)):s(224|l>>>12),s(128|l>>>6&63)),s(128|63&l))}return nS(n,0,i)}(nD(t)),{mtime:0});return{contentType:nU,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(r===ni.Base64){var i=(e=>"data="+encodeURIComponent("string"==typeof e?e:nD(e)))(function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):e}(nD(t)));return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var s=nD(t);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},nz=function(){var e=E(function*(e){var t=nD(e.data),r=yield function(e,t){return P.apply(this,arguments)}(t,b.DEBUG);if(!r)return e;var n=yield r.arrayBuffer();return k({},e,{zt:{contentType:nU,body:n,estimatedSize:n.byteLength}})});return function(t){return e.apply(this,arguments)}}(),nW=[];p&&nW.push({transport:"fetch",method(e){var t,r,{contentType:n,body:i,estimatedSize:s}=null!=(t=nN(e))?t:{},o=new Headers;rt(e.headers,function(e,t){o.append(t,e)}),n&&o.append("Content-Type",n);var a=e.url,l=null;if(g){var u=new g;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}p(a,k({method:(null==e?void 0:e.method)||"GET",headers:o,keepalive:"POST"===e.method&&52428.8>(s||0),body:i,signal:null==(r=l)?void 0:r.signal},e.fetchOptions)).then(t=>t.text().then(r=>{var n={statusCode:t.status,text:r};if(200===t.status)try{n.json=JSON.parse(r)}catch(e){th.error(e)}null==e.callback||e.callback(n)})).catch(t=>{th.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),f&&nW.push({transport:"XHR",method(e){var t,r=new f;r.open(e.method||"GET",e.url,!0);var{contentType:n,body:i}=null!=(t=nN(e))?t:{};rt(e.headers,function(e,t){r.setRequestHeader(t,e)}),n&&r.setRequestHeader("Content-Type",n),e.timeout&&(r.timeout=e.timeout),e.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(4===r.readyState){var t={statusCode:r.status,text:r.responseText};if(200===r.status)try{t.json=JSON.parse(r.responseText)}catch(e){}null==e.callback||e.callback(t)}},r.send(i)}}),null!=c&&c.sendBeacon&&nW.push({transport:"sendBeacon",method(e){var t=n$(e.url,{beacon:"1"});try{var r,{contentType:n,body:i}=null!=(r=nN(e))?r:{};if(!i)return;var s=i instanceof Blob?i:new Blob([i],{type:n});c.sendBeacon(t,s)}catch(e){}}});
200class nB{constructor(e,t){this.Er=!0,this.Rr=[],this.Nr=Z((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,th.createLogger("flush interval"),3e3),this.Mr=e}enqueue(e){this.Rr.push(e),this.Fr||this.Or()}unload(){this.Pr();var e=Object.values(this.Rr.length>0?this.Lr():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Mr(k({},e,{transport:"sendBeacon"}))})}enable(){this.Er=!1,this.Or()}Or(){var e=this;this.Er||(this.Fr=setTimeout(()=>{if(this.Pr(),this.Rr.length>0){var t=this.Lr();for(var r in t)!function(){var n=t[r],i=(new Date).getTime();n.data&&L(n.data)&&rt(n.data,e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp}),e.Mr(n)}()}},this.Nr))}Pr(){clearTimeout(this.Fr),this.Fr=void 0}Lr(){var e={};return rt(this.Rr,t=>{var r,n=(t?t.batchKey:null)||t.url;D(e[n])&&(e[n]=k({},t,{data:[]})),null==(r=e[n].data)||r.push(t.data)}),this.Rr=[],e}}var nH=["retriesPerformedSoFar"];class nK{constructor(e){this.Dr=!1,this.Br=3e3,this.Rr=[],this._instance=e,this.Rr=[],this.jr=!0,!D(l)&&"onLine"in l.navigator&&(this.jr=l.navigator.onLine,this.qr=()=>{this.jr=!0,this.Zr()},this.$r=()=>{this.jr=!1},rl(l,"online",this.qr),rl(l,"offline",this.$r))}get length(){return this.Rr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,r=S(e,nH);H(t)&&(r.url=n$(r.url,{retry_count:t})),this._instance._send_request(k({},r,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==r.callback||r.callback(e):this.Hr(k({retriesPerformedSoFar:t},r))}}))}Hr(e){var t,r,n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var i=Math.ceil((r=Math.min(18e5,t=3e3*Math.pow(2,n)))+(Math.random()-.5)*(r-t/2)),s=Date.now()+i;this.Rr.push({retryAt:s,requestOptions:e});var o="Enqueued failed request for retry in "+i;navigator.onLine||(o+=" (Browser is offline)"),th.warn(o),this.Dr||(this.Dr=!0,this.Vr())}Vr(){if(this.zr&&clearTimeout(this.zr),0===this.Rr.length)return this.Dr=!1,void(this.zr=void 0);this.zr=setTimeout(()=>{this.jr&&this.Rr.length>0&&this.Zr(),this.Vr()},this.Br)}Zr(){var e=Date.now(),t=[],r=this.Rr.filter(r=>e>r.retryAt||(t.push(r),!1));if(this.Rr=t,r.length>0)for(var{requestOptions:n}of r)this.retriableRequest(n)}unload(){for(var{requestOptions:e}of(this.zr&&(clearTimeout(this.zr),this.zr=void 0),this.Dr=!1,D(l)||(this.qr&&(l.removeEventListener("online",this.qr),this.qr=void 0),this.$r&&(l.removeEventListener("offline",this.$r),this.$r=void 0)),this.Rr))try{this._instance._send_request(k({},e,{transport:"sendBeacon"}))}catch(e){th.error(e)}this.Rr=[]}}class nq{constructor(e){this.Yr=()=>{this.Ur||(this.Ur={});var e,t,r,n,i=this.scrollElement(),s=this.scrollY(),o=i?Math.max(0,i.scrollHeight-i.clientHeight):0,a=s+((null==i?void 0:i.clientHeight)||0),l=(null==i?void 0:i.scrollHeight)||0;this.Ur.lastScrollY=Math.ceil(s),this.Ur.maxScrollY=Math.max(s,null!=(e=this.Ur.maxScrollY)?e:0),this.Ur.maxScrollHeight=Math.max(o,null!=(t=this.Ur.maxScrollHeight)?t:0),this.Ur.lastContentY=a,this.Ur.maxContentY=Math.max(a,null!=(r=this.Ur.maxContentY)?r:0),this.Ur.maxContentHeight=Math.max(l,null!=(n=this.Ur.maxContentHeight)?n:0)},this._instance=e}get Wr(){return this._instance.config.scroll_root_selector}getContext(){return this.Ur}resetContext(){var e=this.Ur;return setTimeout(this.Yr,0),e}startMeasuringScrollPosition(){rl(l,"scroll",this.Yr,{capture:!0}),rl(l,"scrollend",this.Yr,{capture:!0}),rl(l,"resize",this.Yr)}scrollElement(){if(!this.Wr)return null==l?void 0:l.document.documentElement;for(var e of L(this.Wr)?this.Wr:[this.Wr]){var t=null==l?void 0:l.document.querySelector(e);if(t)return t}}scrollY(){if(this.Wr){var e=this.scrollElement();return e&&e.scrollTop||0}return l&&(l.scrollY||l.pageYOffset||l.document.documentElement.scrollTop)||0}scrollX(){if(this.Wr){var e=this.scrollElement();return e&&e.scrollLeft||0}return l&&(l.scrollX||l.pageXOffset||l.document.documentElement.scrollLeft)||0}}var nV=e=>rQ(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class nG{constructor(e,t,r,n){this.Gr=e=>{var t=this.Xr();if(!t||t.sessionId!==e){var r={sessionId:e,props:this.Jr(this._instance)};this.Kr.register({[tB]:r})}},this._instance=e,this.Qr=t,this.Kr=r,this.Jr=n||nV,this.Qr.onSessionId(this.Gr)}Xr(){return this.Kr.props[tB]}getSetOnceProps(){var e,t=null==(e=this.Xr())?void 0:e.props;return t?"r"in t?rZ(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return rt(ro(this.getSetOnceProps()),(t,r)=>{"$current_url"===r&&(r="url"),e["$session_entry_"+j(r)]=t}),e}}class nX{constructor(){this.ti={}}on(e,t){return this.ti[e]||(this.ti[e]=[]),this.ti[e].push(t),()=>{this.ti[e]=this.ti[e].filter(e=>e!==t)}}emit(e,t){for(var r of this.ti[e]||[])r(t);for(var n of this.ti["*"]||[])n(e,t)}}var nY=tp("[SessionId]");class nJ{on(e,t){return this.ei.on(e,t)}constructor(e,t,r){if(this.ri=[],this.ii=void 0,this.ei=new nX,this.ni=(e,t)=>!(!H(e)||!H(t))&&Math.abs(e-t)>
200this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===t0)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Rt=e.config,this.Kr=e.persistence,this.si=void 0,this.oi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ai=t||rg,this.li=r||rg;var n,i=this.Rt.persistence_name||this.Rt.token;if(this._sessionTimeoutMs=1e3*Z(this.Rt.session_idle_timeout_seconds||1800,60,36e3,nY.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ui(),this.hi="ph_"+i+"_window_id",this.ci="ph_"+i+"_primary_window_exists",this.di()){var s=rx.Gt(this.hi),o=rx.Gt(this.ci);s&&!o?this.si=s:rx.Jt(this.hi),rx.Xt(this.ci,!0)}if(null!=(n=this.Rt.bootstrap)&&n.sessionID)try{var a=(e=>{var t=this.Rt.bootstrap.sessionID.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})();this.vi(this.Rt.bootstrap.sessionID,(new Date).getTime(),a)}catch(e){nY.error("Invalid sessionID in bootstrap",e)}this.fi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return D(this.ri)&&(this.ri=[]),this.ri.push(e),this.oi&&e(this.oi,this.si),()=>{this.ri=this.ri.filter(t=>t!==e)}}di(){return"memory"!==this.Rt.persistence&&!this.Kr.gr&&rx.Yt()}pi(e){e!==this.si&&(this.si=e,this.di()&&rx.Xt(this.hi,e))}gi(){return this.si?this.si:this.di()?rx.Gt(this.hi):null}vi(e,t,r){e===this.oi&&t===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=t,this.oi=e,this.Kr.register({[tT]:[t,e,r]}))}mi(){var e=this.Kr.props[tT];return L(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.vi(null,null,null)}destroy(){clearTimeout(this.yi),this.yi=void 0,this.ii&&l&&(l.removeEventListener(t4,this.ii,{capture:!1}),this.ii=void 0),this.ri=[]}fi(){this.ii=()=>{this.di()&&rx.Jt(this.ci)},rl(l,t4,this.ii,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.Rt.cookieless_mode===t0)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=t||(new Date).getTime(),[n,i,s]=this.mi(),o=this.gi(),a=H(s)&&Math.abs(r-s)>864e5,l=!1,u=!i,c=!u&&!e&&this.ni(r,n);u||c||a?(i=this.ai(),o=this.li(),nY.info("new session ID generated",{sessionId:i,windowId:o,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}}),s=r,l=!0):o||(o=this.li(),l=!0);var d=H(n)&&e&&!a?n:r,h=H(s)?s:(new Date).getTime();return this.pi(o),this.vi(i,d,h),e||this.ui(),l&&this.ri.forEach(e=>e(i,o,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:i,windowId:o,sessionStartTimestamp:h,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:n}}ui(){clearTimeout(this.yi),this.yi=setTimeout(()=>{var[e]=this.mi();if(this.ni((new Date).getTime(),e)){var t=this.oi;this.resetSessionId(),this.ei.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var nQ=function(e,t){if(!e)return!1;var r=e.userAgent;if(r&&O(r,t))return!0;try{var n=null==e?void 0:e.userAgentData;if(null!=n&&n.brands&&n.brands.some(e=>O(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},nZ=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function n0(e,t,r){return nD({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:r})}var n1={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>nZ(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!nZ(t,e))),icontains:(e,t)=>t.map(n2).some(t=>e.map(n2).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(n2).every(t=>e.map(n2).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var r=parseFloat(t);return!isNaN(r)&&e.some(e=>r>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var r=parseFloat(t);return!isNaN(r)&&e.some(e=>r<parseFloat(e))})},n2=e=>e.toLowerCase();function n3(e,t){return!e||Object.entries(e).every(e=>{var[r,n]=e,i=null==t?void 0:t[r];
200if(D(i)||null===i)return!1;var s=[String(i)],o=n1[n.operator];return!!o&&o(n.values,s)})}var n5="custom",n4="i.posthog.com";class n6{constructor(e){this.bi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+n4,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.bi[this.apiHost]||(this.bi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":n5),this.bi[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===n5)return this.apiHost+t;var r=n4+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var n7=tp("[Surveys]"),n8="seenSurvey_",n9=e=>((e,t)=>{var r=""+n8+t.id;return t.current_iteration&&t.current_iteration>0&&(r=""+n8+t.id+"_"+t.current_iteration),r})(0,e),ie=[r5.Popover,r5.Widget,r5.API],it={ignoreConditions:!1,ignoreDelay:!1,displayType:r7.Popover},ir=tp("[PostHog ExternalIntegrations]"),ii={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class is{constructor(e){this._instance=e}nr(e,t){var r;null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,e,e=>{if(e)return ir.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,r=function(e){var r,n,s;!i||null!=(r=m.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]||t.nr(ii[e],()=>{var r;null==(r=m.__PosthogExtensions__)||null==(r=r.integrations)||null==(r=r[e])||r.start(t._instance)}),!i&&null!=(n=m.__PosthogExtensions__)&&null!=(n=n.integrations)&&n[e]&&(null==(s=m.__PosthogExtensions__)||null==(s=s.integrations)||null==(s=s[e])||s.stop())};for(var[n,i]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))r(n)}}var io={},ia=0,il=()=>{},iu='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',ic="Surveys module not available",id="sanitize_properties is deprecated. Use before_send instead",ih="Invalid value for property_denylist config: ",ip=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,ig="posthog",iv=!nF&&-1===(null==_?void 0:_.indexOf("MSIE"))&&-1===(null==_?void 0:_.indexOf("Mozilla")),i_=e=>{var t;return k({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!N(t))return!1;var r=t.split(".").slice(-2).join(".");for(var n of ra)if(r===n)return!1;return!0}(null==d?void 0:d.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:il,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:h&&N(null==h?void 0:h.search)&&-1!==h.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==l||null==(t=l.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){th.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:t3,before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:il,__preview_eager_load_replay:!1},(e=>({rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},im=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],iy=e=>{var t={};for(var[r,n]of im)D(e[r])||(t[n]=e[r]);var i=rr({},t,e);return L(e.property_blacklist)&&(D(e.property_denylist)?i.property_denylist=e.property_blacklist:L(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:th.error(ih+e.property_denylist)),i};class ib{constructor(){this.__forceAllowLocalhost=!1}get wi(){return this.__forceAllowLocalhost}set wi(e){th.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class iw{Ii(e,t){if(e){var r=this.Ci.indexOf(e);-1!==r&&this.Ci.splice(r,1)}return this.Ci.push(t),null==t.initialize||t.initialize(),t}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new ib,this.Si=!1,this.version=b.LIB_VERSION,this.ki=new nX,this.Ci=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=i_(),this.SentryIntegration=rL,this.sentryIntegration=e=>(function(e,t){var r=rM(e,t);return{name:rA,processEvent:e=>r(e)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.xi=!1,this.Ti=null,this.Ai=null,this.Ei=null,this.scrollManager=new nq(this),this.pageViewM
200anager=new rF(this),this.rateLimiter=new nt(this),this.requestRouter=new n6(this),this.consent=new rR(this),this.externalIntegrations=new is(this);var e,t=null!=(e=iw.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,r)=>{var n=N(e)?{[e]:t}:e;this.setPersonProperties(n),null==r||r({})},set_once:(e,t,r)=>{var n=N(e)?{[e]:t}:e;this.setPersonProperties(void 0,n),null==r||r({})}},this.on("eventCaptured",e=>th.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,r){if(r&&r!==ig){var n,i=null!=(n=io[r])?n:new iw;return i._init(e,t,r),io[r]=i,io[ig][r]=i,i}return this._init(e,t,r)}_init(e,t,r){if(void 0===t&&(t={}),D(e)||z(e))return th.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Ri(t.debug),this.Ni=t,this.Mi=[],t.person_profiles?this.Ai=t.person_profiles:t.process_person&&(this.Ai=t.process_person),this.set_config(rr({},i_(t.defaults),iy(t),{name:r,token:e})),this.config.on_xhr_error&&th.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:ni.GZipJS;var n,i,s,o,a=this.Fi();this.persistence=new r2(this.config,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r2(k({},this.config,{persistence:"sessionStorage"}),a);var u=k({},this.persistence.props),c=k({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Oi=new nB(e=>this.Pi(e),this.config.request_queue_config),this.Li=new nK(this),this.__request_queue=[];var d=this.config.cookieless_mode===t0||this.config.cookieless_mode===tZ&&this.consent.isExplicitlyOptedOut();d||(this.sessionManager=new nJ(this),this.sessionPropsManager=new nG(this,this.sessionManager,this.persistence));var h=null==(n=m._POSTHOG_REMOTE_CONFIG)||null==(n=n[this.config.token])?void 0:n.config,p=null==h||null==(i=h.sdkVersion)?void 0:i.resolved;if(p&&(ip.test(p)?this._resolvedSdkVersion=p:th.warn("Ignoring invalid preloaded sdkVersion.resolved from remote config: "+p)),this.config.__preview_deferred_init_extensions?(th.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Di(d)},0)):(th.info("Initializing extensions synchronously"),this.Di(d)),b.DEBUG=b.DEBUG||this.config.debug,b.DEBUG&&th.info("Starting in debug mode",{this:this,config:t,thisC:k({},this.config),p:u,s:c}),!this.config.identity_distinct_id||null!=(s=t.bootstrap)&&s.distinctID||(t.bootstrap=k({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(o=t.bootstrap)?void 0:o.distinctID)){var f=t.bootstrap.distinctID,g=this.get_distinct_id(),v=this.persistence.get_property(tW);if(t.bootstrap.isIdentifiedID&&null!=g&&g!==f&&v===t1)this.identify(f);else if(t.bootstrap.isIdentifiedID&&null!=g&&g!==f&&v===t2)th.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var _=this.config.get_device_id(rg()),y=t.bootstrap.isIdentifiedID?_:f;this.persistence.set_property(tW,t.bootstrap.isIdentifiedID?t2:t1),this.register({distinct_id:f,$device_id:y})}}if(d)this.register_once({distinct_id:tY,$device_id:null},"");else if(!this.get_distinct_id()){var w=this.config.get_device_id(rg());this.register_once({distinct_id:w,$device_id:w},""),this.persistence.set_property(tW,t1)}return rl(l,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var r=e.config.segment;if(!r)return t();!function(e,t){var r=e.config.segment;if(!r)return t();var n=r=>{var n=()=>r.anonymousId()||rg();e.config.get_device_id=n,r.id()&&(e.register({distinct_id:r.id(),$device_id:n()}),e.persistence.set_property(tW,t2)),t()},i=r.user();"then"in i&&F(i.then)?i.then(n):n(i)}(e,()=>{var n;r.register((Promise&&Promise.resolve||rI.warn("This browser does not have Promise support, and can not use the segment integration"),n=(t,r)=>{if(!r)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(rI.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(rI.info("UserId set, identifying with PostHog"),e.identify(t.event.userId)
200);var n=e.calculateEventProperties(r,t.event.properties);return t.event.properties=Object.assign({},n,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>n(e,e.event.event),page:e=>n(e,t6),identify:e=>n(e,t8),screen:e=>n(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Bi()):this.Bi(),F(this.config._onCapture)&&this.config._onCapture!==il&&(th.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&th.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Di(e){var t,r,n,i,s,o,a,l=performance.now(),u=k({},iw.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.Ci.push(this.featureFlags=null!=(t=this.featureFlags)?t:new u.featureFlags(this)),u.exceptions&&this.Ci.push(this.exceptions=null!=(r=this.exceptions)?r:new u.exceptions(this)),u.historyAutocapture&&this.Ci.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Ci.push(new u.tracingHeaders(this)),u.siteApps&&this.Ci.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Ci.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.Ci.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Ci.push(this.surveys=null!=(n=this.surveys)?n:new u.surveys(this)),u.logs&&this.Ci.push(this.logs=null!=(i=this.logs)?i:new u.logs(this)),u.conversations&&this.Ci.push(this.conversations=null!=(s=this.conversations)?s:new u.conversations(this)),u.productTours&&this.Ci.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Ci.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Ci.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Ci.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Ci.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,rT)),u.toolbar&&this.Ci.push(this.toolbar=null!=(o=this.toolbar)?o:new u.toolbar(this)),u.experiments&&this.Ci.push(this.experiments=null!=(a=this.experiments)?a:new u.experiments(this)),this.Ci.forEach(e=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.ji){var e=this.ji;this.ji=void 0,this.Sr(e)}}),this.qi(c,l)}qi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.qi(e,t)},0);var r=e.shift();if(r)try{r()}catch(e){th.error("Error initializing extension:",e)}}var n=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:n}),this.config.__preview_deferred_init_extensions&&th.info("PostHog extensions initialized ("+n+"ms)")}Sr(e){var t;if(!d||!d.body)return th.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Sr(e)},500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=C(e.supportedCompression,ni.GZipJS)?ni.GZipJS:C(e.supportedCompression,ni.Base64)?ni.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ai?this.Ai:t3}),this.Ci.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}Bi(){try{this.config.loaded(this)}catch(e){th.critical("`loaded` function failed",e)}if(this.Zi(),this.config.internal_or_test_user_hostname&&null!=h&&h.hostname){var e=h.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode===t0)&&this.$i()},1),this.Hi=new nn(this),this.Hi.load()}Zi(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Oi)||e.enable())}_dom_loaded(){this.is_capturing()&&re(this.__request_queue,e=>this.Pi(e)),this.__request_queue=[],this.Zi()}_handle_unload(){var e,t,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Vi()&&this.capture(t7),null==(t=this.Oi)||t.unload(),null==(r=this.Li)||r.unload()):this.Vi()&&this.capture(t7,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(iv?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=n$(e.url,{ip:+!!this.config.ip}),e.headers=k({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
200(e=>{var t,r,n,i=k({},e);i.timeout=i.timeout||6e4,i.url=n$(i.url,{_:(new Date).getTime().toString(),ver:b.JS_SDK_VERSION,compression:i.compression});var s=null!=(t=i.transport)?t:"fetch",o=nW.filter(e=>!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)),a=null!=(r=null==(n=function(e,t){for(var r=0;e.length>r;r++)if(e[r].transport===s)return e[r]}(o))?void 0:n.method)?r:o[0].method;if(!a)throw Error("No available transport method");"sendBeacon"!==s&&i.data&&i.compression===ni.GZipJS&&v?nz(i).then(e=>{a(e)}).catch(()=>{a(i)}):a(i)})(k({},e,{callback:t=>{var r,n;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(r=(n=this.config).on_request_error)||r.call(n,t),null==e.callback||e.callback(t)}}))))}Pi(e){this.Li?this.Li.retriableRequest(e):this._send_request(e)}_execute_array(e){ia++;try{var t,r=[],n=[],i=[];re(e,e=>{e&&(L(t=e[0])?i.push(e):F(e)?e.call(this):L(e)&&"alias"===t?r.push(e):L(e)&&-1!==t.indexOf("capture")&&F(this[t])?i.push(e):n.push(e))});var s=function(e,t){re(e,function(e){if(L(e[0])){var r=t;rt(e,function(e){r=r[e[0]].apply(r,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))})};s(r,this),s(n,this),s(i,this)}finally{ia--}}push(e){if(ia>0&&L(e)&&N(e[0])){var t=iw.prototype[e[0]];F(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,r){var n,i,s,o,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Oi){if(this.is_capturing())if(!D(e)&&N(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=r&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!N(null==t?void 0:t.$current_url)&&(th.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=r&&r.zi||th.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,d=(null==r?void 0:r.timestamp)||c,h=rg(),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},d,h)};e===t6&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),u&&(p.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),(null==r?void 0:r.$set)&&(p.$set=null==r?void 0:r.$set);var f,g=this.Yi(null==r?void 0:r.$set_once,e!==t9,e===t8);if(g&&(p.$set_once=g),null!=r&&r._noTruncate||(i=this.config.properties_string_max_length,s=p,o=e=>N(e)?e.slice(0,i):e,a=new Set,p=function e(t,r){var n;return t!==Object(t)?o?o(t):t:a.has(t)?void 0:(a.add(t),L(t)?(n=[],re(t,t=>{n.push(e(t))})):(n={},rt(t,(t,r)=>{a.has(t)||(n[r]=e(t,r))})),n)}(s)),p.timestamp=d,D(null==r?void 0:r.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===r4.DISMISSED||e===r4.SENT){var v,_,m,y=null==t?void 0:t[r6.SURVEY_ID],b=null==t?void 0:t[r6.SURVEY_ITERATION];f={id:y,current_iteration:b},localStorage.getItem(n9(f))||localStorage.setItem(n9(f),"true"),p.$set=k({},p.$set,{[(v={id:y,current_iteration:b},m="$survey_"+(_=e===r4.SENT?"responded":"dismissed")+"/"+v.id,v.current_iteration&&v.current_iteration>0&&(m="$survey_"+_+"/"+v.id+"/"+v.current_iteration),m)]:!0})}else e===r4.SHOWN&&(p.$set=k({},p.$set,{[r6.SURVEY_LAST_SEEN_DATE]:(new Date).toISOString()}));if(e===r8.SHOWN){var w=null==t?void 0:t[r9.TOUR_TYPE];w&&(p.$set=k({},p.$set,{[r9.TOUR_LAST_SEEN_DATE+"/"+w]:(new Date).toISOString()}))}var E=k({},p.properties.$set,p.$set);if($(E)||this.setPersonPropertiesForFlags(E),!W(this.config.before_send)){var S=this.Ui(p);if(!S)return;p=S}this.ki.emit("eventCaptured",p);var P={method:"POST",url:null!=(n=null==r?void 0:r._url)?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==r?void 0:r._batchKey};return!this.config.request_batching||r&&(null==r||!r._batchKey)||null!=r&&r.send_instantly?this.Pi(P):this.Oi.enqueue(P),p}th.critical("This capture call is ignored due to client rate limiting.")}}else th.error("No event name provided to posthog.capture")}else th.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,r,n,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return t;var s,o=i?void 0:this.persistence.remove_event_timer(e),a=k({},t);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode==t0||this.config.cookieless_mode==tZ&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),"$snapshot"===e){var u=k({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=u.distinct_id,(!N(a.distinct_id)&&!B(a.distinct_id)||z(a.distinct_id))&&th.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,p=function(e,t){if(!_)return{};var r,n,i,s,o,a,u,c,d,p,f,g=e?[...rW,...t||[]]:[],[v,m]=function(e){for(var t=0;eY.length>t;t++){var[r,n]=eY[t],i=r.exec(e),s=i&&(F(n)?n(i,e):n);if(s)return s}return["",""]}(_);return rr(ro({$os:v,$os_version:m,$browser:eV(_,navigator.vendor),$device:eJ(_),$device_type:(a={userAgentDataPlatform:null==(r=navigator)||null==(r=r.userAgentData)?void 0:r.platform,maxTouchPoints:null==(n=navigator)?void 0:n.maxTouchPoints,screenWidth:null==l||null==(i=l.screen)?void 0:i.width,screenHeight:null==l||null==(s=l.screen)?void 0:s.height,devicePixelRatio:null==l?void 0:l.devicePixelRatio},(f=eJ(_))===el||f===ea||"Kobo"===f||"Kindle Fire"===f||f===e$?eo:f===eR||f===eC||f===eO||f===eL?"Console":f===ec?"Wearable":f?ei:"Android"===(null==a?void 0:a.userAgentDataPlatform)&&(null!=(u=null==a?void 0:a.maxTouchPoints)?u:0)>0?600>Math.min(null!=(c=null==a?void 0:a.screenWidth)?c:0,null!=(d=null==a?void 0:a.screenHeight)?d:0)/(null!=(p=null==a?void 0:a.devicePixelRatio)?p:1)?ei:eo:"Desktop"),$timezone:r0(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:rD(null==h?void 0:h.href,g,rH),$host:null==h?void 0:h.host,$pathname:null==h?void 0:h.pathname,$raw_user_agent:_.length>1e3?_.substring(0,997)+"...":_,$browser_version:eX(_,navigator.vendor),$browser_language:rX(),$browser_language_prefix:"string"==typeof(o=rX())?o.split("-")[0]:void 0,$screen_height:null==l?void 0:l.screen.height,$screen_width:null==l?void 0:l.screen.width,$viewport_height:null==l?void 0:l.innerHe
200ight,$viewport_width:null==l?void 0:l.innerWidth,$lib:b.LIB_NAME,$lib_version:b.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:g}=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime());a.$session_id=f,a.$window_id=g}this.sessionPropsManager&&rr(a,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&rr(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=null==(s=this.Li)?void 0:s.length}catch(e){a.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===n5&&(a.$lib_custom_api_host=this.config.api_host),c=e!==t6||i?e!==t7||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,n),a=rr(a,c),e===t6&&d&&(a.title=d.title),!D(o)){var v=r.getTime()-o;a.$duration=parseFloat((v/1e3).toFixed(3))}_&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=rr({},p,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),L(this.config.property_denylist)?rt(this.config.property_denylist,function(e){delete a[e]}):th.error(ih+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var m=this.config.sanitize_properties;m&&(th.error(id),a=m(a,e));var y=this.Wi();return a.$process_person_profile=y,y&&!i&&this.Gi("_calculate_event_properties"),a}Yi(e,t,r){if(void 0===t&&(t=!0),void 0===r&&(r=!1),!this.persistence||!this.Wi()||this.Si&&!r)return e;var n,i=rr({},this.persistence.get_initial_props(),(null==(n=this.sessionPropsManager)?void 0:n.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(th.error(id),i=s(i,"$set_once")),t&&(this.Si=!0),$(i)?void 0:i}register(e,t){var r;null==(r=this.persistence)||r.register(e,t)}register_once(e,t,r){var n;null==(n=this.persistence)||n.register_once(e,t,r)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Xi(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var r;return null==(r=this.featureFlags)?void 0:r.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var r;return null==(r=this.featureFlags)?void 0:r.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var r;return null==(r=this.featureFlags)?void 0:r.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,r){var n;null==(n=this.featureFlags)||n.updateFlags(e,t,r)}updateEarlyAccessFeatureEnrollment(e,t,r){var n;null==(n=this.featureFlags)||n.updateEarlyAccessFeatureEnrollment(e,t,r)}getEarlyAccessFeatures(e,t,r){var n;return void 0===t&&(t=!1),null==(n=this.featureFlags)?void 0:n.getEarlyAccessFeatures(e,t,r)}on(e,t){return this.ki.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:ic}),()=>{})}onSessionId(e){var t,r;return null!=(t=null==(r=this.sessionManager)?void 0:r.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:ic})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:ic})}renderSurvey(e,t){var r;null==(r=this.surveys)||r.renderSurvey(e,t)}displaySurvey(e,t){var r;void 0===t&&(t=it),null==(r=this.surveys)||r.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,r;return null!=(t=null==(r=this.surveys)?void 0:r.canRenderSurvey(e))?t:{visible:!1,disabledReason:ic}}canRenderSurveyAsync(e,t){var r,n;return void 0===t&&(t=!1),null!=(r=null==(n=this.surveys)?void 0:n.canRenderSurveyAsync(e,t))?r:Promise.resolve({visible:!1,disabledReason:ic})}Ji(e){return!e||z(e)?(th.critical("Unique user id has not been set in posthog.identify"),!1):e===tY?(th.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(th.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
200ot a hardcoded string.'),!1)}identify(e,t,r){if(!this.__loaded||!this.persistence)return th.uninitializedWarning("posthog.identify");if(B(e)&&(e=e.toString(),th.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Ji(e)&&this.Gi("posthog.identify")){var n=this.get_distinct_id();this.register({$user_id:e}),this.get_property(t_)||this.register_once({$had_persisted_distinct_id:!0,$device_id:n},""),e!==n&&e!==this.get_property(tm)&&(this.unregister(tm),this.register({distinct_id:e}));var i,s=(this.persistence.get_property(tW)||t1)===t1;e!==n&&s?(this.persistence.set_property(tW,t2),this.setPersonPropertiesForFlags({$set:t||{},$set_once:r||{}},!1),this.capture(t8,{distinct_id:e,$anon_distinct_id:n},{$set:t||{},$set_once:r||{}}),this.Ei=n0(e,t,r),null==(i=this.featureFlags)||i.setAnonymousDistinctId(n)):(t||r)&&this.setPersonProperties(t,r),e!==n&&(this.reloadFeatureFlags(),this.unregister(t$))}}setPersonProperties(e,t){if((e||t)&&this.Gi("posthog.setPersonProperties")){var r=n0(this.get_distinct_id(),e,t);this.Ei!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Ei=r):th.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,r){if(e&&t){var n=this.getGroups(),i=n[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:k({},n,{[e]:t})}),i||r){var s={$group_type:e,$group_key:t};r&&(s.$group_set=r),this.capture(t9,s)}r&&this.setGroupPropertiesForFlags({[e]:r}),i&&!r&&this.reloadFeatureFlags()}else th.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var r;void 0===t&&(t=!0),null==(r=this.featureFlags)||r.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var r;void 0===t&&(t=!0),this.Gi("posthog.setGroupPropertiesForFlags")&&(null==(r=this.featureFlags)||r.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){if(th.info("reset"),!this.__loaded)return th.uninitializedWarning("posthog.reset");var t,r,n,i,s,o,a,l,u=this.get_property(t_);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(r=this.sessionPersistence)||r.clear(),null==(n=this.surveys)||n.reset(),null==(i=this.Hi)||i.stop(),null==(s=this.featureFlags)||s.reset(),null==(o=this.conversations)||o.reset(),null==(a=this.persistence)||a.set_property(tW,t1),null==(l=this.sessionManager)||l.resetSessionId(),this.Ei=null,this.config.cookieless_mode===t0)this.register_once({distinct_id:tY,$device_id:null},"");else{var c=this.config.get_device_id(rg());this.register_once({distinct_id:c,$device_id:e?c:u},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var r;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(r=this.conversations)||r.Ki()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.Qi()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&r){var i,s=null!=(i=e.timestampLookBack)?i:10;if(!r)return n;n+="?t="+Math.max(Math.floor(((new Date).getTime()-r)/1e3)-s,0)}return n}
200alias(e,t){return e===this.get_property(tv)?(th.critical("Attempting to create alias for existing People user - aborting."),-2):this.Gi("posthog.alias")?(D(t)&&(t=this.get_distinct_id()),e!==t?(this.Xi(tm,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(th.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=k({},this.config);if(U(e)){rr(this.config,iy(e));var r,n,i,s,o,a,l,u,c,d=this.Fi();null==(r=this.persistence)||r.update_config(this.config,t,d),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r2(k({},this.config,{persistence:"sessionStorage"}),d);var h=this.Ri(this.config.debug);K(h)&&(this.config.debug=h),K(this.config.debug)&&(this.config.debug?(b.DEBUG=!0,rw.Yt()&&rw.Xt("ph_debug",!0),th.info("set_config",{config:e,oldConfig:t,newConfig:k({},this.config)})):(b.DEBUG=!1,rw.Yt()&&rw.Jt("ph_debug"))),null==(n=this.exceptionObserver)||n.onConfigChange(),null==(i=this.sessionRecording)||i.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(o=this.heatmaps)||o.startIfEnabled(),null==(a=this.exceptionObserver)||a.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(u=this.surveys)||u.loadIfEnabled(),this.tn(),null==(c=this.externalIntegrations)||c.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){b.LIB_NAME=e,b.LIB_VERSION=t}startSessionRecording(e){var t,r,n,i,s,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(r=this.sessionRecording)||r.overrideSampling()),a.linked_flag&&(null==(n=this.sessionRecording)||n.overrideLinkedFlag()),a.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),a.event_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var r=Error("PostHog syntheticException"),n=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(k({},n,t))}}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,r;return null!=(t=null==(r=this.toolbar)?void 0:r.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:ig;return t!==ig&&(t=ig+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(tW))===t2||(null==(t=this.sessionPersistence)?void 0:t.get_property(tW))===t2}Wi(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===t3&&!this._isIdentified()&&$(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[tm])&&(null==(t=this.persistence)||null==(t=t.props)||!t[tG]))}Vi(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Wi()||this.Gi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Gi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Gi(e){return"never"===this.config.person_profiles?(th.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Xi(tG,!0),!0)}Fi(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==tZ)}tn(){var e,t,r,n,i=this.Fi();return(null==(e=this.persistence)?void 0:e.gr)!==i&&(null==(r=this.persistence)||r.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t.gr)!==i&&(null==(n=this.sessionPersistence)||n.set_disabled(i)),i}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==t0){if(this.config.cookieless_mode===tZ&&this.consent.isExplicitlyOptedOut()){this.reset(!0),null==(i=this.sessionManager)||i.destroy(),null==(s=this.pageViewM
200anager)||s.destroy(),this.sessionManager=new nJ(this),this.pageViewManager=new rF(this),this.persistence&&(this.sessionPropsManager=new nG(this,this.sessionManager,this.persistence));var r,n,i,s,o,a,l,u=null!=(o=null==(a=this.config.__extensionClasses)?void 0:a.sessionRecording)?o:null==(l=iw.__defaultExtensionClasses)?void 0:l.sessionRecording;u&&(this.sessionRecording=this.Ii(this.sessionRecording,new u(this)))}this.consent.optInOut(!0),this.tn(),this.Zi(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==tZ&&(null==(r=this.surveys)||r.loadIfEnabled()),(D(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(n=null==e?void 0:e.captureEventName)?n:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.$i()}else th.warn(iu)}opt_out_capturing(){var e,t,r;this.config.cookieless_mode!==t0?(this.config.cookieless_mode===tZ&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.tn(),this.config.cookieless_mode===tZ&&(this.register({distinct_id:tY,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),null==(t=this.pageViewManager)||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(r=this.sessionRecording)||r.stopRecording(),this.sessionRecording=void 0,this.$i())):th.warn(iu)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===t0||(this.config.cookieless_mode===tZ?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.tn()}_is_bot(){return c?nQ(c,this.config.custom_blocked_useragents):void 0}$i(){d&&("visible"===d.visibilityState?this.xi||(this.xi=!0,this.capture(t6,{title:d.title},{send_instantly:!0}),this.Ti&&(d.removeEventListener(t5,this.Ti),this.Ti=null)):this.Ti||(this.Ti=this.$i.bind(this),rl(d,t5,this.Ti)))}debug(e){!1===e?(null==l||l.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==l||l.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Tr(){var e,t,r,n,i=this.Ni||{};return"advanced_disable_flags"in i?!!i.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(th.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",r=(e="advanced_disable_flags")in i&&!W(i[e]),n=t in i&&!W(i[t]),r?i[e]:!!n&&(th&&th.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),i[t]))}Ui(e){if(W(this.config.before_send))return e;var t=L(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var n of t){if(W(r=n(r))){var i="Event '"+e.event+"' was rejected in beforeSend function";return q(e.event)?th.warn(i+". This can cause unexpected behavior."):th.info(i),null}r.properties&&!$(r.properties)||th.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return null==(e=this.pageViewManager.lr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(r)})}Ri(e){var t=K(e)&&!e,r=rw.Yt()&&"true"===rw.Wt("ph_debug");return!t&&(!!r||e)}}function iE(e){return e instanceof Element&&(e.id===tX||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function ik(e){return!!e&&1===e.nodeType}function iS(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}
200function iP(e){return!!e&&3===e.nodeType}function ix(e){return!!e&&11===e.nodeType}function iR(e){return e?T(e).split(/\s+/):[]}function iO(e){var t=null==l?void 0:l.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function iC(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return iR(t)}function iT(e){return W(e)?null:T(e).split(/(\s+)/).filter(e=>iG(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function ij(e){var t="";return iN(e)&&!iz(e)&&e.childNodes&&e.childNodes.length&&rt(e.childNodes,function(e){var r;iP(e)&&e.textContent&&(t+=null!=(r=iT(e.textContent))?r:"")}),T(t)}function iI(e){var t;return D(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}iw.__defaultExtensionClasses={},function(e,t){for(var r=0;t.length>r;r++)e.prototype[t[r]]=rs(e.prototype[t[r]])}(iw,["identify"]);var iA=["a","button","form","input","select","textarea","label"];function iM(e,t){if(D(t))return!0;var r,n=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var i of e)if(r=n(i))return r.v;return!1}function iL(e){var t=e.parentNode;return!(!t||!ik(t))&&t}var iF=["next","previous","prev",">","<"],iU=[".ph-no-rageclick",".ph-no-capture"],i$=e=>!e||iS(e,"html")||!ik(e),iD=(e,t)=>{if(!l||i$(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],i=e;i.parentNode&&!iS(i,"body");)if(ix(i.parentNode))n.push(i.parentNode.host),i=i.parentNode.host;else{var s=iL(i);if(!s)break;if(t||iA.indexOf(s.tagName.toLowerCase())>-1)r=!0;else{var o=l.getComputedStyle(s);o&&"pointer"===o.getPropertyValue("cursor")&&(r=!0)}n.push(s),i=s}return{parentIsUsefulElement:r,targetElementList:n}};function iN(e){for(var t=e;t.parentNode&&!iS(t,"body");t=t.parentNode){var r=iC(t);if(C(r,"ph-sensitive")||C(r,"ph-no-capture"))return!1}if(C(iC(e),"ph-include"))return!0;var n=e.type||"";if(N(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!N(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function iz(e){return!!(iS(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||iS(e,"select")||iS(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var iW="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",iB=RegExp("^(?:"+iW+")$"),iH=new RegExp(iW),iK="\\d{3}-?\\d{2}-?\\d{4}",iq=RegExp("^("+iK+")$"),iV=RegExp("("+iK+")");function iG(e,t){return void 0===t&&(t=!0),!(W(e)||N(e)&&(e=T(e),(t?iB:iH).test((e||"").replace(/[- ]/g,""))||(t?iq:iV).test(e)))&&!0}function iX(e){var t=ij(e);return iG(t=(t+" "+function e(t){var r="";return t&&t.childNodes&&t.childNodes.length&&rt(t.childNodes,function(t){var n;if(t&&"span"===(null==(n=t.tagName)?void 0:n.toLowerCase()))try{var i=ij(t);r=(r+" "+i).trim(),t.childNodes&&t.childNodes.length&&(r=(r+" "+e(t)).trim())}catch(e){th.error("[AutoCapture]",e)}}),r}(e)).trim())?t:""}function iY(e){return e.replace(/"|\\"/g,'\\"')}class iJ{constructor(e){this.disabled=!1===e;var t=U(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,r){if(this.disabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(t-n.y)<this.thresholdPx&&this.timeoutMs>r-n.timestamp){if(this.clicks.push({x:e,y:t,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:r}];return!1}}var iQ="$copy_autocapture",iZ=tp("[AutoCapture]");function i0(e,t){return t.length>e?t.slice(0,e)+"...":t}var i1=tp("[ExceptionAutocapture]");function i2(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return F(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}var i3=tp("[TracingHeaders]"),i5=tp("[Web Vitals]"),i4="disabled",i6="lazy_loading",i7="awaiting_config",i8="missing_config";tp("[SessionRecording]");var i9="[SessionRecording]",se=tp(i9),st=tp("[Heatmaps]");function sr(e){return U(e)&&"clientX"in e&&"clientY"in e&&B(e.clientX)&&B(e.clientY)}var sn=tp("[Product Tours]"),si="ph_product_tours",ss=["$set_once","$set"],so=tp("[SiteApps]"),sa="Error while initializing PostHog app with config id ";function sl(e,t,r){if(W(e))return!1;switch(r){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class su{constructor(e){this.en=new nX,this.rn=(e,t)=>this.nn(e,t)&&this.sn(e,t)&&this.an(e,t)&&this.ln(e,t),this.nn=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.un=new Set,this.hn=new Set}init(){var e,t;D(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,r;if(!D(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e
vendor: 4,991 bytes, line 200
200=>{var t,r;null==(t=this.hn)||t.add(e),null==(r=e.steps)||r.forEach(e=>{var t;null==(t=this.un)||t.add((null==e?void 0:e.event)||"")})}),null!=(r=this._instance)&&r.autocapture)){var n,i=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&i.add(null==e?void 0:e.selector)})}),null==(n=this._instance)||n.autocapture.setElementSelectors(i)}}on(e,t){var r;null!=t&&0!=e.length&&(this.un.has(e)||this.un.has(null==t?void 0:t.event))&&this.hn&&(null==(r=this.hn)?void 0:r.size)>0&&this.hn.forEach(e=>{this.cn(t,e)&&this.en.emit("actionCaptured",e.name)})}dn(e){this.onAction("actionCaptured",t=>e(t))}cn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var r of t.steps)if(this.rn(e,r))return!0;return!1}onAction(e,t){return this.en.on(e,t)}sn(e,t){if(null!=t&&t.url){var r,n=null==e||null==(r=e.properties)?void 0:r.$current_url;if(!n||"string"!=typeof n||!sl(n,t.url,t.url_matching||"contains"))return!1}return!0}an(e,t){return!!this.vn(e,t)&&!!this.fn(e,t)&&!!this.pn(e,t)}vn(e,t){if(null==t||!t.href)return!0;var r=this.gn(e);if(r.length>0)return r.some(e=>sl(e.href,t.href,t.href_matching||"exact"));var n,i,s=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!s&&sl((i=s.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")}fn(e,t){if(null==t||!t.text)return!0;var r=this.gn(e);if(r.length>0)return r.some(e=>sl(e.text,t.text,t.text_matching||"exact")||sl(e.$el_text,t.text,t.text_matching||"exact"));var n,i,s,o,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,r=[],n=/(?::|")text="(.*?)"/g;!W(t=n.exec(e));)r.includes(t[1])||r.push(t[1]);return r}(a),s=t.text,o=t.text_matching||"exact",i.some(e=>sl(e,s,o)))}pn(e,t){if(null==t||!t.selector)return!0;var r,n,i=null==e||null==(r=e.properties)?void 0:r.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var s=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";if(t.selector_regex&&s)try{return new RegExp(t.selector_regex).test(s)}catch(e){}return!1}gn(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}ln(e,t){return null==t||!t.properties||0===t.properties.length||n3(t.properties.reduce((e,t)=>{var r=L(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:r,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class sc{constructor(e){this._instance=e,this.mn=new Map,this.yn=new Map,this.bn=new Map}wn(e,t){return!!e&&n3(e.propertyFilters,null==t?void 0:t.properties)}_n(e,t){var r=new Map;return e.forEach(e=>{var n;null==(n=e.conditions)||null==(n=n[t])||null==(n=n.values)||n.forEach(t=>{if(null!=t&&t.name){var n=r.get(t.name)||[];n.push(e.id),r.set(t.name,n)}})}),r}In(e,t,r){var n=(r===r3.Activation?this.mn:this.yn).get(e),i=[];return this.Cn(e=>{i=e.filter(e=>null==n?void 0:n.includes(e.id))}),i.filter(n=>{var i,s=null==(i=n.conditions)||null==(i=i[r])||null==(i=i.values)?void 0:i.find(t=>t.name===e);return this.wn(s,t)})}register(e){var t;D(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Sn(e),this.kn(e))}kn(e){var t=e.filter(e=>{var t,r;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0});0!==t.length&&(null==this.xn&&(this.xn=new su(this._instance),this.xn.init(),this.xn.dn(e=>{this.onAction(e)})),t.forEach(e=>{var t,r,n,i,s;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(r=e.conditions)&&null!=(r=r.actions)&&r.values&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0&&(null==(i=this.xn)||i.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach(t=>{if(t&&t.name){var r=this.bn.get(t.name);r&&r.push(e.id),this.bn.set(t.name,r||[e.id])}}))}))}Sn(e){var t,r=e.filter(e=>{var t,r;return(null==(t=e.conditions)?void 0:t.events)&&(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.length)>0}),n=e.filter(e=>{var t,r;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(r=e.conditions)||null==(r=r.cancelEvents)||null==(r=r.values)?void 0:r.length)>0});0===r.length&&0===n.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.mn=this._n(e,r3.Activation),this.yn=this._n(e,r3.Cancellation))}onEvent(e,t){var r,n=this.re(),i=this.Tn(),s=this.An(),o=(null==(r=this._instance)||null==(r=r.persistence)?void 0:r.props[i])||[];if(s===e&&t&&o.length>0){n.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var a,l,u=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=o.indexOf(u);0>c||(o.splice(c,1),this.En(o))}}else{if(this.yn.has(e)){var d=this.In(e,t,r3.Cancellation);d.length>0&&(n.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map(e=>e.id)}
200),d.forEach(e=>{var t=o.indexOf(e.id);0>t||o.splice(t,1),this.Rn(e.id)}),this.En(o))}if(this.mn.has(e)){n.info("event name matched",{event:e,eventPayload:t,items:this.mn.get(e)});var h=this.In(e,t,r3.Activation);this.En(o.concat(h.map(e=>e.id)||[]))}}}onAction(e){var t,r=this.Tn(),n=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[r])||[];this.bn.has(e)&&this.En(n.concat(this.bn.get(e)||[]))}En(e){var t,r=this.re(),n=this.Tn(),i=[...new Set(e)].filter(e=>!this.Nn(e));r.info("updating activated items",{activatedItems:i}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[n]:i})}getActivatedIds(){var e,t=this.Tn();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.mn}Mn(){return this.xn}}class sd extends sc{constructor(e){super(e)}Tn(){return"$surveys_activated"}An(){return r4.SHOWN}Cn(e){var t;null==(t=this._instance)||t.getSurveys(e)}Rn(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}re(){return n7}Nn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var sh="SDK is not enabled or survey functionality is not yet loaded",sp="Disabled. Not loading surveys.",sf=null!=l&&l.location?rN(l.location.hash,"__posthog")||rN(location.hash,"state"):null,sg="_postHogToolbarParams",sv=tp("[Toolbar]"),s_=tp("[FeatureFlags]"),sm=tp("[FeatureFlags]",{debugEnabled:!0}),sy="\" failed. Feature flags didn't load in time.",sb="$active_feature_flags",sw="$override_feature_flags",sE="$feature_flag_payloads",sk="$override_feature_flag_payloads",sS="$feature_flag_request_id",sP=e=>{for(var t={},r=0;e.length>r;r++)t[e[r]]=!0;return t},sx=e=>{var t={};for(var[r,n]of rn(e||{}))n&&(t[r]=n);return t},sR=tp("[Error tracking]"),sO="Refusing to render web experiment since the viewer is a likely bot",sC={icontains:(e,t)=>!!l&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!l&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!l&&nZ(t.href,e),not_regex:(e,t)=>!!l&&!nZ(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class sT{get Rt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{sT.Fn("retrieved web experiments from the server"),t.On=new Map,e.forEach(e=>{if(e.feature_flag_key){t.On&&(sT.Fn("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(r=t.On)||r.set(e.feature_flag_key,e));var r,n=t._instance.getFeatureFlag(e.feature_flag_key);N(n)&&e.variants[n]&&t.Pn(e.name,n,e.variants[n].transforms)}else if(e.variants)for(var i in e.variants){var s=e.variants[i];sT.Ln(s)&&t.Pn(e.name,i,s.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())sT.Fn(sO);else if(!this.Rt.disable_web_experiments){if(W(this.On))return this.On=new Map,this.loadIfEnabled(),void this.previewWebExperiment();sT.Fn("applying feature flags",e),e.forEach(e=>{var t;if(this.On&&null!=(t=this.On)&&t.has(e)){var r,n=this._instance.getFeatureFlag(e),i=null==(r=this.On)?void 0:r.get(e);n&&null!=i&&i.variants[n]&&this.Pn(i.name,n,i.variants[n].transforms)}})}}previewWebExperiment(){var e=sT.getWindowLocation();if(null!=e&&e.search){var t=r$(null==e?void 0:e.search,"__experiment_id"),r=r$(null==e?void 0:e.search,"__experiment_variant");t&&r&&(sT.Fn("previewing web experiments "+t+" && "+r),this.getWebExperiments(e=>{this.Dn(parseInt(t),r,e)},!1,!0))}}loadIfEnabled(){this.Rt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,r){if(this.Rt.disable_web_experiments&&!r)return e([]);var n=this._instance.get_property("$web_experiments");if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Rt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}Dn(e,t,r){var n=r.filter(t=>t.id===e);n&&n.length>0&&(sT.Fn("Previewing web experiment ["+n[0].name+"] with variant ["+t+"]"),this.Pn(n[0].name,t,n[0].variants[t].transforms))}static Ln(e){return!W(e.conditions)&&sT.Bn(e)&&sT.jn(e)}static Bn(e){if(W(e.conditions)||W(null==(t=e.conditions)?void 0:t.url))return!0;var t,r,n,i,s=sT.getWindowLocation();return!!s&&(null==(r=e.conditions)||!r.url||sC[null!=(n=null==(i=e.conditions)?void 0:i.urlMatchType)?n:"icontains"](e.conditions.url,s))}
200static getWindowLocation(){return null==l?void 0:l.location}static jn(e){if(W(e.conditions)||W(null==(r=e.conditions)?void 0:r.utm))return!0;var t=rq();if(t.utm_source){var r,n,i,s,o,a,l,u,c,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==t.utm_campaign,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,f=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return d&&p&&f&&h}return!1}static Fn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];th.info("[WebExperiments] "+e,r)}Pn(e,t,r){this._is_bot()?sT.Fn(sO):"control"!==t?r.forEach(r=>{if(r.selector){sT.Fn("applying transform of variant "+t+" for experiment "+e+" ",r);var n,i=null==(n=document)?void 0:n.querySelectorAll(r.selector);null==i||i.forEach(e=>{r.html&&(e.innerHTML=r.html),r.css&&e.setAttribute("style",r.css)})}}):sT.Fn("Control variants leave the page unmodified.")}_is_bot(){return c&&this._instance?nQ(c,this.Rt.custom_blocked_useragents):void 0}}var sj=tp("[Conversations]"),sI="Conversations not available yet.",sA={featureFlags:class{constructor(e){this.qn=!1,this.Zn=!1,this.$n=!1,this.Hn=!1,this.Vn=!1,this.zn=!1,this.Yn=!1,this.Un=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Rt(){return this._instance.config}get Kr(){return this._instance.persistence}Wn(e){return this._instance.get_property(e)}Gn(){var e,t;return null!=(e=null==(t=this.Kr)?void 0:t.mr(this.Rt.feature_flag_cache_ttl_ms))&&e}Xn(){return!!this.Gn()&&(this.Un||this.$n||(this.Un=!0,s_.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Jn(){var e,t=null!=(e=this.Rt.evaluation_contexts)?e:this.Rt.evaluation_environments;return!this.Rt.evaluation_environments||this.Rt.evaluation_contexts||this.Yn||(s_.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Yn=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||s_.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}Kn(){return this.Jn().length>0}initialize(){var e,t,{config:r}=this._instance,n=null!=(e=null==(t=r.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(n).length){var i,s,o=null!=(i=null==(s=r.bootstrap)?void 0:s.featureFlagPayloads)?i:{},a=Object.keys(n).filter(e=>!!n[e]).reduce((e,t)=>(e[t]=n[t]||!1,e),{}),l=Object.keys(o).filter(e=>a[e]).reduce((e,t)=>(o[t]&&(e[t]=o[t]),e),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(e,t,r){var n=null!=r&&r.merge?this.getFlagVariants():{},i=null!=r&&r.merge?this.getFlagPayloads():{},s=k({},n,e),o=k({},i,t),a={};for(var[l,u]of Object.entries(s)){var c="string"==typeof u;a[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:D(null==o?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.Zn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.Wn(tM),t=this.Wn(sw),r=this.Wn(sk);if(!r&&!t)return e||{};var n=rr({},e||{});for(var i of[...new Set([...Object.keys(r||{}),...Object.keys(t||{})])]){var s,o,a=n[i],l=null==t?void 0:t[i],u=D(l)?null!=(s=null==a?void 0:a.enabled)&&s:!!l,c=D(l)?a.variant:"string"==typeof l?l:void 0,d=null==r?void 0:r[i],h=k({},a,{enabled:u,variant:u?null!=c?c:null==a?void 0:a.variant:void 0});u!==(null==a?void 0:a.enabled)&&(h.original_enabled=null==a?void 0:a.enabled),c!==(null==a?void 0:a.variant)&&(h.original_variant=null==a?void 0:a.variant),d&&(h.metadata=k({},null==a?void 0:a.metadata,{payload:d,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),n[i]=h}return this.qn||(s_.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:n}),this.qn=!0),n}getFlagVariants(){var e=this.Wn(tI),t=this.Wn(sw);if(!t)return e||{};for(var r=rr({},e),n=Object.keys(t),i=0;n.length>i;i++)r[n[i]]=t[n[i]];
200return this.qn||(s_.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:r}),this.qn=!0),r}getFlagPayloads(){var e=this.Wn(sE),t=this.Wn(sk);if(!t)return e||{};for(var r=rr({},e||{}),n=Object.keys(t),i=0;n.length>i;i++)r[n[i]]=t[n[i]];return this.qn||(s_.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:r}),this.qn=!0),r}reloadFeatureFlags(){this.Hn||this.Rt.advanced_disable_feature_flags||this.Qn||(this._instance.ki.emit("featureFlagsReloading",!0),this.Qn=setTimeout(()=>{this.ts()},5))}es(){clearTimeout(this.Qn),this.Qn=void 0}ensureFlagsLoaded(){this.Zn||this.$n||this.Qn||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Hn=e}ts(e){var t;if(this.es(),!this._instance.Tr())if(this.$n)this.Vn=!0;else{var r=this.Rt.token,n=this.Wn(t_),i={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:k({},(null==(t=this.Kr)?void 0:t.get_initial_props())||{},this.Wn(tL)||{}),group_properties:this.Wn(tF),timezone:r0()};null===n||D(n)||(i.$device_id=n),(null!=e&&e.disableFlags||this.Rt.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.Kn()&&(i.evaluation_contexts=this.Jn());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Rt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.$n=!0,this._instance._send_request({method:"POST",url:s,data:i,compression:this.Rt.disable_compression?void 0:ni.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback:e=>{var t,r,n,s=!0;if(200===e.statusCode&&(this.Vn||(this.$anon_distinct_id=void 0),s=!1),this.$n=!1,!i.disable_flags||this.Vn){this.zn=!s;var o=[];e.error?e.error instanceof Error?o.push("AbortError"===e.error.name?"timeout":"connection_error"):o.push("unknown_error"):200!==e.statusCode&&o.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&o.push("errors_while_computing_flags");var a,l=!(null==(r=e.json)||null==(r=r.quotaLimited)||!r.includes("feature_flags"));(l&&o.push("quota_limited"),null==(n=this.Kr)||n.register({[tN]:o}),l)?s_.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!=(a=e.json)?a:{},s),this.Vn&&(this.Vn=!1,this.ts()))}}})}}getFeatureFlag(e,t){var r;if(void 0===t&&(t={}),!t.fresh||this.zn)if(this.Zn||this.getFlags()&&this.getFlags().length>0){if(!this.Xn()){var n=this.getFeatureFlagResult(e,t);return null!=(r=null==n?void 0:n.variant)?r:null==n?void 0:n.enabled}}else s_.warn('getFeatureFlag for key "'+e+sy)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.zn)if(this.Zn||this.getFlags()&&this.getFlags().length>0){if(!this.Xn()){var r=this.getFlagVariants(),n=e in r,i=r[e],s=this.getFlagPayloads()[e],o=String(i),a=this.Wn(sS)||void 0,l=this.Wn(tz)||void 0,u=this.Wn(t$)||{};if(this.Rt.advanced_feature_flags_dedup_per_session){var c,d=this._instance.get_session_id(),h=this.Wn(tD);d&&d!==h&&(u={},null==(c=this.Kr)||c.register({[t$]:u,[tD]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(o))){L(u[e])?u[e].push(o):u[e]=[o],null==(v=this.Kr)||v.register({[t$]:u});var p=this.getFeatureFlagDetails(e),f=[...null!=(_=this.Wn(tN))?_:[]];D(i)&&f.push("flag_missing");var g={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:s||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.Rt.bootstrap)||null==(m
200=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(y=this.Rt.bootstrap)||null==(y=y.featureFlagPayloads)?void 0:y[e])||null,$used_bootstrap_value:!this.zn};D(null==p||null==(b=p.metadata)?void 0:b.version)||(g.$feature_flag_version=p.metadata.version);var v,_,m,y,b,w,E,k,S,P,x,R=null!=(w=null==p||null==(E=p.reason)?void 0:E.description)?w:null==p||null==(k=p.reason)?void 0:k.code;R&&(g.$feature_flag_reason=R),null!=p&&null!=(S=p.metadata)&&S.id&&(g.$feature_flag_id=p.metadata.id),D(null==p?void 0:p.original_variant)&&D(null==p?void 0:p.original_enabled)||(g.$feature_flag_original_response=D(p.original_variant)?p.original_enabled:p.original_variant),null!=p&&null!=(P=p.metadata)&&P.original_payload&&(g.$feature_flag_original_payload=null==p||null==(x=p.metadata)?void 0:x.original_payload),f.length&&(g.$feature_flag_error=f.join(",")),this._instance.capture("$feature_flag_called",g)}if(n){var O=s;if(!D(s))try{O=JSON.parse(s)}catch(e){}return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:O}}}}else s_.warn('getFeatureFlagResult for key "'+e+sy)}getRemoteConfigPayload(e,t){var r=this.Rt.token,n={distinct_id:this._instance.get_distinct_id(),token:r};this.Kn()&&(n.evaluation_contexts=this.Jn()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.Rt.disable_compression?void 0:ni.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback(r){var n,i=null==(n=r.json)?void 0:n.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.zn){if(this.Zn||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,t);return D(r)?void 0:!!r}s_.warn('isFeatureEnabled for key "'+e+sy)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(this.Kr){this.Zn=!0;var r=this.getFlagVariants(),n=this.getFlagPayloads(),i=this.getFlagsWithDetails();!function(e,t,r,n,i){void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i={});var s,o=((s=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(s).map(e=>{var t;return[e,null!=(t=s[e].variant)?t:s[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(s).filter(e=>s[e].enabled).filter(e=>{var t;return null==(t=s[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=s[e].metadata)?void 0:t.payload]}))):s_.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),a=o.flags,l=o.featureFlags,u=o.featureFlagPayloads;if(l){var c=e.requestId,d=e.evaluatedAt;if(L(l)){s_.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(l)for(var p=0;l.length>p;p++)h[l[p]]=!0;t&&t.register({[sb]:l,[tI]:h})}else{var f=l,g=u,v=a;if(e.errorsWhileComputingFlags)if(a){var _=new Set(Object.keys(a).filter(e=>{var t;return!(null!=(t=a[e])&&t.failed)}));f=k({},r,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return _.has(t)}))),g=k({},n,Object.fromEntries(Object.entries(g||{}).filter(e=>{var[t]=e;return _.has(t)}))),v=k({},i,Object.fromEntries(Object.entries(v||{}).filter(e=>{var[t]=e;return _.has(t)})))}else f=k({},r,f),g=k({},n,g),v=k({},i,v);t&&t.register(k({[sb]:Object.keys(sx(f)),[tI]:f||{},[sE]:g||{},[tM]:v||{}},c?{[sS]:c}:{},d?{[tz]:d}:{}))}}}(e,this.Kr,r,n,i),t||(this.Un=!1),this.rs(t)}}override(e,t){void 0===t&&(t=!1),s_.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.Kr)return s_.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.Kr.unregister(sw),this.Kr.unregister(sk),this.rs(),sm.info("All overrides cleared");if(L(e)){var t,r=sP(e);return this.Kr.register({[sw]:r}),this.rs(),sm.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){if(this.qn=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this.Kr.unregister(sw),sm.info("Flag overrides cleared");else if(e.flags){if(L(e.flags)){var n=sP(e.flags);this.Kr.register({[sw]:n})}else this.Kr.register({[sw]:e.flags});sm.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this.Kr.unregister(sk),sm.info("Payload overrides cleared")):e.payloads&&(this.Kr.register({[sk]:e.payloads}),sm.info("Payload overrides set",{payloads:e.payloads}))),void this.rs()}if(e&&"object"==typeof e)return this.Kr.register({[sw]:e}),this.rs(),sm.info("Flag overrides set",{flags:e});s_.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Zn){var{flags:t,flagVariants:r}=this.ns();e(t,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,r){var n,i=(this.Wn(tA)||[]).find(t=>t.flagKey===e),s={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:s};i&&(o.$early_access_feature_name=i.name),r&&(o.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(s,!1);var a=k({},this.getFlagVariants(),{[e]:t});null==(n=this.Kr)||n.register({[sb]:Object.keys(sx(a)),[tI]:a}),this.rs()}getEarlyAccessFeatures(e,t,r){void 0===t&&(t=!1);var n=this.Wn(tA),i=r?"&"+r.map(e=>"stage="+e).join("&"):"";if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Rt.token+i),method:"GET",callback:t=>{var r,n;if(t.json){var i=t.json.earlyAccessFeatures;return null==(r=this.Kr)||r.unregister(tA),null==(n=this.Kr)||n.register({[tA]:i}),e(i)}}})}ns(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,r)=>(e[r]=t[r],e),{})}}rs(e){var{flags:t,flagVariants:r}=this.ns();
200this.featureFlagEventHandlers.forEach(n=>n(t,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var r=this.Wn(tL)||{},n=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),i=null==e?void 0:e.$set_once,s={};if(i)for(var o in i)({}).hasOwnProperty.call(i,o)&&(o in r||(s[o]=i[o]));this._instance.register({[tL]:k({},r,s,n)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(tL)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var r=this.Wn(tF)||{};0!==Object.keys(r).length&&Object.keys(r).forEach(t=>{r[t]=k({},r[t],e[t]),delete e[t]}),this._instance.register({[tF]:k({},r,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.Wn(tF)||{};this._instance.register({[tF]:k({},t,{[e]:{}})})}else this._instance.unregister(tF)}reset(){this.Zn=!1,this.$n=!1,this.Hn=!1,this.Vn=!1,this.zn=!1,this.$anon_distinct_id=void 0,this.es(),this.qn=!1}}},sM=k({productTours:class{get Kr(){return this._instance.persistence}constructor(e){this.ho=null,this.co=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.Kr&&this.Kr.register({[tR]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.ho||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(tR)||this.nr(()=>this.do())}nr(e){var t,r;null!=(t=m.__PosthogExtensions__)&&t.generateProductTours?e():null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,"product-tours",t=>{t?sn.error("Could not load product tours script",t):e()})}do(){var e;!this.ho&&null!=(e=m.__PosthogExtensions__)&&e.generateProductTours&&(this.ho=m.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!L(this.co)||t){var r=this.Kr;if(r){var n=r.props[si];if(L(n)&&!t)return this.co=n,void e(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var n=t.statusCode;if(200!==n||!t.json){var i="Product Tours API could not be loaded, status: "+n;return sn.error(i),void e([],{isLoaded:!1,error:i})}var s=L(t.json.product_tours)?t.json.product_tours:[];this.co=s,r&&r.register({[si]:s}),e(s,{isLoaded:!0})}})}else e(this.co,{isLoaded:!0})}getActiveProductTours(e){W(this.ho)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.ho.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.ho)||t.showTourById(e)}previewTour(e){this.ho?this.ho.previewTour(e):this.nr(()=>{var t;this.do(),null==(t=this.ho)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.ho)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.ho)||e.nextStep()}previousStep(){var e;null==(e=this.ho)||e.previousStep()}clearCache(){var e;this.co=null,null==(e=this.Kr)||e.unregister(si)}resetTour(e){var t;null==(t=this.ho)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.ho)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.ho)||t.cancelPendingTour(e)}}},sA),sL=k({surveys:class{get Rt(){return this._instance.config}constructor(e){this._o=void 0,this._surveyManager=null,this.Io=!1,this.Co=[],this.So=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Rt.disable_surveys){var t=e.surveys;if(W(t))return n7.warn("Flags not loaded yet. Not loading surveys.");var r=L(t);this._o=r?t.length>0:t,n7.info("flags response received, isSurveysEnabled: "+this._o),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var r=localStorage.key(t);(null!=r&&r.startsWith(n8)||null!=r&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.Io)n7.info("Already initializing surveys, skipping...");else if(this.Rt.disable_surveys)n7.info(sp);else if(this.Rt.cookieless_mode&&this._instance.consent.isOptedOut())n7.info("Not loading surveys in cookieless mode without consent.");else{var e=null==m?void 0:m.__PosthogExtensions__;if(e){if(!D(this._o)||this.Rt.advanced_enable_surveys){var t=this._o||this.Rt.advanced_enable_surveys;this.Io=!0;try{var r=e.generateSurveys;if(r)return void this.ko(r,t);var n=e.loadExternalDependency;if(!n)return void this.xo(tQ);n(this._instance,"surveys",r=>{r||!e.generateSurveys?this.xo("Could not load surveys script",r):this.ko(e.generateSurveys,t)})}catch(e){throw this.xo("Error initializing surveys",e),e}finally{this.Io=!1}}}else n7.error("PostHog Extensions not found.")}}ko(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new sd(this._instance),n7.info("Surveys loaded successfully"),this.To({isLoaded:!0})}xo(e,t){n7.error(e,t),this.To({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Co.push(e),this._surveyManager&&this.To({isLoaded:!0}),()=>{this.Co=this.Co.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.Rt.disable_surveys)return n7.info(sp),e([]);var r,n=this._instance.get_property(tU);if(n&&!t)return e(n,{isLoaded:!0});"undefined"!=typeof Promise&&this.So?this.So.then(t=>{var{surveys:r,context:n}=t;return e(r,n)}):("undefined"!=typeof Promise&&(this.So=new Promise(e=>{r=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Rt.token),method:"GET",timeout:this.Rt.surveys_request_timeout_ms,callback:t=>{this.So=null;var n=t.statusCode;if(200!==n||!t.json){var i="Surveys API could not be loaded, status: "+n;n7.error(i);var s={isLoaded:!1,error:i};return e([],s),void(null==r||r({surveys:[],context:s}))}var o,a,l=t.json.surveys||[],u=l.filter(e=>{var t,r;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)||!r.length))});u.length>0&&(null==(a=this._surveyEventReceiver)||a.register(u)),null==(o=this._instance.persistence)||o.register({[tU]:l});var c={isLoaded:!0};e(l,c),null==r||r({surveys:l,context:c})}}))}
200To(e){for(var t of this.Co)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){n7.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!W(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);n7.warn("init was not called")}Ao(e){var t=null;return this.getSurveys(r=>{var n;t=null!=(n=r.find(t=>t.id===e))?n:null}),t}Eo(e){if(W(this._surveyManager))return{eligible:!1,reason:sh};var t="string"==typeof e?this.Ao(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(W(this._surveyManager))return n7.warn("init was not called"),{visible:!1,disabledReason:sh};var t=this.Eo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return W(this._surveyManager)?(n7.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:sh})):new Promise(r=>{this.getSurveys(t=>{var n,i=null!=(n=t.find(t=>t.id===e))?n:null;if(i){var s=this.Eo(i);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,r){var n;if(W(this._surveyManager))n7.warn("init was not called");else{var i="string"==typeof e?this.Ao(e):e;if(null!=i&&i.id)if(ie.includes(i.type)){var s=null==d?void 0:d.querySelector(t);if(s)return null!=(n=i.appearance)&&n.surveyPopupDelaySeconds?(n7.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;n7.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(i,s,r),n7.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s,r);n7.warn("Survey element not found")}else n7.warn("Surveys of type "+i.type+" cannot be rendered in the app");else n7.warn("Survey not found")}}displaySurvey(e,t){var r;if(W(this._surveyManager))n7.warn("init was not called");else{var n=this.Ao(e);if(n){var i=n;if(null!=(r=n.appearance)&&r.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=k({},n,{appearance:k({},n.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==r7.Popover&&t.initialResponses&&n7.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var s=this.canRenderSurvey(n);if(!s.visible)return void n7.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==r7.Inline?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else n7.warn("Survey not found")}}cancelPendingSurvey(e){W(this._surveyManager)?n7.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},sA),sF=k({experiments:sT},sA),sU=k({},sA,{sessionRecording:class{get Rt(){return this._instance.config}get Kr(){return this._instance.persistence}get started(){var e;return!(null==(e=this.ss)||!e.isStarted)}get status(){var e,t;return this.os===i7||this.os===i8?this.os:null!=(e=null==(t=this.ss)?void 0:t.status)?e:this.os}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.os=i4,this.ls=void 0,this._instance=e,!this._instance.sessionManager)throw se.error("started without valid sessionManager"),Error(i9+" started without valid sessionManager. This is a bug.");if(this.Rt.cookieless_mode===t0)throw Error(i9+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get us(){var e,t=!(null==(e=this._instance.get_property(tC))||!e.enabled),r=!this.Rt.disable_session_recording,n=this.Rt.disable_session_recording||this._instance.consent.isOptedOut();return l&&t&&r&&!n}startIfEnabledOrStop(e){var t;if(!this.us||null==(t=this.ss)||!t.isStarted){var r=!D(Object.assign)&&!D(Array.from);this.us&&r?(this.hs(e),se.info("starting")):(this.os=i4,this.stopRecording())}}hs(e){var t,r,n;this.us&&(this.os!==i7&&this.os!==i8&&(this.os=i6),null!=m&&null!=(t=m.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(r=m.__PosthogExtensions__)&&r.initSessionRecording?this.cs(e):null==(n=m.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.ds,t=>{if(t)return se.error("could not load recorder",t);this.cs(e)}))}stopRecording(){var e,t;null==(e=this.ls)||e.call(this),this.ls=void 0,null==(t=this.ss)||t.stop()}vs(){var e,t;null==(e=this.ls)||e.call(this),this.ls=void 0,null==(t=this.ss)||t.discard()}fs(){var e;null==(e=this.Kr)||e.unregister(tj)}ps(e,t){if(W(e))return null;var r=B(e)?e:parseFloat(e);return"number"!=typeof r||!Number.isFinite(r)||0>r||r>1?(se.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}gs(e){if(this.Kr){var t,r,n=this.Kr,i=()=>{var t,r=!1===e.sessionRecording?void 0:e.sessionRecording,i=this.ps(null==(t=this.Rt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),s=this.ps(null==r?void 0:r.sampleRate,"remote config sampleRate"),o=null!=i?i:s;W(o)&&this.fs();var a=null==r?void 0:r.minimumDurationMilliseconds;n.register({[tC]:k({cache_timestamp:Date.now(),enabled:!!r},r,{networkPayloadCapture:k({capturePerformance:e.capturePerformance},null==r?void 0:r.networkPayloadCapture),canvasRecording:{enabled:null==r?void 0:r.recordCanvas,fps:null==r?void 0:r.canvasFps,quality:null==r?void 0:r.canvasQuality},sampleRate:o,minimumDurationMilliseconds:D(a)?null:a,endpoint:null==r?void 0:r.endpoint,triggerMatchType:null==r?void 0:r.triggerMatchType,masking:null==r?void 0:r.masking,urlTriggers:null==r?void 0:r.urlTriggers})})};i(),null==(t=this.ls)||t.call(this),this.ls=null==(r=this._instance.sessionManager)?void 0:r.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.gs(e),void this.vs()):(this.gs(e),void this.startIfEnabledOrStop()):(this.os===i7&&(this.os=i8,se.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var r;void 0===t&&(t="log"),null!=(r=this.ss)&&r.log?this.ss.log(e,t):se.warn("log called before recorder was ready")}get ds(){var e,t,r=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(tC);return(null==r||null==(t=r.scriptConfig)?void 0:t.script)||"lazy-recorder"}ys(){var e,t=this._instance.get_property(tC);if(!t)return!1;var r=null!=(e=("object"==typeof t?t:JSON.parse(t)).cache_timestamp)?e:Date.now();return 36e5>=Date.now()-r}cs(e){var t,r;if(null==(t=m.__PosthogExtensions__)||!t.initSessionRecording)return se.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0});if(this.ss||(this.ss=null==(r=m.__PosthogExtensions__)?void 0:r.initSessionRecording(this._instance),this.ss._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ys()){if
200(this.os===i8||this.os===i7)return;return this.os=i7,se.info("persisted remote config is stale, requesting fresh config before starting"),void new nn(this._instance).load()}this.os=i6,this.ss.start(e)}onRRwebEmit(e){var t;null==(t=this.ss)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ss||null==(t=this.Kr)||t.register({$replay_override_linked_flag:!0}),null==(e=this.ss)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ss||null==(t=this.Kr)||t.register({$replay_override_sampling:!0}),null==(e=this.ss)||e.overrideSampling()}overrideTrigger(e){var t,r;this.ss||null==(r=this.Kr)||r.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),null==(t=this.ss)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.ss)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var r;return!(null==(r=this.ss)||!r.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.bs=!1,this.ws=null,this._s=!1,this.instance=e,this.rageclicks=new iJ(e.config.rageclick),this.Is=null}initialize(){this.startIfEnabled()}get Rt(){var e,t,r=U(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=null==(e=r.url_allowlist)?void 0:e.map(e=>new RegExp(e)),r.url_ignorelist=null==(t=r.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),r}Cs(){if(this.isBrowserSupported()){if(l&&d){var e=e=>{e=e||(null==l?void 0:l.event);try{this.Ss(e)}catch(e){iZ.error("Failed to capture event",e)}};if(rl(d,"submit",e,{capture:!0}),rl(d,"change",e,{capture:!0}),rl(d,"click",e,{capture:!0}),this.Rt.capture_copied_text){var t=e=>{this.Ss(e=e||(null==l?void 0:l.event),iQ)};rl(d,"copy",t,{capture:!0}),rl(d,"cut",t,{capture:!0})}}}else iZ.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.bs&&(this.Cs(),this.bs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this._s=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[tb]:!!e.autocapture_opt_out}),this.ws=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Is=e}getElementSelectors(e){var t,r=[];return null==(t=this.Is)||t.forEach(t=>{var n=null==d?void 0:d.querySelectorAll(t);null==n||n.forEach(n=>{e===n&&r.push(t)})}),r}get isEnabled(){var e,t,r=null==(e=this.instance.persistence)?void 0:e.props[tb];if(null===this.ws&&!K(r)&&!this.instance.Tr())return!1;var n=null!=(t=this.ws)?t:!!r;return!!this.instance.config.autocapture&&!n}Ss(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var r,n=iI(e);iP(n)&&(n=n.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(r=this.rageclicks)&&r.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!l||i$(e)||(K(t)?(r=!!t&&iU,n=void 0):(r=null!=(i=null==t?void 0:t.css_selector_ignorelist)?i:iU,n=null==t?void 0:t.content_ignorelist),!1===r))return!1;var r,n,i,{targetElementList:s}=iD(e,!1);return!function(e,t){var r;if(!1===e||D(e))return!1;if(!0===e)r=iF;else{if(!L(e))return!1;if(e.length>10)return th.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;r=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:n}=e;return r.some(e=>t.includes(e)||n.includes(e))})}(n,s.map(e=>{var t;return{safeText:ij(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!iM(s,r)}(n,this.instance.config.rageclick)&&this.Ss(e,"$rageclick");var i=t===iQ;if(n&&function(e,t,r,n,i){if(void 0===r&&(r=void 0),!l||i$(e)||null!=(s=r)&&s.url_allowlist&&!iO(r.url_allowlist)||null!=(o=r)&&o.url_ignorelist&&iO(r.url_ignorelist))return!1;if(null!=(a=r)&&a.dom_event_allowlist){var s,o,a,u,c=r.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:d,targetElementList:h}=iD(e,n);if(!function(e,t){var r=null==t?void 0:t.element_allowlist;if(D(r))return!0;var n,i=function(e){if(r.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var s of e)if(n=i(s))return n.v;return!1}(h,r)||!iM(h,null==(u=r)?void 0:u.css_selector_allowlist))return!1;var p=l.getComputedStyle(e);
200if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var f=e.tagName.toLowerCase();switch(f){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(iA.indexOf(f)>-1||"true"===e.getAttribute("contenteditable"))}}(n,e,this.Rt,i,i?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:o}=function(e,t){for(var r,n,{e:i,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:u}=t,c=[e],d=e;d.parentNode&&!iS(d,"body");)ix(d.parentNode)?(c.push(d.parentNode.host),d=d.parentNode.host):(c.push(d.parentNode),d=d.parentNode);var h,p=[],f={},g=!1,v=!1;if(rt(c,e=>{var t=iN(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&iG(g)&&g),C(iC(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,r,n){var i=e.tagName.toLowerCase(),s={tag_name:i};iA.indexOf(i)>-1&&!r&&(s.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?i0(1024,iX(e)):i0(1024,ij(e)));var o=iC(e);o.length>0&&(s.classes=o.filter(function(e){return""!==e})),rt(e.attributes,function(r){var i;if((!iz(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&(null==n||!n.includes(r.name))&&!t&&iG(r.value)&&(!N(i=r.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var o=r.value;"class"===r.name&&(o=iR(o).join(" ")),s["attr__"+r.name]=i0(1024,o)}});for(var a=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ik(t));return t}(u);)a++,u.tagName===e.tagName&&l++;return s.nth_child=a,s.nth_of_type=l,s}(e,s,o,a)),rr(f,function(e){if(!iN(e))return{};var t={};return rt(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),n=e.value;r&&n&&iG(n)&&(t[r]=n)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(o||(p[0].$el_text="a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?iX(e):ij(e)),g){p[0].attr__href=g;var _,m,y=null==(_=rU(g))?void 0:_.host,b=null==l||null==(m=l.location)?void 0:m.host;y&&b&&y!==b&&(h=g)}return{props:rr({$event_type:i.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,r,n,i={text:null==(r=e.$el_text)?void 0:r.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:(t=e.attr__class)?L(t)?t:iR(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return rn(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,r]=e;return i.attributes[t]=r}),i}).map(e=>{var t,r,n="";if(e.tag_name&&(n+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))n+="."+i.replace(/"/g,"");var s=k({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(r=e.nth_of_type)?r:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return rn(s).sort((e,t)=>{var[r]=e,[n]=t;return r.localeCompare(n)}).forEach(e=>{var[t,r]=e;return o[iY(t.toString())]=iY(r.toString())}),(n+=":")+rn(o).map(e=>{var[t,r]=e;return t+'="'+r+'"'}).join("")}).join(";")},null!=(r=p[0])&&r.$el_text?{$el_text:null==(n=p[0])?void 0:n.$el_text}:{},h&&"click"===i.type?{$external_click_url:h}:{},f)}}(n,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Rt.element_attribute_ignorelist,elementsChainAsString:this._s});if(o)return!1;var a=this.getElementSelectors(n);if(a&&a.length>0&&(s.$element_selectors=a),t===iQ){var u,c=iT(null==l||null==(u=l.getSelection())?void 0:u.toString()),d=e.type||"clipboard";if(!c)return!1;s.$selected_content=c,s.$copy_type=d}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return F(null==d?void 0:d.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.ks=(null==l||null==(t=l.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(th.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.xs&&this.xs(),this.xs=void 0,th.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(l&&l.history){var r=this;null!=(e=l.history.pushState)&&e.__posthog_wrapped__||i2(l.history,"pushState",e=>function(t,n,i){e.call(this,t,n,i),r.Ts("pushState")}),null!=(t=l.history.replaceState)&&t.__posthog_wrapped__||i2(l.history,"replaceState",e=>function(t,n,i){e.call(this,t,n,i),r.Ts("replaceState")}),this.As()}}Ts(e){try{var t,r=null==l||null==(t=l.location)?void 0:t.pathname;if(!r)return;r!==this.ks&&this.isEnabled&&this._instance.capture(t6,{navigation_type:e}),this.ks=r}catch(t){th.error("Error capturing "+e+" pageview",t)}}As(){if(!this.xs){var e=()=>{this.Ts("popstate")};rl(l,"popstate",e),this.xs=()=>{l&&l.removeEventListener("popstate",e)}}}},heatmaps:class{get Rt(){return this.instance.config}constructor(e){var t;this.Es=!1,this.bs=!1,this.Rs=null,this.instance=e,this.Es=!(null==(t=this.instance.persistence)||!t.props[tw]),this.rageclicks=new iJ(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return U(this.Rt.capture_heatmaps)&&this.Rt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Rt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return W(this.Rt.capture_heatmaps)?W(this.Rt.enable_heatmaps)?this.Es:this.Rt.enable_heatmaps:!1!==this.Rt.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.bs||(st.info("starting..."),this.Ns(),this.Tt());else{var e;clearInterval(null!=(e=this.Rs)?e:void 0),this.Ms(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tw]:t}),this.Es=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.T;return this.T=void 0,e}Fs(e){this.wt(e.originalEvent,"deadclick")}Tt(){this.Rs&&clearInterval(this.Rs),this.Rs="visible"===(null==d?void 0:d.visibilityState)?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Ns(){l&&d&&(this.Os=this.Zr.bind(this),rl(l,t4,this.Os),this.Ps=e=>
200this.wt(e||(null==l?void 0:l.event)),rl(d,"click",this.Ps,{capture:!0}),this.Ls=e=>this.Ds(e||(null==l?void 0:l.event)),rl(d,"mousemove",this.Ls,{capture:!0}),this.Bs=new rj(this.instance,rC,this.Fs.bind(this)),this.Bs.startIfEnabledOrStop(),this.js=this.Tt.bind(this),rl(d,t5,this.js),this.bs=!0)}Ms(){var e;l&&d&&(this.Os&&l.removeEventListener(t4,this.Os),this.Ps&&d.removeEventListener("click",this.Ps,{capture:!0}),this.Ls&&d.removeEventListener("mousemove",this.Ls,{capture:!0}),this.js&&d.removeEventListener(t5,this.js),clearTimeout(this.qs),null==(e=this.Bs)||e.stop(),this.bs=!1)}Zs(e,t){var r=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=function(e,t,r){for(var n=e;n&&ik(n)&&!iS(n,"body")&&n!==r;){if(C(t,null==l?void 0:l.getComputedStyle(n).position))return!0;n=iL(n)}return!1}(iI(e),["fixed","sticky"],i);return{x:e.clientX+(s?0:n),y:e.clientY+(s?0:r),target_fixed:s,type:t}}wt(e,t){var r;if(void 0===t&&(t="click"),!iE(e.target)&&sr(e)){var n=this.Zs(e,t);null!=(r=this.rageclicks)&&r.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.$s(k({},n,{type:"rageclick"})),this.$s(n)}}Ds(e){!iE(e.target)&&sr(e)&&(clearTimeout(this.qs),this.qs=setTimeout(()=>{this.$s(this.Zs(e,"mousemove"))},500))}$s(e){if(l){var t=l.location.href,r=this.Rt.custom_personal_data_properties,n=rD(t,this.Rt.mask_personal_data_properties?[...rW,...r||[]]:[],rH);this.T=this.T||{},this.T[n]||(this.T[n]=[]),this.T[n].push(e)}}Zr(){this.T&&!$(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:rj,webVitalsAutocapture:class{constructor(e){var t;this.Es=!1,this.bs=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Hs=()=>{clearTimeout(this.Vs),0!==this.T.metrics.length&&(this._instance.capture("$web_vitals",this.T.metrics.reduce((e,t)=>k({},e,{["$web_vitals_"+t.name+"_event"]:k({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.nt=e=>{var t,r=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(D(r))i5.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this.zs();D(n)||(W(null==e?void 0:e.name)||W(null==e?void 0:e.value)?i5.error("Invalid metric received",e):!this.Ys||this.Ys>e.value?(this.T.url!==n&&(this.Hs(),this.Vs=setTimeout(this.Hs,this.flushToCaptureTimeoutMs)),D(this.T.url)&&(this.T.url=n),this.T.firstMetricTimestamp=D(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.T.metrics.push(k({},e,{$current_url:n,$session_id:r.sessionId,$window_id:r.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.Hs()):i5.error("Ignoring metric with value >= "+this.Ys,e))}},this.Us=()=>{if(!this.bs){var e,t,r,n,i=m.__PosthogExtensions__;D(i)||D(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:r,onINP:n}=i.postHogWebVitalsCallbacks),e&&t&&r&&n?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.nt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.nt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.nt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&n(this.nt.bind(this)),this.bs=!0):i5.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Es=!(null==(t=this._instance.persistence)||!t.props[tP]),this.startIfEnabled()}get Ws(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,r=U(this.Ws)?null==(e=this.Ws)?void 0:e.web_vitals_allowed_metrics:void 0;return W(r)?(null==(t=this._instance.persistence)?void 0:t.props[tO])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(U(this.Ws)?this.Ws.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=U(this.Ws)?this.Ws.web_vitals_attribution:void 0;return null!=e&&e}get Ys(){var e=U(this.Ws)&&B(this.Ws.__web_vitals_max_value)?this.Ws.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==h?void 0:h.protocol;if("http:"!==e&&"https:"!==e)return i5.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=U(this.Ws)?this.Ws.web_vitals:K(this.Ws)?this.Ws:void 0;return K(t)?t:this.Es}startIfEnabled(){this.isEnabled&&!this.bs&&(i5.info("enabled, starting..."),this.nr(this.Us))}onRemoteConfig(e){if("capturePerformance"in e){var t=U(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=U(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[tP]:t}),this._instance.persistence.register({[tO]:r})),this.Es=t,this.startIfEnabled()}}nr(e){var t,r;null!=(t=m.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?i5.error("failed to load script",t):e()})}zs(){var e=l?l.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties;return rD(e,this._instance.config.mask_personal_data_properties?[...rW,...t||[]]:[],rH)}i5.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t,r,n;this.Us=()=>{var e;if(l&&this.isEnabled&&null!=(e=m.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=m.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,r=m.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,n=m.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Gs&&this.Rt.capture_unhandled_errors&&(this.Gs=t(this.captureException.bind(this))),!this.Xs&&this.Rt.capture_unhandled_rejections&&(this.Xs=r(this.captureException.bind(this))),!this.Js&&this.Rt.capture_console_errors&&(this.Js=n(this.captureException.bind(this)))}catch(e){i1.error("failed to start",e),this.Ks()}}},this._instance=e,this.Qs=!(null==(t=this._instance.persistence)||!t.props[tE]),this.eo=new ee({refillRate:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?r:1,bucketSize:null!=(n=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?n:10,refillInterval:1e4,qt:i1}),this.Rt=this.ro(),this.startIfEnabledOrStop()}ro(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return U(e)?t=k({},t,e):(D(e)?this.Qs:e)&&(t=k({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Rt.capture_console_errors||this.Rt.capture_unhandled_errors||this.Rt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(i1.info("enabled"),this.Ks(),this.nr(this.Us)):this.Ks()}nr(e){var t,r;
200null!=(t=m.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return i1.error("failed to load script",t);e()})}Ks(){var e,t,r;null==(e=this.Gs)||e.call(this),this.Gs=void 0,null==(t=this.Xs)||t.call(this),this.Xs=void 0,null==(r=this.Js)||r.call(this),this.Js=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.Qs=!!e.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[tE]:this.Qs}),this.Rt=this.ro(),this.startIfEnabledOrStop())}onConfigChange(){this.Rt=this.ro()}captureException(e){var t,r,n,i=null!=(t=null==e||null==(r=e.$exception_list)||null==(r=r[0])?void 0:r.type)?t:"Exception";this.eo.consumeRateLimit(i)?i1.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(n=this._instance.exceptions)||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,r;this.io=[],this.no=new eZ([new te,new tc,new tr,new tt,new tl,new ta,new ti,new tu],function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];return function(t,n){void 0===n&&(n=0);for(var i=[],s=t.split("\n"),o=n;s.length>o;o++){var a=s[o];if(1024>=a.length){var l=e9.test(a)?a.replace(e9,"$1"):a;if(!l.match(/\S*Error: /)){for(var u of r){var c=u(l,e);if(c){i.push(c);break}}if(i.length>=50)break}}}if(!i.length)return[];var d=Array.from(i);return d.reverse(),d.slice(0,50).map(e=>k({},e,{filename:e.filename||(d[d.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",e4,e8)),this._instance=e,this.io=null!=(t=null==(r=this._instance.persistence)?void 0:r.get_property(tk))?t:[]}onRemoteConfig(e){var t,r,n;if("errorTracking"in e){var i=null!=(t=null==(r=e.errorTracking)?void 0:r.suppressionRules)?t:[],s=null==(n=e.errorTracking)?void 0:n.captureExtensionExceptions;this.io=i,this._instance.persistence&&this._instance.persistence.register({[tk]:this.io,[tS]:s})}}get so(){var e,t=!!this._instance.get_property(tS),r=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=r?r:t)&&e}buildProperties(e,t){return this.no.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.oo(t)){if(this.ao(t))return void sR.info("Skipping exception capture because a suppression rule matched");if(!this.so&&this.lo(t))return void sR.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.uo(t))return void sR.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent",zi:!0})}ao(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:r,value:n}=t;return N(r)&&r.length>0&&e.$exception_types.push(r),N(n)&&n.length>0&&e.$exception_values.push(n),e},{$exception_types:[],$exception_values:[]});return this.io.some(e=>{var r=e.values.map(e=>{var r,n=n1[e.operator],i=L(e.value)?e.value:[e.value],s=null!=(r=t[e.key])?r:[];return i.length>0&&n(i,s)});return"OR"===e.type?r.some(Boolean):r.every(Boolean)})}lo(e){return e.flatMap(e=>{var t,r;return null!=(t=null==(r=e.stacktrace)?void 0:r.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}uo(e){if(e.length>0){var t,r,n,i,s=null!=(t=null==(r=e[0].stacktrace)?void 0:r.frames)?t:[],o=s[s.length-1];return null!=(n=null==o||null==(i=o.filename)?void 0:i.includes("posthog.com/static"))&&n}return!1}oo(e){return!W(e)&&L(e)}}},sM,{siteApps:class{constructor(e){this._instance=e,this.vo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}fo(e,t){if(t){var r=this.globalsForEvent(t);this.vo.push(r),this.vo.length>1e3&&(this.vo=this.vo.slice(10))}}get siteAppLoaders(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.fo.bind(this));this.po=()=>{e(),this.vo=[],this.po=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,r,n,i,s,o,a,l={},u=this._instance.get_property("$groups")||[];for(var[c,d]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:d};var{$set_once:h,$set:p}=e;return{event:k({},S(e,ss),{properties:k({},e.properties,p?{$set:k({},null!=(t=null==(r=e.properties)?void 0:r.$set)?t:{},p)}:{},h?{$set_once:k({},null!=(n=null==(i=e.properties)?void 0:i.$set_once)?n:{},h)}:{}),elements_chain:null!=(s=null==(o=e.properties)?void 0:o.$elements_chain)?s:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],r=()=>{var r;!t.errored&&this.vo.length&&(so.info("Processing "+this.vo.length+" events for site app with id "+e.id),this.vo.forEach(e
200=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(r=this.po)||r.call(this))},n=!1,i=i=>{t.errored=!i,t.loaded=!0,so.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),n&&r()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(e){i(e)}});s&&(t.processEvent=s),n=!0}catch(t){so.error(sa+e.id,t),i(!1)}if(n&&t.loaded)try{r()}catch(r){so.error("Error while processing buffered events PostHog app with config id "+e.id,r),t.errored=!0}}mo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}yo(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{null==r.processEvent||r.processEvent(t)}catch(t){so.error("Error while processing event "+e.event+" for site app "+r.id,t)}}}onRemoteConfig(e){var t,r,n,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.mo(),void this._instance.on("eventCaptured",e=>this.yo(e))):void so.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(r=this.po)||r.call(this),null!=(n=e.siteApps)&&n.length)if(this.isEnabled){var s=function(e){var t;m["__$$ph_site_app_"+e]=i._instance,null==(t=m.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(i._instance,a,t=>{if(t)return so.error(sa+e,t)})};for(var{id:o,url:a}of e.siteApps)s(o)}else so.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},sL,{tracingHeaders:class{constructor(e){this.bo=void 0,this.wo=void 0,this.Us=()=>{var e,t;D(this.bo)&&(null==(e=m.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),D(this.wo)&&(null==(t=m.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}nr(e){var t,r;null!=(t=m.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(r=m.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return i3.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.nr(this.Us):(null==(e=this.bo)||e.call(this),null==(t=this.wo)||t.call(this),this.bo=void 0,this.wo=void 0)}}},{toolbar:class{constructor(e){this.instance=e}Ro(e){m.ph_toolbar_state=e}No(){var e;return null!=(e=m.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,r){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===r&&(r=void 0),ru(this.instance.config)||!l||!d)return!1;e=null!=e?e:l.location,r=null!=r?r:l.history;try{if(!t){try{l.localStorage.setItem("test","test"),l.localStorage.removeItem("test")}catch(e){return!1}t=null==l?void 0:l.localStorage}var n,i=sf||rN(e.hash,"__posthog")||rN(e.hash,"state"),s=i?ri(()=>JSON.parse(atob(decodeURIComponent(i))))||ri(()=>JSON.parse(decodeURIComponent(i))):null;return s&&"ph_authorize"===s.action?((n=s).source="url",n&&Object.keys(n).length>0&&(s.desiredHash?e.hash=s.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((n=JSON.parse(t.getItem(sg)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch(e){return!1}}Mo(e){var t=m.ph_load_toolbar||m.ph_load_editor;!W(t)&&F(t)?t(e,this.instance):sv.warn("No toolbar load function found")}loadToolbar(e){var t,r=!(null==d||!d.getElementById(tX));if(!l||r)return!1;var n="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,i=k({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});return(l.localStorage.setItem(sg,JSON.stringify(k({},i,{source:void 0}))),2===this.No())?this.Mo(i):0===this.No()&&(this.Ro(1),null==(t=m.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{if(e)return sv.error("[Toolbar] Failed to load",e),void this.Ro(0);this.Ro(2),this.Mo(i)}),rl(l,"turbolinks:load",()=>{this.Ro(0),this.loadToolbar(i)})),!0}Fo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,r){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===r&&(r=void 0),this.maybeLoadToolbar(e,t,r)}}},sF,{conversations:class{constructor(e){this.Oo=void 0,this._conversationsManager=null,this.Po=!1,this.Lo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;W(t)||(K(t)?this.Oo=t:(this.Oo=t.enabled,this.Lo=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Oo=void 0,this.Lo=null}loadIfEnabled(){if(!(this._conversationsManager||this.Po||this._instance.config.disable_conversations||ru(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==m?void 0:m.__PosthogExtensions__;if(e&&!D(this.Oo)&&this.Oo)if(this.Lo&&this.Lo.token){this.Po=!0;try{var t=e.initConversations;if(t)return this.Do(t),void(this.Po=!1);var r=e.loadExternalDependency;if(!r)return void this.Bo(tQ);r(this._instance,"conversations",t=>{t||!e.initConversations?this.Bo("Could not load conversations script",t):this.Do(e.initConversations),this.Po=!1})}catch(e){this.Bo("Error initializing conversations",e),this.Po=!1}}else sj.error("Conversations enabled but missing token in remote config.")}}Do(e){if(this.Lo)try{this._conversationsManager=e(this.Lo,this._instance),sj.info("Conversations loaded successfully")}catch(e){this.Bo("Error completing conversations initialization",e)}else sj.error("Cannot complete initialization: remote config is null")}Bo(e,t){sj.error(e,t),this._conversationsManager=null,this.Po=!1}show(){this._conversationsManager?this._conversationsManager.show():sj.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Oo&&null!==this._conversationsManager}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,r){var n=this;return E(function*(){return n._conversationsManager?n._conversationsManager.sendMessage(e,t,r):(sj.warn(sI),null)})()}getMessages(e,t){var r=this;return E(function*(){return r._conversationsManager?r._conversationsManager.getMessages(e,t):(sj.warn(sI),null)})()}markAsRead(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(sj.warn(sI),null)})()}getTickets(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(sj.warn(sI),null)})()}requestRestoreLink(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(sj.warn(sI),null)})()}restoreFromToken(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(sj.warn(sI),null)})()}restoreFromUrlToken(){var e=this;return E(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(sj.warn(sI),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}Ki(){var e;null==(e=this._conversationsManager)||e.setIdentity()}Qi(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.jo=!1,this.qo=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.jo=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,r=null==(t=e.logs)?void 0:t.captureConsoleLogs;!W(r)&&r&&(this.jo=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.jo&&!this.qo){var e=tp("[logs]"),t=null==m?void 0:m.__PosthogExtensions__;if(t){var r=t.loadExternalDependency;r?r(this._instance,"logs",r=>{var n;r||null==(n=t.logs)||!n.initializeLogs?e.error("Could not load logs script",r):(t.logs.initializeLogs(this._instance),this.qo=!0)}):e.error(tQ)}else e.error("PostHog Extensions not found.")}}}});iw.__defaultExtensionClasses=k({},sU);var s$,sD=(s$=io[ig]=new iw,function(){function e(){e.done||(e.done=!0,iv=!1,rt(io,function(e){e._dom_loaded()}))}null!=d&&d.addEventListener?"complete"===d.readyState?e():rl(d,"DOMContentLoaded",e,{capture:!1}):l&&th.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),s$),sN=r(1462),sz=(0,sN.createContext)({get client(){return n},bootstrap:void 0});function sW(e){var t,r,i=e.children,s=e.client,o=e.apiKey,a=e.options,l=(0,sN.useRef)(null),u=(0,sN.useMemo)(function(){if(s)return o&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s;var e=n;return o||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[s,o,JSON.stringify(a)]);return(0,sN.useEffect)(function(){if(!s){var e=n,t=l.current;t?(o!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!function e(t,r,n){if(void 0===n&&(n=new WeakMap),t===r)return!0;
200if("object"!=typeof t||null===t||"object"!=typeof r||null===r)return!1;if(n.has(t)&&n.get(t)===r)return!0;n.set(t,r);var i=Object.keys(t),s=Object.keys(r);if(i.length!==s.length)return!1;for(var o=0;o<i.length;o++){var a=i[o];if(!s.includes(a)||!e(t[a],r[a],n))return!1}return!0}(a,t.options)&&e.set_config(a)):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(o,a)),l.current={apiKey:o,options:null!=a?a:{}}}},[s,o,JSON.stringify(a)]),sN.createElement(sz.Provider,{value:{client:u,bootstrap:null!=(t=null==a?void 0:a.bootstrap)?t:null==(r=null==s?void 0:s.config)?void 0:r.bootstrap}},i)}var sB=function(e){return"function"==typeof e},sH=function(e,t){return(sH=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var sK={componentStack:null,exceptionEvent:null,error:null},sq={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};!function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}function r(t){var r=e.call(this,t)||this;return r.state=sK,r}sH(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r.prototype.componentDidCatch=function(e,t){var r,n=this.props.additionalProperties;sB(n)?r=n(e):"object"==typeof n&&(r=n);var i=this.context.client.captureException(e,r),s=t.componentStack;this.setState({error:e,componentStack:null!=s?s:null,exceptionEvent:i})},r.prototype.render=function(){var e=this.props,t=e.children,r=e.fallback,n=this.state;if(null==n.componentStack)return sB(t)?t():t;var i=sB(r)?sN.createElement(r,{error:n.error,componentStack:n.componentStack,exceptionEvent:n.exceptionEvent}):r;return sN.isValidElement(i)?i:(console.warn(sq.INVALID_FALLBACK),sN.createElement(sN.Fragment,null))},r.contextType=sz}(sN.Component),n=sD;var sV=r(8456);function sG(e){let{Component:t,pageProps:r}=e;return(0,i.jsx)(sV.lJ,{publishableKey:"pk_live_Y2xlcmsuaXRzcmF3LmFpJA",children:(0,i.jsx)(sW,{apiKey:"phc_SIC9ex5NKkRRROMhrb9SJ9YFmCwOt7xOgRH0Gl1V1We",options:{api_host:"https://us.i.posthog.com",capture_exceptions:!0,debug:!1},children:(0,i.jsxs)("main",{className:a().className,children:[(0,i.jsx)(t,{...r}),(0,i.jsx)(s.l$,{position:"bottom-right",toastOptions:{duration:3e3}})]})})})}},8926:(e,t,r)=>{"use strict";Object.defineProperty(t,"headers",{enumerable:!0,get:function(){return h}});let n=r(7574),i=r(7990),s=r(3185),o=r(9603),a=r(512),l=r(7778),u=r(854),c=r(2717),d=r(4662);function h(){let e="headers",t=i.workAsyncStorage.getStore(),r=s.workUnitAsyncStorage.getStore();if(t){if(r&&"after"===r.phase&&!(0,c.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${t.route} used "headers" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "headers" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E367",enumerable:!1,configurable:!0});if(t.forceStatic)return f(n.HeadersAdapter.seal(new Headers({})));if(r)switch(r.type){case"cache":{let e=Object.defineProperty(Error(`Route ${t.route} used "headers" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E304",enumerable:!1,configurable:!0});throw Error.captureStackTrace(e,h),t.invalidDynamicUsageError??=e,e}case"private-cache":{let e=Object.defineProperty(Error(`Route ${t.route} used "headers" inside "use cache: private". Accessing "headers" inside a private cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E742",enumerable:!1,
200configurable:!0});throw Error.captureStackTrace(e,h),t.invalidDynamicUsageError??=e,e}case"unstable-cache":throw Object.defineProperty(Error(`Route ${t.route} used "headers" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E127",enumerable:!1,configurable:!0})}if(t.dynamicShouldError)throw Object.defineProperty(new a.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E525",enumerable:!1,configurable:!0});if(r)switch(r.type){case"prerender":case"prerender-runtime":var u=t,g=r;let i=p.get(g);if(i)return i;let s=(0,l.makeHangingPromise)(g.renderSignal,u.route,"`headers()`");return p.set(g,s),s;case"prerender-client":let v="`headers`";throw Object.defineProperty(new d.InvariantError(`${v} must not be used within a client component. Next.js should be preventing ${v} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E693",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,o.postponeWithTracking)(t.route,e,r.dynamicTracking);case"prerender-legacy":return(0,o.throwToInterruptStaticGeneration)(e,t,r);case"request":return(0,o.trackDynamicDataInDynamicRender)(r),f(r.headers)}}(0,s.throwForMissingRequestStore)(e)}r(8845);let p=new WeakMap;function f(e){let t=p.get(e);if(t)return t;let r=Promise.resolve(e);return p.set(e,r),Object.defineProperties(r,{append:{value:e.append.bind(e)},delete:{value:e.delete.bind(e)},get:{value:e.get.bind(e)},has:{value:e.has.bind(e)},set:{value:e.set.bind(e)},getSetCookie:{value:e.getSetCookie.bind(e)},forEach:{value:e.forEach.bind(e)},keys:{value:e.keys.bind(e)},values:{value:e.values.bind(e)},entries:{value:e.entries.bind(e)},[Symbol.iterator]:{value:e[Symbol.iterator].bind(e)}}),r}(0,u.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`headers()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E277",enumerable:!1,configurable:!0})})},9139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return s}});let n=r(8781)._(r(1462)),i=n.default.createContext(null);function s(e){let t=(0,n.useContext)(i);t&&t(e)}},9236:(e,t,r)=>{"use strict";r.d(t,{FW:()=>c,HG:()=>u,Vc:()=>l,aG:()=>i,gE:()=>s,iM:()=>n,mG:()=>o,ub:()=>a});let n=[".lcl.dev",".lclstage.dev",".lclclerk.com"],i=[".accounts.dev",".accountsstage.dev",".accounts.lclclerk.com"],s=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],o=[".lcl.dev","lclstage.dev",".lclclerk.com",".accounts.lclclerk.com"],a=[".accountsstage.dev"],l="https://api.lclclerk.com",u="https://api.clerkstage.dev",c="https://api.clerk.com"},9423:(e,t,r)=>{"use strict";var n=r(7351);Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{atLeastOneTask:function(){return o},scheduleImmediate:function(){return s},scheduleOnNextTick:function(){return i},waitAtLeastOneReactRenderTask:function(){return a}});let i=e=>{Promise.resolve().then(()=>{n.nextTick(e)})},s=e=>{setImmediate(e)};function o(){return new Promise(e=>s(e))}function a(){return new Promise(e=>setImmediate(e))}},9603:(e,t,r)=>{"use strict";
200Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Postpone:function(){return x},PreludeState:function(){return V},abortAndThrowOnSynchronousRequestDataAccess:function(){return k},abortOnSynchronousPlatformIOAccess:function(){return w},accessedDynamicData:function(){return M},annotateDynamicAccess:function(){return D},consumeDynamicAccess:function(){return L},createDynamicTrackingState:function(){return f},createDynamicValidationState:function(){return g},createHangingInputAbortSignal:function(){return $},createRenderInBrowserAbortSignal:function(){return U},delayUntilRuntimeStage:function(){return Y},formatDynamicAPIAccesses:function(){return F},getFirstDynamicReason:function(){return v},isDynamicPostpone:function(){return C},isPrerenderInterruptedError:function(){return A},logDisallowedDynamicError:function(){return G},markCurrentScopeAsDynamic:function(){return _},postponeWithTracking:function(){return R},throwIfDisallowedDynamic:function(){return X},throwToInterruptStaticGeneration:function(){return m},trackAllowedDynamicAccess:function(){return q},trackDynamicDataInDynamicRender:function(){return y},trackSynchronousPlatformIOAccessInDev:function(){return E},trackSynchronousRequestDataAccessInDev:function(){return P},useDynamicRouteParams:function(){return N},warnOnSyncDynamicError:function(){return S}});let n=function(e){return e&&e.__esModule?e:{default:e}}(r(1462)),i=r(8684),s=r(512),o=r(3185),a=r(7990),l=r(7778),u=r(3233),c=r(9423),d=r(3729),h=r(4662),p="function"==typeof n.default.unstable_postpone;function f(e){return{isDebugDynamicAccesses:e,dynamicAccesses:[],syncDynamicErrorWithStack:null}}function g(){return{hasSuspenseAboveBody:!1,hasDynamicMetadata:!1,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[]}}function v(e){var t;return null==(t=e.dynamicAccesses[0])?void 0:t.expression}function _(e,t,r){if(t)switch(t.type){case"cache":case"unstable-cache":case"private-cache":return}if(!e.forceDynamic&&!e.forceStatic){if(e.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(t)switch(t.type){case"prerender-ppr":return R(e.route,r,t.dynamicTracking);case"prerender-legacy":t.revalidate=0;let n=Object.defineProperty(new i.DynamicServerError(`Route ${e.route} couldn't be rendered statically because it used ${r}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}function m(e,t,r){let n=Object.defineProperty(new i.DynamicServerError(`Route ${t.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw r.revalidate=0,t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}function y(e){switch(e.type){case"cache":case"unstable-cache":case"private-cache":return}}function b(e,t,r){let n=I(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let i=r.dynamicTracking;i&&i.dynamicAccesses.push({stack:i.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}function w(e,t,r,n){let i=n.dynamicTracking;b(e,t,n),i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicErrorWithStack=r)}function E(e){e.prerenderPhase=!1}function k(e,t,r,n){if(!1===n.controller.signal.aborted){b(e,t,n);let i=n.dynamicTracking;i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicErrorWithStack=r)}throw I(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`)}function S(e){e.syncDynamicErrorWithStack&&console.error(e.syncDynamicErrorWithStack)}let P=E;function x({reason:e,route:t}){let r=o.workUnitAsyncStorage.getStore();R(t,e,r&&"prerender-ppr"===r.type?r.dynamicTracking:null)}function R(e,t,r){(function(){if(!p)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,
200configurable:!0})})(),r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),n.default.unstable_postpone(O(e,t))}function O(e,t){return`Route ${e} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function C(e){return"object"==typeof e&&null!==e&&"string"==typeof e.message&&T(e.message)}function T(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===T(O("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let j="NEXT_PRERENDER_INTERRUPTED";function I(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest=j,t}function A(e){return"object"==typeof e&&null!==e&&e.digest===j&&"name"in e&&"message"in e&&e instanceof Error}function M(e){return e.length>0}function L(e,t){return e.dynamicAccesses.push(...t.dynamicAccesses),e.dynamicAccesses}function F(e){return e.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" (<anonymous>)")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}:
201${t}`))}function U(){let e=new AbortController;return e.abort(Object.defineProperty(new d.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),e.signal}function $(e){switch(e.type){case"prerender":case"prerender-runtime":let t=new AbortController;if(e.cacheSignal)e.cacheSignal.inputReady().then(()=>{t.abort()});else{let r=(0,o.getRuntimeStagePromise)(e);r?r.then(()=>(0,c.scheduleOnNextTick)(()=>t.abort())):(0,c.scheduleOnNextTick)(()=>t.abort())}return t.signal;case"prerender-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return}}function D(e,t){let r=t.dynamicTracking;r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:e})}function N(e){let t=a.workAsyncStorage.getStore(),r=o.workUnitAsyncStorage.getStore();if(t&&r)switch(r.type){case"prerender-client":case"prerender":{let i=r.fallbackRouteParams;i&&i.size>0&&n.default.use((0,l.makeHangingPromise)(r.renderSignal,t.route,e));break}case"prerender-ppr":{let n=r.fallbackRouteParams;if(n&&n.size>0)return R(t.route,e,r.dynamicTracking);break}case"prerender-runtime":throw Object.defineProperty(new h.InvariantError(`\`${e}\` was called during a runtime prerender. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new h.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0})}}let z=/\n\s+at Suspense \(<anonymous>\)/,W=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${u.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),B=RegExp(`\\n\\s+at ${u.METADATA_BOUNDARY_NAME}[\\n\\s]`),H=RegExp(`\\n\\s+at ${u.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),K=RegExp(`\\n\\s+at ${u.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function q(e,t,r,n){if(!K.test(t)){if(B.test(t)){r.hasDynamicMetadata=!0;return}if(H.test(t)){r.hasDynamicViewport=!0;return}if(W.test(t)){r.hasAllowedDynamic=!0,r.hasSuspenseAboveBody=!0;return}else if(z.test(t)){r.hasAllowedDynamic=!0;return}else{if(n.syncDynamicErrorWithStack)return void r.dynamicErrors.push(n.syncDynamicErrorWithStack);let i=function(e,t){let r=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,
201configurable:!0});return r.stack=r.name+": "+e+t,r}(`Route "${e.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`,t);return void r.dynamicErrors.push(i)}}}var V=function(e){return e[e.Full=0]="Full",e[e.Empty=1]="Empty",e[e.Errored=2]="Errored",e}({});function G(e,t){console.error(t),e.dev||(e.hasReadableErrorStacks?console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${e.route}" in your browser to investigate the error.`):console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
202  - Start the app in development mode by running \`next dev\`, then open "${e.route}" in your browser to investigate the error.
203  - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function X(e,t,r,n){if(0!==t){if(r.hasSuspenseAboveBody)return;if(n.syncDynamicErrorWithStack)throw G(e,n.syncDynamicErrorWithStack),new s.StaticGenBailoutError;let i=r.dynamicErrors;if(i.length>0){for(let t=0;t<i.length;t++)G(e,i[t]);throw new s.StaticGenBailoutError}if(r.hasDynamicViewport)throw console.error(`Route "${e.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new s.StaticGenBailoutError;if(1===t)throw console.error(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new s.StaticGenBailoutError}else if(!1===r.hasAllowedDynamic&&r.hasDynamicMetadata)throw console.error(`Route "${e.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new s.StaticGenBailoutError}function Y(e,t){return e.runtimeStagePromise?e.runtimeStagePromise.then(()=>t):t}},9652:e=>{e.exports={style:{fontFamily:"'Poppins', 'Poppins Fallback'",fontStyle:"normal"},className:"__className_6bee3b"}}},e=>{var t=t=>e(e.s=t);e.O(0,[593,792],()=>(t(1981),t(1972))),_N_E=e.O()}]);

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.