1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return w},NormalizeError:function(){return g},PageNotFoundError:function(){return b},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return h},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return E}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...s)=>(r||(r=!0,t=e(...s)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function h(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let s=await e.getInitialProps(t);if(r&&d(r))return s;if(!s)throw Object.defineProperty(Error(`"${h(e)}.getInitialProps()" should resolve to an object. But found "${s}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return s}let y="u">typeof performance,m=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class g extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class w extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={assign:function(){return u},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return o}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});function i(e){let t={};for(let[r,s]of e.entries()){let e=t[r];void 0===e?t[r]=s:Array.isArray(e)?e.push(s):t[r]=[e,s]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,s]of Object.entries(e))if(Array.isArray(s))for(let e of s)t.append(r,a(e));else t.set(r,a(s));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,s]of r.entries())e.append(t,s)}return e}},912598,e=>{"use strict";var t=e.i(271645),r=e.i(843476),s=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:n})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(s.Provider,{value:e,children:n})),"useQueryClient",0,e=>{let r=t.useContext(s);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},793803,180166,619273,e=>{"use strict";e.i(247167);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,r],180166);var s="u"<typeof window||"Deno"in globalThis;function n(){}function i(e,t){return(t?.queryKeyHashFn||a)(e)}function a(e){return JSON.stringify(e,(e,t)=>h(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function o(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>o(e[r],t[r]))}var u=Object.prototype.hasOwnProperty;function l(e,t,r=0){if(e===t)return e;if(r>500)return t;let s=c(e)&&c(t);if(!s&&!(h(e)&&h(t)))return t;let n=(s?e:Object.keys(e)).length,i=s?t:Object.keys(t),a=i.length,o=s?Array(a):{},d=0;for(let c=0;c<a;c++){let a=s?c:i[c],h=e[a],f=t[a];if(h===f){o[a]=h,(s?c<n:u.call(e,a))&&d++;continue}if(null===h||null===f||"object"!=typeof h||"object"!=typeof f){o[a]=f;continue}let p=l(h,f,r+1);o[a]=p,p===h&&d++}return n===a&&d===n?e:o}function c(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h(e){if(!d(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!d(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}var f=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,r){let s,n=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e},"addToEnd",0,function(e,t,r=0){let s=[...e,t];return r&&s.length>r?s.slice(1):s},"addToStart",0,function(e,t,r=0){let s=[t,...e];return r&&s.length>r?s.slice(0,-1):s},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==f?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,a,"hashQueryKeyByOptions",0,i,"isServer",0,s,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"matchMutation",0,function(e,t){let{exact:r,status:s,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(a(t.options.mutationKey)!==a(i))return!1}else if(!o(t.options.mutationKey,i))return!1}return(!s||t.state.status===s)&&(!n||!!n(t))},"matchQuery",0,function(e,t){let{type:r="all",exact:s,fetchStatus:n,predicate:a,queryKey:u,stale:l}=e;if(u){if(s){if(t.queryHash!==i(u,t.options))return!1}else if(!o(t.queryKey,u))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!n||n===t.state.fetchStatus)&&(!a||!!a(t))},"noop",0,n,"partialMatchKey",0,o,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?l(e,t):t},"replaceEqualDeep",0,l,"resolveEnabled",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,f,"sleep",0,function(e){return new Promise(t=>{r.setTimeout(t,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}],619273),e.s(["pendingThenable",0,function(){let e,t,r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r},"tryResolveSync",0,function(e){let t;if(e.then(e=>(t=e,e),n)?.catch(n),void 0!==t)return{data:t}}],793803)},372775,e=>{"use strict";var t=e.i(793803),r=e.i(619273);function s(e){return e}e.s(["defaultShouldDehydrateQuery",0,function(e){return"success"===e.state.status},"hydrate",0,function(e,n,i){if("object"!=typeof n||null===n)return;let a=e.getMutationCache(),o=e.getQueryCache(),u=i?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??s,l=n.mutations||[],c=n.queries||[];l.forEach(({state:t,...r})=>{a.build(e,{...e.getDefaultOptions().hydrate?.mutations,...i?.defaultOptions?.mutations,...r},t)}
1),c.forEach(({queryKey:s,state:n,queryHash:a,meta:l,promise:c,dehydratedAt:h})=>{let d=c?(0,t.tryResolveSync)(c):void 0,f=void 0===n.data?d?.data:n.data,p=void 0===f?f:u(f),y=o.get(a),m=y?.state.status==="pending",v=y?.state.fetchStatus==="fetching";if(y){let e=d&&void 0!==h&&h>y.state.dataUpdatedAt;if(n.dataUpdatedAt>y.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=n;y.setState({...t,data:p})}}else y=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...i?.defaultOptions?.queries,queryKey:s,queryHash:a,meta:l},{...n,data:p,fetchStatus:"idle",status:void 0!==p?"success":n.status});c&&!m&&!v&&(void 0===h||h>y.state.dataUpdatedAt)&&y.fetch(void 0,{initialPromise:Promise.resolve(c).then(u)}).catch(r.noop)})}])},540143,e=>{"use strict";let t,r,s,n,i,a;var o=e.i(180166).systemSetTimeoutZero,u=(t=[],r=0,s=e=>{e()},n=e=>{e()},i=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&i(()=>{n(()=>{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):i(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}});e.s(["notifyManager",0,u])},175555,915823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",0,t],915823);var r=new class extends t{#r;#s;#n;constructor(){super(),this.#n=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#s||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#n=e,this.#s?.(),this.#s=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,r],175555)},814448,e=>{"use strict";var t=e.i(915823),r=new class extends t.Subscribable{#i=!0;#s;#n;constructor(){super(),this.#n=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#s||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#n=e,this.#s?.(),this.#s=e(this.setOnline.bind(this))}setOnline(e){this.#i!==e&&(this.#i=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#i}};e.s(["onlineManager",0,r])},273911,e=>{"use strict";let t;var r=e.i(619273),s=(t=()=>r.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",0,s])},266027,936553,88587,286491,869230,673664,427001,381384,254440,469637,e=>{"use strict";let t;var r=e.i(175555),s=e.i(273911),n=e.i(540143);e.i(247167);var i=e.i(619273),a=e.i(814448),o=e.i(793803);function u(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||a.onlineManager.isOnline()}var c=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function h(e){let t,n=!1,h=0,d=(0,o.pendingThenable)(),f=()=>r.focusManager.isFocused()&&("always"===e.networkMode||a.onlineManager.isOnline())&&e.canRun(),p=()=>l(e.networkMode)&&e.canRun(),y=e=>{"pending"===d.status&&(t?.(),d.resolve(e))},m=e=>{"pending"===d.status&&(t?.(),d.reject(e))},v=()=>new Promise(r=>{t=e=>{("pending"!==d.status||f())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===d.status&&e.onContinue?.()}),g=()=>{let t;if("pending"!==d.status)return;let r=0===h?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(y).catch(t=>{if("pending"!==d.status)return;let r=e.retry??3*!s.environmentManager.isServer(),a=e.retryDelay??u,o="function"==typeof a?a(h,t):a,l=!0===r||"number"==typeof r&&h<r||"function"==typeof r&&r(h,t);n||!l?m(t):(h++,e.onFail?.(h,t),(0,i.sleep)(o).then(()=>f()?void 0:v()).then(()=>{n?m(t):g()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let r=new c(t);m(r),e.onCancel?.(r)}},continue:()=>(t?.(),d),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:p,start:()=>(p()?g():v().then(g),d)}}e.s(["CancelledError",0,c,"canFetch",0,l,"createRetryer",0,h],936553);var d=e.i(180166),f=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.isValidTimeout)(this.gcTime)&&(this.#a=d.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(s.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){this.#a&&(d.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",0,f],88587);var p=class extends f{#o;#u;#l;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#l=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=v(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=v(this.options);void 0!==e.data&&(this.setState(m(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,t){let r=(0,i.replaceData)(this.state.data,e,this.options);return this.#p({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(i.noop).catch(i.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#o}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,i.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
1Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,i.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,i.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f||this.#y()?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#y(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){let r;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},a=()=>{let e,r=(0,i.ensureQueryFn)(this.options,t),s=(n(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(r,s,this):r(s)},o=(n(r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),r);this.options.behavior?.onFetch(o,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#p({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=h({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof c&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof c){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#l.config.onError?.(e,this),this.#l.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...y(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...m(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?r:void 0,r;case"error":let s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),n.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function y(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function m(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function v(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,
1s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,p,"fetchState",0,y],286491);var g=e.i(915823),b=class extends g.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#m=null,this.#v=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#c;#g=void 0;#b=void 0;#w=void 0;#S;#E;#v;#m;#R;#T;#O;#C;#P;#I;#U=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),w(this.#g,this.options)?this.#L():this.updateResult(),this.#F())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#M(),this.#Q(),this.#g.removeObserver(this)}setOptions(e){let t=this.options,r=this.#g;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,i.resolveEnabled)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#A(),this.#g.setOptions(this.options),t._defaulted&&!(0,i.shallowEqualObjects)(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let s=this.hasListeners();s&&E(this.#g,r,this.options,t)&&this.#L(),this.updateResult(),s&&(this.#g!==r||(0,i.resolveEnabled)(this.options.enabled,this.#g)!==(0,i.resolveEnabled)(t.enabled,this.#g)||(0,i.resolveStaleTime)(this.options.staleTime,this.#g)!==(0,i.resolveStaleTime)(t.staleTime,this.#g))&&this.#_();let n=this.#k();s&&(this.#g!==r||(0,i.resolveEnabled)(this.options.enabled,this.#g)!==(0,i.resolveEnabled)(t.enabled,this.#g)||n!==this.#I)&&this.#j(n)}getOptimisticResult(e){var t,r;let s=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(s,e);return t=this,r=n,(0,i.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#w=n,this.#E=this.options,this.#S=this.#g.state),n}getCurrentResult(){return this.#w}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#v.status||this.#v.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#U.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#L({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#w))}#L(e){this.#A();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(i.noop)),t}#_(){this.#M();let e=(0,i.resolveStaleTime)(this.options.staleTime,this.#g);if(s.environmentManager.isServer()||this.#w.isStale||!(0,i.isValidTimeout)(e))return;let t=(0,i.timeUntilStale)(this.#w.dataUpdatedAt,e);this.#C=d.timeoutManager.setTimeout(()=>{this.#w.isStale||this.updateResult()},t+1)}#k(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#j(e){this.#Q(),this.#I=e,!s.environmentManager.isServer()&&!1!==(0,i.resolveEnabled)(this.options.enabled,this.#g)&&(0,i.isValidTimeout)(this.#I)&&0!==this.#I&&(this.#P=d.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#L()},this.#I))}#F(){this.#_(),this.#j(this.#k())}#M(){this.#C&&(d.timeoutManager.clearTimeout(this.#C),this.#C=void 0)}#Q(){this.#P&&(d.timeoutManager.clearInterval(this.#P),this.#P=void 0)}createResult(e,t){let r,s=this.#g,n=this.options,a=this.#w,u=this.#S,l=this.#E,c=e!==s?e.state:this.#b,{state:h}=e,d={...h},f=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&w(e,t),a=r&&E(e,s,t,n);
1(i||a)&&(d={...d,...y(h.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=d;r=d.data;let g=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===v){let e;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(e=a.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#O?.state.data,this.#O):t.placeholderData,void 0!==e&&(v="success",r=(0,i.replaceData)(a?.data,e,t),f=!0)}if(t.select&&void 0!==r&&!g)if(a&&r===u?.data&&t.select===this.#R)r=this.#T;else try{this.#R=t.select,r=t.select(r),r=(0,i.replaceData)(a?.data,r,t),this.#T=r,this.#m=null}catch(e){this.#m=e}this.#m&&(p=this.#m,r=this.#T,m=Date.now(),v="error");let b="fetching"===d.fetchStatus,S="pending"===v,T="error"===v,O=S&&b,C=void 0!==r,P={status:v,fetchStatus:d.fetchStatus,isPending:S,isSuccess:"success"===v,isError:T,isInitialLoading:O,isLoading:O,data:r,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!C,isPaused:"paused"===d.fetchStatus,isPlaceholderData:f,isRefetchError:T&&C,isStale:R(e,t),refetch:this.refetch,promise:this.#v,isEnabled:!1!==(0,i.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==P.data,r="error"===P.status&&!t,n=e=>{r?e.reject(P.error):t&&e.resolve(P.data)},i=()=>{n(this.#v=P.promise=(0,o.pendingThenable)())},a=this.#v;switch(a.status){case"pending":e.queryHash===s.queryHash&&n(a);break;case"fulfilled":(r||P.data!==a.value)&&i();break;case"rejected":r&&P.error===a.reason||i()}}return P}updateResult(){let e=this.#w,t=this.createResult(this.#g,this.options);if(this.#S=this.#g.state,this.#E=this.options,void 0!==this.#S.data&&(this.#O=this.#g),(0,i.shallowEqualObjects)(t,e))return;this.#w=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#U.size)return!0;let s=new Set(r??this.#U);return this.options.throwOnError&&s.add("error"),Object.keys(this.#w).some(t=>this.#w[t]!==e[t]&&s.has(t))};this.#x({listeners:r()})}#A(){let e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#g)return;let t=this.#g;this.#g=e,this.#b=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#F()}#x(e){n.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#w)}),this.#c.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function w(e,t){return!1!==(0,i.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&S(e,t,t.refetchOnMount)}function S(e,t,r){if(!1!==(0,i.resolveEnabled)(t.enabled,e)&&"static"!==(0,i.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&R(e,t)}return!1}function E(e,t,r,s){return(e!==t||!1===(0,i.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&R(e,r)}function R(e,t){return!1!==(0,i.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,b],869230);var T=e.i(271645),O=e.i(912598);e.i(843476);var C=T.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),P=()=>T.useContext(C);e.s(["useQueryErrorResetBoundary",0,P],673664);var I=(e,t,r)=>{let s=r?.state.error&&"function"==typeof e.throwOnError?(0,i.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&!t.isReset()&&(e.retryOnMount=!1)},U=e=>{T.useEffect(()=>{e.clearReset()},[e])},L=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,s]));e.s(["ensurePreventErrorBoundaryRetry",0,I,"getHasError",0,L,"useClearResetErrorBoundary",0,U],427001);var F=T.createContext(!1),M=()=>T.useContext(F);F.Provider,e.s(["useIsRestoring",0,M],381384);var Q=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},A=(e,t)=>
1e.isLoading&&e.isFetching&&!t,_=(e,t)=>e?.suspense&&t.isPending,k=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function j(e,t,r){let a=M(),o=P(),u=(0,O.useQueryClient)(r),l=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(l);let c=u.getQueryCache().get(l.queryHash);l._optimisticResults=a?"isRestoring":"optimistic",Q(l),I(l,o,c),U(o);let h=!u.getQueryCache().get(l.queryHash),[d]=T.useState(()=>new t(u,l)),f=d.getOptimisticResult(l),p=!a&&!1!==e.subscribed;if(T.useSyncExternalStore(T.useCallback(e=>{let t=p?d.subscribe(n.notifyManager.batchCalls(e)):i.noop;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),T.useEffect(()=>{d.setOptions(l)},[l,d]),_(l,f))throw k(l,d,o);if(L({result:f,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw f.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(l,f),l.experimental_prefetchInRender&&!s.environmentManager.isServer()&&A(f,a)){let e=h?k(l,d,o):c?.promise;e?.catch(i.noop).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?f:d.trackResult(f)}e.s(["defaultThrowOnError",0,(e,t)=>void 0===t.state.data,"ensureSuspenseTimers",0,Q,"fetchOptimistic",0,k,"shouldSuspend",0,_,"willFetch",0,A],254440),e.s(["useBaseQuery",0,j],469637),e.s(["useQuery",0,function(e,t){return j(e,b,t)}],266027)},296626,e=>{"use strict";var t=e.i(271645),r=e.i(820783),s=e.i(934620),n=e=>{var n;let a,o,{present:u,children:l}=e,c=function(e){var r,n;let[a,o]=t.useState(),u=t.useRef(null),l=t.useRef(e),c=t.useRef("none"),[h,d]=(r=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>n[e][t]??e,r));return t.useEffect(()=>{let e=i(u.current);c.current="mounted"===h?e:"none"},[h]),(0,s.useLayoutEffect)(()=>{let t=u.current,r=l.current;if(r!==e){let s=c.current,n=i(t);e?d("MOUNT"):"none"===n||t?.display==="none"?d("UNMOUNT"):r&&s!==n?d("ANIMATION_OUT"):d("UNMOUNT"),l.current=e}},[e,d]),(0,s.useLayoutEffect)(()=>{if(a){let e,t=a.ownerDocument.defaultView??window,r=r=>{let s=i(u.current).includes(CSS.escape(r.animationName));if(r.target===a&&s&&(d("ANIMATION_END"),!l.current)){let r=a.style.animationFillMode;a.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===a.style.animationFillMode&&(a.style.animationFillMode=r)})}},s=e=>{e.target===a&&(c.current=i(u.current))};return a.addEventListener("animationstart",s),a.addEventListener("animationcancel",r),a.addEventListener("animationend",r),()=>{t.clearTimeout(e),a.removeEventListener("animationstart",s),a.removeEventListener("animationcancel",r),a.removeEventListener("animationend",r)}}d("ANIMATION_END")},[a,d]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:t.useCallback(e=>{u.current=e?getComputedStyle(e):null,o(e)},[])}}(u),h="function"==typeof l?l({present:c.isPresent}):t.Children.only(l),d=(0,r.useComposedRefs)(c.ref,(n=h,(o=(a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?n.ref:(o=(a=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?n.props.ref:n.props.ref||n.ref));return"function"==typeof l||c.isPresent?t.cloneElement(h,{ref:d}):null};function i(e){return e?.animationName||"none"}n.displayName="Presence",e.s(["Presence",0,n])},225913,e=>{"use strict";var t=e.i(207670);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=t.clsx;e.s(["cva",0,(e,t)=>n=>{var i;if((null==t?void 0:t.variants)==null)return s(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:o}=t,u=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],s=null==o?void 0:o[e];if(null===t)return null;let i=r(t)||r(s);return a[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return s(e,u,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:r,className:s,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...l}[t]):({...o,...l})[t]===r})?[...e,r,s]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},30207,e=>{"use strict";var t=e.i(271645);e.s(["useCallbackRef",0,function(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}])},934620,e=>{"use strict";var t=e.i(271645),r=globalThis?.document?t.useLayoutEffect:()=>{};
1e.s(["useLayoutEffect",0,r])},248425,e=>{"use strict";var t=e.i(271645),r=e.i(174080),s=e.i(820783),n=e.i(843476),i=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===i}var o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var i,o;let u,l,c,h=(o=i=`Primitive.${r}`,(u=t.forwardRef((e,r)=>{let{children:n,...i}=e;if(t.isValidElement(n)){var a;let e,o,u=(a=n,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(e,t){let r={...t};for(let s in t){let n=e[s],i=t[s];/^on[A-Z]/.test(s)?n&&i?r[s]=(...e)=>{let t=i(...e);return n(...e),t}:n&&(r[s]=n):"style"===s?r[s]={...n,...i}:"className"===s&&(r[s]=[n,i].filter(Boolean).join(" "))}return{...e,...r}}(i,n.props);return n.type!==t.Fragment&&(l.ref=r?(0,s.composeRefs)(r,u):u),t.cloneElement(n,l)}return t.Children.count(n)>1?t.Children.only(null):null})).displayName=`${o}.SlotClone`,l=u,(c=t.forwardRef((e,r)=>{let{children:s,...i}=e,o=t.Children.toArray(s),u=o.find(a);if(u){let e=u.props.children,s=o.map(r=>r!==u?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,n.jsx)(l,{...i,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,s):null})}return(0,n.jsx)(l,{...i,ref:r,children:s})})).displayName=`${i}.Slot`,c),d=t.forwardRef((e,t)=>{let{asChild:s,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,n.jsx)(s?h:r,{...i,ref:t})});return d.displayName=`Primitive.${r}`,{...e,[r]:d}},{});e.s(["Primitive",0,o,"dispatchDiscreteCustomEvent",0,function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}],248425)},959411,e=>{"use strict";var t=e.i(271645),r=e.i(248425),s=e.i(843476),n=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i=t.forwardRef((e,t)=>(0,s.jsx)(r.Primitive.span,{...e,ref:t,style:{...n,...e.style}}));i.displayName="VisuallyHidden",e.s(["Root",0,i,"VISUALLY_HIDDEN_STYLES",0,n,"VisuallyHidden",0,i])},618566,(e,t,r)=>{t.exports=e.r(976562)},363178,e=>{"use strict";var t=e.i(271645),r=(e,t,r,s,n,i,a,o)=>{let u=document.documentElement,l=["light","dark"];function c(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,s=r&&i?n.map(e=>i[e]||e):n;r?(u.classList.remove(...s),u.classList.add(i&&i[t]?i[t]:t)):u.setAttribute(e,t)}),r=t,o&&l.includes(r)&&(u.style.colorScheme=r)}if(s)c(s);else try{let e=localStorage.getItem(t)||r,s=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(s)}catch(e){}},s=["light","dark"],n="(prefers-color-scheme: dark)",i="u"<typeof window,a=t.createContext(void 0),o={setTheme:e=>{},themes:[]},u=["light","dark"],l=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:i=!0,enableColorScheme:o=!0,storageKey:l="theme",themes:p=u,defaultTheme:y=i?"system":"light",attribute:m="data-theme",value:v,children:g,nonce:b,scriptProps:w})=>{let[S,E]=t.useState(()=>h(l,y)),[R,T]=t.useState(()=>"system"===S?f():S),O=v?Object.values(v):p,C=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&i&&(t=f());let n=v?v[t]:t,a=r?d(b):null,u=document.documentElement,l=e=>{"class"===e?(u.classList.remove(...O),n&&u.classList.add(n)):e.startsWith("data-")&&(n?u.setAttribute(e,n):u.removeAttribute(e))};if(Array.isArray(m)?m.forEach(l):l(m),o){let e=s.includes(y)?y:null,r=s.includes(t)?t:e;u.style.colorScheme=r}null==a||a()},[b]),P=t.useCallback(e=>{let t="function"==typeof e?e(S):e;E(t);try{localStorage.setItem(l,t)}catch(e){}},[S]),I=t.useCallback(t=>{T(f(t)),"system"===S&&i&&!e&&C("system")},[S,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(I),I(e),()=>e.removeListener(I)},[I]),t.useEffect(()=>{let e=e=>{e.key===l&&(e.newValue?E(e.newValue):P(y))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[P]),t.useEffect(()=>{C(null!=e?e:S)},[e,S]);let U=t.useMemo(()=>({theme:S,setTheme:P,forcedTheme:e,resolvedTheme:"system"===S?R:S,themes:i?[...p,"system"]:p,systemTheme:i?R:void 0}),[S,P,e,R,i,p]);return t.createElement(a.Provider,{value:U},t.createElement(c,{forcedTheme:e,storageKey:l,attribute:m,enableSystem:i,enableColorScheme:o,defaultTheme:y,value:v,themes:p,nonce:b,scriptProps:w}),g)},c=t.memo(({forcedTheme:e,storageKey:s,attribute:n,enableSystem:i,enableColorScheme:a,defaultTheme:o,value:u,themes:l,nonce:c,scriptProps:h})=>{let d=JSON.stringify([n,s,o,e,l,u,i,a]).slice(1,-1);return t.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${d})`}})}),h=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},d=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},f=e=>
1(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(a)?t.createElement(t.Fragment,null,e.children):t.createElement(l,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(a))?e:o}])},526732,e=>{"use strict";var t=e.i(247167),r=e.i(843476),s=e.i(271645);class n extends Error{constructor(e,t){e instanceof Error?super(void 0,{cause:{err:e,...e.cause,...t}}):"string"==typeof e?(t instanceof Error&&(t={err:t,...t.cause}),super(e,t)):super(void 0,e),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);const r=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${r}`}}class i extends n{}class a extends n{}async function o(e,t,r,s={}){let n=`${u(t)}/${e}`;try{let e={headers:{"Content-Type":"application/json",...s?.headers?.cookie?{cookie:s.headers.cookie}:{}}};s?.body&&(e.body=JSON.stringify(s.body),e.method="POST");let t=await fetch(n,e),r=await t.json();if(!t.ok)throw r;return r}catch(e){return r.error(new i(e.message,e)),null}}function u(e){return"u"<typeof window?`${e.baseUrlServer}${e.basePathServer}`:e.basePath}function l(){return Math.floor(Date.now()/1e3)}function c(e){let t=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let r=new URL(e||t),s=("/"===r.pathname?t.pathname:r.pathname).replace(/\/$/,""),n=`${r.origin}${s}`;return{origin:r.origin,host:r.host,path:s,base:n,toString:()=>n}}let h={baseUrl:c(t.default.env.NEXTAUTH_URL??t.default.env.VERCEL_URL).origin,basePath:c(t.default.env.NEXTAUTH_URL).path,baseUrlServer:c(t.default.env.NEXTAUTH_URL_INTERNAL??t.default.env.NEXTAUTH_URL??t.default.env.VERCEL_URL).origin,basePathServer:c(t.default.env.NEXTAUTH_URL_INTERNAL??t.default.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},d=null;function f(){return"u"<typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{},name:"next-auth",onmessage:null,onmessageerror:null,close:()=>{},dispatchEvent:()=>!1}:new BroadcastChannel("next-auth")}function p(){return null===d&&(d=f()),d}let y={debug:console.debug,error:console.error,warn:console.warn},m=s.createContext?.(void 0);async function v(e){let t=await o("session",h,y,e);return(e?.broadcast??!0)&&f().postMessage({event:"session",data:{trigger:"getSession"}}),t}async function g(){let e=await o("csrf",h,y);return e?.csrfToken??""}async function b(){return o("providers",h,y)}async function w(e,t,r){let{callbackUrl:s,...n}=t??{},{redirect:i=!0,redirectTo:a=s??window.location.href,...o}=n,l=u(h),c=await b();if(!c){let e=`${l}/error`;window.location.href=e;return}if(!e||!c[e]){let e=`${l}/signin?${new URLSearchParams({callbackUrl:a})}`;window.location.href=e;return}let d=c[e].type;if("webauthn"===d)throw TypeError(`Provider id "${e}" refers to a WebAuthn provider. 2Please use \`import { signIn } from "next-auth/webauthn"\` instead.`);let f=`${l}/${"credentials"===d?"callback":"signin"}/${e}`,p=await g(),y=await fetch(`${f}?${new URLSearchParams(r)}`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...o,csrfToken:p,callbackUrl:a})}),m=await y.json();if(i){let e=m.url??a;window.location.href=e,e.includes("#")&&window.location.reload();return}let v=new URL(m.url).searchParams.get("error")??void 0,w=new URL(m.url).searchParams.get("code")??void 0;return y.ok&&await h._getSession({event:"storage"}),{error:v,code:w,status:y.status,ok:y.ok,url:v?null:m.url}}async function S(e){let{redirect:t=!0,redirectTo:r=e?.callbackUrl??window.location.href}=e??{},s=u(h),n=await g(),i=await fetch(`${s}/signout`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:n,callbackUrl:r})}),a=await i.json();if(p().postMessage({event:"session",data:{trigger:"signout"}}),t){let e=a.url??r;window.location.href=e,e.includes("#")&&window.location.reload();return}return await h._getSession({event:"storage"}),a}e.s(["SessionProvider",0,function(e){if(!m)throw Error("React Context is unavailable in Server Components");let{children:t,basePath:n,refetchInterval:i,refetchWhenOffline:u}=e;n&&(h.basePath=n);let c=void 0!==e.session;h._lastSync=c?l():0;let[d,f]=s.useState(()=>(c&&(h._session=e.session),e.session)),[b,w]=s.useState(!c);s.useEffect(()=>(h._getSession=async({event:e}={})=>{try{let t="storage"===e;if(t||void 0===h._session){h._lastSync=l(),h._session=await v({broadcast:!t}),f(h._session);return}if(!e||null===h._session||l()<h._lastSync)return;h._lastSync=l(),h._session=await v(),f(h._session)}catch(e){y.error(new a(e.message,e))}finally{w(!1)}},h._getSession(),()=>{h._lastSync=0,h._session=void 0,h._getSession=()=>{}}),[]),s.useEffect(()=>{let e=()=>h._getSession({event:"storage"});return p().addEventListener("message",e),()=>p().removeEventListener("message",e)},[]),s.useEffect(()=>{let{refetchOnWindowFocus:t=!0}=e,r=()=>{t&&"visible"===document.visibilityState&&h._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",r,!1),()=>document.removeEventListener("visibilitychange",r,!1)},[e.refetchOnWindowFocus]);let S=function(){let[e,t]=s.useState("u">typeof navigator&&navigator.onLine),r=()=>t(!0),n=()=>t(!1);return s.useEffect(()=>(window.addEventListener("online",r),window.addEventListener("offline",n
2),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}),[]),e}(),E=!1!==u||S;s.useEffect(()=>{if(i&&E){let e=setInterval(()=>{h._session&&h._getSession({event:"poll"})},1e3*i);return()=>clearInterval(e)}},[i,E]);let R=s.useMemo(()=>({data:d,status:b?"loading":d?"authenticated":"unauthenticated",async update(e){if(b)return;w(!0);let t=await o("session",h,y,void 0===e?void 0:{body:{csrfToken:await g(),data:e}});return w(!1),t&&(f(t),p().postMessage({event:"session",data:{trigger:"getSession"}})),t}}),[d,b]);return(0,r.jsx)(m.Provider,{value:R,children:t})},"signIn",0,w,"signOut",0,S,"useSession",0,function(e){if(!m)throw Error("React Context is unavailable in Server Components");let t=s.useContext(m),{required:r,onUnauthenticated:n}=e??{},i=r&&"unauthenticated"===t.status;return(s.useEffect(()=>{if(i){let e=`${h.basePath}/signin?${new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href})}`;n?n():window.location.href=e}},[i,n]),i)?{data:t.data,update:t.update,status:"loading"}:t}],526732)}]);
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.