vendor: 7,479 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reset-password-CU21BOj2.js","assets/input-BcOcL4rj.js","assets/label-iCIG1TtN.js","assets/report-BS1MBIfH.js","assets/textarea-BvwGIo12.js","assets/select-BA3ZPpmB.js","assets/Combination-CS8L_r2W.js","assets/chevron-down-D6Gcnkgt.js","assets/check-Bm0_URq5.js","assets/map-BvvRyS1T.js","assets/ExternalLink-B233stIq.js","assets/phone-DpLANwtc.js","assets/map-pin-C-3f8lAm.js","assets/createServerFn-CLixxBKW.js","assets/mail-DYsUFuL5.js","assets/arrow-right-CsdmhIly.js","assets/directory-7Og2ROFK.js","assets/BusinessPhotos-Ctl6Hpq7.js","assets/trash-2-B-ZUGdvs.js","assets/badge-check-C9BIBAWn.js","assets/auth-Bgd6F4pL.js","assets/announcements-CqRrquZM.js","assets/announcement-categories-Btz9MxC4.js","assets/about-BNDO1tVN.js","assets/store-KtQp2Nue.js","assets/index-DXA3DWiR.js","assets/index-B4_2nIra.js","assets/dialog-Dk5uS442.js","assets/onboarding-CmWSqu74.js","assets/OwnerFormRecord-Bs_S5KSd.js","assets/form-extract.functions-HNOpxnc6.js","assets/submit.event-Ctm7i-lM.js","assets/forms._slug-bJ2bUVf3.js","assets/submissions-D2eux6bN.js","assets/profile-DB_gL2yT.js","assets/photos-DY8lRJ8W.js","assets/owners-BINtoX_A.js","assets/forms-CzrWdOZ1.js","assets/directory-DikadCRS.js","assets/announcements-D2NWT0dQ.js","assets/activity-DupcFgOg.js"])))=>i.map(i=>d[i]); 2function VE(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(i,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var RL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oh={exports:{}},ho={};var Wy;function GE(){if(Wy)return ho;Wy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(i,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var d in o)d!=="key"&&(c[d]=o[d])}else c=o;return o=c.ref,{$$typeof:t,type:i,key:u,ref:o!==void 0?o:null,props:c}}return ho.Fragment=e,ho.jsx=r,ho.jsxs=r,ho}var ev;function FE(){return ev||(ev=1,Oh.exports=GE()),Oh.exports}var N=FE(),Ch={exports:{}},we={};var tv;function KE(){if(tv)return we;tv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function w(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,S={};function E(C,V,F){this.props=C,this.context=V,this.refs=S,this.updater=F||_}E.prototype.isReactComponent={},E.prototype.setState=function(C,V){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,V,"setState")},E.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=E.prototype;function O(C,V,F){this.props=C,this.context=V,this.refs=S,this.updater=F||_}var j=O.prototype=new A;j.constructor=O,R(j,E.prototype),j.isPureReactComponent=!0;var q=Array.isArray;function H(){}var P={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function Q(C,V,F){var Z=F.ref;return{$$typeof:t,type:C,key:V,ref:Z!==void 0?Z:null,props:F}}function re(C,V){return Q(C.type,V,C.props)}function ne(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function fe(C){var V={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return V[F]})}var ye=/\/+/g;function Le(C,V){return typeof C=="object"&&C!==null&&C.key!=null?fe(""+C.key):V.toString(36)}function Re(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(H,H):(C.status="pending",C.then(function(V){C.status==="pending"&&(C.status="fulfilled",C.value=V)},function(V){C.status==="pending"&&(C.status="rejected",C.reason=V)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,V,F,Z,X){var se=typeof C;(se==="undefined"||se==="boolean")&&(C=null);var be=!1;if(C===null)be=!0;else switch(se){case"bigint":case"string":case"number":be=!0;break;case"object":switch(C.$$typeof){case t:case e:be=!0;break;case y:return be=C._init,L(be(C._payload),V,F,Z,X)}}if(be)return X=X(C),be=Z===""?"."+Le(C,0):Z,q(X)?(F="",be!=null&&(F=be.replace(ye,"$&/")+"/"),L(X,V,F,"",function(Ct){return Ct})):X!=null&&(ne(X)&&(X=re(X,F+(X.key==null||C&&C.key===X.key?"":(""+X.key).replace(ye,"$&/")+"/")+be)),V.push(X)),1;be=0;var ge=Z===""?".":Z+":";if(q(C))for(var he=0;he<C.length;he++)Z=C[he],se=ge+Le(Z,he),be+=L(Z,V,F,se,X);else if(he=w(C),typeof he=="function")for(C=he.call(C),he=0;!(Z=C.next()).done;)Z=Z.value,se=ge+Le(Z,he++),be+=L(Z,V,F,se,X);else if(se==="object"){if(typeof C.then=="function")return L(Re(C),V,F,Z,X);throw V=String(C),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return be}function Y(C,V,F){if(C==null)return C;var Z=[],X=0;return L(C,Z,"","",function(se){return V.call(F,se,X++)}),Z}function ie(C){if(C._status===-1){var V=C._result;V=V(),V.then(function(F){(C._status===0||C._status===-1)&&(C._status=1,C._result=F)},function(F){(C._status===0||C._status===-1)&&(C._status=2,C._result=F)}),C._status===-1&&(C._status=0,C._result=V)}if(C._status===1)return C._result.default;throw C._result}var _e=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},W={map:Y,forEach:function(C,V,F){Y(C,function(){V.apply(this,arguments)},F)},count:function(C){var V=0;return Y(C,function(){V++}),V},toArray:function(C){return Y(C,function(V){return V})||[]},only:function(C){if(!ne(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return we.Activity=g,we.Children=W,we.Component=E,we.Fragment=r,we.Profiler=o,we.PureComponent=O,we.StrictMode=i,we.Suspense=f,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,we.__COMPILER_RUNTIME={__proto__:null,c:function(C){return P.H.useMemoCache(C)}},we.cache=function(C){return function(){return C.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(C,V,F){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var Z=R({},C.props),X=C.key;
vendor: 5,327 bytes, line 2
2if(V!=null)for(se in V.key!==void 0&&(X=""+V.key),V)!M.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(Z[se]=V[se]);var se=arguments.length-2;if(se===1)Z.children=F;else if(1<se){for(var be=Array(se),ge=0;ge<se;ge++)be[ge]=arguments[ge+2];Z.children=be}return Q(C.type,X,Z)},we.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},we.createElement=function(C,V,F){var Z,X={},se=null;if(V!=null)for(Z in V.key!==void 0&&(se=""+V.key),V)M.call(V,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(X[Z]=V[Z]);var be=arguments.length-2;if(be===1)X.children=F;else if(1<be){for(var ge=Array(be),he=0;he<be;he++)ge[he]=arguments[he+2];X.children=ge}if(C&&C.defaultProps)for(Z in be=C.defaultProps,be)X[Z]===void 0&&(X[Z]=be[Z]);return Q(C,se,X)},we.createRef=function(){return{current:null}},we.forwardRef=function(C){return{$$typeof:d,render:C}},we.isValidElement=ne,we.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:ie}},we.memo=function(C,V){return{$$typeof:p,type:C,compare:V===void 0?null:V}},we.startTransition=function(C){var V=P.T,F={};P.T=F;try{var Z=C(),X=P.S;X!==null&&X(F,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(H,_e)}catch(se){_e(se)}finally{V!==null&&F.types!==null&&(V.types=F.types),P.T=V}},we.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},we.use=function(C){return P.H.use(C)},we.useActionState=function(C,V,F){return P.H.useActionState(C,V,F)},we.useCallback=function(C,V){return P.H.useCallback(C,V)},we.useContext=function(C){return P.H.useContext(C)},we.useDebugValue=function(){},we.useDeferredValue=function(C,V){return P.H.useDeferredValue(C,V)},we.useEffect=function(C,V){return P.H.useEffect(C,V)},we.useEffectEvent=function(C){return P.H.useEffectEvent(C)},we.useId=function(){return P.H.useId()},we.useImperativeHandle=function(C,V,F){return P.H.useImperativeHandle(C,V,F)},we.useInsertionEffect=function(C,V){return P.H.useInsertionEffect(C,V)},we.useLayoutEffect=function(C,V){return P.H.useLayoutEffect(C,V)},we.useMemo=function(C,V){return P.H.useMemo(C,V)},we.useOptimistic=function(C,V){return P.H.useOptimistic(C,V)},we.useReducer=function(C,V,F){return P.H.useReducer(C,V,F)},we.useRef=function(C){return P.H.useRef(C)},we.useState=function(C){return P.H.useState(C)},we.useSyncExternalStore=function(C,V,F){return P.H.useSyncExternalStore(C,V,F)},we.useTransition=function(){return P.H.useTransition()},we.version="19.2.5",we}var nv;function Ko(){return nv||(nv=1,Ch.exports=KE()),Ch.exports}var J=Ko();const ee=hb(J),YE=VE({__proto__:null,default:ee},[J]);var kh={exports:{}},fo={},Nh={exports:{}},jh={};var rv;function QE(){return rv||(rv=1,(function(t){function e(L,Y){var ie=L.length;L.push(Y);e:for(;0<ie;){var _e=ie-1>>>1,W=L[_e];if(0<o(W,Y))L[_e]=Y,L[ie]=W,ie=_e;else break e}}function r(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var Y=L[0],ie=L.pop();if(ie!==Y){L[0]=ie;e:for(var _e=0,W=L.length,C=W>>>1;_e<C;){var V=2*(_e+1)-1,F=L[V],Z=V+1,X=L[Z];if(0>o(F,ie))Z<W&&0>o(X,F)?(L[_e]=X,L[Z]=ie,_e=Z):(L[_e]=F,L[V]=ie,_e=V);else if(Z<W&&0>o(X,ie))L[_e]=X,L[Z]=ie,_e=Z;else break e}}return Y}function o(L,Y){var ie=L.sortIndex-Y.sortIndex;return ie!==0?ie:L.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],y=1,g=null,v=3,w=!1,_=!1,R=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function j(L){for(var Y=r(p);Y!==null;){if(Y.callback===null)i(p);else if(Y.startTime<=L)i(p),Y.sortIndex=Y.expirationTime,e(f,Y);else break;Y=r(p)}}function q(L){if(R=!1,j(L),!_)if(r(f)!==null)_=!0,H||(H=!0,fe());else{var Y=r(p);Y!==null&&Re(q,Y.startTime-L)}}var H=!1,P=-1,M=5,Q=-1;function re(){return S?!0:!(t.unstable_now()-Q<M)}function ne(){if(S=!1,H){var L=t.unstable_now();Q=L;var Y=!0;try{e:{_=!1,R&&(R=!1,A(P),P=-1),w=!0;var ie=v;try{t:{for(j(L),g=r(f);g!==null&&!(g.expirationTime>L&&re());){var _e=g.callback;if(typeof _e=="function"){g.callback=null,v=g.priorityLevel;var W=_e(g.expirationTime<=L);if(L=t.unstable_now(),typeof W=="function"){g.callback=W,j(L),Y=!0;break t}g===r(f)&&i(f),j(L)}else i(f);g=r(f)}if(g!==null)Y=!0;else{var C=r(p);C!==null&&Re(q,C.startTime-L),Y=!1}}break e}finally{g=null,v=ie,w=!1}Y=void 0}}finally{Y?fe():H=!1}}}var fe;if(typeof O=="function")fe=function(){O(ne)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Le=ye.port2;ye.port1.onmessage=ne,fe=function(){Le.postMessage(null)}}else fe=function(){E(ne,0)};function Re(L,Y){P=E(function(){L(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<L?Math.floor(1e3/L):
vendor: 8,403 bytes, line 2
25},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(L){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var ie=v;v=Y;try{return L()}finally{v=ie}},t.unstable_requestPaint=function(){S=!0},t.unstable_runWithPriority=function(L,Y){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ie=v;v=L;try{return Y()}finally{v=ie}},t.unstable_scheduleCallback=function(L,Y,ie){var _e=t.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?_e+ie:_e):ie=_e,L){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=ie+W,L={id:y++,callback:Y,priorityLevel:L,startTime:ie,expirationTime:W,sortIndex:-1},ie>_e?(L.sortIndex=ie,e(p,L),r(f)===null&&L===r(p)&&(R?(A(P),P=-1):R=!0,Re(q,ie-_e))):(L.sortIndex=W,e(f,L),_||w||(_=!0,H||(H=!0,fe()))),L},t.unstable_shouldYield=re,t.unstable_wrapCallback=function(L){var Y=v;return function(){var ie=v;v=Y;try{return L.apply(this,arguments)}finally{v=ie}}}})(jh)),jh}var sv;function JE(){return sv||(sv=1,Nh.exports=QE()),Nh.exports}var Mh={exports:{}},Bt={};var iv;function XE(){if(iv)return Bt;iv=1;var t=Ko();function e(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(f,p,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:f,containerInfo:p,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Bt.createPortal=function(f,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return c(f,p,null,y)},Bt.flushSync=function(f){var p=u.T,y=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=p,i.p=y,i.d.f()}},Bt.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(f,p))},Bt.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},Bt.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?i.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:w}):y==="script"&&i.d.X(f,{crossOrigin:g,integrity:v,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Bt.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=d(p.as,p.crossOrigin);i.d.M(f,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(f)},Bt.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin);i.d.L(f,y,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Bt.preloadModule=function(f,p){if(typeof f=="string")if(p){var y=d(p.as,p.crossOrigin);i.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(f)},Bt.requestFormReset=function(f){i.d.r(f)},Bt.unstable_batchedUpdates=function(f,p){return f(p)},Bt.useFormState=function(f,p,y){return u.H.useFormState(f,p,y)},Bt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Bt.version="19.2.5",Bt}var av;function fb(){if(av)return Mh.exports;av=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Mh.exports=XE(),Mh.exports}var ov;function ZE(){if(ov)return fo;ov=1;var t=JE(),e=Ko(),r=fb();function i(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var s=n,a=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(a=s.return),n=s.return;while(n)}return s.tag===3?a:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function d(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(c(n)!==n)throw Error(i(188))}function p(n){var s=n.alternate;if(!s){if(s=c(n),s===null)throw Error(i(188));return s!==n?null:n}for(var a=n,l=s;;){var h=a.return;if(h===null)break;var m=h.alternate;if(m===null){if(l=h.return,l!==null){a=l;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===a)return f(h),n;if(m===l)return f(h),s;m=m.sibling}throw Error(i(188))}if(a.return!==l.return)a=h,l=m;else{for(var b=!1,T=h.child;T;){if(T===a){b=!0,a=h,l=m;break}if(T===l){b=!0,l=h,a=m;break}T=T.sibling}if(!b){for(T=m.child;T;){if(T===a){b=!0,a=m,l=h;break}if(T===l){b=!0,l=m,a=h;break}T=T.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=ne&&n[ne]||n["@@iterator"],typeof n=="function"?n:null)}var ye=Symbol.for("react.client.reference");function Le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ye?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case R:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case q:return"Suspense";case H:return"SuspenseList";case Q:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case _:return"Portal";case O:return n.displayName||"Context";case A:return(n._context.displayName||"Context")+".Consumer";case j:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return s=n.displayName||null,s!==null?s:Le(n.type)||"Memo";case M:s=n._payload,n=n._init;try{return Le(n(s))}catch{}}return null}var Re=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},_e=[],W=-1;function C(n){return{current:n}}function V(n){0>W||(n.current=_e[W],_e[W]=null,W--)}function F(n,s){W++,_e[W]=n.current,n.current=s}var Z=C(null),X=C(null),se=C(null),be=C(null);
vendor: 1,965 bytes, lines 2-6
2function ge(n,s){switch(F(se,s),F(X,n),F(Z,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Sy(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Sy(s),n=Ey(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(Z),F(Z,n)}function he(){V(Z),V(X),V(se)}function Ct(n){n.memoizedState!==null&&F(be,n);var s=Z.current,a=Ey(s,n.type);s!==a&&(F(X,n),F(Z,a))}function gt(n){X.current===n&&(V(Z),V(X)),be.current===n&&(V(be),oo._currentValue=ie)}var ct,Mn;function yt(n){if(ct===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);ct=s&&s[1]||"",Mn=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+ct+n+Mn}var Cs=!1;function sr(n,s){if(!n||Cs)return"";Cs=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(B){var I=B}Reflect.construct(n,[],K)}else{try{K.call()}catch(B){I=B}n.call(K.prototype)}}else{try{throw Error()}catch(B){I=B}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(B){if(B&&I&&typeof B.stack=="string")return[B.stack,I.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),b=m[0],T=m[1];if(b&&T){var x=b.split(` 5`),z=T.split(` 6`);for(h=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;h<z.length&&!z[h].includes("DetermineComponentFrameRoot");)h++;if(l===x.length||h===z.length)for(l=x.length-1,h=z.length-1;1<=l&&0<=h&&x[l]!==z[h];)h--;for(;1<=l&&0<=h;
vendor: 5,007 bytes, lines 6-9
6l--,h--)if(x[l]!==z[h]){if(l!==1||h!==1)do if(l--,h--,0>h||x[l]!==z[h]){var $=` 7`+x[l].replace(" at new "," at ");return n.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",n.displayName)),$}while(1<=l&&0<=h);break}}}finally{Cs=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?yt(a):""}function qn(n,s){switch(n.tag){case 26:case 27:case 5:return yt(n.type);case 16:return yt("Lazy");case 13:return n.child!==s&&s!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return sr(n.type,!1);case 11:return sr(n.type.render,!1);case 1:return sr(n.type,!0);case 31:return yt("Activity");default:return""}}function bn(n){try{var s="",a=null;do s+=qn(n,a),a=n,n=n.return;while(n);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var kt=Object.prototype.hasOwnProperty,cn=t.unstable_scheduleCallback,ks=t.unstable_cancelCallback,St=t.unstable_shouldYield,Vn=t.unstable_requestPaint,Et=t.unstable_now,ze=t.unstable_getCurrentPriorityLevel,tt=t.unstable_ImmediatePriority,wn=t.unstable_UserBlockingPriority,ir=t.unstable_NormalPriority,wa=t.unstable_LowPriority,ar=t.unstable_IdlePriority,Zo=t.log,Dr=t.unstable_setDisableYieldValue,Ns=null,$t=null;function Dn(n){if(typeof Zo=="function"&&Dr(n),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(Ns,n)}catch{}}var zt=Math.clz32?Math.clz32:Gn,yu=Math.log,_a=Math.LN2;function Gn(n){return n>>>=0,n===0?32:31-(yu(n)/_a|0)|0}var mi=256,gi=262144,js=4194304;function Fn(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ve(n,s,a){var l=n.pendingLanes;if(l===0)return 0;var h=0,m=n.suspendedLanes,b=n.pingedLanes;n=n.warmLanes;var T=l&134217727;return T!==0?(l=T&~m,l!==0?h=Fn(l):(b&=T,b!==0?h=Fn(b):a||(a=T&~n,a!==0&&(h=Fn(a))))):(T=l&~m,T!==0?h=Fn(T):b!==0?h=Fn(b):a||(a=l&~n,a!==0&&(h=Fn(a)))),h===0?0:s!==0&&s!==h&&(s&m)===0&&(m=h&-h,a=s&-s,m>=a||m===32&&(a&4194048)!==0)?s:h}function Je(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Tt(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function It(){var n=js;return js<<=1,(js&62914560)===0&&(js=4194304),n}function Lr(n){for(var s=[],a=0;31>a;a++)s.push(n);return s}function et(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ft(n,s,a,l,h,m){var b=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var T=n.entanglements,x=n.expirationTimes,z=n.hiddenUpdates;for(a=b&~a;0<a;){var $=31-zt(a),K=1<<$;T[$]=0,x[$]=-1;var I=z[$];if(I!==null)for(z[$]=null,$=0;$<I.length;$++){var B=I[$];B!==null&&(B.lane&=-536870913)}a&=~K}l!==0&&Ms(n,l,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(b&~s))}function Ms(n,s,a){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-zt(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|a&261930}function Kt(n,s){var a=n.entangledLanes|=s;for(n=n.entanglements;a;){var l=31-zt(a),h=1<<l;h&s|n[l]&s&&(n[l]|=s),a&=~h}}function Yt(n,s){var a=s&-s;return a=(a&42)!==0?1:yi(a),(a&(n.suspendedLanes|s))!==0?0:a}function yi(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ln(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function vu(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Fy(n.type))}function lp(n,s){var a=Y.p;try{return Y.p=n,s()}finally{Y.p=a}}var Ur=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Ur,Qt="__reactProps$"+Ur,vi="__reactContainer$"+Ur,bu="__reactEvents$"+Ur,M_="__reactListeners$"+Ur,D_="__reactHandles$"+Ur,cp="__reactResources$"+Ur,Sa="__reactMarker$"+Ur;function wu(n){delete n[Nt],delete n[Qt],delete n[bu],delete n[M_],delete n[D_]}function bi(n){var s=n[Nt];
vendor: 7,523 bytes, line 9
9if(s)return s;for(var a=n.parentNode;a;){if(s=a[vi]||a[Nt]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(n=ky(n);n!==null;){if(a=n[Nt])return a;n=ky(n)}return s}n=a,a=n.parentNode}return null}function wi(n){if(n=n[Nt]||n[vi]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Ea(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(i(33))}function _i(n){var s=n[cp];return s||(s=n[cp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Rt(n){n[Sa]=!0}var up=new Set,dp={};function Ds(n,s){Si(n,s),Si(n+"Capture",s)}function Si(n,s){for(dp[n]=s,n=0;n<s.length;n++)up.add(s[n])}var L_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),hp={},fp={};function U_(n){return kt.call(fp,n)?!0:kt.call(hp,n)?!1:L_.test(n)?fp[n]=!0:(hp[n]=!0,!1)}function Wo(n,s,a){if(U_(s))if(a===null)n.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+a)}}function el(n,s,a){if(a===null)n.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+a)}}function or(n,s,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(s,a,""+l)}}function _n(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function pp(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function P_(n,s,a){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,m=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return h.call(this)},set:function(b){a=""+b,m.call(this,b)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function _u(n){if(!n._valueTracker){var s=pp(n)?"checked":"value";n._valueTracker=P_(n,s,""+n[s])}}function mp(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var a=s.getValue(),l="";return n&&(l=pp(n)?n.checked?"true":"false":n.value),n=l,n!==a?(s.setValue(n),!0):!1}function tl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var z_=/[\n"\\]/g;function Sn(n){return n.replace(z_,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Su(n,s,a,l,h,m,b,T){n.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?n.type=b:n.removeAttribute("type"),s!=null?b==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+_n(s)):n.value!==""+_n(s)&&(n.value=""+_n(s)):b!=="submit"&&b!=="reset"||n.removeAttribute("value"),s!=null?Eu(n,b,_n(s)):a!=null?Eu(n,b,_n(a)):l!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+_n(T):n.removeAttribute("name")}function gp(n,s,a,l,h,m,b,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),s!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||s!=null)){_u(n);return}a=a!=null?""+_n(a):"",s=s!=null?""+_n(s):a,T||s===n.value||(n.value=s),n.defaultValue=s}l=l??h,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=T?n.checked:!!l,n.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.name=b),_u(n)}function Eu(n,s,a){s==="number"&&tl(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Ei(n,s,a,l){if(n=n.options,s){s={};for(var h=0;h<a.length;h++)s["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=s.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&l&&(n[a].defaultSelected=!0)}else{for(a=""+_n(a),s=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,l&&(n[h].defaultSelected=!0);return}s!==null||n[h].disabled||(s=n[h])}s!==null&&(s.selected=!0)}}function yp(n,s,a){if(s!=null&&(s=""+_n(s),s!==n.value&&(n.value=s),a==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=a!=null?""+_n(a):""}function vp(n,s,a,l){if(s==null){if(l!=null){if(a!=null)throw Error(i(92));if(Re(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),s=a}a=_n(s),n.defaultValue=a,l=n.textContent,l===a&&l!==""&&l!==null&&(n.value=l),_u(n)}function Ti(n,s){if(s){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=s;return}}n.textContent=s}var I_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bp(n,s,a){var l=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,a):typeof a!="number"||a===0||I_.has(s)?s==="float"?n.cssFloat=a:n[s]=(""+a).trim():n[s]=a+"px"}function wp(n,s,a){if(s!=null&&typeof s!="object")throw Error(i(62));if(n=n.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var h in s)l=s[h],s.hasOwnProperty(h)&&a[h]!==l&&bp(n,h,l)}else for(var m in s)s.hasOwnProperty(m)&&bp(n,m,s[m])}function Tu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),H_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function nl(n){return H_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function lr(){}var Ru=null;function Au(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ri=null,Ai=null;function _p(n){var s=wi(n);if(s&&(n=s.stateNode)){var a=n[Qt]||null;e:switch(n=s.stateNode,s.type){case"input":if(Su(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Sn(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var l=a[s];if(l!==n&&l.form===n.form){var h=l[Qt]||null;if(!h)throw Error(i(90));Su(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(s=0;s<a.length;s++)l=a[s],l.form===n.form&&mp(l)}break e;case"textarea":yp(n,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&Ei(n,!!a.multiple,s,!1)}}}var xu=!1;function Sp(n,s,a){if(xu)return n(s,a);xu=!0;try{var l=n(s);return l}finally{if(xu=!1,(Ri!==null||Ai!==null)&&(ql(),Ri&&(s=Ri,n=Ai,Ai=Ri=null,_p(s),n)))for(s=0;s<n.length;s++)_p(n[s])}}function Ta(n,s){var a=n.stateNode;if(a===null)return null;var l=a[Qt]||null;if(l===null)return null;a=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(i(231,s,typeof a));return a}var cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ou=!1;if(cr)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){Ou=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch{Ou=!1}var Pr=null,Cu=null,rl=null;function Ep(){if(rl)return rl;var n,s=Cu,a=s.length,l,h="value"in Pr?Pr.value:Pr.textContent,m=h.length;for(n=0;n<a&&s[n]===h[n];n++);var b=a-n;for(l=1;l<=b&&s[a-l]===h[m-l];l++);return rl=h.slice(n,1<l?1-l:void 0)}function sl(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function il(){return!0}function Tp(){return!1}function Jt(n){function s(a,l,h,m,b){this._reactName=a,this._targetInst=h,this.type=l,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(a=n[T],this[T]=a?a(m):m[T]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?il:Tp,this.isPropagationStopped=Tp,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=il)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=il)},persist:function(){},isPersistent:il}),s}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},al=Jt(Ls),Aa=g({},Ls,{view:0,detail:0}),$_=Jt(Aa),ku,Nu,xa,ol=g({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==xa&&(xa&&n.type==="mousemove"?(ku=n.screenX-xa.screenX,Nu=n.screenY-xa.screenY):Nu=ku=0,xa=n),ku)},movementY:function(n){return"movementY"in n?n.movementY:Nu}}),Rp=Jt(ol),q_=g({},ol,{dataTransfer:0}),V_=Jt(q_),G_=g({},Aa,{relatedTarget:0}),ju=Jt(G_),F_=g({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),K_=Jt(F_),Y_=g({},Ls,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Q_=Jt(Y_),J_=g({},Ls,{data:0}),Ap=Jt(J_),X_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},W_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eS(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=W_[n])?!!s[n]:!1}function Mu(){return eS}var tS=g({},Aa,{key:function(n){if(n.key){var s=X_[n.key]||n.key;if(s!=="Unidentified")return s}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=sl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Z_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mu,charCode:function(n){return n.type==="keypress"?sl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?sl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),nS=Jt(tS),rS=g({},ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=Jt(rS),sS=g({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mu}),iS=Jt(sS),aS=g({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=Jt(aS),lS=g({},ol,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),cS=Jt(lS),uS=g({},Ls,{newState:0,oldState:0}),dS=Jt(uS),hS=[9,13,27,32],Du=cr&&"CompositionEvent"in window,Oa=null;cr&&"documentMode"in document&&(Oa=document.documentMode);var fS=cr&&"TextEvent"in window&&!Oa,Op=cr&&(!Du||Oa&&8<Oa&&11>=Oa),Cp=" ",kp=!1;function Np(n,s){switch(n){case"keyup":return hS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var xi=!1;function pS(n,s){switch(n){case"compositionend":return jp(s);case"keypress":return s.which!==32?null:(kp=!0,Cp);case"textInput":return n=s.data,n===Cp&&kp?null:n;default:return null}}function mS(n,s){if(xi)return n==="compositionend"||!Du&&Np(n,s)?(n=Ep(),rl=Cu=Pr=null,xi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Op&&s.locale!=="ko"?null:s.data;default:return null}}var gS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mp(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!gS[n.type]:s==="textarea"}function Dp(n,s,a,l){Ri?Ai?Ai.push(l):Ai=[l]:Ri=l,s=Jl(s,"onChange"),0<s.length&&(a=new al("onChange","change",null,a,l),n.push({event:a,listeners:s}))}var Ca=null,ka=null;function yS(n){gy(n,0)}function ll(n){var s=Ea(n);if(mp(s))return n}function Lp(n,s){if(n==="change")return s}var Up=!1;if(cr){var Lu;if(cr){var Uu="oninput"in document;if(!Uu){var Pp=document.createElement("div");Pp.setAttribute("oninput","return;"),Uu=typeof Pp.oninput=="function"}Lu=Uu}else Lu=!1;Up=Lu&&(!document.documentMode||9<document.documentMode)}function zp(){Ca&&(Ca.detachEvent("onpropertychange",Ip),ka=Ca=null)}function Ip(n){if(n.propertyName==="value"&&ll(ka)){var s=[];Dp(s,ka,n,Au(n)),Sp(yS,s)}}function vS(n,s,a){n==="focusin"?(zp(),Ca=s,ka=a,Ca.attachEvent("onpropertychange",Ip)):n==="focusout"&&zp()}function bS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ll(ka)}function wS(n,s){if(n==="click")return ll(s)}function _S(n,s){if(n==="input"||n==="change")return ll(s)}function SS(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var un=typeof Object.is=="function"?Object.is:SS;function Na(n,s){if(un(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var a=Object.keys(n),l=Object.keys(s);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var h=a[l];if(!kt.call(s,h)||!un(n[h],s[h]))return!1}return!0}function Bp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Hp(n,s){var a=Bp(n);n=0;for(var l;a;){if(a.nodeType===3){if(l=n+a.textContent.length,n<=s&&l>=s)return{node:a,offset:s-n};n=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bp(a)}}function $p(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?$p(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function qp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=tl(n.document);s instanceof n.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)n=s.contentWindow;else break;s=tl(n.document)}return s}function Pu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var ES=cr&&"documentMode"in document&&11>=document.documentMode,Oi=null,zu=null,ja=null,Iu=!1;function Vp(n,s,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Iu||Oi==null||Oi!==tl(l)||(l=Oi,"selectionStart"in l&&Pu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 15,718 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),ja&&Na(ja,l)||(ja=l,l=Jl(zu,"onSelect"),0<l.length&&(s=new al("onSelect","select",null,s,a),n.push({event:s,listeners:l}),s.target=Oi)))}function Us(n,s){var a={};return a[n.toLowerCase()]=s.toLowerCase(),a["Webkit"+n]="webkit"+s,a["Moz"+n]="moz"+s,a}var Ci={animationend:Us("Animation","AnimationEnd"),animationiteration:Us("Animation","AnimationIteration"),animationstart:Us("Animation","AnimationStart"),transitionrun:Us("Transition","TransitionRun"),transitionstart:Us("Transition","TransitionStart"),transitioncancel:Us("Transition","TransitionCancel"),transitionend:Us("Transition","TransitionEnd")},Bu={},Gp={};cr&&(Gp=document.createElement("div").style,"AnimationEvent"in window||(delete Ci.animationend.animation,delete Ci.animationiteration.animation,delete Ci.animationstart.animation),"TransitionEvent"in window||delete Ci.transitionend.transition);function Ps(n){if(Bu[n])return Bu[n];if(!Ci[n])return n;var s=Ci[n],a;for(a in s)if(s.hasOwnProperty(a)&&a in Gp)return Bu[n]=s[a];return n}var Fp=Ps("animationend"),Kp=Ps("animationiteration"),Yp=Ps("animationstart"),TS=Ps("transitionrun"),RS=Ps("transitionstart"),AS=Ps("transitioncancel"),Qp=Ps("transitionend"),Jp=new Map,Hu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Hu.push("scrollEnd");function Un(n,s){Jp.set(n,s),Ds(s,[n])}var cl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},En=[],ki=0,$u=0;function ul(){for(var n=ki,s=$u=ki=0;s<n;){var a=En[s];En[s++]=null;var l=En[s];En[s++]=null;var h=En[s];En[s++]=null;var m=En[s];if(En[s++]=null,l!==null&&h!==null){var b=l.pending;b===null?h.next=h:(h.next=b.next,b.next=h),l.pending=h}m!==0&&Xp(a,h,m)}}function dl(n,s,a,l){En[ki++]=n,En[ki++]=s,En[ki++]=a,En[ki++]=l,$u|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function qu(n,s,a,l){return dl(n,s,a,l),hl(n)}function zs(n,s){return dl(n,null,null,s),hl(n)}function Xp(n,s,a){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a);for(var h=!1,m=n.return;m!==null;)m.childLanes|=a,l=m.alternate,l!==null&&(l.childLanes|=a),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&s!==null&&(h=31-zt(a),n=m.hiddenUpdates,l=n[h],l===null?n[h]=[s]:l.push(s),s.lane=a|536870912),m):null}function hl(n){if(50<eo)throw eo=0,Zd=null,Error(i(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var Ni={};function xS(n,s,a,l){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(n,s,a,l){return new xS(n,s,a,l)}function Vu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ur(n,s){var a=n.alternate;return a===null?(a=dn(n.tag,s,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=s,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,s=n.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Zp(n,s){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,s=a.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function fl(n,s,a,l,h,m){var b=0;if(l=n,typeof n=="function")Vu(n)&&(b=1);else if(typeof n=="string")b=jE(n,a,Z.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Q:return n=dn(31,a,s,h),n.elementType=Q,n.lanes=m,n;case R:return Is(a.children,h,m,s);case S:b=8,h|=24;break;case E:return n=dn(12,a,s,h|2),n.elementType=E,n.lanes=m,n;case q:return n=dn(13,a,s,h),n.elementType=q,n.lanes=m,n;case H:return n=dn(19,a,s,h),n.elementType=H,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:b=10;break e;case A:b=9;break e;case j:b=11;break e;case P:b=14;break e;case M:b=16,l=null;break e}b=29,a=Error(i(130,n===null?"null":typeof n,"")),l=null}return s=dn(b,a,s,h),s.elementType=n,s.type=l,s.lanes=m,s}function Is(n,s,a,l){return n=dn(7,n,l,s),n.lanes=a,n}function Gu(n,s,a){return n=dn(6,n,null,s),n.lanes=a,n}function Wp(n){var s=dn(18,null,null,0);return s.stateNode=n,s}function Fu(n,s,a){return s=dn(4,n.children!==null?n.children:[],n.key,s),s.lanes=a,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var em=new WeakMap;function Tn(n,s){if(typeof n=="object"&&n!==null){var a=em.get(n);return a!==void 0?a:(s={value:n,source:s,stack:bn(s)},em.set(n,s),s)}return{value:n,source:s,stack:bn(s)}}var ji=[],Mi=0,pl=null,Ma=0,Rn=[],An=0,zr=null,Kn=1,Yn="";function dr(n,s){ji[Mi++]=Ma,ji[Mi++]=pl,pl=n,Ma=s}function tm(n,s,a){Rn[An++]=Kn,Rn[An++]=Yn,Rn[An++]=zr,zr=n;var l=Kn;n=Yn;var h=32-zt(l)-1;l&=~(1<<h),a+=1;var m=32-zt(s)+h;if(30<m){var b=h-h%5;m=(l&(1<<b)-1).toString(32),l>>=b,h-=b,Kn=1<<32-zt(s)+h|a<<h|l,Yn=m+n}else Kn=1<<m|a<<h|l,Yn=n}function Ku(n){n.return!==null&&(dr(n,1),tm(n,1,0))}function Yu(n){for(;n===pl;)pl=ji[--Mi],ji[Mi]=null,Ma=ji[--Mi],ji[Mi]=null;for(;n===zr;)zr=Rn[--An],Rn[An]=null,Yn=Rn[--An],Rn[An]=null,Kn=Rn[--An],Rn[An]=null}function nm(n,s){Rn[An++]=Kn,Rn[An++]=Yn,Rn[An++]=zr,Kn=s.id,Yn=s.overflow,zr=n}var jt=null,Ke=null,ke=!1,Ir=null,xn=!1,Qu=Error(i(519));function Br(n){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Da(Tn(s,n)),Qu}function rm(n){var s=n.stateNode,a=n.type,l=n.memoizedProps;switch(s[Nt]=n,s[Qt]=l,a){case"dialog":xe("cancel",s),xe("close",s);break;case"iframe":case"object":case"embed":xe("load",s);break;case"video":case"audio":for(a=0;a<no.length;a++)xe(no[a],s);break;case"source":xe("error",s);break;case"img":case"image":case"link":xe("error",s),xe("load",s);break;case"details":xe("toggle",s);break;case"input":xe("invalid",s),gp(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":xe("invalid",s);break;case"textarea":xe("invalid",s),vp(s,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||l.suppressHydrationWarning===!0||wy(s.textContent,a)?(l.popover!=null&&(xe("beforetoggle",s),xe("toggle",s)),l.onScroll!=null&&xe("scroll",s),l.onScrollEnd!=null&&xe("scrollend",s),l.onClick!=null&&(s.onclick=lr),s=!0):s=!1,s||Br(n,!0)}function sm(n){for(jt=n.return;jt;)switch(jt.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:jt=jt.return}}function Di(n){if(n!==jt)return!1;if(!ke)return sm(n),ke=!0,!1;var s=n.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||fh(n.type,n.memoizedProps)),a=!a),a&&Ke&&Br(n),sm(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ke=Cy(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ke=Cy(n)}else s===27?(s=Ke,es(n.type)?(n=vh,vh=null,Ke=n):Ke=s):Ke=jt?Cn(n.stateNode.nextSibling):null;return!0}function Bs(){Ke=jt=null,ke=!1}function Ju(){var n=Ir;return n!==null&&(en===null?en=n:en.push.apply(en,n),Ir=null),n}function Da(n){Ir===null?Ir=[n]:Ir.push(n)}var Xu=C(null),Hs=null,hr=null;function Hr(n,s,a){F(Xu,s._currentValue),s._currentValue=a}function fr(n){n._currentValue=Xu.current,V(Xu)}function Zu(n,s,a){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===a)break;n=n.return}}function Wu(n,s,a,l){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var b=h.child;m=m.firstContext;e:for(;m!==null;){var T=m;m=h;for(var x=0;x<s.length;x++)if(T.context===s[x]){m.lanes|=a,T=m.alternate,T!==null&&(T.lanes|=a),Zu(m.return,a,n),l||(b=null);break e}m=T.next}}else if(h.tag===18){if(b=h.return,b===null)throw Error(i(341));b.lanes|=a,m=b.alternate,m!==null&&(m.lanes|=a),Zu(b,a,n),b=null}else b=h.child;if(b!==null)b.return=h;else for(b=h;b!==null;){if(b===n){b=null;break}if(h=b.sibling,h!==null){h.return=b.return,b=h;break}b=b.return}h=b}}function Li(n,s,a,l){n=null;for(var h=s,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var b=h.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var T=h.type;un(h.pendingProps.value,b.value)||(n!==null?n.push(T):n=[T])}}else if(h===be.current){if(b=h.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(oo):n=[oo])}h=h.return}n!==null&&Wu(s,n,a,l),s.flags|=262144}function ml(n){for(n=n.firstContext;n!==null;){if(!un(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function $s(n){Hs=n,hr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Mt(n){return im(Hs,n)}function gl(n,s){return Hs===null&&$s(n),im(n,s)}function im(n,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},hr===null){if(n===null)throw Error(i(308));hr=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else hr=hr.next=s;return a}var OS=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(a,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(a){return a()})}},CS=t.unstable_scheduleCallback,kS=t.unstable_NormalPriority,ut={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ed(){return{controller:new OS,data:new Map,refCount:0}}function La(n){n.refCount--,n.refCount===0&&CS(kS,function(){n.controller.abort()})}var Ua=null,td=0,Ui=0,Pi=null;function NS(n,s){if(Ua===null){var a=Ua=[];td=0,Ui=sh(),Pi={status:"pending",value:void 0,then:function(l){a.push(l)}}}return td++,s.then(am,am),s}function am(){if(--td===0&&Ua!==null){Pi!==null&&(Pi.status="fulfilled");var n=Ua;Ua=null,Ui=0,Pi=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function jS(n,s){var a=[],l={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var h=0;h<a.length;h++)(0,a[h])(s)},function(h){for(l.status="rejected",l.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),l}var om=L.S;L.S=function(n,s){Vg=Et(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&NS(n,s),om!==null&&om(n,s)};var qs=C(null);function nd(){var n=qs.current;return n!==null?n:$e.pooledCache}function yl(n,s){s===null?F(qs,qs.current):F(qs,s.pool)}function lm(){var n=nd();return n===null?null:{parent:ut._currentValue,pool:n}}var zi=Error(i(460)),rd=Error(i(474)),vl=Error(i(542)),bl={then:function(){}};function cm(n){return n=n.status,n==="fulfilled"||n==="rejected"}function um(n,s,a){switch(a=n[a],a===void 0?n.push(s):a!==s&&(s.then(lr,lr),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,hm(n),n;default:if(typeof s.status=="string")s.then(lr,lr);else{if(n=$e,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var h=s;h.status="fulfilled",h.value=l}},function(l){if(s.status==="pending"){var h=s;h.status="rejected",h.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,hm(n),n}throw Gs=s,zi}}function Vs(n){try{var s=n._init;return s(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Gs=a,zi):a}}var Gs=null;function dm(){if(Gs===null)throw Error(i(459));var n=Gs;return Gs=null,n}function hm(n){if(n===zi||n===vl)throw Error(i(483))}var Ii=null,Pa=0;function wl(n){var s=Pa;return Pa+=1,Ii===null&&(Ii=[]),um(Ii,n,s)}function za(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function _l(n,s){throw s.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(s),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function fm(n){function s(D,k){if(n){var U=D.deletions;U===null?(D.deletions=[k],D.flags|=16):U.push(k)}}function a(D,k){if(!n)return null;for(;k!==null;)s(D,k),k=k.sibling;return null}function l(D){for(var k=new Map;D!==null;)D.key!==null?k.set(D.key,D):k.set(D.index,D),D=D.sibling;return k}function h(D,k){return D=ur(D,k),D.index=0,D.sibling=null,D}function m(D,k,U){return D.index=U,n?(U=D.alternate,U!==null?(U=U.index,U<k?(D.flags|=67108866,k):U):(D.flags|=67108866,k)):(D.flags|=1048576,k)}function b(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function T(D,k,U,G){return k===null||k.tag!==6?(k=Gu(U,D.mode,G),k.return=D,k):(k=h(k,U),k.return=D,k)}function x(D,k,U,G){var de=U.type;return de===R?$(D,k,U.props.children,G,U.key):k!==null&&(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===M&&Vs(de)===k.type)?(k=h(k,U.props),za(k,U),k.return=D,k):(k=fl(U.type,U.key,U.props,null,D.mode,G),za(k,U),k.return=D,k)}function z(D,k,U,G){return k===null||k.tag!==4||k.stateNode.containerInfo!==U.containerInfo||k.stateNode.implementation!==U.implementation?(k=Fu(U,D.mode,G),k.return=D,k):(k=h(k,U.children||[]),k.return=D,k)}function $(D,k,U,G,de){return k===null||k.tag!==7?(k=Is(U,D.mode,G,de),k.return=D,k):(k=h(k,U),k.return=D,k)}function K(D,k,U){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Gu(""+k,D.mode,U),k.return=D,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return U=fl(k.type,k.key,k.props,null,D.mode,U),za(U,k),U.return=D,U;case _:return k=Fu(k,D.mode,U),k.return=D,k;case M:return k=Vs(k),K(D,k,U)}if(Re(k)||fe(k))return k=Is(k,D.mode,U,null),k.return=D,k;if(typeof k.then=="function")return K(D,wl(k),U);if(k.$$typeof===O)return K(D,gl(D,k),U);_l(D,k)}return null}function I(D,k,U,G){var de=k!==null?k.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return de!==null?null:T(D,k,""+U,G);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return U.key===de?x(D,k,U,G):null;case _:return U.key===de?z(D,k,U,G):null;case M:return U=Vs(U),I(D,k,U,G)}if(Re(U)||fe(U))return de!==null?null:$(D,k,U,G,null);if(typeof U.then=="function")return I(D,k,wl(U),G);
vendor: 6,346 bytes, line 9
9if(U.$$typeof===O)return I(D,k,gl(D,U),G);_l(D,U)}return null}function B(D,k,U,G,de){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return D=D.get(U)||null,T(k,D,""+G,de);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return D=D.get(G.key===null?U:G.key)||null,x(k,D,G,de);case _:return D=D.get(G.key===null?U:G.key)||null,z(k,D,G,de);case M:return G=Vs(G),B(D,k,U,G,de)}if(Re(G)||fe(G))return D=D.get(U)||null,$(k,D,G,de,null);if(typeof G.then=="function")return B(D,k,U,wl(G),de);if(G.$$typeof===O)return B(D,k,U,gl(k,G),de);_l(k,G)}return null}function ae(D,k,U,G){for(var de=null,je=null,ue=k,Ee=k=0,Ce=null;ue!==null&&Ee<U.length;Ee++){ue.index>Ee?(Ce=ue,ue=null):Ce=ue.sibling;var Me=I(D,ue,U[Ee],G);if(Me===null){ue===null&&(ue=Ce);break}n&&ue&&Me.alternate===null&&s(D,ue),k=m(Me,k,Ee),je===null?de=Me:je.sibling=Me,je=Me,ue=Ce}if(Ee===U.length)return a(D,ue),ke&&dr(D,Ee),de;if(ue===null){for(;Ee<U.length;Ee++)ue=K(D,U[Ee],G),ue!==null&&(k=m(ue,k,Ee),je===null?de=ue:je.sibling=ue,je=ue);return ke&&dr(D,Ee),de}for(ue=l(ue);Ee<U.length;Ee++)Ce=B(ue,D,Ee,U[Ee],G),Ce!==null&&(n&&Ce.alternate!==null&&ue.delete(Ce.key===null?Ee:Ce.key),k=m(Ce,k,Ee),je===null?de=Ce:je.sibling=Ce,je=Ce);return n&&ue.forEach(function(is){return s(D,is)}),ke&&dr(D,Ee),de}function pe(D,k,U,G){if(U==null)throw Error(i(151));for(var de=null,je=null,ue=k,Ee=k=0,Ce=null,Me=U.next();ue!==null&&!Me.done;Ee++,Me=U.next()){ue.index>Ee?(Ce=ue,ue=null):Ce=ue.sibling;var is=I(D,ue,Me.value,G);if(is===null){ue===null&&(ue=Ce);break}n&&ue&&is.alternate===null&&s(D,ue),k=m(is,k,Ee),je===null?de=is:je.sibling=is,je=is,ue=Ce}if(Me.done)return a(D,ue),ke&&dr(D,Ee),de;if(ue===null){for(;!Me.done;Ee++,Me=U.next())Me=K(D,Me.value,G),Me!==null&&(k=m(Me,k,Ee),je===null?de=Me:je.sibling=Me,je=Me);return ke&&dr(D,Ee),de}for(ue=l(ue);!Me.done;Ee++,Me=U.next())Me=B(ue,D,Ee,Me.value,G),Me!==null&&(n&&Me.alternate!==null&&ue.delete(Me.key===null?Ee:Me.key),k=m(Me,k,Ee),je===null?de=Me:je.sibling=Me,je=Me);return n&&ue.forEach(function(qE){return s(D,qE)}),ke&&dr(D,Ee),de}function He(D,k,U,G){if(typeof U=="object"&&U!==null&&U.type===R&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:e:{for(var de=U.key;k!==null;){if(k.key===de){if(de=U.type,de===R){if(k.tag===7){a(D,k.sibling),G=h(k,U.props.children),G.return=D,D=G;break e}}else if(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===M&&Vs(de)===k.type){a(D,k.sibling),G=h(k,U.props),za(G,U),G.return=D,D=G;break e}a(D,k);break}else s(D,k);k=k.sibling}U.type===R?(G=Is(U.props.children,D.mode,G,U.key),G.return=D,D=G):(G=fl(U.type,U.key,U.props,null,D.mode,G),za(G,U),G.return=D,D=G)}return b(D);case _:e:{for(de=U.key;k!==null;){if(k.key===de)if(k.tag===4&&k.stateNode.containerInfo===U.containerInfo&&k.stateNode.implementation===U.implementation){a(D,k.sibling),G=h(k,U.children||[]),G.return=D,D=G;break e}else{a(D,k);break}else s(D,k);k=k.sibling}G=Fu(U,D.mode,G),G.return=D,D=G}return b(D);case M:return U=Vs(U),He(D,k,U,G)}if(Re(U))return ae(D,k,U,G);if(fe(U)){if(de=fe(U),typeof de!="function")throw Error(i(150));return U=de.call(U),pe(D,k,U,G)}if(typeof U.then=="function")return He(D,k,wl(U),G);if(U.$$typeof===O)return He(D,k,gl(D,U),G);_l(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,k!==null&&k.tag===6?(a(D,k.sibling),G=h(k,U),G.return=D,D=G):(a(D,k),G=Gu(U,D.mode,G),G.return=D,D=G),b(D)):a(D,k)}return function(D,k,U,G){try{Pa=0;var de=He(D,k,U,G);return Ii=null,de}catch(ue){if(ue===zi||ue===vl)throw ue;var je=dn(29,ue,null,D.mode);return je.lanes=G,je.return=D,je}}}var Fs=fm(!0),pm=fm(!1),$r=!1;function sd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function id(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function qr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Vr(n,s,a){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(De&2)!==0){var h=l.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),l.pending=s,s=hl(n),Xp(n,null,a),s}return dl(n,l,s,a),hl(n)}function Ia(n,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,a|=l,s.lanes=a,Kt(n,a)}}function ad(n,s){var a=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?h=m=b:m=m.next=b,a=a.next}while(a!==null);m===null?h=m=s:m=m.next=s}else h=m=s;a={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=s:n.next=s,a.lastBaseUpdate=s}var od=!1;function Ba(){if(od){var n=Pi;if(n!==null)throw n}}function Ha(n,s,a,l){od=!1;var h=n.updateQueue;$r=!1;var m=h.firstBaseUpdate,b=h.lastBaseUpdate,T=h.shared.pending;if(T!==null){h.shared.pending=null;var x=T,z=x.next;x.next=null,b===null?m=z:b.next=z,b=x;var $=n.alternate;$!==null&&($=$.updateQueue,T=$.lastBaseUpdate,T!==b&&(T===null?$.firstBaseUpdate=z:T.next=z,$.lastBaseUpdate=x))}if(m!==null){var K=h.baseState;b=0,$=z=x=null,T=m;do{var I=T.lane&-536870913,B=I!==T.lane;if(B?(Oe&I)===I:(l&I)===I){I!==0&&I===Ui&&(od=!0),$!==null&&($=$.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ae=n,pe=T;I=s;var He=a;switch(pe.tag){case 1:if(ae=pe.payload,typeof ae=="function"){K=ae.call(He,K,I);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=pe.payload,I=typeof ae=="function"?ae.call(He,K,I):ae,I==null)break e;K=g({},K,I);break e;case 2:$r=!0}}I=T.callback,I!==null&&(n.flags|=64,B&&(n.flags|=8192),B=h.callbacks,B===null?h.callbacks=[I]:B.push(I))}else B={lane:I,tag:T.tag,payload:T.payload,callback:T.callback,next:null},$===null?(z=$=B,x=K):$=$.next=B,b|=I;if(T=T.next,T===null){if(T=h.shared.pending,T===null)break;B=T,T=B.next,B.next=null,h.lastBaseUpdate=B,h.shared.pending=null}}while(!0);$===null&&(x=K),h.baseState=x,h.firstBaseUpdate=z,h.lastBaseUpdate=$,m===null&&(h.shared.lanes=0),Qr|=b,n.lanes=b,n.memoizedState=K}}
vendor: 5,071 bytes, line 9
9function mm(n,s){if(typeof n!="function")throw Error(i(191,n));n.call(s)}function gm(n,s){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)mm(a[n],s)}var Bi=C(null),Sl=C(0);function ym(n,s){n=Sr,F(Sl,n),F(Bi,s),Sr=n|s.baseLanes}function ld(){F(Sl,Sr),F(Bi,Bi.current)}function cd(){Sr=Sl.current,V(Bi),V(Sl)}var hn=C(null),On=null;function Gr(n){var s=n.alternate;F(it,it.current&1),F(hn,n),On===null&&(s===null||Bi.current!==null||s.memoizedState!==null)&&(On=n)}function ud(n){F(it,it.current),F(hn,n),On===null&&(On=n)}function vm(n){n.tag===22?(F(it,it.current),F(hn,n),On===null&&(On=n)):Fr()}function Fr(){F(it,it.current),F(hn,hn.current)}function fn(n){V(hn),On===n&&(On=null),V(it)}var it=C(0);function El(n){for(var s=n;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gh(a)||yh(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pr=0,Se=null,Ie=null,dt=null,Tl=!1,Hi=!1,Ks=!1,Rl=0,$a=0,$i=null,MS=0;function nt(){throw Error(i(321))}function dd(n,s){if(s===null)return!1;for(var a=0;a<s.length&&a<n.length;a++)if(!un(n[a],s[a]))return!1;return!0}function hd(n,s,a,l,h,m){return pr=m,Se=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=n===null||n.memoizedState===null?tg:xd,Ks=!1,m=a(l,h),Ks=!1,Hi&&(m=wm(s,a,l,h)),bm(n),m}function bm(n){L.H=Ga;var s=Ie!==null&&Ie.next!==null;if(pr=0,dt=Ie=Se=null,Tl=!1,$a=0,$i=null,s)throw Error(i(300));n===null||ht||(n=n.dependencies,n!==null&&ml(n)&&(ht=!0))}function wm(n,s,a,l){Se=n;var h=0;do{if(Hi&&($i=null),$a=0,Hi=!1,25<=h)throw Error(i(301));if(h+=1,dt=Ie=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}L.H=ng,m=s(a,l)}while(Hi);return m}function DS(){var n=L.H,s=n.useState()[0];return s=typeof s.then=="function"?qa(s):s,n=n.useState()[0],(Ie!==null?Ie.memoizedState:null)!==n&&(Se.flags|=1024),s}function fd(){var n=Rl!==0;return Rl=0,n}function pd(n,s,a){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~a}function md(n){if(Tl){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Tl=!1}pr=0,dt=Ie=Se=null,Hi=!1,$a=Rl=0,$i=null}function qt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Se.memoizedState=dt=n:dt=dt.next=n,dt}function at(){if(Ie===null){var n=Se.alternate;n=n!==null?n.memoizedState:null}else n=Ie.next;var s=dt===null?Se.memoizedState:dt.next;if(s!==null)dt=s,Ie=n;else{if(n===null)throw Se.alternate===null?Error(i(467)):Error(i(310));Ie=n,n={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},dt===null?Se.memoizedState=dt=n:dt=dt.next=n}return dt}function Al(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qa(n){var s=$a;return $a+=1,$i===null&&($i=[]),n=um($i,n,s),s=Se,(dt===null?s.memoizedState:dt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?tg:xd),n}function xl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return qa(n);if(n.$$typeof===O)return Mt(n)}throw Error(i(438,String(n)))}function gd(n){var s=null,a=Se.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var l=Se.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(h){return h.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=Al(),Se.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(n),l=0;l<n;l++)a[l]=re;return s.index++,a}function mr(n,s){return typeof s=="function"?s(n):s}function Ol(n){var s=at();return yd(s,Ie,n)}function yd(n,s,a){var l=n.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var h=n.baseQueue,m=l.pending;if(m!==null){if(h!==null){var b=h.next;h.next=m.next,m.next=b}s.baseQueue=h=m,l.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{s=h.next;var T=b=null,x=null,z=s,$=!1;do{var K=z.lane&-536870913;if(K!==z.lane?(Oe&K)===K:(pr&K)===K){var I=z.revertLane;if(I===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),K===Ui&&($=!0);else if((pr&I)===I){z=z.next,I===Ui&&($=!0);continue}else K={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},x===null?(T=x=K,b=m):x=x.next=K,Se.lanes|=I,Qr|=I;K=z.action,Ks&&a(m,K),m=z.hasEagerState?z.eagerState:a(m,K)}else I={lane:K,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},x===null?(T=x=I,b=m):x=x.next=I,Se.lanes|=K,Qr|=K;z=z.next}
vendor: 4,562 bytes, line 9
9while(z!==null&&z!==s);if(x===null?b=m:x.next=T,!un(m,n.memoizedState)&&(ht=!0,$&&(a=Pi,a!==null)))throw a;n.memoizedState=m,n.baseState=b,n.baseQueue=x,l.lastRenderedState=m}return h===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function vd(n){var s=at(),a=s.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=n;var l=a.dispatch,h=a.pending,m=s.memoizedState;if(h!==null){a.pending=null;var b=h=h.next;do m=n(m,b.action),b=b.next;while(b!==h);un(m,s.memoizedState)||(ht=!0),s.memoizedState=m,s.baseQueue===null&&(s.baseState=m),a.lastRenderedState=m}return[m,l]}function _m(n,s,a){var l=Se,h=at(),m=ke;if(m){if(a===void 0)throw Error(i(407));a=a()}else a=s();var b=!un((Ie||h).memoizedState,a);if(b&&(h.memoizedState=a,ht=!0),h=h.queue,_d(Tm.bind(null,l,h,n),[n]),h.getSnapshot!==s||b||dt!==null&&dt.memoizedState.tag&1){if(l.flags|=2048,qi(9,{destroy:void 0},Em.bind(null,l,h,a,s),null),$e===null)throw Error(i(349));m||(pr&127)!==0||Sm(l,s,a)}return a}function Sm(n,s,a){n.flags|=16384,n={getSnapshot:s,value:a},s=Se.updateQueue,s===null?(s=Al(),Se.updateQueue=s,s.stores=[n]):(a=s.stores,a===null?s.stores=[n]:a.push(n))}function Em(n,s,a,l){s.value=a,s.getSnapshot=l,Rm(s)&&Am(n)}function Tm(n,s,a){return a(function(){Rm(s)&&Am(n)})}function Rm(n){var s=n.getSnapshot;n=n.value;try{var a=s();return!un(n,a)}catch{return!0}}function Am(n){var s=zs(n,2);s!==null&&tn(s,n,2)}function bd(n){var s=qt();if(typeof n=="function"){var a=n;if(n=a(),Ks){Dn(!0);try{a()}finally{Dn(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:n},s}function xm(n,s,a,l){return n.baseState=a,yd(n,Ie,typeof l=="function"?l:mr)}function LS(n,s,a,l,h){if(Nl(n))throw Error(i(485));if(n=s.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};L.T!==null?a(!0):m.isTransition=!1,l(m),a=s.pending,a===null?(m.next=s.pending=m,Om(s,m)):(m.next=a.next,s.pending=a.next=m)}}function Om(n,s){var a=s.action,l=s.payload,h=n.state;if(s.isTransition){var m=L.T,b={};L.T=b;try{var T=a(h,l),x=L.S;x!==null&&x(b,T),Cm(n,s,T)}catch(z){wd(n,s,z)}finally{m!==null&&b.types!==null&&(m.types=b.types),L.T=m}}else try{m=a(h,l),Cm(n,s,m)}catch(z){wd(n,s,z)}}function Cm(n,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){km(n,s,l)},function(l){return wd(n,s,l)}):km(n,s,a)}function km(n,s,a){s.status="fulfilled",s.value=a,Nm(s),n.state=a,s=n.pending,s!==null&&(a=s.next,a===s?n.pending=null:(a=a.next,s.next=a,Om(n,a)))}function wd(n,s,a){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=a,Nm(s),s=s.next;while(s!==l)}n.action=null}function Nm(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function jm(n,s){return s}function Mm(n,s){if(ke){var a=$e.formState;if(a!==null){e:{var l=Se;if(ke){if(Ke){t:{for(var h=Ke,m=xn;h.nodeType!==8;){if(!m){h=null;break t}if(h=Cn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){Ke=Cn(h.nextSibling),l=h.data==="F!";break e}}Br(l)}l=!1}l&&(s=a[0])}}return a=qt(),a.memoizedState=a.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:s},a.queue=l,a=Zm.bind(null,Se,l),l.dispatch=a,l=bd(!1),m=Ad.bind(null,Se,!1,l.queue),l=qt(),h={state:s,dispatch:null,action:n,pending:null},l.queue=h,a=LS.bind(null,Se,h,m,a),h.dispatch=a,l.memoizedState=n,[s,a,!1]}function Dm(n){var s=at();return Lm(s,Ie,n)}function Lm(n,s,a){if(s=yd(n,s,jm)[0],n=Ol(mr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=qa(s)}catch(b){throw b===zi?vl:b}else l=s;s=at();var h=s.queue,m=h.dispatch;return a!==s.memoizedState&&(Se.flags|=2048,qi(9,{destroy:void 0},US.bind(null,h,a),null)),[l,m,n]}function US(n,s){n.action=s}function Um(n){var s=at(),a=Ie;if(a!==null)return Lm(s,a,n);at(),s=s.memoizedState,a=at();var l=a.queue.dispatch;return a.memoizedState=n,[s,l,!1]}function qi(n,s,a,l){return n={tag:n,create:a,deps:l,inst:s,next:null},s=Se.updateQueue,s===null&&(s=Al(),Se.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=n.next=n:(l=a.next,a.next=n,n.next=l,s.lastEffect=n),n}function Pm(){return at().memoizedState}function Cl(n,s,a,l){var h=qt();Se.flags|=n,h.memoizedState=qi(1|s,{destroy:void 0},a,l===void 0?null:l)}function kl(n,s,a,l){var h=at();l=l===void 0?null:l;var m=h.memoizedState.inst;Ie!==null&&l!==null&&dd(l,Ie.memoizedState.deps)?h.memoizedState=qi(s,m,a,l):(Se.flags|=n,h.memoizedState=qi(1|s,m,a,l))}
vendor: 4,946 bytes, line 9
9function zm(n,s){Cl(8390656,8,n,s)}function _d(n,s){kl(2048,8,n,s)}function PS(n){Se.flags|=4;var s=Se.updateQueue;if(s===null)s=Al(),Se.updateQueue=s,s.events=[n];else{var a=s.events;a===null?s.events=[n]:a.push(n)}}function Im(n){var s=at().memoizedState;return PS({ref:s,nextImpl:n}),function(){if((De&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function Bm(n,s){return kl(4,2,n,s)}function Hm(n,s){return kl(4,4,n,s)}function $m(n,s){if(typeof s=="function"){n=n();var a=s(n);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function qm(n,s,a){a=a!=null?a.concat([n]):null,kl(4,4,$m.bind(null,s,n),a)}function Sd(){}function Vm(n,s){var a=at();s=s===void 0?null:s;var l=a.memoizedState;return s!==null&&dd(s,l[1])?l[0]:(a.memoizedState=[n,s],n)}function Gm(n,s){var a=at();s=s===void 0?null:s;var l=a.memoizedState;if(s!==null&&dd(s,l[1]))return l[0];if(l=n(),Ks){Dn(!0);try{n()}finally{Dn(!1)}}return a.memoizedState=[l,s],l}function Ed(n,s,a){return a===void 0||(pr&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=s:(n.memoizedState=a,n=Fg(),Se.lanes|=n,Qr|=n,a)}function Fm(n,s,a,l){return un(a,s)?a:Bi.current!==null?(n=Ed(n,a,l),un(n,s)||(ht=!0),n):(pr&42)===0||(pr&1073741824)!==0&&(Oe&261930)===0?(ht=!0,n.memoizedState=a):(n=Fg(),Se.lanes|=n,Qr|=n,s)}function Km(n,s,a,l,h){var m=Y.p;Y.p=m!==0&&8>m?m:8;var b=L.T,T={};L.T=T,Ad(n,!1,s,a);try{var x=h(),z=L.S;if(z!==null&&z(T,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var $=jS(x,l);Va(n,s,$,gn(n))}else Va(n,s,l,gn(n))}catch(K){Va(n,s,{then:function(){},status:"rejected",reason:K},gn())}finally{Y.p=m,b!==null&&T.types!==null&&(b.types=T.types),L.T=b}}function zS(){}function Td(n,s,a,l){if(n.tag!==5)throw Error(i(476));var h=Ym(n).queue;Km(n,h,s,ie,a===null?zS:function(){return Qm(n),a(l)})}function Ym(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:ie},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:a},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function Qm(n){var s=Ym(n);s.next===null&&(s=n.alternate.memoizedState),Va(n,s.next.queue,{},gn())}function Rd(){return Mt(oo)}function Jm(){return at().memoizedState}function Xm(){return at().memoizedState}function IS(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var a=gn();n=qr(a);var l=Vr(s,n,a);l!==null&&(tn(l,s,a),Ia(l,s,a)),s={cache:ed()},n.payload=s;return}s=s.return}}function BS(n,s,a){var l=gn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Nl(n)?Wm(s,a):(a=qu(n,s,a,l),a!==null&&(tn(a,n,l),eg(a,s,l)))}function Zm(n,s,a){var l=gn();Va(n,s,a,l)}function Va(n,s,a,l){var h={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Nl(n))Wm(s,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=s.lastRenderedReducer,m!==null))try{var b=s.lastRenderedState,T=m(b,a);if(h.hasEagerState=!0,h.eagerState=T,un(T,b))return dl(n,s,h,0),$e===null&&ul(),!1}catch{}if(a=qu(n,s,h,l),a!==null)return tn(a,n,l),eg(a,s,l),!0}return!1}function Ad(n,s,a,l){if(l={lane:2,revertLane:sh(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Nl(n)){if(s)throw Error(i(479))}else s=qu(n,a,l,2),s!==null&&tn(s,n,2)}function Nl(n){var s=n.alternate;return n===Se||s!==null&&s===Se}function Wm(n,s){Hi=Tl=!0;var a=n.pending;a===null?s.next=s:(s.next=a.next,a.next=s),n.pending=s}function eg(n,s,a){if((a&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,a|=l,s.lanes=a,Kt(n,a)}}var Ga={readContext:Mt,use:xl,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Ga.useEffectEvent=nt;var tg={readContext:Mt,use:xl,useCallback:function(n,s){return qt().memoizedState=[n,s===void 0?null:s],n},useContext:Mt,useEffect:zm,useImperativeHandle:function(n,s,a){a=a!=null?a.concat([n]):null,Cl(4194308,4,$m.bind(null,s,n),a)},useLayoutEffect:function(n,s){return Cl(4194308,4,n,s)},useInsertionEffect:function(n,s){Cl(4,2,n,s)},useMemo:function(n,s){var a=qt();s=s===void 0?null:s;var l=n();if(Ks){Dn(!0);try{n()}finally{Dn(!1)}}return a.memoizedState=[l,s],l},useReducer:function(n,s,a){var l=qt();if(a!==void 0){var h=a(s);if(Ks){Dn(!0);try{a(s)}finally{Dn(!1)}}}else h=s;return l.memoizedState=l.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},l.queue=n,n=n.dispatch=BS.bind(null,Se,n),[l.memoizedState,n]}
vendor: 9,030 bytes, line 9
9,useRef:function(n){var s=qt();return n={current:n},s.memoizedState=n},useState:function(n){n=bd(n);var s=n.queue,a=Zm.bind(null,Se,s);return s.dispatch=a,[n.memoizedState,a]},useDebugValue:Sd,useDeferredValue:function(n,s){var a=qt();return Ed(a,n,s)},useTransition:function(){var n=bd(!1);return n=Km.bind(null,Se,n.queue,!0,!1),qt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,a){var l=Se,h=qt();if(ke){if(a===void 0)throw Error(i(407));a=a()}else{if(a=s(),$e===null)throw Error(i(349));(Oe&127)!==0||Sm(l,s,a)}h.memoizedState=a;var m={value:a,getSnapshot:s};return h.queue=m,zm(Tm.bind(null,l,m,n),[n]),l.flags|=2048,qi(9,{destroy:void 0},Em.bind(null,l,m,a,s),null),a},useId:function(){var n=qt(),s=$e.identifierPrefix;if(ke){var a=Yn,l=Kn;a=(l&~(1<<32-zt(l)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Rl++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=MS++,s="_"+s+"r_"+a.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:Rd,useFormState:Mm,useActionState:Mm,useOptimistic:function(n){var s=qt();s.memoizedState=s.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Ad.bind(null,Se,!0,a),a.dispatch=s,[n,s]},useMemoCache:gd,useCacheRefresh:function(){return qt().memoizedState=IS.bind(null,Se)},useEffectEvent:function(n){var s=qt(),a={impl:n};return s.memoizedState=a,function(){if((De&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},xd={readContext:Mt,use:xl,useCallback:Vm,useContext:Mt,useEffect:_d,useImperativeHandle:qm,useInsertionEffect:Bm,useLayoutEffect:Hm,useMemo:Gm,useReducer:Ol,useRef:Pm,useState:function(){return Ol(mr)},useDebugValue:Sd,useDeferredValue:function(n,s){var a=at();return Fm(a,Ie.memoizedState,n,s)},useTransition:function(){var n=Ol(mr)[0],s=at().memoizedState;return[typeof n=="boolean"?n:qa(n),s]},useSyncExternalStore:_m,useId:Jm,useHostTransitionStatus:Rd,useFormState:Dm,useActionState:Dm,useOptimistic:function(n,s){var a=at();return xm(a,Ie,n,s)},useMemoCache:gd,useCacheRefresh:Xm};xd.useEffectEvent=Im;var ng={readContext:Mt,use:xl,useCallback:Vm,useContext:Mt,useEffect:_d,useImperativeHandle:qm,useInsertionEffect:Bm,useLayoutEffect:Hm,useMemo:Gm,useReducer:vd,useRef:Pm,useState:function(){return vd(mr)},useDebugValue:Sd,useDeferredValue:function(n,s){var a=at();return Ie===null?Ed(a,n,s):Fm(a,Ie.memoizedState,n,s)},useTransition:function(){var n=vd(mr)[0],s=at().memoizedState;return[typeof n=="boolean"?n:qa(n),s]},useSyncExternalStore:_m,useId:Jm,useHostTransitionStatus:Rd,useFormState:Um,useActionState:Um,useOptimistic:function(n,s){var a=at();return Ie!==null?xm(a,Ie,n,s):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:gd,useCacheRefresh:Xm};ng.useEffectEvent=Im;function Od(n,s,a,l){s=n.memoizedState,a=a(l,s),a=a==null?s:g({},s,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var Cd={enqueueSetState:function(n,s,a){n=n._reactInternals;var l=gn(),h=qr(l);h.payload=s,a!=null&&(h.callback=a),s=Vr(n,h,l),s!==null&&(tn(s,n,l),Ia(s,n,l))},enqueueReplaceState:function(n,s,a){n=n._reactInternals;var l=gn(),h=qr(l);h.tag=1,h.payload=s,a!=null&&(h.callback=a),s=Vr(n,h,l),s!==null&&(tn(s,n,l),Ia(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var a=gn(),l=qr(a);l.tag=2,s!=null&&(l.callback=s),s=Vr(n,l,a),s!==null&&(tn(s,n,a),Ia(s,n,a))}};function rg(n,s,a,l,h,m,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,m,b):s.prototype&&s.prototype.isPureReactComponent?!Na(a,l)||!Na(h,m):!0}function sg(n,s,a,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,l),s.state!==n&&Cd.enqueueReplaceState(s,s.state,null)}function Ys(n,s){var a=s;if("ref"in s){a={};for(var l in s)l!=="ref"&&(a[l]=s[l])}if(n=n.defaultProps){a===s&&(a=g({},a));for(var h in n)a[h]===void 0&&(a[h]=n[h])}return a}function ig(n){cl(n)}function ag(n){console.error(n)}function og(n){cl(n)}function jl(n,s){try{var a=n.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function lg(n,s,a){try{var l=n.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function kd(n,s,a){return a=qr(a),a.tag=3,a.payload={element:null},a.callback=function(){jl(n,s)},a}function cg(n){return n=qr(n),n.tag=3,n}function ug(n,s,a,l){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var m=l.value;n.payload=function(){return h(m)},n.callback=function(){lg(s,a,l)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(n.callback=function(){lg(s,a,l),typeof h!="function"&&(Jr===null?Jr=new Set([this]):Jr.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function HS(n,s,a,l,h){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=a.alternate,s!==null&&Li(s,a,h,!0),a=hn.current,a!==null){switch(a.tag){case 31:case 13:return On===null?Vl():a.alternate===null&&rt===0&&(rt=3),a.flags&=-257,a.flags|=65536,a.lanes=h,l===bl?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([l]):s.add(l),th(n,l,h)),!1;case 22:return a.flags|=65536,l===bl?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([l]):a.add(l)),th(n,l,h)),!1}throw Error(i(435,a.tag))}return th(n,l,h),Vl(),!1}if(ke)return s=hn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=h,l!==Qu&&(n=Error(i(422),{cause:l}),Da(Tn(n,a)))):(l!==Qu&&(s=Error(i(423),{cause:l}),Da(Tn(s,a))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,l=Tn(l,a),h=kd(n.stateNode,l,h),ad(n,h),rt!==4&&(rt=2)),!1;var m=Error(i(520),{cause:l});if(m=Tn(m,a),Wa===null?Wa=[m]:Wa.push(m),rt!==4&&(rt=2),s===null)return!0;l=Tn(l,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,n=h&-h,a.lanes|=n,n=kd(a.stateNode,l,n),ad(a,n),!1;case 1:if(s=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Jr===null||!Jr.has(m))))return a.flags|=65536,h&=-h,a.lanes|=h,h=cg(h),ug(h,n,a,l),ad(a,h),!1}a=a.return}while(a!==null);return!1}var Nd=Error(i(461)),ht=!1;function Dt(n,s,a,l){s.child=n===null?pm(s,null,a,l):Fs(s,n.child,a,l)}function dg(n,s,a,l,h){a=a.render;var m=s.ref;if("ref"in l){var b={};for(var T in l)T!=="ref"&&(b[T]=l[T])}else b=l;return $s(s),l=hd(n,s,a,b,m,h),T=fd(),n!==null&&!ht?(pd(n,s,h),gr(n,s,h)):(ke&&T&&Ku(s),s.flags|=1,Dt(n,s,l,h),s.child)}function hg(n,s,a,l,h){if(n===null){var m=a.type;return typeof m=="function"&&!Vu(m)&&m.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=m,fg(n,s,m,l,h)):(n=fl(a.type,null,l,s,s.mode,h),n.ref=s.ref,n.return=s,s.child=n)}if(m=n.child,!Id(n,h)){var b=m.memoizedProps;if(a=a.compare,a=a!==null?a:Na,a(b,l)&&n.ref===s.ref)return gr(n,s,h)}return s.flags|=1,n=ur(m,l),n.ref=s.ref,n.return=s,s.child=n}function fg(n,s,a,l,h){if(n!==null){var m=n.memoizedProps;if(Na(m,l)&&n.ref===s.ref)if(ht=!1,s.pendingProps=l=m,Id(n,h))(n.flags&131072)!==0&&(ht=!0);else return s.lanes=n.lanes,gr(n,s,h)}return jd(n,s,a,l,h)}function pg(n,s,a,l){var h=l.children,m=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,n!==null){for(l=s.child=n.child,h=0;l!==null;)h=h|l.lanes|l.childLanes,l=l.sibling;l=h&~m}else l=0,s.child=null;return mg(n,s,m,a,l)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&yl(s,m!==null?m.cachePool:null),m!==null?ym(s,m):ld(),vm(s);else return l=s.lanes=536870912,mg(n,s,m!==null?m.baseLanes|a:a,a,l)}else m!==null?(yl(s,m.cachePool),ym(s,m),Fr(),s.memoizedState=null):(n!==null&&yl(s,null),ld(),Fr());return Dt(n,s,h,a),s.child}function Fa(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function mg(n,s,a,l,h){var m=nd();return m=m===null?null:{parent:ut._currentValue,pool:m},s.memoizedState={baseLanes:a,cachePool:m},n!==null&&yl(s,null),ld(),vm(s),n!==null&&Li(n,s,l,!0),s.childLanes=h,null}function Ml(n,s){return s=Ll({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function gg(n,s,a){return Fs(s,n.child,null,a),n=Ml(s,s.pendingProps),n.flags|=2,fn(s),s.memoizedState=null,n}function $S(n,s,a){var l=s.pendingProps,h=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(ke){if(l.mode==="hidden")return n=Ml(s,l),s.lanes=536870912,Fa(null,n);if(ud(s),(n=Ke)?(n=Oy(n,xn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:zr!==null?{id:Kn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Wp(n),a.return=s,s.child=a,jt=s,Ke=null)):n=null,n===null)throw Br
vendor: 3,267 bytes, line 9
9(s);return s.lanes=536870912,null}return Ml(s,l)}var m=n.memoizedState;if(m!==null){var b=m.dehydrated;if(ud(s),h)if(s.flags&256)s.flags&=-257,s=gg(n,s,a);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(i(558));else if(ht||Li(n,s,a,!1),h=(a&n.childLanes)!==0,ht||h){if(l=$e,l!==null&&(b=Yt(l,a),b!==0&&b!==m.retryLane))throw m.retryLane=b,zs(n,b),tn(l,n,b),Nd;Vl(),s=gg(n,s,a)}else n=m.treeContext,Ke=Cn(b.nextSibling),jt=s,ke=!0,Ir=null,xn=!1,n!==null&&nm(s,n),s=Ml(s,l),s.flags|=4096;return s}return n=ur(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function Dl(n,s){var a=s.ref;if(a===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(n===null||n.ref!==a)&&(s.flags|=4194816)}}function jd(n,s,a,l,h){return $s(s),a=hd(n,s,a,l,void 0,h),l=fd(),n!==null&&!ht?(pd(n,s,h),gr(n,s,h)):(ke&&l&&Ku(s),s.flags|=1,Dt(n,s,a,h),s.child)}function yg(n,s,a,l,h,m){return $s(s),s.updateQueue=null,a=wm(s,l,a,h),bm(n),l=fd(),n!==null&&!ht?(pd(n,s,m),gr(n,s,m)):(ke&&l&&Ku(s),s.flags|=1,Dt(n,s,a,m),s.child)}function vg(n,s,a,l,h){if($s(s),s.stateNode===null){var m=Ni,b=a.contextType;typeof b=="object"&&b!==null&&(m=Mt(b)),m=new a(l,m),s.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Cd,s.stateNode=m,m._reactInternals=s,m=s.stateNode,m.props=l,m.state=s.memoizedState,m.refs={},sd(s),b=a.contextType,m.context=typeof b=="object"&&b!==null?Mt(b):Ni,m.state=s.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Od(s,a,b,l),m.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&Cd.enqueueReplaceState(m,m.state,null),Ha(s,l,m,h),Ba(),m.state=s.memoizedState),typeof m.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){m=s.stateNode;var T=s.memoizedProps,x=Ys(a,T);m.props=x;var z=m.context,$=a.contextType;b=Ni,typeof $=="object"&&$!==null&&(b=Mt($));var K=a.getDerivedStateFromProps;$=typeof K=="function"||typeof m.getSnapshotBeforeUpdate=="function",T=s.pendingProps!==T,$||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T||z!==b)&&sg(s,m,l,b),$r=!1;var I=s.memoizedState;m.state=I,Ha(s,l,m,h),Ba(),z=s.memoizedState,T||I!==z||$r?(typeof K=="function"&&(Od(s,a,K,l),z=s.memoizedState),(x=$r||rg(s,a,x,l,I,z,b))?($||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(s.flags|=4194308)):(typeof m.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=z),m.props=l,m.state=z,m.context=b,l=x):(typeof m.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{m=s.stateNode,id(n,s),b=s.memoizedProps,$=Ys(a,b),m.props=$,K=s.pendingProps,I=m.context,z
vendor: 4,956 bytes, line 9
9=a.contextType,x=Ni,typeof z=="object"&&z!==null&&(x=Mt(z)),T=a.getDerivedStateFromProps,(z=typeof T=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==K||I!==x)&&sg(s,m,l,x),$r=!1,I=s.memoizedState,m.state=I,Ha(s,l,m,h),Ba();var B=s.memoizedState;b!==K||I!==B||$r||n!==null&&n.dependencies!==null&&ml(n.dependencies)?(typeof T=="function"&&(Od(s,a,T,l),B=s.memoizedState),($=$r||rg(s,a,$,l,I,B,x)||n!==null&&n.dependencies!==null&&ml(n.dependencies))?(z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,B,x),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,B,x)),typeof m.componentDidUpdate=="function"&&(s.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=B),m.props=l,m.state=B,m.context=x,l=$):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),l=!1)}return m=l,Dl(n,s),l=(s.flags&128)!==0,m||l?(m=s.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:m.render(),s.flags|=1,n!==null&&l?(s.child=Fs(s,n.child,null,h),s.child=Fs(s,null,a,h)):Dt(n,s,a,h),s.memoizedState=m.state,n=s.child):n=gr(n,s,h),n}function bg(n,s,a,l){return Bs(),s.flags|=256,Dt(n,s,a,l),s.child}var Md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dd(n){return{baseLanes:n,cachePool:lm()}}function Ld(n,s,a){return n=n!==null?n.childLanes&~a:0,s&&(n|=mn),n}function wg(n,s,a){var l=s.pendingProps,h=!1,m=(s.flags&128)!==0,b;if((b=m)||(b=n!==null&&n.memoizedState===null?!1:(it.current&2)!==0),b&&(h=!0,s.flags&=-129),b=(s.flags&32)!==0,s.flags&=-33,n===null){if(ke){if(h?Gr(s):Fr(),(n=Ke)?(n=Oy(n,xn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:zr!==null?{id:Kn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Wp(n),a.return=s,s.child=a,jt=s,Ke=null)):n=null,n===null)throw Br(s);return yh(n)?s.lanes=32:s.lanes=536870912,null}var T=l.children;return l=l.fallback,h?(Fr(),h=s.mode,T=Ll({mode:"hidden",children:T},h),l=Is(l,h,a,null),T.return=s,l.return=s,T.sibling=l,s.child=T,l=s.child,l.memoizedState=Dd(a),l.childLanes=Ld(n,b,a),s.memoizedState=Md,Fa(null,l)):(Gr(s),Ud(s,T))}var x=n.memoizedState;if(x!==null&&(T=x.dehydrated,T!==null)){if(m)s.flags&256?(Gr(s),s.flags&=-257,s=Pd(n,s,a)):s.memoizedState!==null?(Fr(),s.child=n.child,s.flags|=128,s=null):(Fr(),T=l.fallback,h=s.mode,l=Ll({mode:"visible",children:l.children},h),T=Is(T,h,a,null),T.flags|=2,l.return=s,T.return=s,l.sibling=T,s.child=l,Fs(s,n.child,null,a),l=s.child,l.memoizedState=Dd(a),l.childLanes=Ld(n,b,a),s.memoizedState=Md,s=Fa(null,l));else if(Gr(s),yh(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var z=b.dgst;b=z,l=Error(i(419)),l.stack="",l.digest=b,Da({value:l,source:null,stack:null}),s=Pd(n,s,a)}else if(ht||Li(n,s,a,!1),b=(a&n.childLanes)!==0,ht||b){if(b=$e,b!==null&&(l=Yt(b,a),l!==0&&l!==x.retryLane))throw x.retryLane=l,zs(n,l),tn(b,n,l),Nd;gh(T)||Vl(),s=Pd(n,s,a)}else gh(T)?(s.flags|=192,s.child=n.child,s=null):(n=x.treeContext,Ke=Cn(T.nextSibling),jt=s,ke=!0,Ir=null,xn=!1,n!==null&&nm(s,n),s=Ud(s,l.children),s.flags|=4096);return s}return h?(Fr(),T=l.fallback,h=s.mode,x=n.child,z=x.sibling,l=ur(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,z!==null?T=ur(z,T):(T=Is(T,h,a,null),T.flags|=2),T.return=s,l.return=s,l.sibling=T,s.child=l,Fa(null,l),l=s.child,T=n.child.memoizedState,T===null?T=Dd(a):(h=T.cachePool,h!==null?(x=ut._currentValue,h=h.parent!==x?{parent:x,pool:x}:h):h=lm(),T={baseLanes:T.baseLanes|a,cachePool:h}),l.memoizedState=T,l.childLanes=Ld(n,b,a),s.memoizedState=Md,Fa(n.child,l)):(Gr(s),a=n.child,n=a.sibling,a=ur(a,{mode:"visible",children:l.children}),a.return=s,a.sibling=null,n!==null&&(b=s.deletions,b===null?(s.deletions=[n],s.flags|=16):b.push(n)),s.child=a,s.memoizedState=null,a)}function Ud(n,s){return s=Ll({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function Ll(n,s){return n=dn(22,n,null,s),n.lanes=0,n}function Pd(n,s,a){return Fs(s,n.child,null,a),n=Ud(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function _g(n,s,a){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),Zu(n.return,s,a)}function zd(n,s,a,l,h,m){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:h,treeForkCount:m}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail
vendor: 4,458 bytes, line 9
9=a,b.tailMode=h,b.treeForkCount=m)}function Sg(n,s,a){var l=s.pendingProps,h=l.revealOrder,m=l.tail;l=l.children;var b=it.current,T=(b&2)!==0;if(T?(b=b&1|2,s.flags|=128):b&=1,F(it,b),Dt(n,s,l,a),l=ke?Ma:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&_g(n,a,s);else if(n.tag===19)_g(n,a,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(a=s.child,h=null;a!==null;)n=a.alternate,n!==null&&El(n)===null&&(h=a),a=a.sibling;a=h,a===null?(h=s.child,s.child=null):(h=a.sibling,a.sibling=null),zd(s,!1,h,a,m,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=s.child,s.child=null;h!==null;){if(n=h.alternate,n!==null&&El(n)===null){s.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}zd(s,!0,a,null,m,l);break;case"together":zd(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function gr(n,s,a){if(n!==null&&(s.dependencies=n.dependencies),Qr|=s.lanes,(a&s.childLanes)===0)if(n!==null){if(Li(n,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(i(153));if(s.child!==null){for(n=s.child,a=ur(n,n.pendingProps),s.child=a,a.return=s;n.sibling!==null;)n=n.sibling,a=a.sibling=ur(n,n.pendingProps),a.return=s;a.sibling=null}return s.child}function Id(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&ml(n)))}function qS(n,s,a){switch(s.tag){case 3:ge(s,s.stateNode.containerInfo),Hr(s,ut,n.memoizedState.cache),Bs();break;case 27:case 5:Ct(s);break;case 4:ge(s,s.stateNode.containerInfo);break;case 10:Hr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,ud(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(Gr(s),s.flags|=128,null):(a&s.child.childLanes)!==0?wg(n,s,a):(Gr(s),n=gr(n,s,a),n!==null?n.sibling:null);Gr(s);break;case 19:var h=(n.flags&128)!==0;if(l=(a&s.childLanes)!==0,l||(Li(n,s,a,!1),l=(a&s.childLanes)!==0),h){if(l)return Sg(n,s,a);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),F(it,it.current),l)break;return null;case 22:return s.lanes=0,pg(n,s,a,s.pendingProps);case 24:Hr(s,ut,n.memoizedState.cache)}return gr(n,s,a)}function Eg(n,s,a){if(n!==null)if(n.memoizedProps!==s.pendingProps)ht=!0;else{if(!Id(n,a)&&(s.flags&128)===0)return ht=!1,qS(n,s,a);ht=(n.flags&131072)!==0}else ht=!1,ke&&(s.flags&1048576)!==0&&tm(s,Ma,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=Vs(s.elementType),s.type=n,typeof n=="function")Vu(n)?(l=Ys(n,l),s.tag=1,s=vg(null,s,n,l,a)):(s.tag=0,s=jd(null,s,n,l,a));else{if(n!=null){var h=n.$$typeof;if(h===j){s.tag=11,s=dg(null,s,n,l,a);break e}else if(h===P){s.tag=14,s=hg(null,s,n,l,a);break e}}throw s=Le(n)||n,Error(i(306,s,""))}}return s;case 0:return jd(n,s,s.type,s.pendingProps,a);case 1:return l=s.type,h=Ys(l,s.pendingProps),vg(n,s,l,h,a);case 3:e:{if(ge(s,s.stateNode.containerInfo),n===null)throw Error(i(387));l=s.pendingProps;var m=s.memoizedState;h=m.element,id(n,s),Ha(s,l,null,a);var b=s.memoizedState;if(l=b.cache,Hr(s,ut,l),l!==m.cache&&Wu(s,[ut],a,!0),Ba(),l=b.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:b.cache},s.updateQueue.baseState=m,s.memoizedState=m,s.flags&256){s=bg(n,s,l,a);break e}else if(l!==h){h=Tn(Error(i(424)),s),Da(h),s=bg(n,s,l,a);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ke=Cn(n.firstChild),jt=s,ke=!0,Ir=null,xn=!0,a=pm(s,null,l,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Bs(),l===h){s=gr(n,s,a);break e}Dt(n,s,l,a)}s=s.child}return s;case 26:return Dl(n,s),n===null?(a=Dy(s.type,null,s.pendingProps,null))?s.memoizedState=a:ke||(a=s.type,n=s.pendingProps,l=Xl(se.current).createElement(a),l[Nt]=s,l[Qt]=n,Lt(l,a,n),Rt(l),s.stateNode=l):s.memoizedState=Dy(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Ct(s),n===null&&ke&&(l=s.stateNode=Ny(s.type,s.pendingProps,se.current),jt=s,xn=!0,h=Ke,es(s.type)?(vh=h,Ke=Cn(l.firstChild)):Ke=h),Dt(n,s,s.pendingProps.children,a),Dl(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&ke&&((h=l=Ke)&&(l=bE(l,s.type,s.pendingProps,xn),l!==null?(s.stateNode=l,jt=s,Ke=Cn(l.firstChild),xn=!1,h=!0):h=!1),h||Br(s)),Ct(s),h=s.t
vendor: 4,398 bytes, line 9
9ype,m=s.pendingProps,b=n!==null?n.memoizedProps:null,l=m.children,fh(h,m)?l=null:b!==null&&fh(h,b)&&(s.flags|=32),s.memoizedState!==null&&(h=hd(n,s,DS,null,null,a),oo._currentValue=h),Dl(n,s),Dt(n,s,l,a),s.child;case 6:return n===null&&ke&&((n=a=Ke)&&(a=wE(a,s.pendingProps,xn),a!==null?(s.stateNode=a,jt=s,Ke=null,n=!0):n=!1),n||Br(s)),null;case 13:return wg(n,s,a);case 4:return ge(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Fs(s,null,l,a):Dt(n,s,l,a),s.child;case 11:return dg(n,s,s.type,s.pendingProps,a);case 7:return Dt(n,s,s.pendingProps,a),s.child;case 8:return Dt(n,s,s.pendingProps.children,a),s.child;case 12:return Dt(n,s,s.pendingProps.children,a),s.child;case 10:return l=s.pendingProps,Hr(s,s.type,l.value),Dt(n,s,l.children,a),s.child;case 9:return h=s.type._context,l=s.pendingProps.children,$s(s),h=Mt(h),l=l(h),s.flags|=1,Dt(n,s,l,a),s.child;case 14:return hg(n,s,s.type,s.pendingProps,a);case 15:return fg(n,s,s.type,s.pendingProps,a);case 19:return Sg(n,s,a);case 31:return $S(n,s,a);case 22:return pg(n,s,a,s.pendingProps);case 24:return $s(s),l=Mt(ut),n===null?(h=nd(),h===null&&(h=$e,m=ed(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=a),h=m),s.memoizedState={parent:l,cache:h},sd(s),Hr(s,ut,h)):((n.lanes&a)!==0&&(id(n,s),Ha(s,null,null,a),Ba()),h=n.memoizedState,m=s.memoizedState,h.parent!==l?(h={parent:l,cache:l},s.memoizedState=h,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=h),Hr(s,ut,l)):(l=m.cache,Hr(s,ut,l),l!==h.cache&&Wu(s,[ut],a,!0))),Dt(n,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function yr(n){n.flags|=4}function Bd(n,s,a,l,h){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Jg())n.flags|=8192;else throw Gs=bl,rd}else n.flags&=-16777217}function Tg(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Iy(s))if(Jg())n.flags|=8192;else throw Gs=bl,rd}function Ul(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?It():536870912,n.lanes|=s,Ki|=s)}function Ka(n,s){if(!ke)switch(n.tailMode){case"hidden":s=n.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Ye(n){var s=n.alternate!==null&&n.alternate.child===n.child,a=0,l=0;if(s)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags&65011712,l|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=l,n.childLanes=a,s}function VS(n,s,a){var l=s.pendingProps;switch(Yu(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(s),null;case 1:return Ye(s),null;case 3:return a=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),fr(ut),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(Di(s)?yr(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ju())),Ye(s),null;case 26:var h=s.type,m=s.memoizedState;return n===null?(yr(s),m!==null?(Ye(s),Tg(s,m)):(Ye(s),Bd(s,h,null,l,a))):m?m!==n.memoizedState?(yr(s),Ye(s),Tg(s,m)):(Ye(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&yr(s),Ye(s),Bd(s,h,n,l,a)),null;case 27:if(gt(s),a=se.current,h=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(!l){if(s.stateNode===null)throw Error(i(166));return Ye(s),null}n=Z.current,Di(s)?rm(s):(n=Ny(h,l,a),s.stateNode=n,yr(s))}return Ye(s),null;case 5:if(gt(s),h=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(!l){if(s.stateNode===null)throw Error(i(166));return Ye(s),null}if(m=Z.current,Di(s))rm(s);else{var b=Xl(se.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;
vendor: 23,424 bytes, line 9
9case"select":m=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?b.createElement(h,{is:l.is}):b.createElement(h)}}m[Nt]=s,m[Qt]=l;e:for(b=s.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===s)break e;for(;b.sibling===null;){if(b.return===null||b.return===s)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}s.stateNode=m;e:switch(Lt(m,h,l),h){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&yr(s)}}return Ye(s),Bd(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,a),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(i(166));if(n=se.current,Di(s)){if(n=s.stateNode,a=s.memoizedProps,l=null,h=jt,h!==null)switch(h.tag){case 27:case 5:l=h.memoizedProps}n[Nt]=s,n=!!(n.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||wy(n.nodeValue,a)),n||Br(s,!0)}else n=Xl(n).createTextNode(l),n[Nt]=s,s.stateNode=n}return Ye(s),null;case 31:if(a=s.memoizedState,n===null||n.memoizedState!==null){if(l=Di(s),a!==null){if(n===null){if(!l)throw Error(i(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Nt]=s}else Bs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ye(s),n=!1}else a=Ju(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return s.flags&256?(fn(s),s):(fn(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Ye(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Di(s),l!==null&&l.dehydrated!==null){if(n===null){if(!h)throw Error(i(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[Nt]=s}else Bs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ye(s),h=!1}else h=Ju(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(fn(s),s):(fn(s),null)}return fn(s),(s.flags&128)!==0?(s.lanes=a,s):(a=l!==null,n=n!==null&&n.memoizedState!==null,a&&(l=s.child,h=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(h=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==h&&(l.flags|=2048)),a!==n&&a&&(s.child.flags|=8192),Ul(s,s.updateQueue),Ye(s),null);case 4:return he(),n===null&&lh(s.stateNode.containerInfo),Ye(s),null;case 10:return fr(s.type),Ye(s),null;case 19:if(V(it),l=s.memoizedState,l===null)return Ye(s),null;if(h=(s.flags&128)!==0,m=l.rendering,m===null)if(h)Ka(l,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(m=El(n),m!==null){for(s.flags|=128,Ka(l,!1),n=m.updateQueue,s.updateQueue=n,Ul(s,n),s.subtreeFlags=0,n=a,a=s.child;a!==null;)Zp(a,n),a=a.sibling;return F(it,it.current&1|2),ke&&dr(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&Et()>Hl&&(s.flags|=128,h=!0,Ka(l,!1),s.lanes=4194304)}else{if(!h)if(n=El(m),n!==null){if(s.flags|=128,h=!0,n=n.updateQueue,s.updateQueue=n,Ul(s,n),Ka(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!ke)return Ye(s),null}else 2*Et()-l.renderingStartTime>Hl&&a!==536870912&&(s.flags|=128,h=!0,Ka(l,!1),s.lanes=4194304);l.isBackwards?(m.sibling=s.child,s.child=m):(n=l.last,n!==null?n.sibling=m:s.child=m,l.last=m)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Et(),n.sibling=null,a=it.current,F(it,h?a&1|2:a&1),ke&&dr(s,l.treeForkCount),n):(Ye(s),null);case 22:case 23:return fn(s),cd(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(a&536870912)!==0&&(s.flags&128)===0&&(Ye(s),s.subtreeFlags&6&&(s.flags|=8192)):Ye(s),a=s.updateQueue,a!==null&&Ul(s,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==a&&(s.flags|=2048),n!==null&&V(qs),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),fr(ut),Ye(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function GS(n,s){switch(Yu(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return fr(ut),he(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return gt(s),null;case 31:if(s.memoizedState!==null){if(fn(s),s.alternate===null)throw Error(i(340));Bs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(fn(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(i(340));Bs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return V(it),null;case 4:return he(),null;case 10:return fr(s.type),null;case 22:case 23:return fn(s),cd(),n!==null&&V(qs),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return fr(ut),null;case 25:return null;default:return null}}function Rg(n,s){switch(Yu(s),s.tag){case 3:fr(ut),he();break;case 26:case 27:case 5:gt(s);break;case 4:he();break;case 31:s.memoizedState!==null&&fn(s);break;case 13:fn(s);break;case 19:V(it);break;case 10:fr(s.type);break;case 22:case 23:fn(s),cd(),n!==null&&V(qs);break;case 24:fr(ut)}}function Ya(n,s){try{var a=s.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var h=l.next;a=h;do{if((a.tag&n)===n){l=void 0;var m=a.create,b=a.inst;l=m(),b.destroy=l}a=a.next}while(a!==h)}}catch(T){Pe(s,s.return,T)}}function Kr(n,s,a){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var m=h.next;l=m;do{if((l.tag&n)===n){var b=l.inst,T=b.destroy;if(T!==void 0){b.destroy=void 0,h=s;var x=a,z=T;try{z()}catch($){Pe(h,x,$)}}}l=l.next}while(l!==m)}}catch($){Pe(s,s.return,$)}}function Ag(n){var s=n.updateQueue;if(s!==null){var a=n.stateNode;try{gm(s,a)}catch(l){Pe(n,n.return,l)}}}function xg(n,s,a){a.props=Ys(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(l){Pe(n,s,l)}}function Qa(n,s){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof a=="function"?n.refCleanup=a(l):a.current=l}}catch(h){Pe(n,s,h)}}function Qn(n,s){var a=n.ref,l=n.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(h){Pe(n,s,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Pe(n,s,h)}else a.current=null}function Og(n){var s=n.type,a=n.memoizedProps,l=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(h){Pe(n,n.return,h)}}function Hd(n,s,a){try{var l=n.stateNode;fE(l,n.type,a,s),l[Qt]=s}catch(h){Pe(n,n.return,h)}}function Cg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&es(n.type)||n.tag===4}function $d(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Cg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&es(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function qd(n,s,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(n),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=lr));else if(l!==4&&(l===27&&es(n.type)&&(a=n.stateNode,s=null),n=n.child,n!==null))for(qd(n,s,a),n=n.sibling;n!==null;)qd(n,s,a),n=n.sibling}function Pl(n,s,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?a.insertBefore(n,s):a.appendChild(n);else if(l!==4&&(l===27&&es(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(Pl(n,s,a),n=n.sibling;n!==null;)Pl(n,s,a),n=n.sibling}function kg(n){var s=n.stateNode,a=n.memoizedProps;try{for(var l=n.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);Lt(s,l,a),s[Nt]=n,s[Qt]=a}catch(m){Pe(n,n.return,m)}}var vr=!1,ft=!1,Vd=!1,Ng=typeof WeakSet=="function"?WeakSet:Set,At=null;function FS(n,s){if(n=n.containerInfo,dh=sc,n=qp(n),Pu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var h=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var b=0,T=-1,x=-1,z=0,$=0,K=n,I=null;t:for(;;){for(var B;K!==a||h!==0&&K.nodeType!==3||(T=b+h),K!==m||l!==0&&K.nodeType!==3||(x=b+l),K.nodeType===3&&(b+=K.nodeValue.length),(B=K.firstChild)!==null;)I=K,K=B;for(;;){if(K===n)break t;if(I===a&&++z===h&&(T=b),I===m&&++$===l&&(x=b),(B=K.nextSibling)!==null)break;K=I,I=K.parentNode}K=B}a=T===-1||x===-1?null:{start:T,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(hh={focusedElem:n,selectionRange:a},sc=!1,At=s;At!==null;)if(s=At,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,At=n;else for(;At!==null;){switch(s=At,m=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)h=n[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,a=s,h=m.memoizedProps,m=m.memoizedState,l=a.stateNode;try{var ae=Ys(a.type,h);n=l.getSnapshotBeforeUpdate(ae,m),l.__reactInternalSnapshotBeforeUpdate=n}catch(pe){Pe(a,a.return,pe)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,a=n.nodeType,a===9)mh(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":mh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=s.sibling,n!==null){n.return=s.return,At=n;break}At=s.return}}function jg(n,s,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:wr(n,a),l&4&&Ya(5,a);break;case 1:if(wr(n,a),l&4)if(n=a.stateNode,s===null)try{n.componentDidMount()}catch(b){Pe(a,a.return,b)}else{var h=Ys(a.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(h,s,n.__reactInternalSnapshotBeforeUpdate)}catch(b){Pe(a,a.return,b)}}l&64&&Ag(a),l&512&&Qa(a,a.return);break;case 3:if(wr(n,a),l&64&&(n=a.updateQueue,n!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{gm(n,s)}catch(b){Pe(a,a.return,b)}}break;case 27:s===null&&l&4&&kg(a);case 26:case 5:wr(n,a),s===null&&l&4&&Og(a),l&512&&Qa(a,a.return);break;case 12:wr(n,a);break;case 31:wr(n,a),l&4&&Lg(n,a);break;case 13:wr(n,a),l&4&&Ug(n,a),l&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=tE.bind(null,a),_E(n,a))));break;case 22:if(l=a.memoizedState!==null||vr,!l){s=s!==null&&s.memoizedState!==null||ft,h=vr;var m=ft;vr=l,(ft=s)&&!m?_r(n,a,(a.subtreeFlags&8772)!==0):wr(n,a),vr=h,ft=m}break;case 30:break;default:wr(n,a)}}function Mg(n){var s=n.alternate;s!==null&&(n.alternate=null,Mg(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&wu(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Xe=null,Xt=!1;function br(n,s,a){for(a=a.child;a!==null;)Dg(n,s,a),a=a.sibling}function Dg(n,s,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Ns,a)}catch{}switch(a.tag){case 26:ft||Qn(a,s),br(n,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ft||Qn(a,s);var l=Xe,h=Xt;es(a.type)&&(Xe=a.stateNode,Xt=!1),br(n,s,a),so(a.stateNode),Xe=l,Xt=h;break;case 5:ft||Qn(a,s);case 6:if(l=Xe,h=Xt,Xe=null,br(n,s,a),Xe=l,Xt=h,Xe!==null)if(Xt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(m){Pe(a,s,m)}else try{Xe.removeChild(a.stateNode)}catch(m){Pe(a,s,m)}break;case 18:Xe!==null&&(Xt?(n=Xe,Ay(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),ta(n)):Ay(Xe,a.stateNode));break;case 4:l=Xe,h=Xt,Xe=a.stateNode.containerInfo,Xt=!0,br(n,s,a),Xe=l,Xt=h;break;case 0:case 11:case 14:case 15:Kr(2,a,s),ft||Kr(4,a,s),br(n,s,a);break;case 1:ft||(Qn(a,s),l=a.stateNode,typeof l.componentWillUnmount=="function"&&xg(a,s,l)),br(n,s,a);break;case 21:br(n,s,a);break;case 22:ft=(l=ft)||a.memoizedState!==null,br(n,s,a),ft=l;break;default:br(n,s,a)}}function Lg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ta(n)}catch(a){Pe(s,s.return,a)}}}function Ug(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ta(n)}catch(a){Pe(s,s.return,a)}}function KS(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Ng),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Ng),s;default:throw Error(i(435,n.tag))}}function zl(n,s){var a=KS(n);s.forEach(function(l){if(!a.has(l)){a.add(l);var h=nE.bind(null,n,l);l.then(h,h)}})}function Zt(n,s){var a=s.deletions;if(a!==null)for(var l=0;l<a.length;l++){var h=a[l],m=n,b=s,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(es(T.type)){Xe=T.stateNode,Xt=!1;break e}break;case 5:Xe=T.stateNode,Xt=!1;break e;case 3:case 4:Xe=T.stateNode.containerInfo,Xt=!0;break e}T=T.return}if(Xe===null)throw Error(i(160));Dg(m,b,h),Xe=null,Xt=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Pg(s,n),s=s.sibling}var Pn=null;function Pg(n,s){var a=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Zt(s,n),Wt(n),l&4&&(Kr(3,n,n.return),Ya(3,n),Kr(5,n,n.return));break;case 1:Zt(s,n),Wt(n),l&512&&(ft||a===null||Qn(a,a.return)),l&64&&vr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var h=Pn;if(Zt(s,n),Wt(n),l&512&&(ft||a===null||Qn(a,a.return)),l&4){var m=a!==null?a.memoizedState:null;if(l=n.memoizedState,a===null)if(l===null)if(n.stateNode===null){e:{l=n.type,a=n.memoizedProps,h=h.ownerDocument||h;t:switch(l){case"title":m=h.getElementsByTagName("title")[0],(!m||m[Sa]||m[Nt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(l),h.head.insertBefore(m,h.querySelector("head > title"))),Lt(m,l,a),m[Nt]=n,Rt(m),l=m;break e;case"link":var b=Py("link","href",h).get(l+(a.href||""));if(b){for(var T=0;T<b.length;T++)if(m=b[T],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(T,1);break t}}m=h.createElement(l),Lt(m,l,a),h.head.appendChild(m);break;case"meta":if(b=Py("meta","content",h).get(l+(a.content||""))){for(T=0;T<b.length;T++)if(m=b[T],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(T,1);break t}}m=h.createElement(l),Lt(m,l,a),h.head.appendChild(m);break;default:throw Error(i(468,l))}m[Nt]=n,Rt(m),l=m}n.stateNode=l}else zy(h,n.type,n.stateNode);else n.stateNode=Uy(h,l,n.memoizedProps);else m!==l?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,l===null?zy(h,n.type,n.stateNode):Uy(h,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Hd(n,n.memoizedProps,a.memoizedProps)}break;case 27:Zt(s,n),Wt(n),l&512&&(ft||a===null||Qn(a,a.return)),a!==null&&l&4&&Hd(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Zt(s,n),Wt(n),l&512&&(ft||a===null||Qn(a,a.return)),n.flags&32){h=n.stateNode;try{Ti(h,"")}catch(ae){Pe(n,n.return,ae)}}l&4&&n.stateNode!=null&&(h=n.memoizedProps,Hd(n,h,a!==null?a.memoizedProps:h)),l&1024&&(Vd=!0);break;case 6:if(Zt(s,n),Wt(n),l&4){if(n.stateNode===null)throw Error(i(162));l=n.memoizedProps,a=n.stateNode;try{a.nodeValue=l}catch(ae){Pe(n,n.return,ae)}}break;case 3:if(ec=null,h=Pn,Pn=Zl(s.containerInfo),Zt(s,n),Pn=h,Wt(n),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ta(s.containerInfo)}catch(ae){Pe(n,n.return,ae)}Vd&&(Vd=!1,zg(n));break;case 4:l=Pn,Pn=Zl(n.stateNode.containerInfo),Zt(s,n),Wt(n),Pn=l;break;case 12:Zt(s,n),Wt(n);break;case 31:Zt(s,n),Wt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,zl(n,l)));break;case 13:Zt(s,n),Wt(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Bl=Et()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,zl(n,l)));break;case 22:h=n.memoizedState!==null;var x=a!==null&&a.memoizedState!==null,z=vr,$=ft;if(vr=z||h,ft=$||x,Zt(s,n),ft=$,vr=z,Wt(n),l&8192)e:for(s=n.stateNode,s._visibility=h?s._visibility&-2:s._visibility|1,h&&(a===null||x||vr||ft||Qs(n)),a=null,s=n;;){if(s.tag===5||s.tag===26){if(a===null){x=a=s;try{if(m=x.stateNode,h)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=x.stateNode;var K=x.memoizedProps.style,I=K!=null&&K.hasOwnProperty("display")?K.display:null;T.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(ae){Pe(x,x.return,ae)}}}else if(s.tag===6){if(a===null){x=s;try{x.stateNode.nodeValue=h?"":x.memoizedProps}catch(ae){Pe(x,x.return,ae)}}}else if(s.tag===18){if(a===null){x=s;try{var B=x.stateNode;h?xy(B,!0):xy(x.stateNode,!1)}catch(ae){Pe(x,x.return,ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,zl(n,a))));break;case 19:Zt(s,n),Wt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,zl(n,l)));break;case 30:break;case 21:break;default:Zt(s,n),Wt(n)}}function Wt(n){var s=n.flags;if(s&2){try{for(var a,l=n.return;l!==null;){if(Cg(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var h=a.stateNode,m=$d(n);Pl(n,m,h);break;case 5:var b=a.stateNode;a.flags&32&&(Ti(b,""),a.flags&=-33);var T=$d(n);Pl(n,T,b);break;case 3:case 4:var x=a.stateNode.containerInfo,z=$d(n);qd(n,z,x);break;default:throw Error(i(161))}}catch($){Pe(n,n.return,$)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function zg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;zg(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function wr(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)jg(n,s.alternate,s),s=s.sibling}function Qs(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Kr(4,s,s.return),Qs(s);break;case 1:Qn(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&xg(s,s.return,a),Qs(s);break;case 27:so(s.stateNode);case 26:case 5:Qn(s,s.return),Qs(s);break;case 22:s.memoizedState===null&&Qs(s);break;case 30:Qs(s);break;default:Qs(s)}n=n.sibling}}function _r(n,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,h=n,m=s,b=m.flags;switch(m.tag){case 0:case 11:case 15:_r(h,m,a),Ya(4,m);break;case 1:if(_r(h,m,a),l=m,h=l.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(z){Pe(l,l.return,z)}if(l=m,h=l.updateQueue,h!==null){var T=l.stateNode;try{var x=h.shared.hiddenCallbacks;if(x!==null)for(h.shared.hiddenCallbacks=null,h=0;h<x.length;h++)mm(x[h],T)}catch(z){Pe(l,l.return,z)}}a&&b&64&&Ag(m),Qa(m,m.return);break;case 27:kg(m);case 26:case 5:_r(h,m,a),a&&l===null&&b&4&&Og(m),Qa(m,m.return);break;case 12:_r(h,m,a);break;case 31:_r(h,m,a),a&&b&4&&Lg(h,m);break;case 13:_r(h,m,a),a&&b&4&&Ug(h,m);break;case 22:m.memoizedState===null&&_r(h,m,a),Qa(m,m.return);break;case 30:break;default:_r(h,m,a)}s=s.sibling}}function Gd(n,s){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&La(a))}function Fd(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&La(n))}function zn(n,s,a,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ig(n,s,a,l),s=s.sibling}function Ig(n,s,a,l){var h=s.flags;switch(s.tag){case 0:case 11:case 15:zn(n,s,a,l),h&2048&&Ya(9,s);break;case 1:zn(n,s,a,l);break;case 3:zn(n,s,a,l),h&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&La(n)));break;case 12:if(h&2048){zn(n,s,a,l),n=s.stateNode;try{var m=s.memoizedProps,b=m.id,T=m.onPostCommit;typeof T=="function"&&T(b,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(x){Pe(s,s.return,x)}}else zn(n,s,a,l);break;case 31:zn(n,s,a,l);break;case 13:zn(n,s,a,l);break;case 23:break;case 22:m=s.stateNode,b=s.alternate,s.memoizedState!==null?m._visibility&2?zn(n,s,a,l):Ja(n,s):m._visibility&2?zn(n,s,a,l):(m._visibility|=2,Vi(n,s,a,l,(s.subtreeFlags&10256)!==0||!1)),h&2048&&Gd(b,s);break;case 24:zn(n,s,a,l),h&2048&&Fd(s.alternate,s);break;default:zn(n,s,a,l)}}function Vi(n,s,a,l,h){for(h=h&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var m=n,b=s,T=a,x=l,z=b.flags;switch(b.tag){case 0:case 11:case 15:Vi(m,b,T,x,h),Ya(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?Vi(m,b,T,x,h):Ja(m,b):($._visibility|=2,Vi(m,b,T,x,h)),h&&z&2048&&Gd(b.alternate,b);break;case 24:Vi(m,b,T,x,h),h&&z&2048&&Fd(b.alternate,b);break;default:Vi(m,b,T,x,h)}s=s.sibling}}function Ja(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=n,l=s,h=l.flags;switch(l.tag){case 22:Ja(a,l),h&2048&&Gd(l.alternate,l);break;case 24:Ja(a,l),h&2048&&Fd(l.alternate,l);break;default:Ja(a,l)}s=s.sibling}}var Xa=8192;function Gi(n,s,a){if(n.subtreeFlags&Xa)for(n=n.child;n!==null;)Bg(n,s,a),n=n.sibling}function Bg(n,s,a){switch(n.tag){case 26:Gi(n,s,a),n.flags&Xa&&n.memoizedState!==null&&ME(a,Pn,n.memoizedState,n.memoizedProps);break;case 5:Gi(n,s,a);break;case 3:case 4:var l=Pn;Pn=Zl(n.stateNode.containerInfo),Gi(n,s,a),Pn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Xa,Xa=16777216,Gi(n,s,a),Xa=l):Gi(n,s,a));break;default:Gi(n,s,a)}}function Hg(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Za(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var l=s[a];At=l,qg(l,n)}Hg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)$g(n),n=n.sibling}function $g(n){switch(n.tag){case 0:case 11:case 15:Za(n),n.flags&2048&&Kr(9,n,n.return);break;case 3:Za(n);break;case 12:Za(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Il(n)):Z
vendor: 17,993 bytes, line 9
9a(n);break;default:Za(n)}}function Il(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var l=s[a];At=l,qg(l,n)}Hg(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Kr(8,s,s.return),Il(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,Il(s));break;default:Il(s)}n=n.sibling}}function qg(n,s){for(;At!==null;){var a=At;switch(a.tag){case 0:case 11:case 15:Kr(8,a,s);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:La(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,At=l;else e:for(a=n;At!==null;){l=At;var h=l.sibling,m=l.return;if(Mg(l),l===a){At=null;break e}if(h!==null){h.return=m,At=h;break e}At=m}}}var YS={getCacheForType:function(n){var s=Mt(ut),a=s.data.get(n);return a===void 0&&(a=n(),s.data.set(n,a)),a},cacheSignal:function(){return Mt(ut).controller.signal}},QS=typeof WeakMap=="function"?WeakMap:Map,De=0,$e=null,Ae=null,Oe=0,Ue=0,pn=null,Yr=!1,Fi=!1,Kd=!1,Sr=0,rt=0,Qr=0,Js=0,Yd=0,mn=0,Ki=0,Wa=null,en=null,Qd=!1,Bl=0,Vg=0,Hl=1/0,$l=null,Jr=null,vt=0,Xr=null,Yi=null,Er=0,Jd=0,Xd=null,Gg=null,eo=0,Zd=null;function gn(){return(De&2)!==0&&Oe!==0?Oe&-Oe:L.T!==null?sh():vu()}function Fg(){if(mn===0)if((Oe&536870912)===0||ke){var n=gi;gi<<=1,(gi&3932160)===0&&(gi=262144),mn=n}else mn=536870912;return n=hn.current,n!==null&&(n.flags|=32),mn}function tn(n,s,a){(n===$e&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)&&(Qi(n,0),Zr(n,Oe,mn,!1)),et(n,a),((De&2)===0||n!==$e)&&(n===$e&&((De&2)===0&&(Js|=a),rt===4&&Zr(n,Oe,mn,!1)),Jn(n))}function Kg(n,s,a){if((De&6)!==0)throw Error(i(327));var l=!a&&(s&127)===0&&(s&n.expiredLanes)===0||Je(n,s),h=l?ZS(n,s):eh(n,s,!0),m=l;do{if(h===0){Fi&&!l&&Zr(n,s,0,!1);break}else{if(a=n.current.alternate,m&&!JS(a)){h=eh(n,s,!1),m=!1;continue}if(h===2){if(m=s,n.errorRecoveryDisabledLanes&m)var b=0;else b=n.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){s=b;e:{var T=n;h=Wa;var x=T.current.memoizedState.isDehydrated;if(x&&(Qi(T,b).flags|=256),b=eh(T,b,!1),b!==2){if(Kd&&!x){T.errorRecoveryDisabledLanes|=m,Js|=m,h=4;break e}m=en,en=h,m!==null&&(en===null?en=m:en.push.apply(en,m))}h=b}if(m=!1,h!==2)continue}}if(h===1){Qi(n,0),Zr(n,s,0,!0);break}e:{switch(l=n,m=h,m){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:Zr(l,s,mn,!Yr);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(h=Bl+300-Et(),10<h)){if(Zr(l,s,mn,!Yr),ve(l,0,!0)!==0)break e;Er=s,l.timeoutHandle=Ty(Yg.bind(null,l,a,en,$l,Qd,s,mn,Js,Ki,Yr,m,"Throttled",-0,0),h);break e}Yg(l,a,en,$l,Qd,s,mn,Js,Ki,Yr,m,null,-0,0)}}break}while(!0);Jn(n)}function Yg(n,s,a,l,h,m,b,T,x,z,$,K,I,B){if(n.timeoutHandle=-1,K=s.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:lr},Bg(s,m,K);var ae=(m&62914560)===m?Bl-Et():(m&4194048)===m?Vg-Et():0;if(ae=DE(K,ae),ae!==null){Er=m,n.cancelPendingCommit=ae(ny.bind(null,n,s,m,a,l,h,b,T,x,$,K,null,I,B)),Zr(n,m,b,!z);return}}ny(n,s,m,a,l,h,b,T,x)}function JS(n){for(var s=n;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var h=a[l],m=h.getSnapshot;h=h.value;try{if(!un(m(),h))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Zr(n,s,a,l){s&=~Yd,s&=~Js,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var h=s;0<h;){var m=31-zt(h),b=1<<m;l[m]=-1,h&=~b}a!==0&&Ms(n,a,s)}function ql(){return(De&6)===0?(to(0),!1):!0}function Wd(){if(Ae!==null){if(Ue===0)var n=Ae.return;else n=Ae,hr=Hs=null,md(n),Ii=null,Pa=0,n=Ae;for(;n!==null;)Rg(n.alternate,n),n=n.return;Ae=null}}function Qi(n,s){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,gE(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),Er=0,Wd(),$e=n,Ae=a=ur(n.current,null),Oe=s,Ue=0,pn=null,Yr=!1,Fi=Je(n,s),Kd=!1,Ki=mn=Yd=Js=Qr=rt=0,en=Wa=null,Qd=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var h=31-zt(l),m=1<<h;s|=n[h],l&=~m}return Sr=s,ul(),a}function Qg(n,s){Se=null,L.H=Ga,s===zi||s===vl?(s=dm(),Ue=3):s===rd?(s=dm(),Ue=4):Ue=s===Nd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,pn=s,Ae===null&&(rt=1,jl(n,Tn(s,n.current)))}function Jg(){var n=hn.current;return n===null?!0:(Oe&4194048)===Oe?On===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===On:!1}function Xg(){var n=L.H;return L.H=Ga,n===null?Ga:n}function Zg(){var n=L.A;return L.A=YS,n}function Vl(){rt=4,Yr||(Oe&4194048)!==Oe&&hn.current!==null||(Fi=!0),(Qr&134217727)===0&&(Js&134217727)===0||$e===null||Zr($e,Oe,mn,!1)}function eh(n,s,a){var l=De;De|=2;var h=Xg(),m=Zg();($e!==n||Oe!==s)&&($l=null,Qi(n,s)),s=!1;var b=rt;e:do try{if(Ue!==0&&Ae!==null){var T=Ae,x=pn;switch(Ue){case 8:Wd(),b=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(s=!0);var z=Ue;if(Ue=0,pn=null,Ji(n,T,x,z),a&&Fi){b=0;break e}break;default:z=Ue,Ue=0,pn=null,Ji(n,T,x,z)}}XS(),b=rt;break}catch($){Qg(n,$)}while(!0);return s&&n.shellSuspendCounter++,hr=Hs=null,De=l,L.H=h,L.A=m,Ae===null&&($e=null,Oe=0,ul()),b}function XS(){for(;Ae!==null;)Wg(Ae)}function ZS(n,s){var a=De;De|=2;var l=Xg(),h=Zg();$e!==n||Oe!==s?($l=null,Hl=Et()+500,Qi(n,s)):Fi=Je(n,s);e:do try{if(Ue!==0&&Ae!==null){s=Ae;var m=pn;t:switch(Ue){case 1:Ue=0,pn=null,Ji(n,s,m,1);break;case 2:case 9:if(cm(m)){Ue=0,pn=null,ey(s);break}s=function(){Ue!==2&&Ue!==9||$e!==n||(Ue=7),Jn(n)},m.then(s,s);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:cm(m)?(Ue=0,pn=null,ey(s)):(Ue=0,pn=null,Ji(n,s,m,7));break;case 5:var b=null;switch(Ae.tag){case 26:b=Ae.memoizedState;case 5:case 27:var T=Ae;if(b?Iy(b):T.stateNode.complete){Ue=0,pn=null;var x=T.sibling;if(x!==null)Ae=x;else{var z=T.return;z!==null?(Ae=z,Gl(z)):Ae=null}break t}}Ue=0,pn=null,Ji(n,s,m,5);break;case 6:Ue=0,pn=null,Ji(n,s,m,6);break;case 8:Wd(),rt=6;break e;default:throw Error(i(462))}}WS();break}catch($){Qg(n,$)}while(!0);return hr=Hs=null,L.H=l,L.A=h,De=a,Ae!==null?0:($e=null,Oe=0,ul(),rt)}function WS(){for(;Ae!==null&&!St();)Wg(Ae)}function Wg(n){var s=Eg(n.alternate,n,Sr);n.memoizedProps=n.pendingProps,s===null?Gl(n):Ae=s}function ey(n){var s=n,a=s.alternate;switch(s.tag){case 15:case 0:s=yg(a,s,s.pendingProps,s.type,void 0,Oe);break;case 11:s=yg(a,s,s.pendingProps,s.type.render,s.ref,Oe);break;case 5:md(s);default:Rg(a,s),s=Ae=Zp(s,Sr),s=Eg(a,s,Sr)}n.memoizedProps=n.pendingProps,s===null?Gl(n):Ae=s}function Ji(n,s,a,l){hr=Hs=null,md(s),Ii=null,Pa=0;var h=s.return;try{if(HS(n,h,s,a,Oe)){rt=1,jl(n,Tn(a,n.current)),Ae=null;return}}catch(m){if(h!==null)throw Ae=h,m;rt=1,jl(n,Tn(a,n.current)),Ae=null;return}s.flags&32768?(ke||l===1?n=!0:Fi||(Oe&536870912)!==0?n=!1:(Yr=n=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),ty(s,n)):Gl(s)}function Gl(n){var s=n;do{if((s.flags&32768)!==0){ty(s,Yr);return}n=s.return;var a=VS(s.alternate,s,Sr);if(a!==null){Ae=a;return}if(s=s.sibling,s!==null){Ae=s;return}Ae=s=n}while(s!==null);rt===0&&(rt=5)}function ty(n,s){do{var a=GS(n.alternate,n);if(a!==null){a.flags&=32767,Ae=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(n=n.sibling,n!==null)){Ae=n;return}Ae=n=a}while(n!==null);rt=6,Ae=null}function ny(n,s,a,l,h,m,b,T,x){n.cancelPendingCommit=null;do Fl();while(vt!==0);if((De&6)!==0)throw Error(i(327));if(s!==null){if(s===n.current)throw Error(i(177));if(m=s.lanes|s.childLanes,m|=$u,Ft(n,a,m,b,T,x),n===$e&&(Ae=$e=null,Oe=0),Yi=s,Xr=n,Er=a,Jd=m,Xd=h,Gg=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,rE(ir,function(){return oy(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,h=Y.p,Y.p=2,b=De,De|=4;try{FS(n,s,a)}finally{De=b,Y.p=h,L.T=l}}vt=1,ry(),sy(),iy()}}function ry(){if(vt===1){vt=0;var n=Xr,s=Yi,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=Y.p;Y.p=2;var h=De;De|=4;try{Pg(s,n);var m=hh,b=qp(n.containerInfo),T=m.focusedElem,x=m.selectionRange;if(b!==T&&T&&T.ownerDocument&&$p(T.ownerDocument.documentElement,T)){if(x!==null&&Pu(T)){var z=x.start,$=x.end;if($===void 0&&($=z),"selectionStart"in T)T.selectionStart=z,T.selectionEnd=Math.min($,T.value.length);else{var K=T.ownerDocument||document,I=K&&K.defaultView||window;if(I.getSelection){var B=I.getSelection(),ae=T.textContent.length,pe=Math.min(x.start,ae),He=x.end===void 0?pe:Math.min(x.end,ae);!B.extend&&pe>He&&(b=He,He=pe,pe=b);var D=Hp(T,pe),k=Hp(T,He);if(D&&k&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var U=K.createRange();U.setStart(D.node,D.offset),B.removeAllRanges(),pe>He?(B.addRange(U),B.extend(k.node,k.offset)):(U.setEnd(k.node,k.offset),B.addRange(U))}}}}for(K=[],B=T;B=B.parentNode;)B.nodeType===1&&K.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<K.length;T++){var G=K[T];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}sc=!!dh,hh=dh=null}finally{De=h,Y.p=l,L.T=a}}n.current=s,vt=2}}function sy(){if(vt===2){vt=0;var n=Xr,s=Yi,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=Y.p;Y.p=2;var h=De;De|=4;try{jg(n,s.alternate,s)}finally{De=h,Y.p=l,L.T=a}}vt=3}}function iy(){if(vt===4||vt===3){vt=0,Vn();var n=Xr,s=Yi,a=Er,l=Gg;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?vt=5:(vt=0,Yi=Xr=null,ay(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Jr=null),Ln(a),s=s.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Ns,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=L.T,h=Y.p,Y.p=2,L.T=null;try{for(var m=n.onRecoverableError,b=0;b<l.length;b++){var T=l[b];m(T.value,{componentStack:T.stack})}}finally{L.T=s,Y.p=h}}(Er&3)!==0&&Fl(),Jn(n),h=n.pendingLanes,(a&261930)!==0&&(h&42)!==0?n===Zd?eo++:(eo=0,Zd=n):eo=0,to(0)}}function ay(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,La(s)))}function Fl(){return ry(),sy(),iy(),oy()}function oy(){if(vt!==5)return!1;var n=Xr,s=Jd;Jd=0;var a=Ln(Er),l=L.T,h=Y.p;try{Y.p=32>a?32:a,L.T=null,a=Xd,Xd=null;var m=Xr,b=Er;if(vt=0,Yi=Xr=null,Er=0,(De&6)!==0)throw Error(i(331));var T=De;if(De|=4,$g(m.current),Ig(m,m.current,b,a),De=T,to(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Ns,m)}catch{}return!0}finally{Y.p=h,L.T=l,ay(n,s)}}function ly(n,s,a){s=Tn(a,s),s=kd(n.stateNode,s,2),n=Vr(n,s,2),n!==null&&(et(n,2),Jn(n))}function Pe(n,s,a){if(n.tag===3)ly(n,n,a);else for(;s!==null;){if(s.tag===3){ly(s,n,a);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Jr===null||!Jr.has(l))){n=Tn(a,n),a=cg(2),l=Vr(s,a,2),l!==null&&(ug(a,l,s,n),et(l,2),Jn(l));break}}s=s.return}}function th(n,s,a){var l=n.pingCache;if(l===null){l=n.pingCache=new QS;var h=new Set;l.set(s,h)}else h=l.get(s),h===void 0&&(h=new Set,l.set(s,h));h.has(a)||(Kd=!0,h.add(a),n=eE.bind(null,n,s,a),s.then(n,n))}function eE(n,s,a){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,$e===n&&(Oe&a)===a&&(rt===4||rt===3&&(Oe&62914560)===Oe&&300>Et()-Bl?(De&2)===0&&Qi(n,0):Yd|=a,Ki===Oe&&(Ki=0)),Jn(n)}function cy(n,s){s===0&&(s=It()),n=zs(n,s),n!==null&&(et(n,s),Jn(n))}function tE(n){var s=n.memoizedState,a=0;s!==null&&(a=s.retryLane),cy(n,a)}function nE(n,s){var a=0;switch(n.tag){case 31:case 13:var l=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(s),cy(n,a)}function rE(n,s){return cn(n,s)}var Kl=null,Xi=null,nh=!1,Yl=!1,rh=!1,Wr=0;function Jn(n){n!==Xi&&n.next===null&&(Xi===null?Kl=Xi=n:Xi=Xi.next=n),Yl=!0,nh||(nh=!0,iE())}function to(n,s){if(!rh&&Yl){rh=!0;do for(var a=!1,l=Kl;l!==null;){if(n!==0){var h=l.pendingLanes;if(h===0)var m=0;else{var b=l.suspendedLanes,T=l.pingedLanes;m=(1<<31-zt(42|n)+1)-1,m&=h&~(b&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,fy(l,m))}else m=Oe,m=ve(l,l===$e?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Je(l,m)||(a=!0,fy(l,m));l=l.next}while(a);rh=!1}}function sE(){uy()}function uy(){Yl=nh=!1;var n=0;Wr!==0&&mE()&&(n=Wr);for(var s=Et(),a=null,l=Kl;l!==null;){var h=l.next,m=dy(l,s);m===0?(l.next=null,a===null?Kl=h:a.next=h,h===null&&(Xi=a)):(a=l,(n!==0||(m&3)!==0)&&(Yl=!0)),l=h}vt!==0&&vt!==5||to(n),Wr!==0&&(Wr=0)}function dy(n,s){for(var a=n.suspendedLanes,l=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var b=31-zt(m),T=1<<b,x=h[b];x===-1?((T&a)===0||(T&l)!==0)&&(h[b]=Tt(T,s)):x<=s&&(n.expiredLanes|=T),m&=~T}if(s=$e,a=Oe,a=ve(n,n===s?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,a===0||n===s&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&ks(l),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Je(n,a)){if(s=a&-a,s===n.callbackPriority)return s;switch(l!==null&&ks(l),Ln(a)){case 2:case 8:a=wn;break;case 32:a=ir;break;case 268435456:a=ar;break;default:a=ir}return l=hy.bind(null,n),a=cn(a,l),n.callbackPriority=s,n.callbackNode=a,s}return l!==null&&l!==null&&ks(l),n.callbackPriority=2,n.callbackNode=null,2}function hy(n,s){if(vt!==0&&vt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Fl()&&n.callbackNode!==a)return null;var l=Oe;return l=ve(n,n===$e?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Kg(n,l,s),dy(n,Et()),n.callbackNode!=null&&n.callbackNode===a?hy.bind(null,n):null)}function fy(n,s){if(Fl())return null;Kg(n,s,!0)}function iE(){yE(function(){(De&6)!==0?cn(tt,sE):uy()})}function sh(){if(Wr===0){var n=Ui;n===0&&(n=mi,mi<<=1,(mi&261888)===0&&(mi=256)),Wr=n}return Wr}function py(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:nl(""+n)}function my(n,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,n.id&&a.setAttribute("form",n.id),s.parentNode.insertBefore(a,s),n=new FormData(n),a.parentNode.removeChild(a),n}function aE(n,s,a,l,h){if(s==="submit"&&a&&a.stateNode===h){var m=py((h[Qt]||null).action),b=l.submitter;b&&(s=(s=b[Qt]||null)?py(s.formAction):b.getAttribute("formAction"),s!==null&&(m=s,b=null));var T=new al("action","action",null,l,h);n.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Wr!==0){var x=b?my(h,b):new FormData(h);Td(a,{pending:!0,data:x,method:h.method,action:m},null,x)}}else typeof m=="function"&&(T.preventDefault(),x=b?my(h,b):new FormData(h),Td(a,{pending:!0,data:x,method:h.method,action:m},m,x))},currentTarget:h}]})}}for(var ih=0;ih<Hu.length;ih++){var ah=Hu[ih],oE=ah.toLowerCase(),lE=ah[0].toUpperCase()+ah.slice(1);Un(oE,"on"+lE)}Un(Fp,"onAnimationEnd"),Un(Kp,"onAnimationIteration"),Un(Yp,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(TS,"onTransitionRun"),Un(RS,"onTransitionStart"),Un(AS,"onTransitionCancel"),Un(Qp,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var no="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(no));function gy(n,s){s=(s&4)!==0;for(var a=0;a<n.length;a++){var l=n[a],h=l.event;l=l.listeners;e:{var m=void 0;if(s)for(var b=l.length-1;0<=b;b--){var T=l[b],x=T.instance,z=T.currentTarget;if(T=T.listener,x!==m&&h.isPropagationStopped())break e;m=T,h.currentTarget=z;try{m(h)}catch($){cl($)}h.currentTarget=null,m=x}else for(b=0;b<l.length;b++){if(T=l[b],x=T.instance,z=T.currentTarget,T=T.listener,x!==m&&h.isPropagationStopped())break e;m=T,h.currentTarget=z;try{m(h)}catch($){cl($)}h.currentTarget=null,m=x}}}}function xe(n,s){var a=s[bu];a===void 0&&(a=s[bu]=new Set);var l=n+"__bubble";a.has(l)||(yy(s,n,2,!1),a.add(l))}function oh(n,s,a){var l=0;s&&(l|=4),yy(a,n,l,s)}var Ql="_reactListening"+Math.random().toString(36).slice(2);function lh(n){if(!n[Ql]){n[Ql]=!0,up.forEach(function(a){a!=="selectionchange"&&(cE.has(a)||oh(a,!1,n),oh(a,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Ql]||(s[Ql]=!0,oh("selectionchange",!1,s))}}function yy(n,s,a,l){switch(Fy(s)){case 2:var h=PE;break;case 8:h=zE;break;default:h=Eh}a=h.bind(null,s,a,n),h=void 0,!Ou||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),l?h!==void 0?n.addEventListener(s,a,{capture:!0,passive:h}):n.addEventListener(s,a,!0):h!==void 0?n.addEventListener(s,a,{passive:h}):n.addEventListener(s,a,!1)}function ch(n,s,a,l,h){var m=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var T=l.stateNode.containerInfo;
vendor: 2,649 bytes, line 9
9if(T===h)break;if(b===4)for(b=l.return;b!==null;){var x=b.tag;if((x===3||x===4)&&b.stateNode.containerInfo===h)return;b=b.return}for(;T!==null;){if(b=bi(T),b===null)return;if(x=b.tag,x===5||x===6||x===26||x===27){l=m=b;continue e}T=T.parentNode}}l=l.return}Sp(function(){var z=m,$=Au(a),K=[];e:{var I=Jp.get(n);if(I!==void 0){var B=al,ae=n;switch(n){case"keypress":if(sl(a)===0)break e;case"keydown":case"keyup":B=nS;break;case"focusin":ae="focus",B=ju;break;case"focusout":ae="blur",B=ju;break;case"beforeblur":case"afterblur":B=ju;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=V_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=iS;break;case Fp:case Kp:case Yp:B=K_;break;case Qp:B=oS;break;case"scroll":case"scrollend":B=$_;break;case"wheel":B=cS;break;case"copy":case"cut":case"paste":B=Q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=xp;break;case"toggle":case"beforetoggle":B=dS}var pe=(s&4)!==0,He=!pe&&(n==="scroll"||n==="scrollend"),D=pe?I!==null?I+"Capture":null:I;pe=[];for(var k=z,U;k!==null;){var G=k;if(U=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||U===null||D===null||(G=Ta(k,D),G!=null&&pe.push(ro(k,G,U))),He)break;k=k.return}0<pe.length&&(I=new B(I,ae,null,a,$),K.push({event:I,listeners:pe}))}}if((s&7)===0){e:{if(I=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",I&&a!==Ru&&(ae=a.relatedTarget||a.fromElement)&&(bi(ae)||ae[vi]))break e;if((B||I)&&(I=$.window===$?$:(I=$.ownerDocument)?I.defaultView||I.parentWindow:window,B?(ae=a.relatedTarget||a.toElement,B=z,ae=ae?bi(ae):null,ae!==null&&(He=c(ae),pe=ae.tag,ae!==He||pe!==5&&pe!==27&&pe!==6)&&(ae=null)):(B=null,ae=z),B!==ae)){if(pe=Rp,G="onMouseLeave",D="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(pe=xp,G="onPointerLeave",D="onPointerEnter",k="pointer"),He=B==null?I:Ea(B),U=ae==null?I:Ea(ae),I=new pe(G,k+"leave",B,a,$),I.target=He,I.relatedTarget=U,G=null,bi($)===z&&(pe=new pe(D,k+"enter",ae,a,$),pe.target=U,pe.relatedTarget=He,G=pe),He=G,B&&ae)t:{for(pe=uE,D=B,k=ae,U=0,G=D;G;G=pe(G))U++;G=0;for(var de=k;de;de=pe(de))G++;for(;0<U-G;)D=pe(D),U--;for(;0<G-U;)k=pe(k),G--;for(;U--;){if(D===k||k!==null&&D===k.alternate){pe=D;break t}D=pe(D),k=pe(k)}pe=null}else pe=null;B!==null&&vy(K,I,B,pe,!1),ae!==null&&He!==null&&vy(K,He,ae,pe,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(I=z?Ea(z):window,B=I.nodeName&&I.nodeName.toLowerCase(),B==="select"||B==="input"&&I.type==="file")var je=Lp;else if(Mp(I))if(Up)je=_S;else{je=bS;var ue=vS}else B=I.nodeName,!B||B.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?z&&Tu(z.elementType)&&(je=Lp):je=wS;if(je&&(je=je(n,z))){Dp(K,je,a,$);break e}ue&&ue(n,I,z),n==="focusout"&&z&&I.type==="number"&&z.memoizedProps.value!=null&&Eu(I,"number",I.value)}switch(ue=z?Ea(z):window,n){case"focusin":(Mp(ue)||ue.contentEditable==="true")&&(Oi=ue,zu=z,ja=null);break;case"focusout":ja=zu=Oi=null;break;case"mousedown":Iu=!0;break;case"contextmenu":case"mouseup":case"dragend":Iu=!1,Vp(K,a,$);break;case"selectionchange":if(ES)break;case"keydown":case"keyup":Vp(K,a,$)}var Ee;if(Du)e:{switch(n){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else xi?Np(n,a)&&(Ce="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(Op&&a.locale!=="ko"&&(xi||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&xi&&(Ee=Ep()):(Pr=$,Cu="value"in Pr?Pr.value:Pr.textContent,xi=!0)),ue=Jl(z,Ce),0<ue.length&&(Ce=new Ap(Ce,n,null,a,$),K.push({event:Ce,listeners:ue}),Ee?Ce.data=Ee:(Ee=jp(a),Ee!==null&&(Ce.data=Ee)))),(Ee=fS?pS(n,a):mS(n,a))&&(Ce=Jl(z,"onBeforeInput"),0<Ce.length&&(ue=new Ap("onBeforeInput","beforeinput",null,a,$),K.push({event:ue,listeners:Ce}),ue.data=Ee)),aE(K,n,z,a,$)}gy(K,s)})}function ro(n,s,a){return{instance:n,listener:s,currentTarget:a}}function Jl(n,s){for(var a=s+"Capture",l=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Ta(n,a),h!=null&&l.unshift(ro(n,h,m)),h=Ta(n,s),h!=null&&l.push(ro(n,h,m))),n.tag===3)return l;n=n.return}return[]}function uE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function vy(n,s,a,l,h){for(var m=s._reactName,b=[];a!==null&&a!==l;){var T=a,x=T.alternate,z=T.stateNode;if(T=T.tag,x!==null&&x===l)break;T!==5&&T!==26&&T!==27||z===null||(x=z,h?(z=Ta(a,m),z!=null&&b.unshift(ro(a,z,x))):h||(z=Ta(a,m),z!=null&&b.push(ro(a,z,x)))),a=a.return}b.length!==0&&n.push({event:s,listeners:b})}var dE=/\r\n?/g,hE=/\u0000|\uFFFD/g;function by(n){return(typeof n=="string"?n:""+n).replace(dE,` 10`).replace(hE,"")}function wy(n,s){return s=by(s),by(n)===s}function Be(n,s,a,l,h,m){switch(a){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||Ti(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&Ti(n,""+l);break;case"className":el(n,"class",l);break;case"tabIndex":el(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":el(n,a,l);break;case"style":wp(n,l,m);break;case"data":if(s!=="object"){el(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||a!=="href")){n.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=nl(""+l),n.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(s!=="input"&&Be(n,s,"name",h.name,h,null),Be(n,s,"formEncType",h.formEncType,h,null),Be(n,s,"formMethod",h.formMethod,h,null),Be(n,s,"formTarget",h.formTarget,h,null)):(Be(n,s,"encType",h.encType,h,null),Be(n,s,"method",h.method,h,null),Be(n,s,"target",h.target,h,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=nl(""+l),n.setAttribute(a,l);break;case"onClick":l!=null&&(n.onclick=lr);break;case"onScroll":l!=null&&xe("scroll",n);break;case"onScrollEnd":l!=null&&xe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=a}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}a=nl(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""+l):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":l===!0?n.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(a,l):n.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(a):n.setAttribute(a,l);break;case"popover":xe("beforetoggle",n),xe("toggle",n),Wo(n,"popover",l);break;case"xlinkActuate":or(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":or(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":or(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":or(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":or(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":or(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":or(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":or(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":or(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Wo(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=B_.get(a)||a,Wo(n,a,l))}}function uh(n,s,a,l,h,m){switch(a){case"style":wp(n,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=a}}break;case"children":typeof l=="string"?Ti(n,l):(typeof l=="number"||typeof l=="bigint")&&Ti(n,""+l);break;case"onScroll":l!=null&&xe("scroll",n);break;case"onScrollEnd":l!=null&&xe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dp.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),s=a.slice(2,h?a.length-7:void 0),m=n[Qt]||null,m=m!=null?m[a]:null,typeof m=="function"&&n.removeEventListener(s,m,h),typeof l=="function")){typeof m!="function"&&m!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(s,l,h);break e}a in n?n[a]=l:l===!0?n.setAttribute(a,""):Wo(n,a,l)}}}function Lt(n,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",n),xe("load",n);var l=!1,h=!1,m;for(m in a)if(a.hasOwnProperty(m)){var b=a[m];if(b!=null)switch(m){case"src":l=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Be(n,s,m,b,a,null)}}h&&Be(n,s,"srcSet",a.srcSet,a,null),l&&Be(n,s,"src",a.src,a,null);return;case"input":xe("invalid",n);var T=m=b=h=null,x=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var $=a[l];if($!=null)switch(l){case"name":h=$;break;case"type":b=$;break;case"checked":x=$;break;case"defaultChecked":z=$;break;case"value":m=$;break;case"defaultValue":T=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,s));break;default:Be(n,s,l,$,a,null)}}gp(n,m,T,x,z,b,h,!1);return;case"select":xe("invalid",n),l=b=m=null;for(h in a)if(a.hasOwnProperty(h)&&(T=a[h],T!=null))switch(h){case"value":m=T;break;case"defaultValue":b=T;break;case"multiple":l=T;default:Be(n,s,h,T,a,null)}s=m,a=b,n.multiple=!!l,s!=null?Ei(n,!!l,s,!1):a!=null&&Ei(n,!!l,a,!0);return;case"textarea":xe("invalid",n),m=h=l=null;for(b in a)if(a.hasOwnProperty(b)&&(T=a[b],T!=null))switch(b){case"value":l=T;break;case"defaultValue":h=T;break;case"children":m=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(i(91));break;default:Be(n,s,b,T,a,null)}vp(n,l,h,m);return;case"option":for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null)&&(x==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Be(n,s,x,l,a,null));return;case"dialog":xe("beforetoggle",n),xe("toggle",n),xe("cancel",n),xe("close",n);break;case"iframe":case"object":xe("load",n);break;case"video":case"audio":for(l=0;l<no.length;l++)xe(no[l],n);break;case"image":xe("error",n),xe("load",n);break;case"details":xe("toggle",n);break;case"embed":case"source":case"link":xe("error",n),xe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Be(n,s,z,l,a,null)}return;default:if(Tu(s)){for($ in a)a.hasOwnProperty($)&&(l=a[$],l!==void 0&&uh(n,s,$,l,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(l=a[T],l!=null&&Be(n,s,T,l,a,null))}function fE(n,s,a,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,b=null,T=null,x=null,z=null,$=null;for(B in a){var K=a[B];if(a.hasOwnProperty(B)&&K!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":x=K;default:l.hasOwnProperty(B)||Be(n,s,B,null,l,K)}}for(var I in l){var B=l[I];if(K=a[I],l.hasOwnProperty(I)&&(B!=null||K!=null))switch(I){case"type":m=B;break;case"name":h=B;break;case"checked":z=B;break;case"defaultChecked":$=B;break;case"value":b=B;break;case"defaultValue":T=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(137,s));break;default:B!==K&&Be(n,s,I,B,l,K)}}Su(n,b,T,x,z,$,m,h);return;case"select":B=b=T=I=null;for(m in a)if(x=a[m],a.hasOwnProperty(m)&&x!=null)switch(m){case"value":break;case"multiple":B=x;default:l.hasOwnProperty(m)||Be(n,s,m,null,l,x)}for(h in l)if(m=l[h],x=a[h],l.hasOwnProperty(h)&&(m!=null||x!=null))switch(h){case"value":I=m;break;case"defaultValue":T=m;break;case"multiple":b=m;default:m!==x&&Be(n,s,h,m,l,x)}s=T,a=b,l=B,I!=null?Ei(n,!!a,I,!1):!!l!=!!a&&(s!=null?Ei(n,!!a,s,!0):Ei(n,!!a,a?[]:"",!1));return;case"textarea":B=I=null;for(T in a)if(h=a[T],a.hasOwnProperty(T)&&h!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Be(n,s,T,null,l,h)}for(b in l)if(h=l[b],m=a[b],l.hasOwnProperty(b)&&(h!=null||m!=null))switch(b){case"value":I=h;break;case"defaultValue":B=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==m&&Be(n,s,b,h,l,m)}yp(n,I,B);return;case"option":for(var ae in a)I=a[ae],a.hasOwnProperty(ae)&&I!=null&&!l.hasOwnProperty(ae)&&(ae==="selected"?n.selected=!1:Be(n,s,ae,null,l,I));for(x in l)I=l[x],B=a[x],l.hasOwnProperty(x)&&I!==B&&(I!=null||B!=null)&&(x==="selected"?n.selected=I&&typeof I!="function"&&typeof I!="symbol":Be(n,s,x,I,l,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in a)I=a[pe],a.hasOwnProperty(pe)&&I!=null&&!l.hasOwnProperty(pe)&&Be(n,s,pe,null,l,I);for(z in l)if(I=l[z],B=a[z],l.hasOwnProperty(z)&&I!==B&&(I!=null||B!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,s));break;default:Be(n,s,z,I,l,B)}return;default:if(Tu(s)){for(var He in a)I=a[He],a.hasOwnProperty(He)&&I!==void 0&&!l.hasOwnProperty(He)&&uh(n,s,He,void 0,l,I);for($ in l)I=l[$],B=a[$],!l.hasOwnProperty($)||I===B||I===void 0&&B===void 0||uh(n,s,$,I,l,B);return}}for(var D in a)I=a[D],a.hasOwnProperty(D)&&I!=null&&!l.hasOwnProperty(D)&&Be(n,s,D,null,l,I);for(K in l)I=l[K],B=a[K],!l.hasOwnProperty(K)||I===B||I==null&&B==null||Be(n,s,K,I,l,B)}function _y(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var h=a[l],m=h.transferSize,b=h.initiatorType,T=h.duration;if(m&&T&&_y(b)){for(b=0,T=h.responseEnd,l+=1;l<a.length;l++){var x=a[l],z=x.startTime;if(z>T)break;var $=x.transferSize,K=x.initiatorType;$&&_y(K)&&(x=x.responseEnd,b+=$*(x<T?1:(T-z)/(x-z)))}if(--l,s+=8*(m+b)/(h.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,333 bytes, line 10
10n:5}var dh=null,hh=null;function Xl(n){return n.nodeType===9?n:n.ownerDocument}function Sy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ey(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function fh(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ph=null;function mE(){var n=window.event;return n&&n.type==="popstate"?n===ph?!1:(ph=n,!0):(ph=null,!1)}var Ty=typeof setTimeout=="function"?setTimeout:void 0,gE=typeof clearTimeout=="function"?clearTimeout:void 0,Ry=typeof Promise=="function"?Promise:void 0,yE=typeof queueMicrotask=="function"?queueMicrotask:typeof Ry<"u"?function(n){return Ry.resolve(null).then(n).catch(vE)}:Ty;function vE(n){setTimeout(function(){throw n})}function es(n){return n==="head"}function Ay(n,s){var a=s,l=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(l===0){n.removeChild(h),ta(s);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")so(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,so(a);for(var m=a.firstChild;m;){var b=m.nextSibling,T=m.nodeName;m[Sa]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=b}}else a==="body"&&so(n.ownerDocument.body);a=h}while(a);ta(s)}function xy(n,s){var a=n;n=0;do{var l=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=l}while(a)}function mh(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":mh(a),wu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function bE(n,s,a,l){for(;n.nodeType===1;){var h=a;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[Sa])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=Cn(n.nextSibling),n===null)break}return null}function wE(n,s,a){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Cn(n.nextSibling),n===null))return null;return n}function Oy(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Cn(n.nextSibling),n===null))return null;return n}function gh(n){return n.data==="$?"||n.data==="$~"}function yh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function _E(n,s){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||a.readyState!=="loading")s();else{var l=function(){s(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Cn(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var vh=null;function Cy(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(s===0)return Cn(n.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}n=n.nextSibling}return null}function ky(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return n;s--}else a!=="/$"&&a!=="/&"||s++}n=n.previousSibling}return null}function Ny(n,s,a){switch(s=Xl(a),n){case"html":if(n=s.documentElement,!n)throw Error(i(452));return n;case"head":if(n=s.head,!n)throw Error(i(453));return n;case"body":if(n=s.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function so(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);wu(n)}var kn=new Map,jy=new Set;function Zl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Tr=Y.d;Y.d={f:SE,r:EE,D:TE,C:RE,L:AE,m:xE,X:CE,S:OE,M:kE};function SE(){var n=Tr.f(),s=ql();return n||s}function EE(n){var s=wi(n);s!==null&&s.tag===5&&s.type==="form"?Qm(s):Tr.r(n)}var Zi=typeof document>"u"?null:document;function My(n,s,a){var l=Zi;if(l&&typeof s=="string"&&s){var h=Sn(s);h='link[rel="'+n+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),jy.has(h)||(jy.add(h),n={rel:n,crossOrigin:a,href:s},l.querySelector(h)===null&&(s=l.createElement("link"),Lt(s,"link",n),Rt(s),l.head.appendChild(s)))}}function TE(n){Tr.D(n),My("dns-prefetch",n,null)}function RE(n,s){Tr.C(n,s),My("preconnect",n,s)}function AE(n,s,a){Tr.L(n,s,a);var l=Zi;if(l&&n&&s){var h='link[rel="preload"][as="'+Sn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Sn(a.imageSizes)+'"]')):h+='[href="'+Sn(n)+'"]';var m=h;switch(s){case"style":m=Wi(n);break;case"script":m=ea(n)}kn.has(m)||(n=g({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:n,as:s},a),kn.set(m,n),l.querySelector(h)!==null||s==="style"&&l.querySelector(io(m))||s==="script"&&l.querySelector(ao(m))||(s=l.createElement("link"),Lt(s,"link",n),Rt(s),l.head.appendChild(s)))}}function xE(n,s){Tr.m(n,s);var a=Zi;if(a&&n){var l=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+Sn(l)+'"][href="'+Sn(n)+'"]',m=h;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ea(n)}if(!kn.has(m)&&(n=g({rel:"modulepreload",href:n},s),kn.set(m,n),a.querySelector(h)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ao(m)))return}l=a.createElement("link"),Lt(l,"link",n),Rt(l),a.head.appendChild(l)}}}function OE(n,s,a){Tr.S(n,s,a);var l=Zi;if(l&&n){var h=_i(l).hoistableStyles,m=Wi(n);s=s||"default";var b=h.get(m);if(!b){var T={loading:0,preload:null};if(b=l.querySelector(io(m)))T.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},a),(a=kn.get(m))&&bh(n,a);var x=b=l.createElement("link");Rt(x),Lt(x,"link",n),x._p=new Promise(function(z,$){x.onload=z,x.onerror=$}),x.addEventListener("load",function(){T.loading|=1}),x.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Wl(b,s,l)}b={type:"stylesheet",instance:b,count:1,state:T},h.set(m,b)}}}function CE(n,s){Tr.X(n,s);var a=Zi;if(a&&n){var l=_i(a).hoistableScripts,h=ea(n),m=l.get(h);m||(m=a.querySelector(ao(h)),m||(n=g({src:n,async:!0},s),(s=kn.get(h))&&wh(n,s),m=a.createElement("script"),Rt(m),Lt(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(h,m))}}function kE(n,s){Tr.M(n,s);var a=Zi;if(a&&n){var l=_i(a).hoistableScripts,h=ea(n),m=l.get(h);m||(m=a.querySelector(ao(h)),m||(n=g({src:n,async:!0,type:"module"},s),(s=kn.get(h))&&wh(n,s),m=a.createElement("script"),Rt(m),Lt(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(h,m))}}function Dy(n,s,a,l){var h=(h=se.current)?Zl(h):null;if(!h)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=Wi(a.href),a=_i(h).hoistableStyles,l=a.get(s),l||(l={type:"style",instance:null,count:0,state:null},a.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Wi(a.href);var m=_i(h).hoistableStyles,b=m.get(n);if(b||(h=h.ownerDocument||h,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,b),(m=h.querySelector(io(n)))&&!m._p&&(b.instance=m,b.state.loading=5),kn.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},kn.set(n,a),m||NE(h,n,a,b.state))),s&&l===null)throw Error(i(528,""));return b}if(s&&l!==null)throw Error(i(529,""));return null;
vendor: 5,353 bytes, line 10
10case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ea(a),a=_i(h).hoistableScripts,l=a.get(s),l||(l={type:"script",instance:null,count:0,state:null},a.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Wi(n){return'href="'+Sn(n)+'"'}function io(n){return'link[rel="stylesheet"]['+n+"]"}function Ly(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function NE(n,s,a,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),Lt(s,"link",a),Rt(s),n.head.appendChild(s))}function ea(n){return'[src="'+Sn(n)+'"]'}function ao(n){return"script[async]"+n}function Uy(n,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+Sn(a.href)+'"]');if(l)return s.instance=l,Rt(l),l;var h=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Rt(l),Lt(l,"style",h),Wl(l,a.precedence,n),s.instance=l;case"stylesheet":h=Wi(a.href);var m=n.querySelector(io(h));if(m)return s.state.loading|=4,s.instance=m,Rt(m),m;l=Ly(a),(h=kn.get(h))&&bh(l,h),m=(n.ownerDocument||n).createElement("link"),Rt(m);var b=m;return b._p=new Promise(function(T,x){b.onload=T,b.onerror=x}),Lt(m,"link",l),s.state.loading|=4,Wl(m,a.precedence,n),s.instance=m;case"script":return m=ea(a.src),(h=n.querySelector(ao(m)))?(s.instance=h,Rt(h),h):(l=a,(h=kn.get(m))&&(l=g({},a),wh(l,h)),n=n.ownerDocument||n,h=n.createElement("script"),Rt(h),Lt(h,"link",l),n.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,Wl(l,a.precedence,n));return s.instance}function Wl(n,s,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=l.length?l[l.length-1]:null,m=h,b=0;b<l.length;b++){var T=l[b];if(T.dataset.precedence===s)m=T;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(n,s.firstChild))}function bh(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function wh(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var ec=null;function Py(n,s,a){if(ec===null){var l=new Map,h=ec=new Map;h.set(a,l)}else h=ec,l=h.get(a),l||(l=new Map,h.set(a,l));if(l.has(n))return l;for(l.set(n,null),a=a.getElementsByTagName(n),h=0;h<a.length;h++){var m=a[h];if(!(m[Sa]||m[Nt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(s)||"";b=n+b;var T=l.get(b);T?T.push(m):l.set(b,[m])}}return l}function zy(n,s,a){n=n.ownerDocument||n,n.head.insertBefore(a,s==="title"?n.querySelector("head > title"):null)}function jE(n,s,a){if(a===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Iy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function ME(n,s,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Wi(l.href),m=s.querySelector(io(h));if(m){s=m._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=tc.bind(n),s.then(n,n)),a.state.loading|=4,a.instance=m,Rt(m);return}m=s.ownerDocument||s,l=Ly(l),(h=kn.get(h))&&bh(l,h),m=m.createElement("link"),Rt(m);var b=m;b._p=new Promise(function(T,x){b.onload=T,b.onerror=x}),Lt(m,"link",l),a.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=tc.bind(n),s.addEventListener("load",a),s.addEventListener("error",a))}}var _h=0;function DE(n,s){return n.stylesheets&&n.count===0&&rc(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var l=setTimeout(function(){if(n.stylesheets&&rc(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+s);0<n.imgBytes&&_h===0&&(_h=62500*pE());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&rc(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>_h?50:800)+s);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(h)}}:null}function tc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var nc=null;function rc(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,nc=new Map,s.forEac
vendor: 5,904 bytes, line 10
10h(LE,n),nc=null,tc.call(n))}function LE(n,s){if(!(s.state.loading&4)){var a=nc.get(n);if(a)var l=a.get(null);else{a=new Map,nc.set(n,a);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var b=h[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),l=b)}l&&a.set(null,l)}h=s.instance,b=h.getAttribute("data-precedence"),m=a.get(b)||l,m===l&&a.set(null,h),a.set(b,h),this.count++,l=tc.bind(this),h.addEventListener("load",l),h.addEventListener("error",l),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),s.state.loading|=4}}var oo={$$typeof:O,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function UE(n,s,a,l,h,m,b,T,x){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lr(0),this.hiddenUpdates=Lr(null),this.identifierPrefix=l,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function By(n,s,a,l,h,m,b,T,x,z,$,K){return n=new UE(n,s,a,b,x,z,$,K,T),s=1,m===!0&&(s|=24),m=dn(3,null,null,s),n.current=m,m.stateNode=n,s=ed(),s.refCount++,n.pooledCache=s,s.refCount++,m.memoizedState={element:l,isDehydrated:a,cache:s},sd(m),n}function Hy(n){return n?(n=Ni,n):Ni}function $y(n,s,a,l,h,m){h=Hy(h),l.context===null?l.context=h:l.pendingContext=h,l=qr(s),l.payload={element:a},m=m===void 0?null:m,m!==null&&(l.callback=m),a=Vr(n,l,s),a!==null&&(tn(a,n,s),Ia(a,n,s))}function qy(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<s?a:s}}function Sh(n,s){qy(n,s),(n=n.alternate)&&qy(n,s)}function Vy(n){if(n.tag===13||n.tag===31){var s=zs(n,67108864);s!==null&&tn(s,n,67108864),Sh(n,67108864)}}function Gy(n){if(n.tag===13||n.tag===31){var s=gn();s=yi(s);var a=zs(n,s);a!==null&&tn(a,n,s),Sh(n,s)}}var sc=!0;function PE(n,s,a,l){var h=L.T;L.T=null;var m=Y.p;try{Y.p=2,Eh(n,s,a,l)}finally{Y.p=m,L.T=h}}function zE(n,s,a,l){var h=L.T;L.T=null;var m=Y.p;try{Y.p=8,Eh(n,s,a,l)}finally{Y.p=m,L.T=h}}function Eh(n,s,a,l){if(sc){var h=Th(l);if(h===null)ch(n,s,l,ic,a),Ky(n,l);else if(BE(h,n,s,a,l))l.stopPropagation();else if(Ky(n,l),s&4&&-1<IE.indexOf(n)){for(;h!==null;){var m=wi(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Fn(m.pendingLanes);if(b!==0){var T=m;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var x=1<<31-zt(b);T.entanglements[1]|=x,b&=~x}Jn(m),(De&6)===0&&(Hl=Et()+500,to(0))}}break;case 31:case 13:T=zs(m,2),T!==null&&tn(T,m,2),ql(),Sh(m,2)}if(m=Th(l),m===null&&ch(n,s,l,ic,a),m===h)break;h=m}h!==null&&l.stopPropagation()}else ch(n,s,l,null,a)}}function Th(n){return n=Au(n),Rh(n)}var ic=null;function Rh(n){if(ic=null,n=bi(n),n!==null){var s=c(n);if(s===null)n=null;else{var a=s.tag;if(a===13){if(n=u(s),n!==null)return n;n=null}else if(a===31){if(n=d(s),n!==null)return n;n=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return ic=n,null}function Fy(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ze()){case tt:return 2;case wn:return 8;case ir:case wa:return 32;case ar:return 268435456;default:return 32}default:return 32}}var Ah=!1,ts=null,ns=null,rs=null,lo=new Map,co=new Map,ss=[],IE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ky(n,s){switch(n){case"focusin":case"focusout":ts=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":lo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":co.delete(s.pointerId)}}function uo(n,s,a,l,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:s,domEventName:a,eventSystemFlags:l,nativeEvent:m,targetContainers:[h]},s!==null&&(s=wi(s),s!==null&&Vy(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),n)}function BE(n,s,a,l,h){switch(s){case"focusin":return ts=uo(ts,n,s,a,l,h),!0;case"dragenter":return ns=uo(ns,n,s,a,l,h),!0;case"mouseover":return rs=uo(rs,n,s,a,l,h),!0;case"pointerover":var m=h.pointerId;
10return lo.set(m,uo(lo.get(m)||null,n,s,a,l,h)),!0;case"gotpointercapture":return m=h.pointerId,co.set(m,uo(co.get(m)||null,n,s,a,l,h)),!0}return!1}function Yy(n){var s=bi(n.target);if(s!==null){var a=c(s);if(a!==null){if(s=a.tag,s===13){if(s=u(a),s!==null){n.blockedOn=s,lp(n.priority,function(){Gy(a)});return}}else if(s===31){if(s=d(a),s!==null){n.blockedOn=s,lp(n.priority,function(){Gy(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ac(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var a=Th(n.nativeEvent);if(a===null){a=n.nativeEvent;var l=new a.constructor(a.type,a);Ru=l,a.target.dispatchEvent(l),Ru=null}else return s=wi(a),s!==null&&Vy(s),n.blockedOn=a,!1;s.shift()}return!0}function Qy(n,s,a){ac(n)&&a.delete(s)}function HE(){Ah=!1,ts!==null&&ac(ts)&&(ts=null),ns!==null&&ac(ns)&&(ns=null),rs!==null&&ac(rs)&&(rs=null),lo.forEach(Qy),co.forEach(Qy)}function oc(n,s){n.blockedOn===s&&(n.blockedOn=null,Ah||(Ah=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,HE)))}var lc=null;function Jy(n){lc!==n&&(lc=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){lc===n&&(lc=null);for(var s=0;s<n.length;s+=3){var a=n[s],l=n[s+1],h=n[s+2];if(typeof l!="function"){if(Rh(l||a)===null)continue;break}var m=wi(a);m!==null&&(n.splice(s,3),s-=3,Td(m,{pending:!0,data:h,method:a.method,action:l},l,h))}}))}function ta(n){function s(x){return oc(x,n)}ts!==null&&oc(ts,n),ns!==null&&oc(ns,n),rs!==null&&oc(rs,n),lo.forEach(s),co.forEach(s);for(var a=0;a<ss.length;a++){var l=ss[a];l.blockedOn===n&&(l.blockedOn=null)}for(;0<ss.length&&(a=ss[0],a.blockedOn===null);)Yy(a),a.blockedOn===null&&ss.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var h=a[l],m=a[l+1],b=h[Qt]||null;if(typeof m=="function")b||Jy(a);else if(b){var T=null;if(m&&m.hasAttribute("formAction")){if(h=m,b=m[Qt]||null)T=b.formAction;else if(Rh(h)!==null)continue}else T=b.action;typeof T=="function"?a[l+1]=T:(a.splice(l,3),l-=3),Jy(a)}}}function Xy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return h=b})},focusReset:"manual",scroll:"manual"})}function s(){h!==null&&(h(),h=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),h!==null&&(h(),h=null)}}}function xh(n){this._internalRoot=n}cc.prototype.render=xh.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(i(409));var a=s.current,l=gn();$y(a,l,n,s,null,null)},cc.prototype.unmount=xh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;$y(n.current,2,null,n,null,null),ql(),s[vi]=null}};function cc(n){this._internalRoot=n}cc.prototype.unstable_scheduleHydration=function(n){if(n){var s=vu();n={blockedOn:null,target:n,priority:s};for(var a=0;a<ss.length&&s!==0&&s<ss[a].priority;a++);ss.splice(a,0,n),a===0&&Yy(n)}};var Zy=e.version;if(Zy!=="19.2.5")throw Error(i(527,Zy,"19.2.5"));Y.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=p(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var $E={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Ns=uc.inject($E),$t=uc}catch{}}return fo.createRoot=function(n,s){if(!o(n))throw Error(i(299));var a=!1,l="",h=ig,m=ag,b=og;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(m=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=By(n,1,!1,null,null,a,l,null,h,m,b,Xy),n[vi]=s.current,lh(n),new xh(s)},fo.hydrateRoot=function(n,s,a){if(!o(n))throw Error(i(299));var l=!1,h="",m=ig,b=ag,T=og,x=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(x=a.formState)),s=By(n,1,!0,s,a??null,l,h,x,m,b,T,Xy),s.context=Hy(null),a=s.current,l=gn(),l=yi(l),h=qr(l),h.callback=null,Vr(a,h,l),a=l,s.current.lanes=a,et(s,a),Jn(s),n[vi]=s.current,lh(n),new cc(s)},fo.version="19.2.5",fo}var lv;function WE(){if(lv)return kh.exports;lv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),kh.exports=ZE(),kh.exports}var eT=WE(),tT="__TSS_CONTEXT",lf=Symbol.for("TSS_SERVER_FUNCTION"),AL=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),nT="application/x-tss-framed",Rr={JSON:0,CHUNK:1,END:2,ERROR:3},rT=/;\s*v=(\d+)/;function sT(t){const e=t.match(rT);return e?parseInt(e[1],10):void 0}function iT(t){const e=sT(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var pb=()=>window.__TSS_START_OPTIONS__,mb=!1;function jo(t){return t[t.length-1]}function aT(t){return typeof t=="function"}function ys(t,e){return aT(t)?t(e):t}var oT=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,lT=()=>Object.create(null),Xs=(t,e)=>vs(t,e,lT);function vs(t,e,r=()=>({}),i=0){if(t===e)return t;if(i>500)return e;const o=e,c=hv(t)&&hv(o);if(!c&&!(ya(t)&&ya(o)))return o;const u=c?t:uv(t);if(!u)return o;const d=c?o:uv(o);if(!d)return o;const f=u.length,p=d.length,y=c?new Array(p):r();let g=0;for(let v=0;v<p;v++){const w=c?v:d[v],_=t[w],R=o[w];if(_===R){y[w]=_,(c?v<f:oT.call(t,w))&&g++;continue}if(_===null||R===null||typeof _!="object"||typeof R!="object"){y[w]=R;continue}const S=vs(_,R,r,i+1);y[w]=S,S===_&&g++}return f===p&&g===f?t:y}function uv(t){const e=Object.getOwnPropertyNames(t);for(const o of e)if(!cv.call(t,o))return!1;const r=Object.getOwnPropertySymbols(t);if(r.length===0)return e;const i=e;for(const o of r){if(!cv.call(t,o))return!1;i.push(o)}return i}function ya(t){if(!dv(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!dv(r)||!r.hasOwnProperty("isPrototypeOf"))}function dv(t){return Object.prototype.toString.call(t)==="[object Object]"}function hv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function an(t,e,r){if(t===e)return!0;
10if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0,o=t.length;i<o;i++)if(!an(t[i],e[i],r))return!1;return!0}if(ya(t)&&ya(e)){const i=r?.ignoreUndefined??!0;if(r?.partial){for(const u in e)if((!i||e[u]!==void 0)&&!an(t[u],e[u],r))return!1;return!0}let o=0;if(!i)o=Object.keys(t).length;else for(const u in t)t[u]!==void 0&&o++;let c=0;for(const u in e)if((!i||e[u]!==void 0)&&(c++,c>o||!an(t[u],e[u],r)))return!1;return o===c}return!1}function ui(t){let e,r;const i=new Promise((o,c)=>{e=o,r=c});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,e(o),t?.(o)},i.reject=o=>{i.status="rejected",r(o)},i}function cT(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function Mo(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function uT(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function fv(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return uT(e)}var dT=["http:","https:","mailto:","tel:"];function zc(t,e){if(!t)return!1;try{const r=new URL(t);return!e.has(r.protocol)}catch{return!1}}var hT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},fT=/[&><\u2028\u2029]/g;function pT(t){return t.replace(fT,e=>hT[e])}function po(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let r=0,i="",o;for(;(o=e.exec(t))!==null;)i+=fv(t.slice(r,o.index))+o[0],r=e.lastIndex;i=i+fv(r?t.slice(r):t);let c=!1;return i.startsWith("//")&&(c=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:c}}function mT(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function gT(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function ln(){throw new Error("Invariant failed")}function Do(t){const e=new Map;let r,i;const o=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,i&&(i.next=c,c.prev=i)):(c.next.prev=void 0,r=c.next,c.next=void 0,i&&(c.prev=i,i.next=c)),i=c)};return{get(c){const u=e.get(c);if(u)return o(u),u.value},set(c,u){if(e.size>=t&&r){const f=r;e.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===i&&(i=void 0)}const d=e.get(c);if(d)d.value=u,o(d);else{const f={key:c,value:u,prev:i};i&&(i.next=f),i=f,r||(r=f),e.set(c,f)}},clear(){e.clear(),r=void 0,i=void 0}}}var bs=4,gb=5;function yT(t){const e=t.indexOf("{");if(e===-1)return null;const r=t.indexOf("}",e);return r===-1||e+1>=t.length?null:[e,r]}function zf(t,e,r=new Uint16Array(6)){const i=t.indexOf("/",e),o=i===-1?t.length:i,c=t.substring(e,o);if(!c||!c.includes("$"))return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r;if(c==="$"){const d=t.length;return r[0]=2,r[1]=e,r[2]=e,r[3]=d,r[4]=d,r[5]=d,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=e,r[2]=e+1,r[3]=o,r[4]=o,r[5]=o,r;const u=yT(c);if(u){const[d,f]=u,p=c.charCodeAt(d+1);if(p===45){if(d+2<c.length&&c.charCodeAt(d+2)===36){const y=d+3,g=f;if(y<g)return r[0]=3,r[1]=e+d,r[2]=e+y,r[3]=e+g,r[4]=e+f+1,r[5]=o,r}}else if(p===36){const y=d+1,g=d+2;return g===f?(r[0]=2,r[1]=e+d,r[2]=e+y,r[3]=e+g,r[4]=e+f+1,r[5]=t.length,r):(r[0]=1,r[1]=e+d,r[2]=e+g,r[3]=e+f,r[4]=e+f+1,r[5]=o,r)}}return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r}function iu(t,e,r,i,o,c,u){u?.(r);let d=i;{const f=r.fullPath??r.from,p=f.length,y=r.options?.caseSensitive??t,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;d<p;){const w=zf(f,d,e);let _;const R=d,S=w[5];switch(d=S+1,c++,w[0]){case 0:{const E=f.substring(w[2],w[3]);if(y){const A=o.static?.get(E);if(A)_=A;else{o.static??=new Map;const O=ri(r.fullPath??r.from);O.parent=o,O.depth=c,_=O,o.static.set(E,O)}}else{const A=E.toLowerCase(),O=o.staticInsensitive?.get(A);if(O)_=O;else{o.staticInsensitive??=new Map;const j=ri(r.fullPath??r.from);j.parent=o,j.depth=c,_=j,o.staticInsensitive.set(A,j)}}break}case 1:{const E=f.substring(R,w[1]),A=f.substring(w[4],S),O=y&&!!(E||A),j=E?O?E:E.toLowerCase():void 0,q=A?O?A:A.toLowerCase():void 0,H=!g&&o.dynamic?.find(P=>!P.skipOnParamError&&P.caseSensitive===O&&P.prefix===j&&P.suffix===q);if(H)_=H;else{const P=Lh(1,r.fullPath??r.from,O,j,q);_=P,P.depth=c,P.parent=o,o.dynamic??=[],o.dynamic.push(P)}break}case 3:{const E=f.substring(R,w[1]),A=f.substring(w[4],S),O=y&&!!(E||A),j=E?O?E:E.toLowerCase():void 0,q=A?O?A:A.toLowerCase():void 0,H=!g&&o.optional?.find(P=>!P.skipOnParamError&&P.caseSensitive===O&&P.prefix===j&&P.suffix===q);if(H)_=H;else{const P=Lh(3,r.fullPath??r.from,O,j,q);
10_=P,P.parent=o,P.depth=c,o.optional??=[],o.optional.push(P)}break}case 2:{const E=f.substring(R,w[1]),A=f.substring(w[4],S),O=y&&!!(E||A),j=E?O?E:E.toLowerCase():void 0,q=A?O?A:A.toLowerCase():void 0,H=Lh(2,r.fullPath??r.from,O,j,q);_=H,H.parent=o,H.depth=c,o.wildcard??=[],o.wildcard.push(H)}}o=_}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=ri(r.fullPath??r.from);w.kind=gb,w.parent=o,c++,w.depth=c,o.pathless??=[],o.pathless.push(w),o=w}const v=(r.path||!r.children)&&!r.isRoot;if(v&&f.endsWith("/")){const w=ri(r.fullPath??r.from);w.kind=bs,w.parent=o,c++,w.depth=c,o.index=w,o=w}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,v&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const f of r.children)iu(t,e,f,d,o,c,u)}function Dh(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ds(t){if(t.pathless)for(const e of t.pathless)ds(e);if(t.static)for(const e of t.static.values())ds(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ds(e);if(t.dynamic?.length){t.dynamic.sort(Dh);for(const e of t.dynamic)ds(e)}if(t.optional?.length){t.optional.sort(Dh);for(const e of t.optional)ds(e)}if(t.wildcard?.length){t.wildcard.sort(Dh);for(const e of t.wildcard)ds(e)}}function ri(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Lh(t,e,r,i,o){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:i,suffix:o}}function vT(t,e){const r=ri("/"),i=new Uint16Array(6);for(const o of t)iu(!1,i,o,1,r,0);ds(r),e.masksTree=r,e.flatCache=Do(1e3)}function bT(t,e){t||="/";const r=e.flatCache.get(t);if(r)return r;const i=If(t,e.masksTree);return e.flatCache.set(t,i),i}function wT(t,e,r,i,o){t||="/",i||="/";const c=e?`case\0${t}`:t;let u=o.singleCache.get(c);return u||(u=ri("/"),iu(e,new Uint16Array(6),{from:t},1,u,0),o.singleCache.set(c,u)),If(i,u,r)}function _T(t,e,r=!1){const i=r?t:`nofuzz\0${t}`,o=e.matchCache.get(i);if(o!==void 0)return o;t||="/";let c;try{c=If(t,e.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=TT(c.route)),e.matchCache.set(i,c),c}function ST(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function ET(t,e=!1,r){const i=ri(t.fullPath),o=new Uint16Array(6),c={},u={};let d=0;return iu(e,o,t,1,i,0,f=>{if(r?.(f,d),f.id in c&&ln(),c[f.id]=f,d!==0&&f.path){const p=ST(f.fullPath);(!u[p]||f.fullPath.endsWith("/"))&&(u[p]=f)}d++}),ds(i),{processedTree:{segmentTree:i,singleCache:Do(1e3),matchCache:Do(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function If(t,e,r=!1){const i=t.split("/"),o=AT(t,i,e,r);if(!o)return null;const[c]=yb(t,i,o);return{route:o.node.route,rawParams:c,parsedParams:o.parsedParams}}function yb(t,e,r){const i=RT(r.node);let o=null;const c=Object.create(null);let u=r.extract?.part??0,d=r.extract?.node??0,f=r.extract?.path??0,p=r.extract?.segment??0;for(;d<i.length;u++,d++,f++,p++){const y=i[d];if(y.kind===bs)break;if(y.kind===gb){p--,u--,f--;continue}const g=e[u],v=f;if(g&&(f+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const w=o[p],_=y.prefix?.length??0;if(w.charCodeAt(_)===123){const R=y.suffix?.length??0,S=w.substring(_+2,w.length-R-1),E=g.substring(_,g.length-R);c[S]=decodeURIComponent(E)}else{const R=w.substring(1);c[R]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<d){u--,f=v-1;continue}o??=r.node.fullPath.split("/");const w=o[p],_=y.prefix?.length??0,R=y.suffix?.length??0,S=w.substring(_+3,w.length-R-1),E=y.suffix||y.prefix?g.substring(_,g.length-R):g;E&&(c[S]=decodeURIComponent(E))}else if(y.kind===2){const w=y,_=t.substring(v+(w.prefix?.length??0),t.length-(w.suffix?.length??0)),R=decodeURIComponent(_);c["*"]=R,c._splat=R;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:d,path:f,segment:p}]}function TT(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function RT(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function AT(t,e,r,i){if(t==="/"&&r.index)return{node:r.index,skipped:0};const o=!jo(e),c=o&&t!=="/",u=e.length-(o?1:0),d=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let f=null,p=null;for(;d.length;){const y=d.pop(),{node:g,index:v,skipped:w,depth:_,statics:R,dynamics:S,optionals:E}=y;let{extract:A,rawParams:O,parsedParams:j}=y;if(g.kind===2&&g.route&&!hc(p,y))continue;if(g.skipOnParamError){if(!pv(t,e,y))continue;O=y.rawParams,A=y.extract,j=y.parsedParams}i&&g.route&&g.kind!==bs&&hc(f,y)&&(f=y);const q=v===u;if(q&&(g.route&&(!c||g.kind===bs||g.kind===2)&&hc(p,y)&&(p=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const H=q?void 0:e[v];let P;if(q&&g.index){const M={node:g.index,index:v,skipped:w,depth:_+1,statics:R,dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j};let Q=!0;if(g.index.skipOnParamError&&(pv(t,e,M)||(Q=!1)),Q){if(!S&&!E&&!w&&xT(R,u))return M;hc(p,M)&&(p=M)}}if(g.wildcard)for(let M=g.wildcard.length-1;M>=0;M--){const Q=g.wildcard[M],{prefix:re,suffix:ne}=Q;if(!(re&&(q||!(Q.caseSensitive?H:P??=H.toLowerCase()).startsWith(re)))){if(ne){if(q)continue;const fe=e.slice(v).join("/").slice(-ne.length);if((Q.caseSensitive?fe:fe.toLowerCase())!==ne)continue}d.push({node:Q,index:u,skipped:w,depth:_+1,statics:R,dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j})}}if(g.optional){const M=w|1<<_,Q=_+1;for(let re=g.optional.length-1;re>=0;re--){const ne=g.optional[re];d.push({node:ne,index:v,skipped:M,depth:Q,statics:R,dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j})}if(!q)for(let re=g.optional.length-1;re>=0;re--){const ne=g.optional[re],{prefix:fe,suffix:ye}=ne;if(fe||ye){const Le=ne.caseSensitive?H:P??=H.toLowerCase();if(fe&&!Le.startsWith(fe)||ye&&!Le.endsWith(ye))continue}d.push({node:ne,index:v+1,skipped:w,depth:Q,statics:R,dynamics:S,optionals:E+dc(u,v),extract:A,rawParams:O,parsedParams:j})}}if(!q&&g.dynamic&&H)for(let M=g.dynamic.length-1;M>=0;M--){const Q=g.dynamic[M],{prefix:re,suffix:ne}=Q;if(re||ne){const fe=Q.caseSensitive?H:P??=H.toLowerCase();if(re&&!fe.startsWith(re)||ne&&!fe.endsWith(ne))continue}d.push({node:Q,index:v+1,skipped:w,depth:_+1,statics:R,dynamics:S+dc(u,v),optionals:E,extract:A,rawParams:O,parsedParams:j})}if(!q&&g.staticInsensitive){const M=g.staticInsensitive.get(P??=H.toLowerCase());M&&d.push({node:M,index:v+1,skipped:w,depth:_+1,statics:R+dc(u,v),dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j})}if(!q&&g.static){const M=g.static.get(H);M&&d.push({node:M,index:v+1,skipped:w,depth:_+1,statics:R+dc(u,v),dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j})}if(g.pathless){const M=_+1;for(let Q=g.pathless.length-1;Q>=0;Q--){const re=g.pathless[Q];d.push({node:re,index:v,skipped:w,depth:M,statics:R,dynamics:S,optionals:E,extract:A,rawParams:O,parsedParams:j})}}}if(p)return p;if(i&&f){let y=f.index;for(let v=0;v<f.index;v++)y+=e[v].length;const g=y===t.length?"/":t.slice(y);return f.rawParams??=Object.create(null),f.rawParams["**"]=decodeURIComponent(g),f}return null}function dc(t,e){return 2**(t-e-1)}function xT(t,e){return t===2**(e-1)-1}function pv(t,e,r){try{const[i,o]=yb(t,e,r);r.rawParams=i,r.extract=o;const c=r.node.parse(i);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,c),!0}catch{return null}}function hc(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===bs)>(t.node.kind===bs)||e.node.kind===bs==(t.node.kind===bs)&&e.depth>t.depth))):!0}function Nc(t){return Bf(t.filter(e=>e!==void 0).join("/"))}function Bf(t){return t.replace(/\/{2,}/g,"/")}function vb(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function _s(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function bb(t){return _s(vb(t))}function Ic(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function OT(t,e,r){return Ic(t,r)===Ic(e,r)}
10function CT({base:t,to:e,trailingSlash:r="never",cache:i}){const o=e.startsWith("/"),c=!o&&e===".";let u;if(i){u=o?e:c?t:t+"\0"+e;const g=i.get(u);if(g)return g}let d;if(c)d=t.split("/");else if(o)d=e.split("/");else{for(d=t.split("/");d.length>1&&jo(d)==="";)d.pop();const g=e.split("/");for(let v=0,w=g.length;v<w;v++){const _=g[v];_===""?v?v===w-1&&d.push(_):d=[_]:_===".."?d.pop():_==="."||d.push(_)}}d.length>1&&(jo(d)===""?r==="never"&&d.pop():r==="always"&&d.push(""));let f,p="";for(let g=0;g<d.length;g++){g>0&&(p+="/");const v=d[g];if(!v)continue;f=zf(v,0,f);const w=f[0];if(w===0){p+=v;continue}const _=f[5],R=v.substring(0,f[1]),S=v.substring(f[4],_),E=v.substring(f[2],f[3]);w===1?p+=R||S?`${R}{$${E}}${S}`:`$${E}`:w===2?p+=R||S?`${R}{$}${S}`:"$":p+=`${R}{-$${E}}${S}`}p=Bf(p);const y=p||"/";return u&&i&&i.set(u,y),y}function kT(t){const e=new Map(t.map(o=>[encodeURIComponent(o),o])),r=Array.from(e.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(r,"g");return o=>o.replace(i,c=>e.get(c)??c)}function Uh(t,e,r){const i=e[t];return typeof i!="string"?i:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(o=>gv(o,r)).join("/"):gv(i,r)}function mv({path:t,params:e,decoder:r,...i}){let o=!1;const c=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:c,isMissingParams:o};const u=t.length;let d=0,f,p="";for(;d<u;){const y=d;f=zf(t,y,f);const g=f[5];if(d=g+1,y===g)continue;const v=f[0];if(v===0){p+="/"+t.substring(y,g);continue}if(v===2){const w=e._splat;c._splat=w,c["*"]=w;const _=t.substring(y,f[1]),R=t.substring(f[4],g);if(!w){o=!0,(_||R)&&(p+="/"+_+R);continue}const S=Uh("_splat",e,r);p+="/"+_+S+R;continue}if(v===1){const w=t.substring(f[2],f[3]);!o&&!(w in e)&&(o=!0),c[w]=e[w];const _=t.substring(y,f[1]),R=t.substring(f[4],g),S=Uh(w,e,r)??"undefined";p+="/"+_+S+R;continue}if(v===3){const w=t.substring(f[2],f[3]),_=e[w];if(_==null)continue;c[w]=_;const R=t.substring(y,f[1]),S=t.substring(f[4],g),E=Uh(w,e,r)??"";p+="/"+R+E+S;continue}}return t.endsWith("/")&&(p+="/"),{usedParams:c,interpolatedPath:p||"/",isMissingParams:o}}function gv(t,e){const r=encodeURIComponent(t);return e?.(r)??r}function NT(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function Ot(t){return t?.isNotFound===!0}function jT(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var MT="tsr-scroll-restoration-v1_3";function DT(){const t=jT();if(!t)return null;let e={};try{const i=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");ya(i)&&(e=i)}catch{}return{get state(){return e},set:i=>{e=ys(i,e)||e},persist:()=>{try{t.setItem(MT,JSON.stringify(e))}catch{}}}}var yv=DT(),LT=t=>t.state.__TSR_key||t.href;function UT(t){const e=[];let r;for(;r=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,t)+1})`),t=r;return`${e.reverse().join(" > ")}`.toLowerCase()}var fc=!1,mo="window",vv="data-scroll-restoration-id";function PT(t,e){if(!yv)return;const r=yv;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!r)return;t.isScrollRestorationSetup=!0,fc=!1;const i=t.options.getScrollRestorationKey||LT,o=new Map;window.history.scrollRestoration="manual";const c=d=>{if(!(fc||!t.isScrollRestoring))if(d.target===document||d.target===window)o.set(mo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=d.target;o.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},u=d=>{if(!t.isScrollRestoring||!d||o.size===0||!r)return;const f=r.state[d]||={};for(const[p,y]of o){let g;if(p===mo)g=mo;else if(p.isConnected){const v=p.getAttribute(vv);g=v?`[${vv}="${v}"]`:UT(p)}g&&(f[g]=y)}};document.addEventListener("scroll",c,!0),t.subscribe("onBeforeLoad",d=>{u(d.fromLocation?i(d.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(i(t.stores.resolvedLocation.get()??t.stores.location.get())),r.persist()}),t.subscribe("onRendered",d=>{const f=i(d.toLocation),p=t.options.scrollRestorationBehavior,y=t.options.scrollToTopSelectors;if(o.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){fc=!0;try{const g=t.isScrollRestoring?r.state[f]:void 0;let v=!1;if(g)for(const w in g){const _=g[w];if(!ya(_))continue;const{scrollX:R,scrollY:S}=_;if(!(!Number.isFinite(R)||!Number.isFinite(S))){if(w===mo)window.scrollTo({top:S,left:R,behavior:p}),v=!0;else if(w){let E;try{E=document.querySelector(w)}catch{continue}E&&(E.scrollLeft=R,E.scrollTop=S,v=!0)}}}if(!v){const w=t.history.location.hash.slice(1);if(w){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const R=document.getElementById(w);R&&R.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:p};if(window.scrollTo(_),y)for(const R of y){if(R===mo)continue;const S=typeof R=="function"?R():document.querySelector(R);S&&S.scrollTo(_)}}}}finally{fc=!1}t.isScrollRestoring&&r.set(g=>(g[f]||={},g))}})}
10function wb(t,e=String){const r=new URLSearchParams;for(const i in t){const o=t[i];o!==void 0&&r.set(i,e(o))}return r.toString()}function Ph(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function zT(t){const e=new URLSearchParams(t),r=Object.create(null);for(const[i,o]of e.entries()){const c=r[i];c==null?r[i]=Ph(o):Array.isArray(c)?c.push(Ph(o)):r[i]=[c,Ph(o)]}return r}var IT=HT(JSON.parse),BT=$T(JSON.stringify,JSON.parse);function HT(t){return e=>{e[0]==="?"&&(e=e.substring(1));const r=zT(e);for(const i in r){const o=r[i];if(typeof o=="string")try{r[i]=t(o)}catch{}}return r}}function $T(t,e){const r=typeof e=="function";function i(o){if(typeof o=="object"&&o!==null)try{return t(o)}catch{}else if(r&&typeof o=="string")try{return e(o),t(o)}catch{}return o}return o=>{const c=wb(o,i);return c?`?${c}`:""}}var li="__root__";function au(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const r=new Response(null,{status:t.statusCode,headers:e});if(r.options=t,t.throw)throw r;return r}function on(t){return t instanceof Response&&!!t.options}function qT(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return au(t)}function VT(t){return{input:({url:e})=>{for(const r of t)e=cf(r,e);return e},output:({url:e})=>{for(let r=t.length-1;r>=0;r--)e=_b(t[r],e);return e}}}function GT(t){const e=bb(t.basepath),r=`/${e}`,i=`${r}/`,o=t.caseSensitive?r:r.toLowerCase(),c=t.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const d=t.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=Nc(["/",e,u.pathname]),u)}}function cf(t,e){const r=t?.input?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function _b(t,e){const r=t?.output?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function FT(t,e){const{createMutableStore:r,createReadonlyStore:i,batch:o,init:c}=e,u=new Map,d=new Map,f=new Map,p=r(t.status),y=r(t.loadedAt),g=r(t.isLoading),v=r(t.isTransitioning),w=r(t.location),_=r(t.resolvedLocation),R=r(t.statusCode),S=r(t.redirect),E=r([]),A=r([]),O=r([]),j=i(()=>zh(u,E.get())),q=i(()=>zh(d,A.get())),H=i(()=>zh(f,O.get())),P=i(()=>E.get()[0]),M=i(()=>E.get().some(Y=>u.get(Y)?.get().status==="pending")),Q=i(()=>({locationHref:w.get().href,resolvedLocationHref:_.get()?.href,status:p.get()})),re=i(()=>({status:p.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:v.get(),matches:j.get(),location:w.get(),resolvedLocation:_.get(),statusCode:R.get(),redirect:S.get()})),ne=Do(64);function fe(Y){let ie=ne.get(Y);return ie||(ie=i(()=>{const _e=E.get();for(const W of _e){const C=u.get(W);if(C&&C.routeId===Y)return C.get()}}),ne.set(Y,ie)),ie}const ye={status:p,loadedAt:y,isLoading:g,isTransitioning:v,location:w,resolvedLocation:_,statusCode:R,redirect:S,matchesId:E,pendingIds:A,cachedIds:O,matches:j,pendingMatches:q,cachedMatches:H,firstId:P,hasPending:M,matchRouteDeps:Q,matchStores:u,pendingMatchStores:d,cachedMatchStores:f,__store:re,getRouteMatchStore:fe,setMatches:Le,setPending:Re,setCached:L};Le(t.matches),c?.(ye);function Le(Y){Ih(Y,u,E,r,o)}function Re(Y){Ih(Y,d,A,r,o)}function L(Y){Ih(Y,f,O,r,o)}return ye}function zh(t,e){const r=[];for(const i of e){const o=t.get(i);o&&r.push(o.get())}return r}function Ih(t,e,r,i,o){const c=t.map(d=>d.id),u=new Set(c);o(()=>{for(const d of e.keys())u.has(d)||e.delete(d);for(const d of t){const f=e.get(d.id);if(!f){const p=i(d);p.routeId=d.routeId,e.set(d.id,p);continue}f.routeId=d.routeId,f.get()!==d&&f.set(d)}gT(r.get(),c)||r.set(c)})}var uf=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},KT=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ou=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),ci=(t,e,r=!0)=>{const i={...t.router.options.context??{}},o=r?e:e-1;for(let c=0;c<=o;c++){const u=t.matches[c];if(!u)continue;const d=t.router.getMatch(u.id);
10d&&Object.assign(i,d.__routeContext,d.__beforeLoadContext)}return i},bv=(t,e)=>{if(!t.matches.length)return;const r=e.routeId,i=t.matches.findIndex(u=>u.routeId===t.router.routeTree.id),o=i>=0?i:0;let c=r?t.matches.findIndex(u=>u.routeId===r):t.firstBadMatchIndex??t.matches.length-1;c<0&&(c=o);for(let u=c;u>=0;u--){const d=t.matches[u];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return u}return r?c:o},ws=(t,e,r)=>{if(!(!on(r)&&!Ot(r)))throw on(r)&&r.redirectHandled&&!r.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=r,t.updateMatch(e.id,i=>({...i,status:on(r)?"redirected":Ot(r)?"notFound":i.status==="pending"?"success":i.status,context:ci(t,e.index),isFetching:!1,error:r})),Ot(r)&&!r.routeId&&(r.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),on(r)&&(t.rendered=!0,r.options._fromLocation=t.location,r.redirectHandled=!0,r=t.router.resolveRedirect(r))),r},Sb=(t,e)=>{const r=t.router.getMatch(e);return!!(!r||r._nonReactive.dehydrated)},wv=(t,e,r)=>{const i=ci(t,r);t.updateMatch(e,o=>({...o,context:i}))},go=(t,e,r,i)=>{const{id:o,routeId:c}=t.matches[e],u=t.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=i,t.firstBadMatchIndex??=e,ws(t,t.router.getMatch(o),r);try{u.options.onError?.(r)}catch(d){r=d,ws(t,t.router.getMatch(o),r)}t.updateMatch(o,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!on(r)&&!Ot(r)&&(t.serialError??=r)},Eb=(t,e,r,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ou(t,e)&&(r.options.loader||r.options.beforeLoad||Rb(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??t.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{uf(t)},o);i._nonReactive.pendingTimeout=c}},YT=(t,e,r)=>{const i=t.router.getMatch(e);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;Eb(t,e,r,i);const o=()=>{const c=t.router.getMatch(e);c.preload&&(c.status==="redirected"||c.status==="notFound")&&ws(t,c,c.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(o):o()},QT=(t,e,r,i)=>{const o=t.router.getMatch(e);let c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=ui(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:d}=o;u&&go(t,r,u,"PARSE_PARAMS"),d&&go(t,r,d,"VALIDATE_SEARCH"),Eb(t,e,i,o);const f=new AbortController;let p=!1;const y=()=>{p||(p=!0,t.updateMatch(e,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:f})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,j=>({...j,isFetching:!1}))};if(!i.options.beforeLoad){t.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=ui();const v={...ci(t,r,!1),...o.__routeContext},{search:w,params:_,cause:R}=o,S=ou(t,e),E={search:w,abortController:f,params:_,preload:S,context:v,location:t.location,navigate:j=>t.router.navigate({...j,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:S?"preload":R,matches:t.matches,routeId:i.id,...t.router.options.additionalContext},A=j=>{if(j===void 0){t.router.batch(()=>{y(),g()});return}(on(j)||Ot(j))&&(y(),go(t,r,j,"BEFORE_LOAD")),t.router.batch(()=>{y(),t.updateMatch(e,q=>({...q,__beforeLoadContext:j})),g()})};let O;try{if(O=i.options.beforeLoad(E),Mo(O))return y(),O.catch(j=>{go(t,r,j,"BEFORE_LOAD")}).then(A)}catch(j){y(),go(t,r,j,"BEFORE_LOAD")}A(O)},JT=(t,e)=>{const{id:r,routeId:i}=t.matches[e],o=t.router.looseRoutesById[i],c=()=>d(),u=()=>QT(t,r,e,o),d=()=>{if(Sb(t,r))return;const f=YT(t,r,o);return Mo(f)?f.then(u):u()};return c()},XT=(t,e,r)=>{const i=t.router.getMatch(e);if(!i||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:t.router.options.ssr,matches:t.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([c,u,d])=>({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:d,scripts:u,styles:c?.styles}))},Tb=(t,e,r,i,o)=>{const c=e[i-1],{params:u,loaderDeps:d,abortController:f,cause:p}=t.router.getMatch(r),y=ci(t,i),g=ou(t,r);return{params:u,deps:d,preload:!!g,parentMatchPromise:c,abortController:f,context:y,location:t.location,navigate:v=>t.router.navigate({...v,_fromLocation:t.location}),cause:g?"preload":p,route:o,...t.router.options.additionalContext}},_v=async(t,e,r,i,o)=>{try{const c=t.router.getMatch(r);try{(!(mb??t.router.isServer)||c.ssr===!0)&&Lo(o);
10const u=o.options.loader,d=typeof u=="function"?u:u?.handler,f=d?.(Tb(t,e,r,i,o)),p=!!d&&Mo(f);if((p||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||c._nonReactive.minPendingPromise)&&t.updateMatch(r,g=>({...g,isFetching:"loader"})),d){const g=p?await f:f;ws(t,t.router.getMatch(r),g),g!==void 0&&t.updateMatch(r,v=>({...v,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,t.updateMatch(r,g=>({...g,error:void 0,context:ci(t,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let d=u;if(d?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}t.updateMatch(r,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:ci(t,i)}));return}const f=c._nonReactive.minPendingPromise;f&&await f,Ot(u)&&await o.options.notFoundComponent?.preload?.(),ws(t,t.router.getMatch(r),u);try{o.options.onError?.(u)}
10catch(p){d=p,ws(t,t.router.getMatch(r),p)}!on(d)&&!Ot(d)&&await Lo(o,["errorComponent"]),t.updateMatch(r,p=>({...p,error:d,context:ci(t,i),status:"error",isFetching:!1}))}}catch(c){const u=t.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),ws(t,u,c)}},ZT=async(t,e,r)=>{async function i(w,_,R,S,E){const A=Date.now()-_.updatedAt,O=w?E.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:E.options.staleTime??t.router.options.defaultStaleTime??0,j=E.options.shouldReload,q=typeof j=="function"?j(Tb(t,e,o,r,E)):j,{status:H,invalid:P}=S,M=A>=O&&(!!t.forceStaleReload||S.cause==="enter"||R!==void 0&&R!==S.id);u=H==="success"&&(P||(q??M)),w&&E.options.preload===!1||(u&&!t.sync&&y?(d=!0,(async()=>{try{await _v(t,e,o,r,E);const Q=t.router.getMatch(o);Q._nonReactive.loaderPromise?.resolve(),Q._nonReactive.loadPromise?.resolve(),Q._nonReactive.loaderPromise=void 0,Q._nonReactive.loadPromise=void 0}catch(Q){on(Q)&&await t.router.navigate(Q.options)}})()):H!=="success"||u?await _v(t,e,o,r,E):wv(t,o,r))}const{id:o,routeId:c}=t.matches[r];let u=!1,d=!1;const f=t.router.looseRoutesById[c],p=f.options.loader,y=((typeof p=="function"?void 0:p?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Sb(t,o)){if(!t.router.getMatch(o))return t.matches[r];wv(t,o,r)}else{const w=t.router.getMatch(o),_=t.router.stores.matchesId.get()[r],R=(_&&t.router.stores.matchStores.get(_)||null)?.routeId===c?_:t.router.stores.matches.get().find(E=>E.routeId===c)?.id,S=ou(t,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!t.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const E=t.router.getMatch(o),A=E._nonReactive.error||E.error;A&&ws(t,E,A),E.status==="pending"&&await i(S,w,R,E,f)}else{const E=S&&!t.router.stores.matchStores.has(o),A=t.router.getMatch(o);A._nonReactive.loaderPromise=ui(),E!==A.preload&&t.updateMatch(o,O=>({...O,preload:E})),await i(S,w,R,A,f)}}const g=t.router.getMatch(o);d||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,d||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const v=d?g.isFetching:!1;return v!==g.isFetching||g.invalid!==!1?(t.updateMatch(o,w=>({...w,isFetching:v,invalid:!1})),t.router.getMatch(o)):g};async function Sv(t){const e=t,r=[];KT(e.router)&&uf(e);let i;for(let v=0;v<e.matches.length;v++){try{const w=JT(e,v);Mo(w)&&await w}catch(w){if(on(w))throw w;if(Ot(w))i=w;else if(!e.preload)throw w;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const o=e.firstBadMatchIndex??e.matches.length,c=i&&!e.preload?bv(e,i):void 0,u=i&&e.preload?0:c!==void 0?Math.min(c+1,o):o;let d,f;for(let v=0;v<u;v++)r.push(ZT(e,r,v));try{await Promise.all(r)}catch{const v=await Promise.allSettled(r);for(const w of v){if(w.status!=="rejected")continue;const _=w.reason;if(on(_))throw _;Ot(_)?d??=_:f??=_}if(f!==void 0)throw f}const p=d??(i&&!e.preload?i:void 0);let y=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!p&&i&&e.preload)return e.matches;if(p){const v=bv(e,p);v===void 0&&ln();const w=e.matches[v],_=e.router.looseRoutesById[w.routeId],R=e.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&R&&(_.options.notFoundComponent=R),p.routeId=w.routeId;const S=w.routeId===e.router.routeTree.id;e.updateMatch(w.id,E=>({...E,...S?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:p},isFetching:!1})),y=v,await Lo(_,["notFoundComponent"])}else if(!e.preload){const v=e.matches[0];v.globalNotFound||e.router.getMatch(v.id)?.globalNotFound&&e.updateMatch(v.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const v=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Lo(v,["errorComponent"])}for(let v=0;v<=y;v++){const{id:w,routeId:_}=e.matches[v],R=e.router.looseRoutesById[_];try{const S=XT(e,w,R);if(S){const E=await S;e.updateMatch(w,A=>({...A,...E}))}}catch(S){console.error(`Error executing head for route ${_}:`,S)}}const g=uf(e);if(Mo(g)&&await g,p)throw p;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function Ev(t,e){const r=e.map(i=>
10t.options[i]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Lo(t,e=jc){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(i=>{const{id:o,...c}=i.options;Object.assign(t.options,c),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const r=()=>t._componentsLoaded?void 0:e===jc?(()=>{if(t._componentsPromise===void 0){const i=Ev(t,jc);i?t._componentsPromise=i.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Ev(t,e);return t._lazyPromise?t._lazyPromise.then(r):r()}function Rb(t){for(const e of jc)if(t.options[e]?.preload)return!0;return!1}var jc=["component","errorComponent","pendingComponent","notFoundComponent"],Ss="__TSR_index",Tv="popstate",Rv="beforeunload";function WT(t){let e=t.getLocation();const r=new Set,i=u=>{e=t.getLocation(),r.forEach(d=>d({location:e,action:u}))},o=u=>{t.notifyOnIndexChange??!0?i(u):e=t.getLocation()},c=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const p=t.getBlockers?.()??[],y=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&p.length&&y)for(const g of p){const v=Bc(f.path,f.state);if(await g.blockerFn({currentLocation:e,nextLocation:v,action:f.type})){t.onBlocked?.();return}}u()};return{get location(){return e},get length(){return t.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,d,f)=>{const p=e.state[Ss];d=Av(p+1,d),c({task:()=>{t.pushState(u,d),i({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const p=e.state[Ss];d=Av(p,d),c({task:()=>{t.replaceState(u,d),i({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{c({task:()=>{t.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{c({task:()=>{t.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{t.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>e.state[Ss]!==0,createHref:u=>t.createHref(u),block:u=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,u]),()=>{const f=t.getBlockers?.()??[];t.setBlockers?.(f.filter(p=>p!==u))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:i}}function Av(t,e){e||(e={});const r=Hf();return{...e,key:r,__TSR_key:r,[Ss]:t}}function eR(t){const e=typeof document<"u"?window:void 0,r=e.history.pushState,i=e.history.replaceState;let o=[];const c=()=>o,u=M=>o=M,d=(M=>M),f=(()=>Bc(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const M=Hf();e.history.replaceState({[Ss]:0,key:M,__TSR_key:M},"")}let p=f(),y,g=!1,v=!1,w=!1,_=!1;const R=()=>p;let S,E;const A=()=>{S&&(P._ignoreSubscribers=!0,(S.isPush?e.history.pushState:e.history.replaceState)(S.state,"",S.href),P._ignoreSubscribers=!1,S=void 0,E=void 0,y=void 0)},O=(M,Q,re)=>{const ne=d(Q);E||(y=p),p=Bc(Q,re),S={href:ne,state:re,isPush:S?.isPush||M==="push"},E||(E=Promise.resolve().then(()=>A()))},j=M=>{p=f(),P.notify({type:M})},q=async()=>{if(v){v=!1;return}const M=f(),Q=M.state[Ss]-p.state[Ss],re=Q===1,ne=Q===-1,fe=!re&&!ne||g;g=!1;const ye=fe?"GO":ne?"BACK":"FORWARD",Le=fe?{type:"GO",index:Q}:{type:ne?"BACK":"FORWARD"};if(w)w=!1;else{const Re=c();if(typeof document<"u"&&Re.length){for(const L of Re)if(await L.blockerFn({currentLocation:p,nextLocation:M,action:ye})){v=!0,e.history.go(1),P.notify(Le);return}}}p=f(),P.notify(Le)},H=M=>{if(_){_=!1;return}let Q=!1;const re=c();if(typeof document<"u"&&re.length)for(const ne of re){const fe=ne.enableBeforeUnload??!0;if(fe===!0){Q=!0;break}if(typeof fe=="function"&&fe()===!0){Q=!0;break}}if(Q)return M.preventDefault(),M.returnValue=""},P=WT({getLocation:R,getLength:()=>e.history.length,pushState:(M,Q)=>O("push",M,Q),replaceState:(M,Q)=>O("replace",M,Q),back:M=>(M&&(w=!0),_=!0,e.history.back()),forward:M=>{M&&(w=!0),_=!0,e.history.forward()},go:M=>{g=!0,e.history.go(M)},createHref:M=>d(M),flush:A,destroy:()=>{e.history.pushState=r,e.history.replaceState=i,e.removeEventListener(Rv,H,{capture:!0}),e.removeEventListener(Tv,q)},onBlocked:()=>{y&&p!==y&&(p=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return e.addEventListener(Rv,H,{capture:!0}),e.addEventListener(Tv,q),e.history.pushState=function(...M){const Q=r.apply(e.history,M);return P._ignoreSubscribers||j("PUSH"),Q},e.history.replaceState=function(...M){const Q=i.apply(e.history,M);return P._ignoreSubscribers||j("REPLACE"),Q},P}function tR(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Bc(t,e){const r=tR(t),i=r.indexOf("#"),o=r.indexOf("?"),c=Hf();return{href:r,pathname:r.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:r.length),hash:i>-1?r.substring(i):"",search:o>-1?r.slice(o,i===-1?void 0:i):"",state:e||{[Ss]:0,key:c,__TSR_key:c}}}function Hf(){return(Math.random()+1).toString(36).substring(7)}function nR(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function fa(t,e){const r=e,i=t;return{fromLocation:r,toLocation:i,pathChanged:r?.pathname!==i.pathname,hrefChanged:r?.href!==i.href,hashChanged:r?.hash!==i.hash}}var rR=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const i=this.options,o=this.basepath??i?.basepath??"/",c=this.basepath===void 0,u=i?.rewrite;if(this.options={...i,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=kT(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=eR()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=Do(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=FT(iR(this.latestLocation),y),PT(this)}let d=!1;const f=this.options.basepath??"/",p=this.options.rewrite;if(c||o!==f||u!==p){this.basepath=f;const y=[],g=bb(f);g&&g!=="/"&&y.push(GT({basepath:f})),p&&y.push(p),this.rewrite=y.length===0?void 0:y.length===1?y[0]:VT(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=ET(this.routeTree,this.options.caseSensitive,(i,o)=>{i.init({originalIndex:o})});return this.options.routeMasks&&vT(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,i)=>{const o={eventType:r,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>
10{this.subscribers.forEach(i=>{i.eventType===r.type&&i.fn(r)})},this.parseLocation=(r,i)=>{const o=({pathname:f,search:p,hash:y,href:g,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const E=this.options.parseSearch(p),A=this.options.stringifySearch(E);return{href:f+A+y,publicHref:f+A+y,pathname:po(f).path,external:!1,searchStr:A,search:Xs(i?.search,E),hash:po(y.slice(1)).path,state:vs(i?.state,v)}}const w=new URL(g,this.origin),_=cf(this.rewrite,w),R=this.options.parseSearch(_.search),S=this.options.stringifySearch(R);return _.search=S,{href:_.href.replace(_.origin,""),publicHref:g,pathname:po(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:S,search:Xs(i?.search,R),hash:po(_.hash.slice(1)).path,state:vs(i?.state,v)}},c=o(r),{__tempLocation:u,__tempKey:d}=c.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=c.state.key,f.state.__TSR_key=c.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:c}}return c},this.resolvePathWithBase=(r,i)=>CT({base:r,to:Bf(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,i,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:i},o):this.matchRoutesInternal(r,i),this.getMatchedRoutes=r=>aR({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const i=this.getMatch(r);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const i=this.stores.matchStores.get(r)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const i=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(u);c.from;const f=c.unsafeRelative==="path"?u.pathname:c.from??d.fullPath,p=this.resolvePathWithBase(f,"."),y=d.search,g=Object.assign(Object.create(null),d.params),v=c.to?this.resolvePathWithBase(p,`${c.to}`):this.resolvePathWithBase(p,"."),w=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,ys(c.params,g)),_=this.getMatchedRoutes(v);let R=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(R=[...R,this.options.notFoundRoute]),Object.keys(w).length>0)for(const re of R){const ne=re.options.params?.stringify??re.options.stringifyParams;if(ne)try{Object.assign(w,ne(w))}catch{}}const S=r.leaveParams?v:po(mv({path:v,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=y;if(r._includeValidateSearch&&this.options.search?.strict){const re={};R.forEach(ne=>{if(ne.options.validateSearch)try{Object.assign(re,Mc(ne.options.validateSearch,{...re,...E}))}catch{}}),E=re}E=oR({search:E,dest:c,destRoutes:R,_includeValidateSearch:r._includeValidateSearch}),E=Xs(y,E);const A=this.options.stringifySearch(E),O=c.hash===!0?u.hash:c.hash?ys(c.hash,u.hash):void 0,j=O?`#${O}`:"";let q=c.state===!0?u.state:c.state?ys(c.state,u.state):{};q=vs(u.state,q);const H=`${S}${A}${j}`;let P,M,Q=!1;if(this.rewrite){const re=new URL(H,this.origin),ne=_b(this.rewrite,re);P=re.href.replace(re.origin,""),ne.origin!==this.origin?(M=ne.href,Q=!0):M=ne.pathname+ne.search+ne.hash}
10else P=mT(H),M=P;return{publicHref:M,href:P,pathname:S,search:E,searchStr:A,state:q,hash:O??"",external:Q,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const d=i(c);let f=u?i(u):void 0;if(!f){const p=Object.create(null);if(this.options.routeMasks){const y=bT(d.pathname,this.processedTree);if(y){Object.assign(p,y.rawParams);const{from:g,params:v,...w}=y.route,_=v===!1||v===null?Object.create(null):(v??!0)===!0?p:Object.assign(p,ys(v,p));u={from:r.from,...w,params:_},f=i(u)}}}return f&&(d.maskedLocation=f),d};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:i,...o})=>{const c=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const p=an(o.state,this.latestLocation.state);return f.forEach(y=>{delete o.state[y]}),p},u=_s(this.latestLocation.href)===_s(o.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=ui(()=>{d?.resolve(),d=void 0}),u&&c())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...y}=o;f&&(y={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:i})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:i,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,href:d,...f}={})=>{if(d){const g=this.history.location.state.__TSR_index,v=Bc(d,{__TSR_index:r?g:g+1}),w=new URL(v.pathname,this.origin);f.to=cf(this.rewrite,w).pathname,f.search=this.options.parseSearch(v.search),f.hash=v.hash.slice(1)}const p=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const y=this.commitLocation({...p,viewTransition:c,replace:r,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:i,href:o,publicHref:c,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!i&&(i=!0),i){if(r!==void 0||!o){const p=this.buildLocation({to:r,...u});o=o??p.publicHref,c=c??p.publicHref}const f=!d&&c?c:o;if(zc(f,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const y of p)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(o=>!r.some(c=>c.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(i)})},this.load=async r=>{let i,o,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,y=fa(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await Sv({router:this,sync:r?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,v=null,w=null,_=null;this.batch(()=>{const R=this.stores.pendingMatches.get(),S=R.length,E=this.stores.matches.get();g=S?E.filter(j=>
10!this.stores.pendingMatchStores.has(j.id)):null;const A=new Set;for(const j of this.stores.pendingMatchStores.values())j.routeId&&A.add(j.routeId);const O=new Set;for(const j of this.stores.matchStores.values())j.routeId&&O.add(j.routeId);v=S?E.filter(j=>!A.has(j.routeId)):null,w=S?R.filter(j=>!O.has(j.routeId)):null,_=S?R.filter(j=>O.has(j.routeId)):E,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),S&&(this.stores.setMatches(R),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(j=>j.status!=="error"&&j.status!=="notFound"&&j.status!=="redirected")]),this.clearExpiredCache())});for(const[R,S]of[[v,"onLeave"],[w,"onEnter"],[_,"onStay"]])if(R)for(const E of R)this.looseRoutesById[E.routeId].options[S]?.(E)})})}})}catch(p){on(p)?(i=p,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Ot(p)&&(o=p);const y=i?i.status:o?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(i)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(f=>f.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=r=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),d=typeof i.types=="function"?i.types(fa(c,u)):i.types;if(d===!1){r();return}o={update:r,types:d}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,i)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(r);if(o){o.set(i);return}const c=this.stores.matchStores.get(r);if(c){c.set(i);return}const u=this.stores.cachedMatchStores.get(r);if(u){const d=i(u.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(f=>f.filter(p=>p!==r)):u.set(d)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const i=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const i=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(o);r.options.href=c,r.headers.set("Location",c)}else if(i)try{const o=new URL(i);if(this.origin&&o.origin===this.origin){const c=o.pathname+o.search+o.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&zc(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const i=r?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!i(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),i=o=>{const c=this.looseRoutesById[o.routeId];if(!c.options.loader)return!0;const u=(o.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=u};this.clearCache({filter:i})},this.loadRouteChunk=Lo,this.preloadRoute=async r=>{const i=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pe
10ndingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),d=o.filter(f=>!u.has(f.id));if(d.length){const f=this.stores.cachedMatches.get();this.stores.setCached([...f,...d])}try{return o=await Sv({router:this,matches:o,location:i,preload:!0,updateMatch:(f,p)=>{c.has(f)?o=o.map(y=>y.id===f?p(y):y):this.updateMatch(f,p)}}),o}catch(f){if(on(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:i});Ot(f)||console.error(f);return}},this.matchRoute=(r,i)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(o);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const u=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=wT(c.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,u.pathname,this.processedTree);return!d||r.params&&!an(d.rawParams,r.params,{partial:!0})?!1:i?.includeSearch??!0?an(u.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??BT,parseSearch:t.parseSearch??IT,protocolAllowlist:t.protocolAllowlist??dT}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:r}){this.routesById=t,this.routesByPath=e,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:o,parsedParams:c}=r;let{matchedRoutes:u}=r,d=!1;(i?i.path!=="/"&&o["**"]:_s(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=d?cR(this.options.notFoundMode,u):void 0,p=new Array(u.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<u.length;g++){const v=u[g],w=p[g-1];let _,R,S;{const ye=w?.search??t.search,Le=w?._strictSearch??void 0;try{const Re=Mc(v.options.validateSearch,{...ye})??void 0;_={...ye,...Re},R={...Le,...Re},S=void 0}catch(Re){let L=Re;if(Re instanceof Hc||(L=new Hc(Re.message,{cause:Re})),e?.throwOnError)throw L;_=ye,R={},S=L}}const E=v.options.loaderDeps?.({search:_})??"",A=E?JSON.stringify(E):"",{interpolatedPath:O,usedParams:j}=mv({path:v.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),q=v.id+O+A,H=this.getMatch(q),P=y.get(v.id),M=H?._strictParams??j;let Q;if(!H)try{xv(v,j,c,M)}catch(ye){if(Ot(ye)||on(ye)?Q=ye:Q=new sR(ye.message,{cause:ye}),e?.throwOnError)throw Q}Object.assign(o,M);const re=P?"stay":"enter";let ne;if(H)ne={...H,cause:re,params:P?.params??o,_strictParams:M,search:Xs(P?P.search:H.search,_),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||Rb(v)?"pending":"success";ne={id:q,ssr:v.options.ssr,index:g,routeId:v.id,params:P?.params??o,_strictParams:M,pathname:O,updatedAt:Date.now(),search:P?Xs(P.search,_):_,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:Q,__routeC
10ontext:void 0,_nonReactive:{loadPromise:ui()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:re,loaderDeps:P?vs(P.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}e?.preload||(ne.globalNotFound=f===v.id),ne.searchError=S;const fe=this.getParentContext(w);ne.context={...fe,...ne.__routeContext,...ne.__beforeLoadContext},p[g]=ne}for(let g=0;g<p.length;g++){const v=p[g],w=this.looseRoutesById[v.routeId],_=this.getMatch(v.id),R=y.get(v.routeId);if(v.params=R?Xs(R.params,o):o,!_){const S=p[g-1],E=this.getParentContext(S);if(w.options.context){const A={deps:v.loaderDeps,params:v.params,context:E??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:p,routeId:w.id};v.__routeContext=w.options.context(A)??void 0}v.context={...E,...v.__routeContext,...v.__beforeLoadContext}}}return p}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),o=jo(e),c={...t.search};for(const y of e)try{Object.assign(c,Mc(y.options.validateSearch,c))}catch{}const u=jo(this.stores.matchesId.get()),d=u&&this.stores.matchStores.get(u)?.get(),f=d&&d.routeId===o.id&&d.pathname===t.pathname;let p;if(f)p=d.params;else{const y=Object.assign(Object.create(null),r);for(const g of e)try{xv(g,r,i??{},y)}catch{}p=y}return{matchedRoutes:e,fullPath:o.fullPath,search:c,params:p}}},Hc=class extends Error{},sR=class extends Error{};function iR(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Mc(t,e){if(t==null)return{};if("~standard"in t){const r=t["~standard"].validate(e);if(r instanceof Promise)throw new Hc("Async validation not supported");if(r.issues)throw new Hc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function aR({pathname:t,routesById:e,processedTree:r}){const i=Object.create(null),o=_s(t);let c,u;const d=_T(o,r,!0);return d&&(c=d.route,Object.assign(i,d.rawParams),u=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[e.__root__],routeParams:i,foundRoute:c,parsedParams:u}}function oR({search:t,dest:e,destRoutes:r,_includeValidateSearch:i}
10){return lR(r)(t,e,i??!1)}function lR(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of t){if("search"in o.options)o.options.search?.middlewares&&e.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const c=({search:u,next:d})=>{let f=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((y,g)=>g(y),u));const p=d(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),p):p};e.middlewares.push(c)}if(o.options.validateSearch){const c=({search:u,next:d})=>{const f=d(u);if(!e._includeValidateSearch)return f;try{return{...f,...Mc(o.options.validateSearch,f)??void 0}}catch{return f}};e.middlewares.push(c)}}const r=({search:o})=>{const c=e.dest;return c.search?c.search===!0?o:ys(c.search,o):{}};e.middlewares.push(r);const i=(o,c,u)=>{if(o>=u.length)return c;const d=u[o];return d({search:c,next:p=>i(o+1,p,u)})};return function(c,u,d){return e.dest=u,e._includeValidateSearch=d,i(0,c,e.middlewares)}}function cR(t,e){if(t!=="root")for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.children)return i.id}return li}function xv(t,e,r,i){const o=t.options.params?.parse??t.options.parseParams;if(o)if(t.options.skipRouteOnParseError)for(const c in e)c in r&&(i[c]=r[c]);else{const c=o(i);Object.assign(i,c)}}var er=Symbol.for("TSR_DEFERRED_PROMISE");function uR(t,e){const r=t;return r[er]||(r[er]={status:"pending"},r.then(i=>{r[er].status="success",r[er].data=i}).catch(i=>{r[er].status="error",r[er].error={data:nR(i),__isServerError:!0}})),r}var dR="Error preloading route! âï¸";function Ov(t,e){if(t)return typeof t=="string"?t:t[e]}function hR(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function fR(t){if(t.tag!=="link")return;const e=t.attrs?.rel,r=t.attrs?.href;if(typeof r=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return r}function pR(t,e){const r=fR(e);return!!r&&t?.inlineCss?.styles[r]!==void 0}var Ab=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=li:this.parentRoute||ln();let o=i?li:r?.path;o&&o!=="/"&&(o=vb(o));const c=r?.id||o;let u=i?li:Nc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=Nc(["/",u]));const d=u==="__root__"?"/":Nc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=d,this._to=_s(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>au({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},mR=class extends Ab{constructor(t){super(t)}};function gR(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),r=e.state.__hashScrollIntoViewOptions??!0;if(r&&e.hash!==""){const i=document.getElementById(e.hash);i&&i.scrollIntoView(r)}}}const Nr=Symbol.asyncIterator,xb=Symbol.hasInstance,pa=Symbol.isConcatSpreadable,jr=Symbol.iterator,Ob=Symbol.match,Cb=Symbol.matchAll,kb=Symbol.replace,Nb=Symbol.search,jb=Symbol.species,Mb=Symbol.split,Db=Symbol.toPrimitive,ma=Symbol.toStringTag,Lb=Symbol.unscopables,Ub={[Nr]:0,[xb]:1,[pa]:2,[jr]:3,[Ob]:4,[Cb]:5,[kb]:6,[Nb]:7,[jb]:8,[Mb]:9,[Db]:10,[ma]:11,[Lb]:12},yR={0:Nr,1:xb,2:pa,3:jr,4:Ob,5:Cb,6:kb,7:Nb,8:jb,9:Mb,10:Db,11:ma,12:Lb},vR={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},bR={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},wR={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};
10function Ne(t,e,r,i,o,c,u,d,f,p,y,g){return{t,i:e,s:r,c:i,m:o,p:c,e:u,a:d,f,b:p,o:y,l:g}}function Ts(t){return Ne(2,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const Pb=Ts(2),zb=Ts(3),_R=Ts(1),SR=Ts(0),ER=Ts(4),TR=Ts(5),RR=Ts(6),AR=Ts(7);function xR(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function Rs(t){let e="",r=0,i;for(let o=0,c=t.length;o<c;o++)i=xR(t[o]),i&&(e+=t.slice(r,o)+i,r=o+1);return r===0?e=t:e+=t.slice(r),e}function OR(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function As(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,OR)}const pc="__SEROVAL_REFS__",Ib=new Map,da=new Map;function Bb(t){return Ib.has(t)}function CR(t){return da.has(t)}function kR(t){if(Bb(t))return Ib.get(t);throw new oA(t)}function NR(t){if(CR(t))return da.get(t);throw new lA(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,pc,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,pc,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,pc,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,pc,{value:da,configurable:!0,writable:!1,enumerable:!1});function $f(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function jR(t){const e=bR[$f(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function Hb(t,e){let r=jR(t);const i=Object.getOwnPropertyNames(t);for(let o=0,c=i.length,u;o<c;o++)u=i[o],u!=="name"&&u!=="message"&&(u==="stack"?e&4&&(r=r||{},r[u]=t[u]):(r=r||{},r[u]=t[u]));return r}function $b(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function MR(t){switch(t){case Number.POSITIVE_INFINITY:return TR;case Number.NEGATIVE_INFINITY:return RR}return t!==t?AR:Object.is(t,-0)?ER:Ne(0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function qb(t){return Ne(1,void 0,Rs(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function DR(t){return Ne(3,void 0,""+t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function LR(t){return Ne(4,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function UR(t,e){const r=e.valueOf();return Ne(5,t,r!==r?"":e.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function as(t,e,r){return Ne(36,t,r.toString(),e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function PR(t,e){return Ne(6,t,void 0,Rs(e.source),e.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function zR(t,e){return Ne(17,t,Ub[e],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function IR(t,e){return Ne(18,t,Rs(kR(e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function BR(t,e,r){return Ne(25,t,r,Rs(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function HR(t,e,r){return Ne(9,t,void 0,void 0,void 0,void 0,void 0,r,void 0,void 0,$b(e),void 0)}function $R(t,e){return Ne(21,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function qR(t,e,r){return Ne(15,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function VR(t,e,r){return Ne(16,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function GR(t,e,r){return Ne(20,t,void 0,void 0,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.byteLength)}function FR(t,e,r){return Ne(13,t,$f(e),void 0,Rs(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function KR(t,e,r){return Ne(14,t,$f(e),void 0,Rs(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function YR(t,e){return Ne(7,t,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,void 0)}function QR(t,e){return Ne(28,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function JR(t,e){return Ne(30,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function XR(t,e,r){return Ne(31,t,void 0,void 0,void 0,void 0,void 0,r,e,void 0,void 0,void 0)}function ZR(t,e){return Ne(32,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function WR(t,e){return Ne(33,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function eA(t,e){return Ne(34,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function tA(t,e,r,i){return Ne(35,t,r,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,i)}
12const nA={parsing:1,serialization:2,deserialization:3};function rA(t){return`Seroval Error (step: ${nA[t]})`}const sA=(t,e)=>rA(t);var Vb=class extends Error{constructor(t,e){super(sA(t)),this.cause=e}},Cv=class extends Vb{constructor(t){super("parsing",t)}},iA=class extends Vb{constructor(t){super("deserialization",t)}};function Mr(t){return`Seroval Error (specific: ${t})`}var lu=class extends Error{constructor(t){super(Mr(1)),this.value=t}},qf=class extends Error{constructor(t){super(Mr(2))}},aA=class extends Error{constructor(t){super(Mr(3))}},Yo=class extends Error{constructor(t){super(Mr(4))}},oA=class extends Error{constructor(t){super(Mr(5)),this.value=t}},lA=class extends Error{constructor(t){super(Mr(6))}},cA=class extends Error{constructor(t){super(Mr(7))}},nr=class extends Error{constructor(t){super(Mr(8))}},Gb=class extends Error{constructor(t){super(Mr(9))}},uA=class{constructor(t,e){this.value=t,this.replacement=e}};const Vf=()=>{const t={p:0,s:0,f:0};return t.p=new Promise((e,r)=>{t.s=e,t.f=r}),t},dA=()=>{const t=[],e=[];let r=!0,i=!1,o=0;const c={flush(u,d,f){for(f=0;f<o;f++)e[f]&&e[f][d](u)},up(u,d,f,p){for(d=0,f=t.length;d<f;d++)p=t[d],!r&&d===f-1?u[i?"return":"throw"](p):u.next(p)},on(u,d){return r&&(d=o++,e[d]=u),c.up(u),()=>{r&&(e[d]=e[o],e[o--]=void 0)}}};return{__SEROVAL_STREAM__:!0,on(u){return c.on(u)},next(u){r&&(t.push(u),c.flush(u,"next"))},throw(u){r&&(t.push(u),c.flush(u,"throw"),r=!1,i=!1,e.length=0)},return(u){r&&(t.push(u),c.flush(u,"return"),r=!1,i=!0,e.length=0)}}},hA=t=>e=>()=>{let r=0;const i={[t](){return i},next(){if(r>e.d)return{done:!0,value:void 0};const o=r++,c=e.v[o];if(o===e.t)throw c;return{done:o===e.d,value:c}}};return i},fA=(t,e)=>r=>()=>{let i=0,o=-1,c=!1;const u=[],d=[],f={finalize(y=0,g=d.length){for(;y<g;y++)d[y].s({done:!0,value:void 0})}};r.on({next(y){const g=d.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw(y){const g=d.shift();g&&g.f(y),f.finalize(),o=u.length,c=!0,u.push(y)},return(y){const g=d.shift();g&&g.s({done:!0,value:y}),f.finalize(),o=u.length,u.push(y)}});const p={[t](){return p},next(){if(o===-1){const v=i++;if(v>=u.length){const w=e();return d.push(w),w.p}return{done:!1,value:u[v]}}if(i>o)return{done:!0,value:void 0};const y=i++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return p},pA=t=>{const e=atob(t),r=e.length,i=new Uint8Array(r);for(let o=0;o<r;o++)i[o]=e.charCodeAt(o);return i.buffer};function mA(t){return"__SEROVAL_SEQUENCE__"in t}function Fb(t,e,r){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:r}}function gA(t){const e=[];let r=-1,i=-1;const o=t[jr]();for(;;)try{const c=o.next();if(e.push(c.value),c.done){i=e.length-1;break}}catch(c){r=e.length,e.push(c)}return Fb(e,r,i)}const yA=hA(jr);function vA(t){return yA(t)}const bA={},wA={},_A={0:{},1:{},2:{},3:{},4:{},5:{}};function SA(t){return"__SEROVAL_STREAM__"in t}function di(){return dA()}function EA(t){const e=di(),r=t[Nr]();async function i(){try{const o=await r.next();o.done?e.return(o.value):(e.next(o.value),await i())}catch(o){e.throw(o)}}return i().catch(()=>{}),e}const TA=fA(Nr,Vf);function RA(t){return TA(t)}async function AA(t){try{return[1,await t]}catch(e){return[0,e]}}function xA(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:127^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Dc(t,e){t.marked.add(e)}function OA(t,e){const r=t.refs.size;return t.refs.set(e,r),r}function cu(t,e){const r=t.refs.get(e);return r!=null?(Dc(t,r),{type:1,value:LR(r)}):{type:0,value:OA(t,e)}}function Gf(t,e){const r=cu(t,e);return r.type===1?r:Bb(e)?{type:2,value:IR(r.value,e)}:r}function si(t,e){const r=Gf(t,e);if(r.type!==0)return r.value;if(e in Ub)return zR(r.value,e);throw new lu(e)}function uu(t,e){const r=cu(t,_A[e]);return r.type===1?r.value:Ne(26,r.value,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function CA(t){const e=cu(t,bA);return e.type===1?e.value:Ne(27,e.value,void 0,void 0,void 0,void 0,void 0,void 0,si(t,jr),void 0,void 0,void 0)}function kA(t){const e=cu(t,wA);return e.type===1?e.value:Ne(29,e.value,void 0,void 0,void 0,void 0,void 0,[uu(t,1),si(t,Nr)],void 0,void 0,void 0,void 0)}function NA(t,e,r,i){return Ne(r?11:10,t,void 0,void 0,void 0,i,void 0,void 0,void 0,void 0,$b(e),void 0)}function jA(t,e,r,i){return Ne(8,e,void 0,void 0,void 0,void 0,{k:r,v:i},void 0,uu(t,0),void 0,void 0,void 0)}function MA(t,e,r){const i=new Uint8Array(r);let o="";for(let c=0,u=i.length;c<u;c++)o+=String.fromCharCode(i[c]);return Ne(19,e,Rs(btoa(o)),void 0,void 0,void 0,void 0,void 0,uu(t,5),void 0,void 0,void 0)}function DA(t,e){return{base:xA(t,e),child:void 0}}var LA=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return wt(this._p,this.depth,t)}};async function UA(t,e,r){const i=[];for(let o=0,c=r.length;o<c;o++)o in r?i[o]=await wt(t,e,r[o]):i[o]=0;return i}async function PA(t,e,r,i){return HR(r,i,await UA(t,e,i))}async function Ff(t,e,r){const i=Object.entries(r),o=[],c=[];for(let u=0,d=i.length;u<d;u++)o.push(Rs(i[u][0])),c.push(await wt(t,e,i[u][1]));return jr in r&&(o.push(si(t.base,jr)),c.push(QR(CA(t.base),await wt(t,e,gA(r))))),Nr in r&&(o.push(si(t.base,Nr)),c.push(JR(kA(t.base),await wt(t,e,EA(r))))),ma in r&&(o.push(si(t.base,ma)),c.push(qb(r[ma]))),pa in r&&(o.push(si(t.base,pa)),c.push(r[pa]?Pb
12:zb)),{k:o,v:c}}async function Bh(t,e,r,i,o){return NA(r,i,o,await Ff(t,e,i))}async function zA(t,e,r,i){return $R(r,await wt(t,e,i.valueOf()))}async function IA(t,e,r,i){return qR(r,i,await wt(t,e,i.buffer))}async function BA(t,e,r,i){return VR(r,i,await wt(t,e,i.buffer))}async function HA(t,e,r,i){return GR(r,i,await wt(t,e,i.buffer))}async function kv(t,e,r,i){const o=Hb(i,t.base.features);return FR(r,i,o?await Ff(t,e,o):void 0)}async function $A(t,e,r,i){const o=Hb(i,t.base.features);return KR(r,i,o?await Ff(t,e,o):void 0)}async function qA(t,e,r,i){const o=[],c=[];for(const[u,d]of i.entries())o.push(await wt(t,e,u)),c.push(await wt(t,e,d));return jA(t.base,r,o,c)}async function VA(t,e,r,i){const o=[];for(const c of i.keys())o.push(await wt(t,e,c));return YR(r,o)}async function Kb(t,e,r,i){const o=t.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){const d=o[c];if(d.parse.async&&d.test(i))return BR(r,d.tag,await d.parse.async(i,new LA(t,e),{id:r}))}}async function GA(t,e,r,i){const[o,c]=await AA(i);return Ne(12,r,o,void 0,void 0,void 0,void 0,void 0,await wt(t,e,c),void 0,void 0,void 0)}function FA(t,e,r,i,o){const c=[],u=r.on({next:d=>{Dc(this.base,e),wt(this,t,d).then(f=>{c.push(ZR(e,f))},f=>{o(f),u()})},throw:d=>{Dc(this.base,e),wt(this,t,d).then(f=>{c.push(WR(e,f)),i(c),u()},f=>{o(f),u()})},return:d=>{Dc(this.base,e),wt(this,t,d).then(f=>{c.push(eA(e,f)),i(c),u()},f=>{o(f),u()})}})}async function KA(t,e,r,i){return XR(r,uu(t.base,4),await new Promise(FA.bind(t,e,r,i)))}async function YA(t,e,r,i){const o=[];for(let c=0,u=i.v.length;c<u;c++)o[c]=await wt(t,e,i.v[c]);return tA(r,o,i.t,i.d)}async function QA(t,e,r,i){if(Array.isArray(i))return PA(t,e,r,i);if(SA(i))return KA(t,e,r,i);if(mA(i))return YA(t,e,r,i);let o=i.constructor;if(o!==void 0&&typeof o!="function"){const d=Object.getPrototypeOf(i);o=d===null?void 0:d.constructor}if(o===uA)return wt(t,e,i.replacement);const c=await Kb(t,e,r,i);if(c)return c;switch(o){case Object:return Bh(t,e,r,i,!1);case void 0:return Bh(t,e,r,i,!0);case Date:return UR(r,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return kv(t,e,r,i);case Number:case Boolean:case String:case BigInt:return zA(t,e,r,i);case ArrayBuffer:return MA(t.base,r,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return IA(t,e,r,i);case DataView:return HA(t,e,r,i);case Map:return qA(t,e,r,i);case Set:return VA(t,e,r,i)}if(o===Promise||i instanceof Promise)return GA(t,e,r,i);const u=t.base.features;if(u&32&&o===RegExp)return PR(r,i);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return BA(t,e,r,i)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||i instanceof AggregateError))return $A(t,e,r,i);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return as(r,0,i);case Temporal.Duration:return as(r,1,i);case Temporal.PlainDate:return as(r,2,i);case Temporal.PlainDateTime:return as(r,3,i);case Temporal.PlainMonthDay:return as(r,4,i);case Temporal.PlainTime:return as(r,5,i);case Temporal.PlainYearMonth:return as(r,6,i);case Temporal.ZonedDateTime:return as(r,7,i)}if(i instanceof Error)return kv(t,e,r,i);if(jr in i||Nr in i)return Bh(t,e,r,i,!!o);throw new lu(i)}async function JA(t,e,r){const i=Gf(t.base,r);if(i.type!==0)return i.value;const o=await Kb(t,e,i.value,r);if(o)return o;throw new lu(r)}async function wt(t,e,r){if(e>=t.base.depthLimit)throw new Gb(t.base.depthLimit);switch(typeof r){case"boolean":return r?Pb:zb;case"undefined":return _R;case"string":return qb(r);case"number":return MR(r);case"bigint":return DR(r);case"object":if(r){const i=Gf(t.base,r);return i.type===0?await QA(t,e+1,i.value,r):i.value}return SR;case"symbol":return si(t.base,r);case"function":return JA(t,e,r);default:throw new lu(r)}}async function XA(t,e){try{return await wt(t,0,e)}catch(r){throw r instanceof Cv?r:new Cv(r)}}function Yb(t,e){for(let r=0,i=e.length;r<i;r++){const o=e[r];t.has(o)||(t.add(o),o.extends&&Yb(t,o.extends))}}function Qb(t){if(t){const e=new Set;return Yb(e,t),[...e]}}function ZA(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new cA(t)}}function WA(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function e1(t){switch(t){case Nr:case pa:case ma:case jr:return!0;default:return!1}}const t1=1e6,n1=1e4,r1=2e4;function Jb(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}const s1=1e3;function i1(t,e){var r;const i=e.refs||new Map;return"types"in i||Object.assign(i,{types:new Map}),{mode:t,plugins:e.plugins,refs:i,features:(r=e.features)!==null&&r!==void 0?r:127^(e.disabledFeatures||0),depthLimit:e.depthLimit||s1}}
12function a1(t){return{mode:2,base:i1(2,t),child:void 0}}var o1=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return qe(this._p,this.depth,t)}};function Xb(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new nr({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function l1(t,e,r){return Xb(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,r),r}function c1(t,e,r){return Xb(t.base,e),t.base.refs.set(e,r),r}function mt(t,e,r){return t.mode===1?l1(t,e,r):c1(t,e,r)}function df(t,e,r){if(Object.hasOwn(e,r))return e[r];throw new nr(t)}function u1(t,e){return mt(t,e.i,NR(As(e.s)))}function d1(t,e,r){const i=r.a,o=i.length,c=mt(t,r.i,new Array(o));for(let u=0,d;u<o;u++)d=i[u],d&&(c[u]=qe(t,e,d));return Jb(c,r.o),c}function Nv(t,e,r){WA(e)?t[e]=r:Object.defineProperty(t,e,{value:r,configurable:!0,enumerable:!0,writable:!0})}function h1(t,e,r,i,o){if(typeof i=="string")Nv(r,As(i),qe(t,e,o));else{const c=qe(t,e,i);switch(typeof c){case"string":Nv(r,c,qe(t,e,o));break;case"symbol":e1(c)&&(r[c]=qe(t,e,o));break;default:throw new nr(i)}}}function Zb(t,e,r){t.base.refs.types.set(e,r)}function Qo(t,e,r,i){if(t.base.refs.types.get(r)!==i)throw new nr(e)}function Wb(t,e,r,i){const o=r.k;if(o.length>0)for(let c=0,u=r.v,d=o.length;c<d;c++)h1(t,e,i,o[c],u[c]);return i}function f1(t,e,r){const i=mt(t,r.i,r.t===10?{}:Object.create(null));return Wb(t,e,r.p,i),Jb(i,r.o),i}function p1(t,e){return mt(t,e.i,new Date(e.s))}function m1(t,e){if(!(t.base.features&64))throw new qf(e);let r;switch(e.c){case 0:r=Temporal.Instant.from(e.s);break;case 1:r=Temporal.Duration.from(e.s);break;case 2:r=Temporal.PlainDate.from(e.s);break;case 3:r=Temporal.PlainDateTime.from(e.s);break;case 4:r=Temporal.PlainMonthDay.from(e.s);break;case 5:r=Temporal.PlainTime.from(e.s);break;case 6:r=Temporal.PlainYearMonth.from(e.s);break;case 7:r=Temporal.ZonedDateTime.from(e.s);break;default:throw new nr(e)}return mt(t,e.i,r)}function g1(t,e){if(t.base.features&32){const r=As(e.c);if(r.length>r1)throw new nr(e);return mt(t,e.i,new RegExp(r,e.m))}throw new qf(e)}function y1(t,e,r){const i=mt(t,r.i,new Set);for(let o=0,c=r.a,u=c.length;o<u;o++)i.add(qe(t,e,c[o]));return i}function v1(t,e,r){const i=mt(t,r.i,new Map);for(let o=0,c=r.e.k,u=r.e.v,d=c.length;o<d;o++)i.set(qe(t,e,c[o]),qe(t,e,u[o]));return i}function b1(t,e){if(e.s.length>t1)throw new nr(e);return mt(t,e.i,pA(As(e.s)))}function w1(t,e,r){var i;const o=ZA(r.c),c=qe(t,e,r.f),u=(i=r.b)!==null&&i!==void 0?i:0;if(u<0||u>c.byteLength)throw new nr(r);return mt(t,r.i,new o(c,u,r.l))}function _1(t,e,r){var i;const o=qe(t,e,r.f),c=(i=r.b)!==null&&i!==void 0?i:0;if(c<0||c>o.byteLength)throw new nr(r);return mt(t,r.i,new DataView(o,c,r.l))}function ew(t,e,r,i){if(r.p){const o=Wb(t,e,r.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(o))}return i}function S1(t,e,r){return ew(t,e,r,mt(t,r.i,new AggregateError([],As(r.m))))}function E1(t,e,r){const i=df(r,wR,r.s);return ew(t,e,r,mt(t,r.i,new i(As(r.m))))}function T1(t,e,r){const i=Vf(),o=mt(t,r.i,i.p),c=qe(t,e,r.f);return r.s?i.s(c):i.f(c),o}function R1(t,e,r){return mt(t,r.i,Object(qe(t,e,r.f)))}function A1(t,e,r){const i=t.base.plugins;if(i){const o=As(r.c);for(let c=0,u=i.length;c<u;c++){const d=i[c];if(d.tag===o)return mt(t,r.i,d.deserialize(r.s,new o1(t,e),{id:r.i}))}}throw new aA(r.c)}function x1(t,e){const r=mt(t,e.i,mt(t,e.s,Vf()).p);return Zb(t,e.s,22),r}function O1(t,e,r){const i=t.base.refs.get(r.i);if(i){Qo(t,r,r.i,22),i.s(qe(t,e,r.a[1]));return}throw new Yo("Promise")}function C1(t,e,r){const i=t.base.refs.get(r.i);if(i){Qo(t,r,r.i,22),i.f(qe(t,e,r.a[1]));return}throw new Yo("Promise")}function k1(t,e,r){return qe(t,e,r.a[0]),vA(qe(t,e,r.a[1]))}function N1(t,e,r){return qe(t,e,r.a[0]),RA(qe(t,e,r.a[1]))}function j1(t,e,r){const i=mt(t,r.i,di());Zb(t,r.i,31);const o=r.a,c=o.length;if(c)for(let u=0;u<c;u++)qe(t,e,o[u]);return i}function M1(t,e,r){const i=t.base.refs.get(r.i);if(i){Qo(t,r,r.i,31),i.next(qe(t,e,r.f));return}throw new Yo("Stream")}function D1(t,e,r){const i=t.base.refs.get(r.i);if(i){Qo(t,r,r.i,31),i.throw(qe(t,e,r.f));return}throw new Yo("Stream")}function L1(t,e,r){const i=t.base.refs.get(r.i);if(i){Qo(t,r,r.i,31),i.return(qe(t,e,r.f));return}throw new Yo("Stream")}function U1(t,e,r){qe(t,e,r.f)}function P1(t,e,r){qe(t,e,r.a[1])}function z1(t,e,r){const i=mt(t,r.i,Fb([],r.s,r.l));for(let o=0,c=r.a.length;o<c;o++)i.v[o]=qe(t,e,r.a[o]);return i}function qe(t,e,r){if(e>t.base.depthLimit)throw new Gb(t.base.depthLimit);switch(e+=1,r.t){case 2:return df(r,vR,r.s);case 0:return Number(r.s);case 1:return As(String(r.s));case 3:if(String(r.s).length>n1)throw new nr(r);return BigInt(r.s);case 4:return t.base.refs.get(r.i);case 18:return u1(t,r);case 9:return d1(t,e,r);case 10:case 11:return f1(t,e,r);case 5:return p1(t,r);case 6:return g1(t,r);case 7:return y1(t,e,r);case 8:return v1(t,e,r);case 19:return b1(t,r);case 16:case 15:return w1(t,e,r);case 20:return _1(t,e,r);case 14:return S1(t,e,r);case 13:return E1(t,e,r);case 12:return T1(t,e,r);case 17:return df(r,yR,r.s);case 21:return R1(t,e,r);case 25:return A1(t,e,r);case 22:return x1(t,r);case 23:return O1(t,e,r);case 24:return C1(t,e,r);case 28:return k1(t,e,r);case 30:return N1(t,e,r);case 31:return j1(t,e,r);case 32:return M1(t,e,r);case 33:return D1(t,e,r);case 34:return L1(t,e,r);case 27:return U1(t,e,r);case 29:return P1(t,e,r);case 35:return z1(t,e,r);case 36:return m1(t,r);default:throw new qf(r)}}function I1(t,e){try{return qe(t,0,e)}catch(r){throw new iA(r)}}function jv(t,e){return I1(a1({plugins:Qb(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit}),t)}async function B1(t,e={}){const r=DA(1,{plugins:Qb(e.plugins),disabledFeatures:e.disabledFeatures});return{t:await XA(r,t),f:r.base.features,m:Array.from(r.base.marked)}}function H1(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,r,i){return{v:r.parse(t.toSerializable(e))}},async async(e,r,i){return{v:await r.parse(t.toSerializable(e))}},stream(e,r,i){return{v:r.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,r,i){return t.fromSerializable(r.deserialize(e.v))}}}var $1=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}},$c=globalThis.Buffer,tw=!!$c&&typeof $c.from=="function";function nw(t){if(t.length===0)return"";if(tw)return $c.from(t).toString("base64");const e=32768,r=[];for(let i=0;i<t.length;i+=e){const o=t.subarray(i,i+e);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function rw(t){if(t.length===0)return new Uint8Array(0);if(tw){const i=$c.from(t,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}const e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}var yo=Object.create(null),vo=Object.create(null),q1=t=>new ReadableStream({start(e){t.on({next(r){try{e.enqueue(rw(r))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),V1=new TextEncoder,G1=t=>new ReadableStream({start(e){t.on({next(r){try{typeof r=="string"?e.enqueue(V1.encode(r)):e.enqueue(rw(r.$b64))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),F1="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",K1="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function Mv(t){const e=di(),r=t.getReader();return(async()=>{try{for(;;){const{done:i,value:o}=await r.read();if(i){e.return(void 0);break}e.next(nw(o))}}catch(i){e.throw(i)}finally{r.releaseLock()}})(),e}function Dv(t){const e=di(),r=t.getReader(),i=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await r.read();if(o){try{const u=i.decode();u.length>0&&e.next(u)}catch{}e.return(void 0);break}try{const u=i.decode(c,{stream:!0});u.length>0&&e.next(u)}catch{e.next({$b64:nw(c)})}}}catch(o){e.throw(o)}finally{r.releaseLock()}})(),e}var Y1={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===yo},parse:{sync(t,e,r){return{}},async async(t,e,r){return{}},stream(t,e,r){return{}}},serialize(t,e,r){return F1},deserialize(t,e,r){return yo}},{tag:"tss/RawStreamFactoryText",test(t){return t===vo},parse:{sync(t,e,r){return{}},async async(t,e,r){return{}},stream(t,e,r){return{}}},serialize(t,e,r){return K1},deserialize(t,e,r){return vo}}],test(t){return t instanceof $1},parse:{sync(t,e,r){const i=t.hint==="text"?vo:yo;return{hint:e.parse(t.hint),factory:e.parse(i),stream:e.parse(di())}},async async(t,e,r){const i=t.hint==="text"?vo:yo,o=t.hint==="text"?Dv(t.stream):Mv(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(i),stream:await e.parse(o)}},stream(t,e,r){const i=t.hint==="text"?vo:yo,o=t.hint==="text"?Dv(t.stream):Mv(t.stream);return{hint:e.parse(t.hint),factory:e.parse(i),stream:e.parse(o)}}},serialize(t,e,r){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,r){const i=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?G1(i):q1(i)}};function Q1(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,r,i){return t(typeof r?.deserialize=="function"?r.deserialize(e.streamId):e.streamId)}}}var J1={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};const fs={},sw=t=>new ReadableStream({start(e){t.on({next(r){try{e.enqueue(r)}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),X1={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===fs},parse:{sync(){return fs},async async(){return await Promise.resolve(fs)},stream(){return fs}},serialize(){return sw.toString()},deserialize(){return fs}};async function iw(t,e){try{const r=await e.read();r.done?(t.return(r.value),e.releaseLock()):(t.next(r.value),await iw(t,e))}catch(r){t.throw(r)}}function Z1(t){t.cancel().catch(()=>{}),t.releaseLock()}function Lv(t){const e=di(),r=t.getReader(),i=Z1.bind(null,r);return iw(e,r).catch(i),[e,i]}const W1={tag:"seroval/plugins/web/ReadableStream",extends:[X1],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(fs),stream:e.parse(di())}},async async(t,e){return{factory:await e.parse(fs),stream:await e.parse(Lv(t)[0])}},stream(t,e){const[r,i]=Lv(t);return e.addCleanup(i),{factory:e.parse(fs),stream:e.parse(r)}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){const r=e.deserialize(t.stream);return sw(r)}};var ex=[J1,Y1,W1];function tx(){return[...pb()?.serializationAdapters?.map(H1)??[],...ex]}var Uv=new TextDecoder,nx=new Uint8Array(0),Pv=16*1024*1024,zv=32*1024*1024,Iv=1024,Bv
12=1e5;function rx(t){const e=new Map,r=new Map,i=new Set;let o=!1,c=null,u=0,d;const f=new ReadableStream({start(g){d=g},cancel(){o=!0;try{c?.cancel()}catch{}e.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),r.clear(),i.clear()}});function p(g){const v=r.get(g);if(v)return v;if(i.has(g))return new ReadableStream({start(_){_.close()}});if(r.size>=Iv)throw new Error(`Too many raw streams in framed response (max ${Iv})`);const w=new ReadableStream({start(_){e.set(g,_)},cancel(){i.add(g),e.delete(g),r.delete(g)}});return r.set(g,w),w}function y(g){return p(g),e.get(g)}return(async()=>{const g=t.getReader();c=g;const v=[];let w=0;function _(){if(w<9)return null;const S=v[0];if(S.length>=9)return{type:S[0],streamId:(S[1]<<24|S[2]<<16|S[3]<<8|S[4])>>>0,length:(S[5]<<24|S[6]<<16|S[7]<<8|S[8])>>>0};const E=new Uint8Array(9);let A=0,O=9;for(let j=0;j<v.length&&O>0;j++){const q=v[j],H=Math.min(q.length,O);E.set(q.subarray(0,H),A),A+=H,O-=H}return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0}}function R(S){if(S===0)return nx;const E=new Uint8Array(S);let A=0,O=S;for(;O>0&&v.length>0;){const j=v[0];if(!j)break;const q=Math.min(j.length,O);E.set(j.subarray(0,q),A),A+=q,O-=q,q===j.length?v.shift():v[0]=j.subarray(q)}return w-=S,E}try{for(;;){const{done:S,value:E}=await g.read();if(o||S)break;if(E){if(w+E.length>zv)throw new Error(`Framed response buffer exceeded ${zv} bytes`);for(v.push(E),w+=E.length;;){const A=_();if(!A)break;const{type:O,streamId:j,length:q}=A;if(O!==Rr.JSON&&O!==Rr.CHUNK&&O!==Rr.END&&O!==Rr.ERROR)throw new Error(`Unknown frame type: ${O}`);if(O===Rr.JSON){if(j!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(j===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(q>Pv)throw new Error(`Frame payload too large: ${q} bytes (max ${Pv})`);const H=9+q;if(w<H)break;if(++u>Bv)throw new Error(`Too many frames in framed response (max ${Bv})`);R(9);const P=R(q);switch(O){case Rr.JSON:try{d.enqueue(Uv.decode(P))}catch{}break;case Rr.CHUNK:{const M=y(j);M&&M.enqueue(P);break}case Rr.END:{const M=y(j);if(i.add(j),M){try{M.close()}catch{}e.delete(j)}break}case Rr.ERROR:{const M=y(j);if(i.add(j),M){const Q=Uv.decode(P);M.error(new Error(Q)),e.delete(j)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}e.forEach(S=>{try{S.close()}catch{}}),e.clear()}catch(S){try{d.error(S)}catch{}e.forEach(E=>{try{E.error(S)}catch{}}),e.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:p,jsonChunks:f}}var Uo=null;async function hf(t){t.length>0&&await Promise.allSettled(t)}var sx=Object.prototype.hasOwnProperty;function aw(t){for(const e in t)if(sx.call(t,e))return!0;return!1}async function ix(t,e,r){Uo||(Uo=tx());const i=e[0],o=i.fetch??r,c=i.data instanceof FormData?"formData":"payload",u=i.headers?new Headers(i.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${nT}, application/x-ndjson, application/json`),i.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const f=await ow(i);if(f!==void 0){const p=wb({payload:f});t.includes("?")?t+=`&${p}`:t+=`?${p}`}}let d;if(i.method==="POST"){const f=await ax(i);f?.contentType&&u.set("content-type",f.contentType),d=f?.body}return await ox(async()=>o(t,{method:i.method,headers:u,signal:i.signal,body:d}))}async function ow(t){let e=!1;const r={};if(t.data!==void 0&&(e=!0,r.data=t.data),t.context&&aw(t.context)&&(e=!0,r.context=t.context),e)return lw(r)}async function lw(t){return JSON.stringify(await Promise.resolve(B1(t,{plugins:Uo})))}async function ax(t){if(t.data instanceof FormData){let r;return t.context&&aw(t.context)&&(r=await lw(t.context)),r!==void 0&&t.data.set(tT,r),{body:t.data}}const e=await ow(t);if(e)return{body:e,contentType:"application/json"}}async function ox(t){let e;try{e=await t()}catch(i){if(i instanceof Response)e=i;else throw console.log(i),i}if(e.headers.get("x-tss-raw")==="true")return e;const r=e.headers.get("content-type");if(r||ln(),e.headers.get("x-tss-serialized")){let i;if(r.includes("application/x-tss-framed")){if(iT(r),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:c}=rx(e.body),u=[Q1(o),...Uo||[]],d=new Map;i=await lx({jsonStream:c,onMessage:f=>jv(f,{refs:d,plugins:u}),onError(f,p){console.error(f,p)}})}else if(r.includes("application/json")){const o=await e.json(),c=[];i=jv(o,{plugins:Uo}),await hf(c)}if(i||ln(),i instanceof Error)throw i;return i}if(r.includes("application/json")){const i=await e.json(),o=qT(i);if(o)throw o;if(Ot(i))throw i;return i}if(!e.ok)throw new Error(await e.text());return e}async function lx({jsonStream:t,onMessage:e,onError:r}){const i=t.getReader(),{value:o,done:c}=await i.read();if(c||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let d=!1;const f=(async()=>{try{for(;;){const{value:g,done:v}=await i.read();if(v)break;if(g)try{const w=[];try{e(JSON.parse(g))}finally{}await hf(w)}catch(w){r?.(`Invalid JSON: ${g}`,w)}}}catch(g){d||r?.("Stream processing error:",g)}})();let p;const y=[];try{p=e(u)}catch(g){throw d=!0,i.cancel().catch(()=>{}),g}return await hf(y),Promise.resolve(p).catch(()=>{d=!0,i.cancel().catch(()=>{})}),f.finally(()=>{try{i.releaseLock()}catch{}}),p}function cx(t){const e="/_serverFn/"+t;return Object.assign((...o)=>{const c=pb()?.serverFns?.fetch;return ix(e,o,c??fetch)},{url:e,serverFnMeta:{id:t},[lf]:!0})}var ux={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(lf in t)?!1:!!t[lf],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>cx(t)};function Hv(t){return t.replaceAll("\0","/").replaceAll("�","/")}function dx(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function hx(t){window.$_TSR||ln();const e=t.options.serializationAdapters;if(e?.length){const S=new Map;e.forEach(E=>{S.set(E.key,E.fromSerializable)}),window.$_TSR.t=S,window.$_TSR.buffer.forEach(E=>E())}window.$_TSR.initialized=!0,window.$_TSR.router||ln();const r=window.$_TSR.router;
12r.matches.forEach(S=>{S.i=Hv(S.i)}),r.lastMatchId&&(r.lastMatchId=Hv(r.lastMatchId));const{manifest:i,dehydratedData:o,lastMatchId:c}=r;t.ssr={manifest:i};const u=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:u};const d=t.matchRoutes(t.stores.location.get()),f=Promise.all(d.map(S=>t.loadRouteChunk(t.looseRoutesById[S.routeId])));function p(S){const E=t.looseRoutesById[S.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(E){const A=ui();S._nonReactive.minPendingPromise=A,S._forcePending=!0,setTimeout(()=>{A.resolve(),t.updateMatch(S.id,O=>(O._nonReactive.minPendingPromise=void 0,{...O,_forcePending:void 0}))},E)}}function y(S){const E=t.looseRoutesById[S.routeId];E&&(E.options.ssr=S.ssr)}let g;d.forEach(S=>{const E=r.matches.find(A=>A.i===S.id);if(!E){S._nonReactive.dehydrated=!1,S.ssr=!1,y(S);return}dx(S,E),y(S),S._nonReactive.dehydrated=S.ssr!==!1,(S.ssr==="data-only"||S.ssr===!1)&&g===void 0&&(g=S.index,p(S))}),t.stores.setMatches(d),await t.options.hydrate?.(o);const v=t.stores.matches.get(),w=t.stores.location.get();await Promise.all(v.map(async S=>{try{const E=t.looseRoutesById[S.routeId],A=v[S.index-1]?.context??t.options.context;if(E.options.context){const H={deps:S.loaderDeps,params:S.params,context:A??{},location:w,navigate:P=>t.navigate({...P,_fromLocation:w}),buildLocation:t.buildLocation,cause:S.cause,abortController:S.abortController,preload:!1,matches:d,routeId:E.id};
12S.__routeContext=E.options.context(H)??void 0}S.context={...A,...S.__routeContext,...S.__beforeLoadContext};const O={ssr:t.options.ssr,matches:v,match:S,params:S.params,loaderData:S.loaderData},j=await E.options.head?.(O),q=await E.options.scripts?.(O);S.meta=j?.meta,S.links=j?.links,S.headScripts=j?.scripts,S.styles=j?.styles,S.scripts=q}catch(E){if(Ot(E))S.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${S.routeId}`,E);else throw S.error=E,console.error(`Error during hydration for route ${S.routeId}:`,E),E}}));const _=d[d.length-1].id!==c;if(!d.some(S=>S.ssr===!1)&&!_)return d.forEach(S=>{S._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),f;const R=Promise.resolve().then(()=>t.load()).catch(S=>{console.error("Error during router hydration:",S)});if(_){const S=d[1];S||ln(),p(S),S._displayPending=!0,S._nonReactive.displayPendingPromise=R,R.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(S.id,E=>({...E,_displayPending:void 0,displayPendingPromise:void 0}))})})}return f}var qc=J.use,Ro=typeof window<"u"?J.useLayoutEffect:J.useEffect;function Hh(t){const e=J.useRef({value:t,prev:null}),r=e.current.value;return t!==r&&(e.current={value:t,prev:r}),e.current.prev}function fx(t,e,r={},i={}){J.useEffect(()=>{if(!t.current||i.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{e(c)},r);return o.observe(t.current),()=>{o.disconnect()}},[e,r,i.disabled,t])}function px(t){const e=J.useRef(null);return J.useImperativeHandle(t,()=>e.current,[]),e}function mx({promise:t}){if(qc)return qc(t);const e=uR(t);if(e[er].status==="pending")throw e;if(e[er].status==="error")throw e[er].error;return e[er].data}function gx(t){const e=N.jsx(yx,{...t});return t.fallback?N.jsx(J.Suspense,{fallback:t.fallback,children:e}):e}function yx(t){const e=mx(t);return t.children(e)}function Kf(t){const e=t.errorComponent??Yf;return N.jsx(vx,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:r,reset:i})=>r?J.createElement(e,{error:r,reset:i}):t.children})}var vx=class extends J.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const r=t.getResetKey();return e.error&&e.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Yf({error:t}){const[e,r]=J.useState(!1);return N.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[N.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),N.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(i=>!i),children:e?"Hide Error":"Show Error"})]}),N.jsx("div",{style:{height:".25rem"}}),e?N.jsx("div",{children:N.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?N.jsx("code",{children:t.message}):null})}):null]})}function bx({children:t,fallback:e=null}){return Qf()?N.jsx(ee.Fragment,{children:t}):N.jsx(ee.Fragment,{children:e})}function Qf(){return ee.useSyncExternalStore(wx,()=>!0,()=>!1)}function wx(){return()=>{}}var cw=J.createContext(null);function _t(t){return J.useContext(cw)}var du=J.createContext(void 0),_x=J.createContext(void 0),We=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(We||{});function Sx({update:t,notify:e,unwatched:r}){return{link:i,unlink:o,propagate:c,checkDirty:u,shallowPropagate:d};function i(p,y,g){const v=y.depsTail;if(v!==void 0&&v.dep===p)return;const w=v!==void 0?v.nextDep:y.deps;if(w!==void 0&&w.dep===p){w.version=g,y.depsTail=w;return}const _=p.subsTail;if(_!==void 0&&_.version===g&&_.sub===y)return;const R=y.depsTail=p.subsTail={version:g,dep:p,sub:y,prevDep:v,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=R),v!==void 0?v.nextDep=R:y.deps=R,_!==void 0?_.nextSub=R:p.subs=R}function o(p,y=p.sub){const g=p.dep,v=p.prevDep,w=p.nextDep,_=p.nextSub,R=p.prevSub;return w!==void 0?w.prevDep=v:y.depsTail=v,v!==void 0?v.nextDep=w:y.deps=w,_!==void 0?_.prevSub=R:g.subsTail=R,R!==void 0?R.nextSub=_:(g.subs=_)===void 0&&r(g),w}function c(p){let y=p.nextSub,g;e:do{const v=p.sub;let w=v.flags;if(w&60?w&12?w&4?!(w&48)&&f(p,v)?(v.flags=w|40,w&=1):w=0:v.flags=w&-9|32:w=0:v.flags=w|32,w&2&&e(v),w&1){const _=v.subs;if(_!==void 0){const R=(p=_).nextSub;R!==void 0&&(g={value:y,prev:g},y=R);continue}}if((p=y)!==void 0){y=p.nextSub;continue}for(;g!==void 0;)if(p=g.value,g=g.prev,p!==void 0){y=p.nextSub;continue e}break}while(!0)}function u(p,y){let g,v=0,w=!1;e:do{const _=p.dep,R=_.flags;if(y.flags&16)w=!0;else if((R&17)===17){if(t(_)){const S=_.subs;S.nextSub!==void 0&&d(S),w=!0}}else if((R&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(g={value:p,prev:g}),p=_.deps,y=_,++v;continue}if(!w){const S=p.nextDep;if(S!==void 0){p=S;continue}}for(;v--;){const S=y.subs,E=S.nextSub!==void 0;
12if(E?(p=g.value,g=g.prev):p=S,w){if(t(y)){E&&d(S),y=p.sub;continue}w=!1}else y.flags&=-33;y=p.sub;const A=p.nextDep;if(A!==void 0){p=A;continue e}}return w}while(!0)}function d(p){do{const y=p.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&e(y))}while((p=p.nextSub)!==void 0)}function f(p,y){let g=y.depsTail;for(;g!==void 0;){if(g===p)return!0;g=g.prevDep}return!1}}function Ex(t,e,r){const i=typeof t=="object",o=i?t:void 0;return{next:(i?t.next:t)?.bind(o),error:(i?t.error:e)?.bind(o),complete:(i?t.complete:r)?.bind(o)}}const ff=[];let Lc=0;const{link:$v,unlink:Tx,propagate:Rx,checkDirty:uw,shallowPropagate:qv}=Sx({update(t){return t._update()},notify(t){ff[pf++]=t,t.flags&=~We.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=We.Mutable|We.Dirty,Vc(t))}});let mc=0,pf=0,Zn,mf=0;function dw(t){try{++mf,t()}finally{--mf||hw()}}function Vc(t){const e=t.depsTail;let r=e!==void 0?e.nextDep:t.deps;for(;r!==void 0;)r=Tx(r,t)}function hw(){if(!(mf>0)){for(;mc<pf;){const t=ff[mc];ff[mc++]=void 0,t.notify()}mc=0,pf=0}}function Vv(t,e){const r=typeof t=="function",i=t,o={_snapshot:r?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?We.None:We.Mutable,get(){return Zn!==void 0&&$v(o,Zn,Lc),o._snapshot},subscribe(c){const u=Ex(c),d={current:!1},f=Ax(()=>{o.get(),d.current?u.next?.(o._snapshot):d.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(c){const u=Zn,d=e?.compare??Object.is;if(r)Zn=o,++Lc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=We.Mutable|We.RecursedCheck);try{const f=o._snapshot,p=typeof c=="function"?c(f):c===void 0&&r?i(f):c;return f===void 0||!d(f,p)?(o._snapshot=p,!0):!1}finally{Zn=u,r&&(o.flags&=~We.RecursedCheck),Vc(o)}}};return r?(o.flags=We.Mutable|We.Dirty,o.get=function(){const c=o.flags;if(c&We.Dirty||c&We.Pending&&uw(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&qv(u)}}else c&We.Pending&&(o.flags=c&~We.Pending);return Zn!==void 0&&$v(o,Zn,Lc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(Rx(u),qv(u),hw())}},o}function Ax(t){const e=()=>{const i=Zn;Zn=r,++Lc,r.depsTail=void 0,r.flags=We.Watching|We.RecursedCheck;try{return t()}finally{Zn=i,r.flags&=~We.RecursedCheck,Vc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:We.Watching|We.RecursedCheck,notify(){const i=this.flags;i&We.Dirty||i&We.Pending&&uw(this.deps,this)?e():this.flags=We.Watching},stop(){this.flags=We.None,this.depsTail=void 0,Vc(this)}};return e(),r}var $h={exports:{}},qh={},Vh={exports:{}},Gh={};var Gv;function xx(){if(Gv)return Gh;Gv=1;var t=Ko();function e(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:e,i=t.useState,o=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function d(g,v){var w=v(),_=i({inst:{value:w,getSnapshot:v}}),R=_[0].inst,S=_[1];return c(function(){R.value=w,R.getSnapshot=v,f(R)&&S({inst:R})},[g,w,v]),o(function(){return f(R)&&S({inst:R}),g(function(){f(R)&&S({inst:R})})},[g]),u(w),w}function f(g){var v=g.getSnapshot;g=g.value;try{var w=v();return!r(g,w)}catch{return!0}}function p(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return Gh.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Gh}var Fv;function Ox(){return Fv||(Fv=1,Vh.exports=xx()),Vh.exports}var Kv;function Cx(){if(Kv)return qh;Kv=1;var t=Ko(),e=Ox();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var i=typeof Object.is=="function"?Object.is:r,o=e.useSyncExternalStore,c=t.useRef,u=t.useEffect,d=t.useMemo,f=t.useDebugValue;return qh.useSyncExternalStoreWithSelector=function(p,y,g,v,w){var _=c(null);if(_.current===null){var R={hasValue:!1,value:null};_.current=R}else R=_.current;_=d(function(){function E(H){if(!A){if(A=!0,O=H,H=v(H),w!==void 0&&R.hasValue){var P=R.value;if(w(P,H))return j=P}return j=H}if(P=j,i(O,H))return P;var M=v(H);return w!==void 0&&w(P,M)?(O=H,P):(O=H,j=M)}var A=!1,O,j,q=g===void 0?null:g;return[function(){return E(y())},q===null?void 0:function(){return E(q())}]},[y,g,v,w]);var S=o(p,_[0],_[1]);return u(function(){R.hasValue=!0,R.value=S},[S]),f(S),S},qh}var Yv;function kx(){return Yv||(Yv=1,$h.exports=Cx()),$h.exports}var Nx=kx();function jx(t,e){return t===e}function lt(t,e,r=jx){const i=J.useCallback(u=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(u);return d},[t]),o=J.useCallback(()=>t?.get(),[t]);return Nx.useSyncExternalStoreWithSelector(i,o,o,e,r)}var Mx={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function hi(t){const e=_t(),r=J.useContext(t.from?_x:du),i=t.from??r,o=i?t.from?e.stores.getRouteMatchStore(i):e.stores.matchStores.get(i):void 0,c=J.useRef(void 0);return lt(o??Mx,u=>{if((t.shouldThrow??!0)&&!u&&ln(),u===void 0)return;const d=t.select?t.select(u):u;if(t.structuralSharing??e.options.defaultStructuralSharing){const f=vs(c.current,d);return c.current=f,f}return d})}function fw(t){return hi({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function pw(t){const{select:e,...r}=t;return hi({...r,select:i=>e?e(i.loaderDeps):i.loaderDeps})}function mw(t){return hi({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const r=t.strict===!1?e.params:e._strictParams;return t.select?t.select(r):r}})}function gw(t){return hi({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function yw(t){const e=_t();return J.useCallback(r=>e.navigate({...r,from:r.from??t?.from}),[t?.from,e])}function vw(t){return hi({...t,select:e=>t.select?t.select(e.context):e.context})}var bw=fb();const Dx=hb(bw);function Lx(t,e){const r=_t(),i=px(e),{activeProps:o,inactiveProps:c,activeOptions:u,to:d,preload:f,preloadDelay:p,preloadIntentProximity:y,hashScrollIntoView:g,replace:v,startTransition:w,resetScroll:_,viewTransition:R,children:S,target:E,disabled:A,style:O,className:j,onClick:q,onBlur:H,onFocus:P,onMouseEnter:M,onMouseLeave:Q,onTouchStart:re,ignoreBlocker:ne,params:fe,search:ye,hash:Le,state:Re,mask:L,reloadDocument:Y,unsafeRelative:ie,from:_e,_fromLocation:W,...C}=t,V=Qf(),F=J.useMemo(()=>t,[r,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),Z=lt(r.stores.location,ze=>ze,(ze,tt)=>ze.href===tt.href),X=J.useMemo(()=>{const ze={_fromLocation:Z,...F}
12;return r.buildLocation(ze)},[r,Z,F]),se=X.maskedLocation?X.maskedLocation.publicHref:X.publicHref,be=X.maskedLocation?X.maskedLocation.external:X.external,ge=J.useMemo(()=>Hx(se,be,r.history,A),[A,be,se,r.history]),he=J.useMemo(()=>{if(ge?.external)return zc(ge.href,r.protocolAllowlist)?void 0:ge.href;if(!$x(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),zc(d,r.protocolAllowlist)?void 0:d}catch{}},[d,ge,r.protocolAllowlist]),Ct=J.useMemo(()=>{if(he)return!1;if(u?.exact){if(!OT(Z.pathname,X.pathname,r.basepath))return!1}else{const ze=Ic(Z.pathname,r.basepath),tt=Ic(X.pathname,r.basepath);if(!(ze.startsWith(tt)&&(ze.length===tt.length||ze[tt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!an(Z.search,X.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?V&&Z.hash===X.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,Z,he,V,X.hash,X.pathname,X.search,r.basepath]),gt=Ct?ys(o,{})??Ux:Fh,ct=Ct?Fh:ys(c,{})??Fh,Mn=[j,gt.className,ct.className].filter(Boolean).join(" "),yt=(O||gt.style||ct.style)&&{...O,...gt.style,...ct.style},[Cs,sr]=J.useState(!1),qn=J.useRef(!1),bn=t.reloadDocument||he?!1:f??r.options.defaultPreload,kt=p??r.options.defaultPreloadDelay??0,cn=J.useCallback(()=>{r.preloadRoute({...F,_builtLocation:X}).catch(ze=>{console.warn(ze),console.warn(dR)})},[r,F,X]);fx(i,J.useCallback(ze=>{ze?.isIntersecting&&cn()},[cn]),Bx,{disabled:!!A||bn!=="viewport"}),J.useEffect(()=>{qn.current||!A&&bn==="render"&&(cn(),qn.current=!0)},[A,cn,bn]);const ks=ze=>{const tt=ze.currentTarget.getAttribute("target"),wn=E!==void 0?E:tt;if(!A&&!qx(ze)&&!ze.defaultPrevented&&(!wn||wn==="_self")&&ze.button===0){ze.preventDefault(),bw.flushSync(()=>{sr(!0)});const ir=r.subscribe("onResolved",()=>{ir(),sr(!1)});r.navigate({...F,replace:v,resetScroll:_,hashScrollIntoView:g,startTransition:w,viewTransition:R,ignoreBlocker:ne})}};if(he)return{...C,ref:i,href:he,...S&&{children:S},...E&&{target:E},...A&&{disabled:A},...O&&{style:O},...j&&{className:j},...q&&{onClick:q},...H&&{onBlur:H},...P&&{onFocus:P},...M&&{onMouseEnter:M},...Q&&{onMouseLeave:Q},...re&&{onTouchStart:re}};const St=ze=>{if(A||bn!=="intent")return;if(!kt){cn();return}const tt=ze.currentTarget;if(bo.has(tt))return;const wn=setTimeout(()=>{bo.delete(tt),cn()},kt);bo.set(tt,wn)},Vn=ze=>{A||bn!=="intent"||cn()},Et=ze=>{if(A||!bn||!kt)return;const tt=ze.currentTarget,wn=bo.get(tt);wn&&(clearTimeout(wn),bo.delete(tt))};return{...C,...gt,...ct,href:ge?.href,ref:i,onClick:na([q,ks]),onBlur:na([H,Et]),onFocus:na([P,St]),onMouseEnter:na([M,St]),onMouseLeave:na([Q,Et]),onTouchStart:na([re,Vn]),disabled:!!A,target:E,...yt&&{style:yt},...Mn&&{className:Mn},...A&&Px,...Ct&&zx,...V&&Cs&&Ix}}var Fh={},Ux={className:"active"},Px={role:"link","aria-disabled":!0},zx={"data-status":"active","aria-current":"page"},Ix={"data-transitioning":"transitioning"},bo=new WeakMap,Bx={rootMargin:"100px"},na=t=>e=>{for(const r of t)if(r){if(e.defaultPrevented)return;r(e)}};function Hx(t,e,r,i){if(!i)return e?{href:t,external:!0}:{href:r.createHref(t)||"/",external:!1}}function $x(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Gt=J.forwardRef((t,e)=>{const{_asChild:r,...i}=t,{type:o,...c}=Lx(i,e),u=typeof i.children=="function"?i.children({isActive:c["data-status"]==="active"}):i.children;if(!r){const{disabled:d,...f}=c;return J.createElement("a",f,u)}return J.createElement(r,c,u)});function qx(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var Vx=class extends Ab{constructor(e){super(e),this.useMatch=r=>hi({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>vw({...r,from:this.id}),this.useSearch=r=>gw({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>mw({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>pw({...r,from:this.id}),this.useLoaderData=r=>fw({...r,from:this.id}),this.useNavigate=()=>yw({from:this.fullPath}),this.Link=ee.forwardRef((r,i)=>N.jsx(Gt,{ref:i,from:this.fullPath,...r}))}};function Gx(t){return new Vx(t)}function Fx(){return t=>Yx(t)}var Kx=class extends mR{constructor(t){super(t),this.useMatch=e=>hi({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>vw({...e,from:this.id}),this.useSearch=e=>gw({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>mw({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>pw({...e,from:this.id}),this.useLoaderData=e=>fw({...e,from:this.id}),this.useNavigate=()=>yw({from:this.fullPath}),this.Link=ee.forwardRef((e,r)=>N.jsx(Gt,{ref:r,from:this.fullPath,...e}))}};function Yx(t){return new Kx(t)}function Qe(t){return new Qx(t,{silent:!0}).createRoute}var Qx=class{constructor(t,e){this.path=t,this.createRoute=r=>{const i=Gx(r);return i.isRoot=!1,i},this.silent=e?.silent}};function Ve(t,e){let r,i,o,c;const u=()=>(r||(r=t().then(f=>{r=void 0,i=f[e??"default"]}).catch(f=>{if(o=f,cT(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),c=!0)}})),r),d=function(p){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!i)if(qc)qc(u());else throw u();return J.createElement(i,p)};return d.preload=u,d}function Jx(t){const e=_t(),r=`not-found-${lt(e.stores.location,i=>i.pathname)}-${lt(e.stores.status,i=>i)}`;return N.jsx(Kf,{getResetKey:()=>r,onCatch:(i,o)=>
12{if(Ot(i))t.onCatch?.(i,o);else throw i},errorComponent:({error:i})=>{if(Ot(i))return t.fallback?.(i);throw i},children:t.children})}function Xx(){return N.jsx("p",{children:"Not Found"})}function oa(t){return N.jsx(N.Fragment,{children:t.children})}function ww(t,e,r){return e.options.notFoundComponent?N.jsx(e.options.notFoundComponent,{...r}):t.options.defaultNotFoundComponent?N.jsx(t.options.defaultNotFoundComponent,{...r}):N.jsx(Xx,{})}function Zx(t){return null}function Wx(){return Zx(_t()),null}var _w=J.memo(function({matchId:e}){const r=_t(),i=r.stores.matchStores.get(e);i||ln();const o=lt(r.stores.loadedAt,u=>u),c=lt(i,u=>u);return N.jsx(eO,{router:r,matchId:e,resetKey:o,matchState:J.useMemo(()=>{const u=c.routeId,d=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:d}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function eO({router:t,matchId:e,resetKey:r,matchState:i}){const o=t.routesById[i.routeId],c=o.options.pendingComponent??t.options.defaultPendingComponent,u=c?N.jsx(c,{}):null,d=o.options.errorComponent??t.options.defaultErrorComponent,f=o.options.onCatch??t.options.defaultOnCatch,p=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=i.ssr===!1||i.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??c??(o.options.errorComponent?.preload||y))?J.Suspense:oa,v=d?Kf:oa,w=p?Jx:oa;return N.jsxs(o.isRoot?o.options.shellComponent??oa:oa,{children:[N.jsx(du.Provider,{value:e,children:N.jsx(g,{fallback:u,children:N.jsx(v,{getResetKey:()=>r,errorComponent:d||Yf,onCatch:(_,R)=>{if(Ot(_))throw _.routeId??=i.routeId,_;f?.(_,R)},children:N.jsx(w,{fallback:_=>{if(_.routeId??=i.routeId,!p||_.routeId&&_.routeId!==i.routeId||!_.routeId&&!o.isRoot)throw _;return J.createElement(p,_)},children:y||i._displayPending?N.jsx(bx,{fallback:u,children:N.jsx(Qv,{matchId:e})}):N.jsx(Qv,{matchId:e})})})})}),i.parentRouteId===li?N.jsxs(N.Fragment,{children:[N.jsx(tO,{resetKey:r}),t.options.scrollRestoration&&mb?N.jsx(Wx,{}):null]}):null]})}function tO({resetKey:t}){const e=_t(),r=J.useRef(void 0);return Ro(()=>{const i=e.latestLocation.href;(r.current===void 0||r.current!==i)&&(e.emit({type:"onRendered",...fa(e.stores.location.get(),e.stores.resolvedLocation.get())}),r.current=i)},[e.latestLocation.state.__TSR_key,t,e]),null}var Qv=J.memo(function({matchId:e}){const r=_t(),i=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=r.stores.matchStores.get(e);o||ln();const c=lt(o,y=>y),u=c.routeId,d=r.routesById[u],f=J.useMemo(()=>{const y=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return y?JSON.stringify(y):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,r.options.defaultRemountDeps,r.routesById]),p=J.useMemo(()=>{const y=d.options.component??r.options.defaultComponent;return y?N.jsx(y,{},f):N.jsx(Sw,{})},[f,d.options.component,r.options.defaultComponent]);if(c._displayPending)throw i(c,"displayPendingPromise");if(c._forcePending)throw i(c,"minPendingPromise");if(c.status==="pending"){const y=d.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const v=ui();g._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw i(c,"loadPromise")}if(c.status==="notFound")return Ot(c.error)||ln(),ww(r,d,c.error);if(c.status==="redirected")throw on(c.error)||ln(),i(c,"loadPromise");if(c.status==="error")throw c.error;return p}),Sw=J.memo(function(){const e=_t(),r=J.useContext(du);let i,o=!1,c;{const p=r?e.stores.matchStores.get(r):void 0;[i,o]=lt(p,y=>[y?.routeId,y?.globalNotFound??!1]),c=lt(e.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const u=i?e.routesById[i]:void 0,d=e.options.defaultPendingComponent?N.jsx(e.options.defaultPendingComponent,{}):null;if(o)return u||ln(),ww(e,u,void 0);if(!c)return null;const f=N.jsx(_w,{matchId:c});return i===li?N.jsx(J.Suspense,{fallback:d,children:f}):f});function nO(){const t=_t(),e=J.useRef({router:t,mounted:!1}),[r,i]=J.useState(!1),o=lt(t.stores.isLoading,g=>g),c=lt(t.stores.hasPending,g=>g),u=Hh(o),d=o||r||c,f=Hh(d),p=o||c,y=Hh(p);return t.startTransition=g=>{i(!0),J.startTransition(()=>{g(),i(!1)})},J.useEffect(()=>{const g=t.history.subscribe(t.load),v=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return _s(t.latestLocation.publicHref)!==_s(v.publicHref)&&t.commitLocation({...v,replace:!0}),()=>{g()}},[t,t.history]),Ro(()=>
12{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(v){console.error(v)}})()},[t]),Ro(()=>{u&&!o&&t.emit({type:"onLoad",...fa(t.stores.location.get(),t.stores.resolvedLocation.get())})},[u,t,o]),Ro(()=>{y&&!p&&t.emit({type:"onBeforeRouteMount",...fa(t.stores.location.get(),t.stores.resolvedLocation.get())})},[p,y,t]),Ro(()=>{if(f&&!d){const g=fa(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),dw(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),g.hrefChanged&&gR(t)}},[d,f,t]),null}function rO(){const t=_t(),e=t.routesById[li].options.pendingComponent??t.options.defaultPendingComponent,r=e?N.jsx(e,{}):null,i=N.jsxs(typeof document<"u"&&t.ssr?oa:J.Suspense,{fallback:r,children:[N.jsx(nO,{}),N.jsx(sO,{})]});return t.options.InnerWrap?N.jsx(t.options.InnerWrap,{children:i}):i}function sO(){const t=_t(),e=lt(t.stores.firstId,o=>o),r=lt(t.stores.loadedAt,o=>o),i=e?N.jsx(_w,{matchId:e}):null;return N.jsx(du.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?i:N.jsx(Kf,{getResetKey:()=>r,errorComponent:Yf,onCatch:void 0,children:i})})}var iO=t=>({createMutableStore:Vv,createReadonlyStore:Vv,batch:dw}),aO=t=>new oO(t),oO=class extends rR{constructor(t){super(t,iO)}};function lO({router:t,children:e,...r}){Object.keys(r).length>0&&t.update({...t.options,...r,context:{...t.options.context,...r.context}});const i=N.jsx(cw.Provider,{value:t,children:e});return t.options.Wrap?N.jsx(t.options.Wrap,{children:i}):i}function cO({router:t,...e}){return N.jsx(lO,{router:t,...e,children:N.jsx(rO,{})})}function uO(t){const e=_t({warn:t?.router===void 0}),r=t?.router||e,i=J.useRef(void 0);return lt(r.stores.__store,o=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const c=vs(i.current,t.select(o));return i.current=c,c}return t.select(o)}return o})}function Ew(t){const{attrs:e,children:r,nonce:i}=t;switch(t.tag){case"title":return N.jsx("title",{...e,suppressHydrationWarning:!0,children:r});case"meta":return N.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return N.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return t.inlineCss,N.jsx("style",{...e,dangerouslySetInnerHTML:{__html:r},nonce:i});case"script":return N.jsx(dO,{attrs:e,children:r});default:return null}}function dO({attrs:t,children:e}){_t();const r=Qf(),i=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(J.useEffect(()=>{if(!i){if(t?.src){const o=(()=>{try{const u=document.baseURI||window.location.href;return new URL(t.src,u).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===o))return;const c=document.createElement("script");for(const[u,d]of Object.entries(t))u!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&c.setAttribute(u,typeof d=="boolean"?"":String(d));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof e=="string"){const o=typeof t?.type=="string"?t.type:"text/javascript",c=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const f=d.getAttribute("type")??"text/javascript",p=d.getAttribute("nonce")??void 0;return d.textContent===e&&f===o&&p===c}))return;const u=document.createElement("script");if(u.textContent=e,t)for(const[d,f]of Object.entries(t))d!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&u.setAttribute(d,typeof f=="boolean"?"":String(f));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[t,e,i]),i&&typeof e=="string")return N.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!r){if(t?.src)return N.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return N.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var hO=t=>{const e=_t(),r=e.options.ssr?.nonce,i=lt(e.stores.matches,p=>p.map(y=>
12y.meta).filter(Boolean),an),o=J.useMemo(()=>{const p=[],y={};let g;for(let v=i.length-1;v>=0;v--){const w=i[v];for(let _=w.length-1;_>=0;_--){const R=w[_];if(R)if(R.title)g||(g={tag:"title",children:R.title});else if("script:ld+json"in R)try{const S=JSON.stringify(R["script:ld+json"]);p.push({tag:"script",attrs:{type:"application/ld+json"},children:pT(S)})}catch{}else{const S=R.name??R.property;if(S){if(y[S])continue;y[S]=!0}p.push({tag:"meta",attrs:{...R,nonce:r}})}}}return g&&p.push(g),r&&p.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),p.reverse(),p},[i,r]),c=lt(e.stores.matches,p=>{const y=p.map(w=>w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),g=e.ssr?.manifest,v=p.map(w=>g?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?pR(g,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:Ov(t,"stylesheet")??w.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:w.tag==="style"?[{tag:"style",attrs:{...w.attrs,nonce:r},children:w.children,...w.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...v]},an),u=lt(e.stores.matches,p=>{const y=[];return p.map(g=>e.looseRoutesById[g.routeId]).forEach(g=>e.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(v=>{const w=hR(v);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:Ov(t,"modulepreload")??w.crossOrigin,nonce:r}})})),y},an),d=lt(e.stores.matches,p=>p.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),an),f=lt(e.stores.matches,p=>p.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),an);return fO([...o,...u,...c,...d,...f],p=>JSON.stringify(p))};function fO(t,e){const r=new Set;return t.filter(i=>{const o=e(i);return r.has(o)?!1:(r.add(o),!0)})}function pO(t){const e=hO(t.assetCrossOrigin),r=_t().options.ssr?.nonce;return N.jsx(N.Fragment,{children:e.map(i=>J.createElement(Ew,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:r}))})}var mO=()=>{const t=_t(),e=t.options.ssr?.nonce,r=c=>{const u=[],d=t.ssr?.manifest;return d?(c.map(f=>t.looseRoutesById[f.routeId]).forEach(f=>d.routes[f.id]?.assets?.filter(p=>p.tag==="script").forEach(p=>{u.push({tag:"script",attrs:{...p.attrs,nonce:e},children:p.children})})),u):[]},i=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:e},children:u})),o=lt(t.stores.matches,r,an);return gO(t,lt(t.stores.matches,i,an),o)};function gO(t,e,r){let i;t.serverSsr&&(i=t.serverSsr.takeBufferedScripts());const o=[...e,...r];return i&&o.unshift(i),N.jsx(N.Fragment,{children:o.map((c,u)=>J.createElement(Ew,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}var ii=(t,e)=>{const r={type:"request",...e||t};return{options:r,middleware:i=>ii({},Object.assign(r,{middleware:i})),inputValidator:i=>ii({},Object.assign(r,{inputValidator:i})),client:i=>ii({},Object.assign(r,{client:i})),server:i=>ii({},Object.assign(r,{server:i}))}};function Tw(t,e){for(let r=0,i=e.length;r<i;r++){const o=e[r];t.has(o)||(t.add(o),o.extends&&Tw(t,o.extends))}}var yO=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const r=new Set;Tw(r,e.serializationAdapters),e.serializationAdapters=Array.from(r)}return e},createMiddleware:ii});function vO(t,e,r,i){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function d(y){try{p(i.next(y))}catch(g){u(g)}}function f(y){try{p(i.throw(y))}catch(g){u(g)}}function p(y){y.done?c(y.value):o(y.value).then(d,f)}p((i=i.apply(t,e||[])).next())})}const bO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Jf extends Error{constructor(e,r="FunctionsError",i){super(e),this.name=r,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class wO extends Jf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Jv extends Jf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Xv extends Jf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var gf;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(gf||(gf={}));class _O{constructor(e,{headers:r={},customFetch:i,region:o=gf.Any}={}){this.url=e,this.headers=r,this.region=o,this.fetch=bO(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return vO(this,arguments,void 0,function*(r,i={}){var o;let c,u;try{const{headers:d,method:f,body:p,signal:y,timeout:g}=i;let v={},{region:w}=i;w||(w=this.region);const _=new URL(`${this.url}/${r}`);w&&w!=="any"&&(v["x-region"]=w,_.searchParams.set("forceFunctionRegion",w));let R;p&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&p instanceof Blob||p instanceof ArrayBuffer?(v["Content-Type"]="application/octet-stream",R=p):typeof p=="string"?(v["Content-Type"]="text/plain",R=p):typeof FormData<"u"&&p instanceof FormData?R=p:(v["Content-Type"]="application/json",R=JSON.stringify(p)):p&&typeof p!="string"&&!(typeof Blob<"u"&&p instanceof Blob)&&!(p instanceof ArrayBuffer)&&!(typeof FormData<"u"&&p instanceof FormData)?R=JSON.stringify(p):R=p;let S=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(S=u.signal,y.addEventListener("abort",()=>u.abort())):S=u.signal);const E=yield this.fetch(_.toString(),{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},v),this.headers),d),body:R,signal:S}
12).catch(q=>{throw new wO(q)}),A=E.headers.get("x-relay-error");if(A&&A==="true")throw new Jv(E);if(!E.ok)throw new Xv(E);let O=((o=E.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),j;return O==="application/json"?j=yield E.json():O==="application/octet-stream"||O==="application/pdf"?j=yield E.blob():O==="text/event-stream"?j=E:O==="multipart/form-data"?j=yield E.formData():j=yield E.text(),{data:j,error:null,response:E}}catch(d){return{data:null,error:d,response:d instanceof Xv||d instanceof Jv?d.context:void 0}}finally{c&&clearTimeout(c)}})}}const Rw=3,Zv=t=>Math.min(1e3*2**t,3e4),SO=[520,503],Aw=["GET","HEAD","OPTIONS"];var Wv=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function e0(t,e){return new Promise(r=>{if(e?.aborted){r();return}const i=setTimeout(()=>{e?.removeEventListener("abort",o),r()},t);function o(){clearTimeout(i),r()}e?.addEventListener("abort",o)})}function EO(t,e,r,i){return!(!i||r>=Rw||!Aw.includes(t)||!SO.includes(e))}var TO=class{constructor(t){var e,r,i,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(i=t.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(o=t.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=t.retry)!==null&&c!==void 0?c:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let c=(async()=>{let u=0;for(;;){const p={};r.headers.forEach((g,v)=>{p[v]=g}),u>0&&(p["X-Retry-Count"]=String(u));let y;try{y=await i(r.url.toString(),{method:r.method,headers:p,body:JSON.stringify(r.body,(g,v)=>typeof v=="bigint"?v.toString():v),signal:r.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!Aw.includes(r.method))throw g;if(r.retryEnabled&&u<Rw){const v=Zv(u);u++,await e0(v,r.signal);continue}throw g}if(EO(r.method,y.status,u,r.retryEnabled)){var d,f;const g=(d=(f=y.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&d!==void 0?d:null,v=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:Zv(u);await y.text(),u++,await e0(v,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var d;let f="",p="",y="";const g=u?.cause;if(g){var v,w,_,R;const A=(v=g?.message)!==null&&v!==void 0?v:"",O=(w=g?.code)!==null&&w!==void 0?w:"";f=`${(_=u?.name)!==null&&_!==void 0?_:"FetchError"}: ${u?.message}`,f+=` 13 14Caused by: ${(R=g?.name)!==null&&R!==void 0?R:"Error"}: ${A}`,O&&(f+=` (${O})`),g?.stack&&(f+=` 15${g.stack}`)}else{var S;f=(S=u?.stack)!==null&&S!==void 0?S:""}const E=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",p="Request was aborted (timeout or manual cancellation)",E>this.urlLengthLimit&&(p+=`. Note: Your request URL is ${E} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",p="HTTP headers exceeded server limits (typically 16KB)",E>this.urlLengthLimit&&(p+=`. Your request URL is ${E} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=u?.
15name)!==null&&d!==void 0?d:"FetchError"}: ${u?.message}`,details:f,hint:p,code:y},data:null,count:null,status:0,statusText:""}})),c.then(t,e)}async processResponse(t){var e=this;let r=null,i=null,o=null,c=t.status,u=t.statusText;if(t.ok){var d,f;if(e.method!=="HEAD"){var p;const v=await t.text();if(v!=="")if(e.headers.get("Accept")==="text/csv")i=v;else if(e.headers.get("Accept")&&(!((p=e.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text")))i=v;else try{i=JSON.parse(v)}catch{if(r={message:v},i=null,e.shouldThrowOnError)throw new Wv({message:v,details:"",hint:"",code:""})}}const y=(d=e.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),g=(f=t.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),e.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(r={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,o=null,c=406,u="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const y=await t.text();try{r=JSON.parse(y),Array.isArray(r)&&t.status===404&&(i=[],r=null,c=200,u="OK")}catch{t.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&e.shouldThrowOnError)throw new Wv(r)}return{success:r===null,error:r,data:i,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},RO=class extends TO{select(t){let e=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!e?"":(i==='"'&&(e=!e),i)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:i,referencedTable:o=i}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:i=r}={}){const o=typeof i>"u"?"offset":`${i}.offset`,c=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(c,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:i=!1,wal:o=!1,format:c="text"}={}){var u;const d=[t?"analyze":null,e?"verbose":null,r?"settings":null,i?"buffers":null,o?"wal":null].filter(Boolean).join("|"),f=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${f}"; options=${d};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const t0=new RegExp("[,()]");var la=class extends RO{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(i=>typeof i=="string"&&t0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(i=>typeof i=="string"&&t0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:i}={}){let o="";i==="plain"?o="pl":i==="phrase"?o="ph":i==="websearch"&&(o="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${c}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
15r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},AO=class{constructor(t,{headers:e={},schema:r,fetch:i,urlLengthLimit:o=8e3,retry:c}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=i,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:i}=e??{},o=r?"HEAD":"GET";let c=!1;const u=(t??"*").split("").map(p=>/\s/.test(p)&&!c?"":(p==='"'&&(c=!c),p)).join(""),{url:d,headers:f}=this.cloneRequestState();return d.searchParams.set("select",u),i&&f.append("Prefer",`count=${i}`),new la({method:o,url:d,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var i;const o="POST",{url:c,headers:u}=this.cloneRequestState();if(e&&u.append("Prefer",`count=${e}`),r||u.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((f,p)=>f.concat(Object.keys(p)),[]);if(d.length>0){const f=[...new Set(d)].map(p=>`"${p}"`);c.searchParams.set("columns",f.join(","))}}return new la({method:o,url:c,headers:u,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:i,defaultToNull:o=!0}={}){var c;const u="POST",{url:d,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&d.searchParams.set("on_conflict",e),i&&f.append("Prefer",`count=${i}`),o||f.append("Prefer","missing=default"),Array.isArray(t)){const p=t.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(p.length>0){const y=[...new Set(p)].map(g=>`"${g}"`);d.searchParams.set("columns",y.join(","))}}return new la({method:u,url:d,headers:f,schema:this.schema,body:t,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const i="PATCH",{url:o,headers:c}=this.cloneRequestState();return e&&c.append("Prefer",`count=${e}`),new la({method:i,url:o,headers:c,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:i,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new la({method:r,url:i,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Po(t){"@babel/helpers - typeof";return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(t)}function xO(t,e){if(Po(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(Po(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function OO(t){var e=xO(t,"string");return Po(e)=="symbol"?e:e+""}function CO(t,e,r){return(e=OO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function gc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?n0(Object(r),!0).forEach(function(i){CO(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var kO=class xw{constructor(e,{headers:r={},schema:i,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:d}={}){this.url=e,this.headers=new Headers(r),this.schemaName=i,this.urlLengthLimit=u;const f=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(p,y)=>{const g=new AbortController,v=setTimeout(()=>g.abort(),c),w=y?.signal;if(w){if(w.aborted)return clearTimeout(v),f(p,y);const _=()=>{clearTimeout(v),g.abort()};return w.addEventListener("abort",_,{once:!0}),f(p,gc(gc({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(v),w.removeEventListener("abort",_)})}return f(p,gc(gc({},y),{},{signal:g.signal})).finally(()=>clearTimeout(v))}:this.fetch=f,this.retry=d}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new AO(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new xw(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={}
15,{head:i=!1,get:o=!1,count:c}={}){var u;let d;const f=new URL(`${this.url}/rpc/${e}`);let p;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),g=i&&Object.values(r).some(y);g?(d="POST",p=r):i||o?(d=i?"HEAD":"GET",Object.entries(r).filter(([w,_])=>_!==void 0).map(([w,_])=>[w,Array.isArray(_)?`{${_.join(",")}}`:`${_}`]).forEach(([w,_])=>{f.searchParams.append(w,_)})):(d="POST",p=r);const v=new Headers(this.headers);return g?v.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&v.set("Prefer",`count=${c}`),new la({method:d,url:f,headers:v,schema:this.schemaName,body:p,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class NO{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const c=o.versions;if(c&&c.node){const u=c.node,d=parseInt(u.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 18 19Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const jO="2.108.0",MO=`realtime-js/${jO}`,DO="1.0.0",Ow="2.0.0",LO=Ow,UO=1e4,PO=100,ps={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Cw={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},yf={connecting:"connecting",closing:"closing",closed:"closed"};class zO{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,i;const o=(i=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var r,i;const o=(i=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&i!==void 0?i:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(e,r,i){var o,c;const u=e.topic,d=(o=e.ref)!==null&&o!==void 0?o:"",f=(c=e.join_ref)!==null&&c!==void 0?c:"",p=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(f.length>255)throw new Error(`joinRef length ${f.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`userEvent length ${p.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const v=this.USER_BROADCAST_PUSH_META_LENGTH+f.length+d.length+u.length+p.length+g.length,w=new ArrayBuffer(this.HEADER_LENGTH+v);let _=new DataView(w),R=0;_.setUint8(R++,this.KINDS.userBroadcastPush),_.setUint8(R++,f.length),_.setUint8(R++,d.length),_.setUint8(R++,u.length),_.setUint8(R++,p.length),_.setUint8(R++,g.length),_.setUint8(R++,r),Array.from(f,E=>
19_.setUint8(R++,E.charCodeAt(0))),Array.from(d,E=>_.setUint8(R++,E.charCodeAt(0))),Array.from(u,E=>_.setUint8(R++,E.charCodeAt(0))),Array.from(p,E=>_.setUint8(R++,E.charCodeAt(0))),Array.from(g,E=>_.setUint8(R++,E.charCodeAt(0)));var S=new Uint8Array(w.byteLength+i.byteLength);return S.set(new Uint8Array(w),0),S.set(new Uint8Array(i),w.byteLength),S.buffer}decode(e,r){if(this._isArrayBuffer(e)){let i=this._binaryDecode(e);return r(i)}if(typeof e=="string"){const i=JSON.parse(e),[o,c,u,d,f]=i;return r({join_ref:o,ref:c,topic:u,event:d,payload:f})}return r({})}_binaryDecode(e){const r=new DataView(e),i=r.getUint8(0),o=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,r,o)}_decodeUserBroadcast(e,r,i){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),d=r.getUint8(4);let f=this.HEADER_LENGTH+4;const p=i.decode(e.slice(f,f+o));f=f+o;const y=i.decode(e.slice(f,f+c));f=f+c;const g=i.decode(e.slice(f,f+u));f=f+u;const v=e.slice(f,e.byteLength),w=d===this.JSON_ENCODING?JSON.parse(i.decode(v)):v,_={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(_.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:p,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([i])=>r.includes(i)))}}var Fe;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Fe||(Fe={}));const r0=(t,e,r={})=>{var i;const o=(i=r.skipTypes)!==null&&i!==void 0?i:[];return e?Object.keys(e).reduce((c,u)=>(c[u]=IO(u,t,e,o),c),{}):{}},IO=(t,e,r,i)=>{const o=e.find(d=>d.name===t),c=o?.type,u=r[t];return c&&!i.includes(c)?kw(c,u):vf(u)},kw=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return qO(e,r)}switch(t){case Fe.bool:return BO(e);case Fe.float4:case Fe.float8:case Fe.int2:case Fe.int4:case Fe.int8:case Fe.numeric:case Fe.oid:return HO(e);case Fe.json:case Fe.jsonb:return $O(e);case Fe.timestamp:return VO(e);case Fe.abstime:case Fe.date:case Fe.daterange:case Fe.int4range:case Fe.int8range:case Fe.money:case Fe.reltime:case Fe.text:case Fe.time:case Fe.timestamptz:case Fe.timetz:case Fe.tsrange:case Fe.tstzrange:return vf(e);default:return vf(e)}},vf=t=>t,BO=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},HO=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},$O=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},qO=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,i=t[r];if(t[0]==="{"&&i==="}"){let c;const u=t.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(d=>kw(e,d))}return t},VO=t=>typeof t=="string"?t.replace(" ","T"):t,Nw=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Co=t=>typeof t=="function"?t:function(){return t},GO=typeof self<"u"?self:null,ca=typeof window<"u"?window:null,Wn=GO||ca||globalThis,FO="2.0.0",KO=1e4,YO=1e3,tr={connecting:0,open:1,closing:2,closed:3},nn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Cr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},bf={longpoll:"longpoll",websocket:"websocket"},QO={complete:4},wf="base64url.bearer.phx.",yc=class{constructor(t,e,r,i){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHo
vendor: 8,389 bytes, line 19
19oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},jw=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},JO=class{constructor(t,e,r){this.state=nn.closed,this.topic=t,this.params=Co(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new yc(this,Cr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new jw(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=nn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=nn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=nn.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=nn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new yc(this,Cr.leave,Co({}),this.timeout).send(),this.state=nn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Cr.reply,(i,o)=>{this.trigger(this.replyEventName(o),i)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=nn.closed,this.bindings=[]}onClose(t){this.on(Cr.close,t)}onError(t){return this.on(Cr.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new yc(this,t,function(){return e},r);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=nn.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Cr.close,"leave")},r=new yc(this,Cr.leave,Co({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,i){return this.topic!==t?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=nn.joining,this.joinPush.resend(t))}trigger(t,e,r,i){let o=this.onMessage(t,e,r,i);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===t&&this.filterBindings(u,e,r));for(let u=0;u<c.length;u++)c[u].callback(o,r,i||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===nn.closed}isErrored(){return this.state===nn.errored}isJoined(){return this.state===nn.joined}isJoining(){return this.state===nn.joining}isLeaving(){return this.state===nn.leaving}},Gc=class{static request(t,e,r,i,o,c,u){if(Wn.XDomainRequest){let d=new Wn.XDomainRequest;return this.xdomainRequest(d,t,e,i,o,c,u)}else if(Wn.XMLHttpRequest){let d=new Wn.XMLHttpRequest;return this.xhrRequest(d,t,e,r,i,o,c,u)}else{if(Wn.fetch&&Wn.AbortController)return this.fetchRequest(t,e,r,i,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,i,o,c,u){let d={method:t,headers:r,body:i},f=null;return o&&(f=new AbortController,setTimeout(()=>f.abort(),o),d.signal=f.signal),Wn.fetch(e,d).then(p=>p.text()).then(p=>this.parseJSON(p)).then(p=>u&&u(p)).catch(p=>{p.name==="AbortError"&&c?c():u&&u(null)}),f}static xdomainRequest(t,e,r,i,o,c,u){return t.timeout=o,t.open(e,r),t.onload=()=>{let d=this.parseJSON(t.responseText);u&&u(d)},c&&(t.ontimeout=c),t.onprogress=()=>{},t.send(i),t}static xhrRequest(t,e,r,i,o,c,u,d){t.open(e,r,!0),t.timeout=c;for(let[f,p]of Object.entries(i))t.setRequestHeader(f,p);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===QO.complete&&d){let f=this.parseJSON(t.responseText);d(f)}},u&&(t.ontimeout=u),t.send(o),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let o=e?`${e}[${i}]`:i,c=t[i];typeof c=="object"?r.push(this.serialize(c,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},XO=t=>{let e="",r=new Uint8Array(t),i=r.byteLength;for(let o=0;o<i;o++)e+=String.fromCharCode(r[o]);return btoa(e)},ra=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(wf)&&(this.authToken=atob(e[1].slice(wf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=tr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+bf.websocket),"$1/"+bf.longpoll)}endpointURL(){return Gc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=tr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===tr.open||this.readyState===tr.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:i,messages:o}=e;
19if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else r=0;switch(r){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=tr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(t){typeof t!="string"&&(t=XO(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 20`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let o of this.reqs)o.abort();this.readyState=tr.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(t,e,r,i,o){let c,u=()=>{this.reqs.delete(c),i()};c=Gc.request(t,this.endpointURL(),e,r,this.timeout,u,d=>{this.reqs.delete(c),this.isActive()&&o(d)}),this.reqs.add(c)}},ZO=class Ao{constructor(e,r={}){let i=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,o=>{let{onJoin:c,onLeave:u,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ao.syncState(this.state,o,c,u),this.pendingDiffs.forEach(f=>{this.state=Ao.syncDiff(this.state,f,c,u)}),this.pendingDiffs=[],d()}),this.channel.on(i.diff,o=>{let{onJoin:c,onLeave:u,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Ao.syncDiff(this.state,o,c,u),d())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ao.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,i,o){let c=this.clone(e),u={},d={};return this.map(c,(f,p)=>{r[f]||(d[f]=p)}),this.map(r,(f,p)=>{let y=c[f];if(y){let g=p.metas.map(R=>R.phx_ref),v=y.metas.map(R=>R.phx_ref),w=p.metas.filter(R=>v.indexOf(R.phx_ref)<0),_=y.metas.filter(R=>g.indexOf(R.phx_ref)<0);w.length>0&&(u[f]=p,u[f].metas=w),_.length>0&&(d[f]=this.clone(y),d[f].metas=_)}else u[f]=p}),this.syncDiff(c,{joins:u,leaves:d},i,o)}static syncDiff(e,r,i,o){let{joins:c,leaves:u}=this.clone(r);return i||(i=function(){}),o||(o=function(){}),this.map(c,(d,f)=>{let p=e[d];if(e[d]=this.clone(f),p){let y=e[d].metas.map(v=>v.phx_ref),g=p.metas.filter(v=>y.indexOf(v.phx_ref)<0);e[d].metas.unshift(...g)}i(d,p,f)}),this.map(u,(d,f)=>{let p=e[d];if(!p)return;let y=f.metas.map(g=>g.phx_ref);p.metas=p.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(d,p,f),p.metas.length===0&&delete e[d]}),e}static list(e,r){return r||(r=function(i,o){return o}),this.map(e,(i,o)=>r(i,o))}static map(e,r){return Object.getOwnPropertyNames(e).map(i=>r(i,e[i]))}static clone(e){return JSON.parse(JSON.stringify(e))}},vc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,i,o,c,u]=JSON.parse(t);return e({join_ref:r,ref:i,topic:o,event:c,payload:u})}},binaryEncode(t){let{join_ref:e,ref:r,event:i,topic:o,payload:c}=t,u=this.META_LENGTH+e.length+r.length+o.length+i.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=0;f.setUint8(p++,this.KINDS.push),f.setUint8(p++,e.length),f.setUint8(p++,r.length),f.setUint8(p++,o.length),f.setUint8(p++,i.length),Array.from(e,g=>f.setUint8(p++,g.charCodeAt(0))),Array.from(r,g=>f.setUint8(p++,g.charCodeAt(0))),Array.from(o,g=>f.setUint8(p++,g.charCodeAt(0))),Array.from(i,g=>f.setUint8(p++,g.charCodeAt(0)));var y=new Uint8Array(d.byteLength+c.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(c),d.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,i);case this.KINDS.reply:return this.decodeReply(t,e,i);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,i)}},decodePush(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,d=r.decode(t.slice(u,u+i));u=u+i;let f=r.decode(t.slice(u,u+o));u=u+o;let p=r.decode(t.slice(u,u+c));u=u+c;let y=t.slice(u,t.byteLength);return{join_ref:d,ref:null,topic:f,event:p,payload:y}},decodeReply(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=e.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,f=r.decode(t.slice(d,d+i));d=d+i;let p=r.decode(t.slice(d,d+o));d=d+o;let y=r.decode(t.slice(d,d+c));d=d+c;let g=r.decode(t.slice(d,d+u));d=d+u;let v=t.slice(d,t.byteLength),w={status:g,response:v};return{join_ref:f,ref:p,topic:y,event:Cr.reply,payload:w}},decodeBroadcast(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(t.slice(c,c+i));c=c+i;
20let d=r.decode(t.slice(c,c+o));c=c+o;let f=t.slice(c,t.byteLength);return{join_ref:null,ref:null,topic:u,event:d,payload:f}}},WO=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||KO,this.transport=e.transport||Wn.WebSocket||ra,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Wn&&Wn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=vc.encode.bind(vc),this.defaultDecoder=vc.decode.bind(vc),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ra?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ca&&ca.addEventListener&&(ca.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ca.addEventListener("pageshow",o=>{i===this.connectClock&&(i=null,this.connect())}),ca.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>e.rejoinAfterMs?e.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>e.reconnectAfterMs?e.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Co(e.params||{}),this.endPoint=`${t}/${bf.websocket}`,this.vsn=e.vsn||FO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new jw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ra}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Gc.appendParams(Gc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Co(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ra?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ra,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let i=this.onMessage(o=>{o.ref===e&&(this.off([i]),t(Date.now()-r))});return!0}transportName(t){return t===ra?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${wf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,i=!0,o,c,u=this.transportName(t),d=f=>{this.log("transport",`falling back to ${u}...`,f),this.off([o,c]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return d("memorized");this.fallbackTimer=setTimeout(d,e),c=this.onError(f=>{this.log("transport","error",f),i&&!r&&(clearTimeout(this.fallbackTimer),d(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!i){let f=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,e),this.ping(f=>{this.log("transport","connected to primary after",f),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),YO,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const i=this.conn;this.waitForBufferDone(i,()=>{e?i.close(e,r||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===tr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}
20triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Cr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case tr.connecting:return"connecting";case tr.open:return"open";case tr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new JO(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:i,ref:o,join_ref:c}=t;this.log("push",`${e} ${r} (${c}, ${o})`,i)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:i,payload:o,ref:c,join_ref:u}=e;if(c&&c===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",d)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${i} ${c&&"("+c+")"||""}`.trim(),o);for(let d=0;d<this.channels.length;d++){const f=this.channels[d];f.isMember(r,i,o,u)&&f.trigger(i,o,c,u)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,i])=>{try{i(...e)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class ko{constructor(e,r){const i=tC(r);this.presence=new ZO(e.getChannel(),i),this.presence.onJoin((o,c,u)=>{const d=ko.onJoinPayload(o,c,u);e.getChannel().trigger("presence",d)}),this.presence.onLeave((o,c,u)=>{const d=ko.onLeavePayload(o,c,u);e.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ko.transformState(this.presence.state)}static transformState(e){return e=eC(e),Object.getOwnPropertyNames(e).reduce((r,i)=>{const o=e[i];return r[i]=Uc(o),r},{})}static onJoinPayload(e,r,i){const o=s0(r),c=Uc(i);return{event:"join",key:e,currentPresences:o,newPresences:c}}static onLeavePayload(e,r,i){const o=s0(r),c=Uc(i);return{event:"leave",key:e,currentPresences:o,leftPresences:c}}}function Uc(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function eC(t){return JSON.parse(JSON.stringify(t))}function tC(t){return t?.events&&{events:t.events}}function s0(t){return t?.metas?Uc(t):[]}var i0;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(i0||(i0={}));class nC{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new ko(this.channel.channelAdapter,r)}}function rC(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
20if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class sC{constructor(e,r,i){const o=iC(i);this.channel=e.getSocket().channel(r,o),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,i){let o;try{o=this.channel.push(e,r,i)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>PO){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===ps.joined}isJoined(){return this.state===ps.joined}isJoining(){return this.state===ps.joining}isClosed(){return this.state===ps.closed}isLeaving(){return this.state===ps.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function iC(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var a0;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(a0||(a0={}));var ha;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ha||(ha={}));var kr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(kr||(kr={}));class No{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},i){var o,c;if(this.topic=e,this.params=r,this.socket=i,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new sC(this.socket.socketAdapter,e,this.params),this.presence=new nC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Nw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var i,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:d,private:f}}=this.params,p=(o=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(w=>w.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[ha.PRESENCE]&&this.bindings[ha.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},v={broadcast:u,presence:Object.assign(Object.assign({},d),{enabled:y}),postgres_changes:p,private:f};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{e?.(kr.CHANNEL_ERROR,rC(w))}),this._onClose(()=>e?.(kr.CLOSED)),this.updateJoinPayload(Object.assign({config:v},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){e?.(kr.SUBSCRIBED);return}this._updatePostgresBindings(w,e)}).receive("error",w=>{this.state=ps.errored;const _=Object.values(w).join(", ")||"error";e?.(kr.CHANNEL_ERROR,new Error(_,{cause:w}))}).receive("timeout",()=>{e?.(kr.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var i;const o=this.bindings.postgres_changes,c=(i=o?.length)!==null&&i!==void 0?i:0,u=[];for(let d=0;d<c;d++){const f=o[d],{filter:{event:p,schema:y,table:g,filter:v}}=f,w=e&&e[d];if(w&&w.event===p&&No.isFilterValueEqual(w.schema,y)&&No.isFilterValueEqual(w.table,g)&&No.isFilterValueEqual(w.filter,v))u.push(Object.assign(Object.assign({},f),{id:w.id}));else{this.unsubscribe(),this.state=ps.errored,r?.(kr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=ps.errored&&r&&r(kr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,i){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=e===ha.PRESENCE||e===ha.POSTGRES_CHANGES;if(o&&c)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,i)}async httpSend(e,r,i={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=r instanceof ArrayBuffer||ArrayBuffer.isView(r),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&d.searchParams.set("private","true");const f={method:"POST",headers:u,body:c?r:JSON.stringify(r)},p=await this._fetchWithTimeout(d.toString(),f,(o=i.timeout)!==null&&o!==void 0?o:this.timeout);if(p.status===202)return{success:!0};let y=p.statusText;
20try{const g=await p.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(e,r={}){var i,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=e,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const p=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);return await((o=p.body)===null||o===void 0?void 0:o.cancel()),p.ok?"ok":"error"}catch(p){return p instanceof Error&&p.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,d,f;const p=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((f=(d=(u=this.params)===null||u===void 0?void 0:u.config)===null||d===void 0?void 0:d.broadcast)===null||f===void 0)&&f.ack)&&c("ok"),p.receive("ok",()=>c("ok")),p.receive("error",()=>c("error")),p.receive("timeout",()=>c("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,i){const o=new AbortController,c=setTimeout(()=>o.abort(),i),u=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(e,r,i){const o=e.toLocaleLowerCase(),c=this.channelAdapter.on(e,i),u={type:o,filter:r,callback:i,ref:c};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,i)=>{var o,c,u,d,f,p,y;const g=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,i))return!1;const v=(o=this.bindings[g])===null||o===void 0?void 0:o.find(w=>w.ref===e.ref);if(!v)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in v){const w=v.id,_=(c=v.filter)===null||c===void 0?void 0:c.event;return w&&((u=r.ids)===null||u===void 0?void 0:u.includes(w))&&(_==="*"||_?.toLocaleLowerCase()===((d=r.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const w=(p=(f=v?.filter)===null||f===void 0?void 0:f.event)===null||p===void 0?void 0:p.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===g})}_notThisChannelEvent(e,r){const{close:i,error:o,leave:c,join:u}=Cw;return r&&[i,o,c,u].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,i)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:d,type:f,errors:p}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:d,eventType:f,new:{},old:{},errors:p}),this._getPayloadRecords(o))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const i of e.bindings[r])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=r0(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=r0(e.columns,e.old_record)),r}}class aC{constructor(e,r){this.socket=new WO(e,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,i,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{e(),c("ok")},r,i)})}push(e){this.socket.push(e)}log(e,r,i){this.socket.log(e,r,i)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==yf.connecting}isDisconnecting(){return this.socket.connectionState()==yf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const o0={HEARTBEAT_INTERVAL:25e3},oC=[1e3,2e3,5e3,1e4],lC=1e4;function cC(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function uC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return cC()}const dC=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class hC{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new zO,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((i=r?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const o=this._initializeOptions(r);this.socketAdapter=new aC(e,o),this.httpEndpoint=Nw(e),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async i=>{const o=await i.unsubscribe();return i.teardown(),o}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,i){this.socketAdapter.log(e,r,i)}connectionState(){return this.socketAdapter.connectionState()||yf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const i=`realtime:${e}`,o=this.getChannels().find(c=>c.topic===i);if(o)return o;{const c=new No(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,i=!1;if(e)r=e,i=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const c={access_token:r,version:MO};r&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(Cw.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,i)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,i)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let r;if(e)r=e;else{const i=new Blob([dC],{type:"application/javascript"});r=URL.createObjectURL(i)}return r}_initializeOptions(e){var r,i,o,c,u,d,f,p,y,g,v,w;this.worker=(r=e?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(i=e?.accessToken)!==null&&i!==void 0?i:null;const _={};_.timeout=(o=e?.timeout)!==null&&o!==void 0?o:UO,_.heartbeatIntervalMs=(c=e?.heartbeatIntervalMs)!==null&&c!==void 0?c:o0.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=e?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((d=e?.heartbeatIntervalMs)!==null&&d!==void 0?d:o0.HEARTBEAT_INTERVAL),_.transport=(f=e?.transport)!==null&&f!==void 0?f:NO.getWebSocketConstructor(),_.params=e?.params,_.logger=e?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),_.sessionStorage=(p=e?.sessionStorage)!==null&&p!==void 0?p:uC(),_.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(A=>oC[A-1]||lC);let R,S;const E=(g=e?.vsn)!==null&&g!==void 0?g:LO;switch(E){case DO:R=(A,O)=>O(JSON.stringify(A)),S=(A,O)=>O(JSON.parse(A));break;case Ow:R=this.serializer.encode.bind(this.serializer),S=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=E,_.encode=(v=e?.encode)!==null&&v!==void 0?v:R,_.decode=(w=e?.decode)!==null&&w!==void 0?w:S,_.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,_.params=Object.assign(Object.assign({},_.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var zo=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function fC(t,e,r){const i=new URL(e,t);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&i.searchParams.set(o,c);return i.toString()}async function pC(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function mC(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:i,query:o,body:c,headers:u}){const d=fC(t.baseUrl,i,o),f=await pC(t.auth),p=await e(d,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...f,...u},body:c?JSON.stringify(c):void 0}),y=await p.text(),g=(p.headers.get("content-type")||"").includes("application/json"),v=g&&y?JSON.parse(y):y;if(!p.ok){const w=g?v:void 0,_=w?.error;throw new zo(_?.message??`Request failed with status ${p.status}`,{status:p.status,icebergType:_?.type,icebergCode:_?.code,details:w})}return{status:p.status,headers:p.headers,data:v}}}}function bc(t){return t.join("�")}var gC=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:bc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${bc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${bc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${bc(t.namespace)}`}),!0}catch(e){if(e instanceof zo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof zo&&r.status===409)return;throw r}}};function sa(t){return t.join("�")}var yC=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${sa(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof zo&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof zo&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},vC=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=mC({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new gC(this.client,e),this.tableOps=new yC(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
38async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Io(t){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(t)}function bC(t,e){if(Io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(Io(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wC(t){var e=bC(t,"string");return Io(e)=="symbol"?e:e+""}function _C(t,e,r){return(e=wC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function me(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l0(Object(r),!0).forEach(function(i){_C(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var hu=class extends Error{constructor(t,e="storage",r,i){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function fu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var _f=class extends hu{constructor(t,e,r,i="storage"){super(t,i,e,r),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return me({},super.toJSON())}},Mw=class extends hu{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Fc(t,e,r){const i=me({},t),o=e.toLowerCase();for(const c of Object.keys(i))c.toLowerCase()===o&&delete i[c];return i[o]=r,i}function SC(t){const e={};for(const[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}const EC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),TC=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Sf=t=>{if(Array.isArray(t))return t.map(r=>Sf(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,i])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));e[o]=Sf(i)}),e},RC=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),c0=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},AC=async(t,e,r,i)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const o=t;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const d=u?.statusCode||u?.code||c+"";e(new _f(c0(u),c,d,i))}).catch(()=>{const u=c+"";e(new _f(o.statusText||`HTTP ${c} error`,c,u,i))})}
38else e(new Mw(c0(t),t,i))},xC=(t,e,r,i)=>{const o={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!i)return me(me({},o),r);if(TC(i)){var c;const u=e?.headers||{};let d;for(const[f,p]of Object.entries(u))f.toLowerCase()==="content-type"&&(d=p);o.headers=Fc(u,"Content-Type",(c=d)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(i)}else o.body=i;return e?.duplex&&(o.duplex=e.duplex),me(me({},o),r)};async function wo(t,e,r,i,o,c,u){return new Promise((d,f)=>{t(r,xC(e,i,o,c)).then(p=>{if(!p.ok)throw p;if(i?.noResolveJson)return p;if(u==="vectors"){const y=p.headers.get("content-type");if(p.headers.get("content-length")==="0"||p.status===204)return{};if(!y||!y.includes("application/json"))return{}}return p.json()}).then(p=>d(p)).catch(p=>AC(p,f,i,u))})}function Dw(t="storage"){return{get:async(e,r,i,o)=>wo(e,"GET",r,i,o,void 0,t),post:async(e,r,i,o,c)=>wo(e,"POST",r,o,c,i,t),put:async(e,r,i,o,c)=>wo(e,"PUT",r,o,c,i,t),head:async(e,r,i,o)=>wo(e,"HEAD",r,me(me({},i),{},{noResolveJson:!0}),o,void 0,t),remove:async(e,r,i,o,c)=>wo(e,"DELETE",r,o,c,i,t)}}const OC=Dw("storage"),{get:Bo,post:Bn,put:Ef,head:CC,remove:Xf}=OC,vn=Dw("vectors");var va=class{constructor(t,e={},r,i="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=SC(e),this.fetch=EC(r),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Fc(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(fu(r))return{data:null,error:r};throw r}}};let Lw;Lw=Symbol.toStringTag;var kC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Lw]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(fu(e))return{data:null,error:e};throw e}}};let Uw;Uw=Symbol.toStringTag;var NC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Uw]="BlobDownloadBuilder",this.promise=null}asStream(){return new kC(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(fu(e))return{data:null,error:e};throw e}}};const jC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},u0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var MC=class extends va{constructor(t,e={},r,i){super(t,e,i,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,i){var o=this;return o.handleOperation(async()=>{let c;const u=me(me({},u0),i);let d=me(me({},o.headers),t==="POST"&&{"x-upsert":String(u.upsert)});const f=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),f&&c.append("metadata",o.encodeMetadata(f)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),f&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(f))):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,f&&(d["x-metadata"]=o.toBase64(o.encodeMetadata(f))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),i?.headers)for(const[v,w]of Object.entries(i.headers))d=Fc(d,v,w);const p=o._removeEmptyFolders(e),y=o._getFinalPath(p),g=await(t=="PUT"?Ef:Bn)(o.fetch,`${o.url}/object/${y}`,c,me({headers:d},u?.duplex?{duplex:u.duplex}:{}));return{path:p,id:g.Id,fullPath:g.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,i){var o=this;const c=o._removeEmptyFolders(t),u=o._getFinalPath(c),d=new URL(o.url+`/object/upload/sign/${u}`);return d.searchParams.set("token",e),o.handleOperation(async()=>{let f;const p=me(me({},u0),i);let y=me(me({},o.headers),{"x-upsert":String(p.upsert)});const g=p.metadata;if(typeof Blob<"u"&&r instanceof Blob?(f=new FormData,f.append("cacheControl",p.cacheControl),g&&f.append("metadata",o.encodeMetadata(g)),f.append("",r)):typeof FormData<"u"&&r instanceof FormData?(f=r,f.has("cacheControl")||f.append("cacheControl",p.cacheControl),g&&!f.has("metadata")&&f.append("metadata",o.encodeMetadata(g))):(f=r,y["cache-control"]=`max-age=${p.cacheControl}`,y["content-type"]=p.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!p.duplex&&(p.duplex="half")),i?.headers)for(const[v,w]of Object.entries(i.headers))y=Fc(y,v,w);return{path:c,fullPath:(await Ef(o.fetch,d.toString(),f,me({headers:y},p?.duplex?{duplex:p.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(t);const o=me({},r.headers);e?.upsert&&(o["x-upsert"]="true");const c=await Bn(r.fetch,`${r.url}/object/upload/sign/${i}`,{},{headers:o}),u=new URL(r.url+c.url),d=u.searchParams.get("token");if(!d)throw new hu("No token returned by API");return{signedUrl:u.toString(),path:t,token:d}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}
38async move(t,e,r){var i=this;return i.handleOperation(async()=>await Bn(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:i.headers}))}async copy(t,e,r){var i=this;return i.handleOperation(async()=>({path:(await Bn(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(t,e,r){var i=this;return i.handleOperation(async()=>{let o=i._getFinalPath(t);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await Bn(i.fetch,`${i.url}/object/sign/${o}`,me({expiresIn:e},c?{transform:r.transform}:{}),{headers:i.headers});const d=new URLSearchParams;r?.download&&d.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&d.set("cacheNonce",String(r.cacheNonce));const f=d.toString();return{signedUrl:encodeURI(`${i.url}${u.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(t,e,r){var i=this;return i.handleOperation(async()=>{const o=await Bn(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:e,paths:t},{headers:i.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return o.map(d=>me(me({},d),{},{signedUrl:d.signedURL?encodeURI(`${i.url}${d.signedURL}${u?`&${u}`:""}`):null}))})}download(t,e,r){const i=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(o,e.transform),e?.cacheNonce!=null&&o.set("cacheNonce",String(e.cacheNonce));const c=o.toString(),u=this._getFinalPath(t),d=()=>Bo(this.fetch,`${this.url}/${i}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new NC(d,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Sf(await Bo(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await CC(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(fu(o)){var i;const c=o instanceof _f?o.status:o instanceof Mw?(i=o.originalError)===null||i===void 0?void 0:i.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(t,e){const r=this._getFinalPath(t),i=new URLSearchParams;e?.download&&i.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(i,e.transform),e?.cacheNonce!=null&&i.set("cacheNonce",String(e.cacheNonce));const o=i.toString(),c=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}`)+(o?`?${o}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Xf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var i=this;return i.handleOperation(async()=>{const o=me(me(me({},jC),e),{},{prefix:t||""});return await Bn(i.fetch,`${i.url}/object/list/${i.bucketId}`,o,{headers:i.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const i=me({},t);return await Bn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,i,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const DC="2.108.0",Jo={"X-Client-Info":`storage-js/${DC}`};var LC=class extends va{constructor(t,e={},r,i){const o=new URL(t);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=me(me({},Jo),e);super(c,u,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await Bo(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Bo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await Bn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Ef(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Bn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Xf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},UC=class extends va{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=me(me({},Jo),e);super(i,o,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Bn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>
38{const r=new URLSearchParams;t?.limit!==void 0&&r.set("limit",t.limit.toString()),t?.offset!==void 0&&r.set("offset",t.offset.toString()),t?.sortColumn&&r.set("sortColumn",t.sortColumn),t?.sortOrder&&r.set("sortOrder",t.sortOrder),t?.search&&r.set("search",t.search);const i=r.toString(),o=i?`${e.url}/bucket?${i}`:`${e.url}/bucket`;return await Bo(e.fetch,o,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Xf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!RC(t))throw new hu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new vC({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...d)=>{try{return{data:await u.apply(o,d),error:null}}catch(f){if(i)throw f;return{data:null,error:f}}}}})}},PC=class extends va{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=me(me({},Jo),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await vn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await vn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},zC=class extends va{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=me(me({},Jo),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},IC=class extends va{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=me(me({},Jo),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await vn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},BC=class extends IC{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new HC(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},HC=class extends PC{constructor(t,e,r,i){super(t,e,i),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new $C(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},$C=class extends zC{constructor(t,e,r,i,o){super(t,e,o),this.vectorBucketName=r,this.indexName=i}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,me(me({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},qC=class extends LC{constructor(t,e={},r,i){super(t,e,r,i)}from(t){return new MC(this.url,this.headers,t,this.fetch)}get vectors(){return new BC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new UC(this.url+"/iceberg",this.headers,this.fetch)}};function pu(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(r[i[o]]=t[i[o]]);return r}const Pw="2.108.0",cs=30*1e3,xo=3,Kh=xo*cs,VC="http://localhost:9999",GC="supabase.auth.token",FC={"X-Client-Info":`gotrue-js/${Pw}`},Tf="X-Supabase-Api-Version",zw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},KC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,YC=600*1e3;
38class Ho extends Error{constructor(e,r,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class QC extends Ho{constructor(e,r,i){super(e,r,i),this.name="AuthApiError",this.status=r,this.code=i}}function JC(t){return te(t)&&t.name==="AuthApiError"}class Hn extends Ho{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class rr extends Ho{constructor(e,r,i,o){super(e,i,o),this.name=r,this.status=i}}class xt extends rr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function wc(t){return te(t)&&t.name==="AuthSessionMissingError"}class ia extends rr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class _c extends rr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Sc extends rr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function XC(t){return te(t)&&t.name==="AuthImplicitGrantRedirectError"}class d0 extends rr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class ZC extends rr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Rf extends rr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Yh(t){return te(t)&&t.name==="AuthRetryableFetchError"}class h0 extends rr{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function WC(t){return te(t)&&t.name==="AuthRefreshDiscardedError"}class f0 extends rr{constructor(e,r,i){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Kc extends rr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Yc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),p0=` 39\r=`.split(""),ek=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<p0.length;e+=1)t[p0[e].charCodeAt(0)]=-2;for(let e=0;e<Yc.length;e+=1)t[Yc[e].charCodeAt(0)]=e;return t})();function m0(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;r(Yc[i]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;r(Yc[i]),e.queuedBits-=6}}function Iw(t,e,r){const i=ek[t];if(i>-1)for(e.queue=e.queue<<6|i,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function g0(t){const e=[],r=u=>{e.push(String.fromCodePoint(u))},i={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{rk(u,i,r)};for(let u=0;u<t.length;u+=1)Iw(t.charCodeAt(u),o,c);return e.join("")}function tk(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function nk(t,e){for(let r=0;r<t.length;r+=1){let i=t.charCodeAt(r);if(i>55295&&i<=56319){const o=(i-55296)*1024&65535;i=(t.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}tk(i,e)}}function rk(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let i=1;i<6;i+=1)if((t>>7-i&1)===0){e.utf8seq=i;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function ga(t){const e=[],r={queue:0,queuedBits:0},i=o=>{e.push(o)};for(let o=0;o<t.length;o+=1)Iw(t.charCodeAt(o),r,i);return new Uint8Array(e)}function sk(t){const e=[];return nk(t,r=>e.push(r)),new Uint8Array(e)}function ai(t){const e=[],r={queue:0,queuedBits:0},i=o=>{e.push(o)};return t.forEach(o=>m0(o,r,i)),m0(null,r,i),e.join("")}function ik(t){return Math.round(Date.now()/1e3)+t}function ak(){return Symbol("auth-callback")}const Ht=()=>typeof window<"u"&&typeof document<"u",Zs={tested:!1,writable:!1},Bw=()=>
39{if(!Ht())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Zs.tested)return Zs.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Zs.tested=!0,Zs.writable=!0}catch{Zs.tested=!0,Zs.writable=!1}return Zs.writable};function ok(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,c)=>{e[c]=o})}catch{}return r.searchParams.forEach((i,o)=>{e[o]=i}),e}const Hw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),lk=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ua=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Ar=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},ot=async(t,e)=>{await t.removeItem(e)};class mu{constructor(){this.promise=new mu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}mu.promiseConstructor=Promise;function Ec(t){const e=t.split(".");if(e.length!==3)throw new Kc("Invalid JWT structure");for(let i=0;i<e.length;i++)if(!KC.test(e[i]))throw new Kc("JWT not in base64url format");return{header:JSON.parse(g0(e[0])),payload:JSON.parse(g0(e[1])),signature:ga(e[2]),raw:{header:e[0],payload:e[1]}}}async function ck(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function uk(t,e){return new Promise((i,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await t(c);if(!e(c,null,u)){i(u);return}}catch(u){if(!e(c,u)){o(u);return}}})()})}function dk(t){return("0"+t.toString(16)).substr(-2)}function hk(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*i));return o}return crypto.getRandomValues(e),Array.from(e,dk).join("")}async function fk(t){const r=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(i);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function pk(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await fk(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ws(t,e,r=!1){const i=hk();let o=i;r&&(o+="/recovery"),await ua(t,`${e}-code-verifier`,o);const c=await pk(i);return[c,i===c?"plain":"s256"]}const mk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function gk(t){const e=t.headers.get(Tf);if(!e||!e.match(mk))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function yk(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function vk(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const bk=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function xr(t){if(!bk.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function In(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Qh(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function wk(t,e){return new Proxy(t,{get:(r,i,o)=>
39{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const c=i.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,i,o)}return!e.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,i,o)}})}function y0(t){return JSON.parse(JSON.stringify(t))}const ni=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},_k=[502,503,504,520,521,522,523,524,530];async function v0(t){var e;if(!lk(t))throw new Rf(ni(t),0);if(_k.includes(t.status))throw new Rf(ni(t),t.status);let r;try{r=await t.json()}catch(c){throw new Hn(ni(c),c)}let i;const o=gk(t);if(o&&o.getTime()>=zw["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?i=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(i=r.error_code),i){if(i==="weak_password")throw new f0(ni(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(i==="session_not_found")throw new xt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new f0(ni(r),t.status,r.weak_password.reasons);throw new QC(ni(r),t.status||500,i)}const Sk=(t,e,r,i)=>{const o={method:t,headers:e?.headers||{}};return t==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),o.body=JSON.stringify(i),Object.assign(Object.assign({},o),r))};async function le(t,e,r,i){var o;const c=Object.assign({},i?.headers);c[Tf]||(c[Tf]=zw["2024-01-01"].name),i?.jwt&&(c.Authorization=`Bearer ${i.jwt}`);const u=(o=i?.query)!==null&&o!==void 0?o:{};i?.redirectTo&&(u.redirect_to=i.redirectTo);const d=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",f=await Ek(t,e,r+d,{headers:c,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(f):{data:Object.assign({},f),error:null}}
39async function Ek(t,e,r,i,o,c){const u=Sk(e,i,o,c);let d;try{d=await t(r,Object.assign({},u))}catch(f){throw console.error(f),new Rf(ni(f),0)}if(d.ok||await v0(d),i?.noResolveJson)return d;try{return await d.json()}catch(f){await v0(f)}}function Nn(t){var e;let r=null;Ak(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=ik(t.expires_in)));const i=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:r,user:i},error:null}}function b0(t){const e=Nn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,i)=>r&&typeof i=="string",!0)&&(e.data.weak_password=t.weak_password),e}function ms(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function Tk(t){return{data:t,error:null}}function Rk(t){const{action_link:e,email_otp:r,hashed_token:i,redirect_to:o,verification_type:c}=t,u=pu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:r,hashed_token:i,redirect_to:o,verification_type:c},f=Object.assign({},u);return{data:{properties:d,user:f},error:null}}function w0(t){return t}function Ak(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Jh=["global","local","others"];class xk{constructor({url:e="",headers:r={},fetch:i,experimental:o}){this.url=e,this.headers=r,this.fetch=Hw(i),this.experimental=o??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=Jh[0]){if(Jh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Jh.join(", ")}`);try{return await le(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(i){if(te(i))return{data:null,error:i};throw i}}async inviteUserByEmail(e,r={}){try{return await le(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async generateLink(e){try{const{options:r}=e,i=pu(e,["options"]),o=Object.assign(Object.assign({},i),r);return"newEmail"in i&&(o.new_email=i?.newEmail,delete o.newEmail),await le(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:Rk,redirectTo:r?.redirectTo})}catch(r){if(te(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await le(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ms})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,i,o,c,u,d,f;try{const p={nextPage:null,lastPage:0,total:0},y=await le(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:"",per_page:(c=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:w0});if(y.error)throw y.error;const g=await y.json(),v=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(_=>{const R=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),S=JSON.parse(_.split(";")[1].split("=")[1]);p[`${S}Page`]=R}),p.total=parseInt(v)),{data:Object.assign(Object.assign({},g),p),error:null}}catch(p){if(te(p))return{data:{users:[]},error:p};throw p}}async getUserById(e){xr(e);try{return await le(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ms})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){xr(e);try{return await le(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async deleteUser(e,r=!1){xr(e);
39try{return await le(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async _listFactors(e){xr(e.userId);try{const{data:r,error:i}=await le(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:i}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _deleteFactor(e){xr(e.userId),xr(e.id);try{return{data:await le(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,i,o,c,u,d,f;try{const p={nextPage:null,lastPage:0,total:0},y=await le(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:"",per_page:(c=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:w0});if(y.error)throw y.error;const g=await y.json(),v=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(_=>{const R=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),S=JSON.parse(_.split(";")[1].split("=")[1]);p[`${S}Page`]=R}),p.total=parseInt(v)),{data:Object.assign(Object.assign({},g),p),error:null}}catch(p){if(te(p))return{data:{clients:[]},error:p};throw p}}async _createOAuthClient(e){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await le(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await le(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(te(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(e){try{return await le(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e?.type&&(r.type=e.type),await le(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:i=>{var o;return{data:{providers:(o=i?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(te(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await le(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await le(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await le(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(te(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(e){try{return await le(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){In(this.experimental),xr(e.userId);try{return await le(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){In(this.experimental),xr(e.userId),xr(e.passkeyId);
39try{return await le(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}}function _0(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}globalThis&&Bw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class Ok extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function Ck(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function $w(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function kk(t){return parseInt(t,16)}function Nk(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,i=>i.toString(16).padStart(2,"0")).join("")}function jk(t){var e;const{chainId:r,domain:i,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:d,requestId:f,resources:p,scheme:y,uri:g,version:v}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(v!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${v}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const w=$w(t.address),_=y?`${y}://${i}`:i,R=t.statement?`${t.statement} 41`:"",S=`${_} wants you to sign in with your Ethereum account: 42${w} 43 44${R}`;let E=`URI: ${g} 45Version: ${v} 46Chain ID: ${r}${u?` 47Nonce: ${u}`:""} 48Issued At: ${c.toISOString()}`;if(o&&(E+=` 49Expiration Time: ${o.toISOString()}`),d&&(E+=` 50Not Before: ${d.toISOString()}`),f&&(E+=` 51Request ID: ${f}`),p){let A=` 52Resources:`;for(const O of p){if(!O||typeof O!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${O}`);A+=` 53- ${O}`}E+=A}return`${S} 54${E}`}class pt extends Error{constructor({message:e,code:r,cause:i,name:o}){var c;super(e,{cause:i}),this.__isWebAuthnError=!0,this.name=(c=o??(i instanceof Error?i.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Qc extends pt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function Mk({error:t,options:e}){var r,i,o;const{publicKey:c}=e;if(!c)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new pt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new pt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((i=c.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new pt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new pt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new pt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new pt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return c.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new pt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new pt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const u=window.location.hostname;
54if(qw(u)){if(c.rp.id!==u)return new pt({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new pt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new pt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Dk({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new pt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new pt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const i=window.location.hostname;if(qw(i)){if(r.rpId!==i)return new pt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new pt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Lk{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Af=new Lk;function S0(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:i}=t,o=pu(t,["challenge","user","excludeCredentials"]),c=ga(e).buffer,u=Object.assign(Object.assign({},r),{id:ga(r.id).buffer}),d=Object.assign(Object.assign({},o),{challenge:c,user:u});if(i&&i.length>0){d.excludeCredentials=new Array(i.length);for(let f=0;f<i.length;f++){const p=i[f];d.excludeCredentials[f]=Object.assign(Object.assign({},p),{id:ga(p.id).buffer,type:p.type||"public-key",transports:p.transports})}}return d}function E0(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,i=pu(t,["challenge","allowCredentials"]),o=ga(e).buffer,c=Object.assign(Object.assign({},i),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const d=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},d),{id:ga(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return c}function T0(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:ai(new Uint8Array(t.response.attestationObject)),clientDataJSON:ai(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function R0(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,i=t.getClientExtensionResults(),o=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:ai(new Uint8Array(o.authenticatorData)),clientDataJSON:ai(new Uint8Array(o.clientDataJSON)),signature:ai(new Uint8Array(o.signature)),userHandle:o.userHandle?ai(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function qw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}
54function Jc(){var t,e;return!!(Ht()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Vw(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Qc("Browser returned unexpected credential type",e)}:{data:null,error:new Qc("Empty credential response",e)}}catch(e){return{data:null,error:Mk({error:e,options:t})}}}async function Gw(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Qc("Browser returned unexpected credential type",e)}:{data:null,error:new Qc("Empty credential response",e)}}catch(e){return{data:null,error:Dk({error:e,options:t})}}}const Uk={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Pk={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Xc(...t){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),i={};for(const o of t)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))i[c]=u;else if(r(u))i[c]=u;else if(e(u)){const d=i[c];e(d)?i[c]=Xc(d,u):i[c]=Xc(u)}else i[c]=u}return i}function zk(t,e){return Xc(Uk,t,e||{})}function Ik(t,e){return Xc(Pk,t,e||{})}class Bk{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:i,signal:o},c){var u;try{const{data:d,error:f}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!d)return{data:null,error:f};const p=o??Af.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const g=i;if(g)y.name=`${y.id}:${g}`;else{const w=(await this.client.getUser()).data.user,_=((u=w?.user_metadata)===null||u===void 0?void 0:u.name)||w?.email||w?.id||"User";y.name=`${y.id}:${_}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=zk(d.webauthn.credential_options.publicKey,c?.create),{data:g,error:v}=await Vw({publicKey:y,signal:p});return g?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:v}}case"request":{const y=Ik(d.webauthn.credential_options.publicKey,c?.request),{data:g,error:v}=await Gw(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:p}));return g?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:v}}}}catch(d){return te(d)?{data:null,error:d}:{data:null,error:new Hn("Unexpected error in challenge",d)}}}async _verify({challengeId:e,factorId:r,webauthn:i}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:i})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Ho("rpId is required for WebAuthn authentication")};try{if(!Jc())return{data:null,error:new Hn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:i},signal:o},{request:c});if(!u)return{data:null,error:d};const{webauthn:f}=u;return this._verify({factorId:e,challengeId:u.challengeId,webauthn:{type:f.type,rpId:r,rpOrigins:i,credential_response:f.credential_response}})}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Hn("Unexpected error in authenticate",u)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Ho("rpId is required for WebAuthn registration")};try{if(!Jc())return{data:null,error:new Hn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this._enroll({friendlyName:e});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(v=>v.factor_type==="webauthn"&&v.friendly_name===e&&v.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:d};const{data:f,error:p}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:i},signal:o},{create:c});return f?this._verify({factorId:u.id,challengeId:f.challengeId,webauthn:{rpId:r,rpOrigins:i,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:p}}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Hn("Unexpected error in register",u)}}}}Ck();const Hk={url:VC,storageKey:GC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:FC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},aa={};class $o{get jwks(){var e,r;return(r=(e=aa[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){aa[this.storageKey]=Object.assign(Object.assign({},aa[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=aa[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){aa[this.storageKey]=Object.assign(Object.assign({},aa[this.storageKey]),{cachedAt:e})}constructor(e){var r,i,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},Hk),e);if(this.storageKey=c.storageKey,this.instanceID=(r=$o.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,$o.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&Ht()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(i=c.experimental)!==null&&i!==void 0?i:{},this.admin=new xk({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=Hw(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Bk(this)}
54,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:Bw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=_0(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=_0(this.memoryStorage)),Ht()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Pw}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let r={},i="none";if(Ht()&&(r=ok(window.location.href),this._isImplicitGrantCallback(r)?i="implicit":await this._isPKCECallback(r)&&(i="pkce")),Ht()&&this.detectSessionInUrl&&i!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,i);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),XC(c)){const f=(e=c.details)===null||e===void 0?void 0:e.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:d}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",d),await this._saveSession(u),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return te(r)?this._returnResult({error:r}):this._returnResult({error:new Hn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,i,o;try{const c=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:Nn}),{data:u,error:d}=c;if(d||!u)return this._returnResult({data:{user:null,session:null},error:d});const f=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(c){if(te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(e){var r,i,o;try{let c;if("email"in e){const{email:y,password:g,options:v}=e;let w=null,_=null;this.flowType==="pkce"&&([w,_]=await Ws(this.storage,this.storageKey)),c=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:v?.emailRedirectTo,body:{email:y,password:g,data:(r=v?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:v?.captchaToken},code_challenge:w,code_challenge_method:_},xform:Nn})}else if("phone"in e){const{phone:y,password:g,options:v}=e;c=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(i=v?.data)!==null&&i!==void 0?i:{},channel:(o=v?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:v?.captchaToken}},xform:Nn})}else throw new _c("You must provide either an email or phone number and a password");const{data:u,error:d}=c;if(d||!u)return await ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const f=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(e){try{let r;if("email"in e){const{email:c,password:u,options:d}=e;r=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}}
54,xform:b0})}else if("phone"in e){const{phone:c,password:u,options:d}=e;r=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:b0})}else throw new _c("You must provide either an email or phone number and a password");const{data:i,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!i||!i.session||!i.user){const c=new ia;return this._returnResult({data:{user:null,session:null},error:c})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:o})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,i,o,c;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=e.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,i,o,c,u,d,f,p,y,g,v;let w,_;if("message"in e)w=e.message,_=e.signature;else{const{chain:R,wallet:S,statement:E,options:A}=e;let O;if(Ht())if(typeof S=="object")O=S;else{const Q=window;if("ethereum"in Q&&typeof Q.ethereum=="object"&&"request"in Q.ethereum&&typeof Q.ethereum.request=="function")O=Q.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof S!="object"||!A?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");O=S}const j=new URL((r=A?.url)!==null&&r!==void 0?r:window.location.href),q=await O.request({method:"eth_requestAccounts"}).then(Q=>Q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!q||q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const H=$w(q[0]);let P=(i=A?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!P){const Q=await O.request({method:"eth_chainId"});P=kk(Q)}const M={domain:j.host,address:H,statement:E,uri:j.href,version:"1",chainId:P,nonce:(o=A?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=A?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(d=A?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(f=A?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(p=A?.signInWithEthereum)===null||p===void 0?void 0:p.requestId,resources:(y=A?.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=jk(M),_=await O.request({method:"personal_sign",params:[Nk(w),H]})}try{const{data:R,error:S}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:_},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=e.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Nn});if(S)throw S;if(!R||!R.session||!R.user){const E=new ia;return this._returnResult({data:{user:null,session:null},error:E})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:S})}catch(R){if(te(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async signInWithSolana(e){var r,i,o,c,u,d,f,p,y,g,v,w;let _,R;if("message"in e)_=e.message,R=e.signature;else{const{chain:S,wallet:E,statement:A,options:O}=e;let j;if(Ht())if(typeof E=="object")j=E;else{const H=window;if("solana"in H&&typeof H.solana=="object"&&("signIn"in H.solana&&typeof H.solana.signIn=="function"||"signMessage"in H.solana&&typeof H.solana.signMessage=="function"))j=H.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!O?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const q=new URL((r=O?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const H=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},O?.signInWithSolana),{version:"1",domain:q.host,uri:q.href}),A?{statement:A}:null));let P;if(Array.isArray(H)&&H[0]&&typeof H[0]=="object")P=H[0];else if(H&&typeof H=="object"&&"signedMessage"in H&&"signature"in H)P=H;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in P&&"signature"in P&&(typeof P.signedMessage=="string"||P.signedMessage instanceof Uint8Array)&&P.signature instanceof Uint8Array)_=typeof P.signedMessage=="string"?P.signedMessage:new TextDecoder().decode(P.signedMessage),R=P.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${q.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...A?["",A,""]:[""],"Version: 1",`URI: ${q.href}`,`Issued At: ${(o=(i=O?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=O?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${O.signInWithSolana.notBefore}`]:[],...!((u=O?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${O.signInWithSolana.expirationTime}`]:[],...!((d=O?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${O.signInWithSolana.chainId}`]:[],...!((f=O?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${O.signInWithSolana.nonce}`]:[],...!((p=O?.signInWithSolana)===null||p===void 0)&&p.requestId?[`Request ID: ${O.signInWithSolana.requestId}`]:[],...!((g=(y=O?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...O.signInWithSolana.resources.map(P=>`- ${P}`)]:[]].join(` 55`);const H=await j.signMessage(new TextEncoder().encode(_),"utf8");if(!H||!(H instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");R=H}}try{const{data:S,error:E}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:ai(R)},!((v=e.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(w=e.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:Nn});if(E)throw E;if(!S||!S.session||!S.user){const A=new ia;return this._returnResult({data:{user:null,session:null},error:A})}return S.session&&(await this._saveSession(S.session),await this._notifyAllSubscribers("SIGNED_IN",S.session)),this._returnResult({data:Object.assign({},S),error:E})}catch(S){if(te(S))return this._returnResult({data:{user:null,session:null},error:S});throw S}}async _exchangeCodeForSession(e){const r=await Ar(this.storage,`${this.storageKey}-code-verifier`),[i,o]=(r??"").split("/");try{if(!i&&this.flowType==="pkce")throw new ZC;const{data:c,error:u}=await le(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:Nn});if(await ot(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const d=new ia;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(e){try{const{options:r,provider:i,token:o,access_token:c,nonce:u}=e,d=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:Nn}),{data:f,error:p}=d;if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f||!f.session||!f.user){const y=new ia;return this._returnResult({data:{user:null,session:null},error:y})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:p})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,i,o,c,u;try{if("email"in e){const{email:d,options:f}=e;let p=null,y=null;this.flowType==="pkce"&&([p,y]=await Ws(this.storage,this.storageKey));const{error:g}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(r=f?.data)!==null&&r!==void 0?r:{},create_user:(i=f?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},code_challenge:p,code_challenge_method:y},redirectTo:f?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in e){const{phone:d,options:f}=e,{data:p,error:y}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(o=f?.data)!==null&&o!==void 0?o:{},create_user:(c=f?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},channel:(u=f?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:p?.message_id},error:y})}throw new _c("You must provide either an email or phone number.")}catch(d){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(e){var r,i;try{let o,c;"options"in e&&(o=(r=e.options)===null||r===void 0?void 0:r.redirectTo,c=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:u,error:d}=await le(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:Nn});if(d)throw d;if(!u)throw new Error("An error occurred on token verification.");const f=u.session,p=u.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(o){if(te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var r,i,o,c,u;try{let d=null,f=null;this.flowType==="pkce"&&([d,f]=await Ws(this.storage,this.storageKey));const p=await le(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&i!==void 0?i:void 0}),!((o=e?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:f}),headers:this.headers,xform:Tk});return!((c=p.data)===null||c===void 0)&&c.url&&Ht()&&!(!((u=e.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(p.data.url),this._returnResult(p)}catch(d){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)throw i;if(!r)throw new xt;const{error:o}=await le(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(e){if(te(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:i,type:o,options:c}=e;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Ws(this.storage,this.storageKey));const{error:f}=await le(this.fetch,"POST",r,{headers:this.headers,body:{email:i,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c?.emailRedirectTo});return f&&await ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f})}else if("phone"in e){const{phone:i,type:o,options:c}=e,{data:u,error:d}=await le(this.fetch,"POST",r,{headers:this.headers,body:{phone:i,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:d})}throw new _c("You must provide either an email or phone number and a type")}catch(r){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await i,await r()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=r();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Ar(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at*1e3-Date.now()<Kh:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.userStorage){const u=await Ar(this.userStorage,this.storageKey+"-user");u?.user?e.user=u.user:e.user=Qh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};e.user=wk(e.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ms}):await this._useSession(async r=>{var i,o,c;const{data:u,error:d}=r;if(d)throw d;return!(!((i=u.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new xt}:await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:ms})})}catch(r){if(te(r))return wc(r)&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r)):await this._updateUser(e,r)}async _updateUser(e,r={}){try{return await this._useSession(async i=>{const{data:o,error:c}=i;if(c)throw c;if(!o.session)throw new xt;const u=o.session;let d=null,f=null;this.flowType==="pkce"&&e.email!=null&&([d,f]=await Ws(this.storage,this.storageKey));const{data:p,error:y}=await le(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:f}),jwt:u.access_token,xform:ms});if(y)throw y;return u.user=p.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(i){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new xt;const r=Date.now()/1e3;let i=r,o=!0,c=null;const{payload:u}=Ec(e.access_token);if(u.exp&&(i=u.exp,o=i<=r),o){const{data:d,error:f}=await this._callRefreshToken(e.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!d)return{data:{user:null,session:null},error:null};c=d}else{const{data:d,error:f}=await this._getUser(e.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});c={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:i-r,expires_at:i},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(r){if(te(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async r=>{var i;if(!e){const{data:u,error:d}=r;if(d)throw d;e=(i=u.session)!==null&&i!==void 0?i:void 0}if(!e?.refresh_token)throw new xt;const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var i;try{if(!Ht())throw new Sc("No browser detected.");
55if(e.error||e.error_description||e.error_code)throw new Sc(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new d0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Sc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new d0("No code detected.");const{data:O,error:j}=await this._exchangeCodeForSession(e.code);if(j)throw j;const q=new URL(window.location.href);return q.searchParams.delete("code"),window.history.replaceState(window.history.state,"",q.toString()),{data:{session:O.session,redirectType:(i=O.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:d,expires_in:f,expires_at:p,token_type:y}=e;if(!u||!f||!d||!y)throw new Sc("No session defined in URL");const g=Math.round(Date.now()/1e3),v=parseInt(f);let w=g+v;p&&(w=parseInt(p));const _=w-g;_*1e3<=cs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${v}s`);const R=w-v;g-R>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",R,w,g):g-R<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",R,w,g);const{data:S,error:E}=await this._getUser(u);if(E)throw E;const A={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:v,expires_at:w,refresh_token:d,token_type:y,user:S.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:A,redirectType:e.type},error:null})}catch(o){if(te(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const r=await Ar(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var i;const{data:o,error:c}=r;if(c&&!wc(c))return this._returnResult({error:c});const u=(i=o.session)===null||i===void 0?void 0:i.access_token;if(u){const{error:d}=await this.admin.signOut(u,e);if(d&&!(JC(d)&&(d.status===404||d.status===401||d.status===403)||wc(d)))return this._returnResult({error:d})}return e!=="others"&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=ak(),i={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,i),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async r=>{var i,o;try{const{data:{session:c},error:u}=r;if(u)throw u;await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",e,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",c),wc(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(e,r={}){let i=null,o=null;this.flowType==="pkce"&&([i,o]=await Ws(this.storage,this.storageKey,!0));try{return await le(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var e;try{const{data:r,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:i,error:o}=await this._useSession(async c=>{var u,d,f,p,y;const{data:g,error:v}=c;if(v)throw v;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(u=e.options)===null||u===void 0?void 0:u.redirectTo,scopes:(d=e.options)===null||d===void 0?void 0:d.scopes,queryParams:(f=e.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await le(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(p=g.session)===null||p===void 0?void 0:p.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return Ht()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(i?.url),this._returnResult({data:{provider:e.provider,url:i?.url},error:null})}catch(i){if(te(i))return this._returnResult({data:{provider:e.provider,url:null},error:i});throw i}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var i;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:d,token:f,access_token:p,nonce:y}=e,g=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=c?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:d,id_token:f,access_token:p,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Nn}),{data:v,error:w}=g;return w?this._returnResult({data:{user:null,session:null},error:w}):!v||!v.session||!v.user?this._returnResult({data:{user:null,session:null},error:new ia}):(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("USER_UPDATED",v.session)),this._returnResult({data:v,error:w}))}catch(o){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var i,o;const{data:c,error:u}=r;if(u)throw u;
55return await le(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(i=c.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const i=Date.now();return await uk(async o=>(o>0&&await ck(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await le(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Nn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Yh(c)&&Date.now()+u-i<cs})}catch(i){if(this._debug(r,"error",i),te(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const i=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",i),Ht()&&!r.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i},error:null}}async _recoverAndRefresh(){var e,r;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const o=await Ar(this.storage,this.storageKey);if(o&&this.userStorage){let u=await Ar(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await ua(this.userStorage,this.storageKey+"-user",u)),o.user=(e=u?.user)!==null&&e!==void 0?e:Qh()}else if(o&&!o.user&&!o.user){const u=await Ar(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await ot(this.storage,this.storageKey+"-user"),await ua(this.storage,this.storageKey,o)):o.user=Qh()}if(this._debug(i,"session from storage",o),!this._isValidSession(o)){this._debug(i,"session is not valid"),o!==null&&await this._removeSession();return}const c=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Kh;if(this._debug(i,`session has${c?"":" not"} expired with margin of ${Kh}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(WC(u)?this._debug(i,"refresh discarded by commit guard",u):(this._debug(i,"refresh failed",u),Yh(u)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession())))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:d}=await this._getUser(o.access_token);!d&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(i,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(i,"error",o),console.error(o);return}finally{this._debug(i,"end")}}async _callRefreshToken(e){var r,i;if(!e)throw new xt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new mu;const c=await Ar(this.storage,this.storageKey),{data:u,error:d}=await this._refreshAccessToken(e);if(d)throw d;if(!u.session)throw new xt;const f=await Ar(this.storage,this.storageKey);if(c!==null&&(f===null||f.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:f?"replaced":"cleared"});const v={data:null,error:new h0};return this.refreshingDeferred.resolve(v),v}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await ot(this.storage,this.storageKey),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user");const v={data:null,error:new h0};return this.refreshingDeferred.resolve(v),v}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),te(c)){const u={data:null,error:c};return Yh(c)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,r,i=!0){const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",r,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:e,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,r)}catch(f){c.push(f)}});if(await Promise.all(u),c.length>0){for(let d=0;d<c.length;d+=1)console.error(c[d]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ot(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),i=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&r.user&&await ua(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=y0(o);await ua(this.storage,this.storageKey,c)}else{const o=y0(r);await ua(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ot(this.storage,this.storageKey),await ot(this.storage,this.storageKey+"-code-verifier"),await ot(this.storage,this.storageKey+"-user"),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ht()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}
55catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),cs);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:i}}=r;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((i.expires_at*1e3-e)/cs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${cs}ms, refresh threshold is ${xo} ticks`),o<=xo&&await this._callRefreshToken(i.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof Ok)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async r=>{const{data:{session:i}}=r;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((i.expires_at*1e3-e)/cs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${cs}ms, refresh threshold is ${xo} ticks`),o<=xo&&await this._callRefreshToken(i.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ht()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,i){const o=[`provider=${encodeURIComponent(r)}`];if(i?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&o.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[c,u]=await Ws(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(d.toString())}if(i?.queryParams){const c=new URLSearchParams(i.queryParams);o.push(c.toString())}return i?.skipBrowserRedirect&&o.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var i;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}
55):await le(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.access_token})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var i,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:f,error:p}=await le(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(i=c?.session)===null||i===void 0?void 0:i.access_token});return p?this._returnResult({data:null,error:p}):(e.factorType==="totp"&&f.type==="totp"&&(!((o=f?.totp)===null||o===void 0)&&o.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){const r=async()=>{try{return await this._useSession(async i=>{var o;const{data:c,error:u}=i;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?T0(e.webauthn.credential_response):R0(e.webauthn.credential_response)})}:{code:e.code}),{data:f,error:p}=await le(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:d,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:p}))})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(e){const r=async()=>{try{return await this._useSession(async i=>{var o;const{data:c,error:u}=i;if(u)return this._returnResult({data:null,error:u});const d=await le(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(d.error)return d;const{data:f}=d;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:S0(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:E0(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(e){const{data:r,error:i}=await this._challenge({factorId:e.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:i}=await this.getUser();if(i)return{data:null,error:i};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(e=r?.factors)!==null&&e!==void 0?e:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,i,o,c;if(e)try{const{payload:w}=Ec(e);let _=null;w.aal&&(_=w.aal);let R=_;const{data:{user:S},error:E}=await this.getUser(e);if(E)return this._returnResult({data:null,error:E});((i=(r=S?.factors)===null||r===void 0?void 0:r.filter(j=>j.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(R="aal2");const O=w.amr||[];return{data:{currentLevel:_,nextLevel:R,currentAuthenticationMethods:O},error:null}}catch(w){if(te(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:u},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=Ec(u.access_token);let p=null;f.aal&&(p=f.aal);let y=p;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(w=>w.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const v=f.amr||[];return{data:{currentLevel:p,nextLevel:y,currentAuthenticationMethods:v},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;return o?this._returnResult({data:null,error:o}):i?await le(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:i.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new xt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async i=>{const{data:{session:o},error:c}=i;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new xt});const u=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&Ht()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(e,r){try{return await this._useSession(async i=>{const{data:{session:o},error:c}=i;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new xt});const u=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&Ht()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;return i?this._returnResult({data:null,error:i}):r?await le(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new xt})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;return o?this._returnResult({data:null,error:o}):i?(await le(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new xt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let i=r.keys.find(d=>d.kid===e);if(i)return i;const o=Date.now();if(i=this.jwks.keys.find(d=>d.kid===e),i&&this.jwks_cached_at+YC>o)return i;const{data:c,error:u}=await le(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,i=c.keys.find(d=>d.kid===e),!i)?null:i}async getClaims(e,r={}){try{let i=e;if(!i){const{data:w,error:_}
55=await this.getSession();if(_||!w.session)return this._returnResult({data:null,error:_});i=w.session.access_token}const{header:o,payload:c,signature:u,raw:{header:d,payload:f}}=Ec(i);if(!r?.allowExpired)try{yk(c.exp)}catch(w){throw new Kc(w instanceof Error?w.message:"JWT validation failed")}const p=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!p){const{error:w}=await this.getUser(i);if(w)throw w;return{data:{claims:c,header:o,signature:u},error:null}}const y=vk(o.alg),g=await crypto.subtle.importKey("jwk",p,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,sk(`${d}.${f}`)))throw new Kc("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(e){var r,i,o;In(this.experimental);try{if(!Jc())return this._returnResult({data:null,error:new Hn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const d=E0(c.options),f=(o=(i=e?.options)===null||i===void 0?void 0:i.signal)!==null&&o!==void 0?o:Af.createNewAbortSignal(),{data:p,error:y}=await Gw({publicKey:d,signal:f});if(y||!p)return this._returnResult({data:null,error:y??new Hn("WebAuthn ceremony failed",null)});const g=R0(p);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(te(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(e){var r,i;In(this.experimental);try{if(!Jc())return this._returnResult({data:null,error:new Hn("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=S0(o.options),d=(i=(r=e?.options)===null||r===void 0?void 0:r.signal)!==null&&i!==void 0?i:Af.createNewAbortSignal(),{data:f,error:p}=await Vw({publicKey:u,signal:d});if(p||!f)return this._returnResult({data:null,error:p??new Hn("WebAuthn ceremony failed",null)});const y=T0(f);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(te(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){In(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new xt});const{data:o,error:c}=await le(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new xt});const{data:c,error:u}=await le(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;In(this.experimental);try{const{data:i,error:o}=await le(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(e){In(this.experimental);try{const{data:r,error:i}=await le(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Nn});return i?this._returnResult({data:null,error:i}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){In(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new xt});const{data:o,error:c}=await le(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new xt});const{data:c,error:u}=await le(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:e.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new xt});const{error:c}
55=await le(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}}$o.nextInstanceID={};const $k=$o,qk="2.108.0";let Oo="",Zc;if(typeof Deno<"u"){var Xh;Oo="deno",Zc=(Xh=Deno.version)===null||Xh===void 0?void 0:Xh.deno}else if(typeof document<"u")Oo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Oo="react-native";else{var Zh;Oo="node",Zc=typeof process<"u"?(Zh=process.version)===null||Zh===void 0?void 0:Zh.replace(/^v/,""):void 0}const Fw=[`runtime=${Oo}`];Zc&&Fw.push(`runtime-version=${Zc}`);const Vk={"X-Client-Info":`supabase-js/${qk}; ${Fw.join("; ")}`},Gk={headers:Vk},Fk={schema:"public"},Kk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Yk={},Qk={enabled:!1,respectSamplingDecision:!0};function Jk(t,e,r,i){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function d(y){try{p(i.next(y))}catch(g){u(g)}}function f(y){try{p(i.throw(y))}catch(g){u(g)}}function p(y){y.done?c(y.value):o(y.value).then(d,f)}p((i=i.apply(t,[])).next())})}let Wh=null;const Xk="@opentelemetry/api";function Zk(){return Wh===null&&(Wh=import(Xk).catch(()=>null)),Wh}function Wk(){return Jk(this,void 0,void 0,function*(){try{const t=yield Zk();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function e2(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,i,o,c]=e;if(r.length!==2||i.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(i)||!u.test(o)||!u.test(c)||i==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:i,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function t2(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const i of e)try{if(typeof i=="string"){if(n2(r.hostname,i))return!0}else if(i instanceof RegExp){if(i.test(r.hostname))return!0}else if(typeof i=="function"&&i(r))return!0}catch{continue}return!1}function n2(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function r2(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function qo(t){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qo(t)}function s2(t,e){if(qo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(qo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function i2(t){var e=s2(t,"string");return qo(e)=="symbol"?e:e+""}function a2(t,e,r){return(e=i2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function A0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?A0(Object(r),!0).forEach(function(i){a2(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}const o2=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),l2=()=>Headers,c2=(t,e,r,i,o)=>{const c=o2(i),u=l2(),d=o?.enabled===!0,f=o?.respectSamplingDecision!==!1,p=d?r2(e):null;return async(y,g)=>{var v;const w=(v=await r())!==null&&v!==void 0?v:t;let _=new u(g?.headers);if(_.has("apikey")||_.set("apikey",t),_.has("Authorization")||_.set("Authorization",`Bearer ${w}`),p){const R=await u2(y,p,f);R&&(R.traceparent&&!_.has("traceparent")&&_.set("traceparent",R.traceparent),R.tracestate&&!_.has("tracestate")&&_.set("tracestate",R.tracestate),R.baggage&&!_.has("baggage")&&_.set("baggage",R.baggage))}return c(y,st(st({},g),{},{headers:_}))}};async function u2(t,e,r){if(!t2(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const i=await Wk();if(!i||!i.traceparent)return null;if(r){const o=e2(i.traceparent);if(o&&!o.isSampled)return null}return i}function x0(t){return typeof t=="boolean"?{enabled:t}:t}function d2(t){return t.endsWith("/")?t:t+"/"}function h2(t,e){var r,i,o,c,u,d;const{db:f,auth:p,realtime:y,global:g}=t,{db:v,auth:w,realtime:_,global:R}=e,S=x0(t.tracePropagation),E=x0(e.tracePropagation),A={db:st(st({},v),f),auth:st(st({},w),p),realtime:st(st({},_),y),storage:{},global:st(st(st({},R),g),{},{headers:st(st({},(r=R?.headers)!==null&&r!==void 0?r:{}),(i=g?.headers)!==null&&i!==void 0?i:{})}),tracePropagation:{enabled:(o=(c=S?.enabled)!==null&&c!==void 0?c:E?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(d=S?.respectSamplingDecision)!==null&&d!==void 0?d:E?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return t.accessToken?A.accessToken=t.accessToken:delete A.accessToken,A}function f2(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
55if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(d2(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var p2=class extends $k{constructor(t){super(t)}},m2=class{constructor(t,e,r){var i,o;this.supabaseUrl=t,this.supabaseKey=e;const c=f2(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,d={db:Fk,realtime:Yk,auth:st(st({},Kk),{},{storageKey:u}),global:Gk,tracePropagation:Qk},f=h2(r??{},d);if(this.settings=f,this.storageKey=(i=f.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken)this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var p;this.auth=this._initSupabaseAuthClient((p=f.auth)!==null&&p!==void 0?p:{},this.headers,f.global.fetch)}this.fetch=c2(e,t,this._getAccessToken.bind(this),f.global.fetch,f.tracePropagation),this.realtime=this._initRealtimeClient(st({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new kO(new URL("rest/v1",c).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit}),this.storage=new qC(this.storageUrl.href,this.headers,this.fetch,r?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new _O(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:i}=await t.auth.getSession();return(e=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:i,userStorage:o,storageKey:c,flowType:u,lock:d,debug:f,throwOnError:p,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:v},w,_){const R={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new p2({url:this.authUrl.href,headers:st(st({},R),w),storageKey:c,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:i,userStorage:o,flowType:u,lock:d,debug:f,throwOnError:p,experimental:y,fetch:_,lockAcquireTimeout:g,skipAutoInitialize:v,hasCustomAuthorizationHeader:Object.keys(this.headers).some(S=>S.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new hC(this.realtimeUrl.href,st(st({},t),{},{params:st(st({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const g2=(t,e,r)=>new m2(t,e,r);function y2(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}y2()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
55ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function v2(){if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(S=>t===S||t.endsWith("."+S)),i="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=r?t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+i+")(?:-dev)?(?=\\.|$)","i"))?.[1]??t.match(new RegExp("^("+i+")(?=[.-])","i"))?.[1]:void 0,c=window.parent&&window.parent!==window;if(!o||!c)return localStorage;const u=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),d=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,f=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),p=f&&d.test(f)?[f]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,v=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),w=(S,E,A)=>new Promise(O=>{const j=v();let q=!1,H;const P=re=>{q||(q=!0,clearTimeout(H),window.removeEventListener("message",M),O(re))},M=re=>{if(p.indexOf(re.origin)<0)return;const ne=re.data;ne&&ne.type===y&&ne.requestId===j&&P(ne)};window.addEventListener("message",M);const Q={type:S,requestId:j,projectId:o,key:E};A!==void 0&&(Q.value=A);for(const re of p)window.parent.postMessage(Q,re);H=setTimeout(()=>P(null),g)});let _=!0;const R=250;return{getItem:async S=>{let E=await w("lovable-preview-auth:get",S);return!E&&_&&(await new Promise(A=>setTimeout(A,R)),E=await w("lovable-preview-auth:get",S)),_=!1,E&&E.ok&&typeof E.value=="string"?E.value===""?(localStorage.removeItem(S),null):E.value:localStorage.getItem(S)},setItem:(S,E)=>(localStorage.setItem(S,E),w("lovable-preview-auth:set",S,E).then(()=>{})),removeItem:S=>(localStorage.removeItem(S),w("lovable-preview-auth:remove",S).then(()=>{}))}}function b2(){return g2("https://oyprdfqqsjogmuigntbe.supabase.co","sb_publishable_22_MraAhbJPT3_mfs0hUKQ_TixHweJ1",{auth:{storage:v2(),persistSession:!0,autoRefreshToken:!0}})}let ef;const Pt=new Proxy({},{get(t,e,r){return ef||(ef=b2()),Reflect.get(ef,e,r)}}),w2=ii({type:"function"}).client(async({next:t})=>{const{data:e}=await Pt.auth.getSession(),r=e.session?.access_token;return t({headers:r?{Authorization:`Bearer ${r}`}:{}})}),_2=ii(),O0=yO(()=>({functionMiddleware:[w2],requestMiddleware:[_2]}));var Xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},S2=class extends Xo{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Zf=new S2,E2={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},T2=class{#e=E2;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},oi=new T2;function R2(t){setTimeout(t,0)}var A2=typeof window>"u"||"Deno"in globalThis;function sn(){}function x2(t,e){return typeof t=="function"?t(e):t}function xf(t){return typeof t=="number"&&t>=0&&t!==1/0}function Kw(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Es(t,e){return typeof t=="function"?t(e):t}function yn(t,e){return typeof t=="function"?t(e):t}function C0(t,e){const{type:r="all",exact:i,fetchStatus:o,predicate:c,queryKey:u,stale:d}=t;if(u){if(i){if(e.queryHash!==Wf(u,e.options))return!1}else if(!Go(e.queryKey,u))return!1}if(r!=="all"){const f=e.isActive();
vendor: 33,029 bytes, line 55
55if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||c&&!c(e))}function k0(t,e){const{exact:r,status:i,predicate:o,mutationKey:c}=t;if(c){if(!e.options.mutationKey)return!1;if(r){if(Vo(e.options.mutationKey)!==Vo(c))return!1}else if(!Go(e.options.mutationKey,c))return!1}return!(i&&e.state.status!==i||o&&!o(e))}function Wf(t,e){return(e?.queryKeyHashFn||Vo)(t)}function Vo(t){return JSON.stringify(t,(e,r)=>Cf(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function Go(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Go(t[r],e[r])):!1}var O2=Object.prototype.hasOwnProperty;function Yw(t,e,r=0){if(t===e)return t;if(r>500)return e;const i=N0(t)&&N0(e);if(!i&&!(Cf(t)&&Cf(e)))return e;const c=(i?t:Object.keys(t)).length,u=i?e:Object.keys(e),d=u.length,f=i?new Array(d):{};let p=0;for(let y=0;y<d;y++){const g=i?y:u[y],v=t[g],w=e[g];if(v===w){f[g]=v,(i?y<c:O2.call(t,g))&&p++;continue}if(v===null||w===null||typeof v!="object"||typeof w!="object"){f[g]=w;continue}const _=Yw(v,w,r+1);f[g]=_,_===v&&p++}return c===d&&p===c?t:f}function Of(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function N0(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Cf(t){if(!j0(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!j0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function j0(t){return Object.prototype.toString.call(t)==="[object Object]"}function C2(t){return new Promise(e=>{oi.setTimeout(e,t)})}function kf(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Yw(t,e):e}function k2(t,e,r=0){const i=[...t,e];return r&&i.length>r?i.slice(1):i}function N2(t,e,r=0){const i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var ep=Symbol();function Qw(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ep?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Jw(t,e){return typeof t=="function"?t(...e):!!t}function j2(t,e,r){let i=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),i||(i=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),t}var Fo=(()=>{let t=()=>A2;return{isServer(){return t()},setIsServer(e){t=e}}})();function Nf(){let t,e;const r=new Promise((o,c)=>{t=o,e=c});r.status="pending",r.catch(()=>{});function i(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{i({status:"fulfilled",value:o}),t(o)},r.reject=o=>{i({status:"rejected",reason:o}),e(o)},r}var M2=R2;function D2(){let t=[],e=0,r=d=>{d()},i=d=>{d()},o=M2;const c=d=>{e?t.push(d):o(()=>{r(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{i(()=>{d.forEach(f=>{r(f)})})})};return{batch:d=>{let f;e++;try{f=d()}finally{e--,e||u()}return f},batchCalls:d=>(...f)=>{c(()=>{d(...f)})},schedule:c,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}var Ut=D2(),L2=class extends Xo{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},Wc=new L2;function U2(t){return Math.min(1e3*2**t,3e4)}function Xw(t){return(t??"online")==="online"?Wc.isOnline():!0}var jf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Zw(t){let e=!1,r=0,i;const o=Nf(),c=()=>o.status!=="pending",u=R=>{if(!c()){const S=new jf(R);v(S),t.onCancel?.(S)}},d=()=>{e=!0},f=()=>{e=!1},p=()=>Zf.isFocused()&&(t.networkMode==="always"||Wc.isOnline())&&t.canRun(),y=()=>Xw(t.networkMode)&&t.canRun(),g=R=>{c()||(i?.(),o.resolve(R))},v=R=>{c()||(i?.(),o.reject(R))},w=()=>new Promise(R=>{i=S=>{(c()||p())&&R(S)},t.onPause?.()}).then(()=>{i=void 0,c()||t.onContinue?.()}),_=()=>{if(c())return;let R;const S=r===0?t.initialPromise:void 0;try{R=S??t.fn()}catch(E){R=Promise.reject(E)}Promise.resolve(R).then(g).catch(E=>{if(c())return;const A=t.retry??(Fo.isServer()?0:3),O=t.retryDelay??U2,j=typeof O=="function"?O(r,E):O,q=A===!0||typeof A=="number"&&r<A||typeof A=="function"&&A(r,E);if(e||!q){v(E);return}r++,t.onFail?.(r,E),C2(j).then(()=>p()?void 0:w()).then(()=>{e?v(E):_()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i?.(),o),cancelRetry:d,continueRetry:f,canStart:y,start:()=>(y()?_():w().then(_),o)}}var Ww=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xf(this.gcTime)&&(this.#e=oi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Fo.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(oi.clearTimeout(this.#e),this.#e=void 0)}},P2=class extends Ww{#e;#t;#n;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#n=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=D0(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=D0(this.options);e.data!==void 0&&(this.setState(M0(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const r=kf(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#l({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(sn).catch(sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ep||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Es(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Kw(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#i||this.#o()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#o(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},o=()=>{const d=Qw(this.options,e),p=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#i=!1,this.options.persister?this.options.persister(d,p,this):d(p)},u=(()=>{const d={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return i(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Zw({initialPromise:e?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof jf&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof jf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...e_(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...M0(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),Ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function e_(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function M0(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D0(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var z2=class extends Xo{constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.#i=Nf(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#i;#o;#l;#f;#p;#u;#d;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),L0(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Mf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Mf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!Of(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&U0(this.#t,r,this.options,e)&&this.#h(),this.updateResult(),i&&(this.#t!==r||yn(this.options.enabled,this.#t)!==yn(e.enabled,this.#t)||Es(this.options.staleTime,this.#t)!==Es(e.staleTime,this.#t))&&this.#g();const o=this.#y();i&&(this.#t!==r||yn(this.options.enabled,this.#t)!==yn(e.enabled,this.#t)||o!==this.#c)&&this.#v(o)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),r=this.createResult(e,t);return B2(this,r)&&(this.#s=r,this.#a=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#s}trackResult(t,e){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),r=this.#e.getQueryCache().build(this.#e,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#h(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(sn)),e}#g(){this.#w();const t=Es(this.options.staleTime,this.#t);if(Fo.isServer()||this.#s.isStale||!xf(t))return;const r=Kw(this.#s.dataUpdatedAt,t)+1;this.#u=oi.setTimeout(()=>{this.#s.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#c=t,!(Fo.isServer()||yn(this.options.enabled,this.#t)===!1||!xf(this.#c)||this.#c===0)&&(this.#d=oi.setInterval(()=>{(this.options.refetchIntervalInBackground||Zf.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#v(this.#y())}#w(){this.#u!==void 0&&(oi.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#d!==void 0&&(oi.clearInterval(this.#d),this.#d=void 0)}createResult(t,e){const r=this.#t,i=this.options,o=this.#s,c=this.#r,u=this.#a,f=t!==r?t.state:this.#n,{state:p}=t;let y={...p},g=!1,v;if(e._optimisticResults){const M=this.hasListeners(),Q=!M&&L0(t,e),re=M&&U0(t,r,e,i);(Q||re)&&(y={...y,...e_(p.data,t.options)}),e._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:w,errorUpdatedAt:_,status:R}=y;v=y.data;let S=!1;if(e.placeholderData!==void 0&&v===void 0&&R==="pending"){let M;o?.isPlaceholderData&&e.placeholderData===u?.placeholderData?(M=o.data,S=!0):M=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,M!==void 0&&(R="success",v=kf(o?.data,M,e),g=!0)}if(e.select&&v!==void 0&&!S)if(o&&v===c?.data&&e.select===this.#l)v=this.#f;else try{this.#l=e.select,v=e.select(v),v=kf(o?.data,v,e),this.#f=v,this.#o=null}catch(M){this.#o=M}this.#o&&(w=this.#o,v=this.#f,_=Date.now(),R="error");const E=y.fetchStatus==="fetching",A=R==="pending",O=R==="error",j=A&&E,q=v!==void 0,P={status:R,fetchStatus:y.fetchStatus,isPending:A,isSuccess:R==="success",isError:O,isInitialLoading:j,isLoading:j,data:v,dataUpdatedAt:y.dataUpdatedAt,error:w,errorUpdatedAt:_,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:O&&!q,isPaused:y.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:O&&q,isStale:tp(t,e),refetch:this.refetch,promise:this.#i,isEnabled:yn(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=P.data!==void 0,Q=P.status==="error"&&!M,re=ye=>{Q?ye.reject(P.error):M&&ye.resolve(P.data)},ne=()=>{const ye=this.#i=P.promise=Nf();re(ye)},fe=this.#i;switch(fe.status){case"pending":t.queryHash===r.queryHash&&re(fe);break;case"fulfilled":(Q||P.data!==fe.value)&&ne();break;case"rejected":(!Q||P.error!==fe.reason)&&ne();break}}return P}updateResult(){const t=this.#s,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Of(e,t))return;this.#s=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#s).some(u=>{const d=u;return this.#s[d]!==t[d]&&c.has(d)})};this.#E({listeners:r()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function I2(t,e){return yn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&yn(e.retryOnMount,t)===!1)}function L0(t,e){return I2(t,e)||t.state.data!==void 0&&Mf(t,e,e.refetchOnMount)}function Mf(t,e,r){if(yn(e.enabled,t)!==!1&&Es(e.staleTime,t)!=="static"){const i=typeof r=="function"?r(t):r;return i==="always"||i!==!1&&tp(t,e)}return!1}function U0(t,e,r,i){return(t!==e||yn(i.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&tp(t,r)}function tp(t,e){return yn(e.enabled,t)!==!1&&t.isStaleByTime(Es(e.staleTime,t))}function B2(t,e){return!Of(t.getCurrentResult(),e)}function P0(t){return{onFetch:(e,r)=>{const i=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,c=e.state.data?.pages||[],u=e.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let y=!1;const g=_=>{j2(_,()=>e.signal,()=>y=!0)},v=Qw(e.options,e.fetchOptions),w=async(_,R,S)=>{if(y)return Promise.reject();if(R==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const H={client:e.client,queryKey:e.queryKey,pageParam:R,direction:S?"backward":"forward",meta:e.options.meta};return g(H),H})(),O=await v(A),{maxPages:j}=e.options,q=S?N2:k2;return{pages:q(_.pages,O,j),pageParams:q(_.pageParams,R,j)}};if(o&&c.length){const _=o==="backward",R=_?H2:z0,S={pages:c,pageParams:u},E=R(i,S);d=await w(S,E,_)}else{const _=t??c.length;do{const R=f===0?u[0]??i.initialPageParam:z0(i,d);if(f>0&&R==null)break;d=await w(d,R),f++}while(f<_)}return d};e.options.persister?e.fetchFn=()=>e.options.persister?.(p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=p}}}function z0(t,{pages:e,pageParams:r}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}function H2(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var $2=class extends Ww{#e;#t;#n;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||q2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Zw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#r({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",o=!this.#s.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);const u=await this.options.onMutate?.(t,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:t,isPaused:o})}const c=await this.#s.start();return await this.#n.config.onSuccess?.(c,t,this.state.context,this,r),await this.options.onSuccess?.(c,t,this.state.context,r),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,t,this.state.context,r),this.#r({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,t,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,t,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,t,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#r(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Ut.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function q2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var V2=class extends Xo{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,r){const i=new $2({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:r});return this.add(i),i}add(t){this.#e.add(t);const e=Tc(t);if(typeof e=="string"){const r=this.#t.get(e);r?r.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Tc(t);if(typeof e=="string"){const r=this.#t.get(e);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Tc(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Tc(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ut.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>k0(e,r))}findAll(t={}){return this.getAll().filter(e=>k0(t,e))}notify(t){Ut.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Ut.batch(()=>Promise.all(t.map(e=>e.continue().catch(sn))))}};function Tc(t){return t.options.scope?.id}var G2=class extends Xo{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const i=e.queryKey,o=e.queryHash??Wf(i,e);let c=this.get(o);return c||(c=new P2({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>C0(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>C0(t,r)):e}notify(t){Ut.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},F2=class{#e;#t;#n;#s;#r;#a;#i;#o;constructor(t={}){this.#e=t.queryCache||new G2,this.#t=t.mutationCache||new V2,this.#n=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=Zf.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Wc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Es(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const i=r.data;return[e,i]})}setQueryData(t,e,r){const i=this.defaultQueryOptions({queryKey:t}),c=this.#e.get(i.queryHash)?.state.data,u=x2(e,c);if(u!==void 0)return this.#e.build(this,i).setData(u,{...r,manual:!0})}setQueriesData(t,e,r){return Ut.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Ut.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return Ut.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},i=Ut.batch(()=>this.#e.findAll(t).map(o=>o.cancel(r)));return Promise.all(i).then(sn).catch(sn)}invalidateQueries(t,e={}){return Ut.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},i=Ut.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,r);return r.throwOnError||(c=c.catch(sn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(sn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime(Es(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(sn).catch(sn)}fetchInfiniteQuery(t){return t.behavior=P0(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(sn).catch(sn)}ensureInfiniteQueryData(t){return t.behavior=P0(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#s.set(Vo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],r={};return e.forEach(i=>{Go(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,e){this.#r.set(Vo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],r={};return e.forEach(i=>{Go(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Wf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ep&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},t_=J.createContext(void 0),gu=t=>{const e=J.useContext(t_);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},K2=({client:t,children:e})=>(J.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),N.jsx(t_.Provider,{value:t,children:e})),n_=J.createContext(!1),Y2=()=>J.useContext(n_);n_.Provider;function Q2(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var J2=J.createContext(Q2()),X2=()=>J.useContext(J2),Z2=(t,e,r)=>{const i=r?.state.error&&typeof t.throwOnError=="function"?Jw(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},W2=t=>{J.useEffect(()=>{t.clearReset()},[t])},eN=({result:t,errorResetBoundary:e,throwOnError:r,query:i,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(o&&t.data===void 0||Jw(r,[t.error,i])),tN=t=>{if(t.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...o)=>r(i(...o)):r(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},nN=(t,e)=>t.isLoading&&t.isFetching&&!e,rN=(t,e)=>t?.suspense&&e.isPending,I0=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function sN(t,e,r){const i=Y2(),o=X2(),c=gu(),u=c.defaultQueryOptions(t);c.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const d=c.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",tN(u),Z2(u,o,d),W2(o);const f=!c.getQueryCache().get(u.queryHash),[p]=J.useState(()=>new e(c,u)),y=p.getOptimisticResult(u),g=!i&&t.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(v=>{const w=g?p.subscribe(Ut.batchCalls(v)):sn;return p.updateResult(),w},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),J.useEffect(()=>{p.setOptions(u)},[u,p]),rN(u,y))throw I0(u,p,o);if(eN({result:y,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw y.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(u,y),u.experimental_prefetchInRender&&!Fo.isServer()&&nN(y,i)&&(f?I0(u,p,o):d?.promise)?.catch(sn).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?y:p.trackResult(y)}function np(t,e){return sN(t,z2)}const iN="/assets/styles-DfEMf-4h.css";function aN(t,e={}){typeof window>"u"||window.__lovableEvents?.captureException?.(t,{source:"react_error_boundary",route:window.location.pathname,...e},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function oN(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const lN=t=>{switch(t){case"success":return dN;case"info":return fN;case"warning":return hN;case"error":return pN;default:return null}},cN=Array(12).fill(0),uN=({visible:t,className:e})=>ee.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ee.createElement("div",{className:"sonner-spinner"},cN.map((r,i)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),dN=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hN=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
55currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),fN=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pN=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mN=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gN=()=>{const[t,e]=ee.useState(document.hidden);return ee.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let Df=1;class yN{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:i,...o}=e,c=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:Df++,u=this.toasts.find(f=>f.id===c),d=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(f=>f.id===c?(this.publish({...f,...e,id:c,title:i}),{...f,...e,id:c,dismissible:d,title:i}):f):this.addToast({title:i,...o,dismissible:d,id:c}),c},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let c=i!==void 0,u;const d=o.then(async p=>{if(u=["resolve",p],ee.isValidElement(p))c=!1,this.create({id:i,type:"default",message:p});else if(bN(p)&&!p.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,_=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:v,..._})}else if(p instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(p):r.error,v=typeof r.description=="function"?await r.description(p):r.description,_=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:v,..._})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(p):r.success,v=typeof r.description=="function"?await r.description(p):r.description,_=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:v,..._})}}).catch(async p=>{if(u=["reject",p],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(p):r.error,g=typeof r.description=="function"?await r.description(p):r.description,w=typeof y=="object"&&!ee.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((p,y)=>d.then(()=>u[0]==="reject"?y(u[1]):p(u[1])).catch(y));
vendor: 772 bytes, line 55
55return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(e,r)=>{const i=r?.id||Df++;return this.create({jsx:e(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const rn=new yN,vN=(t,e)=>{const r=e?.id||Df++;return rn.addToast({title:t,...e,id:r}),r},bN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",wN=vN,_N=()=>rn.toasts,SN=()=>rn.getActiveToasts(),eu=Object.assign(wN,{success:rn.success,info:rn.info,warning:rn.warning,error:rn.error,custom:rn.custom,message:rn.message,promise:rn.promise,dismiss:rn.dismiss,loading:rn.loading},{getHistory:_N,getToasts:SN});oN
vendor: 14,873 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
55Rc(t){return t.label!==void 0}const EN=3,TN="24px",RN="16px",B0=4e3,AN=356,xN=14,ON=45,CN=200;function Xn(...t){return t.filter(Boolean).join(" ")}function kN(t){const[e,r]=t.split("-"),i=[];return e&&i.push(e),r&&i.push(r),i}const NN=t=>
vendor: 19,802 bytes, line 55
55{var e,r,i,o,c,u,d,f,p;const{invert:y,toast:g,unstyled:v,interacting:w,setHeights:_,visibleToasts:R,heights:S,index:E,toasts:A,expanded:O,removeToast:j,defaultRichColors:q,closeButton:H,style:P,cancelButtonStyle:M,actionButtonStyle:Q,className:re="",descriptionClassName:ne="",duration:fe,position:ye,gap:Le,expandByDefault:Re,classNames:L,icons:Y,closeButtonAriaLabel:ie="Close toast"}=t,[_e,W]=ee.useState(null),[C,V]=ee.useState(null),[F,Z]=ee.useState(!1),[X,se]=ee.useState(!1),[be,ge]=ee.useState(!1),[he,Ct]=ee.useState(!1),[gt,ct]=ee.useState(!1),[Mn,yt]=ee.useState(0),[Cs,sr]=ee.useState(0),qn=ee.useRef(g.duration||fe||B0),bn=ee.useRef(null),kt=ee.useRef(null),cn=E===0,ks=E+1<=R,St=g.type,Vn=g.dismissible!==!1,Et=g.className||"",ze=g.descriptionClassName||"",tt=ee.useMemo(()=>S.findIndex(ve=>ve.toastId===g.id)||0,[S,g.id]),wn=ee.useMemo(()=>{var ve;return(ve=g.closeButton)!=null?ve:H},[g.closeButton,H]),ir=ee.useMemo(()=>g.duration||fe||B0,[g.duration,fe]),wa=ee.useRef(0),ar=ee.useRef(0),Zo=ee.useRef(0),Dr=ee.useRef(null),[Ns,$t]=ye.split("-"),Dn=ee.useMemo(()=>S.reduce((ve,Je,Tt)=>Tt>=tt?ve:ve+Je.height,0),[S,tt]),zt=gN(),yu=g.invert||y,_a=St==="loading";ar.current=ee.useMemo(()=>tt*Le+Dn,[tt,Dn]),ee.useEffect(()=>{qn.current=ir},[ir]),ee.useEffect(()=>{Z(!0)},[]),ee.useEffect(()=>{const ve=kt.current;if(ve){const Je=ve.getBoundingClientRect().height;return sr(Je),_(Tt=>[{toastId:g.id,height:Je,position:g.position},...Tt]),()=>_(Tt=>Tt.filter(It=>It.toastId!==g.id))}},[_,g.id]),ee.useLayoutEffect(()=>{if(!F)return;const ve=kt.current,Je=ve.style.height;ve.style.height="auto";const Tt=ve.getBoundingClientRect().height;ve.style.height=Je,sr(Tt),_(It=>It.find(et=>et.toastId===g.id)?It.map(et=>et.toastId===g.id?{...et,height:Tt}:et):[{toastId:g.id,height:Tt,position:g.position},...It])},[F,g.title,g.description,_,g.id,g.jsx,g.action,g.cancel]);const Gn=ee.useCallback(()=>{se(!0),yt(ar.current),_(ve=>ve.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{j(g)},CN)},[g,j,_,ar]);ee.useEffect(()=>{if(g.promise&&St==="loading"||g.duration===1/0||g.type==="loading")return;let ve;return O||w||zt?(()=>{if(Zo.current<wa.current){const It=new Date().getTime()-wa.current;qn.current=qn.current-It}Zo.current=new Date().getTime()})():qn.current!==1/0&&(wa.current=new Date().getTime(),ve=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Gn()},qn.current)),()=>clearTimeout(ve)},[O,w,g,St,zt,Gn]),ee.useEffect(()=>{g.delete&&(Gn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Gn,g.delete]);function mi(){var ve;if(Y?.loading){var Je;return ee.createElement("div",{className:Xn(L?.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":St==="loading"},Y.loading)}return ee.createElement(uN,{className:Xn(L?.loader,g==null||(ve=g.classNames)==null?void 0:ve.loader),visible:St==="loading"})}const gi=g.icon||Y?.[St]||lN(St);var js,Fn;return ee.createElement("li",{tabIndex:0,ref:kt,className:Xn(re,Et,L?.toast,g==null||(e=g.classNames)==null?void 0:e.toast,L?.default,L?.[St],g==null||(r=g.classNames)==null?void 0:r[St]),"data-sonner-toast":"","data-rich-colors":(js=g.richColors)!=null?js:q,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":F,"data-promise":!!g.promise,"data-swiped":gt,"data-removed":X,"data-visible":ks,"data-y-position":Ns,"data-x-position":$t,"data-index":E,"data-front":cn,"data-swiping":be,"data-dismissible":Vn,"data-type":St,"data-invert":yu,"data-swipe-out":he,"data-swipe-direction":C,"data-expanded":!!(O||Re&&F),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":A.length-E,"--offset":`${X?Mn:ar.current}px`,"--initial-height":Re?"auto":`${Cs}px`,...P,...g.style},onDragEnd:()=>{ge(!1),W(null),Dr.current=null},onPointerDown:ve=>{ve.button!==2&&(_a||!Vn||(bn.current=new Date,yt(ar.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(ge(!0),Dr.current={x:ve.clientX,y:ve.clientY})))},onPointerUp:()=>{var ve,Je,Tt;if(he||!Vn)return;Dr.current=null;const It=Number(((ve=kt.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Je=kt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Tt=bn.current)==null?void 0:Tt.getTime()),Ft=_e==="x"?It:Lr,Ms=Math.abs(Ft)/et;if(Math.abs(Ft)>=ON||Ms>.11){yt(ar.current),g.onDismiss==null||g.onDismiss.call(g,g),V(_e==="x"?It>0?"right":"left":Lr>0?"down":"up"),Gn(),Ct(!0);return}else{var Kt,Yt;(Kt=kt.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Yt=kt.current)==null||Yt.style.setProperty("--swipe-amount-y","0px")}ct(!1),ge(!1),W(null)},onPointerMove:ve=>{var Je,Tt,It;if(!Dr.current||!Vn||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const et=ve.clientY-Dr.current.y,Ft=ve.clientX-Dr.current.x;var Ms;const Kt=(Ms=t.swipeDirections)!=null?Ms:kN(ye);!_e&&(Math.abs(Ft)>1||Math.abs(et)>1)&&W(Math.abs(Ft)>Math.abs(et)?"x":"y");let Yt={x:0,y:0};const yi=Ln=>1/(1.5+Math.abs(Ln)/20);if(_e==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&et<0||Kt.includes("bottom")&&et>0)Yt.y=et;else{const Ln=et*yi(et);Yt.y=Math.abs(Ln)<Math.abs(et)?Ln:et}}else if(_e==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Ft<0||Kt.includes("right")&&Ft>0)Yt.x=Ft;else{const Ln=Ft*yi(Ft);Yt.x=Math.abs(Ln)<Math.abs(Ft)?Ln:Ft}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&ct(!0),(Tt=kt.current)==null||Tt.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(It=kt.current)==null||It.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},wn&&!g.jsx&&St!=="loading"?ee.createElement("button",{"aria-label":ie,"data-disabled":_a,"data-close-button":!0,onClick:_a||!Vn?()=>{}:()=>{Gn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Xn(L?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(Fn=Y?.close)!=null?Fn:mN):null,(St||g.icon||g.promise)&&g.icon!==null&&(Y?.[St]!==null||g.icon)?ee.createElement("div",{"data-icon":"",className:Xn(L?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||mi():null,g.type!=="loading"?gi:null):null,ee.createElement("div",{"data-content":"",className:Xn(L?.content,g==null||(c=g.classNames)==null?void 0:c.content)},ee.createElement("div",{"data-title":"",className:Xn(L?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ee.createElement("div",{"data-description":"",className:Xn(ne,ze,L?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),ee.isValidElement(g.cancel)?g.cancel:g.cancel&&Rc(g.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||M,onClick:ve=>{Rc(g.cancel)&&Vn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,ve),Gn())},className:Xn(L?.cancelButton,g==null||(f=g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,ee.isValidElement(g.action)?g.action:g.action&&Rc(g.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Q,onClick:ve=>{Rc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,ve),!ve.defaultPrevented&&Gn())},className:Xn(L?.actionButton,g==null||(p=g.classNames)==null?void 0:p.actionButton)},g.action.label):null)};function H0(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function jN(t,e){const r={};return[t,e].forEach((i,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",d=c?RN:TN;function f(p){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?r[`${u}-${p}`]=d:r[`${u}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):f(d)}),r}const MN=ee.forwardRef(function(e,r){const{id:i,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:p,offset:y,mobileOffset:g,theme:v="light",richColors:w,duration:_,style:R,visibleToasts:S=EN,toastOptions:E,dir:A=H0(),gap:O=xN,icons:j,containerAriaLabel:q="Notifications"}=e,[H,P]=ee.useState([]),M=ee.useMemo(()=>i?H.filter(F=>F.toasterId===i):H.filter(F=>!F.toasterId),[H,i]),Q=ee.useMemo(()=>Array.from(new Set([c].concat(M.filter(F=>F.position).map(F=>F.position)))),[M,c]),[re,ne]=ee.useState([]),[fe,ye]=ee.useState(!1),[Le,Re]=ee.useState(!1),[L,Y]=ee.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=ee.useRef(null),_e=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=ee.useRef(null),C=ee.useRef(!1),V=ee.useCallback(F=>{P(Z=>{var X;return(X=Z.find(se=>se.id===F.id))!=null&&X.delete||rn.dismiss(F.id),Z.filter(({id:se})=>se!==F.id)})},[]);return ee.useEffect(()=>rn.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{P(Z=>Z.map(X=>X.id===F.id?{...X,delete:!0}:X))});return}setTimeout(()=>{Dx.flushSync(()=>{P(Z=>{const X=Z.findIndex(se=>se.id===F.id);return X!==-1?[...Z.slice(0,X),{...Z[X],...F},...Z.slice(X+1)]:[F,...Z]})})})}),[H]),ee.useEffect(()=>{if(v!=="system"){Y(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Z})=>{Y(Z?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{Y(X?"dark":"light")}catch(se){console.error(se)}})}},[v]),ee.useEffect(()=>{H.length<=1&&ye(!1)},[H]),ee.useEffect(()=>{const F=Z=>{var X;if(u.every(ge=>Z[ge]||Z.code===ge)){var be;ye(!0),(be=ie.current)==null||be.focus()}Z.code==="Escape"&&(document.activeElement===ie.current||(X=ie.current)!=null&&X.contains(document.activeElement))&&ye(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[u]),ee.useEffect(()=>{if(ie.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,C.current=!1)}},[ie.current]),ee.createElement("section",{ref:r,"aria-label":`${q} ${_e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((F,Z)=>{var X;const[se,be]=F.split("-");return M.length?ee.createElement("ol",{key:F,dir:A==="auto"?H0():A,tabIndex:-1,ref:ie,className:p,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":se,"data-x-position":be,style:{"--front-toast-height":`${((X=re[0])==null?void 0:X.height)||0}px`,"--width":`${AN}px`,"--gap":`${O}px`,...R,...jN(y,g)},onBlur:ge=>{C.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(C.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||C.current||(C.current=!0,W.current=ge.relatedTarget)},onMouseEnter:()=>ye(!0),onMouseMove:()=>ye(!0),onMouseLeave:()=>{Le||ye(!1)},onDragEnd:()=>ye(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Re(!0)},onPointerUp:()=>Re(!1)},M.filter(ge=>!ge.position&&Z===0||ge.position===F).map((ge,he)=>{var Ct,gt;return ee.createElement(NN,{key:ge.id,icons:j,index:he,toast:ge,defaultRichColors:w,duration:(Ct=E?.duration)!=null?Ct:_,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:o,visibleToasts:S,closeButton:(gt=E?.closeButton)!=null?gt:f,interacting:Le,position:F,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:V,toasts:M.filter(ct=>ct.position==ge.position),heights:re.filter(ct=>ct.position==ge.position),setHeights:ne,expandByDefault:d,gap:O,expanded:fe,swipeDirections:e.swipeDirections})})):null}))}),DN=({...t})=>N.jsx(MN,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});const r_=(...t)=>t.filter((e,r,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===r).join(" ").trim();const LN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const UN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,i)=>i?i.toUpperCase():r.toLowerCase());const $0=t=>{const e=UN(t);return e.charAt(0).toUpperCase()+e.slice(1)};var PN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const zN=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const IN=J.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:o="",children:c,iconNode:u,...d},f)=>J.createElement("svg",{ref:f,...PN,width:e,height:e,stroke:t,strokeWidth:i?Number(r)*24/Number(e):r,className:r_("lucide",o),...!c&&!zN(d)&&{"aria-hidden":"true"},...d},[...u.map(([p,y])=>J.createElement(p,y)),...Array.isArray(c)?c:[c]]));const rp=(t,e)=>{const r=J.forwardRef(({className:i,...o},c)=>J.createElement(IN,{ref:c,iconNode:e,className:r_(`lucide-${LN($0(t))}`,`lucide-${t}`,i),...o}));return r.displayName=$0(t),r};const BN=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],HN=rp("bell",BN);const $N=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],qN=rp("menu",$N);const VN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],GN=rp("x",VN);function q0(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function s_(...t){return e=>{let r=!1;const i=t.map(o=>{const c=q0(o,e);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let o=0;o<i.length;o++){const c=i[o];typeof c=="function"?c():q0(t[o],null)}}}}function OL(...t){return J.useCallback(s_(...t),t)}var FN=Symbol.for("react.lazy"),tu=YE[" use ".trim().toString()];function KN(t){return typeof t=="object"&&t!==null&&"then"in t}function i_(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===FN&&"_payload"in t&&KN(t._payload)}function YN(t){const e=JN(t),r=J.forwardRef((i,o)=>{let{children:c,...u}=i;i_(c)&&typeof tu=="function"&&(c=tu(c._payload));const d=J.Children.toArray(c),f=d.find(ZN);if(f){const p=f.props.children,y=d.map(g=>g===f?J.Children.count(p)>1?J.Children.only(null):J.isValidElement(p)?p.props.children:null:g);return N.jsx(e,{...u,ref:o,children:J.isValidElement(p)?J.cloneElement(p,void 0,y):null})}return N.jsx(e,{...u,ref:o,children:c})});return r.displayName=`${t}.Slot`,r}var QN=YN("Slot");function JN(t){const e=J.forwardRef((r,i)=>{let{children:o,...c}=r;if(i_(o)&&typeof tu=="function"&&(o=tu(o._payload)),J.isValidElement(o)){const u=ej(o),d=WN(c,o.props);return o.type!==J.Fragment&&(d.ref=i?s_(i,u):u),J.cloneElement(o,d)}return J.Children.count(o)>1?J.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var XN=Symbol("radix.slottable");function ZN(t){return J.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===XN}function WN(t,e){const r={...e};for(const i in e){const o=t[i],c=e[i];/^on[A-Z]/.test(i)?o&&c?r[i]=(...d)=>{const f=c(...d);return o(...d),f}:o&&(r[i]=o):i==="style"?r[i]={...o,...c}:i==="className"&&(r[i]=[o,c].filter(Boolean).join(" "))}return{...t,...r}}function ej(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function a_(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=a_(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}function o_(){for(var t,e,r=0,i="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=a_(t))&&(i&&(i+=" "),i+=e);return i}const V0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,G0=o_,tj=(t,e)=>r=>{var i;if(e?.variants==null)return G0(t,r?.class,r?.className);const{variants:o,defaultVariants:c}=e,u=Object.keys(o).map(p=>{const y=r?.[p],g=c?.[p];if(y===null)return null;const v=V0(y)||V0(g);return o[p][v]}),d=r&&Object.entries(r).reduce((p,y)=>{let[g,v]=y;return v===void 0||(p[g]=v),p},{}),f=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((p,y)=>{let{class:g,className:v,...w}=y;return Object.entries(w).every(_=>{let[R,S]=_;return Array.isArray(S)?S.includes({...c,...d}[R]):{...c,...d}[R]===S})?[...p,g,v]:p},[]);return G0(t,u,f,r?.class,r?.className)},nj=(t,e)=>{const r=new Array(t.length+e.length);for(let i=0;i<t.length;i++)r[i]=t[i];for(let i=0;i<e.length;i++)r[t.length+i]=e[i];return r},rj=(t,e)=>({classGroupId:t,validator:e}),l_=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),nu="-",F0=[],sj="arbitrary..",ij=t=>{const e=oj(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return aj(u);const d=u.split(nu),f=d[0]===""&&d.length>1?1:0;return c_(d,f,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=i[u],p=r[u];return f?p?nj(p,f):f:p||F0}return r[u]||F0}}},c_=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const o=t[e],c=r.nextPart.get(o);if(c){const p=c_(t,e+1,c);if(p)return p}const u=r.validators;if(u===null)return;const d=e===0?t.join(nu):t.slice(e).join(nu),f=u.length;for(let p=0;p<f;p++){const y=u[p];if(y.validator(d))return y.classGroupId}},aj=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),i=e.slice(0,r);return i?sj+i:void 0})(),oj=t=>{const{theme:e,classGroups:r}=t;return lj(r,e)},lj=(t,e)=>{const r=l_();for(const i in t){const o=t[i];sp(o,r,i,e)}return r},sp=(t,e,r,i)=>{const o=t.length;for(let c=0;c<o;c++){const u=t[c];cj(u,e,r,i)}},cj=(t,e,r,i)=>{if(typeof t=="string"){uj(t,e,r);return}if(typeof t=="function"){dj(t,e,r,i);return}hj(t,e,r,i)},uj=(t,e,r)=>{const i=t===""?e:u_(e,t);i.classGroupId=r},dj=(t,e,r,i)=>{if(fj(t)){sp(t(i),e,r,i);return}e.validators===null&&(e.validators=[]),e.validators.push(rj(r,t))},hj=(t,e,r,i)=>{const o=Object.entries(t),c=o.length;for(let u=0;u<c;u++){const[d,f]=o[u];sp(f,u_(e,d),r,i)}},u_=(t,e)=>{let r=t;const i=e.split(nu),o=i.length;for(let c=0;c<o;c++){const u=i[c];let d=r.nextPart.get(u);d||(d=l_(),r.nextPart.set(u,d)),r=d}return r},fj=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,pj=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),i=Object.create(null);const o=(c,u)=>{r[c]=u,e++,e>t&&(e=0,i=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=i[c])!==void 0)return o(c,u),u},set(c,u){c in r?r[c]=u:o(c,u)}}},Lf="!",K0=":",mj=[],Y0=(t,e,r,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:i,isExternal:o}),gj=t=>{const{prefix:e,experimentalParseClassName:r}=t;let i=o=>{const c=[];let u=0,d=0,f=0,p;const y=o.length;for(let R=0;R<y;R++){const S=o[R];if(u===0&&d===0){if(S===K0){c.push(o.slice(f,R)),f=R+1;continue}if(S==="/"){p=R;continue}}S==="["?u++:S==="]"?u--:S==="("?d++:S===")"&&d--}const g=c.length===0?o:o.slice(f);let v=g,w=!1;
vendor: 1,378 bytes, line 55
55g.endsWith(Lf)?(v=g.slice(0,-1),w=!0):g.startsWith(Lf)&&(v=g.slice(1),w=!0);const _=p&&p>f?p-f:void 0;return Y0(c,w,v,_)};if(e){const o=e+K0,c=i;i=u=>u.startsWith(o)?c(u.slice(o.length)):Y0(mj,!1,u,void 0,!0)}if(r){const o=i;i=c=>r({className:c,parseClassName:o})}return i},yj=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,i)=>{e.set(r,1e6+i)}),r=>{const i=[];let o=[];for(let c=0;c<r.length;c++){const u=r[c],d=u[0]==="[",f=e.has(u);d||f?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(u)):o.push(u)}return o.length>0&&(o.sort(),i.push(...o)),i}},vj=t=>({cache:pj(t.cacheSize),parseClassName:gj(t),sortModifiers:yj(t),...ij(t)}),bj=/\s+/,wj=(t,e)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:c}=e,u=[],d=t.trim().split(bj);let f="";for(let p=d.length-1;p>=0;p-=1){const y=d[p],{isExternal:g,modifiers:v,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:R}=r(y);if(g){f=y+(f.length>0?" "+f:f);continue}let S=!!R,E=i(S?_.substring(0,R):_);if(!E){if(!S){f=y+(f.length>0?" "+f:f);continue}if(E=i(_),!E){f=y+(f.length>0?" "+f:f);continue}S=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=w?A+Lf:A,j=O+E;if(u.indexOf(j)>-1)continue;u.push(j);const q=o(E,S);for(let H=0;H<q.length;++H){const P=q[H];u.push(O+P)}f=y+(f.length>0?" "+f:f)}return f},_j=(...t)=>{let e=0,r,i,o="";for(;e<t.length;
vendor: 1,861 bytes, line 55
55)(r=t[e++])&&(i=d_(r))&&(o&&(o+=" "),o+=i);return o},d_=t=>{if(typeof t=="string")return t;let e,r="";for(let i=0;i<t.length;i++)t[i]&&(e=d_(t[i]))&&(r&&(r+=" "),r+=e);return r},Sj=(t,...e)=>{let r,i,o,c;const u=f=>{const p=e.reduce((y,g)=>g(y),t());return r=vj(p),i=r.cache.get,o=r.cache.set,c=d,d(f)},d=f=>{const p=i(f);if(p)return p;const y=wj(f,r);return o(f,y),y};return c=u,(...f)=>c(_j(...f))},Ej=[],bt=t=>{const e=r=>r[t]||Ej;return e.isThemeGetter=!0,e},h_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Rj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Aj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Oj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,os=t=>Tj.test(t),Te=t=>!!t&&!Number.isNaN(Number(t)),ls=t=>!!t&&Number.isInteger(Number(t)),tf=t=>t.endsWith("%")&&Te(t.slice(0,-1)),Or=t=>Rj.test(t),p_=()=>!0,kj=t=>Aj.test(t)&&!xj.test(t),ip=()=>!1,Nj=t=>Oj.test(t),jj=t=>Cj.test(t),Mj=t=>!oe(t)&&!ce(t),Dj=t=>xs(t,y_,ip),oe=t=>h_.test(t),ei=t=>xs(t,v_,kj),Q0=t=>xs(t,$j,Te),Lj=t=>xs(t,w_,p_),Uj=t=>xs(t,b_,ip),J0=t=>xs(t,m_,ip),Pj=t=>xs(t,g_,jj),Ac=t=>xs(t,__,Nj),ce=t=>f_.test(t),_o=t=>fi(t,v_),zj=t=>fi(t,b_),X0=t=>fi(t,m_),Ij=t=>fi(t,y_),Bj=t=>fi(t,g_),xc=t=>fi(t,__,!0),Hj=t=>fi(t,w_,!0),xs=(t,e,r)=>{const i=h_.exec(t);return i?i[1]?e(i[1]):r(i[2]):!1},fi=(t,e,r=!1)=>{const i=f_.exec(t);return i?i[1]?e(i[1]):r:!1},m_=t=>t==="position"||t==="percentage",g_=t=>t==="image"||t==="url",y_=t=>t==="length"||t==="size"||t==="bg-size",v_=t=>t==="length",$j=t=>t==="number",b_=t=>t==="family-name",w_=t=>t==="number"||t==="weight",__=t=>t==="shadow",qj=()=>
vendor: 4,417 bytes, line 55
55{const t=bt("color"),e=bt("font"),r=bt("text"),i=bt("font-weight"),o=bt("tracking"),c=bt("leading"),u=bt("breakpoint"),d=bt("container"),f=bt("spacing"),p=bt("radius"),y=bt("shadow"),g=bt("inset-shadow"),v=bt("text-shadow"),w=bt("drop-shadow"),_=bt("blur"),R=bt("perspective"),S=bt("aspect"),E=bt("ease"),A=bt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...j(),ce,oe],H=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],M=()=>[ce,oe,f],Q=()=>[os,"full","auto",...M()],re=()=>[ls,"none","subgrid",ce,oe],ne=()=>["auto",{span:["full",ls,ce,oe]},ls,ce,oe],fe=()=>[ls,"auto",ce,oe],ye=()=>["auto","min","max","fr",ce,oe],Le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Re=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...M()],Y=()=>[os,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],ie=()=>[os,"screen","full","dvw","lvw","svw","min","max","fit",...M()],_e=()=>[os,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],W=()=>[t,ce,oe],C=()=>[...j(),X0,J0,{position:[ce,oe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",Ij,Dj,{size:[ce,oe]}],Z=()=>[tf,_o,ei],X=()=>["","none","full",p,ce,oe],se=()=>["",Te,_o,ei],be=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[Te,tf,X0,J0],Ct=()=>["","none",_,ce,oe],gt=()=>["none",Te,ce,oe],ct=()=>["none",Te,ce,oe],Mn=()=>[Te,ce,oe],yt=()=>[os,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Or],breakpoint:[Or],color:[p_],container:[Or],"drop-shadow":[Or],ease:["in","out","in-out"],font:[Mj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Or],shadow:[Or],spacing:["px",Te],text:[Or],"text-shadow":[Or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",os,oe,ce,S]}],container:["container"],columns:[{columns:[Te,oe,ce,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[ls,"auto",ce,oe]}],basis:[{basis:[os,"full","auto",d,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,os,"auto","initial","none",oe]}],grow:[{grow:["",Te,ce,oe]}],shrink:[{shrink:["",Te,ce,oe]}],order:[{order:[ls,"first","last","none",ce,oe]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":fe()}
vendor: 4,216 bytes, line 55
55],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ye()}],"auto-rows":[{"auto-rows":ye()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Le(),"normal"]}],"justify-items":[{"justify-items":[...Re(),"normal"]}],"justify-self":[{"justify-self":["auto",...Re()]}],"align-content":[{content:["normal",...Le()]}],"align-items":[{items:[...Re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Le()}],"place-items":[{"place-items":[...Re(),"baseline"]}],"place-self":[{"place-self":["auto",...Re()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",..._e()]}],"min-block-size":[{"min-block":["auto",..._e()]}],"max-block-size":[{"max-block":["none",..._e()]}],w:[{w:[d,"screen",...Y()]}],"min-w":[{"min-w":[d,"screen","none",...Y()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,_o,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Hj,Lj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tf,oe]}],"font-family":[{font:[zj,Uj,e]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ce,oe]}],"line-clamp":[{"line-clamp":[Te,"none",ce,Q0]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",ce,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",ce,ei]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Te,"auto",ce,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ls,ce,oe],radial:["",ce,oe],conic:[ls,ce,oe]},Bj,Pj]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:Z()}
vendor: 9,381 bytes, line 55
55],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,ce,oe]}],"outline-w":[{outline:["",Te,_o,ei]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",y,xc,Ac]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",g,xc,Ac]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Te,ei]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,xc,Ac]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Te,ce,oe]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[ce,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,oe]}],filter:[{filter:["","none",ce,oe]}],blur:[{blur:Ct()}],brightness:[{brightness:[Te,ce,oe]}],contrast:[{contrast:[Te,ce,oe]}],"drop-shadow":[{"drop-shadow":["","none",w,xc,Ac]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Te,ce,oe]}],"hue-rotate":[{"hue-rotate":[Te,ce,oe]}],invert:[{invert:["",Te,ce,oe]}],saturate:[{saturate:[Te,ce,oe]}],sepia:[{sepia:["",Te,ce,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,oe]}],"backdrop-blur":[{"backdrop-blur":Ct()}],"backdrop-brightness":[{"backdrop-brightness":[Te,ce,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Te,ce,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,ce,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,ce,oe]}],"backdrop-invert":[{"backdrop-invert":["",Te,ce,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Te,ce,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Te,ce,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,ce,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",ce,oe]}],ease:[{ease:["linear","initial",E,ce,oe]}],delay:[{delay:[Te,ce,oe]}],animate:[{animate:["none",A,ce,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,ce,oe]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:gt()}],"rotate-x":[{"rotate-x":gt()}],"rotate-y":[{"rotate-y":gt()}],"rotate-z":[{"rotate-z":gt()}],scale:[{scale:ct()}],"scale-x":[{"scale-x":ct()}],"scale-y":[{"scale-y":ct()}],"scale-z":[{"scale-z":ct()}],"scale-3d":["scale-3d"],skew:[{skew:Mn()}],"skew-x":[{"skew-x":Mn()}],"skew-y":[{"skew-y":Mn()}],transform:[{transform:[ce,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:yt()}],"translate-x":[{"translate-x":yt()}],"translate-y":[{"translate-y":yt()}],"translate-z":[{"translate-z":yt()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,oe]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Te,_o,ei,Q0]}],stroke:[{stroke:["none",...W()]}
55],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Vj=Sj(qj);function Gj(...t){return Vj(o_(t))}const Fj=tj("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Pc=J.forwardRef(({className:t,variant:e,size:r,asChild:i=!1,...o},c)=>{const u=i?QN:"button";return N.jsx(u,{className:Gj(Fj({variant:e,size:r,className:t})),ref:c,...o})});Pc.displayName="Button";function Z0({iconOnly:t}){const e=gu(),[r,i]=J.useState(!1),o=J.useRef(null),{data:c}=np({queryKey:["admin-notifications"],refetchInterval:6e4,queryFn:async()=>{const{data:p}=await Pt.from("admin_notifications").select("id, title, body, link, read_at, created_at").order("created_at",{ascending:!1}).limit(25);return p??[]}});J.useEffect(()=>{function p(y){r&&o.current&&!o.current.contains(y.target)&&i(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[r]);const u=c??[],d=u.filter(p=>!p.read_at).length;
55async function f(){const p=u.filter(g=>!g.read_at).map(g=>g.id);if(!p.length)return;const{error:y}=await Pt.from("admin_notifications").update({read_at:new Date().toISOString()}).in("id",p);if(y)return eu.error(y.message);e.invalidateQueries({queryKey:["admin-notifications"]})}return N.jsxs("div",{className:"relative",ref:o,children:[N.jsxs("button",{onClick:()=>i(p=>!p),"aria-label":"Notifications",className:`relative rounded-full border border-border hover:bg-accent ${t?"p-2":"px-3 py-1.5 text-xs"}`,children:[t?N.jsx(HN,{className:"h-4 w-4"}):N.jsxs(N.Fragment,{children:["Notifications",d>0&&N.jsx("span",{className:"ml-2 inline-flex min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[10px] text-primary-foreground",children:d})]}),t&&d>0&&N.jsx("span",{className:"absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[9px] text-primary-foreground",children:d})]}),r&&N.jsxs("div",{className:"absolute right-0 z-50 mt-2 w-80 max-w-[85vw] rounded-xl border border-border bg-card p-3 shadow-lg",children:[N.jsxs("div",{className:"flex items-center justify-between",children:[N.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Notifications"}),N.jsx("button",{onClick:f,className:"text-[11px] text-primary hover:underline",children:"Mark all read"})]}),N.jsxs("div",{className:"mt-2 max-h-80 space-y-2 overflow-y-auto",children:[u.length===0&&N.jsx("p",{className:"py-6 text-center text-xs text-muted-foreground",children:"Nothing yet."}),u.map(p=>{const y=N.jsxs("div",{className:`rounded-lg border p-2 text-sm ${p.read_at?"border-border bg-background":"border-primary/40 bg-primary/5"}`,children:[N.jsx("div",{className:"font-medium",children:p.title}),p.body&&N.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:p.body}),N.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:new Date(p.created_at).toLocaleString("en-CA")})]});return p.link?N.jsx(Gt,{to:p.link,onClick:()=>i(!1),className:"block",children:y},p.id):N.jsx("div",{children:y},p.id)})]})]})]})}function CL(){const t=gu(),[e,r]=J.useState(!1),{data:i}=np({queryKey:["admin-notification-prefs"],queryFn:async()=>{const{data:c}=await Pt.auth.getUser();if(!c.user)return null;const{data:u}=await Pt.from("admin_notification_prefs").select("*").eq("user_id",c.user.id).maybeSingle();return u}});async function o(c,u){r(!0);const{data:d}=await Pt.auth.getUser();if(!d.user)return r(!1);const{error:f}=await Pt.from("admin_notification_prefs").upsert({user_id:d.user.id,in_app:c,email:u,email_address:d.user.email??null,prompted:!0});if(r(!1),f)return eu.error(f.message);t.invalidateQueries({queryKey:["admin-notification-prefs"]}),eu.success("Notification preference saved.")}return i?.prompted?null:N.jsxs("div",{className:"mt-4 rounded-xl border border-primary/40 bg-primary/5 p-4",children:[N.jsx("h3",{className:"font-medium",children:"Get notified about new signed forms?"}),N.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"We can alert you here on the site whenever a signed form arrives automatically, and email you too."}),N.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[N.jsx(Pc,{size:"sm",disabled:e,onClick:()=>o(!0,!0),children:"Yes â on site and by email"}),N.jsx(Pc,{size:"sm",variant:"outline",disabled:e,onClick:()=>o(!0,!1),children:"On site only"}),N.jsx(Pc,{size:"sm",variant:"ghost",disabled:e,onClick:()=>o(!1,!1),children:"No thanks"})]})]})}function kL(){const t=gu(),[e,r]=J.useState(!1),{data:i}=np({queryKey:["admin-notification-prefs"],queryFn:async()=>{const{data:c}=await Pt.auth.getUser();if(!c.user)return null;const{data:u}=await Pt.from("admin_notification_prefs").select("*").eq("user_id",c.user.id).maybeSingle();return u??{user_id:c.user.id,in_app:!0,email:!1,email_address:c.user.email,prompted:!1}}});async function o(c){if(!i)return;r(!0);const{data:u}=await Pt.auth.getUser(),{error:d}=await Pt.from("admin_notification_prefs").upsert({user_id:u.user.id,in_app:c.in_app??i.in_app,email:c.email??i.email,email_address:i.email_address??u.user.email??null,prompted:!0});if(r(!1),d)return eu.error(d.message);t.invalidateQueries({queryKey:["admin-notification-prefs"]})}return N.jsxs("section",{className:"rounded-xl border border-border bg-card p-6",children:[N.jsx("h3",{className:"font-medium",children:"Notifications"}),N.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Choose how you hear about new signed forms received automatically."}),N.jsxs("div",{className:"mt-4 space-y-3 text-sm",children:[N.jsxs("label",{className:"flex items-center gap-2",children:[N.jsx("input",{type:"checkbox",checked:!!i?.in_app,disabled:e||!i,onChange:c=>o({in_app:c.target.checked})}),"Show alerts on the site"]}),N.jsxs("label",{className:"flex items-center gap-2",children:[N.jsx("input",{type:"checkbox",checked:!!i?.email,disabled:e||!i,onChange:c=>o({email:c.target.checked})}),"Also email me",i?.email_address?` at ${i.email_address}`:""]}),N.jsx("p",{className:"text-xs text-muted-foreground",children:"Emails start sending once an email sending domain is set up for this site."})]})]})}const S_="/assets/dvbia-logo-BqrCUi3l.png",W0=[{to:"/",label:"Home"},{to:"/directory",label:"Directory"},{to:"/map",label:"Map"},{to:"/announcements",label:"News"},{to:"/report",label:"Report an Issue"},{to:"/about",label:"About Us"}];function Kj(){const t=uO({select:d=>d.location.pathname}),[e,r]=J.useState(!1),[i,o]=J.useState(!1),[c,u]=J.useState(!1);return J.useEffect(()=>{async function d(p){if(!p)return o(!1);const{data:y}=await Pt.from("user_roles").select("role").eq("user_id",p).eq("role","admin").maybeSingle();o(!!y)}Pt.auth.getSession().then(({data:p})=>{r(!!p.session),d(p.session?.user.id)});const{data:{subscription:f}}=Pt.auth.onAuthStateChange((p,y)=>{r(!!y),d(y?.user.id)});return()=>f.unsubscribe()},[]),N.jsxs("header",{className:"sticky top-0 z-40 border-b border-border bg-background/85 backdrop-blur",children:[N.jsxs("div",{className:"mx-auto flex max-w-7xl items-center justify-between gap-4 px-5 py-4",children:[N.jsxs(Gt,{to:"/",className:"group flex items-center gap-3",children:[N.jsx("img",{src:S_,alt:"Danforth Village BIA",className:"h-10 w-auto"}),N.jsxs("div",{className:"leading-tight",children:[N.jsx("div",{className:"font-display text-lg",children:"Danforth Village"}),N.jsx("div",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"BIA · Toronto"})]})]}),N.jsxs("nav",{className:"hidden items-center gap-7 md:flex",children:[W0.map(d=>{const f=t===d.to||d.to!=="/"&&t.startsWith(d.to);return N.jsx(Gt,{to:d.to,className:`text-sm transition-colors ${f?"text-primary":"text-foreground
55/70 hover:text-foreground"}`,children:d.label},d.to)}),N.jsxs("div",{className:"flex items-center gap-3",children:[i&&N.jsx(Z0,{iconOnly:!0}),N.jsx(Gt,{to:e?"/admin":"/auth",className:"rounded-full border border-foreground/20 px-4 py-1.5 text-xs uppercase tracking-wider hover:bg-foreground hover:text-background transition-colors",children:e?"Admin":"Sign in"})]})]}),N.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[i&&N.jsx(Z0,{iconOnly:!0}),N.jsx("button",{onClick:()=>u(!c),"aria-label":"Menu",children:c?N.jsx(GN,{className:"h-5 w-5"}):N.jsx(qN,{className:"h-5 w-5"})})]})]}),c&&N.jsx("div",{className:"border-t border-border bg-background md:hidden",children:N.jsxs("nav",{className:"mx-auto flex max-w-7xl flex-col gap-1 px-5 py-3",children:[W0.map(d=>N.jsx(Gt,{to:d.to,onClick:()=>u(!1),className:"rounded px-2 py-2 text-sm text-foreground/80 hover:bg-accent",children:d.label},d.to)),N.jsx(Gt,{to:e?"/admin":"/auth",onClick:()=>u(!1),className:"rounded px-2 py-2 text-sm text-primary",children:e?"Admin dashboard":"Sign in"})]})})]})}function Yj(){return N.jsxs("footer",{className:"mt-24 border-t border-border bg-secondary text-secondary-foreground",children:[N.jsxs("div",{className:"mx-auto grid max-w-7xl gap-10 px-5 py-14 md:grid-cols-3",children:[N.jsxs("div",{children:[N.jsxs("div",{className:"flex items-center gap-3",children:[N.jsx("img",{src:S_,alt:"Danforth Village BIA",className:"h-12 w-auto"}),N.jsx("div",{className:"font-display text-2xl",children:"Danforth Village BIA"})]}),N.jsx("p",{className:"mt-3 max-w-xs text-sm text-secondary-foreground/80",children:"A neighbourhood of independent shops, restaurants and services along Danforth Avenue, Toronto."})]}),N.jsxs("div",{children:[N.jsx("div",{className:"text-xs uppercase tracking-[0.2em] text-secondary-foreground/60",children:"Explore"}),N.jsxs("ul",{className:"mt-3 space-y-2 text-sm",children:[N.jsx("li",{children:N.jsx(Gt,{to:"/directory",className:"hover:text-primary",children:"Business Directory"})}),N.jsx("li",{children:N.jsx(Gt,{to:"/map",className:"hover:text-primary",children:"Street Map"})}),N.jsx("li",{children:N.jsx(Gt,{to:"/announcements",className:"hover:text-primary",children:"News & Events"})}),N.jsx("li",{children:N.jsx(Gt,{to:"/report",className:"hover:text-primary",children:"Report an Issue"})}),N.jsx("li",{children:N.jsx(Gt,{to:"/about",className:"hover:text-primary",children:"About Us"})})]})]}),N.jsxs("div",{children:[N.jsx("div",{className:"text-xs uppercase tracking-[0.2em] text-secondary-foreground/60",children:"Get in touch"}),N.jsxs("p",{className:"mt-3 text-sm text-secondary-foreground/80",children:["Questions, suggestions or want your business featured?",N.jsx("br",{}),"Reach out to your BIA team."]}),N.jsx("div",{className:"mt-5 text-xs uppercase tracking-[0.2em] text-secondary-foreground/60",children:"Business owners"}),N.jsx("p",{className:"mt-2 text-sm",children:N.jsx(Gt,{to:"/owner",className:"hover:text-primary",children:"Owner sign in â"})})]})]}),N.jsx("div",{className:"border-t border-secondary-foreground/15",children:N.jsxs("div",{className:"mx-auto max-w-7xl px-5 py-5 text-xs text-secondary-foreground/60",children:["© ",new Date().getFullYear()," Danforth Village BIA. All rights reserved."]})})]})}function Qj(){return N.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:N.jsxs("div",{className:"max-w-md text-center",children:[N.jsx("h1",{className:"font-display text-7xl text-foreground",children:"404"}),N.jsx("h2",{className:"mt-4 text-xl text-foreground",children:"Page not found"}),N.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"This page doesn't exist on Danforth Village BIA."}),N.jsx(Gt,{to:"/",className:"mt-6 inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Back home"})]})})}function Jj({error:t,reset:e}){console.error(t);const r=_t();return J.useEffect(()=>{aN(t,{boundary:"tanstack_root_error_component"})},[t]),N.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:N.jsxs("div",{className:"max-w-md text-center",children:[N.jsx("h1",{className:"font-display text-2xl text-foreground",children:"Something went wrong"}),N.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try again or head back home."}),N.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[N.jsx("button",{onClick:()=>{r.invalidate(),e()},className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",children:"Try again"}),N.jsx("a",{href:"/",className:"rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground",children:"Go home"})]})]})})}const jn=Fx()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Danforth Village BIA"},{name:"description",content:"Discover local businesses, street news, and report neighbourhood issues on the Danforth."},{property:"og:title",content:"Danforth Village BIA"},{property:"og:description",content:"Discover local businesses, street news, and report neighbourhood issues on the Danforth."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}],links:[{rel:"icon",href:"/favicon.png"},{rel:"stylesheet",href:iN}
55,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap"}]}),shellComponent:Xj,component:Zj,notFoundComponent:Qj,errorComponent:Jj});function Xj({children:t}){return N.jsxs("html",{lang:"en",children:[N.jsx("head",{children:N.jsx(pO,{})}),N.jsxs("body",{children:[t,N.jsx(mO,{})]})]})}function Zj(){const{queryClient:t}=jn.useRouteContext(),e=_t();return J.useEffect(()=>{const{data:{subscription:r}}=Pt.auth.onAuthStateChange(i=>{i!=="SIGNED_IN"&&i!=="SIGNED_OUT"&&i!=="USER_UPDATED"||(e.invalidate(),i!=="SIGNED_OUT"&&t.invalidateQueries())});return()=>r.unsubscribe()},[e,t]),N.jsxs(K2,{client:t,children:[N.jsxs("div",{className:"relative z-10 flex min-h-screen flex-col",children:[N.jsx(Kj,{}),N.jsx("main",{className:"flex-1",children:N.jsx(Sw,{})}),N.jsx(Yj,{})]}),N.jsx(DN,{})]})}const Wj="modulepreload",eM=function(t){return"/"+t},eb={},Ge=function(e,r,i){let o=Promise.resolve();if(r&&r.length>0){let f=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=f(r.map(p=>{if(p=eM(p),p in eb)return;eb[p]=!0;const y=p.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":Wj,y||(v.as="script"),v.crossOrigin="",v.href=p,d&&v.setAttribute("nonce",d),document.head.appendChild(v),y)return new Promise((w,_)=>{v.addEventListener("load",w),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&c(d.reason);return e().catch(c)})},tM=()=>Ge(()=>import("./reset-password-CU21BOj2.js"),__vite__mapDeps([0,1,2])),nM=Qe("/reset-password")({head:()=>({meta:[{title:"Reset password â Danforth Village BIA"}]}),component:Ve(tM,"component")}),rM=()=>Ge(()=>import("./report-BS1MBIfH.js"),__vite__mapDeps([3,1,4,2,5,6,7,8])),sM=Qe("/report")({head:()=>({meta:[{title:"Report an Issue â Danforth Village BIA"},{name:"description",content:"Tell us about graffiti, damage, garbage or anything off along Danforth Avenue."}]}),component:Ve(rM,"component")}),{getOwnPropertyNames:iM,getOwnPropertySymbols:aM}=Object,{hasOwnProperty:oM}=Object.prototype;function nf(t,e){return function(i,o,c){return t(i,o,c)&&e(i,o,c)}}function Oc(t){return function(r,i,o){if(!r||!i||typeof r!="object"||typeof i!="object")return t(r,i,o);const{cache:c}=o,u=c.get(r),d=c.get(i);if(u&&d)return u===i&&d===r;c.set(r,i),c.set(i,r);const f=t(r,i,o);return c.delete(r),c.delete(i),f}}function lM(t){return t?.[Symbol.toStringTag]}function tb(t){return iM(t).concat(aM(t))}const cM=Object.hasOwn||((t,e)=>oM.call(t,e));function pi(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const uM="__v",dM="__o",hM="_owner",{getOwnPropertyDescriptor:nb,keys:rb}=Object;function fM(t,e){return t.byteLength===e.byteLength&&ru(new Uint8Array(t),new Uint8Array(e))}function pM(t,e,r){let i=t.length;if(e.length!==i)return!1;for(;i-- >0;)if(!r.equals(t[i],e[i],i,i,t,e,r))return!1;return!0}function mM(t,e){return t.byteLength===e.byteLength&&ru(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function gM(t,e){return pi(t.getTime(),e.getTime())}function yM(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function vM(t,e){return t===e}function sb(t,e,r){const i=t.size;if(i!==e.size)return!1;if(!i)return!0;const o=new Array(i),c=t.entries();let u,d,f=0;for(;(u=c.next())&&!u.done;){const p=e.entries();let y=!1,g=0;for(;(d=p.next())&&!d.done;){if(o[g]){g++;continue}const v=u.value,w=d.value;if(r.equals(v[0],w[0],f,g,t,e,r)&&r.equals(v[1],w[1],v[0],w[0],t,e,r)){y=o[g]=!0;break}g++}if(!y)return!1;f++}return!0}const bM=pi;function wM(t,e,r){const i=rb(t);let o=i.length;if(rb(e).length!==o)return!1;for(;o-- >0;)if(!E_(t,e,r,i[o]))return!1;return!0}function So(t,e,r){const i=tb(t);let o=i.length;if(tb(e).length!==o)return!1;let c,u,d;for(;o-- >0;)if(c=i[o],!E_(t,e,r,c)||(u=nb(t,c),d=nb(e,c),(u||d)&&(!u||!d||u.configurable!==d.configurable||u.enumerable!==d.enumerable||u.writable!==d.writable)))return!1;return!0}function _M(t,e){return pi(t.valueOf(),e.valueOf())}function SM(t,e){return t.source===e.source&&t.flags===e.flags}function ib(t,e,r){const i=t.size;if(i!==e.size)return!1;if(!i)return!0;const o=new Array(i),c=t.values();let u,d;for(;(u=c.next())&&!u.done;){const f=e.values();let p=!1,y=0;for(;(d=f.next())&&!d.done;){if(!o[y]&&r.equals(u.value,d.value,u.value,d.value,t,e,r)){p=o[y]=!0;break}y++}if(!p)return!1}return!0}function ru(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function EM(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function E_(t,e,r,i){return(i===hM||i===dM||i===uM)&&(t.$$typeof||e.$$typeof)?!0:cM(e,i)&&r.equals(t[i],e[i],i,i,t,e,r)}const TM="[object ArrayBuffer]",RM="[object Arguments]",AM="[object Boolean]",xM="[object DataView]",OM="[object Date]",CM="[object Error]",kM="[object Map]",NM="[object Number]",jM="[object Object]",MM="[object RegExp]",DM="[object Set]",LM="[object String]",UM={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
55]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},PM="[object URL]",zM=Object.prototype.toString;function IM({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:i,areErrorsEqual:o,areFunctionsEqual:c,areMapsEqual:u,areNumbersEqual:d,areObjectsEqual:f,arePrimitiveWrappersEqual:p,areRegExpsEqual:y,areSetsEqual:g,areTypedArraysEqual:v,areUrlsEqual:w,unknownTagComparators:_}){return function(S,E,A){if(S===E)return!0;if(S==null||E==null)return!1;const O=typeof S;if(O!==typeof E)return!1;if(O!=="object")return O==="number"?d(S,E,A):O==="function"?c(S,E,A):!1;const j=S.constructor;if(j!==E.constructor)return!1;if(j===Object)return f(S,E,A);if(Array.isArray(S))return e(S,E,A);if(j===Date)return i(S,E,A);if(j===RegExp)return y(S,E,A);if(j===Map)return u(S,E,A);if(j===Set)return g(S,E,A);const q=zM.call(S);if(q===OM)return i(S,E,A);if(q===MM)return y(S,E,A);if(q===kM)return u(S,E,A);if(q===DM)return g(S,E,A);if(q===jM)return typeof S.then!="function"&&typeof E.then!="function"&&f(S,E,A);if(q===PM)return w(S,E,A);if(q===CM)return o(S,E,A);if(q===RM)return f(S,E,A);if(UM[q])return v(S,E,A);if(q===TM)return t(S,E,A);if(q===xM)return r(S,E,A);if(q===AM||q===NM||q===LM)return p(S,E,A);if(_){let H=_[q];if(!H){const P=lM(S);P&&(H=_[P])}if(H)return H(S,E,A)}return!1}}function BM({circular:t,createCustomConfig:e,strict:r}){let i={areArrayBuffersEqual:fM,areArraysEqual:r?So:pM,areDataViewsEqual:mM,areDatesEqual:gM,areErrorsEqual:yM,areFunctionsEqual:vM,areMapsEqual:r?nf(sb,So):sb,areNumbersEqual:bM,areObjectsEqual:r?So:wM,arePrimitiveWrappersEqual:_M,areRegExpsEqual:SM,areSetsEqual:r?nf(ib,So):ib,areTypedArraysEqual:r?nf(ru,So):ru,areUrlsEqual:EM,unknownTagComparators:void 0};if(e&&(i=Object.assign({},i,e(i))),t){const o=Oc(i.areArraysEqual),c=Oc(i.areMapsEqual),u=Oc(i.areObjectsEqual),d=Oc(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:o,areMapsEqual:c,areObjectsEqual:u,areSetsEqual:d})}return i}function HM(t){return function(e,r,i,o,c,u,d){return t(e,r,d)}}function $M({circular:t,comparator:e,createState:r,equals:i,strict:o}){if(r)return function(d,f){const{cache:p=t?new WeakMap:void 0,meta:y}=r();return e(d,f,{cache:p,equals:i,meta:y,strict:o})};if(t)return function(d,f){return e(d,f,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};const c={cache:void 0,equals:i,meta:void 0,strict:o};return function(d,f){return e(d,f,c)}}const ab=Os();Os({strict:!0});Os({circular:!0});Os({circular:!0,strict:!0});Os({createInternalComparator:()=>pi});Os({strict:!0,createInternalComparator:()=>pi});Os({circular:!0,createInternalComparator:()=>pi});Os({circular:!0,createInternalComparator:()=>pi,strict:!0});function Os(t={}){const{circular:e=!1,createInternalComparator:r,createState:i,strict:o=!1}=t,c=BM(t),u=IM(c),d=r?r(u):HM(u);return $M({circular:e,comparator:u,createState:i,equals:d,strict:o})}const ob=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],rf=1,Eo=8,Ze=new Uint32Array(96);class ap{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[r,i]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=i>>4;if(o!==rf)throw new Error(`Got v${o} data when expected v${rf}.`);const c=ob[i&15];if(!c)throw new Error("Unrecognized array type.");const[u]=new Uint16Array(e,2,1),[d]=new Uint32Array(e,4,1);return new ap(d,u,c,void 0,e)}constructor(e,r=64,i=Float64Array,o=ArrayBuffer,c){if(isNaN(e)||e<0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const u=ob.indexOf(this.ArrayType),d=e*2*this.ArrayType.BYTES_PER_ELEMENT,f=e*this.IndexArrayType.BYTES_PER_ELEMENT,p=(8-f%8)%8;if(u<0)throw new Error(`Unexpected typed array class: ${i}.`);if(c)this.data=c,this.ids=new this.IndexArrayType(c,Eo,e),this.coords=new i(c,Eo+f+p,e*2),this._pos=e*2,this._finished=!0;
55else{const y=this.data=new o(Eo+d+f+p);this.ids=new this.IndexArrayType(y,Eo,e),this.coords=new i(y,Eo+f+p,e*2),this._pos=0,this._finished=!1,new Uint8Array(y,0,2).set([219,(rf<<4)+u]),new Uint16Array(y,2,1)[0]=r,new Uint32Array(y,4,1)[0]=e}}add(e,r){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Uf(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:u,nodeSize:d}=this;Ze[0]=0,Ze[1]=c.length-1,Ze[2]=0;let f=3;const p=[];for(;f>0;){const y=Ze[--f],g=Ze[--f],v=Ze[--f];if(g-v<=d){for(let S=v;S<=g;S++){const E=u[2*S],A=u[2*S+1];E>=e&&E<=i&&A>=r&&A<=o&&p.push(c[S])}continue}const w=v+g>>1,_=u[2*w],R=u[2*w+1];_>=e&&_<=i&&R>=r&&R<=o&&p.push(c[w]),(y===0?e<=_:r<=R)&&(Ze[f++]=v,Ze[f++]=w-1,Ze[f++]=1-y),(y===0?i>=_:o>=R)&&(Ze[f++]=w+1,Ze[f++]=g,Ze[f++]=1-y)}return p}within(e,r,i){const o=[];return this.withinInto(e,r,i,o),o}withinInto(e,r,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:u,nodeSize:d}=this;Ze[0]=0,Ze[1]=c.length-1,Ze[2]=0;let f=3,p=0;const y=i*i;for(;f>0;){const g=Ze[--f],v=Ze[--f],w=Ze[--f];if(v-w<=d){for(let E=w;E<=v;E++)lb(u[2*E],u[2*E+1],e,r)<=y&&(o[p++]=c[E]);continue}const _=w+v>>1,R=u[2*_],S=u[2*_+1];lb(R,S,e,r)<=y&&(o[p++]=c[_]),(g===0?e-i<=R:r-i<=S)&&(Ze[f++]=w,Ze[f++]=_-1,Ze[f++]=1-g),(g===0?e+i>=R:r+i>=S)&&(Ze[f++]=_+1,Ze[f++]=v,Ze[f++]=1-g)}return p}}function Uf(t,e,r,i,o,c){if(o-i<=r)return;const u=i+o>>1;T_(t,e,u,i,o,c),Uf(t,e,r,i,u-1,1-c),Uf(t,e,r,u+1,o,1-c)}function T_(t,e,r,i,o,c){for(;o>i;){if(o-i>600){const p=o-i+1,y=r-i+1,g=Math.log(p),v=.5*Math.exp(2*g/3),w=.5*Math.sqrt(g*v*(p-v)/p)*(y-p/2<0?-1:1),_=Math.max(i,Math.floor(r-y*v/p+w)),R=Math.min(o,Math.floor(r+(p-y)*v/p+w));T_(t,e,r,_,R,c)}const u=e[2*r+c];let d=i,f=o;for(To(t,e,i,r),e[2*o+c]>u&&To(t,e,i,o);d<f;){for(To(t,e,d,f),d++,f--;e[2*d+c]<u;)d++;for(;e[2*f+c]>u;)f--}e[2*i+c]===u?To(t,e,i,f):(f++,To(t,e,f,o)),f<=r&&(i=f+1),r<=f&&(o=f-1)}}function To(t,e,r,i){sf(t,r,i),sf(e,2*r,2*i),sf(e,2*r+1,2*i+1)}function sf(t,e,r){const i=t[e];t[e]=t[r],t[r]=i}function lb(t,e,r,i){const o=t-r,c=e-i;return o*o+c*c}const qM={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},cb=Math.fround||(t=>(e=>(t[0]=+e,t[0])))(new Float32Array(1)),ti=2,hs=3,af=4,us=5,R_=6;class VM{constructor(e){this.options=Object.assign(Object.create(qM),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:r,minZoom:i,maxZoom:o}=this.options;r&&console.time("total time");const c=`prepare ${e.length} points`;r&&console.time(c),this.points=e;const u=[];for(let f=0;f<e.length;f++){const p=e[f];if(!p.geometry)continue;const[y,g]=p.geometry.coordinates,v=cb(Cc(y)),w=cb(kc(g));u.push(v,w,1/0,f,-1,1),this.options.reduce&&u.push(0)}let d=this.trees[o+1]=this._createTree(u);r&&console.timeEnd(c);for(let f=o;f>=i;f--){const p=+Date.now();d=this.trees[f]=this._createTree(this._cluster(d,f)),r&&console.log("z%d: %d clusters in %dms",f,d.numItems,+Date.now()-p)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let i=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let c=e[2]===180?180:((e[2]+180)%360+360)%360-180;const u=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)i=-180,c=180;else if(i>c){const g=this.getClusters([i,o,180,u],r),v=this.getClusters([-180,o,c,u],r);return g.concat(v)}const d=this.trees[this._limitZoom(r)],f=d.range(Cc(i),kc(u),Cc(c),kc(o)),p=d.data,y=[];for(const g of f){const v=this.stride*g;y.push(p[v+us]>1?ub(p,v,this.clusterProps):this.points[p[v+hs]])}return y}getChildren(e){const r=this._getOriginId(e),i=this._getOriginZoom(e),o="No cluster with the specified id.",c=this.trees[i];if(!c)throw new Error(o);const u=c.data;if(r*this.stride>=u.length)throw new Error(o);const d=this.options.radius/(this.options.extent*Math.pow(2,i-1)),f=u[r*this.stride],p=u[r*this.stride+1],y=c.within(f,p,d),g=[];for(const v of y){const w=v*this.stride;u[w+af]===e&&g.push(u[w+us]>1?ub(u,w,this.clusterProps):this.points[u[w+hs]])}if(g.length===0)throw new Error(o);return g}getLeaves(e,r,i){r=r||10,i=i||0;const o=[];return this._appendLeaves(o,e,r,i,0),o}getTile(e,r,i){const o=this.trees[this._limitZoom(e)],c=Math.pow(2,e),{extent:u,radius:d}=this.options,f=d/u,p=(i-f)/c,y=(i+1+f)/c,g={features:[]};return this._addTileFeatures(o.range((r-f)/c,p,(r+1+f)/c,y),o.data,r,i,c,g),r===0&&this._addTileFeatures(o.range(1-f/c,p,1,y),o.data,c,i,c,g),r===c-1&&this._addTileFeatures(o.range(0,p,f/c,y),o.data,-1,i,c,g),g.features.length?g:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const i=this.getChildren(e);if(r++,i.length!==1)break;e=i[0].properties.cluster_id}return r}_appendLeaves(e,r,i,o,c){const u=this.getChildren(r);for(const d of u){const f=d.properties;if(f&&f.cluster?c+f.point_count<=o?c+=f.point_count:c=this._appendLeaves(e,f.cluster_id,i,o,c):c<o?c++:e.push(d),e.length===i)break}return c}_createTree(e){const r=new ap(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<e.length;i+=this.stride)r.add(e[i],e[i+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,i,o,c,u){for(const d of e){const f=d*this.stride,p=r[f+us]>1;let y,g,v;if(p)y=A_(r,f,this.clusterProps),g=r[f],v=r[f+1];else{const R=this.points[r[f+hs]];y=R.properties;const[S,E]=R.geometry.coordinates;g=Cc(S),v=kc(E)}const w={type:1,geometry:[[Math.round(this.options.extent*(g*c-i)),Math.round(this.options.extent*(v*c-o))]],tags:y};let _;p||this.options.generateId?_=r[f+hs]:_=this.points[r[f+hs]].id,_!==void 0&&(w.id=_),u.features.push(w)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:i,extent:o,reduce:c,minPoints:u}=this.options,d=i/(o*Math.pow(2,r)),f=e.data,p=[],y=this.stride;for(let g=0;g<f.length;g+=y){if(f[g+ti]<=r)continue;f[g+ti]=r;const v=f[g],w=f[g+1],_=e.within(f[g],f[g+1],d),R=f[g+us];let S=R;for(const E of _){const A=E*y;f[A+ti]>r&&(S+=f[A+us])}if(S>R&&S>=u){let E=v*R,A=w*R,O,j=-1;const q=((g/y|0)<<5)+(r+1)+this.points.length;for(const H of _){const P=H*y;
55if(f[P+ti]<=r)continue;f[P+ti]=r;const M=f[P+us];E+=f[P]*M,A+=f[P+1]*M,f[P+af]=q,c&&(O||(O=this._map(f,g,!0),j=this.clusterProps.length,this.clusterProps.push(O)),c(O,this._map(f,P)))}f[g+af]=q,p.push(E/S,A/S,1/0,q,-1,S),c&&p.push(j)}else{for(let E=0;E<y;E++)p.push(f[g+E]);if(S>1)for(const E of _){const A=E*y;if(!(f[A+ti]<=r)){f[A+ti]=r;for(let O=0;O<y;O++)p.push(f[A+O])}}}}return p}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,i){if(e[r+us]>1){const u=this.clusterProps[e[r+R_]];return i?Object.assign({},u):u}const o=this.points[e[r+hs]].properties,c=this.options.map(o);return i&&c===o?Object.assign({},c):c}}function ub(t,e,r){return{type:"Feature",id:t[e+hs],properties:A_(t,e,r),geometry:{type:"Point",coordinates:[GM(t[e]),FM(t[e+1])]}}}function A_(t,e,r){const i=t[e+us],o=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,c=t[e+R_],u=c===-1?{}:Object.assign({},r[c]);return Object.assign(u,{cluster:!0,cluster_id:t[e+hs],point_count:i,point_count_abbreviated:o})}function Cc(t){return t/360+.5}function kc(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function GM(t){return(t-.5)*360}function FM(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function KM(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(r[i[o]]=t[i[o]]);return r}class Vt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,r){this.isAdvancedMarker(e)?e.map=r:e.setMap(r)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class su{constructor({markers:e,position:r}){this.markers=[],e&&(this.markers=e),r&&(r instanceof google.maps.LatLng?this._position=r:this._position=new google.maps.LatLng(r))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const r of this.markers)e.extend(Vt.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>Vt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(Vt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function Pf(t,e="assertion failed"){if(t==null)throw Error(e)}class x_{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return O_(e)}}const O_=t=>t.map(r=>new su({position:Vt.getPosition(r),markers:[r]}));class C_ extends x_{constructor(e){var{maxZoom:r,radius:i=60}=e,o=KM(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new VM(Object.assign({maxZoom:this.maxZoom,radius:i},o))}calculate(e){let r=!1,i=e.map.getZoom();Pf(i),i=Math.round(i);const o={zoom:i};if(!ab(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const c=this.markers.map(u=>{const d=Vt.getPosition(u);return{type:"Feature",geometry:{type:"Point",coordinates:[d.lng(),d.lat()]},properties:{marker:u}}});this.superCluster.load(c)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!ab(this.state,o)),this.state=o,e.markers.length===0?(this.cluster
55s=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return Pf(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(i=>this.transformCluster(i))}transformCluster({geometry:{coordinates:[e,r]},properties:i}){if(i.cluster)return new su({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map(c=>c.properties.marker),position:{lat:r,lng:e}});const o=i.marker;return new su({markers:[o],position:Vt.getPosition(o)})}}class k_{constructor(e,r){this.markers={sum:e.length};const i=r.map(c=>c.count),o=i.reduce((c,u)=>c+u,0);this.clusters={count:r.length,markers:{mean:o/r.length,sum:o,min:Math.min(...i),max:Math.max(...i)}}}}class N_{render({count:e,position:r},i,o){const u=`<svg fill="${e>Math.max(10,i.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50"> 56<circle cx="120" cy="120" opacity=".6" r="70" /> 57<circle cx="120" cy="120" opacity=".3" r="90" /> 58<circle cx="120" cy="120" opacity=".2" r="110" /> 59<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text> 60</svg>`,d=`Cluster of ${e} markers`,f=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Vt.isAdvancedMarkerAvailable(o)){const g=new DOMParser().parseFromString(u,"image/svg+xml").documentElement;g.setAttribute("transform","translate(0 25)");const v={map:o,position:r,zIndex:f,title:d,content:g};return new google.maps.marker.AdvancedMarkerElement(v)}const p={position:r,zIndex:f,title:d,icon:{url:`data:image/svg+xml;base64,${btoa(u)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(p)}}function YM(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class op{constructor(){YM(op,google.maps.OverlayView)}}var gs;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(gs||(gs={}));const j_=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class QM extends op{constructor({map:e,markers:r=[],algorithmOptions:i={},algorithm:o=new C_(i),renderer:c=new N_,onClusterClick:u=j_}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=o,this.renderer=c,this.onClusterClick=u,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(i=>{this.addMarker(i,!0)}),r||this.render()}removeMarker(e,r){const i=this.markers.indexOf(e);return i===-1?!1:(Vt.setMap(e,null),this.markers.splice(i,1),r||this.render(),!0)}removeMarkers(e,r){let i=!1;return e.forEach(o=>{i=this.removeMarker(o,!0)||i}),i&&!r&&this.render(),i}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,gs.CLUSTERING_BEGIN,this);const{clusters:r,changed:i}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(i||i==null){const o=new Set;for(const u of r)u.markers.length==1&&o.add(u.markers[0]);const c=[];for(const u of this.clusters)u.marker!=null&&(u.markers.length==1?o.has(u.marker)||Vt.setMap(u.marker,null):c.push(u.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>c.forEach(u=>Vt.setMap(u,null)))}google.maps.event.trigger(this,gs.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Pf(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Vt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new k_(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(i=>{if(i.markers.length===1)i.marker=i.markers[0];else if(i.marker=this.renderer.render(i,e,r),i.markers.forEach(o=>Vt.setMap(o,null)),this.onClusterClick){const o=Vt.isAdvancedMarker(i.marker)?gs.GMP_CLICK:gs.CLUSTER_CLICK;i.marker.addListener(o,c=>{google.maps.event.trigger(this,gs.CLUSTER_CLICK,i),this.onClusterClick(c,i,r)})}Vt.setMap(i.marker,r)})}}const NL=Object.freeze(Object.defineProperty({__proto__:null,AbstractAlgorithm:x_,Cluster:su,ClusterStats:k_,DefaultRenderer:N_,Mar
60kerClusterer:QM,get MarkerClustererEvents(){return gs},MarkerUtils:Vt,SuperClusterAlgorithm:C_,defaultOnClusterClickHandler:j_,noop:O_},Symbol.toStringTag,{value:"Module"})),JM=()=>Ge(()=>import("./map-BvvRyS1T.js"),__vite__mapDeps([9,10,11,12,13,14,15])),XM=Qe("/map")({head:()=>({meta:[{title:"Street Map â Danforth Village BIA"},{name:"description",content:"Explore Danforth Avenue on the map â every business pinned, filter by category, cluster by area."}]}),component:Ve(JM,"component")}),ZM=()=>Ge(()=>import("./directory-7Og2ROFK.js"),__vite__mapDeps([16,1,10,11,12,17,18,19,14])),WM=Qe("/directory")({validateSearch:t=>typeof t.b=="string"?{b:t.b}:{},head:()=>({meta:[{title:"Business Directory â Danforth Village BIA"},{name:"description",content:"Browse every business on Danforth Avenue by name, category or address."}]}),component:Ve(ZM,"component")}),eD=()=>Ge(()=>import("./auth-Bgd6F4pL.js"),__vite__mapDeps([20,1,2])),tD=Qe("/auth")({head:()=>({meta:[{title:"Sign in â Danforth Village BIA"}]}),validateSearch:t=>({redirectTo:typeof t.redirectTo=="string"?t.redirectTo:void 0}),component:Ve(eD,"component")}),nD=()=>Ge(()=>import("./announcements-CqRrquZM.js"),__vite__mapDeps([21,22])),rD=Qe("/announcements")({head:()=>({meta:[{title:"News & Events â Danforth Village BIA"},{name:"description",content:"Updates, upcoming events and news from the Danforth Village BIA."}]}),component:Ve(nD,"component")}),sD=()=>Ge(()=>import("./about-BNDO1tVN.js"),__vite__mapDeps([23,15,24,12])),iD=Qe("/about")({head:()=>({meta:[{title:"About Us â Danforth Village BIA"},{name:"description",content:"Who we are: the Danforth Village BIA supports independent businesses along Danforth Avenue in Toronto's east end through beautification, marketing and advocacy."},{property:"og:title",content:"About Us â Danforth Village BIA"},{property:"og:description",content:"Learn how the Danforth Village BIA supports local business owners along Danforth Avenue in Toronto."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),component:Ve(sD,"component")}),aD=()=>Ge(()=>import("./route-B9grxQS4.js"),[]),oD=Qe("/owner")({beforeLoad:async({location:t})=>{const{data:e}=await Pt.auth.getUser();if(!e.user)throw au({to:"/auth",search:{redirectTo:t.href}});return{user:e.user}},component:Ve(aD,"component")}),lD=()=>Ge(()=>import("./route-Dd6ayC2Q.js"),[]),cD=Qe("/_authenticated")({beforeLoad:async()=>{const{data:t}=await Pt.auth.getUser();if(!t.user)throw au({to:"/auth"});return{user:t.user}},component:Ve(lD,"component")}),uD=()=>Ge(()=>import("./index-DXA3DWiR.js"),__vite__mapDeps([25,15,12,24])),dD=Qe("/")({head:()=>({meta:[{title:"Danforth Village BIA â Toronto's east end neighbourhood"},{name:"description",content:"Discover 380+ independent businesses, explore the street, read announcements and report issues along Danforth Avenue."}]}),component:Ve(uD,"component")}),hD=()=>Ge(()=>import("./index-B4_2nIra.js"),__vite__mapDeps([26,18,1,2,4,27,6,5,7,8])),fD=Qe("/owner/")({component:Ve(hD,"component")}),pD=()=>Ge(()=>import("./onboarding-CmWSqu74.js"),__vite__mapDeps([28,29,30,13,1,4,2])),mD=Qe("/owner/onboarding")({head:()=>({meta:[{title:"Set up your business profile â Danforth Village BIA"},{name:"description",content:"Complete the BIA business information form to activate your owner portal."},{property:"og:title",content:"Set up your business profile â Danforth Village BIA"},{property:"og:description",content:"Complete the BIA business information form to activate your owner portal."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ve(pD,"component")}),gD=()=>Ge(()=>import("./accept-CVlHXA5q.js"),[]),yD=Qe("/owner/accept")({validateSearch:t=>({token:typeof t.token=="string"?t.token:void 0}),component:Ve(gD,"component")}),vD=()=>Ge(()=>import("./submit.event-Ctm7i-lM.js"),__vite__mapDeps([31,1,4,2])),bD=Qe("/owner/submit/event")({component:Ve(vD,"component")}),jL=["name","address","unit","city","province","postal_code","phone","phone2","fax","email","website","description","full_description","keywords","main_category","second_category","third_category","tiktok","linkedin","youtube","twitter","contact_name","contact_role","contact_email","contact_phone","instagram","facebook","hours_mon","hours_tue","hours_wed","hours_thu","hours_fri","hours_sat","hours_sun","hours_comment","ww_owner_name","ww_email","ww_phone","ww_signed_date","ww_comments"],db=[{key:"contact_name",label:"Person who signed",placeholder:"Full name"},{key:"contact_email",label:"Email used",type:"email"},{key:"contact_phone",label:"Phone",type:"tel"}],wD=[{slug:"business-info",label:"Business Info",description:"Update or confirm your business details on file with the BIA.",widgetUrl:"https://na3.documents.adobe.com/public/esignWidget?wid=CBFCIBAA3AAABLblqZhDQ5bCjZAovWc3woCePxL97OAHsuy9yrJgE0PTzWYnlOH-HqqXbi1oxpaTsY5p_-uY*",fields:[{key:"name",label:"Business name"},{key:"address",label:"Street address"},{key:"unit",label:"Unit"},{key:"city",label:"City"},{key:"province",label:"Province"},{key:"postal_code",label:"Postal code"},{key:"phone",label:"Phone",type:"tel"},{key:"phone2",label:"Second phone",type:"tel"},{key:"fax",label:"Fax",type:"tel"},{key:"email",label:"Business email",type:"email"},{key:"website",label:"Website",placeholder:"https://"},{key:"main_category",label:"Main category"},{key:"second_category",label:"Second category"},{key:"third_category",label:"Third category"},{key:"description",label:"Short description",type:"textarea"},{key:"full_description",label:"Full description",type:"textarea"},{key:"keywords",label:"Keywords (comma separated)",type:"textarea"}
60,...db,{key:"contact_role",label:"Role / title of contact"},{key:"hours_mon",label:"Hours â Monday",placeholder:"9:00 AM - 5:00 PM"},{key:"hours_tue",label:"Hours â Tuesday",placeholder:"9:00 AM - 5:00 PM"},{key:"hours_wed",label:"Hours â Wednesday",placeholder:"9:00 AM - 5:00 PM"},{key:"hours_thu",label:"Hours â Thursday",placeholder:"9:00 AM - 5:00 PM"},{key:"hours_fri",label:"Hours â Friday",placeholder:"9:00 AM - 5:00 PM"},{key:"hours_sat",label:"Hours â Saturday",placeholder:"Closed"},{key:"hours_sun",label:"Hours â Sunday",placeholder:"Closed"},{key:"hours_comment",label:"Hours notes",type:"textarea"},{key:"instagram",label:"Instagram"},{key:"facebook",label:"Facebook"},{key:"tiktok",label:"TikTok"},{key:"linkedin",label:"LinkedIn"},{key:"youtube",label:"YouTube"},{key:"twitter",label:"X / Twitter"}]},{slug:"window-washing",label:"Window Washing",description:"Sign up for the BIA window washing program.",widgetUrl:"https://na3.documents.adobe.com/public/esignWidget?wid=CBFCIBAA3AAABLblqZhAA-XQNzoVHL0ymEe9fhEyJMsarTM1klqGQ8rPBnm4ELqQ4hPtbkbfD54nJ8xxjSVI*",fields:[{key:"address",label:"Business address",placeholder:"e.g. 2672 Danforth Ave"},{key:"ww_owner_name",label:"Person who signed",placeholder:"Full name"},{key:"ww_email",label:"Email used",type:"email"},{key:"ww_phone",label:"Phone",type:"tel"},{key:"ww_signed_date",label:"Date signed",type:"date"},{key:"ww_comments",label:"Comments",type:"textarea"}]},{slug:"email-consent",label:"Email Consent",description:"Give consent to receive BIA communications by email.",widgetUrl:"https://na3.documents.adobe.com/public/esignWidget?wid=CBFCIBAA3AAABLblqZhCrA-WUJ2BlAL1HIGp_LrJjvRhbRFO2L4rMVzKaaHj03WR8BcqZEvFtrIvQKfYt48c*",fields:[{key:"email",label:"Email consenting to BIA news",type:"email"},...db]},{slug:"graffiti-program",label:"Graffiti Program",description:"Enrol your storefront in the graffiti removal program.",widgetUrl:"https://na3.documents.adobe.com/public/esignWidget?wid=CBFCIBAA3AAABLblqZhDwxR_ZgfOKpF4D8mV24i4XNJQvCD4NqGm7oC0KWE2zOWypz3C4b7FPXsUsopJ_Go4*",fields:[{key:"contact_name",label:"Property Owner / Representative Name",placeholder:"Full name"},{key:"name",label:"Company Name (if applicable)"},{key:"address",label:"Property Address (within BIA area)"},{key:"contact_phone",label:"Phone Number",type:"tel"},{key:"fax",label:"Fax Number",type:"tel"},{key:"contact_email",label:"Email Address",type:"email"}]}];function _D(t){return wD.find(e=>e.slug===t)}const SD=()=>Ge(()=>import("./forms._slug-pn8X9pDo.js"),[]),ED=()=>Ge(()=>import("./forms._slug-BQq1AzZy.js"),[]),TD=()=>Ge(()=>import("./forms._slug-bJ2bUVf3.js"),__vite__mapDeps([32,29,30,13,1,4,2])),RD=Qe("/owner/forms/$slug")({component:Ve(TD,"component"),loader:({params:t})=>{const e=_D(t.slug);if(!e)throw NT();return{form:e}},notFoundComponent:Ve(ED,"notFoundComponent"),errorComponent:Ve(SD,"errorComponent")}),AD=()=>Ge(()=>import("./index-CnwdrEfn.js"),[]),xD=Qe("/_authenticated/admin/")({component:Ve(AD,"component")}),OD=()=>Ge(()=>import("./submissions-D2eux6bN.js"),__vite__mapDeps([33,30,13])),CD=Qe("/_authenticated/admin/submissions")({component:Ve(OD,"component")}),kD=()=>Ge(()=>import("./reports-DsHzq4Pb.js"),[]),ND=Qe("/_authenticated/admin/reports")({component:Ve(kD,"component")}),jD=()=>Ge(()=>import("./profile-DB_gL2yT.js"),__vite__mapDeps([34,1,2])),MD=Qe("/_authenticated/admin/profile")({head:()=>({meta:[{title:"Profile â Admin"}]}),component:Ve(jD,"component")}),DD=()=>Ge(()=>import("./photos-DY8lRJ8W.js"),__vite__mapDeps([35,17,18])),LD=Qe("/_authenticated/admin/photos")({component:Ve(DD,"component")}),UD=()=>Ge(()=>import("./owners-BINtoX_A.js"),__vite__mapDeps([36,1,2])),PD=Qe("/_authenticated/admin/owners")({component:Ve(UD,"component")}),zD=()=>Ge(()=>import("./forms-CzrWdOZ1.js"),__vite__mapDeps([37,1,8,14])),ID=Qe("/_authenticated/admin/forms")({head:()=>({meta:[{title:"Form tracker â Admin"}]}),component:Ve(zD,"component")}),BD=()=>Ge(()=>import("./directory-DikadCRS.js"),__vite__mapDeps([38,1,2,4,27,6,17,18,19,12,11,14])),HD=Qe("/_authenticated/admin/directory")({head:()=>({meta:[{title:"Full directory â Admin"}]}),component:Ve(BD,"component")}),$D=()=>Ge(()=>import("./announcements-D2NWT0dQ.js"),__vite__mapDeps([39,1,4,2,22])),qD=Qe("/_authenticated/admin/announcements")({component:Ve($D,"component")}),VD=()=>Ge(()=>import("./activity-DupcFgOg.js"),__vite__mapDeps([40,1,7])),GD=Qe("/_authenticated/admin/activity")({head:()=>({meta:[{title:"Activity log â Admin"}]}),component:Ve(VD,"component")}),FD=nM.update({id:"/reset-password",path:"/reset-password",getParentRoute:()=>jn}),KD=sM.update({id:"/report",path:"/report",getParentRoute:()=>jn}),YD=XM.update({id:"/map",path:"/map",getParentRoute:()=>jn}),QD=WM.update({id:"/directory",path:"/directory",getParentRoute:()=>jn}),JD=tD.update({id:"/auth",path:"/auth",getParentRoute:()=>jn}),XD=rD.update({id:"/announcements",path:"/announcements",getParentRoute:()=>jn}),ZD=iD.update({id:"/about",path:"/about",getParentRoute:()=>jn}),ba=oD.update({id:"/owner",path:"/owner",getParentRoute:()=>jn}),$n=cD.update({id:"/_authenticated",getParentRoute:()=>jn}),WD=dD.update({id:"/",path:"/",getParentRoute:()=>jn}),eL=fD.update({id:"/",path:"/",getParentRoute:()=>ba}),tL=mD.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>ba}),nL=yD.update({id:"/accept",path:"/accept",getParentRoute:()=>ba}),rL=bD.update({id:"/submit/event",path:"/submit/event",getParentRoute:()=>ba}),sL=RD.update({id:"/forms/$slug",path:"/forms/$slug",getParentRoute:()=>ba}),iL=xD.update({id:"/admin/",path:"/admin/",getParentRoute:()=>$n}),aL=CD.update({id:"/admin/submissions",path:"/admin/submissions",getParentRoute:()=>$n}),oL=ND.update({id:"/admin/reports",path:"/admin/reports",getParentRoute:()=>$n}),lL=MD.update({id:"/admin/profile",path:"/admin/profile",getParentRoute:()=>$n}),cL=LD.update({id:"/admin/photos",path:"/admin/photos",getParentRoute:()=>$n}),uL=PD.update({id:"/admin/owners",path:"/admin/owners",getParentRoute:()=>$n}),dL=ID.update({id:"/admin/forms",path:"/admin/forms",getParentRoute:()=>$n}),hL=HD.update({id:"/admin/directory",path:"/admin/directory",getParentRoute:()=>$n}),fL=qD.update({id:"/admin/announcements",path:"/admin/announcements",getParentRoute:()=>$n}),pL=GD.update({id:"/admin/activity",path:"/admin/activity",getParentRoute:()=>$n}),mL={AuthenticatedAdminActivityRoute:pL,AuthenticatedAdminAnnouncementsRoute:fL,AuthenticatedAdminDirectoryRoute:hL,AuthenticatedAdminFormsRoute:dL,AuthenticatedAdminOwnersRoute:uL,AuthenticatedAdminPhotosRoute:cL,AuthenticatedAdminProfileRoute:lL,AuthenticatedAdminReportsRoute:oL,AuthenticatedAdminSubmissionsRoute:aL,AuthenticatedAdminIndexRoute:iL},gL=$n._addFileChildren(mL),yL={OwnerAcceptRoute:nL,OwnerOnboardingRoute:tL,OwnerIndexRoute:eL,OwnerFormsSlugRoute:sL,OwnerSubmitEventRoute:rL},vL=ba._addFileChildren(yL),bL={IndexRoute:WD,AuthenticatedRouteRoute:gL,OwnerRouteRoute:vL,AboutRoute:ZD,AnnouncementsRoute:XD,AuthRoute:JD,DirectoryRoute:QD,MapRoute:YD,ReportRoute:KD,ResetPasswordRoute:FD},wL=jn._addFileChildren(bL),_L=()=>{const t=new F2;return aO({routeTree:wL,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function SL(){const t=await _L();let e;if(O0){const r=await O0.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,e=r.serializationAdapters,t.options.defaultSsr=r.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(ux),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await hx(t),t}async function EL(){const t=await SL();return window.$_TSR?.h(),t}var of;function TL(){return of||(of=EL()),N.jsx(gx,{promise:of,children:t=>N.jsx(cO,{router:t})})}J.startTransition(()=>{eT.hydrateRoot(document,N.jsx(J.StrictMode,{children:N.jsx(TL,{})}))});export{Z0 as A,Pc as B,Vo as C,q2 as D,Ut as E,sn as F,Jw as G,RL as H,hb as I,YE as J,Dx as K,Gt as L,YN as M,CL as N,Sw as O,jL as P,tj as Q,WM as R,Xo as S,AL as T,GN as X,Ge as _,cx as a,np as b,rp as c,gw as d,uO as e,gu as f,wD as g,s_ as h,ee as i,N as j,OL as k,bw as l,NL as m,Gj as n,RD as o,_t as p,on as q,J as r,Pt as s,eu as t,yw as u,ii as v,qT as w,pb as x,kL as y,Of as z};
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.