vendor: 7,279 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/rsvp-BJXf3m5h.js","assets/createLucideIcon-BIsM16oz.js","assets/circle-check-CrzpVBcp.js","assets/index-Bb-1eH71.js","assets/rsvp.confirmed-BuEiktVt.js"])))=>i.map(i=>d[i]); 2function kS(e,t){for(var s=0;s<t.length;s++){const a=t[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(a,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function _v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _f={exports:{}},da={};var Dm;function jS(){if(Dm)return da;Dm=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:u}}return da.Fragment=t,da.jsx=s,da.jsxs=s,da}var Um;function NS(){return Um||(Um=1,_f.exports=jS()),_f.exports}var V=NS(),Sf={exports:{}},ue={};var Lm;function MS(){if(Lm)return ue;Lm=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,E={};function R(C,H,Q){this.props=C,this.context=H,this.refs=E,this.updater=Q||w}R.prototype.isReactComponent={},R.prototype.setState=function(C,H){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,H,"setState")},R.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function k(){}k.prototype=R.prototype;function x(C,H,Q){this.props=C,this.context=H,this.refs=E,this.updater=Q||w}var M=x.prototype=new k;M.constructor=x,T(M,R.prototype),M.isPureReactComponent=!0;var K=Array.isArray;function $(){}var P={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function F(C,H,Q){var X=Q.ref;return{$$typeof:e,type:C,key:H,ref:X!==void 0?X:null,props:Q}}function re(C,H){return F(C.type,H,C.props)}function ee(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ge(C){var H={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(Q){return H[Q]})}var Ae=/\/+/g;function Ve(C,H){return typeof C=="object"&&C!==null&&C.key!=null?ge(""+C.key):H.toString(36)}function ze(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then($,$):(C.status="pending",C.then(function(H){C.status==="pending"&&(C.status="fulfilled",C.value=H)},function(H){C.status==="pending"&&(C.status="rejected",C.reason=H)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function z(C,H,Q,X,se){var he=typeof C;(he==="undefined"||he==="boolean")&&(C=null);var be=!1;if(C===null)be=!0;else switch(he){case"bigint":case"string":case"number":be=!0;break;case"object":switch(C.$$typeof){case e:case t:be=!0;break;case y:return be=C._init,z(be(C._payload),H,Q,X,se)}}if(be)return se=se(C),be=X===""?"."+Ve(C,0):X,K(se)?(Q="",be!=null&&(Q=be.replace(Ae,"$&/")+"/"),z(se,H,Q,"",function(_n){return _n})):se!=null&&(ee(se)&&(se=re(se,Q+(se.key==null||C&&C.key===se.key?"":(""+se.key).replace(Ae,"$&/")+"/")+be)),H.push(se)),1;be=0;var Ke=X===""?".":X+":";if(K(C))for(var Ne=0;Ne<C.length;Ne++)X=C[Ne],he=Ke+Ve(X,Ne),be+=z(X,H,Q,he,se);else if(Ne=_(C),typeof Ne=="function")for(C=Ne.call(C),Ne=0;!(X=C.next()).done;)X=X.value,he=Ke+Ve(X,Ne++),be+=z(X,H,Q,he,se);else if(he==="object"){if(typeof C.then=="function")return z(ze(C),H,Q,X,se);throw H=String(C),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return be}function Y(C,H,Q){if(C==null)return C;var X=[],se=0;return z(C,X,"","",function(he){return H.call(Q,he,se++)}),X}function ae(C){if(C._status===-1){var H=C._result;H=H(),H.then(function(Q){(C._status===0||C._status===-1)&&(C._status=1,C._result=Q)},function(Q){(C._status===0||C._status===-1)&&(C._status=2,C._result=Q)}),C._status===-1&&(C._status=0,C._result=H)}if(C._status===1)return C._result.default;throw C._result}var Ee=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},Re={map:Y,forEach:function(C,H,Q){Y(C,function(){H.apply(this,arguments)},Q)},count:function(C){var H=0;return Y(C,function(){H++}),H},toArray:function(C){return Y(C,function(H){return H})||[]},only:function(C){if(!ee(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ue.Activity=m,ue.Children=Re,ue.Component=R,ue.Fragment=s,ue.Profiler=l,ue.PureComponent=x,ue.StrictMode=a,ue.Suspense=p,ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ue.__COMPILER_RUNTIME={__proto__:null,c:function(C){return P.H.useMemoCache(C)}},ue.cache=function(C){return function(){return C.apply(null,arguments)}},ue.cacheSignal=function(){return null},ue.cloneElement=function(C,H,Q){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var X=T({},C.props),se=C.key;if(H!=null)for(he in H.key!==void 0&&(se=""+H.key),H)!G.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(X[he]=H[he]);var he=arguments.length-2;if(he===1)X.children=Q;else if(1<he){for(var be=Array(he),Ke=0;Ke<he;Ke++)be[Ke]=arguments[Ke+2];X.children=be}return F(C.type,se,X)},ue.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},ue.createElement=function(C,H,Q){var X,se={},he=null;if(H!=null)for(X in H.key!==void 0&&(he=""+H.key),H)G.call(H,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(se[X]=H[X]);var be=arguments.length-2;if(be===1)se.children=Q;else if(1<be){for(var Ke=Array(be),Ne=0;Ne<be;Ne++)Ke[Ne]=arguments[Ne+2];se.children=Ke}if(C&&C.defaultProps)for(X in be=C.defaultProps,be)se[X]===void 0&&(se[X]=be[X]);return F(C,he,se)},ue.createRef=function(){return{current:null}},ue.forwardRef=function(C){return{$$typeof:d,render:C}}
vendor: 2,358 bytes, line 2
2,ue.isValidElement=ee,ue.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:ae}},ue.memo=function(C,H){return{$$typeof:g,type:C,compare:H===void 0?null:H}},ue.startTransition=function(C){var H=P.T,Q={};P.T=Q;try{var X=C(),se=P.S;se!==null&&se(Q,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then($,Ee)}catch(he){Ee(he)}finally{H!==null&&Q.types!==null&&(H.types=Q.types),P.T=H}},ue.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ue.use=function(C){return P.H.use(C)},ue.useActionState=function(C,H,Q){return P.H.useActionState(C,H,Q)},ue.useCallback=function(C,H){return P.H.useCallback(C,H)},ue.useContext=function(C){return P.H.useContext(C)},ue.useDebugValue=function(){},ue.useDeferredValue=function(C,H){return P.H.useDeferredValue(C,H)},ue.useEffect=function(C,H){return P.H.useEffect(C,H)},ue.useEffectEvent=function(C){return P.H.useEffectEvent(C)},ue.useId=function(){return P.H.useId()},ue.useImperativeHandle=function(C,H,Q){return P.H.useImperativeHandle(C,H,Q)},ue.useInsertionEffect=function(C,H){return P.H.useInsertionEffect(C,H)},ue.useLayoutEffect=function(C,H){return P.H.useLayoutEffect(C,H)},ue.useMemo=function(C,H){return P.H.useMemo(C,H)},ue.useOptimistic=function(C,H){return P.H.useOptimistic(C,H)},ue.useReducer=function(C,H,Q){return P.H.useReducer(C,H,Q)},ue.useRef=function(C){return P.H.useRef(C)},ue.useState=function(C){return P.H.useState(C)},ue.useSyncExternalStore=function(C,H,Q){return P.H.useSyncExternalStore(C,H,Q)},ue.useTransition=function(){return P.H.useTransition()},ue.version="19.2.5",ue}var zm;function $a(){return zm||(zm=1,Sf.exports=MS()),Sf.exports}var ne=$a();const gi=_v(ne),sk=kS({__proto__:null,default:gi},[ne]);var wf={exports:{}},pa={},Ef={exports:{}},Tf={};var Pm;function DS(){return Pm||(Pm=1,(function(e){function t(z,Y){var ae=z.length;z.push(Y);e:for(;0<ae;){var Ee=ae-1>>>1,Re=z[Ee];if(0<l(Re,Y))z[Ee]=Y,z[ae]=Re,ae=Ee;else break e}}function s(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var Y=z[0],ae=z.pop();if(ae!==Y){z[0]=ae;e:for(var Ee=0,Re=z.length,C=Re>>>1;Ee<C;){var H=2*(Ee+1)-1,Q=z[H],X=H+1,se=z[X];if(0>l(Q,ae))X<Re&&0>l(se,Q)?(z[Ee]=se,z[X]=ae,Ee=X):(z[Ee]=Q,z[H]=ae,Ee=H);else if(X<Re&&0>l(se,ae))z[Ee]=se,z[X]=ae,Ee=X;else break e}}return Y}function l(z,Y){var ae=z.sortIndex-Y.sortIndex;
vendor: 11,693 bytes, lines 2-4
2return ae!==0?ae:z.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,m=null,b=3,_=!1,w=!1,T=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function M(z){for(var Y=s(g);Y!==null;){if(Y.callback===null)a(g);else if(Y.startTime<=z)a(g),Y.sortIndex=Y.expirationTime,t(p,Y);else break;Y=s(g)}}function K(z){if(T=!1,M(z),!w)if(s(p)!==null)w=!0,$||($=!0,ge());else{var Y=s(g);Y!==null&&ze(K,Y.startTime-z)}}var $=!1,P=-1,G=5,F=-1;function re(){return E?!0:!(e.unstable_now()-F<G)}function ee(){if(E=!1,$){var z=e.unstable_now();F=z;var Y=!0;try{e:{w=!1,T&&(T=!1,k(P),P=-1),_=!0;var ae=b;try{t:{for(M(z),m=s(p);m!==null&&!(m.expirationTime>z&&re());){var Ee=m.callback;if(typeof Ee=="function"){m.callback=null,b=m.priorityLevel;var Re=Ee(m.expirationTime<=z);if(z=e.unstable_now(),typeof Re=="function"){m.callback=Re,M(z),Y=!0;break t}m===s(p)&&a(p),M(z)}else a(p);m=s(p)}if(m!==null)Y=!0;else{var C=s(g);C!==null&&ze(K,C.startTime-z),Y=!1}}break e}finally{m=null,b=ae,_=!1}Y=void 0}}finally{Y?ge():$=!1}}}var ge;if(typeof x=="function")ge=function(){x(ee)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,Ve=Ae.port2;Ae.port1.onmessage=ee,ge=function(){Ve.postMessage(null)}}else ge=function(){R(ee,0)};function ze(z,Y){P=R(function(){z(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var ae=b;b=Y;try{return z()}finally{b=ae}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,Y){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ae=b;b=z;try{return Y()}finally{b=ae}},e.unstable_scheduleCallback=function(z,Y,ae){var Ee=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ee+ae:Ee):ae=Ee,z){case 1:var Re=-1;break;case 2:Re=250;break;case 5:Re=1073741823;break;case 4:Re=1e4;break;default:Re=5e3}return Re=ae+Re,z={id:y++,callback:Y,priorityLevel:z,startTime:ae,expirationTime:Re,sortIndex:-1},ae>Ee?(z.sortIndex=ae,t(g,z),s(p)===null&&z===s(g)&&(T?(k(P),P=-1):T=!0,ze(K,ae-Ee))):(z.sortIndex=Re,t(p,z),w||_||(w=!0,$||($=!0,ge()))),z},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(z){var Y=b;return function(){var ae=b;b=Y;try{return z.apply(this,arguments)}finally{b=ae}}}})(Tf)),Tf}var Bm;function US(){return Bm||(Bm=1,Ef.exports=DS()),Ef.exports}var Rf={exports:{}},yt={};var Im;function LS(){if(Im)return yt;Im=1;var e=$a();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:p,containerInfo:g,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,yt.createPortal=function(p,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return u(p,g,null,y)},yt.flushSync=function(p){var g=c.T,y=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=y,a.d.f()}},yt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(p,g))},yt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},yt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&a.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},yt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=d(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(p)},yt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin);a.d.L(p,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},yt.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=d(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},yt.requestFormReset=function(p){a.d.r(p)},yt.unstable_batchedUpdates=function(p,g){return p(g)},yt.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},yt.useFormStatus=function(){return c.H.useHostTransitionStatus()},yt.version="19.2.5",yt}var Hm;function Sv(){if(Hm)return Rf.exports;Hm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rf.exports=LS(),Rf.exports}var qm;function zS(){if(qm)return pa;qm=1;var e=US(),t=$a(),s=Sv();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,o=r;;){var f=i.return;if(f===null)break;var h=f.alternate;if(h===null){if(o=f.return,o!==null){i=o;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===i)return p(f),n;if(h===o)return p(f),r;h=h.sibling}throw Error(a(188))}if(i.return!==o.return)i=f,o=h;else{for(var v=!1,S=f.child;S;){if(S===i){v=!0,i=f,o=h;break}if(S===o){v=!0,o=f,i=h;break}S=S.sibling}if(!v){for(S=h.child;S;){if(S===i){v=!0,i=h,o=f;break}if(S===o){v=!0,o=h,i=f;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),x=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ge(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var Ae=Symbol.for("react.client.reference");function Ve(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ae?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case K:return"Suspense";case $:return"SuspenseList";case F:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case x:return n.displayName||"Context";case k:return(n._context.displayName||"Context")+".Consumer";case M:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return r=n.displayName||null,r!==null?r:Ve(n.type)||"Memo";case G:r=n._payload,n=n._init;try{return Ve(n(r))}catch{}}return null}var ze=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ee=[],Re=-1;function C(n){return{current:n}}function H(n){0>Re||(n.current=Ee[Re],Ee[Re]=null,Re--)}function Q(n,r){Re++,Ee[Re]=n.current,n.current=r}var X=C(null),se=C(null),he=C(null),be=C(null);function Ke(n,r){switch(Q(he,r),Q(se,n),Q(X,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?rm(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=rm(r),n=sm(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(X),Q(X,n)}function Ne(){H(X),H(se),H(he)}function _n(n){n.memoizedState!==null&&Q(be,n);var r=X.current,i=sm(r,n.type);r!==i&&(Q(se,n),Q(X,i))}function Sn(n){se.current===n&&(H(X),H(se)),be.current===n&&(H(be),ua._currentValue=ae)}var Qn,vi;function un(n){if(Qn===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Qn=r&&r[1]||"",vi=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Qn+n+vi}var bi=!1;function ds(n,r){if(!n||bi)return"";bi=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(L){var U=L}Reflect.construct(n,[],q)}else{try{q.call()}catch(L){U=L}n.call(q.prototype)}}else{try{throw Error()}catch(L){U=L}(q=n())&&typeof q.catch=="function"&&q.catch(function(){})}}
vendor: 6,458 bytes, lines 4-9
4catch(L){if(L&&U&&typeof L.stack=="string")return[L.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),v=h[0],S=h[1];if(v&&S){var A=v.split(` 5`),D=S.split(` 6`);for(f=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;f<D.length&&!D[f].includes("DetermineComponentFrameRoot");)f++;if(o===A.length||f===D.length)for(o=A.length-1,f=D.length-1;1<=o&&0<=f&&A[o]!==D[f];)f--;for(;1<=o&&0<=f;o--,f--)if(A[o]!==D[f]){if(o!==1||f!==1)do if(o--,f--,0>f||A[o]!==D[f]){var B=` 7`+A[o].replace(" at new "," at ");return n.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",n.displayName)),B}while(1<=o&&0<=f);break}}}finally{bi=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?un(i):""}function Va(n,r){switch(n.tag){case 26:case 27:case 5:return un(n.type);case 16:return un("Lazy");case 13:return n.child!==r&&r!==null?un("Suspense Fallback"):un("Suspense");case 19:return un("SuspenseList");case 0:case 15:return ds(n.type,!1);case 11:return ds(n.type.render,!1);case 1:return ds(n.type,!0);case 31:return un("Activity");default:return""}}function wn(n){try{var r="",i=null;do r+=Va(n,i),i=n,n=n.return;while(n);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var Ur=Object.prototype.hasOwnProperty,en=e.unstable_scheduleCallback,_i=e.unstable_cancelCallback,Ka=e.unstable_shouldYield,au=e.unstable_requestPaint,mt=e.unstable_now,De=e.unstable_getCurrentPriorityLevel,ut=e.unstable_ImmediatePriority,cn=e.unstable_UserBlockingPriority,ps=e.unstable_NormalPriority,fb=e.unstable_LowPriority,zh=e.unstable_IdlePriority,hb=e.log,db=e.unstable_setDisableYieldValue,Si=null,Nt=null;function Jn(n){if(typeof hb=="function"&&db(n),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Si,n)}catch{}}var Mt=Math.clz32?Math.clz32:mb,pb=Math.log,gb=Math.LN2;function mb(n){return n>>>=0,n===0?32:31-(pb(n)/gb|0)|0}var Ya=256,Fa=262144,Qa=4194304;function Lr(n){var r=n&42;if(r!==0)return r;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 Ja(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var f=0,h=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=o&134217727;return S!==0?(o=S&~h,o!==0?f=Lr(o):(v&=S,v!==0?f=Lr(v):i||(i=S&~n,i!==0&&(f=Lr(i))))):(S=o&~h,S!==0?f=Lr(S):v!==0?f=Lr(v):i||(i=o&~n,i!==0&&(f=Lr(i)))),f===0?0:r!==0&&r!==f&&(r&h)===0&&(h=f&-f,i=r&-r,h>=i||h===32&&(i&4194048)!==0)?r:f}function wi(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function yb(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Ph(){var n=Qa;return Qa<<=1,(Qa&62914560)===0&&(Qa=4194304),n}function ou(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ei(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function vb(n,r,i,o,f,h){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,A=n.expirationTimes,D=n.hiddenUpdates;for(i=v&~i;0<i;){var B=31-Mt(i),q=1<<B;S[B]=0,A[B]=-1;var U=D[B];if(U!==null)for(D[B]=null,B=0;B<U.length;B++){var L=U[B];L!==null&&(L.lane&=-536870913)}i&=~q}o!==0&&Bh(n,o,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(v&~r))}function Bh(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-Mt(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function Ih(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-Mt(i),f=1<<o;f&r|n[o]&r&&(n[o]|=r),i&=~f}}function Hh(n,r){var i=r&-r;return i=(i&42)!==0?1:lu(i),(i&(n.suspendedLanes|r))!==0?0:i}function lu(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 uu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function qh(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Om(n.type))}function $h(n,r){var i=Y.p;try{return Y.p=n,r()}finally{Y.p=i}}var Xn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Xn,St="__reactProps$"+Xn,gs="__reactContainer$"+Xn,cu="__reactEvents$"+Xn,bb="__reactListeners$"+Xn,_b="__reactHandles$"+Xn,Gh="__reactResources$"+Xn,Ti="__reactMarker$"+Xn;function fu(n){delete n[ct],delete n[St],delete n[cu],delete n[bb],delete n[_b]}function ms(n){var r=n[ct];if(r)return r;for(var i=n.parentNode;i;){if(r=i[gs]||i[ct]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=fm(n);n!==null;){if(i=n[ct])return i;n=fm(n)}return r}n=i,i=n.parentNode}return null}function ys(n){if(n=n[ct]||n[gs]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Ri(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function vs(n){var r=n[Gh];return r||(r=n[Gh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function it(n){n[Ti]=!0}var Vh=new Set,Kh={};function zr(n,r){bs(n,r),bs(n+"Capture",r)}function bs(n,r){for(Kh[n]=r,n=0;n<r.length;n++)Vh.add(r[n])}var Sb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\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]*$"),Yh={},Fh={};function wb(n){return Ur.call(Fh,n)?!0:Ur.call(Yh,n)?!1:Sb.test(n)?Fh[n]=!0:(Yh[n]=!0,!1)}function Xa(n,r,i){if(wb(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function Za(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function En(n,r,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+o)}}function qt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Qh(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Eb(n,r,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,h=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function hu(n){if(!n._valueTracker){var r=Qh(n)?"checked":"value";n._valueTracker=Eb(n,r,""+n[r])}}function Jh(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=Qh(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function Wa(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 Tb=/[\n"\\]/g;function $t(n){return n.replace(Tb,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function du(n,r,i,o,f,h,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+qt(r)):n.value!==""+qt(r)&&(n.value=""+qt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?pu(n,v,qt(r)):i!=null?pu(n,v,qt(i)):o!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+qt(S):n.removeAttribute("name")}function Xh(n,r,i,o,f,h,v,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),r!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||r!=null)){hu(n);return}i=i!=null?""+qt(i):"",r=r!=null?""+qt(r):i,S||r===n.value||(n.value=r),n.defaultValue=r}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=S?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),hu(n)}function pu(n,r,i){r==="number"&&Wa(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function _s(n,r,i,o){if(n=n.options,r){r={};for(var f=0;f<i.length;f++)r["$"+i[f]]=!0;for(i=0;i<n.length;i++)f=r.hasOwnProperty("$"+n[i].value),n[i].selected!==f&&(n[i].selected=f),f&&o&&(n[i].defaultSelected=!0)}else{for(i=""+qt(i),r=null,f=0;f<n.length;f++){if(n[f].value===i){n[f].selected=!0,o&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function Zh(n,r,i){if(r!=null&&(r=""+qt(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+qt(i):""}function Wh(n,r,i,o){if(r==null){if(o!=null){if(i!=null)throw Error(a(92));if(ze(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),r=i}i=qt(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),hu(n)}function Ss(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var Rb=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 ed(n,r,i){var o=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,i):typeof i!="number"||i===0||Rb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function td(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var f in r)o=r[f],r.hasOwnProperty(f)&&i[f]!==o&&ed(n,f,o)}else for(var h in r)r.hasOwnProperty(h)&&ed(n,h,r[h])}function gu(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 Ab=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"]]),Ob=/^[\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 eo(n){return Ob.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Tn(){}var mu=null;function yu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ws=null,Es=null;
vendor: 1,742 bytes, line 9
9function nd(n){var r=ys(n);if(r&&(n=r.stateNode)){var i=n[St]||null;e:switch(n=r.stateNode,r.type){case"input":if(du(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+$t(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var f=o[St]||null;if(!f)throw Error(a(90));du(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&Jh(o)}break e;case"textarea":Zh(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&_s(n,!!i.multiple,r,!1)}}}var vu=!1;function rd(n,r,i){if(vu)return n(r,i);vu=!0;try{var o=n(r);return o}finally{if(vu=!1,(ws!==null||Es!==null)&&(qo(),ws&&(r=ws,n=Es,Es=ws=null,nd(r),n)))for(r=0;r<n.length;r++)nd(n[r])}}function Ai(n,r){var i=n.stateNode;if(i===null)return null;var o=i[St]||null;if(o===null)return null;i=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(Rn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){bu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{bu=!1}var Zn=null,_u=null,to=null;
vendor: 3,152 bytes, line 9
9function sd(){if(to)return to;var n,r=_u,i=r.length,o,f="value"in Zn?Zn.value:Zn.textContent,h=f.length;for(n=0;n<i&&r[n]===f[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===f[h-o];o++);return to=f.slice(n,1<o?1-o:void 0)}function no(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function ro(){return!0}function id(){return!1}function wt(n){function r(i,o,f,h,v){this._reactName=i,this._targetInst=f,this.type=o,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ro:id,this.isPropagationStopped=id,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),r}var Pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},so=wt(Pr),Ci=m({},Pr,{view:0,detail:0}),Cb=wt(Ci),Su,wu,xi,io=m({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,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!==xi&&(xi&&n.type==="mousemove"?(Su=n.screenX-xi.screenX,wu=n.screenY-xi.screenY):wu=Su=0,xi=n),Su)},movementY:function(n){return"movementY"in n?n.movementY:wu}}),ad=wt(io),xb=m({},io,{dataTransfer:0}),kb=wt(xb),jb=m({},Ci,{relatedTarget:0}),Eu=wt(jb),Nb=m({},Pr,{animationName:0,elapsedTime:0,pseudoElement:0}),Mb=wt(Nb),Db=m({},Pr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Ub=wt(Db),Lb=m({},Pr,{data:0}),od=wt(Lb),zb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pb={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"},Bb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ib(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Bb[n])?!!r[n]:!1}function Tu(){return Ib}var Hb=m({},Ci,{key:function(n){if(n.key){var r=zb[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=no(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?Pb[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(n){return n.type==="keypress"?no(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?no(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),qb=wt(Hb),$b=m({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ld=wt($b),Gb=m({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),Vb=wt(Gb),Kb=m({},Pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yb=wt(Kb),Fb=m({},io,{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}),Qb=wt(Fb),Jb=m({},Pr,{newState:0,oldState:0}),Xb=wt(Jb),Zb=[9,13,27,32],Ru=Rn&&"CompositionEvent"in window,ki=null;Rn&&"documentMode"in document&&(ki=document.documentMode);var Wb=Rn&&"TextEvent"in window&&!ki,ud=Rn&&(!Ru||ki&&8<ki&&11>=ki),cd=" ",fd=!1;function hd(n,r){switch(n){case"keyup":return Zb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ts=!1;function e_(n,r){switch(n){case"compositionend":return dd(r);case"keypress":return r.which!==32?null:(fd=!0,cd);case"textInput":return n=r.data,n===cd&&fd?null:n;default:return null}}function t_(n,r){if(Ts)return n==="compositionend"||!Ru&&hd(n,r)?(n=sd(),to=_u=Zn=null,Ts=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ud&&r.locale!=="ko"?null:r.data;default:return null}}var n_={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 pd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!n_[n.type]:r==="textarea"}function gd(n,r,i,o){ws?Es?Es.push(o):Es=[o]:ws=o,r=Qo(r,"onChange"),0<r.length&&(i=new so("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var ji=null,Ni=null;function r_(n){Xg(n,0)}function ao(n){var r=Ri(n);if(Jh(r))return n}function md(n,r){if(n==="change")return r}var yd=!1;if(Rn){var Au;if(Rn){var Ou="oninput"in document;if(!Ou){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),Ou=typeof vd.oninput=="function"}Au=Ou}else Au=!1;yd=Au&&(!document.documentMode||9<document.documentMode)}function bd(){ji&&(ji.detachEvent("onpropertychange",_d),Ni=ji=null)}function _d(n){if(n.propertyName==="value"&&ao(Ni)){var r=[];gd(r,Ni,n,yu(n)),rd(r_,r)}}function s_(n,r,i){n==="focusin"?(bd(),ji=r,Ni=i,ji.attachEvent("onpropertychange",_d)):n==="focusout"&&bd()}function i_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ao(Ni)}function a_(n,r){if(n==="click")return ao(r)}function o_(n,r){if(n==="input"||n==="change")return ao(r)}function l_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Dt=typeof Object.is=="function"?Object.is:l_;function Mi(n,r){if(Dt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var f=i[o];if(!Ur.call(r,f)||!Dt(n[f],r[f]))return!1}return!0}function Sd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function wd(n,r){var i=Sd(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=r&&o>=r)return{node:i,offset:r-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Sd(i)}}function Ed(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Ed(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Td(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Wa(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=Wa(n.document)}return r}function Cu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var u_=Rn&&"documentMode"in document&&11>=document.documentMode,Rs=null,xu=null,Di=null,ku=!1;function Rd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;
vendor: 18,629 bytes, line 9
9ku||Rs==null||Rs!==Wa(o)||(o=Rs,"selectionStart"in o&&Cu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Di&&Mi(Di,o)||(Di=o,o=Qo(xu,"onSelect"),0<o.length&&(r=new so("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=Rs)))}function Br(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var As={animationend:Br("Animation","AnimationEnd"),animationiteration:Br("Animation","AnimationIteration"),animationstart:Br("Animation","AnimationStart"),transitionrun:Br("Transition","TransitionRun"),transitionstart:Br("Transition","TransitionStart"),transitioncancel:Br("Transition","TransitionCancel"),transitionend:Br("Transition","TransitionEnd")},ju={},Ad={};Rn&&(Ad=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Ir(n){if(ju[n])return ju[n];if(!As[n])return n;var r=As[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in Ad)return ju[n]=r[i];return n}var Od=Ir("animationend"),Cd=Ir("animationiteration"),xd=Ir("animationstart"),c_=Ir("transitionrun"),f_=Ir("transitionstart"),h_=Ir("transitioncancel"),kd=Ir("transitionend"),jd=new Map,Nu="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(" ");Nu.push("scrollEnd");function tn(n,r){jd.set(n,r),zr(r,[n])}var oo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Gt=[],Os=0,Mu=0;function lo(){for(var n=Os,r=Mu=Os=0;r<n;){var i=Gt[r];Gt[r++]=null;var o=Gt[r];Gt[r++]=null;var f=Gt[r];Gt[r++]=null;var h=Gt[r];if(Gt[r++]=null,o!==null&&f!==null){var v=o.pending;v===null?f.next=f:(f.next=v.next,v.next=f),o.pending=f}h!==0&&Nd(i,f,h)}}function uo(n,r,i,o){Gt[Os++]=n,Gt[Os++]=r,Gt[Os++]=i,Gt[Os++]=o,Mu|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Du(n,r,i,o){return uo(n,r,i,o),co(n)}function Hr(n,r){return uo(n,null,null,r),co(n)}function Nd(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var f=!1,h=n.return;h!==null;)h.childLanes|=i,o=h.alternate,o!==null&&(o.childLanes|=i),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(f=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,f&&r!==null&&(f=31-Mt(i),n=h.hiddenUpdates,o=n[f],o===null?n[f]=[r]:o.push(r),r.lane=i|536870912),h):null}function co(n){if(50<na)throw na=0,$c=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Cs={};function d_(n,r,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(n,r,i,o){return new d_(n,r,i,o)}function Uu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function An(n,r){var i=n.alternate;return i===null?(i=Ut(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Md(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function fo(n,r,i,o,f,h){var v=0;if(o=n,typeof n=="function")Uu(n)&&(v=1);else if(typeof n=="string")v=vS(n,i,X.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case F:return n=Ut(31,i,r,f),n.elementType=F,n.lanes=h,n;case T:return qr(i.children,f,h,r);case E:v=8,f|=24;break;case R:return n=Ut(12,i,r,f|2),n.elementType=R,n.lanes=h,n;case K:return n=Ut(13,i,r,f),n.elementType=K,n.lanes=h,n;case $:return n=Ut(19,i,r,f),n.elementType=$,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case x:v=10;break e;case k:v=9;break e;case M:v=11;break e;case P:v=14;break e;case G:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=Ut(v,i,r,f),r.elementType=n,r.type=o,r.lanes=h,r}function qr(n,r,i,o){return n=Ut(7,n,o,r),n.lanes=i,n}function Lu(n,r,i){return n=Ut(6,n,null,r),n.lanes=i,n}function Dd(n){var r=Ut(18,null,null,0);return r.stateNode=n,r}function zu(n,r,i){return r=Ut(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Ud=new WeakMap;function Vt(n,r){if(typeof n=="object"&&n!==null){var i=Ud.get(n);return i!==void 0?i:(r={value:n,source:r,stack:wn(r)},Ud.set(n,r),r)}return{value:n,source:r,stack:wn(r)}}var xs=[],ks=0,ho=null,Ui=0,Kt=[],Yt=0,Wn=null,fn=1,hn="";function On(n,r){xs[ks++]=Ui,xs[ks++]=ho,ho=n,Ui=r}function Ld(n,r,i){Kt[Yt++]=fn,Kt[Yt++]=hn,Kt[Yt++]=Wn,Wn=n;var o=fn;n=hn;var f=32-Mt(o)-1;o&=~(1<<f),i+=1;var h=32-Mt(r)+f;if(30<h){var v=f-f%5;h=(o&(1<<v)-1).toString(32),o>>=v,f-=v,fn=1<<32-Mt(r)+f|i<<f|o,hn=h+n}else fn=1<<h|i<<f|o,hn=n}function Pu(n){n.return!==null&&(On(n,1),Ld(n,1,0))}function Bu(n){for(;n===ho;)ho=xs[--ks],xs[ks]=null,Ui=xs[--ks],xs[ks]=null;for(;n===Wn;)Wn=Kt[--Yt],Kt[Yt]=null,hn=Kt[--Yt],Kt[Yt]=null,fn=Kt[--Yt],Kt[Yt]=null}function zd(n,r){Kt[Yt++]=fn,Kt[Yt++]=hn,Kt[Yt++]=Wn,fn=r.id,hn=r.overflow,Wn=n}var ft=null,Pe=null,ve=!1,er=null,Ft=!1,Iu=Error(a(519));function tr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Li(Vt(r,n)),Iu}function Pd(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[ct]=n,r[St]=o,i){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<sa.length;i++)pe(sa[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":pe("invalid",r),Xh(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":pe("invalid",r);break;case"textarea":pe("invalid",r),Wh(r,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||o.suppressHydrationWarning===!0||tm(r.textContent,i)?(o.popover!=null&&(pe("beforetoggle",r),pe("toggle",r)),o.onScroll!=null&&pe("scroll",r),o.onScrollEnd!=null&&pe("scrollend",r),o.onClick!=null&&(r.onclick=Tn),r=!0):r=!1,r||tr(n,!0)}function Bd(n){for(ft=n.return;ft;)switch(ft.tag){case 5:case 31:case 13:Ft=!1;return;case 27:case 3:Ft=!0;return;default:ft=ft.return}}function js(n){if(n!==ft)return!1;if(!ve)return Bd(n),ve=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||sf(n.type,n.memoizedProps)),i=!i),i&&Pe&&tr(n),Bd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Pe=cm(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Pe=cm(n)}else r===27?(r=Pe,gr(n.type)?(n=cf,cf=null,Pe=n):Pe=r):Pe=ft?Jt(n.stateNode.nextSibling):null;return!0}function $r(){Pe=ft=null,ve=!1}function Hu(){var n=er;return n!==null&&(At===null?At=n:At.push.apply(At,n),er=null),n}function Li(n){er===null?er=[n]:er.push(n)}var qu=C(null),Gr=null,Cn=null;function nr(n,r,i){Q(qu,r._currentValue),r._currentValue=i}function xn(n){n._currentValue=qu.current,H(qu)}function $u(n,r,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===i)break;n=n.return}}function Gu(n,r,i,o){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var A=0;A<r.length;A++)if(S.context===r[A]){h.lanes|=i,S=h.alternate,S!==null&&(S.lanes|=i),$u(h.return,i,n),o||(v=null);break e}h=S.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(a(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),$u(v,i,n),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===n){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function Ns(n,r,i,o){n=null;for(var f=r,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=f.type;Dt(f.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(f===be.current){if(v=f.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(ua):n=[ua])}f=f.return}n!==null&&Gu(r,n,i,o),r.flags|=262144}function po(n){for(n=n.firstContext;n!==null;){if(!Dt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Vr(n){Gr=n,Cn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function ht(n){return Id(Gr,n)}function go(n,r){return Gr===null&&Vr(n),Id(n,r)}function Id(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Cn===null){if(n===null)throw Error(a(308));Cn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Cn=Cn.next=r;return i}var p_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},g_=e.unstable_scheduleCallback,m_=e.unstable_NormalPriority,Qe={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vu(){return{controller:new p_,data:new Map,refCount:0}}function zi(n){n.refCount--,n.refCount===0&&g_(m_,function(){n.controller.abort()})}var Pi=null,Ku=0,Ms=0,Ds=null;function y_(n,r){if(Pi===null){var i=Pi=[];Ku=0,Ms=Qc(),Ds={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Ku++,r.then(Hd,Hd),r}function Hd(){if(--Ku===0&&Pi!==null){Ds!==null&&(Ds.status="fulfilled");var n=Pi;Pi=null,Ms=0,Ds=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function v_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var f=0;f<i.length;f++)(0,i[f])(r)},function(f){for(o.status="rejected",o.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),o}var qd=z.S;z.S=function(n,r){Rg=mt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&y_(n,r),qd!==null&&qd(n,r)};var Kr=C(null);function Yu(){var n=Kr.current;return n!==null?n:Me.pooledCache}function mo(n,r){r===null?Q(Kr,Kr.current):Q(Kr,r.pool)}function $d(){var n=Yu();return n===null?null:{parent:Qe._currentValue,pool:n}}var Us=Error(a(460)),Fu=Error(a(474)),yo=Error(a(542)),vo={then:function(){}};function Gd(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Vd(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(Tn,Tn),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Yd(n),n;default:if(typeof r.status=="string")r.then(Tn,Tn);else{if(n=Me,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=o}},function(o){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Yd(n),n}throw Fr=r,Us}}function Yr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Fr=i,Us):i}}var Fr=null;function Kd(){if(Fr===null)throw Error(a(459));var n=Fr;return Fr=null,n}function Yd(n){if(n===Us||n===yo)throw Error(a(483))}var Ls=null,Bi=0;function bo(n){var r=Bi;return Bi+=1,Ls===null&&(Ls=[]),Vd(Ls,n,r)}function Ii(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function _o(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Fd(n){function r(j,O){if(n){var N=j.deletions;N===null?(j.deletions=[O],j.flags|=16):N.push(O)}}function i(j,O){if(!n)return null;for(;O!==null;)r(j,O),O=O.sibling;return null}function o(j){for(var O=new Map;j!==null;)j.key!==null?O.set(j.key,j):O.set(j.index,j),j=j.sibling;return O}function f(j,O){return j=An(j,O),j.index=0,j.sibling=null,j}function h(j,O,N){return j.index=N,n?(N=j.alternate,N!==null?(N=N.index,N<O?(j.flags|=67108866,O):N):(j.flags|=67108866,O)):(j.flags|=1048576,O)}function v(j){return n&&j.alternate===null&&(j.flags|=67108866),j}function S(j,O,N,I){return O===null||O.tag!==6?(O=Lu(N,j.mode,I),O.return=j,O):(O=f(O,N),O.return=j,O)}function A(j,O,N,I){var ie=N.type;return ie===T?B(j,O,N.props.children,I,N.key):O!==null&&(O.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===G&&Yr(ie)===O.type)?(O=f(O,N.props),Ii(O,N),O.return=j,O):(O=fo(N.type,N.key,N.props,null,j.mode,I),Ii(O,N),O.return=j,O)}function D(j,O,N,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==N.containerInfo||O.stateNode.implementation!==N.implementation?(O=zu(N,j.mode,I),O.return=j,O):(O=f(O,N.children||[]),O.return=j,O)}function B(j,O,N,I,ie){return O===null||O.tag!==7?(O=qr(N,j.mode,I,ie),O.return=j,O):(O=f(O,N),O.return=j,O)}function q(j,O,N){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Lu(""+O,j.mode,N),O.return=j,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return N=fo(O.type,O.key,O.props,null,j.mode,N),Ii(N,O),N.return=j,N;case w:return O=zu(O,j.mode,N),O.return=j,O;case G:return O=Yr(O),q(j,O,N)}if(ze(O)||ge(O))return O=qr(O,j.mode,N,null),O.return=j,O;if(typeof O.then=="function")return q(j,bo(O),N);if(O.$$typeof===x)return q(j,go(j,O),N);_o(j,O)}return null}function U(j,O,N,I){var ie=O!==null?O.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ie!==null?null:S(j,O,""+N,I);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return N.key===ie?A(j,O,N,I):null;case w:return N.key===ie?D(j,O,N,I):null;case G:return N=Yr(N),U(j,O,N,I)}if(ze(N)||ge(N))return ie!==null?null:B(j,O,N,I,null);if(typeof N.then=="function")return U(j,O,bo(N),I);if(N.$$typeof===x)return U(j,O,go(j,N),I);_o(j,N)}return null}function L(j,O,N,I,ie){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return j=j.get(N)||null,S(O,j,""+I,ie);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return j=j.get(I.key===null?N:I.key)||null,A(O,j,I,ie);case w:return j=j.get(I.key===null?N:I.key)||null,D(O,j,I,ie);case G:return I=Yr(I),L(j,O,N,I,ie)}if(ze(I)||ge(I))return j=j.get(N)||null,B(O,j,I,ie,null);if(typeof I.then=="function")return L(j,O,N,bo(I),ie);if(I.$$typeof===x)return L(j,O,N,go(O,I),ie);_o(O,I)}return null}function Z(j,O,N,I){for(var ie=null,Se=null,te=O,fe=O=0,ye=null;te!==null&&fe<N.length;fe++){te.index>fe?(ye=te,te=null):ye=te.sibling;var we=U(j,te,N[fe],I);if(we===null){te===null&&(te=ye);break}n&&te&&we.alternate===null&&r(j,te),O=h(we,O,fe),Se===null?ie=we:Se.sibling=we,Se=we,te=ye}if(fe===N.length)return i(j,te),ve&&On(j,fe),ie;if(te===null){for(;fe<N.length;fe++)te=q(j,N[fe],I),te!==null&&(O=h(te,O,fe),Se===null?ie=te:Se.sibling=te,Se=te);return ve&&On(j,fe),ie}for(te=o(te);fe<N.length;fe++)ye=L(te,j,fe,N[fe],I),ye!==null&&(n&&ye.alternate!==null&&te.delete(ye.key===null?fe:ye.key),O=h(ye,O,fe),Se===null?ie=ye:Se.sibling=ye,Se=ye);return n&&te.forEach(function(_r){return r(j,_r)}),ve&&On(j,fe),ie}function oe(j,O,N,I){if(N==null)throw Error(a(151));for(var ie=null,Se=null,te=O,fe=O=0,ye=null,we=N.next();te!==null&&!we.done;fe++,we=N.next()){te.index>fe?(ye=te,te=null):ye=te.sibling;var _r=U(j,te,we.value,I);if(_r===null){te===null&&(te=ye);break}n&&te&&_r.alternate===null&&r(j,te),O=h(_r,O,fe),Se===null?ie=_r:Se.sibling=_r,Se=_r,te=ye}if(we.done)return i(j,te),ve&&On(j,fe),ie;if(te===null){for(;!we.done;fe++,we=N.next())we=q(j,we.value,I),we!==null&&(O=h(we,O,fe),Se===null?ie=we:Se.sibling=we,Se=we);return ve&&On(j,fe),ie}for(te=o(te);!we.done;fe++,we=N.next())we=L(te,j,fe,we.value,I),we!==null&&(n&&we.alternate!==null&&te.delete(we.key===null?fe:we.key),O=h(we,O,fe),Se===null?ie=we:Se.sibling=we,Se=we);return n&&te.forEach(function(xS){return r(j,xS)}),ve&&On(j,fe),ie}function je(j,O,N,I){if(typeof N=="object"&&N!==null&&N.type===T&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case _:e:{for(var ie=N.key;O!==null;){if(O.key===ie){if(ie=N.type,ie===T){if(O.tag===7){i(j,O.sibling),I=f(O,N.props.children),I.return=j,j=I;break e}}else if(O.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===G&&Yr(ie)===O.type){i(j,O.sibling),I=f(O,N.props),Ii(I,N),I.return=j,j=I;break e}i(j,O);break}else r(j,O);O=O.sibling}N.type===T?(I=qr(N.props.children,j.mode,I,N.key),I.return=j,j=I):(I=fo(N.type,N.key,N.props,null,
vendor: 10,180 bytes, line 9
9j.mode,I),Ii(I,N),I.return=j,j=I)}return v(j);case w:e:{for(ie=N.key;O!==null;){if(O.key===ie)if(O.tag===4&&O.stateNode.containerInfo===N.containerInfo&&O.stateNode.implementation===N.implementation){i(j,O.sibling),I=f(O,N.children||[]),I.return=j,j=I;break e}else{i(j,O);break}else r(j,O);O=O.sibling}I=zu(N,j.mode,I),I.return=j,j=I}return v(j);case G:return N=Yr(N),je(j,O,N,I)}if(ze(N))return Z(j,O,N,I);if(ge(N)){if(ie=ge(N),typeof ie!="function")throw Error(a(150));return N=ie.call(N),oe(j,O,N,I)}if(typeof N.then=="function")return je(j,O,bo(N),I);if(N.$$typeof===x)return je(j,O,go(j,N),I);_o(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,O!==null&&O.tag===6?(i(j,O.sibling),I=f(O,N),I.return=j,j=I):(i(j,O),I=Lu(N,j.mode,I),I.return=j,j=I),v(j)):i(j,O)}return function(j,O,N,I){try{Bi=0;var ie=je(j,O,N,I);return Ls=null,ie}catch(te){if(te===Us||te===yo)throw te;var Se=Ut(29,te,null,j.mode);return Se.lanes=I,Se.return=j,Se}}}var Qr=Fd(!0),Qd=Fd(!1),rr=!1;function Qu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ju(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function sr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ir(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Te&2)!==0){var f=o.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),o.pending=r,r=co(n),Nd(n,null,i),r}return uo(n,o,r,i),co(n)}function Hi(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Ih(n,i)}}function Xu(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var f=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?f=h=r:h=h.next=r}else f=h=r;i={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var Zu=!1;function qi(){if(Zu){var n=Ds;if(n!==null)throw n}}function $i(n,r,i,o){Zu=!1;var f=n.updateQueue;rr=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var A=S,D=A.next;A.next=null,v===null?h=D:v.next=D,v=A;var B=n.alternate;B!==null&&(B=B.updateQueue,S=B.lastBaseUpdate,S!==v&&(S===null?B.firstBaseUpdate=D:S.next=D,B.lastBaseUpdate=A))}if(h!==null){var q=f.baseState;v=0,B=D=A=null,S=h;do{var U=S.lane&-536870913,L=U!==S.lane;if(L?(me&U)===U:(o&U)===U){U!==0&&U===Ms&&(Zu=!0),B!==null&&(B=B.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var Z=n,oe=S;U=r;var je=i;switch(oe.tag){case 1:if(Z=oe.payload,typeof Z=="function"){q=Z.call(je,q,U);break e}q=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=oe.payload,U=typeof Z=="function"?Z.call(je,q,U):Z,U==null)break e;q=m({},q,U);break e;case 2:rr=!0}}U=S.callback,U!==null&&(n.flags|=64,L&&(n.flags|=8192),L=f.callbacks,L===null?f.callbacks=[U]:L.push(U))}else L={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},B===null?(D=B=L,A=q):B=B.next=L,v|=U;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;L=S,S=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}}while(!0);B===null&&(A=q),f.baseState=A,f.firstBaseUpdate=D,f.lastBaseUpdate=B,h===null&&(f.shared.lanes=0),cr|=v,n.lanes=v,n.memoizedState=q}}function Jd(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Xd(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Jd(i[n],r)}var zs=C(null),So=C(0);function Zd(n,r){n=Pn,Q(So,n),Q(zs,r),Pn=n|r.baseLanes}function Wu(){Q(So,Pn),Q(zs,zs.current)}function ec(){Pn=So.current,H(zs),H(So)}var Lt=C(null),Qt=null;function ar(n){var r=n.alternate;Q(Ye,Ye.current&1),Q(Lt,n),Qt===null&&(r===null||zs.current!==null||r.memoizedState!==null)&&(Qt=n)}function tc(n){Q(Ye,Ye.current),Q(Lt,n),Qt===null&&(Qt=n)}function Wd(n){n.tag===22?(Q(Ye,Ye.current),Q(Lt,n),Qt===null&&(Qt=n)):or()}function or(){Q(Ye,Ye.current),Q(Lt,Lt.current)}function zt(n){H(Lt),Qt===n&&(Qt=null),H(Ye)}var Ye=C(0);function wo(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||lf(i)||uf(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var kn=0,ce=null,xe=null,Je=null,Eo=!1,Ps=!1,Jr=!1,To=0,Gi=0,Bs=null,b_=0;function qe(){throw Error(a(321))}function nc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Dt(n[i],r[i]))return!1;return!0}function rc(n,r,i,o,f,h){return kn=h,ce=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=n===null||n.memoizedState===null?Lp:vc,Jr=!1,h=i(o,f),Jr=!1,Ps&&(h=tp(r,i,o,f)),ep(n),h}function ep(n){z.H=Yi;var r=xe!==null&&xe.next!==null;if(kn=0,Je=xe=ce=null,Eo=!1,Gi=0,Bs=null,r)throw Error(a(300));n===null||Xe||(n=n.dependencies,n!==null&&po(n)&&(Xe=!0))}function tp(n,r,i,o){ce=n;var f=0;do{if(Ps&&(Bs=null),Gi=0,Ps=!1,25<=f)throw Error(a(301));if(f+=1,Je=xe=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}z.H=zp,h=r(i,o)}while(Ps);return h}function __(){var n=z.H,r=n.useState()[0];return r=typeof r.then=="function"?Vi(r):r,n=n.useState()[0],(xe!==null?xe.memoizedState:null)!==n&&(ce.flags|=1024),r}function sc(){var n=To!==0;return To=0,n}function ic(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function ac(n){if(Eo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Eo=!1}kn=0,Je=xe=ce=null,Ps=!1,Gi=To=0,Bs=null}function bt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?ce.memoizedState=Je=n:Je=Je.next=n,Je}function Fe(){if(xe===null){var n=ce.alternate;n=n!==null?n.memoizedState:null}else n=xe.next;var r=Je===null?ce.memoizedState:Je.next;if(r!==null)Je=r,xe=n;else{if(n===null)throw ce.alternate===null?Error(a(467)):Error(a(310));xe=n,n={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Je===null?ce.memoizedState=Je=n:Je=Je.next=n}return Je}function Ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vi(n){var r=Gi;return Gi+=1,Bs===null&&(Bs=[]),n=Vd(Bs,n,r),r=ce,(Je===null?r.memoizedState:Je.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?Lp:vc),n}function Ao(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Vi(n);if(n.$$typeof===x)return ht(n)}throw Error(a(438,String(n)))}function oc(n){var r=null,i=ce.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var o=ce.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Ro(),ce.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),o=0;o<n;o++)i[o]=re;return r.index++,i}function jn(n,r){return typeof r=="function"?r(n):r}function Oo(n){var r=Fe();return lc(r,xe,n)}function lc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var f=n.baseQueue,h=o.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}r.baseQueue=f=h,o.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{r=f.next;var S=v=null,A=null,D=r,B=!1;do{var q=D.lane&-536870913;if(q!==D.lane?(me&q)===q:(kn&q)===q){var U=D.revertLane;if(U===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),q===Ms&&(B=!0);else if((kn&U)===U){D=D.next,U===Ms&&(B=!0);continue}else q={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=q,v=h):A=A.next=q,ce.lanes|=U,cr|=U;q=D.action,Jr&&i(h,q),h=D.hasEagerState?D.eagerState:i(h,q)}else U={lane:q,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=U,v=h):A=A.next=U,ce.lanes|=q,cr|=q;D=D.next}while(D!==null&&D!==r);if(A===null?v=h:A.next=S,!Dt(h,n.memoizedState)&&(Xe=!0,B&&(i=Ds,i!==null)))throw i;n.memoizedState=h,n.baseState=v,n.baseQueue=A,o.lastRenderedState=h}return f===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function uc(n){var r=Fe(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var o=i.dispatch,f=i.pending,h=r.memoizedState;if(f!==null){i.pending=null;var v=f=f.next;do h=n(h,v.action),v=v.next;while(v!==f);Dt(h,r.memoizedState)||(Xe=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),i.lastRenderedState=h}return[h,o]}function np(n,r,i){var o=ce,f=Fe(),h=ve;if(h){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!Dt((xe||f).memoizedState,i);if(v&&(f.memoizedState=i,Xe=!0),f=f.queue,hc(ip.bind(null,o,f,n),[n]),f.getSnapshot!==r||v||Je!==null&&Je.memoizedState.tag&1){if(o.flags|=2048,Is(9,{destroy:void 0},sp.bind(null,o,f,i,r),null),Me===null)throw Error(a(349));h||(kn&127)!==0||rp(o,r,i)}return i}function rp(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=ce.updateQueue,r===null?(r=Ro(),ce.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function sp(n,r,i,o){r.value=i,r.getSnapshot=o,ap(r)&&op(n)}function ip(n,r,i){return i(function(){ap(r)&&op(n)})}function ap(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Dt(n,i)}catch{return!0}}function op(n){var r=Hr(n,2);r!==null&&Ot(r,n,2)}function cc(n){var r=bt();if(typeof n=="function"){var i=n;
vendor: 4,833 bytes, line 9
9if(n=i(),Jr){Jn(!0);try{i()}finally{Jn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:n},r}function lp(n,r,i,o){return n.baseState=i,lc(n,xe,typeof o=="function"?o:jn)}function S_(n,r,i,o,f){if(ko(n))throw Error(a(485));if(n=r.action,n!==null){var h={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};z.T!==null?i(!0):h.isTransition=!1,o(h),i=r.pending,i===null?(h.next=r.pending=h,up(r,h)):(h.next=i.next,r.pending=i.next=h)}}function up(n,r){var i=r.action,o=r.payload,f=n.state;if(r.isTransition){var h=z.T,v={};z.T=v;try{var S=i(f,o),A=z.S;A!==null&&A(v,S),cp(n,r,S)}catch(D){fc(n,r,D)}finally{h!==null&&v.types!==null&&(h.types=v.types),z.T=h}}else try{h=i(f,o),cp(n,r,h)}catch(D){fc(n,r,D)}}function cp(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){fp(n,r,o)},function(o){return fc(n,r,o)}):fp(n,r,i)}function fp(n,r,i){r.status="fulfilled",r.value=i,hp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,up(n,i)))}function fc(n,r,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=i,hp(r),r=r.next;while(r!==o)}n.action=null}function hp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function dp(n,r){return r}function pp(n,r){if(ve){var i=Me.formState;if(i!==null){e:{var o=ce;if(ve){if(Pe){t:{for(var f=Pe,h=Ft;f.nodeType!==8;){if(!h){f=null;break t}if(f=Jt(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){Pe=Jt(f.nextSibling),o=f.data==="F!";break e}}tr(o)}o=!1}o&&(r=i[0])}}return i=bt(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dp,lastRenderedState:r},i.queue=o,i=Mp.bind(null,ce,o),o.dispatch=i,o=cc(!1),h=yc.bind(null,ce,!1,o.queue),o=bt(),f={state:r,dispatch:null,action:n,pending:null},o.queue=f,i=S_.bind(null,ce,f,h,i),f.dispatch=i,o.memoizedState=n,[r,i,!1]}function gp(n){var r=Fe();return mp(r,xe,n)}function mp(n,r,i){if(r=lc(n,r,dp)[0],n=Oo(jn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Vi(r)}catch(v){throw v===Us?yo:v}else o=r;r=Fe();var f=r.queue,h=f.dispatch;return i!==r.memoizedState&&(ce.flags|=2048,Is(9,{destroy:void 0},w_.bind(null,f,i),null)),[o,h,n]}function w_(n,r){n.action=r}function yp(n){var r=Fe(),i=xe;if(i!==null)return mp(r,i,n);Fe(),r=r.memoizedState,i=Fe();var o=i.queue.dispatch;return i.memoizedState=n,[r,o,!1]}function Is(n,r,i,o){return n={tag:n,create:i,deps:o,inst:r,next:null},r=ce.updateQueue,r===null&&(r=Ro(),ce.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,r.lastEffect=n),n}function vp(){return Fe().memoizedState}function Co(n,r,i,o){var f=bt();ce.flags|=n,f.memoizedState=Is(1|r,{destroy:void 0},i,o===void 0?null:o)}function xo(n,r,i,o){var f=Fe();o=o===void 0?null:o;var h=f.memoizedState.inst;xe!==null&&o!==null&&nc(o,xe.memoizedState.deps)?f.memoizedState=Is(r,h,i,o):(ce.flags|=n,f.memoizedState=Is(1|r,h,i,o))}function bp(n,r){Co(8390656,8,n,r)}function hc(n,r){xo(2048,8,n,r)}function E_(n){ce.flags|=4;var r=ce.updateQueue;if(r===null)r=Ro(),ce.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function _p(n){var r=Fe().memoizedState;return E_({ref:r,nextImpl:n}),function(){if((Te&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Sp(n,r){return xo(4,2,n,r)}function wp(n,r){return xo(4,4,n,r)}function Ep(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Tp(n,r,i){i=i!=null?i.concat([n]):null,xo(4,4,Ep.bind(null,r,n),i)}function dc(){}function Rp(n,r){var i=Fe();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&nc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function Ap(n,r){var i=Fe();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&nc(r,o[1]))return o[0];if(o=n(),Jr){Jn(!0);try{n()}finally{Jn(!1)}}return i.memoizedState=[o,r],o}function pc(n,r,i){return i===void 0||(kn&1073741824)!==0&&(me&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Og(),ce.lanes|=n,cr|=n,i)}function Op(n,r,i,o){return Dt(i,r)?i:zs.current!==null?(n=pc(n,i,o),Dt(n,r)||(Xe=!0),n):(kn&42)===0||(kn&1073741824)!==0&&(me&261930)===0?(Xe=!0,n.memoizedState=i):(n=Og(),ce.lanes|=n,cr|=n,r)}function Cp(n,r,i,o,f){var h=Y.p;Y.p=h!==0&&8>h?h:8;var v=z.T,S={};z.T=S,yc(n,!1,r,i);try{var A=f(),D=z.S;if(D!==null&&D(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var B=v_(A,o);Ki(n,r,B,It(n))}else Ki(n,r,o,It(n))}catch(q){Ki(n,r,{then:function(){},status:"rejected",reason:q},It())}finally{Y.p=h,v!==null&&S.types!==null&&(v.types=S.types),z.T=v}}
vendor: 4,566 bytes, line 9
9function T_(){}function gc(n,r,i,o){if(n.tag!==5)throw Error(a(476));var f=xp(n).queue;Cp(n,f,r,ae,i===null?T_:function(){return kp(n),i(o)})}function xp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:ae},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function kp(n){var r=xp(n);r.next===null&&(r=n.alternate.memoizedState),Ki(n,r.next.queue,{},It())}function mc(){return ht(ua)}function jp(){return Fe().memoizedState}function Np(){return Fe().memoizedState}function R_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=It();n=sr(i);var o=ir(r,n,i);o!==null&&(Ot(o,r,i),Hi(o,r,i)),r={cache:Vu()},n.payload=r;return}r=r.return}}function A_(n,r,i){var o=It();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ko(n)?Dp(r,i):(i=Du(n,r,i,o),i!==null&&(Ot(i,n,o),Up(i,r,o)))}function Mp(n,r,i){var o=It();Ki(n,r,i,o)}function Ki(n,r,i,o){var f={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(ko(n))Dp(r,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var v=r.lastRenderedState,S=h(v,i);if(f.hasEagerState=!0,f.eagerState=S,Dt(S,v))return uo(n,r,f,0),Me===null&&lo(),!1}catch{}if(i=Du(n,r,f,o),i!==null)return Ot(i,n,o),Up(i,r,o),!0}return!1}function yc(n,r,i,o){if(o={lane:2,revertLane:Qc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},ko(n)){if(r)throw Error(a(479))}else r=Du(n,i,o,2),r!==null&&Ot(r,n,2)}function ko(n){var r=n.alternate;return n===ce||r!==null&&r===ce}function Dp(n,r){Ps=Eo=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Up(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Ih(n,i)}}var Yi={readContext:ht,use:Ao,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Yi.useEffectEvent=qe;var Lp={readContext:ht,use:Ao,useCallback:function(n,r){return bt().memoizedState=[n,r===void 0?null:r],n},useContext:ht,useEffect:bp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,Co(4194308,4,Ep.bind(null,r,n),i)},useLayoutEffect:function(n,r){return Co(4194308,4,n,r)},useInsertionEffect:function(n,r){Co(4,2,n,r)},useMemo:function(n,r){var i=bt();r=r===void 0?null:r;var o=n();if(Jr){Jn(!0);try{n()}finally{Jn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=bt();if(i!==void 0){var f=i(r);if(Jr){Jn(!0);try{i(r)}finally{Jn(!1)}}}else f=r;return o.memoizedState=o.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},o.queue=n,n=n.dispatch=A_.bind(null,ce,n),[o.memoizedState,n]},useRef:function(n){var r=bt();return n={current:n},r.memoizedState=n},useState:function(n){n=cc(n);var r=n.queue,i=Mp.bind(null,ce,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:dc,useDeferredValue:function(n,r){var i=bt();return pc(i,n,r)},useTransition:function(){var n=cc(!1);return n=Cp.bind(null,ce,n.queue,!0,!1),bt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=ce,f=bt();if(ve){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Me===null)throw Error(a(349));(me&127)!==0||rp(o,r,i)}f.memoizedState=i;var h={value:i,getSnapshot:r};return f.queue=h,bp(ip.bind(null,o,h,n),[n]),o.flags|=2048,Is(9,{destroy:void 0},sp.bind(null,o,h,i,r),null),i},useId:function(){var n=bt(),r=Me.identifierPrefix;if(ve){var i=hn,o=fn;i=(o&~(1<<32-Mt(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=To++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=b_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:mc,useFormState:pp,useActionState:pp,useOptimistic:function(n){var r=bt();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=yc.bind(null,ce,!0,i),i.dispatch=r,[n,r]},useMemoCache:oc,useCacheRefresh:function(){return bt().memoizedState=R_.bind(null,ce)},useEffectEvent:function(n){var r=bt(),i={impl:n}
vendor: 14,111 bytes, line 9
9;return r.memoizedState=i,function(){if((Te&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},vc={readContext:ht,use:Ao,useCallback:Rp,useContext:ht,useEffect:hc,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:wp,useMemo:Ap,useReducer:Oo,useRef:vp,useState:function(){return Oo(jn)},useDebugValue:dc,useDeferredValue:function(n,r){var i=Fe();return Op(i,xe.memoizedState,n,r)},useTransition:function(){var n=Oo(jn)[0],r=Fe().memoizedState;return[typeof n=="boolean"?n:Vi(n),r]},useSyncExternalStore:np,useId:jp,useHostTransitionStatus:mc,useFormState:gp,useActionState:gp,useOptimistic:function(n,r){var i=Fe();return lp(i,xe,n,r)},useMemoCache:oc,useCacheRefresh:Np};vc.useEffectEvent=_p;var zp={readContext:ht,use:Ao,useCallback:Rp,useContext:ht,useEffect:hc,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:wp,useMemo:Ap,useReducer:uc,useRef:vp,useState:function(){return uc(jn)},useDebugValue:dc,useDeferredValue:function(n,r){var i=Fe();return xe===null?pc(i,n,r):Op(i,xe.memoizedState,n,r)},useTransition:function(){var n=uc(jn)[0],r=Fe().memoizedState;return[typeof n=="boolean"?n:Vi(n),r]},useSyncExternalStore:np,useId:jp,useHostTransitionStatus:mc,useFormState:yp,useActionState:yp,useOptimistic:function(n,r){var i=Fe();return xe!==null?lp(i,xe,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:oc,useCacheRefresh:Np};zp.useEffectEvent=_p;function bc(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:m({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var _c={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=It(),f=sr(o);f.payload=r,i!=null&&(f.callback=i),r=ir(n,f,o),r!==null&&(Ot(r,n,o),Hi(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=It(),f=sr(o);f.tag=1,f.payload=r,i!=null&&(f.callback=i),r=ir(n,f,o),r!==null&&(Ot(r,n,o),Hi(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=It(),o=sr(i);o.tag=2,r!=null&&(o.callback=r),r=ir(n,o,i),r!==null&&(Ot(r,n,i),Hi(r,n,i))}};function Pp(n,r,i,o,f,h,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,h,v):r.prototype&&r.prototype.isPureReactComponent?!Mi(i,o)||!Mi(f,h):!0}function Bp(n,r,i,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,o),r.state!==n&&_c.enqueueReplaceState(r,r.state,null)}function Xr(n,r){var i=r;if("ref"in r){i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}if(n=n.defaultProps){i===r&&(i=m({},i));for(var f in n)i[f]===void 0&&(i[f]=n[f])}return i}function Ip(n){oo(n)}function Hp(n){console.error(n)}function qp(n){oo(n)}function jo(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function $p(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Sc(n,r,i){return i=sr(i),i.tag=3,i.payload={element:null},i.callback=function(){jo(n,r)},i}function Gp(n){return n=sr(n),n.tag=3,n}function Vp(n,r,i,o){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=o.value;n.payload=function(){return f(h)},n.callback=function(){$p(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){$p(r,i,o),typeof f!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function O_(n,r,i,o,f){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&Ns(r,i,f,!0),i=Lt.current,i!==null){switch(i.tag){case 31:case 13:return Qt===null?$o():i.alternate===null&&$e===0&&($e=3),i.flags&=-257,i.flags|=65536,i.lanes=f,o===vo?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),Kc(n,o,f)),!1;case 22:return i.flags|=65536,o===vo?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([o]):i.add(o)),Kc(n,o,f)),!1}throw Error(a(435,i.tag))}return Kc(n,o,f),$o(),!1}if(ve)return r=Lt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,o!==Iu&&(n=Error(a(422),{cause:o}),Li(Vt(n,i)))):(o!==Iu&&(r=Error(a(423),{cause:o}),Li(Vt(r,i))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,o=Vt(o,i),f=Sc(n.stateNode,o,f),Xu(n,f),$e!==4&&($e=2)),!1;var h=Error(a(520),{cause:o});if(h=Vt(h,i),ta===null?ta=[h]:ta.push(h),$e!==4&&($e=2),r===null)return!0;o=Vt(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=f&-f,i.lanes|=n,n=Sc(i.stateNode,o,n),Xu(i,n),!1;case 1:if(r=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(fr===null||!fr.has(h))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Gp(f),Vp(f,n,i,o),Xu(i,f),!1}i=i.return}while(i!==null);return!1}var wc=Error(a(461)),Xe=!1;function dt(n,r,i,o){r.child=n===null?Qd(r,null,i,o):Qr(r,n.child,i,o)}function Kp(n,r,i,o,f){i=i.render;var h=r.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Vr(r),o=rc(n,r,i,v,h,f),S=sc(),n!==null&&!Xe?(ic(n,r,f),Nn(n,r,f)):(ve&&S&&Pu(r),r.flags|=1,dt(n,r,o,f),r.child)}function Yp(n,r,i,o,f){if(n===null){var h=i.type;return typeof h=="function"&&!Uu(h)&&h.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=h,Fp(n,r,h,o,f)):(n=fo(i.type,null,o,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(h=n.child,!kc(n,f)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Mi,i(v,o)&&n.ref===r.ref)return Nn(n,r,f)}return r.flags|=1,n=An(h,o),n.ref=r.ref,n.return=r,r.child=n}function Fp(n,r,i,o,f){if(n!==null){var h=n.memoizedProps;if(Mi(h,o)&&n.ref===r.ref)if(Xe=!1,r.pendingProps=o=h,kc(n,f))(n.flags&131072)!==0&&(Xe=!0);else return r.lanes=n.lanes,Nn(n,r,f)}return Ec(n,r,i,o,f)}function Qp(n,r,i,o){var f=o.children,h=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,n!==null){for(o=r.child=n.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~h}else o=0,r.child=null;return Jp(n,r,h,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&mo(r,h!==null?h.cachePool:null),h!==null?Zd(r,h):Wu(),Wd(r);else return o=r.lanes=536870912,Jp(n,r,h!==null?h.baseLanes|i:i,i,o)}else h!==null?(mo(r,h.cachePool),Zd(r,h),or(),r.memoizedState=null):(n!==null&&mo(r,null),Wu(),or());return dt(n,r,f,i),r.child}function Fi(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Jp(n,r,i,o,f){var h=Yu();return h=h===null?null:{parent:Qe._currentValue,pool:h},r.memoizedState={baseLanes:i,cachePool:h},n!==null&&mo(r,null),Wu(),Wd(r),n!==null&&Ns(n,r,o,!0),r.childLanes=f,null}function No(n,r){return r=Do({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Xp(n,r,i){return Qr(r,n.child,null,i),n=No(r,r.pendingProps),n.flags|=2,zt(r),r.memoizedState=null,n}function C_(n,r,i){var o=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ve){if(o.mode==="hidden")return n=No(r,o),r.lanes=536870912,Fi(null,n);if(tc(r),(n=Pe)?(n=um(n,Ft),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Wn!==null?{id:fn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},i=Dd(n),i.return=r,r.child=i,ft=r,Pe=null)):n=null,n===null)throw tr(r);return r.lanes=536870912,null}return No(r,o)}var h=n.memoizedState;if(h!==null){var v=h.dehydrated;if(tc(r),f)if(r.flags&256)r.flags&=-257,r=Xp(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(Xe||Ns(n,r,i,!1),f=(i&n.childLanes)!==0,Xe||f){if(o=Me,o!==null&&(v=Hh(o,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Hr(n,v),Ot(o,n,v),wc;$o(),r=Xp(n,r,i)}else n=h.treeContext,Pe=Jt(v.nextSibling),ft=r,ve=!0,er=null,Ft=!1,n!==null&&zd(r,n),r=No(r,o),r.flags|=4096;return r}return n=An(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Mo(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Ec(n,r,i,o,f){return Vr(r),i=rc(n,r,i,o,void 0,f),o=sc(),n!==null&&!Xe?(ic(n,r,f),Nn(n,r,f)):(ve&&o&&Pu(r),r.flags|=1,dt(n,r,i,f),r.child)}function Zp(n,r,i,o,f,h){return Vr(r),r.updateQueue=null,i=tp(r,o,i,f),ep(n),o=sc(),n!==null&&!Xe?(ic(n,r,h),Nn(n,r,h)):(ve&&o&&Pu(r),r.flags|=1,dt(n,r,i,h),r.child)}function Wp(n,r,i,o,f){if(Vr(r),r.stateNode===null){var h=Cs,v=i.contextType;typeof v=="object"&&v!==null&&(h=ht(v)),h=new i(o,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=_c,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=o,h.state=r.memoizedState,h.refs={},Qu(r),v=i.contextType,h.context=typeof v=="object"&&v!==null?ht(v):Cs,h.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(bc(r,i,v,o),h.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&_c.enqueueReplaceState(h,h.state,null),$i(r,o,h,f),qi(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){h=r.stateNode;var S=r.memoizedProps,A=Xr(i,S);h.props=A;var D=h.context,B=i.contextType;v=Cs,typeof B=="object"&&B!==null&&(v=ht(B));var q=i.getDerivedStateFromProps;B=typeof q=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,B||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||D!==v)&&Bp(r,h,o,v),rr=!1;var U=r.memoizedState;h.state=U,$i(r,o,h,f),qi(),D=r.memoizedState,S||U!==D||rr?(typeof q=="function"&&(bc(r,i,q,o),D=r.memoizedState),(A=rr||Pp(r,i,A,o,U,D,v))?(B||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=D),h.props=o,h.state=D,h.context=v,o=A):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{h=r.stateNode,Ju(n,r),v=r.memoizedProps,B=Xr(i,v),h.props=B,q=r.pendingProps,U=h.context,D=i.contextType,A=Cs,typeof D=="object"&&D!==null&&(A=ht(D)),S=i.getDerivedStateFromProps,(D=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==q||U!==A)&&Bp(r,h,o,A),rr=!1,U=r.memoizedState,h.state=U,$i(r,o,h,f),qi();var L=r.memoizedState;v!==q||U!==L||rr||n!==null&&n.dependencies!==null&&po(n.dependencies)?(typeof S=="function"&&(bc(r,i,S,o),L=r.memoizedState),(B=rr||Pp(r,i,B,o,U,L,A)||n!==null&&n.dependencies!==null&&po(n.dependencies))?(D||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,L,A),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,L,A)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=L),h.props=o,h.state=L,h.context=A,o=B):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),o=!1)}return h=o,Mo(n,r),o=(r.flags&128)!==0,h||o?(h=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,n!==null&&o?(r.child=Qr(r,n.child,null,f),r.child=Qr(r,null,i,f)):dt(n,r,i,f),r.memoizedState=h.state,n=r.child):n=Nn(n,r,f),n}function eg(n,r,i,o){return $r(),r.flags|=256,dt(n,r,i,o),r.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rc(n){return{baseLanes:n,cachePool:$d()}}function Ac(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=Bt),n}function tg(n,r,i){var o=r.pendingProps,f=!1,h=(r.flags&128)!==0,v;if((v=h)||(v=n!==null&&n.memoizedState===null?!1:(Ye.current&2)!==0),v&&(f=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(ve){if(f?ar(r):or(),(n=Pe)?(n=um(n,Ft),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Wn!==null?{id:fn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},i=Dd(n),i.return=r,r.child=i,ft=r,Pe=null)):n=null,n===null)throw tr(r);return uf(n)?r.lanes=32:r.lanes=536870912,null}var S=o.children;return o=o.fallback,f?(or(),f=r.mode,S=Do({mode:"hidden",children:S},f),o=qr(o,f,i,null),S.return=r,o.return=r,S.sibling=o,r.child=S,o=r.child,o.memoizedState=Rc(i),o.childLanes=Ac(n,v,i),r.memoizedState=Tc,Fi(null,o)):(ar(r),Oc(r,S))}var A=n.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(h)r.flags&256?(ar(r),r.flags&=-257,r=Cc(n,r,i)):r.memoizedState!==null?(or(),r.child=n.child,r.flags|=128,r=null):(or(),S=o.fallback,f=r.mode,o=Do({mode:"visible",children:o.children},f),S=qr(S,f,i,null),S.flags|=2,o.return=r,S.return=r,o.sibling=S,r.child=o,Qr(r,n.child,null,i),o=r.child,o.memoizedState=Rc(i),o.childLanes=Ac(n,v,i),r.memoizedState=Tc,r=Fi(null,o));
vendor: 5,561 bytes, line 9
9else if(ar(r),uf(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var D=v.dgst;v=D,o=Error(a(419)),o.stack="",o.digest=v,Li({value:o,source:null,stack:null}),r=Cc(n,r,i)}else if(Xe||Ns(n,r,i,!1),v=(i&n.childLanes)!==0,Xe||v){if(v=Me,v!==null&&(o=Hh(v,i),o!==0&&o!==A.retryLane))throw A.retryLane=o,Hr(n,o),Ot(v,n,o),wc;lf(S)||$o(),r=Cc(n,r,i)}else lf(S)?(r.flags|=192,r.child=n.child,r=null):(n=A.treeContext,Pe=Jt(S.nextSibling),ft=r,ve=!0,er=null,Ft=!1,n!==null&&zd(r,n),r=Oc(r,o.children),r.flags|=4096);return r}return f?(or(),S=o.fallback,f=r.mode,A=n.child,D=A.sibling,o=An(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,D!==null?S=An(D,S):(S=qr(S,f,i,null),S.flags|=2),S.return=r,o.return=r,o.sibling=S,r.child=o,Fi(null,o),o=r.child,S=n.child.memoizedState,S===null?S=Rc(i):(f=S.cachePool,f!==null?(A=Qe._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=$d(),S={baseLanes:S.baseLanes|i,cachePool:f}),o.memoizedState=S,o.childLanes=Ac(n,v,i),r.memoizedState=Tc,Fi(n.child,o)):(ar(r),i=n.child,n=i.sibling,i=An(i,{mode:"visible",children:o.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function Oc(n,r){return r=Do({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Do(n,r){return n=Ut(22,n,null,r),n.lanes=0,n}function Cc(n,r,i){return Qr(r,n.child,null,i),n=Oc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function ng(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),$u(n.return,r,i)}function xc(n,r,i,o,f,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:f,treeForkCount:h}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=f,v.treeForkCount=h)}function rg(n,r,i){var o=r.pendingProps,f=o.revealOrder,h=o.tail;o=o.children;var v=Ye.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,Q(Ye,v),dt(n,r,o,i),o=ve?Ui:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&ng(n,i,r);else if(n.tag===19)ng(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(i=r.child,f=null;i!==null;)n=i.alternate,n!==null&&wo(n)===null&&(f=i),i=i.sibling;i=f,i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null),xc(r,!1,f,i,h,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&wo(n)===null){r.child=f;break}n=f.sibling,f.sibling=i,i=f,f=n}xc(r,!0,i,null,h,o);break;case"together":xc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Nn(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),cr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(Ns(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=An(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=An(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function kc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&po(n)))}function x_(n,r,i){switch(r.tag){case 3:Ke(r,r.stateNode.containerInfo),nr(r,Qe,n.memoizedState.cache),$r();break;case 27:case 5:_n(r);break;case 4:Ke(r,r.stateNode.containerInfo);break;case 10:nr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,tc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(ar(r),r.flags|=128,null):(i&r.child.childLanes)!==0?tg(n,r,i):(ar(r),n=Nn(n,r,i),n!==null?n.sibling:null);ar(r);break;case 19:var f=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(Ns(n,r,i,!1),o=(i&r.childLanes)!==0),f){if(o)return rg(n,r,i);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Q(Ye,Ye.current),o)break;return null;case 22:return r.lanes=0,Qp(n,r,i,r.pendingProps);case 24:nr(r,Qe,n.memoizedState.cache)}return Nn(n,r,i)}function sg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)Xe=!0;else{if(!kc(n,i)&&(r.flags&128)===0)return Xe=!1,x_(n,r,i);Xe=(n.flags&131072)!==0}else Xe=!1,ve&&(r.flags&1048576)!==0&&Ld(r,Ui,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Yr(r.elementType),r.type=n,typeof n=="function")Uu(n)?(o=Xr(n,o),r.tag=1,r=Wp(null,r,n,o,i)):(r.tag=0,r=Ec(null,r,n,o,i));else{if(n!=null){var f=n.$$typeof;if(f===M){r.tag=11,r=Kp(null,r,n,o,i);break e}else if(f===P){r.tag=14,r=Yp(null,r,n,o,i);break e}}throw r=Ve(n)||n,Error(a(306,r,""))}}return r;case 0:return Ec(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,f=Xr(o,r.pendingProps),Wp(n,r,o,f,i);case 3:e:{if(Ke(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var h=r.memoizedState;f=h.element,Ju(n,r),$i(r,o,null,i);var v=r.memoizedState;if(o=v.cache,nr(r,Qe,o),o!==h.cache&&Gu(r,[Qe],i,!0),qi(),o=v.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=eg(n,r,o,i);break e}else if(o!==f){f=Vt(Error(a(424)),r),Li(f),r=eg(n,r,o,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Pe=Jt(n.firstChild),ft=r,ve=!0,er=null,Ft=!0,i=Qd(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if($r(),o===f){r=Nn(n,r,i);break e}
vendor: 5,097 bytes, line 9
9dt(n,r,o,i)}r=r.child}return r;case 26:return Mo(n,r),n===null?(i=gm(r.type,null,r.pendingProps,null))?r.memoizedState=i:ve||(i=r.type,n=r.pendingProps,o=Jo(he.current).createElement(i),o[ct]=r,o[St]=n,pt(o,i,n),it(o),r.stateNode=o):r.memoizedState=gm(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return _n(r),n===null&&ve&&(o=r.stateNode=hm(r.type,r.pendingProps,he.current),ft=r,Ft=!0,f=Pe,gr(r.type)?(cf=f,Pe=Jt(o.firstChild)):Pe=f),dt(n,r,r.pendingProps.children,i),Mo(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ve&&((f=o=Pe)&&(o=iS(o,r.type,r.pendingProps,Ft),o!==null?(r.stateNode=o,ft=r,Pe=Jt(o.firstChild),Ft=!1,f=!0):f=!1),f||tr(r)),_n(r),f=r.type,h=r.pendingProps,v=n!==null?n.memoizedProps:null,o=h.children,sf(f,h)?o=null:v!==null&&sf(f,v)&&(r.flags|=32),r.memoizedState!==null&&(f=rc(n,r,__,null,null,i),ua._currentValue=f),Mo(n,r),dt(n,r,o,i),r.child;case 6:return n===null&&ve&&((n=i=Pe)&&(i=aS(i,r.pendingProps,Ft),i!==null?(r.stateNode=i,ft=r,Pe=null,n=!0):n=!1),n||tr(r)),null;case 13:return tg(n,r,i);case 4:return Ke(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Qr(r,null,o,i):dt(n,r,o,i),r.child;case 11:return Kp(n,r,r.type,r.pendingProps,i);case 7:return dt(n,r,r.pendingProps,i),r.child;case 8:return dt(n,r,r.pendingProps.children,i),r.child;case 12:return dt(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,nr(r,r.type,o.value),dt(n,r,o.children,i),r.child;case 9:return f=r.type._context,o=r.pendingProps.children,Vr(r),f=ht(f),o=o(f),r.flags|=1,dt(n,r,o,i),r.child;case 14:return Yp(n,r,r.type,r.pendingProps,i);case 15:return Fp(n,r,r.type,r.pendingProps,i);case 19:return rg(n,r,i);case 31:return C_(n,r,i);case 22:return Qp(n,r,i,r.pendingProps);case 24:return Vr(r),o=ht(Qe),n===null?(f=Yu(),f===null&&(f=Me,h=Vu(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=i),f=h),r.memoizedState={parent:o,cache:f},Qu(r),nr(r,Qe,f)):((n.lanes&i)!==0&&(Ju(n,r),$i(r,null,null,i),qi()),f=n.memoizedState,h=r.memoizedState,f.parent!==o?(f={parent:o,cache:o},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),nr(r,Qe,o)):(o=h.cache,nr(r,Qe,o),o!==f.cache&&Gu(r,[Qe],i,!0))),dt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Mn(n){n.flags|=4}function jc(n,r,i,o,f){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(jg())n.flags|=8192;else throw Fr=vo,Fu}else n.flags&=-16777217}function ig(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!_m(r))if(jg())n.flags|=8192;else throw Fr=vo,Fu}function Uo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ph():536870912,n.lanes|=r,Gs|=r)}function Qi(n,r){if(!ve)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function Be(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var f=n.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function k_(n,r,i){var o=r.pendingProps;switch(Bu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(r),null;case 1:return Be(r),null;case 3:return i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),xn(Qe),Ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(js(r)?Mn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Hu())),Be(r),null;case 26:var f=r.type,h=r.memoizedState;return n===null?(Mn(r),h!==null?(Be(r),ig(r,h)):(Be(r),jc(r,f,null,o,i))):h?h!==n.memoizedState?(Mn(r),Be(r),ig(r,h)):(Be(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&Mn(r),Be(r),jc(r,f,n,o,i)),null;case 27:if(Sn(r),i=he.current,f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Mn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Be(r),null}n=X.current,js(r)?Pd(r):(n=hm(f,o,i),r.stateNode=n,Mn(r))}return Be(r),null;case 5:if(Sn(r),f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Mn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Be(r),null}if(h=X.current,js(r))Pd(r);else{var v=Jo(he.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;
vendor: 3,131 bytes, line 9
9case"select":h=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?v.createElement(f,{is:o.is}):v.createElement(f)}}h[ct]=r,h[St]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=h;e:switch(pt(h,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Mn(r)}}return Be(r),jc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&Mn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=he.current,js(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,f=ft,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}n[ct]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||tm(n.nodeValue,i)),n||tr(r,!0)}else n=Jo(n).createTextNode(o),n[ct]=r,r.stateNode=n}return Be(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=js(r),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[ct]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),n=!1}else i=Hu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(zt(r),r):(zt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Be(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=js(r),o!==null&&o.dehydrated!==null){if(n===null){if(!f)throw Error(a(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[ct]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),f=!1}else f=Hu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(zt(r),r):(zt(r),null)}return zt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==f&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),Uo(r,r.updateQueue),Be(r),null);case 4:return Ne(),n===null&&Wc(r.stateNode.containerInfo),Be(r),null;case 10:return xn(r.type),Be(r),null;case 19:if(H(Ye),o=r.memoizedState,o===null)return Be(r),null;if(f=(r.flags&128)!==0,h=o.rendering,h===null)if(f)Qi(o,!1);else{if($e!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(h=wo(n),h!==null){for(r.flags|=128,Qi(o,!1),n=h.updateQueue,r.updateQueue=n,Uo(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)Md(i,n),i=i.sibling;return Q(Ye,Ye.current&1|2),ve&&On(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&mt()>
vendor: 7,217 bytes, line 9
9Io&&(r.flags|=128,f=!0,Qi(o,!1),r.lanes=4194304)}else{if(!f)if(n=wo(h),n!==null){if(r.flags|=128,f=!0,n=n.updateQueue,r.updateQueue=n,Uo(r,n),Qi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!h.alternate&&!ve)return Be(r),null}else 2*mt()-o.renderingStartTime>Io&&i!==536870912&&(r.flags|=128,f=!0,Qi(o,!1),r.lanes=4194304);o.isBackwards?(h.sibling=r.child,r.child=h):(n=o.last,n!==null?n.sibling=h:r.child=h,o.last=h)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=mt(),n.sibling=null,i=Ye.current,Q(Ye,f?i&1|2:i&1),ve&&On(r,o.treeForkCount),n):(Be(r),null);case 22:case 23:return zt(r),ec(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(i&536870912)!==0&&(r.flags&128)===0&&(Be(r),r.subtreeFlags&6&&(r.flags|=8192)):Be(r),i=r.updateQueue,i!==null&&Uo(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048),n!==null&&H(Kr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),xn(Qe),Be(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function j_(n,r){switch(Bu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return xn(Qe),Ne(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Sn(r),null;case 31:if(r.memoizedState!==null){if(zt(r),r.alternate===null)throw Error(a(340));$r()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(zt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));$r()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return H(Ye),null;case 4:return Ne(),null;case 10:return xn(r.type),null;case 22:case 23:return zt(r),ec(),n!==null&&H(Kr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return xn(Qe),null;case 25:return null;default:return null}}function ag(n,r){switch(Bu(r),r.tag){case 3:xn(Qe),Ne();break;case 26:case 27:case 5:Sn(r);break;case 4:Ne();break;case 31:r.memoizedState!==null&&zt(r);break;case 13:zt(r);break;case 19:H(Ye);break;case 10:xn(r.type);break;case 22:case 23:zt(r),ec(),n!==null&&H(Kr);break;case 24:xn(Qe)}}function Ji(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&n)===n){o=void 0;var h=i.create,v=i.inst;o=h(),v.destroy=o}i=i.next}while(i!==f)}}catch(S){Ce(r,r.return,S)}}function lr(n,r,i){try{var o=r.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var h=f.next;o=h;do{if((o.tag&n)===n){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,f=r;var A=i,D=S;try{D()}catch(B){Ce(f,A,B)}}}o=o.next}while(o!==h)}}catch(B){Ce(r,r.return,B)}}function og(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Xd(r,i)}catch(o){Ce(n,n.return,o)}}}function lg(n,r,i){i.props=Xr(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(o){Ce(n,r,o)}}function Xi(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(f){Ce(n,r,f)}}function dn(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(f){Ce(n,r,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ce(n,r,f)}else i.current=null}function ug(n){var r=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(f){Ce(n,n.return,f)}}function Nc(n,r,i){try{var o=n.stateNode;W_(o,n.type,i,r),o[St]=r}catch(f){Ce(n,n.return,f)}}function cg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&gr(n.type)||n.tag===4}function Mc(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&&gr(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 Dc(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Tn));else if(o!==4&&(o===27&&gr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(Dc(n,r,i),n=n.sibling;n!==null;)Dc(n,r,i),n=n.sibling}function Lo(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(o!==4&&(o===27&&gr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Lo(n,r,i),n=n.sibling;n!==null;)Lo(n,r,i),n=n.sibling}function fg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);pt(r,o,i),r[ct]=n,r[St]=i}catch(h){Ce(n,n.return,h)}}var Dn=!1,Ze=!1,Uc=!1,hg=typeof WeakSet=="function"?WeakSet:Set,at=null;function N_(n,r){if(n=n.containerInfo,nf=rl,n=Td(n),Cu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var f=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,S=-1,A=-1,D=0,B=0,q=n,U=null;t:for(;;){for(var L;q!==i||f!==0&&q.nodeType!==3||(S=v+f),q!==h||o!==0&&q.nodeType!==3||(A=v+o),q.nodeType===3&&(v+=q.nodeValue.length),(L=q.firstChild)!==null;)U=q,q=L;for(;;){if(q===n)break t;if(U===i&&++D===f&&(S=v),U===h&&++B===o&&(A=v),(L=q.nextSibling)!==null)break;q=U,U=q.parentNode}q=L}i=S===-1||A===-1?null:{start:S,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(rf={focusedElem:n,selectionRange:i},rl=!1,at=r;at!==null;)if(r=at,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,at=n;else for(;at!==null;){switch(r=at,h=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)f=n[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,i=r,f=h.memoizedProps,h=h.memoizedState,o=i.stateNode;try{var Z=Xr(i.type,f);n=o.getSnapshotBeforeUpdate(Z,h),o.__reactInternalSnapshotBeforeUpdate=n}catch(oe){Ce(i,i.return,oe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)of(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":of(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(a(163))}if(n=r.sibling,n!==null){n.return=r.return,at=n;break}at=r.return}}function dg(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Ln(n,i),o&4&&Ji(5,i);break;case 1:if(Ln(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){Ce(i,i.return,v)}else{var f=Xr(i.type,r.memoizedProps);r=r.memoizedState;
vendor: 14,394 bytes, line 9
9try{n.componentDidUpdate(f,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ce(i,i.return,v)}}o&64&&og(i),o&512&&Xi(i,i.return);break;case 3:if(Ln(n,i),o&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Xd(n,r)}catch(v){Ce(i,i.return,v)}}break;case 27:r===null&&o&4&&fg(i);case 26:case 5:Ln(n,i),r===null&&o&4&&ug(i),o&512&&Xi(i,i.return);break;case 12:Ln(n,i);break;case 31:Ln(n,i),o&4&&mg(n,i);break;case 13:Ln(n,i),o&4&&yg(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=H_.bind(null,i),oS(n,i))));break;case 22:if(o=i.memoizedState!==null||Dn,!o){r=r!==null&&r.memoizedState!==null||Ze,f=Dn;var h=Ze;Dn=o,(Ze=r)&&!h?zn(n,i,(i.subtreeFlags&8772)!==0):Ln(n,i),Dn=f,Ze=h}break;case 30:break;default:Ln(n,i)}}function pg(n){var r=n.alternate;r!==null&&(n.alternate=null,pg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&fu(r)),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 Ie=null,Et=!1;function Un(n,r,i){for(i=i.child;i!==null;)gg(n,r,i),i=i.sibling}function gg(n,r,i){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Si,i)}catch{}switch(i.tag){case 26:Ze||dn(i,r),Un(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ze||dn(i,r);var o=Ie,f=Et;gr(i.type)&&(Ie=i.stateNode,Et=!1),Un(n,r,i),aa(i.stateNode),Ie=o,Et=f;break;case 5:Ze||dn(i,r);case 6:if(o=Ie,f=Et,Ie=null,Un(n,r,i),Ie=o,Et=f,Ie!==null)if(Et)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(i.stateNode)}catch(h){Ce(i,r,h)}else try{Ie.removeChild(i.stateNode)}catch(h){Ce(i,r,h)}break;case 18:Ie!==null&&(Et?(n=Ie,om(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Zs(n)):om(Ie,i.stateNode));break;case 4:o=Ie,f=Et,Ie=i.stateNode.containerInfo,Et=!0,Un(n,r,i),Ie=o,Et=f;break;case 0:case 11:case 14:case 15:lr(2,i,r),Ze||lr(4,i,r),Un(n,r,i);break;case 1:Ze||(dn(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&lg(i,r,o)),Un(n,r,i);break;case 21:Un(n,r,i);break;case 22:Ze=(o=Ze)||i.memoizedState!==null,Un(n,r,i),Ze=o;break;default:Un(n,r,i)}}function mg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Zs(n)}catch(i){Ce(r,r.return,i)}}}function yg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Zs(n)}catch(i){Ce(r,r.return,i)}}function M_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new hg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new hg),r;default:throw Error(a(435,n.tag))}}function zo(n,r){var i=M_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var f=q_.bind(null,n,o);o.then(f,f)}})}function Tt(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var f=i[o],h=n,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(gr(S.type)){Ie=S.stateNode,Et=!1;break e}break;case 5:Ie=S.stateNode,Et=!1;break e;case 3:case 4:Ie=S.stateNode.containerInfo,Et=!0;break e}S=S.return}if(Ie===null)throw Error(a(160));gg(h,v,f),Ie=null,Et=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)vg(r,n),r=r.sibling}var nn=null;function vg(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Tt(r,n),Rt(n),o&4&&(lr(3,n,n.return),Ji(3,n),lr(5,n,n.return));break;case 1:Tt(r,n),Rt(n),o&512&&(Ze||i===null||dn(i,i.return)),o&64&&Dn&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var f=nn;if(Tt(r,n),Rt(n),o&512&&(Ze||i===null||dn(i,i.return)),o&4){var h=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Ti]||h[ct]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(o),f.head.insertBefore(h,f.querySelector("head > title"))),pt(h,o,i),h[ct]=n,it(h),o=h;break e;case"link":var v=vm("link","href",f).get(o+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(h=v[S],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}h=f.createElement(o),pt(h,o,i),f.head.appendChild(h);break;case"meta":if(v=vm("meta","content",f).get(o+(i.content||""))){for(S=0;S<v.length;S++)if(h=v[S],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}h=f.createElement(o),pt(h,o,i),f.head.appendChild(h);break;default:throw Error(a(468,o))}h[ct]=n,it(h),o=h}n.stateNode=o}else bm(f,n.type,n.stateNode);else n.stateNode=ym(f,o,n.memoizedProps);else h!==o?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,o===null?bm(f,n.type,n.stateNode):ym(f,o,n.memoizedProps)):o===null&&n.stateNode!==null&&Nc(n,n.memoizedProps,i.memoizedProps)}break;case 27:Tt(r,n),Rt(n),o&512&&(Ze||i===null||dn(i,i.return)),i!==null&&o&4&&Nc(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Tt(r,n),Rt(n),o&512&&(Ze||i===null||dn(i,i.return)),n.flags&32){f=n.stateNode;try{Ss(f,"")}catch(Z){Ce(n,n.return,Z)}}o&4&&n.stateNode!=null&&(f=n.memoizedProps,Nc(n,f,i!==null?i.memoizedProps:f)),o&1024&&(Uc=!0);break;case 6:if(Tt(r,n),Rt(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(Z){Ce(n,n.return,Z)}}break;case 3:if(Wo=null,f=nn,nn=Xo(r.containerInfo),Tt(r,n),nn=f,Rt(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Zs(r.containerInfo)}catch(Z){Ce(n,n.return,Z)}Uc&&(Uc=!1,bg(n));break;case 4:o=nn,nn=Xo(n.stateNode.containerInfo),Tt(r,n),Rt(n),nn=o;break;case 12:Tt(r,n),Rt(n);break;case 31:Tt(r,n),Rt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,zo(n,o)));break;case 13:Tt(r,n),Rt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Bo=mt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,zo(n,o)));break;case 22:f=n.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,D=Dn,B=Ze;if(Dn=D||f,Ze=B||A,Tt(r,n),Ze=B,Dn=D,Rt(n),o&8192)e:for(r=n.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(i===null||A||Dn||Ze||Zr(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){A=i=r;try{if(h=A.stateNode,f)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=A.stateNode;var q=A.memoizedProps.style,U=q!=null&&q.hasOwnProperty("display")?q.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(Z){Ce(A,A.return,Z)}}}else if(r.tag===6){if(i===null){A=r;try{A.stateNode.nodeValue=f?"":A.memoizedProps}catch(Z){Ce(A,A.return,Z)}}}else if(r.tag===18){if(i===null){A=r;try{var L=A.stateNode;f?lm(L,!0):lm(A.stateNode,!1)}catch(Z){Ce(A,A.return,Z)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,zo(n,i))));break;case 19:Tt(r,n),Rt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,zo(n,o)));break;case 30:break;case 21:break;default:Tt(r,n),Rt(n)}}function Rt(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(cg(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var f=i.stateNode,h=Mc(n);Lo(n,h,f);break;case 5:var v=i.stateNode;i.flags&32&&(Ss(v,""),i.flags&=-33);var S=Mc(n);Lo(n,S,v);break;case 3:case 4:var A=i.stateNode.containerInfo,D=Mc(n);Dc(n,D,A);break;default:throw Error(a(161))}}catch(B){Ce(n,n.return,B)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function bg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;bg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Ln(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)dg(n,r.alternate,r),r=r.sibling}function Zr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:lr(4,r,r.return),Zr(r);break;case 1:dn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&lg(r,r.return,i),Zr(r);break;case 27:aa(r.stateNode);case 26:case 5:dn(r,r.return),Zr(r);break;case 22:r.memoizedState===null&&Zr(r);break;case 30:Zr(r);break;default:Zr(r)}n=n.sibling}}function zn(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,f=n,h=r,v=h.flags;switch(h.tag){case 0:case 11:case 15:zn(f,h,i),Ji(4,h);break;case 1:if(zn(f,h,i),o=h,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(D){Ce(o,o.return,D)}if(o=h,f=o.updateQueue,f!==null){var S=o.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)Jd(A[f],S)}catch(D){Ce(o,o.return,D)}}i&&v&64&&og(h),Xi(h,h.return);break;case 27:fg(h);case 26:case 5:zn(f,h,i),i&&o===null&&v&4&&ug(h),Xi(h,h.return);break;case 12:zn(f,h,i);break;case 31:zn(f,h,i),i&&v&4&&mg(f,h);break;case 13:zn(f,h,i),i&&v&4&&yg(f,h);break;case 22:h.memoizedState===null&&zn(f,h,i),Xi(h,h.return);break;case 30:break;default:zn(f,h,i)}r=r.sibling}}function Lc(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&zi(i))}function zc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&zi(n))}function rn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_g(n,r,i,o),r=r.sibling}function _g(n,r,i,o){var f=r.flags;switch(r.tag){case 0:case 11:case 15:rn(n,r,i,o),f&2048&&Ji(9,r);break;case 1:rn(n,r,i,o);break;case 3:rn(n,r,i,o),f&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&zi(n)));break;case 12:if(f&2048){rn(n,r,i,o),n=r.stateNode;try{var h=r.memoizedProps,v=h.id,S=h.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(A){Ce(r,r.return,A)}}else rn(n,r,i,o);break;case 31:rn(n,r,i,o);break;case 13:rn(n,r,i,o);break;case 23:break;case 22:h=r.stateNode,v=r.alternate,r.memoizedState!==null?h._visibility&2?rn(n,r,i,o):Zi(n,r):h._visibility&2?rn(n,r,i,o):(h._visibility|=2,Hs(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),f&2048&&Lc(v,r);break;case 24:rn(n,r,i,o),f&2048&&zc(r.alternate,r);break;default:rn(n,r,i,o)}}function Hs(n,r,i,o,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var h=n,v=r,S=i,A=o,D=v.flags;switch(v.tag){case 0:case 11:case 15:Hs(h,v,S,A,f),Ji(8,v);break;case 23:break;case 22:var B=v.stateNode;v.memoizedState!==null?B._visibility&2?Hs(h,v,S,A,f):Zi(h,v):(B._visibility|=2,Hs(h,v,S,A,f)),f&&D&2048&&Lc(v.alternate,v);break;case 24:Hs(h,v,S,A,f),f&&D&2048&&zc(v.alternate,v);break;default:Hs(h,v,S,A,f)}r=r.sibling}}function Zi(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,f=o.flags;switch(o.tag){case 22:Zi(i,o),f&2048&&Lc(o.alternate,o);break;case 24:Zi(i,o),f&2048&&zc(o.alternate,o);break;default:Zi(i,o)}r=r.sibling}}var Wi=8192;function qs(n,r,i){if(n.subtreeFlags&Wi)for(n=n.child;n!==null;)Sg(n,r,i),n=n.sibling}function Sg(n,r,i){switch(n.tag){case 26:qs(n,r,i),n.flags&Wi&&n.memoizedState!==null&&bS(i,nn,n.memoizedState,n.memoizedProps);break;case 5:qs(n,r,i);break;case 3:case 4:var o=nn;nn=Xo(n.stateNode.containerInfo),qs(n,r,i),nn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=Wi,Wi=16777216,qs(n,r,i),Wi=o):qs(n,r,i));break;default:qs(n,r,i)}}function wg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function ea(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];at=o,Tg(o,n)}wg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Eg(n),n=n.sibling}function Eg(n){switch(n.tag){case 0:case 11:case 15:ea(n),n.flags&2048&&lr(9,n,n.return);break;case 3:ea(n);break;case 12:ea(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Po(n)):ea(n);break;default:ea(n)}}function Po(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];at=o,Tg(o,n)}wg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:lr(8,r,r.return),Po(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Po(r));break;default:Po(r)}n=n.sibling}}function Tg(n,r){for(;at!==null;){var i=at;switch(i.tag){case 0:case 11:case 15:lr(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:zi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,at=o;else e:for(i=n;at!==null;){o=at;var f=o.sibling,h=o.return;if(pg(o),o===i){at=null;break e}if(f!==null){f.return=h,at=f;break e}at=h}}}var D_={getCacheForType:function(n){var r=ht(Qe),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return ht(Qe).controller.signal}},U_=typeof WeakMap=="function"?WeakMap:Map,Te=0,Me=null,de=null,me=0,Oe=0,Pt=null,ur=!1,$s=!1,Pc=!1,Pn=0,$e=0,cr=0,Wr=0,Bc=0,Bt=0,Gs=0,ta=null,At=null,Ic=!1,Bo=0,Rg=0,Io=1/0,Ho=null,fr=null,nt=0,hr=null,Vs=null,Bn=0,Hc=0,qc=null,Ag=null,na=0,$c=null;function It(){return(Te&2)!==0&&me!==0?me&-me:z.T!==null?Qc():qh()}function Og(){if(Bt===0)if((me&536870912)===0||ve){var n=Fa;
vendor: 14,452 bytes, line 9
9Fa<<=1,(Fa&3932160)===0&&(Fa=262144),Bt=n}else Bt=536870912;return n=Lt.current,n!==null&&(n.flags|=32),Bt}function Ot(n,r,i){(n===Me&&(Oe===2||Oe===9)||n.cancelPendingCommit!==null)&&(Ks(n,0),dr(n,me,Bt,!1)),Ei(n,i),((Te&2)===0||n!==Me)&&(n===Me&&((Te&2)===0&&(Wr|=i),$e===4&&dr(n,me,Bt,!1)),pn(n))}function Cg(n,r,i){if((Te&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||wi(n,r),f=o?P_(n,r):Vc(n,r,!0),h=o;do{if(f===0){$s&&!o&&dr(n,r,0,!1);break}else{if(i=n.current.alternate,h&&!L_(i)){f=Vc(n,r,!1),h=!1;continue}if(f===2){if(h=r,n.errorRecoveryDisabledLanes&h)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=n;f=ta;var A=S.current.memoizedState.isDehydrated;if(A&&(Ks(S,v).flags|=256),v=Vc(S,v,!1),v!==2){if(Pc&&!A){S.errorRecoveryDisabledLanes|=h,Wr|=h,f=4;break e}h=At,At=f,h!==null&&(At===null?At=h:At.push.apply(At,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){Ks(n,0),dr(n,r,0,!0);break}e:{switch(o=n,h=f,h){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:dr(o,r,Bt,!ur);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(f=Bo+300-mt(),10<f)){if(dr(o,r,Bt,!ur),Ja(o,0,!0)!==0)break e;Bn=r,o.timeoutHandle=im(xg.bind(null,o,i,At,Ho,Ic,r,Bt,Wr,Gs,ur,h,"Throttled",-0,0),f);break e}xg(o,i,At,Ho,Ic,r,Bt,Wr,Gs,ur,h,null,-0,0)}}break}while(!0);pn(n)}function xg(n,r,i,o,f,h,v,S,A,D,B,q,U,L){if(n.timeoutHandle=-1,q=r.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},Sg(r,h,q);var Z=(h&62914560)===h?Bo-mt():(h&4194048)===h?Rg-mt():0;if(Z=_S(q,Z),Z!==null){Bn=h,n.cancelPendingCommit=Z(zg.bind(null,n,r,h,i,o,f,v,S,A,B,q,null,U,L)),dr(n,h,v,!D);return}}zg(n,r,h,i,o,f,v,S,A)}function L_(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var f=i[o],h=f.getSnapshot;f=f.value;try{if(!Dt(h(),f))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function dr(n,r,i,o){r&=~Bc,r&=~Wr,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var f=r;0<f;){var h=31-Mt(f),v=1<<h;o[h]=-1,f&=~v}i!==0&&Bh(n,i,r)}function qo(){return(Te&6)===0?(ra(0),!1):!0}function Gc(){if(de!==null){if(Oe===0)var n=de.return;else n=de,Cn=Gr=null,ac(n),Ls=null,Bi=0,n=de;for(;n!==null;)ag(n.alternate,n),n=n.return;de=null}}function Ks(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,nS(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Bn=0,Gc(),Me=n,de=i=An(n.current,null),me=r,Oe=0,Pt=null,ur=!1,$s=wi(n,r),Pc=!1,Gs=Bt=Bc=Wr=cr=$e=0,At=ta=null,Ic=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var f=31-Mt(o),h=1<<f;r|=n[f],o&=~h}return Pn=r,lo(),i}function kg(n,r){ce=null,z.H=Yi,r===Us||r===yo?(r=Kd(),Oe=3):r===Fu?(r=Kd(),Oe=4):Oe=r===wc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Pt=r,de===null&&($e=1,jo(n,Vt(r,n.current)))}function jg(){var n=Lt.current;return n===null?!0:(me&4194048)===me?Qt===null:(me&62914560)===me||(me&536870912)!==0?n===Qt:!1}function Ng(){var n=z.H;return z.H=Yi,n===null?Yi:n}function Mg(){var n=z.A;return z.A=D_,n}function $o(){$e=4,ur||(me&4194048)!==me&&Lt.current!==null||($s=!0),(cr&134217727)===0&&(Wr&134217727)===0||Me===null||dr(Me,me,Bt,!1)}function Vc(n,r,i){var o=Te;Te|=2;var f=Ng(),h=Mg();(Me!==n||me!==r)&&(Ho=null,Ks(n,r)),r=!1;var v=$e;e:do try{if(Oe!==0&&de!==null){var S=de,A=Pt;switch(Oe){case 8:Gc(),v=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(r=!0);var D=Oe;if(Oe=0,Pt=null,Ys(n,S,A,D),i&&$s){v=0;break e}break;default:D=Oe,Oe=0,Pt=null,Ys(n,S,A,D)}}z_(),v=$e;break}catch(B){kg(n,B)}while(!0);return r&&n.shellSuspendCounter++,Cn=Gr=null,Te=o,z.H=f,z.A=h,de===null&&(Me=null,me=0,lo()),v}function z_(){for(;de!==null;)Dg(de)}function P_(n,r){var i=Te;Te|=2;var o=Ng(),f=Mg();Me!==n||me!==r?(Ho=null,Io=mt()+500,Ks(n,r)):$s=wi(n,r);e:do try{if(Oe!==0&&de!==null){r=de;var h=Pt;t:switch(Oe){case 1:Oe=0,Pt=null,Ys(n,r,h,1);break;case 2:case 9:if(Gd(h)){Oe=0,Pt=null,Ug(r);break}r=function(){Oe!==2&&Oe!==9||Me!==n||(Oe=7),pn(n)},h.then(r,r);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Gd(h)?(Oe=0,Pt=null,Ug(r)):(Oe=0,Pt=null,Ys(n,r,h,7));break;case 5:var v=null;switch(de.tag){case 26:v=de.memoizedState;case 5:case 27:var S=de;if(v?_m(v):S.stateNode.complete){Oe=0,Pt=null;var A=S.sibling;if(A!==null)de=A;else{var D=S.return;D!==null?(de=D,Go(D)):de=null}break t}}Oe=0,Pt=null,Ys(n,r,h,5);break;case 6:Oe=0,Pt=null,Ys(n,r,h,6);break;case 8:Gc(),$e=6;break e;default:throw Error(a(462))}}B_();break}catch(B){kg(n,B)}while(!0);return Cn=Gr=null,z.H=o,z.A=f,Te=i,de!==null?0:(Me=null,me=0,lo(),$e)}function B_(){for(;de!==null&&!Ka();)Dg(de)}function Dg(n){var r=sg(n.alternate,n,Pn);n.memoizedProps=n.pendingProps,r===null?Go(n):de=r}function Ug(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=Zp(i,r,r.pendingProps,r.type,void 0,me);break;case 11:r=Zp(i,r,r.pendingProps,r.type.render,r.ref,me);break;case 5:ac(r);default:ag(i,r),r=de=Md(r,Pn),r=sg(i,r,Pn)}n.memoizedProps=n.pendingProps,r===null?Go(n):de=r}function Ys(n,r,i,o){Cn=Gr=null,ac(r),Ls=null,Bi=0;var f=r.return;try{if(O_(n,f,r,i,me)){$e=1,jo(n,Vt(i,n.current)),de=null;return}}catch(h){if(f!==null)throw de=f,h;$e=1,jo(n,Vt(i,n.current)),de=null;return}r.flags&32768?(ve||o===1?n=!0:$s||(me&536870912)!==0?n=!1:(ur=n=!0,(o===2||o===9||o===3||o===6)&&(o=Lt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lg(r,n)):Go(r)}function Go(n){var r=n;do{if((r.flags&32768)!==0){Lg(r,ur);return}n=r.return;var i=k_(r.alternate,r,Pn);if(i!==null){de=i;return}if(r=r.sibling,r!==null){de=r;return}de=r=n}while(r!==null);$e===0&&($e=5)}function Lg(n,r){do{var i=j_(n.alternate,n);if(i!==null){i.flags&=32767,de=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){de=n;return}de=n=i}while(n!==null);$e=6,de=null}function zg(n,r,i,o,f,h,v,S,A){n.cancelPendingCommit=null;do Vo();while(nt!==0);if((Te&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=Mu,vb(n,i,h,v,S,A),n===Me&&(de=Me=null,me=0),Vs=r,hr=n,Bn=i,Hc=h,qc=f,Ag=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,$_(ps,function(){return qg(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=z.T,z.T=null,f=Y.p,Y.p=2,v=Te,Te|=4;try{N_(n,r,i)}finally{Te=v,Y.p=f,z.T=o}}nt=1,Pg(),Bg(),Ig()}}function Pg(){if(nt===1){nt=0;var n=hr,r=Vs,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var o=Y.p;Y.p=2;var f=Te;Te|=4;try{vg(r,n);var h=rf,v=Td(n.containerInfo),S=h.focusedElem,A=h.selectionRange;if(v!==S&&S&&S.ownerDocument&&Ed(S.ownerDocument.documentElement,S)){if(A!==null&&Cu(S)){var D=A.start,B=A.end;if(B===void 0&&(B=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(B,S.value.length);else{var q=S.ownerDocument||document,U=q&&q.defaultView||window;if(U.getSelection){var L=U.getSelection(),Z=S.textContent.length,oe=Math.min(A.start,Z),je=A.end===void 0?oe:Math.min(A.end,Z);!L.extend&&oe>je&&(v=je,je=oe,oe=v);var j=wd(S,oe),O=wd(S,je);if(j&&O&&(L.rangeCount!==1||L.anchorNode!==j.node||L.anchorOffset!==j.offset||L.focusNode!==O.node||L.focusOffset!==O.offset)){var N=q.createRange();N.setStart(j.node,j.offset),L.removeAllRanges(),oe>je?(L.addRange(N),L.extend(O.node,O.offset)):(N.setEnd(O.node,O.offset),L.addRange(N))}}}}for(q=[],L=S;L=L.parentNode;)L.nodeType===1&&q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<q.length;S++){var I=q[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}rl=!!nf,rf=nf=null}finally{Te=f,Y.p=o,z.T=i}}n.current=r,nt=2}}function Bg(){if(nt===2){nt=0;var n=hr,r=Vs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var o=Y.p;Y.p=2;var f=Te;Te|=4;try{dg(n,r.alternate,r)}finally{Te=f,Y.p=o,z.T=i}}nt=3}}function Ig(){if(nt===4||nt===3){nt=0,au();var n=hr,r=Vs,i=Bn,o=Ag;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?nt=5:(nt=0,Vs=hr=null,Hg(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(fr=null),uu(i),r=r.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Si,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=z.T,f=Y.p,Y.p=2,z.T=null;try{for(var h=n.onRecoverableError,v=0;v<o.length;v++){var S=o[v];h(S.value,{componentStack:S.stack})}}finally{z.T=r,Y.p=f}}(Bn&3)!==0&&Vo(),pn(n),f=n.pendingLanes,(i&261930)!==0&&(f&42)!==0?n===$c?na++:(na=0,$c=n):na=0,ra(0)}}function Hg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,zi(r)))}function Vo(){return Pg(),Bg(),Ig(),qg()}function qg(){if(nt!==5)return!1;var n=hr,r=Hc;Hc=0;var i=uu(Bn),o=z.T,f=Y.p;try{Y.p=32>i?32:i,z.T=null,i=qc,qc=null;var h=hr,v=Bn;if(nt=0,Vs=hr=null,Bn=0,(Te&6)!==0)throw Error(a(331));var S=Te;if(Te|=4,Eg(h.current),_g(h,h.current,v,i),Te=S,ra(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Si,h)}catch{}return!0}finally{Y.p=f,z.T=o,Hg(n,r)}}function $g(n,r,i){r=Vt(i,r),r=Sc(n.stateNode,r,2),n=ir(n,r,2),n!==null&&(Ei(n,2),pn(n))}function Ce(n,r,i){if(n.tag===3)$g(n,n,i);else for(;r!==null;){if(r.tag===3){$g(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(fr===null||!fr.has(o))){n=Vt(i,n),i=Gp(2),o=ir(r,i,2),o!==null&&(Vp(i,o,r,n),Ei(o,2),pn(o));break}}r=r.return}}function Kc(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new U_;var f=new Set;o.set(r,f)}else f=o.get(r),f===void 0&&(f=new Set,o.set(r,f));f.has(i)||(Pc=!0,f.add(i),n=I_.bind(null,n,r,i),r.then(n,n))}function I_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Me===n&&(me&i)===i&&($e===4||$e===3&&(me&62914560)===me&&300>mt()-Bo?(Te&2)===0&&Ks(n,0):Bc|=i,Gs===me&&(Gs=0)),pn(n)}function Gg(n,r){r===0&&(r=Ph()),n=Hr(n,r),n!==null&&(Ei(n,r),pn(n))}function H_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),Gg(n,i)}function q_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,f=n.memoizedState;f!==null&&(i=f.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),Gg(n,i)}function $_(n,r){return en(n,r)}var Ko=null,Fs=null,Yc=!1,Yo=!1,Fc=!1,pr=0;function pn(n){n!==Fs&&n.next===null&&(Fs===null?Ko=Fs=n:Fs=Fs.next=n),Yo=!0,Yc||(Yc=!0,V_())}function ra(n,r){if(!Fc&&Yo){Fc=!0;do for(var i=!1,o=Ko;o!==null;){if(n!==0){var f=o.pendingLanes;if(f===0)var h=0;else{var v=o.suspendedLanes,S=o.pingedLanes;h=(1<<31-Mt(42|n)+1)-1,h&=f&~(v&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Fg(o,h))}else h=me,h=Ja(o,o===Me?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||wi(o,h)||(i=!0,Fg(o,h));o=o.next}while(i);Fc=!1}}function G_(){Vg()}function Vg(){Yo=Yc=!1;var n=0;pr!==0&&tS()&&(n=pr);for(var r=mt(),i=null,o=Ko;o!==null;){var f=o.next,h=Kg(o,r);h===0?(o.next=null,i===null?Ko=f:i.next=f,f===null&&(Fs=i)):(i=o,(n!==0||(h&3)!==0)&&(Yo=!0)),o=f}nt!==0&&nt!==5||ra(n),pr!==0&&(pr=0)}function Kg(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var v=31-Mt(h),S=1<<v,A=f[v];A===-1?((S&i)===0||(S&o)!==0)&&(f[v]=yb(S,r)):A<=r&&(n.expiredLanes|=S),h&=~S}if(r=Me,i=me,i=Ja(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(Oe===2||Oe===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&_i(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||wi(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&_i(o),uu(i)){case 2:case 8:i=cn;break;case 32:i=ps;break;case 268435456:i=zh;break;default:i=ps}return o=Yg.bind(null,n),i=en(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&_i(o),n.callbackPriority=2,n.callbackNode=null,2}function Yg(n,r){if(nt!==0&&nt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Vo()&&n.callbackNode!==i)return null;var o=me;return o=Ja(n,n===Me?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Cg(n,o,r),Kg(n,mt()),n.callbackNode!=null&&n.callbackNode===i?Yg.bind(null,n):null)}function Fg(n,r){if(Vo())return null;Cg(n,r,!0)}function V_(){rS(function(){(Te&6)!==0?en(ut,G_):Vg()})}function Qc(){if(pr===0){var n=Ms;n===0&&(n=Ya,Ya<<=1,(Ya&261888)===0&&(Ya=256)),pr=n}return pr}function Qg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:eo(""+n)}function Jg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function K_(n,r,i,o,f){if(r==="submit"&&i&&i.stateNode===f){var h=Qg((f[St]||null).action),v=o.submitter;v&&(r=(r=v[St]||null)?Qg(r.formAction):v.getAttribute("formAction"),r!==null&&(h=r,v=null));var S=new so("action","action",null,o,f);n.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(pr!==0){var A=v?Jg(f,v):new FormData(f);gc(i,{pending:!0,data:A,method:f.method,action:h},null,A)}}else typeof h=="function"&&(S.preventDefault(),A=v?Jg(f,v):new FormData(f),gc(i,{pending:!0,data:A,method:f.method,action:h},h,A))},currentTarget:f}]})}}for(var Jc=0;Jc<Nu.length;Jc++){var Xc=Nu[Jc],Y_=Xc.toLowerCase(),F_=Xc[0].toUpperCase()+Xc.slice(1);tn(Y_,"on"+F_)}tn(Od,"onAnimationEnd"),tn(Cd,"onAnimationIteration"),tn(xd,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(c_,"onTransitionRun"),tn(f_,"onTransitionStart"),tn(h_,"onTransitionCancel"),tn(kd,"onTransitionEnd"),bs("onMouseEnter",["mouseout","mouseover"]),bs("onMouseLeave",["mouseout","mouseover"]),bs("onPointerEnter",["pointerout","pointerover"]),bs("onPointerLeave",["pointerout","pointerover"]),zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zr("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),zr("onBeforeInput",["compositionend","keypress","textInput","paste"]),zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sa="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(" "),Q_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sa));function Xg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],f=o.event;o=o.listeners;e:{var h=void 0;if(r)for(var v=o.length-1;0<=v;v--){var S=o[v],A=S.instance,D=S.currentTarget;if(S=S.listener,A!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=D;try{h(f)}catch(B){oo(B)}f.currentTarget=null,h=A}else for(v=0;v<o.length;v++){if(S=o[v],A=S.instance,D=S.currentTarget,S=S.listener,A!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=D;try{h(f)}catch(B){oo(B)}f.currentTarget=null,h=A}}}}function pe(n,r){var i=r[cu];i===void 0&&(i=r[cu]=new Set);var o=n+"__bubble";i.has(o)||(Zg(r,n,2,!1),i.add(o))}function Zc(n,r,i){var o=0;r&&(o|=4),Zg(i,n,o,r)}var Fo="_reactListening"+Math.random().toString(36).slice(2);function Wc(n){if(!n[Fo]){n[Fo]=!0,Vh.forEach(function(i){i!=="selectionchange"&&(Q_.has(i)||Zc(i,!1,n),Zc(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Fo]||(r[Fo]=!0,Zc("selectionchange",!1,r))}}function Zg(n,r,i,o){switch(Om(r)){case 2:var f=ES;break;case 8:f=TS;break;default:f=gf}i=f.bind(null,r,i,n),f=void 0,!bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),o?f!==void 0?n.addEventListener(r,i,{capture:!0,passive:f}):n.addEventListener(r,i,!0):f!==void 0?n.addEventListener(r,i,{passive:f}):n.addEventListener(r,i,!1)}function ef(n,r,i,o,f){var h=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var S=o.stateNode.containerInfo;if(S===f)break;if(v===4)for(v=o.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;S!==null;){if(v=ms(S),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){o=h=v;continue e}S=S.parentNode}}o=o.return}rd(function(){var D=h,B=yu(i),q=[];e:{var U=jd.get(n);if(U!==void 0){var L=so,Z=n;switch(n){case"keypress":if(no(i)===0)break e;case"keydown":case"keyup":L=qb;break;case"focusin":Z="focus",L=Eu;break;case"focusout":Z="blur",L=Eu;break;case"beforeblur":case"afterblur":L=Eu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=ad;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=kb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Vb;break;case Od:case Cd:case xd:L=Mb;break;case kd:L=Yb;break;case"scroll":case"scrollend":L=Cb;break;case"wheel":L=Qb;break;case"copy":case"cut":case"paste":L=Ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=ld;break;case"toggle":case"beforetoggle":L=Xb}var oe=(r&4)!==0,je=!oe&&(n==="scroll"||n==="scrollend"),j=oe?U!==null?U+"Capture":null:U;oe=[];for(var O=D,N;O!==null;){var I=O;if(N=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||N===null||j===null||(I=Ai(O,j),I!=null&&oe.push(ia(O,I,N))),je)break;O=O.return}0<oe.length&&(U=new L(U,Z,null,i,B),q.push({event:U,listeners:oe}))}}if((r&7)===0){e:{if(U=n==="mouseover"||n==="pointerover",L=n==="mouseout"||n==="pointerout",U&&i!==mu&&(Z=i.relatedTarget||i.fromElement)&&(ms(Z)||Z[gs]))break e;if((L||U)&&(U=B.window===B?B:(U=B.ownerDocument)?U.defaultView||U.parentWindow:window,L?(Z=i.relatedTarget||i.toElement,L=D,Z=Z?ms(Z):null,Z!==null&&(je=u(Z),oe=Z.tag,Z!==je||oe!==5&&oe!==27&&oe!==6)&&(Z=null)):(L=null,Z=D),L!==Z)){if(oe=ad,I="onMouseLeave",j="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(oe=ld,I="onPointerLeave",j="onPointerEnter",O="pointer"),je=L==null?U:Ri(L),N=Z==null?U:Ri(Z),U=new oe(I,O+"leave",L,i,B),U.target=je,U.relatedTarget=N,I=null,ms(B)===D&&(oe=new oe(j,O+"enter",Z,i,B),oe.target=N,oe.relatedTarget=je,I=oe),je=I,L&&Z)t:{for(oe=J_,j=L,O=Z,N=0,I=j;I;I=oe(I))N++;I=0;for(var ie=O;ie;ie=oe(ie))I++;for(;0<N-I;)j=oe(j),N--;for(;0<I-N;)O=oe(O),I--;for(;N--;){if(j===O||O!==null&&j===O.alternate){oe=j;break t}j=oe(j),O=oe(O)}oe=null}else oe=null;L!==null&&Wg(q,U,L,oe,!1),Z!==null&&je!==null&&Wg(q,je,Z,oe,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(U=D?Ri(D):window,L=U.nodeName&&U.nodeName.toLowerCase(),L==="select"||L==="input"&&U.type==="file")var Se=md;else if(pd(U))if(yd)Se=o_;else{Se=i_;var te=s_}else L=U.nodeName,!L||L.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&gu(D.elementType)&&(Se=md):Se=a_;if(Se&&(Se=Se(n,D))){gd(q,Se,i,B);break e}te&&te(n,U,D),n==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&pu(U,"number",U.value)}switch(te=D?Ri(D):window,n){case"focusin":(pd(te)||te.contentEditable==="true")&&(Rs=te,xu=D,Di=null);break;case"focusout":Di=xu=Rs=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Rd(q,i,B);break;case"selectionchange":if(u_)break;case"keydown":case"keyup":Rd(q,i,B)}var fe;if(Ru)e:{switch(n){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else Ts?hd(n,i)&&(ye="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(ye="onCompositionStart");ye&&(ud&&i.locale!=="ko"&&(Ts||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&Ts&&(fe=sd()):(Zn=B,_u="value"in Zn?Zn.value:Zn.textContent,Ts=!0)),te=Qo(D,ye),0<te.length&&(ye=new od(ye,n,null,i,B),q.push({event:ye,listeners:te}),fe?ye.data=fe:(fe=dd(i),fe!==null&&(ye.data=fe)))),(fe=Wb?e_(n,i):t_(n,i))&&(ye=Qo(D,"onBeforeInput"),0<ye.length&&(te=new od("onBeforeInput","beforeinput",null,i,B),q.push({event:te,listeners:ye}),te.data=fe)),K_(q,n,D,i,B)}Xg(q,r)})}function ia(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Qo(n,r){for(var i=r+"Capture",o=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ai(n,i),f!=null&&o.unshift(ia(n,f,h)),f=Ai(n,r),f!=null&&o.push(ia(n,f,h))),n.tag===3)return o;n=n.return}return[]}function J_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Wg(n,r,i,o,f){for(var h=r._reactName,v=[];i!==null&&i!==o;){var S=i,A=S.alternate,D=S.stateNode;if(S=S.tag,A!==null&&A===o)break;S!==5&&S!==26&&S!==27||D===null||(A=D,f?(D=Ai(i,h),D!=null&&v.unshift(ia(i,D,A))):f||(D=Ai(i,h),D!=null&&v.push(ia(i,D,A)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var X_=/\r\n?/g,Z_=/\u0000|\uFFFD/g;function em(n){return(typeof n=="string"?n:""+n).replace(X_,` 10`).replace(Z_,"")}function tm(n,r){return r=em(r),em(n)===r}function ke(n,r,i,o,f,h){switch(i){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||Ss(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Ss(n,""+o);break;case"className":Za(n,"class",o);break;case"tabIndex":Za(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Za(n,i,o);break;case"style":td(n,o,h);break;case"data":if(r!=="object"){Za(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=eo(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"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 h=="function"&&(i==="formAction"?(r!=="input"&&ke(n,r,"name",f.name,f,null),ke(n,r,"formEncType",f.formEncType,f,null),ke(n,r,"formMethod",f.formMethod,f,null),ke(n,r,"formTarget",f.formTarget,f,null)):(ke(n,r,"encType",f.encType,f,null),ke(n,r,"method",f.method,f,null),ke(n,r,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=eo(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=Tn);break;case"onScroll":o!=null&&pe("scroll",n);break;case"onScrollEnd":o!=null&&pe("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}i=eo(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""+o):n.removeAttribute(i);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":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":o===!0?n.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,o):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(i,o):n.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(i):n.setAttribute(i,o);break;case"popover":pe("beforetoggle",n),pe("toggle",n),Xa(n,"popover",o);break;case"xlinkActuate":En(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":En(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":En(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":En(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":En(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":En(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":En(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":En(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":En(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Xa(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Ab.get(i)||i,Xa(n,i,o))}}function tf(n,r,i,o,f,h){switch(i){case"style":td(n,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof o=="string"?Ss(n,o):(typeof o=="number"||typeof o=="bigint")&&Ss(n,""+o);break;case"onScroll":o!=null&&pe("scroll",n);break;case"onScrollEnd":o!=null&&pe("scrollend",n);break;case"onClick":o!=null&&(n.onclick=Tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),r=i.slice(2,f?i.length-7:void 0),h=n[St]||null,h=h!=null?h[i]:null,typeof h=="function"&&n.removeEventListener(r,h,f),typeof o=="function")){typeof h!="function"&&h!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,f);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Xa(n,i,o)}}}function pt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",n),pe("load",n);var o=!1,f=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:ke(n,r,h,v,i,null)}}f&&ke(n,r,"srcSet",i.srcSet,i,null),o&&ke(n,r,"src",i.src,i,null);return;case"input":pe("invalid",n);var S=h=v=f=null,A=null,D=null;for(o in i)if(i.hasOwnProperty(o)){var B=i[o];if(B!=null)switch(o){case"name":f=B;break;case"type":v=B;break;case"checked":A=B;break;case"defaultChecked":D=B;break;case"value":h=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,r));break;default:ke(n,r,o,B,i,null)}}Xh(n,h,S,A,D,v,f,!1);return;case"select":pe("invalid",n),o=v=h=null;for(f in i)if(i.hasOwnProperty(f)&&(S=i[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:ke(n,r,f,S,i,null)}r=h,i=v,n.multiple=!!o,r!=null?_s(n,!!o,r,!1):i!=null&&_s(n,!!o,i,!0);return;case"textarea":pe("invalid",n),h=f=o=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:ke(n,r,v,S,i,null)}Wh(n,o,f,h);return;case"option":for(A in i)i.hasOwnProperty(A)&&(o=i[A],o!=null)&&(A==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":ke(n,r,A,o,i,null));return;case"dialog":pe("beforetoggle",n),pe("toggle",n),pe("cancel",n),pe("close",n);break;case"iframe":case"object":pe("load",n);break;case"video":case"audio":for(o=0;o<sa.length;o++)pe(sa[o],n);break;case"image":pe("error",n),pe("load",n);break;case"details":pe("toggle",n);break;case"embed":case"source":case"link":pe("error",n),pe("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(D in i)if(i.hasOwnProperty(D)&&(o=i[D],o!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:ke(n,r,D,o,i,null)}return;default:if(gu(r)){for(B in i)i.hasOwnProperty(B)&&(o=i[B],o!==void 0&&tf(n,r,B,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&ke(n,r,S,o,i,null))}function W_(n,r,i,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,v=null,S=null,A=null,D=null,B=null;for(L in i){var q=i[L];if(i.hasOwnProperty(L)&&q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":A=q;default:o.hasOwnProperty(L)||ke(n,r,L,null,o,q)}}for(var U in o){var L=o[U];if(q=i[U],o.hasOwnProperty(U)&&(L!=null||q!=null))switch(U){case"type":h=L;break;case"name":f=L;break;case"checked":D=L;break;case"defaultChecked":B=L;break;case"value":v=L;break;case"defaultValue":S=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(137,r));break;default:L!==q&&ke(n,r,U,L,o,q)}}du(n,v,S,A,D,B,h,f);return;case"select":L=v=S=U=null;for(h in i)if(A=i[h],i.hasOwnProperty(h)&&A!=null)switch(h){case"value":break;case"multiple":L=A;default:o.hasOwnProperty(h)||ke(n,r,h,null,o,A)}for(f in o)if(h=o[f],A=i[f],o.hasOwnProperty(f)&&(h!=null||A!=null))switch(f){case"value":U=h;break;case"defaultValue":S=h;break;case"multiple":v=h;default:h!==A&&ke(n,r,f,h,o,A)}r=S,i=v,o=L,U!=null?_s(n,!!i,U,!1):!!o!=!!i&&(r!=null?_s(n,!!i,r,!0):_s(n,!!i,i?[]:"",!1));return;case"textarea":L=U=null;for(S in i)if(f=i[S],i.hasOwnProperty(S)&&f!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:ke(n,r,S,null,o,f)}for(v in o)if(f=o[v],h=i[v],o.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":U=f;break;case"defaultValue":L=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==h&&ke(n,r,v,f,o,h)}Zh(n,U,L);return;case"option":for(var Z in i)U=i[Z],i.hasOwnProperty(Z)&&U!=null&&!o.hasOwnProperty(Z)&&(Z==="selected"?n.selected=!1:ke(n,r,Z,null,o,U));for(A in o)U=o[A],L=i[A],o.hasOwnProperty(A)&&U!==L&&(U!=null||L!=null)&&(A==="selected"?n.selected=U&&typeof U!="function"&&typeof U!="symbol":ke(n,r,A,U,o,L));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 oe in i)U=i[oe],i.hasOwnProperty(oe)&&U!=null&&!o.hasOwnProperty(oe)&&ke(n,r,oe,null,o,U);for(D in o)if(U=o[D],L=i[D],o.hasOwnProperty(D)&&U!==L&&(U!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(a(137,r));break;default:ke(n,r,D,U,o,L)}return;default:if(gu(r)){for(var je in i)U=i[je],i.hasOwnProperty(je)&&U!==void 0&&!o.hasOwnProperty(je)&&tf(n,r,je,void 0,o,U);for(B in o)U=o[B],L=i[B],!o.hasOwnProperty(B)||U===L||U===void 0&&L===void 0||tf(n,r,B,U,o,L);return}}for(var j in i)U=i[j],i.hasOwnProperty(j)&&U!=null&&!o.hasOwnProperty(j)&&ke(n,r,j,null,o,U);for(q in o)U=o[q],L=i[q],!o.hasOwnProperty(q)||U===L||U==null&&L==null||ke(n,r,q,U,o,L)}function nm(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var f=i[o],h=f.transferSize,v=f.initiatorType,S=f.duration;if(h&&S&&nm(v)){for(v=0,S=f.responseEnd,o+=1;o<i.length;o++){var A=i[o],D=A.startTime;if(D>S)break;var B=A.transferSize,q=A.initiatorType;B&&nm(q)&&(A=A.responseEnd,v+=B*(A<S?1:(S-D)/(A-D)))}if(--o,r+=8*(h+v)/(f.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 4,373 bytes, line 10
10n:5}var nf=null,rf=null;function Jo(n){return n.nodeType===9?n:n.ownerDocument}function rm(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 sm(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function sf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var af=null;function tS(){var n=window.event;return n&&n.type==="popstate"?n===af?!1:(af=n,!0):(af=null,!1)}var im=typeof setTimeout=="function"?setTimeout:void 0,nS=typeof clearTimeout=="function"?clearTimeout:void 0,am=typeof Promise=="function"?Promise:void 0,rS=typeof queueMicrotask=="function"?queueMicrotask:typeof am<"u"?function(n){return am.resolve(null).then(n).catch(sS)}:im;function sS(n){setTimeout(function(){throw n})}function gr(n){return n==="head"}function om(n,r){var i=r,o=0;do{var f=i.nextSibling;if(n.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(f),Zs(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")aa(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,aa(i);for(var h=i.firstChild;h;){var v=h.nextSibling,S=h.nodeName;h[Ti]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&aa(n.ownerDocument.body);i=f}while(i);Zs(r)}function lm(n,r){var i=n;n=0;do{var o=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function of(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":of(i),fu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function iS(n,r,i,o){for(;n.nodeType===1;){var f=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Ti])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=Jt(n.nextSibling),n===null)break}return null}function aS(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Jt(n.nextSibling),n===null))return null;return n}function um(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Jt(n.nextSibling),n===null))return null;return n}function lf(n){return n.data==="$?"||n.data==="$~"}function uf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function oS(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var o=function(){r(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function Jt(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;
vendor: 5,062 bytes, line 10
10if(r==="/$"||r==="/&")return null}}return n}var cf=null;function cm(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return Jt(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function fm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function hm(n,r,i){switch(r=Jo(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function aa(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);fu(n)}var Xt=new Map,dm=new Set;function Xo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var In=Y.d;Y.d={f:lS,r:uS,D:cS,C:fS,L:hS,m:dS,X:gS,S:pS,M:mS};function lS(){var n=In.f(),r=qo();return n||r}function uS(n){var r=ys(n);r!==null&&r.tag===5&&r.type==="form"?kp(r):In.r(n)}var Qs=typeof document>"u"?null:document;function pm(n,r,i){var o=Qs;if(o&&typeof r=="string"&&r){var f=$t(r);f='link[rel="'+n+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),dm.has(f)||(dm.add(f),n={rel:n,crossOrigin:i,href:r},o.querySelector(f)===null&&(r=o.createElement("link"),pt(r,"link",n),it(r),o.head.appendChild(r)))}}function cS(n){In.D(n),pm("dns-prefetch",n,null)}function fS(n,r){In.C(n,r),pm("preconnect",n,r)}function hS(n,r,i){In.L(n,r,i);var o=Qs;if(o&&n&&r){var f='link[rel="preload"][as="'+$t(r)+'"]';r==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+$t(i.imageSizes)+'"]')):f+='[href="'+$t(n)+'"]';var h=f;switch(r){case"style":h=Js(n);break;case"script":h=Xs(n)}Xt.has(h)||(n=m({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Xt.set(h,n),o.querySelector(f)!==null||r==="style"&&o.querySelector(oa(h))||r==="script"&&o.querySelector(la(h))||(r=o.createElement("link"),pt(r,"link",n),it(r),o.head.appendChild(r)))}}function dS(n,r){In.m(n,r);var i=Qs;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+$t(o)+'"][href="'+$t(n)+'"]',h=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Xs(n)}if(!Xt.has(h)&&(n=m({rel:"modulepreload",href:n},r),Xt.set(h,n),i.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(la(h)))return}o=i.createElement("link"),pt(o,"link",n),it(o),i.head.appendChild(o)}}}function pS(n,r,i){In.S(n,r,i);var o=Qs;if(o&&n){var f=vs(o).hoistableStyles,h=Js(n);r=r||"default";var v=f.get(h);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(oa(h)))S.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Xt.get(h))&&ff(n,i);var A=v=o.createElement("link");it(A),pt(A,"link",n),A._p=new Promise(function(D,B){A.onload=D,A.onerror=B}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Zo(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:S},f.set(h,v)}}}function gS(n,r){In.X(n,r);var i=Qs;if(i&&n){var o=vs(i).hoistableScripts,f=Xs(n),h=o.get(f);h||(h=i.querySelector(la(f)),h||(n=m({src:n,async:!0},r),(r=Xt.get(f))&&hf(n,r),h=i.createElement("script"),it(h),pt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function mS(n,r){In.M(n,r);var i=Qs;if(i&&n){var o=vs(i).hoistableScripts,f=Xs(n),h=o.get(f);h||(h=i.querySelector(la(f)),h||(n=m({src:n,async:!0,type:"module"},r),(r=Xt.get(f))&&hf(n,r),h=i.createElement("script"),it(h),pt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function gm(n,r,i,o){var f=(f=he.current)?Xo(f):null;if(!f)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Js(i.href),i=vs(f).hoistableStyles,o=i.get(r),o||(o={type:"style",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Js(i.href);var h=vs(f).hoistableStyles,v=h.get(n);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,v),(h=f.querySelector(oa(n)))&&!h._p&&(v.instance=h,v.state.loading=5),Xt.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Xt.set(n,i),h||yS(f,n,i,v.state))),r&&o===null)throw Error(a(528,""));return v}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?
vendor: 7,099 bytes, line 10
10(r=Xs(i),i=vs(f).hoistableScripts,o=i.get(r),o||(o={type:"script",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Js(n){return'href="'+$t(n)+'"'}function oa(n){return'link[rel="stylesheet"]['+n+"]"}function mm(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function yS(n,r,i,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),pt(r,"link",i),it(r),n.head.appendChild(r))}function Xs(n){return'[src="'+$t(n)+'"]'}function la(n){return"script[async]"+n}function ym(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+$t(i.href)+'"]');if(o)return r.instance=o,it(o),o;var f=m({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),it(o),pt(o,"style",f),Zo(o,i.precedence,n),r.instance=o;case"stylesheet":f=Js(i.href);var h=n.querySelector(oa(f));if(h)return r.state.loading|=4,r.instance=h,it(h),h;o=mm(i),(f=Xt.get(f))&&ff(o,f),h=(n.ownerDocument||n).createElement("link"),it(h);var v=h;return v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),pt(h,"link",o),r.state.loading|=4,Zo(h,i.precedence,n),r.instance=h;case"script":return h=Xs(i.src),(f=n.querySelector(la(h)))?(r.instance=f,it(f),f):(o=i,(f=Xt.get(h))&&(o=m({},i),hf(o,f)),n=n.ownerDocument||n,f=n.createElement("script"),it(f),pt(f,"link",o),n.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,Zo(o,i.precedence,n));return r.instance}function Zo(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,h=f,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===r)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(n,h.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function ff(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function hf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Wo=null;function vm(n,r,i){if(Wo===null){var o=new Map,f=Wo=new Map;f.set(i,o)}else f=Wo,o=f.get(i),o||(o=new Map,f.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),f=0;f<i.length;f++){var h=i[f];if(!(h[Ti]||h[ct]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(r)||"";v=n+v;var S=o.get(v);S?S.push(h):o.set(v,[h])}}return o}function bm(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function vS(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function _m(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function bS(n,r,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Js(o.href),h=r.querySelector(oa(f));if(h){r=h._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=el.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=h,it(h);return}h=r.ownerDocument||r,o=mm(o),(f=Xt.get(f))&&ff(o,f),h=h.createElement("link"),it(h);var v=h;v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),pt(h,"link",o),i.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=el.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var df=0;function _S(n,r){return n.stylesheets&&n.count===0&&nl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&nl(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+r);0<n.imgBytes&&df===0&&(df=62500*eS());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&nl(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>df?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function el(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var tl=null;function nl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,tl=new Map,r.forEach(SS,n),tl=null,el.call(n))}function SS(n,r){if(!(r.state.loading&4)){var i=tl.get(n);if(i)var o=i.get(null);else{i=new Map,tl.set(n,i);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}f=r.instance,v=f.getAttribute("data-precedence"),h=i.get(v)||o,h===o&&i.set(null,f),i.set(v,f),this.count++,o=el.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),r.state.loading|=4}}var ua={$$typeof:x,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function wS(n,r,i,o,f,h,v,S,A){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=ou(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.hiddenUpdates=ou(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Sm(n,r,i,o,f,h,v,S,A,D,B,q){return n=new wS(n,r,i,v,A,D,B,q,S),r=1,h===!0&&(r|=24),h=Ut(3,null,null,r),n.current=h,h.stateNode=n,r=Vu(),r.refCount++,n.pooledCache=r,r.refCount++,h.memoizedState={element:o,isDehydrated:i,cache:r},Qu(h),n}function wm(n){return n?(n=Cs,n):Cs}function Em(n,r,i,o,f,h){f=wm(f),o.context===null?o.context=f:o.pendingContext=f,o=sr(r),o.payload={element:i}
vendor: 5,041 bytes, line 10
10,h=h===void 0?null:h,h!==null&&(o.callback=h),i=ir(n,o,r),i!==null&&(Ot(i,n,r),Hi(i,n,r))}function Tm(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function pf(n,r){Tm(n,r),(n=n.alternate)&&Tm(n,r)}function Rm(n){if(n.tag===13||n.tag===31){var r=Hr(n,67108864);r!==null&&Ot(r,n,67108864),pf(n,67108864)}}function Am(n){if(n.tag===13||n.tag===31){var r=It();r=lu(r);var i=Hr(n,r);i!==null&&Ot(i,n,r),pf(n,r)}}var rl=!0;function ES(n,r,i,o){var f=z.T;z.T=null;var h=Y.p;try{Y.p=2,gf(n,r,i,o)}finally{Y.p=h,z.T=f}}function TS(n,r,i,o){var f=z.T;z.T=null;var h=Y.p;try{Y.p=8,gf(n,r,i,o)}finally{Y.p=h,z.T=f}}function gf(n,r,i,o){if(rl){var f=mf(o);if(f===null)ef(n,r,o,sl,i),Cm(n,o);else if(AS(f,n,r,i,o))o.stopPropagation();else if(Cm(n,o),r&4&&-1<RS.indexOf(n)){for(;f!==null;){var h=ys(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=Lr(h.pendingLanes);if(v!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var A=1<<31-Mt(v);S.entanglements[1]|=A,v&=~A}pn(h),(Te&6)===0&&(Io=mt()+500,ra(0))}}break;case 31:case 13:S=Hr(h,2),S!==null&&Ot(S,h,2),qo(),pf(h,2)}if(h=mf(o),h===null&&ef(n,r,o,sl,i),h===f)break;f=h}f!==null&&o.stopPropagation()}else ef(n,r,o,null,i)}}function mf(n){return n=yu(n),yf(n)}var sl=null;function yf(n){if(sl=null,n=ms(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=c(r),n!==null)return n;n=null}else if(i===31){if(n=d(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return sl=n,null}function Om(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(De()){case ut:return 2;case cn:return 8;case ps:case fb:return 32;case zh:return 268435456;default:return 32}default:return 32}}var vf=!1,mr=null,yr=null,vr=null,ca=new Map,fa=new Map,br=[],RS="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 Cm(n,r){switch(n){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ca.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(r.pointerId)}}function ha(n,r,i,o,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:h,targetContainers:[f]},r!==null&&(r=ys(r),r!==null&&Rm(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function AS(n,r,i,o,f){switch(r){case"focusin":return mr=ha(mr,n,r,i,o,f),!0;case"dragenter":return yr=ha(yr,n,r,i,o,f),!0;case"mouseover":return vr=ha(vr,n,r,i,o,f),!0;case"pointerover":var h=f.pointerId;return ca.set(h,ha(ca.get(h)||null,n,r,i,o,f)),!0;case"gotpointercapture":return h=f.pointerId,fa.set(h,ha(fa.get(h)||null,n,r,i,o,f)),!0}return!1}function xm(n){var r=ms(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){n.blockedOn=r,$h(n.priority,function(){Am(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,$h(n.priority,function(){Am(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function il(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=mf(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);mu=o,i.target.dispatchEvent(o),mu=null}else return r=ys(i),r!==null&&Rm(r),n.blockedOn=i,!1;r.shift()}return!0}function km(n,r,i){il(n)&&i.delete(r)}function OS(){vf=!1,mr!==null&&il(mr)&&(mr=null),yr!==null&&il(yr)&&(yr=null),vr!==null&&il(vr)&&(vr=null),ca.forEac
10h(km),fa.forEach(km)}function al(n,r){n.blockedOn===r&&(n.blockedOn=null,vf||(vf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,OS)))}var ol=null;function jm(n){ol!==n&&(ol=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ol===n&&(ol=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],f=n[r+2];if(typeof o!="function"){if(yf(o||i)===null)continue;break}var h=ys(i);h!==null&&(n.splice(r,3),r-=3,gc(h,{pending:!0,data:f,method:i.method,action:o},o,f))}}))}function Zs(n){function r(A){return al(A,n)}mr!==null&&al(mr,n),yr!==null&&al(yr,n),vr!==null&&al(vr,n),ca.forEach(r),fa.forEach(r);for(var i=0;i<br.length;i++){var o=br[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<br.length&&(i=br[0],i.blockedOn===null);)xm(i),i.blockedOn===null&&br.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var f=i[o],h=i[o+1],v=f[St]||null;if(typeof h=="function")v||jm(i);else if(v){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[St]||null)S=v.formAction;else if(yf(f)!==null)continue}else S=v.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),jm(i)}}}function Nm(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function bf(n){this._internalRoot=n}ll.prototype.render=bf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=It();Em(i,o,n,r,null,null)},ll.prototype.unmount=bf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Em(n.current,2,null,n,null,null),qo(),r[gs]=null}};function ll(n){this._internalRoot=n}ll.prototype.unstable_scheduleHydration=function(n){if(n){var r=qh();n={blockedOn:null,target:n,priority:r};for(var i=0;i<br.length&&r!==0&&r<br[i].priority;i++);br.splice(i,0,n),i===0&&xm(n)}};var Mm=t.version;if(Mm!=="19.2.5")throw Error(a(527,Mm,"19.2.5"));Y.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var CS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ul.isDisabled&&ul.supportsFiber)try{Si=ul.inject(CS),Nt=ul}catch{}}return pa.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",f=Ip,h=Hp,v=qp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Sm(n,1,!1,null,null,i,o,null,f,h,v,Nm),n[gs]=r.current,Wc(n),new bf(r)},pa.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,f="",h=Ip,v=Hp,S=qp,A=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),r=Sm(n,1,!0,r,i??null,o,f,A,h,v,S,Nm),r.context=wm(null),i=r.current,o=It(),o=lu(o),f=sr(o),f.callback=null,ir(i,f,o),i=o,r.current.lanes=i,Ei(r,i),pn(r),n[gs]=r.current,Wc(n),new ll(r)},pa.version="19.2.5",pa}var $m;function PS(){if($m)return wf.exports;$m=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),wf.exports=zS(),wf.exports}var BS=PS(),IS="__TSS_CONTEXT",Ff=Symbol.for("TSS_SERVER_FUNCTION"),ik=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),HS="application/x-tss-framed",Hn={JSON:0,CHUNK:1,END:2,ERROR:3},qS=/;\s*v=(\d+)/;function $S(e){const t=e.match(qS);return t?parseInt(t[1],10):void 0}function GS(e){const t=$S(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var wv=()=>window.__TSS_START_OPTIONS__,Ev=!1;function xa(e){return e[e.length-1]}function VS(e){return typeof e=="function"}function Or(e,t){return VS(e)?e(t):e}var KS=Object.prototype.hasOwnProperty,Gm=Object.prototype.propertyIsEnumerable,YS=()=>Object.create(null),es=(e,t)=>rs(e,t,YS);function rs(e,t,s=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const l=t,u=Ym(e)&&Ym(l);if(!u&&!(mi(e)&&mi(l)))return l;const c=u?e:Vm(e);if(!c)return l;const d=u?l:Vm(l);if(!d)return l;const p=c.length,g=d.length,y=u?new Array(g):s();let m=0;for(let b=0;b<g;b++){const _=u?b:d[b],w=e[_],T=l[_];if(w===T){y[_]=w,(u?b<p:KS.call(e,_))&&m++;continue}if(w===null||T===null||typeof w!="object"||typeof T!="object"){y[_]=T;continue}const E=rs(w,T,s,a+1);y[_]=E,E===w&&m++}return p===g&&m===p?e:y}function Vm(e){const t=Object.getOwnPropertyNames(e);for(const l of t)if(!Gm.call(e,l))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return t;const a=t;for(const l of s){if(!Gm.call(e,l))return!1;a.push(l)}return a}function mi(e){if(!Km(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!Km(s)||!s.hasOwnProperty("isPrototypeOf"))}function Km(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ym(e){return Array.isArray(e)&&e.length===Object.keys(e).length}
10function xt(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,l=e.length;a<l;a++)if(!xt(e[a],t[a],s))return!1;return!0}if(mi(e)&&mi(t)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const c in t)if((!a||t[c]!==void 0)&&!xt(e[c],t[c],s))return!1;return!0}let l=0;if(!a)l=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&l++;let u=0;for(const c in t)if((!a||t[c]!==void 0)&&(u++,u>l||!xt(e[c],t[c],s)))return!1;return l===u}return!1}function cs(e){let t,s;const a=new Promise((l,u)=>{t=l,s=u});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,t(l),e?.(l)},a.reject=l=>{a.status="rejected",s(l)},a}function FS(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function ka(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function QS(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Fm(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return QS(t)}var JS=["http:","https:","mailto:","tel:"];function kl(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}var XS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ZS=/[&><\u2028\u2029]/g;function WS(e){return e.replace(ZS,t=>XS[t])}function ga(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let s=0,a="",l;for(;(l=t.exec(e))!==null;)a+=Fm(e.slice(s,l.index))+l[0],s=t.lastIndex;a=a+Fm(s?e.slice(s):e);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function ew(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function tw(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function jt(){throw new Error("Invariant failed")}function ja(e){const t=new Map;let s,a;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a
10)):(u.next.prev=void 0,s=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=t.get(u);if(c)return l(c),c.value},set(u,c){if(t.size>=e&&s){const p=s;t.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const d=t.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,s||(s=p),t.set(u,p)}},clear(){t.clear(),s=void 0,a=void 0}}}var Cr=4,Tv=5;function nw(e){const t=e.indexOf("{");if(t===-1)return null;const s=e.indexOf("}",t);return s===-1||t+1>=e.length?null:[t,s]}function yh(e,t,s=new Uint16Array(6)){const a=e.indexOf("/",t),l=a===-1?e.length:a,u=e.substring(t,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=e.length;return s[0]=2,s[1]=t,s[2]=t,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=t,s[2]=t+1,s[3]=l,s[4]=l,s[5]=l,s;const c=nw(u);if(c){const[d,p]=c,g=u.charCodeAt(d+1);if(g===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const y=d+3,m=p;if(y<m)return s[0]=3,s[1]=t+d,s[2]=t+y,s[3]=t+m,s[4]=t+p+1,s[5]=l,s}}else if(g===36){const y=d+1,m=d+2;return m===p?(s[0]=2,s[1]=t+d,s[2]=t+y,s[3]=t+m,s[4]=t+p+1,s[5]=e.length,s):(s[0]=1,s[1]=t+d,s[2]=t+m,s[3]=t+p,s[4]=t+p+1,s[5]=l,s)}}return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s}function Kl(e,t,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,g=p.length,y=s.options?.caseSensitive??e,m=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=yh(p,d,t);let w;const T=d,E=_[5];switch(d=E+1,u++,_[0]){case 0:{const R=p.substring(_[2],_[3]);if(y){const k=l.static?.get(R);if(k)w=k;else{l.static??=new Map;const x=ss(s.fullPath??s.from);x.parent=l,x.depth=u,w=x,l.static.set(R,x)}}else{const k=R.toLowerCase(),x=l.staticInsensitive?.get(k);if(x)w=x;else{l.staticInsensitive??=new Map;const M=ss(s.fullPath??s.from);M.parent=l,M.depth=u,w=M,l.staticInsensitive.set(k,M)}}break}case 1:{const R=p.substring(T,_[1]),k=p.substring(_[4],E),x=y&&!!(R||k),M=R?x?R:R.toLowerCase():void 0,K=k?x?k:k.toLowerCase():void 0,$=!m&&l.dynamic?.find(P=>!P.skipOnParamError&&P.caseSensitive===x&&P.prefix===M&&P.suffix===K);if($)w=$;else{const P=Of(1,s.fullPath??s.from,x,M,K);w=P,P.depth=u,P.parent=l,l.dynamic??=[],l.dynamic.push(P)}break}case 3:{const R=p.substring(T,_[1]),k=p.substring(_[4],E),x=y&&!!(R||k),M=R?x?R:R.toLowerCase():void 0,K=k?x?k:k.toLowerCase():void 0,$=!m&&l.optional?.find(P=>!P.skipOnParamError&&P.caseSensitive===x&&P.prefix===M&&P.suffix===K);if($)w=$;else{const P=Of(3,s.fullPath??s.from,x,M,K);w=P,P.parent=l,P.depth=u,l.optional??=[],l.optional.push(P)}break}case 2:{const R=p.substring(T,_[1]),k=p.substring(_[4],E),x=y&&!!(R||k),M=R?x?R:R.toLowerCase():void 0,K=k?x?k:k.toLowerCase():void 0,$=Of(2,s.fullPath??s.from,x,M,K);w=$,$.parent=l,$.depth=u,l.wildcard??=[],l.wildcard.push($)}}l=w}if(m&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=ss(s.fullPath??s.from);_.kind=Tv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=ss(s.fullPath??s.from);_.kind=Cr,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=m,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)Kl(e,t,p,d,l,u,c)}function Af(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Er(e){if(e.pathless)for(const t of e.pathless)Er(t);if(e.static)for(const t of e.static.values())Er(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Er(t);if(e.dynamic?.length){e.dynamic.sort(Af);for(const t of e.dynamic)Er(t)}if(e.optional?.length){e.optional.sort(Af);for(const t of e.optional)Er(t)}if(e.wildcard?.length){e.wildcard.sort(Af);for(const t of e.wildcard)Er(t)}}function ss(e){return{kind:0,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}}function Of(e,t,s,a,l){return{kind:e,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,caseSensitive:s,prefix:a,suffix:l}}function rw(e,t){const s=ss("/"),a=new Uint16Array(6);for(const l of e)Kl(!1,a,l,1,s,0);Er(s),t.masksTree=s,t.flatCache=ja(1e3)}function sw(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const a=vh(e,t.masksTree);return t.flatCache.set(e,a),a}function iw(e,t,s,a,l){e||="/",a||="/";const u=t?`case\0${e}`:e;let c=l.singleCache.get(u);return c||(c=ss("/"),Kl(t,new Uint16Array(6),{from:e},1,c,0),l.singleCache.set(u,c)),vh(a,c,s)}function aw(e,t,s=!1){const a=s?e:`nofuzz\0${e}`,l=t.matchCache.get(a);if(l!==void 0)return l;e||="/";let u;
10try{u=vh(e,t.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=uw(u.route)),t.matchCache.set(a,u),u}function ow(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function lw(e,t=!1,s){const a=ss(e.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return Kl(t,l,e,1,a,0,p=>{if(s?.(p,d),p.id in u&&jt(),u[p.id]=p,d!==0&&p.path){const g=ow(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),Er(a),{processedTree:{segmentTree:a,singleCache:ja(1e3),matchCache:ja(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function vh(e,t,s=!1){const a=e.split("/"),l=fw(e,a,t,s);if(!l)return null;const[u]=Rv(e,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function Rv(e,t,s){const a=cw(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;d<a.length;c++,d++,p++,g++){const y=a[d];if(y.kind===Cr)break;if(y.kind===Tv){g--,c--,p--;continue}const m=t[c],b=p;if(m&&(p+=m.length),y.kind===1){l??=s.node.fullPath.split("/");const _=l[g],w=y.prefix?.length??0;if(_.charCodeAt(w)===123){const T=y.suffix?.length??0,E=_.substring(w+2,_.length-T-1),R=m.substring(w,m.length-T);u[E]=decodeURIComponent(R)}else{const T=_.substring(1);u[T]=decodeURIComponent(m)}}else if(y.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],w=y.prefix?.length??0,T=y.suffix?.length??0,E=_.substring(w+3,_.length-T-1),R=y.suffix||y.prefix?m.substring(w,m.length-T):m;R&&(u[E]=decodeURIComponent(R))}else if(y.kind===2){const _=y,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),T=decodeURIComponent(w);u["*"]=T,u._splat=T;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function uw(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function cw(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function fw(e,t,s,a){if(e==="/"&&s.index)return{node:s.index,skipped:0};const l=!xa(t),u=l&&e!=="/",c=t.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;d.length;){const y=d.pop(),{node:m,index:b,skipped:_,depth:w,statics:T,dynamics:E,optionals:R}=y;let{extract:k,rawParams:x,parsedParams:M}=y;if(m.kind===2&&m.route&&!fl(g,y))continue;if(m.skipOnParamError){if(!Qm(e,t,y))continue;x=y.rawParams,k=y.extract,M=y.parsedParams}a&&m.route&&m.kind!==Cr&&fl(p,y)&&(p=y);const K=b===c;if(K&&(m.route&&(!u||m.kind===Cr||m.kind===2)&&fl(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const $=K?void 0:t[b];let P;if(K&&m.index){const G={node:m.index,index:b,skipped:_,depth:w+1,statics:T,dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M};let F=!0;if(m.index.skipOnParamError&&(Qm(e,t,G)||(F=!1)),F){if(!E&&!R&&!_&&hw(T,c))return G;fl(g,G)&&(g=G)}}if(m.wildcard)for(let G=m.wildcard.length-1;G>=0;G--){const F=m.wildcard[G],{prefix:re,suffix:ee}=F;if(!(re&&(K||!(F.caseSensitive?$:P??=$.toLowerCase()).startsWith(re)))){if(ee){if(K)continue;const ge=t.slice(b).join("/").slice(-ee.length);if((F.caseSensitive?ge:ge.toLowerCase())!==ee)continue}d.push({node:F,index:c,skipped:_,depth:w+1,statics:T,dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M})}}if(m.optional){const G=_|1<<w,F=w+1;for(let re=m.optional.length-1;re>=0;re--){const ee=m.optional[re];d.push({node:ee,index:b,skipped:G,depth:F,statics:T,dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M})}if(!K)for(let re=m.optional.length-1;re>=0;re--){const ee=m.optional[re],{prefix:ge,suffix:Ae}=ee;if(ge||Ae){const Ve=ee.caseSensitive?$:P??=$.toLowerCase();if(ge&&!Ve.startsWith(ge)||Ae&&!Ve.endsWith(Ae))continue}d.push({node:ee,index:b+1,skipped:_,depth:F,statics:T,dynamics:E,optionals:R+cl(c,b),extract:k,rawParams:x,parsedParams:M})}}if(!K&&m.dynamic&&$)for(let G=m.dynamic.length-1;G>=0;G--){const F=m.dynamic[G],{prefix:re,suffix:ee}=F;if(re||ee){const ge=F.caseSensitive?$:P??=$.toLowerCase();if(re&&!ge.startsWith(re)||ee&&!ge.endsWith(ee))continue}d.push({node:F,index:b+1,skipped:_,depth:w+1,statics:T,dynamics:E+cl(c,b),optionals:R,extract:k,rawParams:x,parsedParams:M})}if(!K&&m.staticInsensitive){const G=m.staticInsensitive.get(P??=$.toLowerCase());G&&d.push({node:G,index:b+1,skipped:_,depth:w+1,statics:T+cl(c,b),dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M})}if(!K&&m.static){const G=m.static.get($);G&&d.push({node:G,index:b+1,skipped:_,depth:w+1,statics:T+cl(c,b),dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M})}if(m.pathless){const G=w+1;for(let F=m.pathless.length-1;F>=0;F--){const re=m.pathless[F];d.push({node:re,index:b,skipped:_,depth:G,statics:T,dynamics:E,optionals:R,extract:k,rawParams:x,parsedParams:M})}}}if(g)return g;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const m=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function cl(e,t){return 2**(e-t-1)}function hw(e,t){return e===2**(t-1)-1}function Qm(e,t,s){try{const[a,l]=Rv(e,t,s);s.rawParams=a,s.extract=l;const u=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function fl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Cr)>(e.node.kind===Cr)||t.node.kind===Cr==(e.node.kind===Cr)&&t.depth>e.depth))):!0}function Tl(e){return bh(e.filter(t=>t!==void 0).join("/"))}function bh(e){return e.replace(/\/{2,}/g,"/")}function Av(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function kr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Ov(e){return kr(Av(e))}function jl(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function dw(e,t,s){return jl(e,s)===jl(t,s)}function pw({base:e,to:t,trailingSlash:s="never",cache:a}){const l=t.startsWith("/"),u=!l&&t===".";let c;if(a){c=l?t:u?e:e+"\0"+t;const m=a.get(c);if(m)return m}let d;if(u)d=e.split("/");else if(l)d=t.split("/");else{for(d=e.split("/");d.length>1&&xa(d)==="";)d.pop();const m=t.split("/");for(let b=0,_=m.length;b<_;b++){const w=m[b];w===""?b?b===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}d.length>1&&(xa(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let m=0;m<d.length;m++){m>0&&(g+="/");const b=d[m];if(!b)continue;p=yh(b,0,p);const _=p[0];if(_===0){g+=b;continue}const w=p[5],T=b.substring(0,p[1]),E=b.substring(p[4],w),R=b.substring(p[2],p[3]);_===1?g+=T||E?`${T}{$${R}}${E}`:`$${R}`:_===2?g+=T||E?`${T}{$}${E}`:"$":g+=`${T}{-$${R}}${E}`}g=bh(g);const y=g||"/";return c&&a&&a.set(c,y),y}function gw(e){const t=new Map(e.map(l=>[encodeURIComponent(l),l])),s=Array.from(t.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return l=>l.replace(a,u=>t.get(u)??u)}function Cf(e,t,s){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>Xm(l,s)).join("/"):Xm(a,s)}function Jm({path:e,params:t,decoder:s,...a}){let l=!1;const u=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:u,isMissingParams:l};const c=e.length;let d=0,p,g="";for(;d<c;){const y=d;p=yh(e,y,p);const m=p[5];if(d=m+1,y===m)continue;const b=p[0];if(b===0){g+="/"+e.substring(y,m);continue}if(b===2){const _=t._splat;u._splat=_,u["*"]=_;const w=e.substring(y,p[1]),T=e.substring(p[4],m);
10if(!_){l=!0,(w||T)&&(g+="/"+w+T);continue}const E=Cf("_splat",t,s);g+="/"+w+E+T;continue}if(b===1){const _=e.substring(p[2],p[3]);!l&&!(_ in t)&&(l=!0),u[_]=t[_];const w=e.substring(y,p[1]),T=e.substring(p[4],m),E=Cf(_,t,s)??"undefined";g+="/"+w+E+T;continue}if(b===3){const _=e.substring(p[2],p[3]),w=t[_];if(w==null)continue;u[_]=w;const T=e.substring(y,p[1]),E=e.substring(p[4],m),R=Cf(_,t,s)??"";g+="/"+T+R+E;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Xm(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function lt(e){return e?.isNotFound===!0}function mw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var yw="tsr-scroll-restoration-v1_3";function vw(){const e=mw();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");mi(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=Or(a,t)||t},persist:()=>{try{e.setItem(yw,JSON.stringify(t))}catch{}}}}var Zm=vw(),bw=e=>e.state.__TSR_key||e.href;function _w(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}var hl=!1,ma="window",Wm="data-scroll-restoration-id";function Sw(e,t){if(!Zm)return;const s=Zm;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,hl=!1;const a=e.options.getScrollRestorationKey||bw,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(hl||!e.isScrollRestoring))if(d.target===document||d.target===window)l.set(ma,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>{if(!e.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[g,y]of l){let m;if(g===ma)m=ma;else if(g.isConnected){const b=g.getAttribute(Wm);m=b?`[${Wm}="${b}"]`:_w(g)}m&&(p[m]=y)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",d=>{c(d.fromLocation?a(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(a(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",d=>{const p=a(d.toLocation),g=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){hl=!0;try{const m=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(m)for(const _ in m){const w=m[_];if(!mi(w))continue;const{scrollX:T,scrollY:E}=w;if(!(!Number.isFinite(T)||!Number.isFinite(E))){if(_===ma)window.scrollTo({top:E,left:T,behavior:g}),b=!0;else if(_){let R;try{R=document.querySelector(_)}catch{continue}R&&(R.scrollLeft=T,R.scrollTop=E,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const T=document.getElementById(_);T&&T.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),y)for(const T of y){if(T===ma)continue;const E=typeof T=="function"?T():document.querySelector(T);E&&E.scrollTo(w)}}}}finally{hl=!1}e.isScrollRestoring&&s.set(m=>(m[p]||={},m))}})}function Cv(e,t=String){const s=new URLSearchParams;for(const a in e){const l=e[a];l!==void 0&&s.set(a,t(l))}return s.toString()}function xf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ww(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[a,l]of t.entries()){const u=s[a];u==null?s[a]=xf(l):Array.isArray(u)?u.push(xf(l)):s[a]=[u,xf(l)]}return s}var Ew=Rw(JSON.parse),Tw=Aw(JSON.stringify,JSON.parse);function Rw(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=ww(t);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=e(l)}catch{}}return s}}function Aw(e,t){const s=typeof t=="function";function a(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(s&&typeof l=="string")try{return t(l),e(l)}catch{}return l}return l=>{const u=Cv(l,a);return u?`?${u}
10`:""}}var ls="__root__";function xv(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function kt(e){return e instanceof Response&&!!e.options}function Ow(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return xv(e)}function Cw(e){return{input:({url:t})=>{for(const s of e)t=Qf(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=kv(e[s],t);return t}}}function xw(e){const t=Ov(e.basepath),s=`/${t}`,a=`${s}/`,l=e.caseSensitive?s:s.toLowerCase(),u=e.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Tl(["/",t,c.pathname]),c)}}function Qf(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function kv(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function kw(e,t){const{createMutableStore:s,createReadonlyStore:a,batch:l,init:u}=t,c=new Map,d=new Map,p=new Map,g=s(e.status),y=s(e.loadedAt),m=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),w=s(e.resolvedLocation),T=s(e.statusCode),E=s(e.redirect),R=s([]),k=s([]),x=s([]),M=a(()=>kf(c,R.get())),K=a(()=>kf(d,k.get())),$=a(()=>kf(p,x.get())),P=a(()=>R.get()[0]),G=a(()=>R.get().some(Y=>c.get(Y)?.get().status==="pending")),F=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),re=a(()=>({status:g.get(),loadedAt:y.get(),isLoading:m.get(),isTransitioning:b.get(),matches:M.get(),location:_.get(),resolvedLocation:w.get(),statusCode:T.get(),redirect:E.get()})),ee=ja(64);function ge(Y){let ae=ee.get(Y);return ae||(ae=a(()=>{const Ee=R.get();for(const Re of Ee){const C=c.get(Re);if(C&&C.routeId===Y)return C.get()}}),ee.set(Y,ae)),ae}const Ae={status:g,loadedAt:y,isLoading:m,isTransitioning:b,location:_,resolvedLocation:w,statusCode:T,redirect:E,matchesId:R,pendingIds:k,cachedIds:x,matches:M,pendingMatches:K,cachedMatches:$,firstId:P,hasPending:G,matchRouteDeps:F,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:re,getRouteMatchStore:ge,setMatches:Ve,setPending:ze,setCached:z};Ve(e.matches),u?.(Ae);function Ve(Y){jf(Y,c,R,s,l)}function ze(Y){jf(Y,d,k,s,l)}function z(Y){jf(Y,p,x,s,l)}return Ae}function kf(e,t){const s=[];for(const a of t){const l=e.get(a);l&&s.push(l.get())}return s}function jf(e,t,s,a,l){const u=e.map(d=>d.id),c=new Set(u);l(()=>{for(const d of t.keys())c.has(d)||t.delete(d);for(const d of e){const p=t.get(d.id);if(!p){const g=a(d);g.routeId=d.routeId,t.set(d.id,g);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}tw(s.get(),u)||s.set(u)})}var Jf=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},jw=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Yl=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),us=(e,t,s=!0)=>{const a={...e.router.options.context??{}},l=s?t:t-1;for(let u=0;u<=l;u++){const c=e.matches[u];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},ey=(e,t)=>{if(!e.matches.length)return;const s=t.routeId,a=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),l=a>=0?a:0;let u=s?e.matches.findIndex(c=>c.routeId===s):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const d=e.matches[c];if(e.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},xr=(e,t,s)=>{if(!(!kt(s)&&!lt(s)))throw kt(s)&&s.redirectHandled&&!s.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=s,e.updateMatch(t.id,a=>({...a,status:kt(s)?"redirected":lt(s)?"notFound":a.status==="pending"?"success":a.status,context:us(e,t.index),isFetching:!1,error:s})),lt(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),kt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},jv=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},ty=(e,t,s)=>
10{const a=us(e,s);e.updateMatch(t,l=>({...l,context:a}))},ya=(e,t,s,a)=>{const{id:l,routeId:u}=e.matches[t],c=e.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=a,e.firstBadMatchIndex??=t,xr(e,e.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,xr(e,e.router.getMatch(l),s)}e.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!kt(s)&&!lt(s)&&(e.serialError??=s)},Nv=(e,t,s,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Yl(e,t)&&(s.options.loader||s.options.beforeLoad||Dv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Jf(e)},l);a._nonReactive.pendingTimeout=u}},Nw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Nv(e,t,s,a);const l=()=>{const u=e.router.getMatch(t);u.preload&&(u.status==="redirected"||u.status==="notFound")&&xr(e,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},Mw=(e,t,s,a)=>{const l=e.router.getMatch(t);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=cs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&ya(e,s,c,"PARSE_PARAMS"),d&&ya(e,s,d,"VALIDATE_SEARCH"),Nv(e,t,a,l);const p=new AbortController;let g=!1;const y=()=>{g||(g=!0,e.updateMatch(t,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:p})))},m=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),m()});return}l._nonReactive.beforeLoadPromise=cs();const b={...us(e,s,!1),...l.__routeContext},{search:_,params:w,cause:T}=l,E=Yl(e,t),R={search:_,abortController:p,params:w,preload:E,context:b,location:e.location,navigate:M=>e.router.navigate({...M,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":T,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},k=M=>{if(M===void 0){e.router.batch(()=>{y(),m()});return}(kt(M)||lt(M))&&(y(),ya(e,s,M,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,K=>({...K,__beforeLoadContext:M})),m()})};let x;try{if(x=a.options.beforeLoad(R),ka(x))return y(),x.catch(M=>{ya(e,s,M,"BEFORE_LOAD")}).then(k)}catch(M){y(),ya(e,s,M,"BEFORE_LOAD")}k(x)},Dw=(e,t)=>{const{id:s,routeId:a}=e.matches[t],l=e.router.looseRoutesById[a],u=()=>d(),c=()=>Mw(e,s,t,l),d=()=>{if(jv(e,s))return;const p=Nw(e,s,l);return ka(p)?p.then(c):c()};return u()},Uw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},Mv=(e,t,s,a,l)=>{const u=t[a-1],{params:c,loaderDeps:d,abortController:p,cause:g}=e.router.getMatch(s),y=us(e,a),m=Yl(e,s);return{params:c,deps:d,preload:!!m,parentMatchPromise:u,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:m?"preload":g,route:l,...e.router.options.additionalContext}},ny=async(e,t,s,a,l)=>{try{const u=e.router.getMatch(s);try{(!(Ev??e.router.isServer)||u.ssr===!0)&&Na(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(Mv(e,t,s,a,l)),g=!!d&&ka(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(s,m=>({...m,isFetching:"loader"})),d){const m=g?await p:p;xr(e,e.router.getMatch(s),m),m!==void 0&&e.updateMatch(s,b=>({...b,loaderData:m}))}l._lazyPromise&&await l._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,e.updateMatch(s,m=>({...m,error:void 0,context:us(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:us(e,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,lt(c)&&await l.options.notFoundComponent?.preload?.(),xr(e,e.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){d=g,xr(e,e.router.getMatch(s),g)}!kt(d)&&!lt(d)&&await Na(l,["errorComponent"]),e.updateMatch(s,g=>
10({...g,error:d,context:us(e,a),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),xr(e,c,u)}},Lw=async(e,t,s)=>{async function a(_,w,T,E,R){const k=Date.now()-w.updatedAt,x=_?R.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:R.options.staleTime??e.router.options.defaultStaleTime??0,M=R.options.shouldReload,K=typeof M=="function"?M(Mv(e,t,l,s,R)):M,{status:$,invalid:P}=E,G=k>=x&&(!!e.forceStaleReload||E.cause==="enter"||T!==void 0&&T!==E.id);c=$==="success"&&(P||(K??G)),_&&R.options.preload===!1||(c&&!e.sync&&y?(d=!0,(async()=>{try{await ny(e,t,l,s,R);const F=e.router.getMatch(l);F._nonReactive.loaderPromise?.resolve(),F._nonReactive.loadPromise?.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){kt(F)&&await e.router.navigate(F.options)}})()):$!=="success"||c?await ny(e,t,l,s,R):ty(e,l,s))}const{id:l,routeId:u}=e.matches[s];let c=!1,d=!1;const p=e.router.looseRoutesById[u],g=p.options.loader,y=((typeof g=="function"?void 0:g?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(jv(e,l)){if(!e.router.getMatch(l))return e.matches[s];ty(e,l,s)}else{const _=e.router.getMatch(l),w=e.router.stores.matchesId.get()[s],T=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===u?w:e.router.stores.matches.get().find(R=>R.routeId===u)?.id,E=Yl(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const R=e.router.getMatch(l),k=R._nonReactive.error||R.error;k&&xr(e,R,k),R.status==="pending"&&await a(E,_,T,R,p)}else{const R=E&&!e.router.stores.matchStores.has(l),k=e.router.getMatch(l);k._nonReactive.loaderPromise=cs(),R!==k.preload&&e.updateMatch(l,x=>({...x,preload:R})),await a(E,_,T,k,p)}}const m=e.router.getMatch(l);d||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,d||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const b=d?m.isFetching:!1;return b!==m.isFetching||m.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(l)):m};async function ry(e){const t=e,s=[];jw(t.router)&&Jf(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=Dw(t,b);ka(_)&&await _}catch(_){if(kt(_))throw _;if(lt(_))a=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const l=t.firstBadMatchIndex??t.matches.length,u=a&&!t.preload?ey(t,a):void 0,c=a&&t.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push(Lw(t,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(kt(w))throw w;lt(w)?d??=w:p??=w}if(p!==void 0)throw p}const g=d??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!g&&a&&t.preload)return t.matches;if(g){const b=ey(t,g);b===void 0&&jt();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],T=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&T&&(w.options.notFoundComponent=T),g.routeId=_.routeId;const E=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,R=>({...R,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),y=b,await Na(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Na(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:w}=t.matches[b],T=t.router.looseRoutesById[w];try{const E=Uw(t,_,T);if(E){const R=await E;t.updateMatch(_,k=>({...k,...R}))}}catch(E){console.error(`Error executing head for route ${w}:`,E)}}const m=Jf(t);if(ka(m)&&await m,g)throw g;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function sy(e,t){const s=t.map(a=>
10e.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Na(e,t=Rl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:l,...u}=a.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:t===Rl?(()=>{if(e._componentsPromise===void 0){const a=sy(e,Rl);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():sy(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function Dv(e){for(const t of Rl)if(e.options[t]?.preload)return!0;return!1}var Rl=["component","errorComponent","pendingComponent","notFoundComponent"],jr="__TSR_index",iy="popstate",ay="beforeunload";function zw(e){let t=e.getLocation();const s=new Set,a=c=>{t=e.getLocation(),s.forEach(d=>d({location:t,action:c}))},l=c=>{e.notifyOnIndexChange??!0?a(c):t=e.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){c();return}const g=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=Nl(p.path,p.state);if(await m.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const g=t.state[jr];d=oy(g+1,d),u({task:()=>{e.pushState(c,d),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const g=t.state[jr];d=oy(g,d),u({task:()=>{e.replaceState(c,d),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{e.go(c),l({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{u({task:()=>{e.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{e.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[jr]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function oy(e,t){t||(t={});const s=_h();return{...t,key:s,__TSR_key:s,[jr]:e}}function Pw(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,a=t.history.replaceState;let l=[];const u=()=>l,c=G=>l=G,d=(G=>G),p=(()=>Nl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const G=_h();t.history.replaceState({[jr]:0,key:G,__TSR_key:G},"")}let g=p(),y,m=!1,b=!1,_=!1,w=!1;const T=()=>g;let E,R;const k=()=>{E&&(P._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),P._ignoreSubscribers=!1,E=void 0,R=void 0,y=void 0)},x=(G,F,re)=>{const ee=d(F);R||(y=g),g=Nl(F,re),E={href:ee,state:re,isPush:E?.isPush||G==="push"},R||(R=Promise.resolve().then(()=>k()))},M=G=>{g=p(),P.notify({type:G})},K=async()=>{if(b){b=!1;return}const G=p(),F=G.state[jr]-g.state[jr],re=F===1,ee=F===-1,ge=!re&&!ee||m;m=!1;const Ae=ge?"GO":ee?"BACK":"FORWARD",Ve=ge?{type:"GO",index:F}:{type:ee?"BACK":"FORWARD"};if(_)_=!1;else{const ze=u();if(typeof document<"u"&&ze.length){for(const z of ze)if(await z.blockerFn({currentLocation:g,nextLocation:G,action:Ae}
10)){b=!0,t.history.go(1),P.notify(Ve);return}}}g=p(),P.notify(Ve)},$=G=>{if(w){w=!1;return}let F=!1;const re=u();if(typeof document<"u"&&re.length)for(const ee of re){const ge=ee.enableBeforeUnload??!0;if(ge===!0){F=!0;break}if(typeof ge=="function"&&ge()===!0){F=!0;break}}if(F)return G.preventDefault(),G.returnValue=""},P=zw({getLocation:T,getLength:()=>t.history.length,pushState:(G,F)=>x("push",G,F),replaceState:(G,F)=>x("replace",G,F),back:G=>(G&&(_=!0),w=!0,t.history.back()),forward:G=>{G&&(_=!0),w=!0,t.history.forward()},go:G=>{m=!0,t.history.go(G)},createHref:G=>d(G),flush:k,destroy:()=>{t.history.pushState=s,t.history.replaceState=a,t.removeEventListener(ay,$,{capture:!0}),t.removeEventListener(iy,K)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(ay,$,{capture:!0}),t.addEventListener(iy,K),t.history.pushState=function(...G){const F=s.apply(t.history,G);return P._ignoreSubscribers||M("PUSH"),F},t.history.replaceState=function(...G){const F=a.apply(t.history,G);return P._ignoreSubscribers||M("REPLACE"),F},P}function Bw(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Nl(e,t){const s=Bw(e),a=s.indexOf("#"),l=s.indexOf("?"),u=_h();return{href:s,pathname:s.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:s.length),hash:a>-1?s.substring(a):"",search:l>-1?s.slice(l,a===-1?void 0:a):"",state:t||{[jr]:0,key:u,__TSR_key:u}}}function _h(){return(Math.random()+1).toString(36).substring(7)}function Iw(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function fi(e,t){const s=t,a=e;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var Hw=class{constructor(e,t){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=s=>s(),this.update=s=>{const a=this.options,l=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=gw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pw()),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=ja(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=kw($w(this.latestLocation),y),Sw(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const y=[],m=Ov(p);m&&m!=="/"&&y.push(xw({basepath:p})),g&&y.push(g),this.rewrite=y.length===0?void 0:y.length===1?y[0]:Cw(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 s=lw(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&rw(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const l={eventType:s,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:g,hash:y,href:m,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(g),k=this.options.stringifySearch(R);return{href:p+k+y,publicHref:p+k+y,pathname:ga(p).path,external:!1,searchStr:k,search:es(a?.search,R),hash:ga(y.slice(1)).path,state:rs(a?.state,b)}}const _=new URL(m,this.origin),w=Qf(this.rewrite,_),T=this.options.parseSearch(w.search),E=this.options.stringifySearch(T);return w.search=E,{href:w.href.replace(w.origin,""),publicHref:m,pathname:ga(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:E,search:es(a?.search,T),hash:ga(w.hash.slice(1)).path,state:rs(a?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===this.tempLocationKey)){const p=l(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(s,a)=>pw({base:s,to:bh(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},l):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>Gw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);
10a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,g=this.resolvePathWithBase(p,"."),y=d.search,m=Object.assign(Object.create(null),d.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?m:Object.assign(m,Or(u.params,m)),w=this.getMatchedRoutes(b);let T=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(T=[...T,this.options.notFoundRoute]),Object.keys(_).length>0)for(const re of T){const ee=re.options.params?.stringify??re.options.stringifyParams;if(ee)try{Object.assign(_,ee(_))}catch{}}const E=s.leaveParams?b:ga(Jm({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let R=y;if(s._includeValidateSearch&&this.options.search?.strict){const re={};T.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(re,Al(ee.options.validateSearch,{...re,...R}))}catch{}}),R=re}R=Vw({search:R,dest:u,destRoutes:T,_includeValidateSearch:s._includeValidateSearch}),R=es(y,R);const k=this.options.stringifySearch(R),x=u.hash===!0?c.hash:u.hash?Or(u.hash,c.hash):void 0,M=x?`#${x}`:"";let K=u.state===!0?c.state:u.state?Or(u.state,c.state):{};K=rs(c.state,K);const $=`${E}${k}${M}`;let P,G,F=!1;if(this.rewrite){const re=new URL($,this.origin),ee=kv(this.rewrite,re);P=re.href.replace(re.origin,""),ee.origin!==this.origin?(G=ee.href,F=!0):G=ee.pathname+ee.search+ee.hash}else P=ew($),G=P;return{publicHref:G,href:P,pathname:E,search:R,searchStr:k,state:K,hash:x??"",external:F,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=a(u);let p=c?a(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const y=sw(d.pathname,this.processedTree);if(y){Object.assign(g,y.rawParams);const{from:m,params:b,..._}=y.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Or(b,g));c={from:s.from,..._,params:w},p=a(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const g=xt(l.state,this.latestLocation.state);return p.forEach(y=>{delete l.state[y]}),g},c=kr(this.latestLocation.href)===kr(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=cs(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...y}=l;p&&(y={...p,state:{...p.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=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:a,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>{if(d){const m=this.history.location.state.__TSR_index,b=Nl(d,{__TSR_index:s?m:m+1}),_=new URL(b.pathname,this.origin);p.to=Qf(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const g=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const y=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:a,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!d&&u?u:l;if(kl(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const y of g)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(l=>!s.some(u=>u.id===l.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(s),this.stores.setCached(a)})},this.load=async s=>{let a,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,y=fi(g,this.stores.resolvedLocation.get());
10this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await ry({router:this,sync:s?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,b=null,_=null,w=null;this.batch(()=>{const T=this.stores.pendingMatches.get(),E=T.length,R=this.stores.matches.get();m=E?R.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const k=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&k.add(M.routeId);const x=new Set;for(const M of this.stores.matchStores.values())M.routeId&&x.add(M.routeId);b=E?R.filter(M=>!k.has(M.routeId)):null,_=E?T.filter(M=>!x.has(M.routeId)):null,w=E?T.filter(M=>x.has(M.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(T),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[T,E]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(T)for(const R of T)this.looseRoutesById[R.routeId].options[E]?.(R)})})}})}catch(g){kt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):lt(g)&&(l=g);const y=a?a.status:l?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(fi(u,c)):a.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(a);return}const u=this.stores.matchStores.get(s);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=a(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(d)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const a=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&kl(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=Na,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pe
10ndingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await ry({router:this,matches:l,location:a,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(y=>y.id===p?g(y):y):this.updateMatch(p,g)}}),l}catch(p){if(kt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});lt(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=iw(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!xt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?xt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Tw,parseSearch:e.parseSearch??Ew,protocolAllowlist:e.protocolAllowlist??JS}),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:e,routesByPath:t,processedTree:s}){this.routesById=e,this.routesByPath=t,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const s=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(a?a.path!=="/"&&l["**"]:kr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?Yw(this.options.notFoundMode,c):void 0,g=new Array(c.length),y=new Map;for(const m of this.stores.matchStores.values())m.routeId&&y.set(m.routeId,m.get());for(let m=0;m<c.length;m++){const b=c[m],_=g[m-1];let w,T,E;{const Ae=_?.search??e.search,Ve=_?._strictSearch??void 0;try{const ze=Al(b.options.validateSearch,{...Ae})??void 0;w={...Ae,...ze},T={...Ve,...ze},E=void 0}catch(ze){let z=ze;if(ze instanceof Ml||(z=new Ml(ze.message,{cause:ze})),t?.throwOnError)throw z;w=Ae,T={},E=z}}const R=b.options.loaderDeps?.({search:w})??"",k=R?JSON.stringify(R):"",{interpolatedPath:x,usedParams:M}=Jm({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),K=b.id+x+k,$=this.getMatch(K),P=y.get(b.id),G=$?._strictParams??M;let F;if(!$)try{ly(b,M,u,G)}catch(Ae){if(lt(Ae)||kt(Ae)?F=Ae:F=new qw(Ae.message,{cause:Ae}),t?.throwOnError)throw F}Object.assign(l,G);const re=P?"stay":"enter";let ee;if($)ee={...$,cause:re,params:P?.params??l,_strictParams:G,search:es(P?P.search:$.search,w),_strictSearch:T};else{const Ae=b.options.loader||b.options.beforeLoad||b.lazyFn||Dv(b)?"pending":"success";ee={id:K,ssr:b.options.ssr,index:m,routeId:b.id,params:P?.params??l,_strictParams:G,pathname:x,updatedAt:Date.now(),search:P?es(P.search,w):w,_strictSearch:T,searchError:void 0,status:Ae,isFetching:!1,error:void 0,paramsError:F,__routeC
10ontext:void 0,_nonReactive:{loadPromise:cs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:re,loaderDeps:P?rs(P.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(ee.globalNotFound=p===b.id),ee.searchError=E;const ge=this.getParentContext(_);ee.context={...ge,...ee.__routeContext,...ee.__beforeLoadContext},g[m]=ee}for(let m=0;m<g.length;m++){const b=g[m],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),T=y.get(b.routeId);if(b.params=T?es(T.params,l):l,!w){const E=g[m-1],R=this.getParentContext(E);if(_.options.context){const k={deps:b.loaderDeps,params:b.params,context:R??{},location:e,navigate:x=>this.navigate({...x,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(k)??void 0}b.context={...R,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s,parsedParams:a}=this.getMatchedRoutes(e.pathname),l=xa(t),u={...e.search};for(const y of t)try{Object.assign(u,Al(y.options.validateSearch,u))}catch{}const c=xa(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===e.pathname;let g;if(p)g=d.params;else{const y=Object.assign(Object.create(null),s);for(const m of t)try{ly(m,s,a??{},y)}catch{}g=y}return{matchedRoutes:t,fullPath:l.fullPath,search:u,params:g}}},Ml=class extends Error{},qw=class extends Error{};function $w(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Al(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Ml("Async validation not supported");if(s.issues)throw new Ml(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Gw({pathname:e,routesById:t,processedTree:s}){const a=Object.create(null),l=kr(e);let u,c;const d=aw(l,s,!0);return d&&(u=d.route,Object.assign(a,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[t.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function Vw({search:e,dest:t,destRoutes:s,_includeValidateSearch:a}){return Kw(s)(e,t,a??!1)}function Kw(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,m)=>m(y),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,m)=>m(y),g):g};t.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!t._includeValidateSearch)return p;try{return{...p,...Al(l.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(u)}}const s=({search:l})=>{const u=t.dest;return u.search?u.search===!0?l:Or(u.search,l):{}};t.middlewares.push(s);const a=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:g=>a(l+1,g,c)})};return function(u,c,d){return t.dest=c,t._includeValidateSearch=d,a(0,u,t.middlewares)}}function Yw(e,t){if(e!=="root")for(let s=t.length-1;s>=0;s--){const a=t[s];if(a.children)return a.id}return ls}function ly(e,t,s,a){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const u in t)u in s&&(a[u]=s[u]);else{const u=l(a);Object.assign(a,u)}}var yn=Symbol.for("TSR_DEFERRED_PROMISE");function Fw(e,t){const s=e;return s[yn]||(s[yn]={status:"pending"},s.then(a=>{s[yn].status="success",s[yn].data=a}).catch(a=>{s[yn].status="error",s[yn].error={data:Iw(a),__isServerError:!0}})),s}var Qw="Error preloading route! âï¸";function uy(e,t){if(e)return typeof e=="string"?e:e[t]}function Jw(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Xw(e){if(e.tag!=="link")return;const t=e.attrs?.rel,s=e.attrs?.href;if(typeof s=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return s}function Zw(e,t){const s=Xw(t);return!!s&&e?.inlineCss?.styles[s]!==void 0}var Uv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=ls:this.parentRoute||jt();let l=a?ls:s?.path;l&&l!=="/"&&(l=Av(l));const u=s?.id||l;
10let c=a?ls:Tl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Tl(["/",c]));const d=c==="__root__"?"/":Tl([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=kr(d)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>xv({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Ww=class extends Uv{constructor(e){super(e)}};function eE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),s=t.state.__hashScrollIntoViewOptions??!0;if(s&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(s)}}}const Kn=Symbol.asyncIterator,Lv=Symbol.hasInstance,hi=Symbol.isConcatSpreadable,Yn=Symbol.iterator,zv=Symbol.match,Pv=Symbol.matchAll,Bv=Symbol.replace,Iv=Symbol.search,Hv=Symbol.species,qv=Symbol.split,$v=Symbol.toPrimitive,di=Symbol.toStringTag,Gv=Symbol.unscopables,Vv={[Kn]:0,[Lv]:1,[hi]:2,[Yn]:3,[zv]:4,[Pv]:5,[Bv]:6,[Iv]:7,[Hv]:8,[qv]:9,[$v]:10,[di]:11,[Gv]:12},tE={0:Kn,1:Lv,2:hi,3:Yn,4:zv,5:Pv,6:Bv,7:Iv,8:Hv,9:qv,10:$v,11:di,12:Gv},nE={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},rE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},sE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function _e(e,t,s,a,l,u,c,d,p,g,y,m){return{t:e,i:t,s,c:a,m:l,p:u,e:c,a:d,f:p,b:g,o:y,l:m}}function Nr(e){return _e(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}
10const Kv=Nr(2),Yv=Nr(3),iE=Nr(1),aE=Nr(0),oE=Nr(4),lE=Nr(5),uE=Nr(6),cE=Nr(7);function fE(e){switch(e){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 Mr(e){let t="",s=0,a;for(let l=0,u=e.length;l<u;l++)a=fE(e[l]),a&&(t+=e.slice(s,l)+a,s=l+1);return s===0?t=e:t+=e.slice(s),t}function hE(e){switch(e){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 e}}function Dr(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,hE)}const dl="__SEROVAL_REFS__",Fv=new Map,ui=new Map;function Qv(e){return Fv.has(e)}function dE(e){return ui.has(e)}function pE(e){if(Qv(e))return Fv.get(e);throw new VE(e)}function gE(e){if(dE(e))return ui.get(e);throw new KE(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,dl,{value:ui,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,dl,{value:ui,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,dl,{value:ui,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,dl,{value:ui,configurable:!0,writable:!1,enumerable:!1});function Sh(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function mE(e){const t=rE[Sh(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Jv(e,t){let s=mE(e);const a=Object.getOwnPropertyNames(e);for(let l=0,u=a.length,c;l<u;l++)c=a[l],c!=="name"&&c!=="message"&&(c==="stack"?t&4&&(s=s||{},s[c]=e[c]):(s=s||{},s[c]=e[c]));return s}function Xv(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function yE(e){switch(e){case Number.POSITIVE_INFINITY:return lE;case Number.NEGATIVE_INFINITY:return uE}return e!==e?cE:Object.is(e,-0)?oE:_e(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Zv(e){return _e(1,void 0,Mr(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function vE(e){return _e(3,void 0,""+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function bE(e){return _e(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _E(e,t){const s=t.valueOf();return _e(5,e,s!==s?"":t.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Sr(e,t,s){return _e(36,e,s.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function SE(e,t){return _e(6,e,void 0,Mr(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function wE(e,t){return _e(17,e,Vv[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function EE(e,t){return _e(18,e,Mr(pE(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function TE(e,t,s){return _e(25,e,s,Mr(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function RE(e,t,s){return _e(9,e,void 0,void 0,void 0,void 0,void 0,s,void 0,void 0,Xv(t),void 0)}function AE(e,t){return _e(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function OE(e,t,s){return _e(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,s,t.byteOffset,void 0,t.length)}function CE(e,t,s){return _e(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,s,t.byteOffset,void 0,t.length)}function xE(e,t,s){return _e(20,e,void 0,void 0,void 0,void 0,void 0,void 0,s,t.byteOffset,void 0,t.byteLength)}function kE(e,t,s){return _e(13,e,Sh(t),void 0,Mr(t.message),s,void 0,void 0,void 0,void 0,void 0,void 0)}function jE(e,t,s){return _e(14,e,Sh(t),void 0,Mr(t.message),s,void 0,void 0,void 0,void 0,void 0,void 0)}function NE(e,t){return _e(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function ME(e,t){return _e(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function DE(e,t){return _e(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function UE(e,t,s){return _e(31,e,void 0,void 0,void 0,void 0,void 0,s,t,void 0,void 0,void 0)}function LE(e,t){return _e(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function zE(e,t){return _e(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function PE(e,t){return _e(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function BE(e,t,s,a){return _e(35,e,s,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,a)}
12const IE={parsing:1,serialization:2,deserialization:3};function HE(e){return`Seroval Error (step: ${IE[e]})`}const qE=(e,t)=>HE(e);var Wv=class extends Error{constructor(e,t){super(qE(e)),this.cause=t}},cy=class extends Wv{constructor(e){super("parsing",e)}},$E=class extends Wv{constructor(e){super("deserialization",e)}};function Fn(e){return`Seroval Error (specific: ${e})`}var Fl=class extends Error{constructor(e){super(Fn(1)),this.value=e}},wh=class extends Error{constructor(e){super(Fn(2))}},GE=class extends Error{constructor(e){super(Fn(3))}},Ql=class extends Error{constructor(e){super(Fn(4))}},VE=class extends Error{constructor(e){super(Fn(5)),this.value=e}},KE=class extends Error{constructor(e){super(Fn(6))}},YE=class extends Error{constructor(e){super(Fn(7))}},Wt=class extends Error{constructor(e){super(Fn(8))}},e0=class extends Error{constructor(e){super(Fn(9))}},FE=class{constructor(e,t){this.value=e,this.replacement=t}};const Eh=()=>{const e={p:0,s:0,f:0};return e.p=new Promise((t,s)=>{e.s=t,e.f=s}),e},QE=()=>{const e=[],t=[];let s=!0,a=!1,l=0;const u={flush(c,d,p){for(p=0;p<l;p++)t[p]&&t[p][d](c)},up(c,d,p,g){for(d=0,p=e.length;d<p;d++)g=e[d],!s&&d===p-1?c[a?"return":"throw"](g):c.next(g)},on(c,d){return s&&(d=l++,t[d]=c),u.up(c),()=>{s&&(t[d]=t[l],t[l--]=void 0)}}};return{__SEROVAL_STREAM__:!0,on(c){return u.on(c)},next(c){s&&(e.push(c),u.flush(c,"next"))},throw(c){s&&(e.push(c),u.flush(c,"throw"),s=!1,a=!1,t.length=0)},return(c){s&&(e.push(c),u.flush(c,"return"),s=!1,a=!0,t.length=0)}}},JE=e=>t=>()=>{let s=0;const a={[e](){return a},next(){if(s>t.d)return{done:!0,value:void 0};const l=s++,u=t.v[l];if(l===t.t)throw u;return{done:l===t.d,value:u}}};return a},XE=(e,t)=>s=>()=>{let a=0,l=-1,u=!1;const c=[],d=[],p={finalize(y=0,m=d.length){for(;y<m;y++)d[y].s({done:!0,value:void 0})}};s.on({next(y){const m=d.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw(y){const m=d.shift();m&&m.f(y),p.finalize(),l=c.length,u=!0,c.push(y)},return(y){const m=d.shift();m&&m.s({done:!0,value:y}),p.finalize(),l=c.length,c.push(y)}});const g={[e](){return g},next(){if(l===-1){const b=a++;if(b>=c.length){const _=t();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};const y=a++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},ZE=e=>{const t=atob(e),s=t.length,a=new Uint8Array(s);for(let l=0;l<s;l++)a[l]=t.charCodeAt(l);return a.buffer};function WE(e){return"__SEROVAL_SEQUENCE__"in e}function t0(e,t,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:s}}function eT(e){const t=[];let s=-1,a=-1;const l=e[Yn]();for(;;)try{const u=l.next();if(t.push(u.value),u.done){a=t.length-1;break}}catch(u){s=t.length,t.push(u)}return t0(t,s,a)}const tT=JE(Yn);function nT(e){return tT(e)}const rT={},sT={},iT={0:{},1:{},2:{},3:{},4:{},5:{}};function aT(e){return"__SEROVAL_STREAM__"in e}function fs(){return QE()}function oT(e){const t=fs(),s=e[Kn]();async function a(){try{const l=await s.next();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}const lT=XE(Kn,Eh);function uT(e){return lT(e)}async function cT(e){try{return[1,await e]}catch(t){return[0,t]}}function fT(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function Ol(e,t){e.marked.add(t)}function hT(e,t){const s=e.refs.size;return e.refs.set(t,s),s}function Jl(e,t){const s=e.refs.get(t);return s!=null?(Ol(e,s),{type:1,value:bE(s)}):{type:0,value:hT(e,t)}}function Th(e,t){const s=Jl(e,t);return s.type===1?s:Qv(t)?{type:2,value:EE(s.value,t)}:s}function is(e,t){const s=Th(e,t);if(s.type!==0)return s.value;if(t in Vv)return wE(s.value,t);throw new Fl(t)}function Xl(e,t){const s=Jl(e,iT[t]);return s.type===1?s.value:_e(26,s.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function dT(e){const t=Jl(e,rT);return t.type===1?t.value:_e(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,is(e,Yn),void 0,void 0,void 0)}function pT(e){const t=Jl(e,sT);return t.type===1?t.value:_e(29,t.value,void 0,void 0,void 0,void 0,void 0,[Xl(e,1),is(e,Kn)],void 0,void 0,void 0,void 0)}function gT(e,t,s,a){return _e(s?11:10,e,void 0,void 0,void 0,a,void 0,void 0,void 0,void 0,Xv(t),void 0)}function mT(e,t,s,a){return _e(8,t,void 0,void 0,void 0,void 0,{k:s,v:a},void 0,Xl(e,0),void 0,void 0,void 0)}function yT(e,t,s){const a=new Uint8Array(s);let l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return _e(19,t,Mr(btoa(l)),void 0,void 0,void 0,void 0,void 0,Xl(e,5),void 0,void 0,void 0)}function vT(e,t){return{base:fT(e,t),child:void 0}}var bT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return st(this._p,this.depth,e)}};
12async function _T(e,t,s){const a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await st(e,t,s[l]):a[l]=0;return a}async function ST(e,t,s,a){return RE(s,a,await _T(e,t,a))}async function Rh(e,t,s){const a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(Mr(a[c][0])),u.push(await st(e,t,a[c][1]));return Yn in s&&(l.push(is(e.base,Yn)),u.push(ME(dT(e.base),await st(e,t,eT(s))))),Kn in s&&(l.push(is(e.base,Kn)),u.push(DE(pT(e.base),await st(e,t,oT(s))))),di in s&&(l.push(is(e.base,di)),u.push(Zv(s[di]))),hi in s&&(l.push(is(e.base,hi)),u.push(s[hi]?Kv:Yv)),{k:l,v:u}}async function Nf(e,t,s,a,l){return gT(s,a,l,await Rh(e,t,a))}async function wT(e,t,s,a){return AE(s,await st(e,t,a.valueOf()))}async function ET(e,t,s,a){return OE(s,a,await st(e,t,a.buffer))}async function TT(e,t,s,a){return CE(s,a,await st(e,t,a.buffer))}async function RT(e,t,s,a){return xE(s,a,await st(e,t,a.buffer))}async function fy(e,t,s,a){const l=Jv(a,e.base.features);return kE(s,a,l?await Rh(e,t,l):void 0)}async function AT(e,t,s,a){const l=Jv(a,e.base.features);return jE(s,a,l?await Rh(e,t,l):void 0)}async function OT(e,t,s,a){const l=[],u=[];for(const[c,d]of a.entries())l.push(await st(e,t,c)),u.push(await st(e,t,d));return mT(e.base,s,l,u)}async function CT(e,t,s,a){const l=[];for(const u of a.keys())l.push(await st(e,t,u));return NE(s,l)}async function n0(e,t,s,a){const l=e.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){const d=l[u];if(d.parse.async&&d.test(a))return TE(s,d.tag,await d.parse.async(a,new bT(e,t),{id:s}))}}async function xT(e,t,s,a){const[l,u]=await cT(a);return _e(12,s,l,void 0,void 0,void 0,void 0,void 0,await st(e,t,u),void 0,void 0,void 0)}function kT(e,t,s,a,l){const u=[],c=s.on({next:d=>{Ol(this.base,t),st(this,e,d).then(p=>{u.push(LE(t,p))},p=>{l(p),c()})},throw:d=>{Ol(this.base,t),st(this,e,d).then(p=>{u.push(zE(t,p)),a(u),c()},p=>{l(p),c()})},return:d=>{Ol(this.base,t),st(this,e,d).then(p=>{u.push(PE(t,p)),a(u),c()},p=>{l(p),c()})}})}async function jT(e,t,s,a){return UE(s,Xl(e.base,4),await new Promise(kT.bind(e,t,s,a)))}async function NT(e,t,s,a){const l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await st(e,t,a.v[u]);return BE(s,l,a.t,a.d)}async function MT(e,t,s,a){if(Array.isArray(a))return ST(e,t,s,a);if(aT(a))return jT(e,t,s,a);if(WE(a))return NT(e,t,s,a);let l=a.constructor;if(l!==void 0&&typeof l!="function"){const d=Object.getPrototypeOf(a);l=d===null?void 0:d.constructor}if(l===FE)return st(e,t,a.replacement);const u=await n0(e,t,s,a);if(u)return u;switch(l){case Object:return Nf(e,t,s,a,!1);case void 0:return Nf(e,t,s,a,!0);case Date:return _E(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return fy(e,t,s,a);case Number:case Boolean:case String:case BigInt:return wT(e,t,s,a);case ArrayBuffer:return yT(e.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return ET(e,t,s,a);case DataView:return RT(e,t,s,a);
12case Map:return OT(e,t,s,a);case Set:return CT(e,t,s,a)}if(l===Promise||a instanceof Promise)return xT(e,t,s,a);const c=e.base.features;if(c&32&&l===RegExp)return SE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return TT(e,t,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return AT(e,t,s,a);if(c&64&&typeof Temporal<"u")switch(l){case Temporal.Instant:return Sr(s,0,a);case Temporal.Duration:return Sr(s,1,a);case Temporal.PlainDate:return Sr(s,2,a);case Temporal.PlainDateTime:return Sr(s,3,a);case Temporal.PlainMonthDay:return Sr(s,4,a);case Temporal.PlainTime:return Sr(s,5,a);case Temporal.PlainYearMonth:return Sr(s,6,a);case Temporal.ZonedDateTime:return Sr(s,7,a)}if(a instanceof Error)return fy(e,t,s,a);if(Yn in a||Kn in a)return Nf(e,t,s,a,!!l);throw new Fl(a)}async function DT(e,t,s){const a=Th(e.base,s);if(a.type!==0)return a.value;const l=await n0(e,t,a.value,s);if(l)return l;throw new Fl(s)}async function st(e,t,s){if(t>=e.base.depthLimit)throw new e0(e.base.depthLimit);switch(typeof s){case"boolean":return s?Kv:Yv;case"undefined":return iE;case"string":return Zv(s);case"number":return yE(s);case"bigint":return vE(s);case"object":if(s){const a=Th(e.base,s);return a.type===0?await MT(e,t+1,a.value,s):a.value}return aE;case"symbol":return is(e.base,s);case"function":return DT(e,t,s);default:throw new Fl(s)}}async function UT(e,t){try{return await st(e,0,t)}catch(s){throw s instanceof cy?s:new cy(s)}}function r0(e,t){for(let s=0,a=t.length;s<a;s++){const l=t[s];e.has(l)||(e.add(l),l.extends&&r0(e,l.extends))}}function s0(e){if(e){const t=new Set;return r0(t,e),[...t]}}function LT(e){switch(e){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 YE(e)}}function zT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function PT(e){switch(e){case Kn:case hi:case di:case Yn:return!0;default:return!1}}const BT=1e6,IT=1e4,HT=2e4;function i0(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}const qT=1e3;function $T(e,t){var s;const a=t.refs||new Map;return"types"in a||Object.assign(a,{types:new Map}),{mode:e,plugins:t.plugins,refs:a,features:(s=t.features)!==null&&s!==void 0?s:127^(t.disabledFeatures||0),depthLimit:t.depthLimit||qT}}function GT(e){return{mode:2,base:$T(2,e),child:void 0}}var VT=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Le(this._p,this.depth,e)}};function a0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Wt({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function o0(e){return!!e&&typeof e=="object"&&"then"in e&&typeof e.then=="function"}function KT(e,t,s){return a0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,s),s}function YT(e,t,s){return a0(e.base,t),e.base.refs.set(t,s),s}function tt(e,t,s){return e.mode===1?KT(e,t,s):YT(e,t,s)}function Xf(e,t,s){if(Object.hasOwn(t,s))return t[s];throw new Wt(e)}function FT(e,t){return tt(e,t.i,gE(Dr(t.s)))}function QT(e,t,s){const a=s.a,l=a.length,u=tt(e,s.i,new Array(l));for(let c=0,d;c<l;c++)d=a[c],d&&(u[c]=Le(e,t,d));return i0(u,s.o),u}function hy(e,t,s){zT(t)?e[t]=s:Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!0,writable:!0})}function JT(e,t,s,a,l){if(typeof a=="string")hy(s,Dr(a),Le(e,t,l));else{const u=Le(e,t,a);switch(typeof u){case"string":hy(s,u,Le(e,t,l));break;case"symbol":PT(u)&&(s[u]=Le(e,t,l));break;default:throw new Wt(a)}}}function l0(e,t,s){e.base.refs.types.set(t,s)}function Zl(e,t,s,a){if(e.base.refs.types.get(s)!==a)throw new Wt(t)}function u0(e,t,s,a){const l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)JT(e,t,a,l[u],c[u]);return a}function XT(e,t,s){const a=tt(e,s.i,s.t===10?{}:Object.create(null));return u0(e,t,s.p,a),i0(a,s.o),a}function ZT(e,t){return tt(e,t.i,new Date(t.s))}function WT(e,t){if(!(e.base.features&64))throw new wh(t);let s;switch(t.c){case 0:s=Temporal.Instant.from(t.s);break;case 1:s=Temporal.Duration.from(t.s);break;case 2:s=Temporal.PlainDate.from(t.s);break;case 3:s=Temporal.PlainDateTime.from(t.s);break;case 4:s=Temporal.PlainMonthDay.from(t.s);break;case 5:s=Temporal.PlainTime.from(t.s);break;case 6:s=Temporal.PlainYearMonth.from(t.s);break;case 7:s=Temporal.ZonedDateTime.from(t.s);break;default:throw new Wt(t)}return tt(e,t.i,s)}function eR(e,t){if(e.base.features&32){const s=Dr(t.c);if(s.length>HT)throw new Wt(t);return tt(e,t.i,new RegExp(s,t.m))}throw new wh(t)}function tR(e,t,s){const a=tt(e,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)a.add(Le(e,t,u[l]));return a}function nR(e,t,s){const a=tt(e,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)a.set(Le(e,t,u[l]),Le(e,t,c[l]));return a}function rR(e,t){if(t.s.length>BT)throw new Wt(t);return tt(e,t.i,ZE(Dr(t.s)))}function sR(e,t,s){var a;const l=LT(s.c),u=Le(e,t,s.f),c=(a=s.b)!==null&&a!==void 0?a:0;if(c<0||c>u.byteLength)throw new Wt(s);return tt(e,s.i,new l(u,c,s.l))}function iR(e,t,s){var a;const l=Le(e,t,s.f),u=(a=s.b)!==null&&a!==void 0?a:0;if(u<0||u>l.byteLength)throw new Wt(s);return tt(e,s.i,new DataView(l,u,s.l))}function c0(e,t,s,a){if(s.p){const l=u0(e,t,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function aR(e,t,s){return c0(e,t,s,tt(e,s.i,new AggregateError([],Dr(s.m))))}function oR(e,t,s){const a=Xf(s,sE,s.s);return c0(e,t,s,tt(e,s.i,new a(Dr(s.m))))}function lR(e,t,s){const a=Eh(),l=tt(e,s.i,a.p),u=Le(e,t,s.f);if(o0(u))throw new Wt(s.f);return s.s?a.s(u):a.f(u),l}
12function uR(e,t,s){return tt(e,s.i,Object(Le(e,t,s.f)))}function cR(e,t,s){const a=e.base.plugins;if(a){const l=Dr(s.c);for(let u=0,c=a.length;u<c;u++){const d=a[u];if(d.tag===l)return tt(e,s.i,d.deserialize(s.s,new VT(e,t),{id:s.i}))}}throw new GE(s.c)}function fR(e,t){const s=tt(e,t.i,tt(e,t.s,Eh()).p);return l0(e,t.s,22),s}function hR(e,t,s){const a=e.base.refs.get(s.i);if(a){Zl(e,s,s.i,22);const l=Le(e,t,s.a[1]);if(o0(l))throw new Wt(s.a[1]);s.t===23?a.s(l):a.f(l);return}throw new Ql("Promise")}function dR(e,t,s){return Le(e,t,s.a[0]),nT(Le(e,t,s.a[1]))}function pR(e,t,s){return Le(e,t,s.a[0]),uT(Le(e,t,s.a[1]))}function gR(e,t,s){const a=tt(e,s.i,fs());l0(e,s.i,31);const l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)Le(e,t,l[c]);return a}function mR(e,t,s){const a=e.base.refs.get(s.i);if(a){Zl(e,s,s.i,31),a.next(Le(e,t,s.f));return}throw new Ql("Stream")}function yR(e,t,s){const a=e.base.refs.get(s.i);if(a){Zl(e,s,s.i,31),a.throw(Le(e,t,s.f));return}throw new Ql("Stream")}function vR(e,t,s){const a=e.base.refs.get(s.i);if(a){Zl(e,s,s.i,31),a.return(Le(e,t,s.f));return}throw new Ql("Stream")}function bR(e,t,s){Le(e,t,s.f)}function _R(e,t,s){Le(e,t,s.a[1])}function SR(e,t,s){const a=tt(e,s.i,t0([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)a.v[l]=Le(e,t,s.a[l]);return a}function Le(e,t,s){if(t>e.base.depthLimit)throw new e0(e.base.depthLimit);switch(t+=1,s.t){case 2:return Xf(s,nE,s.s);case 0:return Number(s.s);case 1:return Dr(String(s.s));case 3:if(String(s.s).length>IT)throw new Wt(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return FT(e,s);case 9:return QT(e,t,s);case 10:case 11:return XT(e,t,s);case 5:return ZT(e,s);case 6:return eR(e,s);case 7:return tR(e,t,s);case 8:return nR(e,t,s);case 19:return rR(e,s);case 16:case 15:return sR(e,t,s);case 20:return iR(e,t,s);case 14:return aR(e,t,s);case 13:return oR(e,t,s);case 12:return lR(e,t,s);case 17:return Xf(s,tE,s.s);case 21:return uR(e,t,s);case 25:return cR(e,t,s);case 22:return fR(e,s);case 23:case 24:return hR(e,t,s);case 28:return dR(e,t,s);case 30:return pR(e,t,s);case 31:return gR(e,t,s);case 32:return mR(e,t,s);case 33:return yR(e,t,s);case 34:return vR(e,t,s);case 27:return bR(e,t,s);case 29:return _R(e,t,s);case 35:return SR(e,t,s);case 36:return WT(e,s);default:throw new wh(s)}}function wR(e,t){try{return Le(e,0,t)}catch(s){throw new $E(s)}}function dy(e,t){return wR(GT({plugins:s0(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function ER(e,t={}){const s=vT(1,{plugins:s0(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await UT(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function TR(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,s,a){return{v:s.parse(e.toSerializable(t))}},async async(t,s,a){return{v:await s.parse(e.toSerializable(t))}},stream(t,s,a){return{v:s.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,s,a){return e.fromSerializable(s.deserialize(t.v))}}}var RR=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Dl=globalThis.Buffer,f0=!!Dl&&typeof Dl.from=="function";function h0(e){if(e.length===0)return"";if(f0)return Dl.from(e).toString("base64");const t=32768,s=[];for(let a=0;a<e.length;a+=t){const l=e.subarray(a,a+t);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function d0(e){if(e.length===0)return new Uint8Array(0);if(f0){const a=Dl.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return s}var va=Object.create(null),ba=Object.create(null),AR=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(d0(s))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),OR=new TextEncoder,CR=e=>new ReadableStream({start(t){e.on({next(s){try{typeof s=="string"?t.enqueue(OR.encode(s)):t.enqueue(d0(s.$b64))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),xR="(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(_){}}})}}))",kR="(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 py(e){const t=fs(),s=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){t.return(void 0);break}t.next(h0(l))}}catch(a){t.throw(a)}finally{s.releaseLock()}})(),t}function gy(e){const t=fs(),s=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=a.decode();c.length>0&&t.next(c)}catch{}t.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&t.next(c)}catch{t.next({$b64:h0(u)})}}}catch(l){t.throw(l)}finally{s.releaseLock()}})(),t}var jR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===va},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return xR},deserialize(e,t,s){return va}},{tag:"tss/RawStreamFactoryText",test(e){return e===ba},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return kR},deserialize(e,t,s){return ba}}],test(e){return e instanceof RR},parse:{sync(e,t,s){const a=e.hint==="text"?ba:va;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(fs())}},async async(e,t,s){const a=e.hint==="text"?ba:va,l=e.hint==="text"?gy(e.stream):py(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(l)}},stream(e,t,s){const a=e.hint==="text"?ba:va,l=e.hint==="text"?gy(e.stream):py(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(l)}}},serialize(e,t,s){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,s){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?CR(a):AR(a)}};function NR(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,s,a){return e(typeof s?.deserialize=="function"?s.deserialize(t.streamId):t.streamId)}}}var MR={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}};const Tr={},p0=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(s)}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),DR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Tr},parse:{sync(){return Tr},async async(){return await Promise.resolve(Tr)},stream(){return Tr}},serialize(){return p0.toString()},deserialize(){return Tr}};async function g0(e,t){try{const s=await t.read();s.done?(e.return(s.value),t.releaseLock()):(e.next(s.value),await g0(e,t))}catch(s){e.throw(s)}}function UR(e){e.cancel().catch(()=>{}),e.releaseLock()}function my(e){const t=fs(),s=e.getReader(),a=UR.bind(null,s);return g0(t,s).catch(a),[t,a]}const LR={tag:"seroval/plugins/web/ReadableStream",extends:[DR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Tr),stream:t.parse(fs())}},async async(e,t){return{factory:await t.parse(Tr),stream:await t.parse(my(e)[0])}},stream(e,t){const[s,a]=my(e);return t.addCleanup(a),{factory:t.parse(Tr),stream:t.parse(s)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const s=t.deserialize(e.stream);return p0(s)}};var zR=[MR,jR,LR];function PR(){return[...wv()?.serializationAdapters?.map(TR)??[],...zR]}var yy=new TextDecoder,BR=new Uint8Array(0),vy=16*1024*1024,by=32*1024*1024,_y=1024,Sy=1e5;function IR(e){const t=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(m){d=m},cancel(){l=!0;try{u?.cancel()}catch{}t.forEach(m=>{try{m.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),s.clear(),a.clear()}});function g(m){const b=s.get(m);
12if(b)return b;if(a.has(m))return new ReadableStream({start(w){w.close()}});if(s.size>=_y)throw new Error(`Too many raw streams in framed response (max ${_y})`);const _=new ReadableStream({start(w){t.set(m,w)},cancel(){a.add(m),t.delete(m),s.delete(m)}});return s.set(m,_),_}function y(m){return g(m),t.get(m)}return(async()=>{const m=e.getReader();u=m;const b=[];let _=0;function w(){if(_<9)return null;const E=b[0];if(E.length>=9)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};const R=new Uint8Array(9);let k=0,x=9;for(let M=0;M<b.length&&x>0;M++){const K=b[M],$=Math.min(K.length,x);R.set(K.subarray(0,$),k),k+=$,x-=$}return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0}}function T(E){if(E===0)return BR;const R=new Uint8Array(E);let k=0,x=E;for(;x>0&&b.length>0;){const M=b[0];if(!M)break;const K=Math.min(M.length,x);R.set(M.subarray(0,K),k),k+=K,x-=K,K===M.length?b.shift():b[0]=M.subarray(K)}return _-=E,R}try{for(;;){const{done:E,value:R}=await m.read();if(l||E)break;if(R){if(_+R.length>by)throw new Error(`Framed response buffer exceeded ${by} bytes`);for(b.push(R),_+=R.length;;){const k=w();if(!k)break;const{type:x,streamId:M,length:K}=k;if(x!==Hn.JSON&&x!==Hn.CHUNK&&x!==Hn.END&&x!==Hn.ERROR)throw new Error(`Unknown frame type: ${x}`);if(x===Hn.JSON){if(M!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(M===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(K>vy)throw new Error(`Frame payload too large: ${K} bytes (max ${vy})`);const $=9+K;if(_<$)break;if(++c>Sy)throw new Error(`Too many frames in framed response (max ${Sy})`);T(9);const P=T(K);switch(x){case Hn.JSON:try{d.enqueue(yy.decode(P))}catch{}break;case Hn.CHUNK:{const G=y(M);G&&G.enqueue(P);break}case Hn.END:{const G=y(M);if(a.add(M),G){try{G.close()}catch{}t.delete(M)}break}case Hn.ERROR:{const G=y(M);if(a.add(M),G){const F=yy.decode(P);G.error(new Error(F)),t.delete(M)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{d.error(E)}catch{}t.forEach(R=>{try{R.error(E)}catch{}}),t.clear()}finally{try{m.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Ma=null;async function Zf(e){e.length>0&&await Promise.allSettled(e)}var HR=Object.prototype.hasOwnProperty;function m0(e){for(const t in e)if(HR.call(e,t))return!0;return!1}async function qR(e,t,s){Ma||(Ma=PR());const a=t[0],l=a.fetch??s,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${HS}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await y0(a);if(p!==void 0){const g=Cv({payload:p});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let d;if(a.method==="POST"){const p=await $R(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await GR(async()=>l(e,{method:a.method,headers:c,signal:a.signal,body:d}))}async function y0(e){let t=!1;const s={};if(e.data!==void 0&&(t=!0,s.data=e.data),e.context&&m0(e.context)&&(t=!0,s.context=e.context),t)return v0(s)}async function v0(e){return JSON.stringify(await Promise.resolve(ER(e,{plugins:Ma})))}async function $R(e){if(e.data instanceof FormData){let s;return e.context&&m0(e.context)&&(s=await v0(e.context)),s!==void 0&&e.data.set(IS,s),{body:e.data}}const t=await y0(e);if(t)return{body:t,contentType:"application/json"}}async function GR(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const s=t.headers.get("content-type");if(s||jt(),t.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(GS(s),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=IR(t.body),c=[NR(l),...Ma||[]],d=new Map;a=await VR({jsonStream:u,onMessage:p=>dy(p,{refs:d,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await t.json(),u=[];a=dy(l,{plugins:Ma}),await Zf(u)}if(a||jt(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await t.json(),l=Ow(a);if(l)throw l;if(lt(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function VR({jsonStream:e,onMessage:t,onError:s}){const a=e.getReader(),{value:l,done:u}=await a.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:m,done:b}=await a.read();if(b)break;
12if(m)try{const _=[];try{t(JSON.parse(m))}finally{}await Zf(_)}catch(_){s?.(`Invalid JSON: ${m}`,_)}}}catch(m){d||s?.("Stream processing error:",m)}})();let g;const y=[];try{g=t(c)}catch(m){throw d=!0,a.cancel().catch(()=>{}),m}return await Zf(y),Promise.resolve(g).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function KR(e){const t="/_serverFn/"+e;return Object.assign((...l)=>{const u=wv()?.serverFns?.fetch;return qR(t,l,u??fetch)},{url:t,serverFnMeta:{id:e},[Ff]:!0})}var YR={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Ff in e)?!1:!!e[Ff],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>KR(e)};function wy(e){return e.replaceAll("\0","/").replaceAll("�","/")}function FR(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function QR(e){window.$_TSR||jt();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(R=>{E.set(R.key,R.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(R=>R())}window.$_TSR.initialized=!0,window.$_TSR.router||jt();const s=window.$_TSR.router;s.matches.forEach(E=>{E.i=wy(E.i)}),s.lastMatchId&&(s.lastMatchId=wy(s.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:u}=s;e.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:c};const d=e.matchRoutes(e.stores.location.get()),p=Promise.all(d.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function g(E){const R=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(R){const k=cs();E._nonReactive.minPendingPromise=k,E._forcePending=!0,setTimeout(()=>{k.resolve(),e.updateMatch(E.id,x=>(x._nonReactive.minPendingPromise=void 0,{...x,_forcePending:void 0}))},R)}}function y(E){const R=e.looseRoutesById[E.routeId];R&&(R.options.ssr=E.ssr)}let m;d.forEach(E=>{const R=s.matches.find(k=>k.i===E.id);if(!R){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}FR(E,R),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&m===void 0&&(m=E.index,g(E))}),e.stores.setMatches(d),await e.options.hydrate?.(l);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async E=>{try{const R=e.looseRoutesById[E.routeId],k=b[E.index-1]?.context??e.options.context;if(R.options.context){const $={deps:E.loaderDeps,params:E.params,context:k??{},location:_,navigate:P=>e.navigate({...P,_fromLocation:_}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:R.id};E.__routeContext=R.options.context($)??void 0}E.context={...k,...E.__routeContext,...E.__beforeLoadContext};const x={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},M=await R.options.head?.(x),K=await R.options.scripts?.(x);E.meta=M?.meta,E.links=M?.links,E.headScripts=M?.scripts,E.styles=M?.styles,E.scripts=K}catch(R){if(lt(R))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,R);else throw E.error=R,console.error(`Error during hydration for route ${E.routeId}:`,R),R}}));const w=d[d.length-1].id!==u;if(!d.some(E=>E.ssr===!1)&&!w)return d.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const T=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(w){const E=d[1];E||jt(),g(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=T,T.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,R=>({...R,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Ul=ne.use,wa=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Mf(e){const t=ne.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function JR(e,t,s={},a={}){ne.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{t(u)},s);return l.observe(e.current),()=>{l.disconnect()}},[t,s,a.disabled,e])}function XR(e){const t=ne.useRef(null);return ne.useImperativeHandle(e,()=>t.current,[]),t}function ZR({promise:e}){if(Ul)return Ul(e);const t=Fw(e);if(t[yn].status==="pending")throw t;if(t[yn].status==="error")throw t[yn].error;return t[yn].data}function WR(e){const t=V.jsx(eA,{...e});
12return e.fallback?V.jsx(ne.Suspense,{fallback:e.fallback,children:t}):t}function eA(e){const t=ZR(e);return e.children(t)}function Ah(e){const t=e.errorComponent??Oh;return V.jsx(tA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:a})=>s?ne.createElement(t,{error:s,reset:a}):e.children})}var tA=class extends ne.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Oh({error:e}){const[t,s]=ne.useState(!1);return V.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[V.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[V.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),V.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:t?"Hide Error":"Show Error"})]}),V.jsx("div",{style:{height:".25rem"}}),t?V.jsx("div",{children:V.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?V.jsx("code",{children:e.message}):null})}):null]})}function nA({children:e,fallback:t=null}){return Ch()?V.jsx(gi.Fragment,{children:e}):V.jsx(gi.Fragment,{children:t})}function Ch(){return gi.useSyncExternalStore(rA,()=>!0,()=>!1)}function rA(){return()=>{}}var b0=ne.createContext(null);function gt(e){return ne.useContext(b0)}var Wl=ne.createContext(void 0),sA=ne.createContext(void 0),He=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(He||{});function iA({update:e,notify:t,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===g){_.version=m,y.depsTail=_;return}const w=g.subsTail;if(w!==void 0&&w.version===m&&w.sub===y)return;const T=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=T),b!==void 0?b.nextDep=T:y.deps=T,w!==void 0?w.nextSub=T:g.subs=T}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,T=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,w!==void 0?w.prevSub=T:m.subsTail=T,T!==void 0?T.nextSub=w:(m.subs=w)===void 0&&s(m),_}function u(g){let y=g.nextSub,m;e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&t(b),_&1){const w=b.subs;if(w!==void 0){const T=(g=w).nextSub;T!==void 0&&(m={value:y,prev:m},y=T);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,_=!1;e:do{const w=g.dep,T=w.flags;if(y.flags&16)_=!0;else if((T&17)===17){if(e(w)){const E=w.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((T&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=w.deps,y=w,++b;continue}if(!_){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=y.subs,R=E.nextSub!==void 0;if(R?(g=m.value,m=m.prev):g=E,_){if(e(y)){R&&d(E),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const k=g.nextDep;if(k!==void 0){g=k;continue e}}return _}while(!0)}function d(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&t(y))}while((g=g.nextSub)!==void 0)}function p(g,y){let m=y.depsTail;for(;m!==void 0;){if(m===g)return!0;m=m.prevDep}return!1}}function aA(e,t,s){const a=typeof e=="object",l=a?e:void 0;return{next:(a?e.next:e)?.bind(l),error:(a?e.error:t)?.bind(l),complete:(a?e.complete:s)?.bind(l)}}const Wf=[];let Cl=0;const{link:Ey,unlink:oA,propagate:lA,checkDirty:_0,shallowPropagate:Ty}=iA({update(e){return e._update()},notify(e){Wf[eh++]=e,e.flags&=~He.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=He.Mutable|He.Dirty,Ll(e))}});let pl=0,eh=0,gn,th=0;function S0(e){try{++th,e()}finally{--th||w0()}}function Ll(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=oA(s,e)}function w0(){if(!(th>0)){for(;pl<eh;){const e=Wf[pl];Wf[pl++]=void 0,e.notify()}pl=0,eh=0}}function Ry(e,t){const s=typeof e=="function",a=e,l={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?He.None:He.Mutable,get(){return gn!==void 0&&Ey(l,gn,Cl),l._snapshot},subscribe(u){const c=aA(u),d={current:!1},p=uA(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=gn,d=t?.compare??Object.is;if(s)gn=l,++Cl,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=He.Mutable|He.RecursedCheck);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&s?a(p):u;return p===void 0||!d(p,g)?(l._snapshot=g,!0):!1}finally{gn=c,s&&(l.flags&=~He.RecursedCheck),Ll(l)}}};return s?(l.flags=He.Mutable|He.Dirty,l.get=function(){const u=l.flags;if(u&He.Dirty||u&He.Pending&&_0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&Ty(c)}}else u&He.Pending&&(l.flags=u&~He.Pending);return gn!==void 0&&Ey(l,gn,Cl),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(lA(c),Ty(c),w0())}},l}function uA(e){const t=()=>{const a=gn;gn=s,++Cl,s.depsTail=void 0,s.flags=He.Watching|He.RecursedCheck;try{return e()}finally{gn=a,s.flags&=~He.RecursedCheck,Ll(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:He.Watching|He.RecursedCheck,notify(){const a=this.flags;a&He.Dirty||a&He.Pending&&_0(this.deps,this)?t():this.flags=He.Watching},stop(){this.flags=He.None,this.depsTail=void 0,Ll(this)}};return t(),s}var Df={exports:{}},Uf={},Lf={exports:{}},zf={};var Ay;function cA(){if(Ay)return zf;Ay=1;var e=$a();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var s=typeof Object.is=="function"?Object.is:t,a=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(m,b){var _=b(),w=a({inst:{value:_,getSnapshot:b}}),T=w[0].inst,E=w[1];return u(function(){T.value=_,T.getSnapshot=b,p(T)&&E({inst:T})},[m,_,b]),l(function(){return p(T)&&E({inst:T}),m(function(){p(T)&&E({inst:T})})},[m]),c(_),_}function p(m){var b=m.getSnapshot;m=m.value;try{var _=b();return!s(m,_)}catch{return!0}}function g(m,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return zf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,zf}var Oy;function fA(){return Oy||(Oy=1,Lf.exports=cA()),Lf.exports}var Cy;function hA(){if(Cy)return Uf;Cy=1;var e=$a(),t=fA();function s(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var a=typeof Object.is=="function"?Object.is:s,l=t.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return Uf.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var w=u(null);if(w.current===null){var T={hasValue:!1,value:null};w.current=T}else T=w.current;
12w=d(function(){function R($){if(!k){if(k=!0,x=$,$=b($),_!==void 0&&T.hasValue){var P=T.value;if(_(P,$))return M=P}return M=$}if(P=M,a(x,$))return P;var G=b($);return _!==void 0&&_(P,G)?(x=$,P):(x=$,M=G)}var k=!1,x,M,K=m===void 0?null:m;return[function(){return R(y())},K===null?void 0:function(){return R(K())}]},[y,m,b,_]);var E=l(g,w[0],w[1]);return c(function(){T.hasValue=!0,T.value=E},[E]),p(E),E},Uf}var xy;function dA(){return xy||(xy=1,Df.exports=hA()),Df.exports}var pA=dA();function gA(e,t){return e===t}function et(e,t,s=gA){const a=ne.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(c);return d},[e]),l=ne.useCallback(()=>e?.get(),[e]);return pA.useSyncExternalStoreWithSelector(a,l,l,t,s)}var mA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function hs(e){const t=gt(),s=ne.useContext(e.from?sA:Wl),a=e.from??s,l=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,u=ne.useRef(void 0);return et(l??mA,c=>{if((e.shouldThrow??!0)&&!c&&jt(),c===void 0)return;const d=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=rs(u.current,d);return u.current=p,p}return d})}function E0(e){return hs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function T0(e){const{select:t,...s}=e;return hs({...s,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function R0(e){return hs({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function A0(e){return hs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function O0(e){const t=gt();return ne.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function C0(e){return hs({...e,select:t=>e.select?e.select(t.context):t.context})}var x0=Sv();const ak=_v(x0);function yA(e,t){const s=gt(),a=XR(t),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:y,hashScrollIntoView:m,replace:b,startTransition:_,resetScroll:w,viewTransition:T,children:E,target:R,disabled:k,style:x,className:M,onClick:K,onBlur:$,onFocus:P,onMouseEnter:G,onMouseLeave:F,onTouchStart:re,ignoreBlocker:ee,params:ge,search:Ae,hash:Ve,state:ze,mask:z,reloadDocument:Y,unsafeRelative:ae,from:Ee,_fromLocation:Re,...C}=e,H=Ch(),Q=ne.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=et(s.stores.location,De=>De,(De,ut)=>De.href===ut.href),se=ne.useMemo(()=>{const De={_fromLocation:X,...Q};return s.buildLocation(De)},[s,X,Q]),he=se.maskedLocation?se.maskedLocation.publicHref:se.publicHref,be=se.maskedLocation?se.maskedLocation.external:se.external,Ke=ne.useMemo(()=>EA(he,be,s.history,k),[k,be,he,s.history]),Ne=ne.useMemo(()=>{if(Ke?.external)return kl(Ke.href,s.protocolAllowlist)?void 0:Ke.href;if(!TA(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),kl(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Ke,s.protocolAllowlist]),_n=ne.useMemo(()=>{if(Ne)return!1;if(c?.exact){if(!dw(X.pathname,se.pathname,s.basepath))return!1}else{const De=jl(X.pathname,s.basepath),ut=jl(se.pathname,s.basepath);if(!(De.startsWith(ut)&&(De.length===ut.length||De[ut.length]==="/")))return!1}return(c?.includeSearch??!0)&&!xt(X.search,se.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?H&&X.hash===se.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,X,Ne,H,se.hash,se.pathname,se.search,s.basepath]),Sn=_n?Or(l,{})??vA:Pf,Qn=_n?Pf:Or(u,{})??Pf,vi=[M,Sn.className,Qn.className].filter(Boolean).join(" "),un=(x||Sn.style||Qn.style)&&{...x,...Sn.style,...Qn.style},[bi,ds]=ne.useState(!1),Va=ne.useRef(!1),wn=e.reloadDocument||Ne?!1:p??s.options.defaultPreload,Ur=g??s.options.defaultPreloadDelay??0,en=ne.useCallback(()=>{s.preloadRoute({...Q,_builtLocation:se}).catch(De=>{console.warn(De),console.warn(Qw)})},[s,Q,se]);JR(a,ne.useCallback(De=>{De?.isIntersecting&&en()},[en]),wA,{disabled:!!k||wn!=="viewport"}),ne.useEffect(()=>{Va.current||!k&&wn==="render"&&(en(),Va.current=!0)},[k,en,wn]);const _i=De=>{const ut=De.currentTarget.getAttribute("target"),cn=R!==void 0?R:ut;
12if(!k&&!RA(De)&&!De.defaultPrevented&&(!cn||cn==="_self")&&De.button===0){De.preventDefault(),x0.flushSync(()=>{ds(!0)});const ps=s.subscribe("onResolved",()=>{ps(),ds(!1)});s.navigate({...Q,replace:b,resetScroll:w,hashScrollIntoView:m,startTransition:_,viewTransition:T,ignoreBlocker:ee})}};if(Ne)return{...C,ref:a,href:Ne,...E&&{children:E},...R&&{target:R},...k&&{disabled:k},...x&&{style:x},...M&&{className:M},...K&&{onClick:K},...$&&{onBlur:$},...P&&{onFocus:P},...G&&{onMouseEnter:G},...F&&{onMouseLeave:F},...re&&{onTouchStart:re}};const Ka=De=>{if(k||wn!=="intent")return;if(!Ur){en();return}const ut=De.currentTarget;if(_a.has(ut))return;const cn=setTimeout(()=>{_a.delete(ut),en()},Ur);_a.set(ut,cn)},au=De=>{k||wn!=="intent"||en()},mt=De=>{if(k||!wn||!Ur)return;const ut=De.currentTarget,cn=_a.get(ut);cn&&(clearTimeout(cn),_a.delete(ut))};return{...C,...Sn,...Qn,href:Ke?.href,ref:a,onClick:Ws([K,_i]),onBlur:Ws([$,mt]),onFocus:Ws([P,Ka]),onMouseEnter:Ws([G,Ka]),onMouseLeave:Ws([F,mt]),onTouchStart:Ws([re,au]),disabled:!!k,target:R,...un&&{style:un},...vi&&{className:vi},...k&&bA,..._n&&_A,...H&&bi&&SA}}var Pf={},vA={className:"active"},bA={role:"link","aria-disabled":!0},_A={"data-status":"active","aria-current":"page"},SA={"data-transitioning":"transitioning"},_a=new WeakMap,wA={rootMargin:"100px"},Ws=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function EA(e,t,s,a){if(!a)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function TA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var xh=ne.forwardRef((e,t)=>{const{_asChild:s,...a}=e,{type:l,...u}=yA(a,t),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return ne.createElement("a",p,c)}return ne.createElement(s,u,c)});function RA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var AA=class extends Uv{constructor(t){super(t),this.useMatch=s=>hs({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>C0({...s,from:this.id}),this.useSearch=s=>A0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>R0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>T0({...s,from:this.id}),this.useLoaderData=s=>E0({...s,from:this.id}),this.useNavigate=()=>O0({from:this.fullPath}),this.Link=gi.forwardRef((s,a)=>V.jsx(xh,{ref:a,from:this.fullPath,...s}))}};function OA(e){return new AA(e)}function CA(){return e=>kA(e)}var xA=class extends Ww{constructor(e){super(e),this.useMatch=t=>hs({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>C0({...t,from:this.id}),this.useSearch=t=>A0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>R0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>T0({...t,from:this.id}),this.useLoaderData=t=>E0({...t,from:this.id}),this.useNavigate=()=>O0({from:this.fullPath}),this.Link=gi.forwardRef((t,s)=>V.jsx(xh,{ref:s,from:this.fullPath,...t}))}};function kA(e){return new xA(e)}function kh(e){return new jA(e,{silent:!0}).createRoute}var jA=class{constructor(e,t){this.path=e,this.createRoute=s=>{const a=OA(s);return a.isRoot=!1,a},this.silent=t?.silent}};function jh(e,t){let s,a,l,u;const c=()=>(s||(s=e().then(p=>{s=void 0,a=p[t]}).catch(p=>{if(l=p,FS(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),s),d=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(Ul)Ul(c());else throw c();return ne.createElement(a,g)};return d.preload=c,d}function NA(e){const t=gt(),s=`not-found-${et(t.stores.location,a=>a.pathname)}-${et(t.stores.status,a=>a)}`;return V.jsx(Ah,{getResetKey:()=>s,onCatch:(a,l)=>{if(lt(a))e.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(lt(a))return e.fallback?.(a);throw a},children:e.children})}function MA(){return V.jsx("p",{children:"Not Found"})}function ii(e){return V.jsx(V.Fragment,{children:e.children})}function k0(e,t,s){return t.options.notFoundComponent?V.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?V.jsx(e.options.defaultNotFoundComponent,{...s}):V.jsx(MA,{})}function DA(e){return null}function UA(){return DA(gt()),null}
12var j0=ne.memo(function({matchId:t}){const s=gt(),a=s.stores.matchStores.get(t);a||jt();const l=et(s.stores.loadedAt,c=>c),u=et(a,c=>c);return V.jsx(LA,{router:s,matchId:t,resetKey:l,matchState:ne.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function LA({router:e,matchId:t,resetKey:s,matchState:a}){const l=e.routesById[a.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,c=u?V.jsx(u,{}):null,d=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,g=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",m=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?ne.Suspense:ii,b=d?Ah:ii,_=g?NA:ii;return V.jsxs(l.isRoot?l.options.shellComponent??ii:ii,{children:[V.jsx(Wl.Provider,{value:t,children:V.jsx(m,{fallback:c,children:V.jsx(b,{getResetKey:()=>s,errorComponent:d||Oh,onCatch:(w,T)=>{if(lt(w))throw w.routeId??=a.routeId,w;p?.(w,T)},children:V.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!g||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
12!l.isRoot)throw w;return ne.createElement(g,w)},children:y||a._displayPending?V.jsx(nA,{fallback:c,children:V.jsx(ky,{matchId:t})}):V.jsx(ky,{matchId:t})})})})}),a.parentRouteId===ls?V.jsxs(V.Fragment,{children:[V.jsx(zA,{resetKey:s}),e.options.scrollRestoration&&Ev?V.jsx(UA,{}):null]}):null]})}function zA({resetKey:e}){const t=gt(),s=ne.useRef(void 0);return wa(()=>{const a=t.latestLocation.href;(s.current===void 0||s.current!==a)&&(t.emit({type:"onRendered",...fi(t.stores.location.get(),t.stores.resolvedLocation.get())}),s.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var ky=ne.memo(function({matchId:t}){const s=gt(),a=(y,m)=>s.getMatch(y.id)?._nonReactive[m]??y._nonReactive[m],l=s.stores.matchStores.get(t);l||jt();const u=et(l,y=>y),c=u.routeId,d=s.routesById[c],p=ne.useMemo(()=>{const y=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=ne.useMemo(()=>{const y=d.options.component??s.options.defaultComponent;return y?V.jsx(y,{},p):V.jsx(N0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const y=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const m=s.getMatch(u.id);if(m&&!m._nonReactive.minPendingPromise){const b=cs();m._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),m._nonReactive.minPendingPromise=void 0},y)}}throw a(u,"loadPromise")}if(u.status==="notFound")return lt(u.error)||jt(),k0(s,d,u.error);if(u.status==="redirected")throw kt(u.error)||jt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),N0=ne.memo(function(){const t=gt(),s=ne.useContext(Wl);let a,l=!1,u;{const g=s?t.stores.matchStores.get(s):void 0;[a,l]=et(g,y=>[y?.routeId,y?.globalNotFound??!1]),u=et(t.stores.matchesId,y=>y[y.findIndex(m=>m===s)+1])}const c=a?t.routesById[a]:void 0,d=t.options.defaultPendingComponent?V.jsx(t.options.defaultPendingComponent,{}):null;if(l)return c||jt(),k0(t,c,void 0);if(!u)return null;const p=V.jsx(j0,{matchId:u});return a===ls?V.jsx(ne.Suspense,{fallback:d,children:p}):p});function PA(){const e=gt(),t=ne.useRef({router:e,mounted:!1}),[s,a]=ne.useState(!1),l=et(e.stores.isLoading,m=>m),u=et(e.stores.hasPending,m=>m),c=Mf(l),d=l||s||u,p=Mf(d),g=l||u,y=Mf(g);return e.startTransition=m=>{a(!0),ne.startTransition(()=>{m(),a(!1)})},ne.useEffect(()=>{const m=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return kr(e.latestLocation.publicHref)!==kr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{m()}},[e,e.history]),wa(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),wa(()=>{c&&!l&&e.emit({type:"onLoad",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,l]),wa(()=>{y&&!g&&e.emit({type:"onBeforeRouteMount",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,y,e]),wa(()=>{if(p&&!d){const m=fi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),S0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&eE(e)}},[d,p,e]),null}function BA(){const e=gt(),t=e.routesById[ls].options.pendingComponent??e.options.defaultPendingComponent,s=t?V.jsx(t,{}):null,a=V.jsxs(typeof document<"u"&&e.ssr?ii:ne.Suspense,{fallback:s,children:[V.jsx(PA,{}),V.jsx(IA,{})]});return e.options.InnerWrap?V.jsx(e.options.InnerWrap,{children:a}):a}function IA(){const e=gt(),t=et(e.stores.firstId,l=>l),s=et(e.stores.loadedAt,l=>l),a=t?V.jsx(j0,{matchId:t}):null;return V.jsx(Wl.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:V.jsx(Ah,{getResetKey:()=>s,errorComponent:Oh,onCatch:void 0,children:a})})}var HA=e=>({createMutableStore:Ry,createReadonlyStore:Ry,batch:S0}),qA=e=>new $A(e),$A=class extends Hw{constructor(e){super(e,HA)}};function GA({router:e,children:t,...s}){Object.keys(s).length>0&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const a=V.jsx(b0.Provider,{value:e,children:t});return e.options.Wrap?V.jsx(e.options.Wrap,{children:a}):a}function VA({router:e,...t}){return V.jsx(GA,{router:e,...t,children:V.jsx(BA,{})})}function M0(e){const{attrs:t,children:s,nonce:a}=e;switch(e.tag){case"title":return V.jsx("title",{...t,suppressHydrationWarning:!0,children:s});case"meta":return V.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return V.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});
12case"style":return e.inlineCss,V.jsx("style",{...t,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return V.jsx(KA,{attrs:t,children:s});default:return null}}function KA({attrs:e,children:t}){gt();const s=Ch(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(ne.useEffect(()=>{if(!a){if(e?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,d]of Object.entries(e))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof t=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",g=d.getAttribute("nonce")??void 0;return d.textContent===t&&p===l&&g===u}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[d,p]of Object.entries(e))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[e,t,a]),a&&typeof t=="string")return V.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return V.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return V.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var YA=e=>{const t=gt(),s=t.options.ssr?.nonce,a=et(t.stores.matches,g=>g.map(y=>y.meta).filter(Boolean),xt),l=ne.useMemo(()=>{const g=[],y={};let m;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const T=_[w];if(T)if(T.title)m||(m={tag:"title",children:T.title});else if("script:ld+json"in T)try{const E=JSON.stringify(T["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:WS(E)})}catch{}else{const E=T.name??T.property;if(E){if(y[E])continue;y[E]=!0}g.push({tag:"meta",attrs:{...T,nonce:s}})}}}return m&&g.push(m),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[a,s]),u=et(t.stores.matches,g=>{const y=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),m=t.ssr?.manifest,b=g.map(_=>m?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?Zw(m,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:uy(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},xt),c=et(t.stores.matches,g=>{const y=[];return g.map(m=>t.looseRoutesById[m.routeId]).forEach(m=>t.ssr?.manifest?.routes[m.id]?.preloads?.filter(Boolean).forEach(b=>{const _=Jw(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:uy(e,"modulepreload")??_.crossOrigin,nonce:s}})})),y},xt),d=et(t.stores.matches,g=>g.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"style",attrs:{...m,nonce:s},children:y})),xt),p=et(t.stores.matches,g=>g.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"script",attrs:{...m,nonce:s},children:y})),xt);return FA([...l,...c,...u,...d,...p],g=>JSON.stringify(g))};function FA(e,t){const s=new Set;return e.filter(a=>{const l=t(a);return s.has(l)?!1:(s.add(l),!0)})}function QA(e){const t=YA(e.assetCrossOrigin),s=gt().options.ssr?.nonce;return V.jsx(V.Fragment,{children:t.map(a=>ne.createElement(M0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var JA=()=>{const e=gt(),t=e.options.ssr?.nonce,s=u=>{const c=[],d=e.ssr?.manifest;return d?(u.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:t},children:g.children})})),c):[]},a=u=>u.map(c=>
12c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:c})),l=et(e.stores.matches,s,xt);return XA(e,et(e.stores.matches,a,xt),l)};function XA(e,t,s){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...t,...s];return a&&l.unshift(a),V.jsx(V.Fragment,{children:l.map((u,c)=>ne.createElement(M0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var as=(e,t)=>{const s={type:"request",...t||e};return{options:s,middleware:a=>as({},Object.assign(s,{middleware:a})),inputValidator:a=>as({},Object.assign(s,{inputValidator:a})),client:a=>as({},Object.assign(s,{client:a})),server:a=>as({},Object.assign(s,{server:a}))}};function D0(e,t){for(let s=0,a=t.length;s<a;s++){const l=t[s];e.has(l)||(e.add(l),l.extends&&D0(e,l.extends))}}var ZA=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const s=new Set;D0(s,t.serializationAdapters),t.serializationAdapters=Array.from(s)}return t},createMiddleware:as}),jy=function(){return jy=Object.assign||function(t){for(var s,a=1,l=arguments.length;a<l;a++){s=arguments[a];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(t[u]=s[u])}return t},jy.apply(this,arguments)};function eu(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s}function WA(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(e,t||[])).next())})}function lk(e,t,s){if(s||arguments.length===2)for(var a=0,l=t.length,u;a<l;a++)(u||!(a in t))&&(u||(u=Array.prototype.slice.call(t,0,a)),u[a]=t[a]);return e.concat(u||Array.prototype.slice.call(t))}const eO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Nh extends Error{constructor(t,s="FunctionsError",a){super(t),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class tO extends Nh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Ny extends Nh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class My extends Nh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var nh;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(nh||(nh={}));class nO{constructor(t,{headers:s={},customFetch:a,region:l=nh.Any}={}){this.url=t,this.headers=s,this.region=l,this.fetch=eO(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return WA(this,arguments,void 0,function*(s,a={}){var l;let u,c;try{const{headers:d,method:p,body:g,signal:y,timeout:m}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let T;g&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",T=g):typeof g=="string"?(b["Content-Type"]="text/plain",T=g):typeof FormData<"u"&&g instanceof FormData?T=g:(b["Content-Type"]="application/json",T=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?T=JSON.stringify(g):T=g;let E=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(E=c.signal,y.addEventListener("abort",()=>c.abort())):E=c.signal);const R=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:T,signal:E}).catch(K=>{throw new tO(K)}),k=R.headers.get("x-relay-error");
12if(k&&k==="true")throw new Ny(R);if(!R.ok)throw new My(R);let x=((l=R.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),M;return x==="application/json"?M=yield R.json():x==="application/octet-stream"||x==="application/pdf"?M=yield R.blob():x==="text/event-stream"?M=R:x==="multipart/form-data"?M=yield R.formData():M=yield R.text(),{data:M,error:null,response:R}}catch(d){return{data:null,error:d,response:d instanceof My||d instanceof Ny?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const U0=3,Dy=e=>Math.min(1e3*2**e,3e4),rO=[520,503],L0=["GET","HEAD","OPTIONS"];var Uy=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Ly(e,t){return new Promise(s=>{if(t?.aborted){s();return}const a=setTimeout(()=>{t?.removeEventListener("abort",l),s()},e);function l(){clearTimeout(a),s()}t?.addEventListener("abort",l)})}function sO(e,t,s,a){return!(!a||s>=U0||!L0.includes(e)||!rO.includes(t))}var iO=class{constructor(e){var t,s,a,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(s=e.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(l=e.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u
12=e.retry)!==null&&u!==void 0?u:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var s=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 c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(s.headers);c>0&&g.set("X-Retry-Count",String(c));let y;try{y=await a(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!L0.includes(s.method))throw m;if(s.retryEnabled&&c<U0){const b=Dy(c);c++,await Ly(b,s.signal);continue}throw m}if(sO(s.method,y.status,c,s.retryEnabled)){var d,p;const m=(d=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:Dy(c);await y.text(),c++,await Ly(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",y="";const m=c?.cause;if(m){var b,_,w,T;const k=(b=m?.message)!==null&&b!==void 0?b:"",x=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(T=m?.name)!==null&&T!==void 0?T:"Error"}: ${k}`,x&&(p+=` (${x})`),m?.stack&&(p+=` 15${m.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const R=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${R} 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.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",g="HTTP headers exceeded server limits (typically 16KB)",R>this.urlLengthLimit&&(g+=`. Your request URL is ${R} 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=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(e,t)}async processResponse(e){var t=this;let s=null,a=null,l=null,u=e.status,c=e.statusText;if(e.ok){var d,p;if(t.method!=="HEAD"){var g;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((g=t.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,t.shouldThrowOnError)throw new Uy({message:b,details:"",hint:"",code:""})}}const y=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),m=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(l=parseInt(m[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{s=JSON.parse(y),Array.isArray(s)&&e.status===404&&(a=[],s=null,u=200,c="OK")}catch{e.status===404&&y===""?(u=204,c="No Content"):s={message:y}}if(s&&t.shouldThrowOnError)throw new Uy(s)}return{success:s===null,error:s,data:a,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},aO=class extends iO{select(e){let t=!1;const s=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${e}`),this.url.searchParams.set(u,`${t-e+1}`),this}abortSignal(e){return this.signal=e,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}
15explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[e?"analyze":null,t?"verbose":null,s?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const zy=new RegExp("[,()]");var ai=class extends aO{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&zy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}notIn(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&zy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${s})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${l}fts${u}.${t}`),this}match(e){return Object.entries(e).filter(([t,s])=>s!==void 0).forEach(([t,s])=>{this.url.searchParams.append(t,`eq.${s}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}},oO=class{constructor(e,{headers:t={},schema:s,fetch:a,urlLengthLimit:l=8e3,retry:u}){this.url=e,this.headers=new Headers(t),this.schema=s,this.fetch=a,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:s=!1,count:a}=t??{},l=s?"HEAD":"GET";let u=!1;const c=(e??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new ai({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:s=!0}={}){var a;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(d.length>0){const p=[...new Set(d)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new ai({method:l,url:u,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),l||p.append("Prefer","missing=default"),Array.isArray(e)){const g=e.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);d.searchParams.set("columns",y.join(","))}}return new ai({method:c,url:d,headers:p,schema:this.schema,body:e,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var s;const a="PATCH",{url:l,headers:u}=this.cloneRequestState();return t&&u.append("Prefer",`count=${t}`),new ai({method:a,url:l,headers:u,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const s="DELETE",{url:a,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new ai({method:s,url:a,headers:l,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Da(e){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}function lO(e,t){if(Da(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Da(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uO(e){var t=lO(e,"string");return Da(t)=="symbol"?t:t+""}
15function cO(e,t,s){return(t=uO(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Py(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function gl(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(s),!0).forEach(function(a){cO(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Py(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var fO=class z0{constructor(t,{headers:s={},schema:a,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=t,this.headers=new Headers(s),this.schemaName=a,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,y);const w=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",w,{once:!0}),p(g,gl(gl({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(g,gl(gl({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new oO(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new z0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,s={},{head:a=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${t}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=a&&Object.values(s).some(y);m?(d="POST",g=s):a||l?(d=a?"HEAD":"GET",Object.entries(s).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([_,w])=>{p.searchParams.append(_,w)})):(d="POST",g=s);const b=new Headers(this.headers);return m?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new ai({method:d,url:p,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class hO{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof s.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"&&s.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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 l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,d=parseInt(c.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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let s=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(s+=` 18 19Suggested solution: ${t.workaround}`),new Error(s)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const dO="2.107.0",pO=`realtime-js/${dO}`,gO="1.0.0",P0="2.0.0",mO=P0,yO=1e4,vO=100,Rr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},B0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},rh={connecting:"connecting",closing:"closing",closed:"closed"};class bO{constructor(t){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=t??[]}encode(t,s){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var s;return this._isArrayBuffer((s=t.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,s,a){var l,u;
19const c=t.topic,d=(l=t.ref)!==null&&l!==void 0?l:"",p=(u=t.join_ref)!==null&&u!==void 0?u:"",g=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},m=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),T=0;w.setUint8(T++,this.KINDS.userBroadcastPush),w.setUint8(T++,p.length),w.setUint8(T++,d.length),w.setUint8(T++,c.length),w.setUint8(T++,g.length),w.setUint8(T++,m.length),w.setUint8(T++,s),Array.from(p,R=>w.setUint8(T++,R.charCodeAt(0))),Array.from(d,R=>w.setUint8(T++,R.charCodeAt(0))),Array.from(c,R=>w.setUint8(T++,R.charCodeAt(0))),Array.from(g,R=>w.setUint8(T++,R.charCodeAt(0))),Array.from(m,R=>w.setUint8(T++,R.charCodeAt(0)));var E=new Uint8Array(_.byteLength+a.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(a),_.byteLength),E.buffer}decode(t,s){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return s(a)}if(typeof t=="string"){const a=JSON.parse(t),[l,u,c,d,p]=a;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(t){const s=new DataView(t),a=s.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,s,l)}_decodeUserBroadcast(t,s,a){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=a.decode(t.slice(p,p+l));p=p+l;const y=a.decode(t.slice(p,p+u));p=p+u;const m=a.decode(t.slice(p,p+c));p=p+c;const b=t.slice(p,t.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,w={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(w.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var s;return t instanceof ArrayBuffer||((s=t?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(t,s){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>s.includes(a)))}}var Ue;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ue||(Ue={}));const By=(e,t,s={})=>{var a;const l=(a=s.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((u,c)=>(u[c]=_O(c,e,t,l),u),{}):{}},_O=(e,t,s,a)=>{const l=t.find(d=>d.name===e),u=l?.type,c=s[e];return u&&!a.includes(u)?I0(u,c):sh(c)},I0=(e,t)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return TO(t,s)}switch(e){case Ue.bool:return SO(t);case Ue.float4:case Ue.float8:case Ue.int2:case Ue.int4:case Ue.int8:case Ue.numeric:case Ue.oid:return wO(t);case Ue.json:case Ue.jsonb:return EO(t);case Ue.timestamp:return RO(t);case Ue.abstime:case Ue.date:case Ue.daterange:case Ue.int4range:case Ue.int8range:case Ue.money:case Ue.reltime:case Ue.text:case Ue.time:case Ue.timestamptz:case Ue.timetz:case Ue.tsrange:case Ue.tstzrange:return sh(t);default:return sh(t)}},sh=e=>e,SO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},wO=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},EO=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},TO=(e,t)=>{if(typeof e!="string")return e;const s=e.length-1,a=e[s];if(e[0]==="{"&&a==="}"){let u;const c=e.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>I0(t,d))}return e},RO=e=>typeof e=="string"?e.replace(" ","T"):e,H0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Aa=e=>typeof e=="function"?e:function(){return e},AO=typeof self<"u"?self:null,oi=typeof window<"u"?window:null,mn=AO||oi||globalThis,OO="2.0.0",CO=1e4,xO=1e3,vn={connecting:0,open:1,closing:2,closed:3},Ct={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Gn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ih={longpoll:"longpoll",websocket:"websocket"},kO={complete:4},ah="base64url.bearer.phx.",ml=class{constructor(e,t,s,a){this.channel=e,this.event=t,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 19
19oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:s}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}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,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},q0=class{constructor(e,t){this.callback=e,this.timerCalc=t,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(e,t,s){this.state=Ct.closed,this.topic=e,this.params=Aa(t||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ml(this,Gn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new q0(()=>{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=Ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Ct.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ct.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Ct.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 ml(this,Gn.leave,Aa({}),this.timeout).send(),this.state=Ct.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Gn.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ct.closed,this.bindings=[]}onClose(e){this.on(Gn.close,e)}onError(e){return this.on(Gn.error,t=>e(t))}on(e,t){let s=this.bindingRef++;return this.bindings.push({event:e,ref:s,callback:t}),s}off(e,t){this.bindings=this.bindings.filter(s=>!(s.event===e&&(typeof t>"u"||t===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,s=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new ml(this,e,function(){return t},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ct.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Gn.close,"leave")},s=new ml(this,Gn.leave,Aa({}),e);return s.receive("ok",()=>t()).receive("timeout",()=>t()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(e,t,s){return t}filterBindings(e,t,s){return!0}isMember(e,t,s,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ct.joining,this.joinPush.resend(e))}trigger(e,t,s,a){let l=this.onMessage(e,t,s,a);if(t&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,t,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ct.closed}isErrored(){return this.state===Ct.errored}isJoined(){return this.state===Ct.joined}isJoining(){return this.state===Ct.joining}isLeaving(){return this.state===Ct.leaving}},zl=class{static request(e,t,s,a,l,u,c){if(mn.XDomainRequest){let d=new mn.XDomainRequest;return this.xdomainRequest(d,e,t,a,l,u,c)}else if(mn.XMLHttpRequest){let d=new mn.XMLHttpRequest;return this.xhrRequest(d,e,t,s,a,l,u,c)}else{if(mn.fetch&&mn.AbortController)return this.fetchRequest(e,t,s,a,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,s,a,l,u,c){let d={method:e,headers:s,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),mn.fetch(t,d).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(e,t,s,a,l,u,c){return e.timeout=l,e.open(t,s),e.onload=()=>{let d=this.parseJSON(e.responseText);c&&c(d)},u&&(e.ontimeout=u),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,s,a,l,u,c,d){e.open(t,s,!0),e.timeout=u;for(let[p,g]of Object.entries(a))e.setRequestHeader(p,g);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===kO.complete&&d){let p=this.parseJSON(e.responseText);d(p)}},c&&(e.ontimeout=c),e.send(l),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let s=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let l=t?`${t}[${a}]`:a,u=e[a];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let s=e.match(/\?/)?"&":"?";return`${e}${s}${this.serialize(t)}`}},NO=e=>{let t="",s=new Uint8Array(e),a=s.byteLength;for(let l=0;l<a;l++)t+=String.fromCharCode(s[l]);return btoa(t)},ei=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(ah)&&(this.authToken=atob(t[1].slice(ah.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(e),this.readyState=vn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ih.websocket),"$1/"+ih.longpoll)}endpointURL(){return zl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,s){this.close(e,t,s),this.readyState=vn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===vn.open||this.readyState===vn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:s,token:a,messages:l}=t;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=vn.open,this.onopen({}),this.poll();break;
19case 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 ${s}`)}})}send(e){typeof e!="string"&&(e=NO(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,s){for(let l of this.reqs)l.abort();this.readyState=vn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,s,a,l){let u,c=()=>{this.reqs.delete(u),a()};u=zl.request(e,this.endpointURL(),t,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},MO=class Ea{constructor(t,s={}){let a=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ea.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ea.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Ea.syncDiff(this.state,l,u,c),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ea.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,s,a,l){let u=this.clone(t),c={},d={};return this.map(u,(p,g)=>{s[p]||(d[p]=g)}),this.map(s,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(T=>T.phx_ref),b=y.metas.map(T=>T.phx_ref),_=g.metas.filter(T=>b.indexOf(T.phx_ref)<0),w=y.metas.filter(T=>m.indexOf(T.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),w.length>0&&(d[p]=this.clone(y),d[p].metas=w)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:d},a,l)}static syncDiff(t,s,a,l){let{joins:u,leaves:c}=this.clone(s);return a||(a=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let g=t[d];if(t[d]=this.clone(p),g){let y=t[d].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[d].metas.unshift(...m)}a(d,g,p)}),this.map(c,(d,p)=>{let g=t[d];if(!g)return;let y=p.metas.map(m=>m.phx_ref);g.metas=g.metas.filter(m=>y.indexOf(m.phx_ref)<0),l(d,g,p),g.metas.length===0&&delete t[d]}),t}static list(t,s){return s||(s=function(a,l){return l}),this.map(t,(a,l)=>s(a,l))}static map(t,s){return Object.getOwnPropertyNames(t).map(a=>s(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},yl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(s))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[s,a,l,u,c]=JSON.parse(e);return t({join_ref:s,ref:a,topic:l,event:u,payload:c})}},binaryEncode(e){let{join_ref:t,ref:s,event:a,topic:l,payload:u}=e,c=this.META_LENGTH+t.length+s.length+l.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,t.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,a.length),Array.from(t,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(s,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(l,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(d.byteLength+u.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(u),d.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),s=t.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(e.slice(c,c+a));c=c+a;let p=s.decode(e.slice(c,c+l));c=c+l;let g=s.decode(e.slice(c,c+u));c=c+u;let y=e.slice(c,e.byteLength);return{join_ref:d,ref:null,topic:p,event:g,payload:y}},decodeReply(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(e.slice(d,d+a));d=d+a;let g=s.decode(e.slice(d,d+l));d=d+l;let y=s.decode(e.slice(d,d+u));d=d+u;let m=s.decode(e.slice(d,d+c));d=d+c;let b=e.slice(d,e.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:Gn.reply,payload:_}}
20,decodeBroadcast(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(e.slice(u,u+a));u=u+a;let d=s.decode(e.slice(u,u+l));u=u+l;let p=e.slice(u,e.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:p}}},DO=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||CO,this.transport=t.transport||mn.WebSocket||ei,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=mn&&mn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=yl.encode.bind(yl),this.defaultDecoder=yl.decode.bind(yl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ei?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;oi&&oi.addEventListener&&(oi.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),oi.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),oi.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>t.rejoinAfterMs?t.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>t.reconnectAfterMs?t.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Aa(t.params||{}),this.endPoint=`${e}/${ih.websocket}`,this.vsn=t.vsn||OO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new q0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ei}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=zl.appendParams(zl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,s)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Aa(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ei?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ei,this.longPollFallbackMs):this.transportConnect())}log(e,t,s){this.logger&&this.logger(e,t,s)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(l=>{l.ref===t&&(this.off([a]),e(Date.now()-s))});return!0}transportName(e){return e===ei?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${ah}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let s=!1,a=!0,l,u,c=this.transportName(e),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),u=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(p=>{this.log("transport","connected to primary after",p),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(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),xO,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,s){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,s=1){if(s===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,s+1)},150*s)}waitForSocketClosed(e,t,s=1){if(s===5||e.readyState===vn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,s+1)},150*s)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",e,t,s),(t===this.transport||s>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Gn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case vn.connecting:return"connecting";case vn.open:return"open";case vn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([s])=>e.indexOf(s)===-1)}channel(e,t={}){let s=new jO(e,t,this);return this.channels.push(s),s}push(e){if(this.hasLogger()){let{topic:t,event:s,payload:a,ref:l,join_ref:u}=e;this.log("push",`${t} ${s} (${u}, ${l})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}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(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:s,event:a,payload:l,ref:u,join_ref:c}=t;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${a} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,a,l,c)&&p.trigger(a,l,u,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([s,a])=>{try{a(...t)}catch(l){this.log("error",`error in ${e} callback`,l)}})}catch(s){this.log("error",`error triggering ${e} callbacks`,s)}}leaveOpenTopic(e){let t=this.channels.find(s=>s.topic===e&&(s.isJoined()||s.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Oa{constructor(t,s){const a=LO(s);this.presence=new MO(t.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=Oa.onJoinPayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=Oa.onLeavePayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Oa.transformState(this.presence.state)}static transformState(t){return t=UO(t),Object.getOwnPropertyNames(t).reduce((s,a)=>{const l=t[a];return s[a]=xl(l),s},{})}static onJoinPayload(t,s,a){const l=Iy(s),u=xl(a);return{event:"join",key:t,currentPresences:l,newPresences:u}}static onLeavePayload(t,s,a){const l=Iy(s),u=xl(a);return{event:"leave",key:t,currentPresences:l,leftPresences:u}}}function xl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function UO(e){return JSON.parse(JSON.stringify(e))}function LO(e){return e?.events&&{events:e.events}}function Iy(e){return e?.metas?xl(e):[]}var Hy;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Hy||(Hy={}));class zO{get state(){return this.presenceAdapter.state}constructor(t,s){this.channel=t,this.presenceAdapter=new Oa(this.channel.channelAdapter,s)}}function PO(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const s=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${s}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class BO{constructor(t,s,a){const l=IO(a);this.channel=t.getSocket().channel(s,l),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,s){return this.channel.on(t,s)}off(t,s){this.channel.off(t,s)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,s,a){let l;try{l=this.channel.push(t,s,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>vO){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(t){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),t)}canPush(){return this.socket.isConnected()&&this.state===Rr.joined}isJoined(){return this.state===Rr.joined}isJoining(){return this.state===Rr.joining}isClosed(){return this.state===Rr.closed}isLeaving(){return this.state===Rr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function IO(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var qy;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qy||(qy={}));var ci;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ci||(ci={}));var Vn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Vn||(Vn={}));class Ca{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,s={config:{}},a){var l,u;if(this.topic=t,this.params=s,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new BO(this.socket.socketAdapter,t,this.params),this.presence=new zO(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=H0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,s=this.timeout){var a,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,g=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[ci.PRESENCE]&&this.bindings[ci.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,m={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(Vn.CHANNEL_ERROR,PO(_))}),this._onClose(()=>t?.(Vn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(Vn.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Rr.errored;const w=Object.values(_).join(", ")||"error";t?.(Vn.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(Vn.TIMED_OUT)})}return this}_updatePostgresBindings(t,s){var a;const l=this.bindings.postgres_changes,u=(a=l?.length)!==null&&a!==void 0?a:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=t&&t[d];if(_&&_.event===g&&Ca.isFilterValueEqual(_.schema,y)&&Ca.isFilterValueEqual(_.table,m)&&Ca.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Rr.errored,s?.(Vn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Rr.errored&&s&&s(Vn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,s={}){return await this.send({type:"presence",event:"track",payload:t},s.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,s,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=t===ci.PRESENCE||t===ci.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,s,a)}async httpSend(t,s,a={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&d.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?s:JSON.stringify(s)},g=await this._fetchWithTimeout(d.toString(),p,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(g.status===202)return{success:!0};let y=g.statusText;try{const m=await g.json();y=m.error||m.message||y}catch{}return Promise.reject(new Error(y))}async send(t,s={}){var a,l;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a:this.timeout);return await((l=g.body)===null||l===void 0?void 0:l.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,d,p;const g=this.channelAdapter.push(t.type,t,s.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,s,a){const l=new AbortController,u=setTimeout(()=>l.abort(),a),c=await this.socket.fetch(t,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(t,s,a){const l=t.toLocaleLowerCase(),u=this.channelAdapter.on(t,a),c={type:l,filter:s,callback:a,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,s,a)=>{var l,u,c,d,p,g,y;const m=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,a))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,w=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((y=s?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(t,s){const{close:a,error:l,leave:u,join:c}=B0;return s&&[a,l,u,c].includes(t)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,s,a)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in t.bindings)for(const a of t.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,s){return(t??void 0)===(s??void 0)}_getPayloadRecords(t){const s={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(s.new=By(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(s.old=By(t.columns,t.old_record)),s}}class HO{constructor(t,s){this.socket=new DO(t,s)}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(t){this.socket.heartbeatCallback=t}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(t,s,a,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{t(),u("ok")},s,a)})}push(t){this.socket.push(t)}log(t,s,a){this.socket.log(t,s,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==rh.connecting}isDisconnecting(){return this.socket.connectionState()==rh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const $y={HEARTBEAT_INTERVAL:25e3},qO=[1e3,2e3,5e3,1e4],$O=1e4;function GO(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var s;return(s=Array.from(e.keys())[t])!==null&&s!==void 0?s:null},removeItem(t){e.delete(t)},setItem(t,s){e.set(t,String(s))}}}function VO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return GO()}const KO=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class YO{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(t,s){var a;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 bO,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((a=s?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new HO(t,l),this.httpEndpoint=H0(t),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const s=t.message;throw s.includes("Node.js")?new Error(`${s} 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: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,s)}getChannels(){return this.channels}async removeChannel(t){const s=await t.unsubscribe();return s==="ok"&&t.teardown(),s}async removeAllChannels(){const t=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),s=await Promise.all(t);return await this.disconnect(),s}log(t,s,a){this.socketAdapter.log(t,s,a)}connectionState(){return this.socketAdapter.connectionState()||rh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,s={config:{}}){const a=`realtime:${t}`,l=this.getChannels().find(u=>u.topic===a);if(l)return l;{const u=new Ca(`realtime:${t}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(s=>s.topic!==t.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(t=null){let s,a=!1;if(t)s=t,a=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:pO};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(B0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${t}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(s,a)=>{s=="sent"&&this._setAuthSafely(),t&&t(s,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.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(t){let s;if(t)s=t;else{const a=new Blob([KO],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(t){var s,a,l,u,c,d,p,g,y,m,b,_;this.worker=(s=t?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const w={};w.timeout=(l=t?.timeout)!==null&&l!==void 0?l:yO,w.heartbeatIntervalMs=(u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:$y.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:$y.HEARTBEAT_INTERVAL),w.transport=(p=t?.transport)!==null&&p!==void 0?p:hO.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(g=t?.sessionStorage)!==null&&g!==void 0?g:VO(),w.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(k=>qO[k-1]||$O);let T,E;const R=(m=t?.vsn)!==null&&m!==void 0?m:mO;switch(R){case gO:T=(k,x)=>x(JSON.stringify(k)),E=(k,x)=>x(JSON.parse(k));break;case P0:T=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=R,w.encode=(b=t?.encode)!==null&&b!==void 0?b:T,w.decode=(_=t?.decode)!==null&&_!==void 0?_:E,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var Ua=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function FO(e,t,s){const a=new URL(t,e);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&a.searchParams.set(l,u);return a.toString()}async function QO(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function JO(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:l,body:u,headers:c}){const d=FO(e.baseUrl,a,l),p=await QO(e.auth),g=await t(d,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const _=m?b:void 0,w=_?.error;throw new Ua(w?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function vl(e){return e.join("�")}var XO=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:vl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const s={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vl(e.namespace)}`}),!0}catch(t){if(t instanceof Ua&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(s){if(s instanceof Ua&&s.status===409)return;throw s}}};function ti(e){return e.join("�")}var ZO=class{constructor(e,t="",s){this.client=e,this.prefix=t,this.accessDelegation=s}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables`,body:t,headers:s})).data.metadata}async updateTable(e,t){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(s){if(s instanceof Ua&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(s){if(s instanceof Ua&&s.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw s}}},WO=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const s=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=JO({baseUrl:s,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new XO(this.client,t),this.tableOps=new ZO(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function e1(e,t){if(La(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(La(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t1(e){var t=e1(e,"string");return La(t)=="symbol"?t:t+""}function n1(e,t,s){return(t=t1(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Gy(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function le(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Gy(Object(s),!0).forEach(function(a){n1(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Gy(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var tu=class extends Error{constructor(e,t="storage",s,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function nu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var oh=class extends tu{constructor(e,t,s,a="storage"){super(e,a,t,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=s}toJSON(){return le({},super.toJSON())}},$0=class extends tu{constructor(e,t,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Pl(e,t,s){const a=le({},e),l=t.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===l&&delete a[u];return a[l]=s,a}function r1(e){const t={};for(const[s,a]of Object.entries(e))t[s.toLowerCase()]=a;return t}const s1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),i1=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},lh=e=>{if(Array.isArray(e))return e.map(s=>lh(s));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([s,a])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));t[l]=lh(a)}),t},a1=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Vy=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const s=t.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(e)},o1=async(e,t,s,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const l=e;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const d=c?.statusCode||c?.code||u+"";t(new oh(Vy(c),u,d,a))}).catch(()=>{const c=u+"";t(new oh(l.statusText||`HTTP ${u} error`,u,c,a))})}else t(new $0(Vy(e),e,a))},l1=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return le(le({},l),s);if(i1(a)){var u;const c=t?.headers||{};let d;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=g);l.headers=Pl(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return t?.duplex&&(l.duplex=t.duplex),le(le({},l),s)};async function Sa(e,t,s,a,l,u,c){return new Promise((d,p)=>{e(s,l1(t,a,l,u)).then(g=>{if(!g.ok)throw g;if(a?.noResolveJson)return g;if(c==="vectors"){const y=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!y||!y.includes("application/json"))return{}}return g.json()}).then(g=>d(g)).catch(g=>o1(g,p,a,c))})}function G0(e="storage"){return{get:async(t,s,a,l)=>Sa(t,"GET",s,a,l,void 0,e),post:async(t,s,a,l,u)=>Sa(t,"POST",s,l,u,a,e),put:async(t,s,a,l,u)=>Sa(t,"PUT",s,l,u,a,e),head:async(t,s,a,l)=>Sa(t,"HEAD",s,le(le({},a),{},{noResolveJson:!0}),l,void 0,e),remove:async(t,s,a,l,u)=>Sa(t,"DELETE",s,l,u,a,e)}}const u1=G0("storage"),{get:za,post:an,put:uh,head:c1,remove:Mh}=u1,Ht=G0("vectors");var yi=class{constructor(e,t={},s,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=r1(t),this.fetch=s1(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Pl(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(nu(s))return{data:null,error:s};throw s}}};let V0;V0=Symbol.toStringTag;var f1=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[V0]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(nu(t))return{data:null,error:t};throw t}}};let K0;K0=Symbol.toStringTag;var h1=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[K0]="BlobDownloadBuilder",this.promise=null}asStream(){return new f1(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(nu(t))return{data:null,error:t};throw t}}};const d1={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ky={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var p1=class extends yi{constructor(e,t={},s,a){super(e,t,a,"storage"),this.bucketId=s}async uploadOrUpdate(e,t,s,a){var l=this;return l.handleOperation(async()=>{let u;const c=le(le({},Ky),a);let d=le(le({},l.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=Pl(d,b,_);const g=l._removeEmptyFolders(t),y=l._getFinalPath(g),m=await(e=="PUT"?uh:an)(l.fetch,`${l.url}/object/${y}`,u,le({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(e,t,s){return this.uploadOrUpdate("POST",e,t,s)}async uploadToSignedUrl(e,t,s,a){var l=this;const u=l._removeEmptyFolders(e),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",t),l.handleOperation(async()=>{let p;const g=le(le({},Ky),a);let y=le(le({},l.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",l.encodeMetadata(m)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(m))):(p=s,y["cache-control"]=`max-age=${g.cac
38heControl}`,y["content-type"]=g.contentType,m&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(m))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))y=Pl(y,b,_);return{path:u,fullPath:(await uh(l.fetch,d.toString(),p,le({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(e);const l=le({},s.headers);t?.upsert&&(l["x-upsert"]="true");const u=await an(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new tu("No token returned by API");return{signedUrl:c.toString(),path:e,token:d}})}async update(e,t,s){return this.uploadOrUpdate("PUT",e,t,s)}async move(e,t,s){var a=this;return a.handleOperation(async()=>await an(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(e,t,s){var a=this;return a.handleOperation(async()=>({path:(await an(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,s){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(e);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await an(a.fetch,`${a.url}/object/sign/${l}`,le({expiresIn:t},u?{transform:s.transform}:{}),{headers:a.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,s){var a=this;return a.handleOperation(async()=>{const l=await an(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(d=>le(le({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,s){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(l,t.transform),t?.cacheNonce!=null&&l.set("cacheNonce",String(t.cacheNonce));const u=l.toString(),c=this._getFinalPath(e),d=()=>za(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new h1(d,this.shouldThrowOnError)}async info(e){var t=this;const s=t._getFinalPath(e);return t.handleOperation(async()=>lh(await za(t.fetch,`${t.url}/object/info/${s}`,{headers:t.headers})))}async exists(e){var t=this;const s=t._getFinalPath(e);try{return await c1(t.fetch,`${t.url}/object/${s}`,{headers:t.headers}),{data:!0,error:null}}catch(l){if(t.shouldThrowOnError)throw l;if(nu(l)){var a;const u=l instanceof oh?l.status:l instanceof $0?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(e,t){const s=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const l=a.toString(),u=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Mh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,s){var a=this;return a.handleOperation(async()=>{const l=le(le(le({},d1),t),{},{prefix:e||""});return await an(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},s)})}async listV2(e,t){var s=this;return s.handleOperation(async()=>{const a=le({},e);return await an(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const g1="2.107.0",Ga={"X-Client-Info":`storage-js/${g1}`};var m1=class extends yi{constructor(e,t={},s,a){const l=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=le(le({},Ga),t);super(u,c,s,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=t.listBucketOptionsToQueryString(e);return await za(t.fetch,`${t.url}/bucket${s}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await za(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var s=this;return s.handleOperation(async()=>await an(s.fetch,`${s.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async updateBucket(e,t){var s=this;return s.handleOperation(async()=>await uh(s.fetch,`${s.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await an(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Mh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},y1=class extends yi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=le(le({},Ga),t);super(a,l,s,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await an(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=new URLSearchParams;e?.limit!==void 0&&s.set("limit",e.limit.toString()),e?.offset!==void 0&&s.set("offset",e.offset.toString()),e?.sortColumn&&s.set("sortColumn",e.sortColumn),e?.sortOrder&&s.set("sortOrder",e.sortOrder),e?.search&&s.set("search",e.search);const a=s.toString(),l=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await za(t.fetch,l,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Mh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!a1(e))throw new tu("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 s=new WO({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},v1=class extends yi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=le(le({},Ga),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var s=this;return s.handleOperation(async()=>await Ht.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var s=this;return s.handleOperation(async()=>await Ht.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers})||{})}},b1=class extends yi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=le(le({},Ga),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},_1=class extends yi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=le(le({},Ga),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ht.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},S1=class extends _1{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new w1(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,s=this;return t().call(s,e)}async getBucket(e){var t=()=>super.getBucket,s=this;return t().call(s,e)}async listBuckets(e={}){var t=()=>super.listBuckets,s=this;return t().call(s,e)}async deleteBucket(e){var t=()=>super.deleteBucket,s=this;return t().call(s,e)}},w1=class extends v1{constructor(e,t,s,a){super(e,t,a),this.vectorBucketName=s}async createIndex(e){var t=()=>super.createIndex,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,s=this;return t().call(s,s.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,s=this;return t().call(s,s.vectorBucketName,e)}index(e){return new E1(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},E1=class extends b1{constructor(e,t,s,a,l){super(e,t,l),this.vectorBucketName=s,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var t=()=>super.getVectors,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,s=this;return t().call(s,le(le({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},T1=class extends m1{constructor(e,t={},s,a){super(e,t,s,a)}from(e){return new p1(this.url,this.headers,e,this.fetch)}get vectors(){return new S1(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new y1(this.url+"/iceberg",this.headers,this.fetch)}};const Y0="2.107.0",wr=30*1e3,Ta=3,Bf=Ta*wr,R1="http://localhost:9999",A1="supabase.auth.token",O1={"X-Client-Info":`gotrue-js/${Y0}`},ch="X-Supabase-Api-Version",F0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},C1=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,x1=600*1e3;class Pa extends Error{constructor(t,s,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function J(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class k1 extends Pa{constructor(t,s,a){super(t,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function j1(e){return J(e)&&e.name==="AuthApiError"}
38class ln extends Pa{constructor(t,s){super(t),this.name="AuthUnknownError",this.originalError=s}}class bn extends Pa{constructor(t,s,a,l){super(t,a,l),this.name=s,this.status=a}}class ot extends bn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function bl(e){return J(e)&&e.name==="AuthSessionMissingError"}class ni extends bn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class _l extends bn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Sl extends bn{constructor(t,s=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function N1(e){return J(e)&&e.name==="AuthImplicitGrantRedirectError"}class Yy extends bn{constructor(t,s=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class M1 extends bn{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 fh extends bn{constructor(t,s){super(t,"AuthRetryableFetchError",s,void 0)}}function If(e){return J(e)&&e.name==="AuthRetryableFetchError"}class Fy extends bn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function D1(e){return J(e)&&e.name==="AuthRefreshDiscardedError"}class Qy extends bn{constructor(t,s,a){super(t,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Bl extends bn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Jy=` 39\r=`.split(""),U1=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Jy.length;t+=1)e[Jy[t].charCodeAt(0)]=-2;for(let t=0;t<Il.length;t+=1)e[Il[t].charCodeAt(0)]=t;return e})();function Xy(e,t,s){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Il[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Il[a]),t.queuedBits-=6}}function Q0(e,t,s){const a=U1[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)s(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Zy(e){const t=[],s=c=>{t.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{P1(c,a,s)};for(let c=0;c<e.length;c+=1)Q0(e.charCodeAt(c),l,u);return t.join("")}function L1(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function z1(e,t){for(let s=0;s<e.length;s+=1){let a=e.charCodeAt(s);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(e.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}L1(a,t)}}function P1(e,t,s){if(t.utf8seq===0){if(e<=127){s(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&s(t.codepoint)}}function pi(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)Q0(e.charCodeAt(l),s,a);return new Uint8Array(t)}function B1(e){const t=[];return z1(e,s=>t.push(s)),new Uint8Array(t)}function os(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};return e.forEach(l=>
39Xy(l,s,a)),Xy(null,s,a),t.join("")}function I1(e){return Math.round(Date.now()/1e3)+e}function H1(){return Symbol("auth-callback")}const vt=()=>typeof window<"u"&&typeof document<"u",ts={tested:!1,writable:!1},J0=()=>{if(!vt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ts.tested)return ts.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ts.tested=!0,ts.writable=!0}catch{ts.tested=!0,ts.writable=!1}return ts.writable};function q1(e){const t={},s=new URL(e);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((l,u)=>{t[u]=l})}catch{}return s.searchParams.forEach((a,l)=>{t[l]=a}),t}const X0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),$1=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",li=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},qn=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch{return null}},rt=async(e,t)=>{await e.removeItem(t)};class ru{constructor(){this.promise=new ru.promiseConstructor((t,s)=>{this.resolve=t,this.reject=s})}}ru.promiseConstructor=Promise;function wl(e){const t=e.split(".");if(t.length!==3)throw new Bl("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!C1.test(t[a]))throw new Bl("JWT not in base64url format");return{header:JSON.parse(Zy(t[0])),payload:JSON.parse(Zy(t[1])),signature:pi(t[2]),raw:{header:t[0],payload:t[1]}}}async function G1(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function V1(e,t){return new Promise((a,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await e(u);if(!t(u,null,c)){a(c);return}}catch(c){if(!t(u,c)){l(c);return}}})()})}function K1(e){return("0"+e.toString(16)).substr(-2)}function Y1(){const t=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(t),Array.from(t,K1).join("")}async function F1(e){const s=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(a);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function Q1(e){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."),e;const s=await F1(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ri(e,t,s=!1){const a=Y1();let l=a;s&&(l+="/recovery"),await li(e,`${t}-code-verifier`,l);const u=await Q1(a);return[u,a===u?"plain":"s256"]}const J1=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function X1(e){const t=e.headers.get(ch);if(!t||!t.match(J1))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Z1(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function W1(e){switch(e){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 eC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function $n(e){if(!eC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function sn(e){if(!e.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 Hf(){const e={};return new Proxy(e,{get:(t,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="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 "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function tC(e,t){return new Proxy(e,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
39if(typeof a=="symbol"){const u=a.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,a,l)}return!t.value&&typeof a=="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."),t.value=!0),Reflect.get(s,a,l)}})}function Wy(e){return JSON.parse(JSON.stringify(e))}const ns=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},nC=[502,503,504,520,521,522,523,524,530];async function ev(e){var t;if(!$1(e))throw new fh(ns(e),0);if(nC.includes(e.status))throw new fh(ns(e),e.status);let s;try{s=await e.json()}catch(u){throw new ln(ns(u),u)}let a;const l=X1(e);if(l&&l.getTime()>=F0["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new Qy(ns(s),e.status,((t=s.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new ot}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Qy(ns(s),e.status,s.weak_password.reasons);throw new k1(ns(s),e.status||500,a)}const rC=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),l.body=JSON.stringify(a),Object.assign(Object.assign({},l),s))};async function W(e,t,s,a){var l;const u=Object.assign({},a?.headers);u[ch]||(u[ch]=F0["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await sC(e,t,s+d,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function sC(e,t,s,a,l,u){const c=rC(t,a,l,u);let d;try{d=await e(s,Object.assign({},c))}catch(p){throw console.error(p),new fh(ns(p),0)}if(d.ok||await ev(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await ev(p)}}function Zt(e){var t;let s=null;oC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=I1(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:s,user:a},error:null}}function tv(e){const t=Zt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ar(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function iC(e){return{data:e,error:null}}function aC(e){const{action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=e,c=eu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function nv(e){return e}function oC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const qf=["global","local","others"];class lC{constructor({url:t="",headers:s={},fetch:a,experimental:l}){this.url=t,this.headers=s,this.fetch=X0(a),this.experimental=l??{},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(t,s=qf[0]){if(qf.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qf.join(", ")}`);try{return await W(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(J(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,s={}){try{return await W(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Ar})}catch(a){if(J(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:s}=t,a=eu(t,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await W(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:aC,redirectTo:s?.redirectTo})}catch(s){if(J(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(t){try{return await W(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ar})}catch(s){if(J(s))return{data:{user:null},error:s};throw s}}async listUsers(t){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},y=await W(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:nv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const T=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=T}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(J(g))return{data:{users:[]},error:g};throw g}}async getUserById(t){$n(t);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ar})}catch(s){if(J(s))return{data:{user:null},error:s};throw s}}async updateUserById(t,s){$n(t);try{return await W(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:s,headers:this.headers,xform:Ar})}catch(a){if(J(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,s=!1){$n(t);
39try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:s},xform:Ar})}catch(a){if(J(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){$n(t.userId);try{const{data:s,error:a}=await W(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:a}}catch(s){if(J(s))return{data:null,error:s};throw s}}async _deleteFactor(t){$n(t.userId),$n(t.id);try{return{data:await W(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(s){if(J(s))return{data:null,error:s};throw s}}async _listOAuthClients(t){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},y=await W(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:nv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const T=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=T}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(J(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _getOAuthClient(t){try{return await W(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _updateOAuthClient(t,s){try{return await W(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(J(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await W(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(J(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _listCustomProviders(t){try{const s={};return t?.type&&(s.type=t.type),await W(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(J(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(t){try{return await W(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _getCustomProvider(t){try{return await W(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _updateCustomProvider(t,s){try{return await W(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(J(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await W(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(J(s))return{data:null,error:s};throw s}}async _adminListPasskeys(t){sn(this.experimental),$n(t.userId);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(J(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(t){sn(this.experimental),$n(t.userId),$n(t.passkeyId);
39try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(J(s))return{data:null,error:s};throw s}}}function rv(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}globalThis&&J0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class uC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function cC(){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 Z0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function fC(e){return parseInt(e,16)}function hC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function dC(e){var t;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:g,scheme:y,uri:m,version:b}=e;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=Z0(e.address),w=y?`${y}://${a}`:a,T=e.statement?`${e.statement} 41`:"",E=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${T}`;let R=`URI: ${m} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(R+=` 49Expiration Time: ${l.toISOString()}`),d&&(R+=` 50Not Before: ${d.toISOString()}`),p&&(R+=` 51Request ID: ${p}`),g){let k=` 52Resources:`;for(const x of g){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);k+=` 53- ${x}`}R+=k}return`${E} 54${R}`}class We extends Error{constructor({message:t,code:s,cause:a,name:l}){var u;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=l??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Hl extends We{constructor(t,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:t}),this.name="WebAuthnUnknownError",this.originalError=s}}function pC({error:e,options:t}){var s,a,l;const{publicKey:u}=t;if(!u)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new We({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new We({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new We({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new We({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new We({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new We({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new We({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const c=window.location.hostname;if(W0(c)){if(u.rp.id!==c)return new We({message:`The RP ID "${u.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new We({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new We({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function gC({error:e,options:t}){const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new We({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(W0(a)){if(s.rpId!==a)return new We({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new We({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class mC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const hh=new mC;function sv(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:s,excludeCredentials:a}=e,l=eu(e,["challenge","user","excludeCredentials"]),u=pi(t).buffer,c=Object.assign(Object.assign({},s),{id:pi(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const g=a[p];d.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:pi(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function iv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:s}=e,a=eu(e,["challenge","allowCredentials"]),l=pi(t).buffer,u=Object.assign(Object.assign({},a),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:pi(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function av(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e;return{id:e.id,rawId:e.id,response:{attestationObject:os(new Uint8Array(e.response.attestationObject)),clientDataJSON:os(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ov(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e,a=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:os(new Uint8Array(l.authenticatorData)),clientDataJSON:os(new Uint8Array(l.clientDataJSON)),signature:os(new Uint8Array(l.signature)),userHandle:l.userHandle?os(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function W0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ql(){var e,t;return!!(vt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function eb(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hl("Browser returned unexpected credential type",t)}:{data:null,error:new Hl("Empty credential response",t)}}
54catch(t){return{data:null,error:pC({error:t,options:e})}}}async function tb(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hl("Browser returned unexpected credential type",t)}:{data:null,error:new Hl("Empty credential response",t)}}catch(t){return{data:null,error:gC({error:t,options:e})}}}const yC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},vC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function $l(...e){const t=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of e)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(s(c))a[u]=c;else if(t(c)){const d=a[u];t(d)?a[u]=$l(d,c):a[u]=$l(c)}else a[u]=c}return a}function bC(e,t){return $l(yC,e,t||{})}function _C(e,t){return $l(vC,e,t||{})}class SC{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:s,friendlyName:a,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:s});if(!d)return{data:null,error:p};const g=l??hh.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const m=a;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${w}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=bC(d.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await eb({publicKey:y,signal:g});return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=_C(d.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await tb(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(d){return J(d)?{data:null,error:d}:{data:null,error:new ln("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Pa("rpId is required for WebAuthn authentication")};try{if(!ql())return{data:null,error:new ln("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:t,webauthn:{rpId:s,rpOrigins:a},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return J(c)?{data:null,error:c}:{data:null,error:new ln("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Pa("rpId is required for WebAuthn registration")};try{if(!ql())return{data:null,error:new ln("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:t});if(!c)return await this.client.mfa.listFactors().then(y=>{var m;return(m=y.data)===null||m===void 0?void 0:m.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:d};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return J(c)?{data:null,error:c}:{data:null,error:new ln("Unexpected error in register",c)}}}}cC();const wC={url:R1,storageKey:A1,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:O1,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},si={};class Ba{get jwks(){var t,s;return(s=(t=si[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,s;return(s=(t=si[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{cachedAt:t})}constructor(t){var s,a,l;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 u=Object.assign(Object.assign({},wC),t);
54if(this.storageKey=u.storageKey,this.instanceID=(s=Ba.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,Ba.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&vt()){const c=`${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(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new lC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=X0(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.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 SC(this)},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?(u.storage?this.storage=u.storage:J0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=rv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=rv(this.memoryStorage)),vt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Y0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),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 t;try{let s={},a="none";if(vt()&&(s=q1(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),vt()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),N1(u)){const p=(t=u.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return J(s)?this._returnResult({error:s}):this._returnResult({error:new ln("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var s,a,l;try{const u=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=t?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=t?.options)===null||l===void 0?void 0:l.captchaToken}},xform:Zt}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(J(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(t){var s,a,l;try{let u;if("email"in t){const{email:y,password:m,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await ri(this.storage,this.storageKey)),u=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:Zt})}else if("phone"in t){const{phone:y,password:m,options:b}=t;u=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Zt})}else throw new _l("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await rt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let s;if("email"in t){const{email:u,password:c,options:d}=t;s=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:tv})}else if("phone"in t){const{phone:u,password:c,options:d}=t;s=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:tv})}else throw new _l("You must provide either an email or phone number and a password");const{data:a,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const u=new ni;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(s){if(J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(t){var s,a,l,u;return await this._handleProviderSignIn(t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=t.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:s}=t;switch(s){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(t){var s,a,l,u,c,d,p,g,y,m,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:T,wallet:E,statement:R,options:k}=t;let x;if(vt())if(typeof E=="object")x=E;else{const F=window;if("ethereum"in F&&typeof F.ethereum=="object"&&"request"in F.ethereum&&typeof F.ethereum.request=="function")x=F.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 E!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=E}const M=new URL((s=k?.url)!==null&&s!==void 0?s:window.location.href),K=await x.request({method:"eth_requestAccounts"}).then(F=>F).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!K||K.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const $=Z0(K[0]);let P=(a=k?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!P){const F=await x.request({method:"eth_chainId"});P=fC(F)}const G={domain:M.host,address:$,statement:R,uri:M.href,version:"1",chainId:P,nonce:(l=k?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=k?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=k?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=k?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=k?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=k?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=dC(G),w=await x.request({method:"personal_sign",params:[hC(_),$]})}try{const{data:T,error:E}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Zt});if(E)throw E;if(!T||!T.session||!T.user){const R=new ni;return this._returnResult({data:{user:null,session:null},error:R})}
54return T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("SIGNED_IN",T.session)),this._returnResult({data:Object.assign({},T),error:E})}catch(T){if(J(T))return this._returnResult({data:{user:null,session:null},error:T});throw T}}async signInWithSolana(t){var s,a,l,u,c,d,p,g,y,m,b,_;let w,T;if("message"in t)w=t.message,T=t.signature;else{const{chain:E,wallet:R,statement:k,options:x}=t;let M;if(vt())if(typeof R=="object")M=R;else{const $=window;if("solana"in $&&typeof $.solana=="object"&&("signIn"in $.solana&&typeof $.solana.signIn=="function"||"signMessage"in $.solana&&typeof $.solana.signMessage=="function"))M=$.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 R!="object"||!x?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");M=R}const K=new URL((s=x?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in M&&M.signIn){const $=await M.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x?.signInWithSolana),{version:"1",domain:K.host,uri:K.href}),k?{statement:k}:null));let P;if(Array.isArray($)&&$[0]&&typeof $[0]=="object")P=$[0];else if($&&typeof $=="object"&&"signedMessage"in $&&"signature"in $)P=$;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)w=typeof P.signedMessage=="string"?P.signedMessage:new TextDecoder().decode(P.signedMessage),T=P.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in M)||typeof M.signMessage!="function"||!("publicKey"in M)||typeof M!="object"||!M.publicKey||!("toBase58"in M.publicKey)||typeof M.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${K.host} wants you to sign in with your Solana account:`,M.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${K.href}`,`Issued At: ${(l=(a=x?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=x?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((c=x?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((d=x?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((p=x?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((g=x?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((m=(y=x?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...x.signInWithSolana.resources.map(P=>`- ${P}`)]:[]].join(` 55`);const $=await M.signMessage(new TextEncoder().encode(w),"utf8");if(!$||!($ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");T=$}}try{const{data:E,error:R}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:os(T)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:Zt});if(R)throw R;if(!E||!E.session||!E.user){const k=new ni;return this._returnResult({data:{user:null,session:null},error:k})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:R})}
55catch(E){if(J(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const s=await qn(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new M1;const{data:u,error:c}=await W(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:Zt});if(await rt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new ni;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:s,provider:a,token:l,access_token:u,nonce:c}=t,d=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:Zt}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new ni;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(t){var s,a,l,u,c;try{if("email"in t){const{email:d,options:p}=t;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await ri(this.storage,this.storageKey));const{error:m}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in t){const{phone:d,options:p}=t,{data:g,error:y}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:y})}throw new _l("You must provide either an email or phone number.")}catch(d){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(t){var s,a;try{let l,u;"options"in t&&(l=(s=t.options)===null||s===void 0?void 0:s.redirectTo,u=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:d}=await W(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:Zt});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,g=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(J(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(t){var s,a,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await ri(this.storage,this.storageKey));const g=await W(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(s=t.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a:void 0}),!((l=t?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:p}),headers:this.headers,xform:iC});return!((u=g.data)===null||u===void 0)&&u.url&&vt()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(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 t=>{const{data:{session:s},error:a}=t;if(a)throw a;if(!s)throw new ot;const{error:l}=await W(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(t){if(J(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const s=`${this.url}/resend`;if("email"in t){const{email:a,type:l,options:u}=t,{error:c}=await W(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in t){const{phone:a,type:l,options:u}=t,{data:c,error:d}=await W(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new _l("You must provide either an email or phone number and a type")}catch(s){if(J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,s){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await t(s)}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 t=null;const s=await qn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?t=s:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Bf:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const c=await qn(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Hf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=tC(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:l,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(t){try{return t?await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ar}):await this._useSession(async s=>{var a,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ot}:await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=c.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:Ar})})}catch(s){if(J(s))return bl(s)&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(t,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,s)):await this._updateUser(t,s)}async _updateUser(t,s={}){try{return await this._useSession(async a=>{const{data:l,error:u}=a;if(u)throw u;if(!l.session)throw new ot;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&t.email!=null&&([d,p]=await ri(this.storage,this.storageKey));const{data:g,error:y}=await W(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Ar});if(y)throw y;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(a){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ot;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=wl(t.access_token);if(c.exp&&(a=c.exp,l=a<=s),l){const{data:d,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:a-s,expires_at:a},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(J(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async s=>{var a;if(!t){const{data:c,error:d}=s;if(d)throw d;t=(a=c.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new ot;const{data:l,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(t,s){var a;try{if(!vt())throw new Sl("No browser detected.");
55if(t.error||t.error_description||t.error_code)throw new Sl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new Yy("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Sl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Yy("No code detected.");const{data:x,error:M}=await this._exchangeCodeForSession(t.code);if(M)throw M;const K=new URL(window.location.href);return K.searchParams.delete("code"),window.history.replaceState(window.history.state,"",K.toString()),{data:{session:x.session,redirectType:(a=x.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:g,token_type:y}=t;if(!c||!p||!d||!y)throw new Sl("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const w=_-m;w*1e3<=wr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const T=_-b;m-T>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",T,_,m):m-T<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",T,_,m);const{data:E,error:R}=await this._getUser(c);if(R)throw R;const k={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:t.type},error:null})}catch(l){if(J(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const s=await qn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&s)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:l,error:u}=s;if(u&&!bl(u))return this._returnResult({error:u});const c=(a=l.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:d}=await this.admin.signOut(c,t);if(d&&!(j1(d)&&(d.status===404||d.status===401||d.status===403)||bl(d)))return this._returnResult({error:d})}return t!=="others"&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const s=H1(),a={id:s,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async s=>{var a,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",t,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(t))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",u),bl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(t,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ri(this.storage,this.storageKey,!0));try{return await W(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=s.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var s;try{const{data:a,error:l}=await this._useSession(async u=>{var c,d,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=t.options)===null||d===void 0?void 0:d.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await W(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(g=m.session)===null||g===void 0?void 0:g.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return vt()&&!(!((s=t.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(J(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async s=>{var a;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:g,nonce:y}=t,m=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:Zt}),{data:b,error:_}=m;return _?this._returnResult({data:{user:null,session:null},error:_}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new ni}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await rt(this.storage,`${this.storageKey}-code-verifier`),J(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)throw c;return await W(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(l=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(t){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const a=Date.now();return await V1(async l=>(l>0&&await G1(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await W(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Zt})),(l,u)=>{const c=200*Math.pow(2,l);return u&&If(u)&&Date.now()+c-a<wr})}catch(a){if(this._debug(s,"error",a),J(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",s,"url",a),vt()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await qn(this.storage,this.storageKey);if(l&&this.userStorage){let c=await qn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await li(this.userStorage,this.storageKey+"-user",c)),l.user=(t=c?.user)!==null&&t!==void 0?t:Hf()}else if(l&&!l.user&&!l.user){const c=await qn(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await rt(this.storage,this.storageKey+"-user"),await li(this.storage,this.storageKey,l)):l.user=Hf()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<Bf;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${Bf}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(D1(c)?this._debug(a,"refresh discarded by commit guard",c):(console.error(c),If(c)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession())))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var s,a;if(!t)throw new ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new ru;const u=await qn(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!c.session)throw new ot;const p=await qn(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new Fy};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==y){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await rt(this.storage,this.storageKey),this.userStorage&&await rt(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Fy};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const m={data:c.session,error:null};return this.refreshingDeferred.resolve(m),m}catch(u){if(this._debug(l,"error",u),J(u)){const c={data:null,error:u};return If(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(t,s,a=!0){const l=`#_notifyAllSubscribers(${t})`;this._debug(l,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await rt(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},t),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await li(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Wy(l);await li(this.storage,this.storageKey,u)}else{const l=Wy(s);await li(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await rt(this.storage,this.storageKey),await rt(this.storage,this.storageKey+"-code-verifier"),await rt(this.storage,this.storageKey+"-user"),this.userStorage&&await rt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&vt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),wr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.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 t=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${wr}ms, refresh threshold is ${Ta} ticks`),l<=Ta&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
55)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof uC)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${wr}ms, refresh threshold is ${Ta} ticks`),l<=Ta&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!vt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const s=`#_onVisibilityChanged(${t})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"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(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,s,a){const l=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await ri(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);l.push(u.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${l.join("&")}`}async _unenroll(t){try{return await this._useSession(async s=>{var a;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await W(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:g}=await W(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(t.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _verify(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?av(t.webauthn.credential_response):ov(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:g}=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return g?this._returnResult({data:null,error:g}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:g}))})}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:p}=d;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:sv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:iv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(t){const{data:s,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:s.id,code:t.code})}async _listFactors(){var t;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(t=s?.factors)!==null&&t!==void 0?t:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(t){var s,a,l,u;if(t)try{const{payload:_}=wl(t);let w=null;_.aal&&(w=_.aal);let T=w;const{data:{user:E},error:R}=await this.getUser(t);if(R)return this._returnResult({data:null,error:R});((a=(s=E?.factors)===null||s===void 0?void 0:s.filter(M=>M.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(T="aal2");const x=_.amr||[];return{data:{currentLevel:w,nextLevel:T,currentAuthenticationMethods:x},error:null}}catch(_){if(J(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=wl(c.access_token);let g=null;p.aal&&(g=p.aal);let y=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?await W(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ot})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ot});const c=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&vt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ot});const c=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&vt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;return a?this._returnResult({data:null,error:a}):s?await W(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new ot})})}catch(t){if(J(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?(await W(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ot})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(t,s={keys:[]}){let a=s.keys.find(d=>d.kid===t);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(d=>d.kid===t),a&&this.jwks_cached_at+x1>l)return a;const{data:u,error:c}=await W(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,a=u.keys.find(d=>d.kid===t),!a)?null:a}async getClaims(t,s={}){try{let a=t;if(!a){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});a=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=wl(a);if(!s?.allowExpired)try{Z1(u.exp)}catch(_){throw new Bl(_ instanceof Error?_.message:"JWT validation failed")}const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!g){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=W1(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,B1(`${d}.${p}`)))throw new Bl("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var s,a,l;sn(this.experimental);try{if(!ql())return this._returnResult({data:null,error:new ln("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=iv(u.options),p=(l=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:hh.createNewAbortSignal(),{data:g,error:y}=await tb({publicKey:d,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new ln("WebAuthn ceremony failed",null)});const m=ov(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(J(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(t){var s,a;sn(this.experimental);try{if(!ql())return this._returnResult({data:null,error:new ln("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=sv(l.options),d=(a=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:hh.createNewAbortSignal(),{data:p,error:g}=await eb({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new ln("WebAuthn ceremony failed",null)});const y=av(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(J(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){sn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ot});const{data:l,error:u}=await W(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(t){if(J(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){sn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ot});const{data:u,error:c}=await W(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(t){var s;sn(this.experimental);try{const{data:a,error:l}=await W(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(J(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){sn(this.experimental);try{const{data:s,error:a}=await W(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Zt});return a?this._returnResult({data:null,error:a}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){sn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ot});const{data:l,error:u}=await W(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(t){if(J(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){sn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ot});const{data:u,error:c}=await W(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(t){sn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ot});const{error:u}
55=await W(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}}Ba.nextInstanceID={};const EC=Ba,TC="2.107.0";let Ra="",Gl;if(typeof Deno<"u"){var $f;Ra="deno",Gl=($f=Deno.version)===null||$f===void 0?void 0:$f.deno}else if(typeof document<"u")Ra="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ra="react-native";else{var Gf;Ra="node",Gl=typeof process<"u"?(Gf=process.version)===null||Gf===void 0?void 0:Gf.replace(/^v/,""):void 0}const nb=[`runtime=${Ra}`];Gl&&nb.push(`runtime-version=${Gl}`);const RC={"X-Client-Info":`supabase-js/${TC}; ${nb.join("; ")}`},AC={headers:RC},OC={schema:"public"},CC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},xC={},kC={enabled:!1,respectSamplingDecision:!0};function jC(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(e,[])).next())})}let Vf=null;const NC="@opentelemetry/api";function MC(){return Vf===null&&(Vf=import(NC).catch(()=>null)),Vf}function DC(){return jC(this,void 0,void 0,function*(){try{const e=yield MC();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const s=t.traceparent;return s?{traceparent:s,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function UC(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[s,a,l,u]=t;if(s.length!==2||a.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(s)||!c.test(a)||!c.test(l)||!c.test(u)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:a,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function LC(e,t){if(!e||!t||t.length===0)return!1;let s;if(e instanceof URL)s=e;else try{s=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(zC(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function zC(e,t){if(t===e)return!0;if(t.startsWith("*.")){const s=t.slice(2);if(e.endsWith(s)&&(e===s||e.endsWith("."+s)))return!0}return!1}function PC(e){const t=[];try{const s=new URL(e);t.push(s.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(e)}function BC(e,t){if(Ia(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Ia(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IC(e){var t=BC(e,"string");return Ia(t)=="symbol"?t:t+""}function HC(e,t,s){return(t=IC(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function lv(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function Ge(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?lv(Object(s),!0).forEach(function(a){HC(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):lv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}const qC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),$C=()=>Headers,GC=(e,t,s,a,l)=>{const u=qC(a),c=$C(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=d?PC(t):null;return async(y,m)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:e;let w=new c(m?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),g){const T=await VC(y,g,p);T&&(T.traceparent&&!w.has("traceparent")&&w.set("traceparent",T.traceparent),T.tracestate&&!w.has("tracestate")&&w.set("tracestate",T.tracestate),T.baggage&&!w.has("baggage")&&w.set("baggage",T.baggage))}return u(y,Ge(Ge({},m),{},{headers:w}))}};async function VC(e,t,s){if(!LC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await DC();if(!a||!a.traceparent)return null;if(s){const l=UC(a.traceparent);if(l&&!l.isSampled)return null}return a}function uv(e){return typeof e=="boolean"?{enabled:e}:e}function KC(e){return e.endsWith("/")?e:e+"/"}function YC(e,t){var s,a,l,u,c,d;const{db:p,auth:g,realtime:y,global:m}=e,{db:b,auth:_,realtime:w,global:T}=t,E=uv(e.tracePropagation),R=uv(t.tracePropagation),k={db:Ge(Ge({},b),p),auth:Ge(Ge({},_),g),realtime:Ge(Ge({},w),y),storage:{},global:Ge(Ge(Ge({},T),m),{},{headers:Ge(Ge({},(s=T?.headers)!==null&&s!==void 0?s:{}),(a=m?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=E?.enabled)!==null&&u!==void 0?u:R?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:R?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?k.accessToken=e.accessToken:delete k.accessToken,k}function FC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
55if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(KC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var QC=class extends EC{constructor(e){super(e)}},JC=class{constructor(e,t,s){var a,l;this.supabaseUrl=e,this.supabaseKey=t;const u=FC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,d={db:OC,realtime:xC,auth:Ge(Ge({},CC),{},{storageKey:c}),global:AC,tracePropagation:kC},p=YC(s??{},d);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=GC(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Ge({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.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 fO(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new T1(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new nO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,s;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},_,w){const T={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new QC({url:this.authUrl.href,headers:Ge(Ge({},T),_),storageKey:u,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,fetch:w,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new YO(this.realtimeUrl.href,Ge(Ge({},e),{},{params:Ge(Ge({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const XC=(e,t,s)=>new JC(e,t,s);function ZC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const s=t.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}ZC()&&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 WC(){if(typeof window>"u")return;const e=location.hostname,s=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(E=>e===E||e.endsWith("."+E)),a="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",l=s?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+a+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+a+")(?=[.-])","i"))?.[1]:void 0,u=window.parent&&window.parent!==window;if(!l||!u)return localStorage;const c=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),d=c?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,p=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),g=p&&d.test(p)?[p]:c?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",m=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(E,R,k)=>new Promise(x=>{const M=b();let K=!1,$;const P=re=>{K||(K=!0,clearTimeout($),window.removeEventListener("message",G),x(re))},G=re=>{if(g.indexOf(re.origin)<0)return;const ee=re.data;ee&&ee.type===y&&ee.requestId===M&&P(ee)};window.addEventListener("message",G);const F={type:E,requestId:M,projectId:l,key:R};k!==void 0&&(F.value=k);for(const re of g)window.parent.postMessage(F,re);$=setTimeout(()=>P(null),m)});let w=!0;const T=250;return{getItem:async E=>{let R=await _("lovable-preview-auth:get",E);return!R&&w&&(await new Promise(k=>setTimeout(k,T)),R=await _("lovable-preview-auth:get",E)),w=!1,R&&R.ok&&typeof R.value=="string"?R.value===""?(localStorage.removeItem(E),null):R.value:localStorage.getItem(E)},setItem:(E,R)=>(localStorage.setItem(E,R),_("lovable-preview-auth:set",E,R).then(()=>{})),removeItem:E=>(localStorage.removeItem(E),_("lovable-preview-auth:remove",E).then(()=>{}))}}function ex(){return XC("https://valatcvlcoyuzeiincrt.supabase.co","sb_publishable_dTTsBlRlHDDO0xspytWEhw_vd3iqBZQ",{auth:{storage:WC(),persistSession:!0,autoRefreshToken:!0}})}let Kf;const tx=new Proxy({},{get(e,t,s){return Kf||(Kf=ex()),Reflect.get(Kf,t,s)}}),nx=as({type:"function"}).client(async({next:e})=>{const{data:t}=await tx.auth.getSession(),s=t.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),rx=as(),cv=ZA(()=>({functionMiddleware:[nx],requestMiddleware:[rx]}));var su=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sx=class extends su{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},rb=new sx,ix={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ax=class{#e=ix;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},dh=new ax;function ox(e){setTimeout(e,0)}var lx=typeof window>"u"||"Deno"in globalThis;function on(){}function ux(e,t){return typeof e=="function"?e(t):e}function cx(e){return typeof e=="number"&&e>=0&&e!==1/0}function fx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ph(e,t){return typeof e=="function"?e(t):e}function hx(e,t){return typeof e=="function"?e(t):e}function fv(e,t){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==Dh(c,t.options))return!1}else if(!qa(t.queryKey,c))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||l&&l!==t.state.fetchStatus||u&&!u(t))}function hv(e,t){const{exact:s,status:a,predicate:l,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(s){if(Ha(t.options.mutationKey)!==Ha(u))return!1}else if(!qa(t.options.mutationKey,u))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Dh(e,t){return(t?.queryKeyHashFn||Ha)(e)}function Ha(e){return JSON.stringify(e,(t,s)=>gh(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function qa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>qa(e[s],t[s])):!1}var dx=Object.prototype.hasOwnProperty;
vendor: 21,528 bytes, line 55
55function sb(e,t,s=0){if(e===t)return e;if(s>500)return t;const a=dv(e)&&dv(t);if(!a&&!(gh(e)&&gh(t)))return t;const u=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,p=a?new Array(d):{};let g=0;for(let y=0;y<d;y++){const m=a?y:c[y],b=e[m],_=t[m];if(b===_){p[m]=b,(a?y<u:dx.call(e,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const w=sb(b,_,s+1);p[m]=w,w===b&&g++}return u===d&&g===u?e:p}function dv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gh(e){if(!pv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!pv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pv(e){return Object.prototype.toString.call(e)==="[object Object]"}function px(e){return new Promise(t=>{dh.setTimeout(t,e)})}function gx(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?sb(e,t):t}function mx(e,t,s=0){const a=[...e,t];return s&&a.length>s?a.slice(1):a}function yx(e,t,s=0){const a=[t,...e];return s&&a.length>s?a.slice(0,-1):a}var Uh=Symbol();function ib(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vx(e,t,s){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),e}var ab=(()=>{let e=()=>lx;return{isServer(){return e()},setIsServer(t){e=t}}})();function bx(){let e,t;const s=new Promise((l,u)=>{e=l,t=u});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},s.reject=l=>{a({status:"rejected",reason:l}),t(l)},s}var _x=ox;function Sx(){let e=[],t=0,s=d=>{d()},a=d=>{d()},l=_x;const u=d=>{t?e.push(d):l(()=>{s(d)})},c=()=>{const d=e;e=[],d.length&&l(()=>{a(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;t++;try{p=d()}finally{t--,t||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var _t=Sx(),wx=class extends su{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Vl=new wx;function Ex(e){return Math.min(1e3*2**e,3e4)}function ob(e){return(e??"online")==="online"?Vl.isOnline():!0}var mh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lb(e){let t=!1,s=0,a;const l=bx(),u=()=>l.status!=="pending",c=T=>{if(!u()){const E=new mh(T);b(E),e.onCancel?.(E)}},d=()=>{t=!0},p=()=>{t=!1},g=()=>rb.isFocused()&&(e.networkMode==="always"||Vl.isOnline())&&e.canRun(),y=()=>ob(e.networkMode)&&e.canRun(),m=T=>{u()||(a?.(),l.resolve(T))},b=T=>{u()||(a?.(),l.reject(T))},_=()=>new Promise(T=>{a=E=>{(u()||g())&&T(E)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let T;const E=s===0?e.initialPromise:void 0;try{T=E??e.fn()}catch(R){T=Promise.reject(R)}Promise.resolve(T).then(m).catch(R=>{if(u())return;const k=e.retry??(ab.isServer()?0:3),x=e.retryDelay??Ex,M=typeof x=="function"?x(s,R):x,K=k===!0||typeof k=="number"&&s<k||typeof k=="function"&&k(s,R);if(t||!K){b(R);return}s++,e.onFail?.(s,R),px(M).then(()=>g()?void 0:_()).then(()=>{t?b(R):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:y,start:()=>(y()?w():_().then(w),l)}}var ub=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cx(this.gcTime)&&(this.#e=dh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ab.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(dh.clearTimeout(this.#e),this.#e=void 0)}},Tx=class extends ub{#e;#n;#t;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=mv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=mv(this.options);t.data!==void 0&&(this.setState(gv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const s=gx(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(on).catch(on):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(e=>hx(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ph(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!fx(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},l=()=>{const d=ib(this.options,t),g=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#a=!1,this.options.persister?this.options.persister(d,g,this):d(g)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=lb({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof mh&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof mh){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Rx(s.data,this.options),fetchMeta:e.meta??null};case"success":const a={...s,...gv(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),_t.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Rx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ob(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,a=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function yv(e){return{onFetch:(t,s)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=w=>{vx(w,()=>t.signal,()=>y=!0)},b=ib(t.options,t.fetchOptions),_=async(w,T,E)=>{if(y)return Promise.reject();if(T==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:T,direction:E?"backward":"forward",meta:t.options.meta};return m($),$})(),x=await b(k),{maxPages:M}=t.options,K=E?yx:mx;return{pages:K(w.pages,x,M),pageParams:K(w.pageParams,T,M)}};if(l&&u.length){const w=l==="backward",T=w?Ax:vv,E={pages:u,pageParams:c},R=T(a,E);d=await _(E,R,w)}else{const w=e??u.length;do{const T=p===0?c[0]??a.initialPageParam:vv(a,d);if(p>0&&T==null)break;d=await _(d,T),p++}while(p<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=g}}}function vv(e,{pages:t,pageParams:s}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,s[a],s):void 0}function Ax(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var Ox=class extends ub{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Cx(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=lb({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,s);const c=await this.options.onMutate?.(e,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,e,this.state.context,this,s),await this.options.onSuccess?.(u,e,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,e,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,e,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),_t.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Cx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xx=class extends su{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,s){const a=new Ox({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){this.#e.add(e);const t=El(e);if(typeof t=="string"){const s=this.#n.get(t);s?s.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=El(e);if(typeof t=="string"){const s=this.#n.get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=El(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=El(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){_t.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>hv(t,s))}findAll(e={}){return this.getAll().filter(t=>hv(e,t))}notify(e){_t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return _t.batch(()=>Promise.all(e.map(t=>t.continue().catch(on))))}};function El(e){return e.options.scope?.id}var kx=class extends su{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const a=t.queryKey,l=t.queryHash??Dh(a,t);let u=this.get(l);return u||(u=new Tx({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){_t.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>fv(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>fv(e,s)):t}notify(e){_t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_t.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_t.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jx=class{#e;#n;#t;#s;#r;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new kx,this.#n=e.mutationCache||new xx,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=rb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Vl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),a=s.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(ph(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const a=s.data;return[t,a]})}setQueryData(e,t,s){const a=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(a.queryHash)?.state.data,c=ux(t,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return _t.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;_t.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return _t.batch(()=>(s.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},a=_t.batch(()=>this.#e.findAll(e).map(l=>l.cancel(s)));return Promise.all(a).then(on).catch(on)}invalidateQueries(e,t={}){return _t.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},a=_t.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(on)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(on)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(ph(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(on).catch(on)}fetchInfiniteQuery(e){return e.behavior=yv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(on).catch(on)}ensureInfiniteQueryData(e){return e.behavior=yv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vl.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(Ha(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(a=>{qa(e,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(Ha(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(a=>{qa(e,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uh&&
55(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Nx=ne.createContext(void 0),Mx=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),V.jsx(Nx.Provider,{value:e,children:t}));const Dx="/assets/styles-q37hubbE.css";function Ux(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function Lx(){return V.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:V.jsxs("div",{className:"max-w-md text-center",children:[V.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),V.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),V.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),V.jsx("div",{className:"mt-6",children:V.jsx(xh,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function zx({error:e,reset:t}){console.error(e);const s=gt();return ne.useEffect(()=>{Ux(e,{boundary:"tanstack_root_error_component"})},[e]),V.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:V.jsxs("div",{className:"max-w-md text-center",children:[V.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),V.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),V.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[V.jsx("button",{onClick:()=>{s.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),V.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const iu=CA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Subject Events"},{name:"description",content:"TX Fall Round Up is an event invitation and registration application for Texas leaders."},{name:"author",content:"Lovable"},{property:"og:title",content:"Subject Events"},{property:"og:description",content:"TX Fall Round Up is an event invitation and registration application for Texas leaders."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@Lovable"},{name:"twitter:title",content:"Subject Events"},{name:"twitter:description",content:"TX Fall Round Up is an event invitation and registration application for Texas leaders."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/62cf879c-c614-413f-8649-fe1c6da90684/id-preview-b94bc6e1--bc1d8c9c-736f-4f45-95ea-47f0f01c8072.lovable.app-1780965462052.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/62cf879c-c614-413f-8649-fe1c6da90684/id-preview-b94bc6e1--bc1d8c9c-736f-4f45-95ea-47f0f01c8072.lovable.app-1780965462052.png"}],links:[{rel:"stylesheet",href:Dx}]}),shellComponent:Px,component:Bx,notFoundComponent:Lx,errorComponent:zx});function Px({children:e}){return V.jsxs("html",{lang:"en",children:[V.jsx("head",{children:V.jsx(QA,{})}),V.jsxs("body",{children:[e,V.jsx(JA,{})]})]})}function Bx(){const{queryClient:e}=iu.useRouteContext();return V.jsx(Mx,{client:e,children:V.jsx(N0,{})})}const Ix="modulepreload",Hx=function(e){return"/"+e},bv={},Lh=function(t,s,a){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Hx(g),g in bv)return;bv[g]=!0;const y=g.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${m}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Ix,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return t().catch(u)})},qx=()=>Lh(()=>import("./rsvp-BJXf3m5h.js"),__vite__mapDeps([0,1,2])),$x=kh("/rsvp")({head:()=>({meta:[{title:"RSVP â Subject Round Up | Fort Worth, TX"},{name:"description",content:"Reserve your seat at the Subject Round Up. Complete the form to confirm your RSVP."}]}),component:jh(qx,"component")}),Gx=()=>Lh(()=>import("./index-Bb-1eH71.js"),__vite__mapDeps([3,1])),Vx=kh("/")({head:()=>({meta:[{title:"Subject Round Up â Fort Worth, TX | Sept 24â25"},{name:"description",content:"An exclusive two-day gathering for our Texas leaders. Stockyards, steak, and strategy at the Crescent Hotel in Fort Worth, September 24â25."},{property:"og:title",content:"Subject Round Up â Fort Worth, TX"},{property:"og:description",content:"Texas leaders, gather September 24â25 at the Crescent Hotel, Fort Worth."}]}),component:jh(Gx,"component")}),Kx=()=>Lh(()=>import("./rsvp.confirmed-BuEiktVt.js"),__vite__mapDeps([4,1,2])),Yx=kh("/rsvp/confirmed")({head:()=>({meta:[{title:"RSVP Confirmed â Subject Round Up"}]}),validateSearch:e=>({session_id:typeof e.session_id=="string"?e.session_id:void 0}),component:jh(Kx,"component")}),cb=$x.update({id:"/rsvp",path:"/rsvp",getParentRoute:()=>iu}),Fx=Vx.update({id:"/",path:"/",getParentRoute:()=>iu}),Qx=Yx.update({id:"/confirmed",path:"/confirmed",getParentRoute:()=>cb}),Jx={RsvpConfirmedRoute:Qx},Xx=cb._addFileChildren(Jx),Zx={IndexRoute:Fx,RsvpRoute:Xx}
55,Wx=iu._addFileChildren(Zx),ek=()=>{const e=new jx;return qA({routeTree:Wx,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function tk(){const e=await ek();let t;if(cv){const s=await cv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,t=s.serializationAdapters,e.options.defaultSsr=s.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(YR),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await QR(e),e}async function nk(){const e=await tk();return window.$_TSR?.h(),e}var Yf;function rk(){return Yf||(Yf=nk()),V.jsx(WR,{promise:Yf,children:e=>V.jsx(VA,{router:e})})}ne.startTransition(()=>{BS.hydrateRoot(document,V.jsx(ne.StrictMode,{children:V.jsx(rk,{})}))});export{xh as L,sk as R,ik as T,jy as _,x0 as a,ak as b,eu as c,lk as d,gi as e,KR as f,wv as g,Yx as h,kt as i,V as j,Ow as p,ne as r};
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.