vendor: 5,183 bytes, line 1
1function TS(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 mv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h={exports:{}},pa={};var ky;function RS(){if(ky)return pa;ky=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 pa.Fragment=t,pa.jsx=s,pa.jsxs=s,pa}var jy;function AS(){return jy||(jy=1,_h.exports=RS()),_h.exports}var Y=AS(),Sh={exports:{}},he={};var My;function OS(){if(My)return he;My=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"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function O(k,$,X){this.props=k,this.context=$,this.refs=E,this.updater=X||w}O.prototype.isReactComponent={},O.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,$,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function M(){}M.prototype=O.prototype;function j(k,$,X){this.props=k,this.context=$,this.refs=E,this.updater=X||w}var N=j.prototype=new M;N.constructor=j,A(N,O.prototype),N.isPureReactComponent=!0;var F=Array.isArray;function V(){}var H={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(k,$,X){var W=X.ref;return{$$typeof:e,type:k,key:$,ref:W!==void 0?W:null,props:X}}function ie(k,$){return J(k.type,$,k.props)}function ne(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function me(k){var $={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(X){return $[X]})}var Ce=/\/+/g;function Ye(k,$){return typeof k=="object"&&k!==null&&k.key!=null?me(""+k.key):$.toString(36)}function Be(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(V,V):(k.status="pending",k.then(function($){k.status==="pending"&&(k.status="fulfilled",k.value=$)},function($){k.status==="pending"&&(k.status="rejected",k.reason=$)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,$,X,W,ae){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var Se=!1;if(k===null)Se=!0;else switch(pe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(k.$$typeof){case e:case t:Se=!0;break;case m:return Se=k._init,B(Se(k._payload),$,X,W,ae)}}if(Se)return ae=ae(k),Se=W===""?"."+Ye(k,0):W,F(ae)?(X="",Se!=null&&(X=Se.replace(Ce,"$&/")+"/"),B(ae,$,X,"",function(wn){return wn})):ae!=null&&(ne(ae)&&(ae=ie(ae,X+(ae.key==null||k&&k.key===ae.key?"":(""+ae.key).replace(Ce,"$&/")+"/")+Se)),$.push(ae)),1;Se=0;var Fe=W===""?".":W+":";if(F(k))for(var Ue=0;Ue<k.length;Ue++)W=k[Ue],pe=Fe+Ye(W,Ue),Se+=B(W,$,X,pe,ae);else if(Ue=_(k),typeof Ue=="function")for(k=Ue.call(k),Ue=0;!(W=k.next()).done;)W=W.value,pe=Fe+Ye(W,Ue++),Se+=B(W,$,X,pe,ae);else if(pe==="object"){if(typeof k.then=="function")return B(Be(k),$,X,W,ae);throw $=String(k),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Q(k,$,X){if(k==null)return k;var W=[],ae=0;return B(k,W,"","",function(pe){return $.call(X,pe,ae++)}),W}function le(k){if(k._status===-1){var $=k._result;$=$(),$.then(function(X){(k._status===0||k._status===-1)&&(k._status=1,k._result=X)},function(X){(k._status===0||k._status===-1)&&(k._status=2,k._result=X)}),k._status===-1&&(k._status=0,k._result=$)}if(k._status===1)return k._result.default;throw k._result}var Re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)}
vendor: 5,994 bytes, line 1
1,Oe={map:Q,forEach:function(k,$,X){Q(k,function(){$.apply(this,arguments)},X)},count:function(k){var $=0;return Q(k,function(){$++}),$},toArray:function(k){return Q(k,function($){return $})||[]},only:function(k){if(!ne(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return he.Activity=y,he.Children=Oe,he.Component=O,he.Fragment=s,he.Profiler=l,he.PureComponent=j,he.StrictMode=a,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,he.__COMPILER_RUNTIME={__proto__:null,c:function(k){return H.H.useMemoCache(k)}},he.cache=function(k){return function(){return k.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(k,$,X){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=A({},k.props),ae=k.key;if($!=null)for(pe in $.key!==void 0&&(ae=""+$.key),$)!K.call($,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&$.ref===void 0||(W[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)W.children=X;else if(1<pe){for(var Se=Array(pe),Fe=0;Fe<pe;Fe++)Se[Fe]=arguments[Fe+2];W.children=Se}return J(k.type,ae,W)},he.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},he.createElement=function(k,$,X){var W,ae={},pe=null;if($!=null)for(W in $.key!==void 0&&(pe=""+$.key),$)K.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ae[W]=$[W]);var Se=arguments.length-2;if(Se===1)ae.children=X;else if(1<Se){for(var Fe=Array(Se),Ue=0;Ue<Se;Ue++)Fe[Ue]=arguments[Ue+2];ae.children=Fe}if(k&&k.defaultProps)for(W in Se=k.defaultProps,Se)ae[W]===void 0&&(ae[W]=Se[W]);return J(k,pe,ae)},he.createRef=function(){return{current:null}},he.forwardRef=function(k){return{$$typeof:d,render:k}},he.isValidElement=ne,he.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:le}},he.memo=function(k,$){return{$$typeof:g,type:k,compare:$===void 0?null:$}},he.startTransition=function(k){var $=H.T,X={};H.T=X;try{var W=k(),ae=H.S;ae!==null&&ae(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(V,Re)}catch(pe){Re(pe)}finally{$!==null&&X.types!==null&&($.types=X.types),H.T=$}},he.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},he.use=function(k){return H.H.use(k)},he.useActionState=function(k,$,X){return H.H.useActionState(k,$,X)},he.useCallback=function(k,$){return H.H.useCallback(k,$)},he.useContext=function(k){return H.H.useContext(k)},he.useDebugValue=function(){},he.useDeferredValue=function(k,$){return H.H.useDeferredValue(k,$)},he.useEffect=function(k,$){return H.H.useEffect(k,$)},he.useEffectEvent=function(k){return H.H.useEffectEvent(k)},he.useId=function(){return H.H.useId()},he.useImperativeHandle=function(k,$,X){return H.H.useImperativeHandle(k,$,X)},he.useInsertionEffect=function(k,$){return H.H.useInsertionEffect(k,$)},he.useLayoutEffect=function(k,$){return H.H.useLayoutEffect(k,$)},he.useMemo=function(k,$){return H.H.useMemo(k,$)},he.useOptimistic=function(k,$){return H.H.useOptimistic(k,$)},he.useReducer=function(k,$,X){return H.H.useReducer(k,$,X)},he.useRef=function(k){return H.H.useRef(k)},he.useState=function(k){return H.H.useState(k)},he.useSyncExternalStore=function(k,$,X){return H.H.useSyncExternalStore(k,$,X)},he.useTransition=function(){return H.H.useTransition()},he.version="19.2.5",he}var Dy;function Ga(){return Dy||(Dy=1,Sh.exports=OS()),Sh.exports}var se=Ga();const yi=mv(se),Zx=TS({__proto__:null,default:yi},[se]);var wh={exports:{}},ga={},Eh={exports:{}},Th={};var Uy;function CS(){return Uy||(Uy=1,(function(e){function t(B,Q){var le=B.length;B.push(Q);e:for(;0<le;){var Re=le-1>>>1,Oe=B[Re];if(0<l(Oe,Q))B[Re]=Q,B[le]=Oe,le=Re;else break e}}function s(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Q=B[0],le=B.pop();if(le!==Q){B[0]=le;e:for(var Re=0,Oe=B.length,k=Oe>>>1;Re<k;){var $=2*(Re+1)-1,X=B[$],W=$+1,ae=B[W];if(0>l(X,le))W<Oe&&0>l(ae,X)?(B[Re]=ae,B[W]=le,Re=W):(B[Re]=X,B[$]=le,Re=$);else if(W<Oe&&0>l(ae,le))B[Re]=ae,B[W]=le,Re=W;else break e}}return Q}function l(B,Q){var le=B.sortIndex-Q.sortIndex;return le!==0?le:B.id-Q.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=[],m=1,y=null,b=3,_=!1,w=!1,A=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function N(B){for(var Q=s(g);Q!==null;){if(Q.callback===null)a(g);else if(Q.startTime<=B)a(g),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=s(g)}}function F(B){if(A=!1,N(B),!w)if(s(p)!==null)w=!0,V||(V=!0,me());else{var Q=s(g);Q!==null&&Be(F,Q.startTime-B)}}var V=!1,H=-1,K=5,J=-1;function ie(){return E?!0:!(e.unstable_now()-J<K)}function ne(){if(E=!1,V){var B=e.unstable_now();J=B;var Q=!0;try{e:{w=!1,A&&(A=!1,M(H),H=-1),_=!0;var le=b;try{t:{for(N(B),y=s(p);y!==null&&!(y.expirationTime>B&&ie());){var Re=y.callback;if(typeof Re=="function"){y.callback=null,b=y.priorityLevel;var Oe=Re(y.expirationTime<=B);if(B=e.unstable_now(),typeof Oe=="function"){y.callback=Oe,N(B),Q=!0;break t}y===s(p)&&a(p),N(B)}else a(p);y=s(p)}if(y!==null)Q=!0;else{var k=s(g);k!==null&&Be(F,k.startTime-B),Q=!1}}break e}finally{y=null,b=le,_=!1}Q=void 0}}finally{Q?me():V=!1}}}var me;if(typeof j=="function")me=function(){j(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Ye=Ce.port2;Ce.port1.onmessage=ne,me=function(){Ye.postMessage(null)}}else me=function(){O(ne,0)};function Be(B,Q){H=O(function(){B(e.unstable_now())},Q)}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(B){B.
vendor: 9,914 bytes, lines 1-3
1callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var le=b;b=Q;try{return B()}finally{b=le}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var le=b;b=B;try{return Q()}finally{b=le}},e.unstable_scheduleCallback=function(B,Q,le){var Re=e.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Re+le:Re):le=Re,B){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=le+Oe,B={id:m++,callback:Q,priorityLevel:B,startTime:le,expirationTime:Oe,sortIndex:-1},le>Re?(B.sortIndex=le,t(g,B),s(p)===null&&B===s(g)&&(A?(M(H),H=-1):A=!0,Be(F,le-Re))):(B.sortIndex=Oe,t(p,B),w||_||(w=!0,V||(V=!0,me()))),B},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(B){var Q=b;return function(){var le=b;b=Q;try{return B.apply(this,arguments)}finally{b=le}}}})(Th)),Th}var Ny;function xS(){return Ny||(Ny=1,Eh.exports=CS()),Eh.exports}var Rh={exports:{}},bt={};var Ly;function kS(){if(Ly)return bt;Ly=1;var e=Ga();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}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,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:p,containerInfo:g,implementation:m}}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 bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,bt.createPortal=function(p,g){var m=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,m)},bt.flushSync=function(p){var g=c.T,m=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=m,a.d.f()}},bt.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))},bt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},bt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:_}):m==="script"&&a.d.X(p,{crossOrigin:y,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},bt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=d(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:m,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)},bt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin);a.d.L(p,m,{crossOrigin:y,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})}},bt.preloadModule=function(p,g){if(typeof p=="string")if(g){var m=d(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},bt.requestFormReset=function(p){a.d.r(p)},bt.unstable_batchedUpdates=function(p,g){return p(g)},bt.useFormState=function(p,g,m){return c.H.useFormState(p,g,m)},bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},bt.version="19.2.5",bt}var zy;function vv(){if(zy)return Rh.exports;zy=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(),Rh.exports=kS(),Rh.exports}var Py;function jS(){if(Py)return ga;Py=1;var e=xS(),t=Ga(),s=vv();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 h=i.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){i=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===i)return p(h),n;if(f===o)return p(h),r;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=h,o=f;else{for(var v=!1,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){for(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)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 m(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=m(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function me(n){return n===null||typeof n!="object"?null:(n=ne&&n[ne]||n["@@iterator"],typeof n=="function"?n:null)}var Ce=Symbol.for("react.client.reference");function Ye(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case O:return"Profiler";case E:return"StrictMode";case F:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case N:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case H:return r=n.displayName||null,r!==null?r:Ye(n.type)||"Memo";case K:r=n._payload,n=n._init;try{return Ye(n(r))}catch{}}return null}var Be=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function k(n){return{current:n}}function $(n){0>Oe||(n.current=Re[Oe],Re[Oe]=null,Oe--)}function X(n,r){Oe++,Re[Oe]=n.current,n.current=r}var W=k(null),ae=k(null),pe=k(null),Se=k(null);function Fe(n,r){switch(X(pe,r),X(ae,n),X(W,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Wg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Wg(r),n=ey(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(W),X(W,n)}function Ue(){$(W),$(ae),$(pe)}function wn(n){n.memoizedState!==null&&X(Se,n);var r=W.current,i=ey(r,n.type);r!==i&&(X(ae,n),X(W,i))}function En(n){ae.current===n&&($(W),$(ae)),Se.current===n&&($(Se),ca._currentValue=le)}var Xn,bi;function hn(n){if(Xn===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Xn=r&&r[1]||"",bi=-1<i.stack.indexOf(` 2 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 3`+Xn+n+bi}var _i=!1;function gs(n,r){if(!n||_i)return"";_i=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(P){var z=P}Reflect.construct(n,[],G)}else{try{G.call()}catch(P){z=P}n.call(G.prototype)}}else{try{throw Error()}catch(P){z=P}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 6,228 bytes, lines 3-8
3catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var C=v.split(` 4`),L=S.split(` 5`);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<L.length&&!L[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===L.length)for(o=C.length-1,h=L.length-1;1<=o&&0<=h&&C[o]!==L[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==L[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==L[h]){var q=` 6`+C[o].replace(" at new "," at ");return n.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",n.displayName)),q}while(1<=o&&0<=h);break}}}finally{_i=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?hn(i):""}function Ya(n,r){switch(n.tag){case 26:case 27:case 5:return hn(n.type);case 16:return hn("Lazy");case 13:return n.child!==r&&r!==null?hn("Suspense Fallback"):hn("Suspense");case 19:return hn("SuspenseList");case 0:case 15:return gs(n.type,!1);case 11:return gs(n.type.render,!1);case 1:return gs(n.type,!0);case 31:return hn("Activity");default:return""}}function Tn(n){try{var r="",i=null;do r+=Ya(n,i),i=n,n=n.return;while(n);return r}catch(o){return` 7Error generating stack: `+o.message+` 8`+o.stack}}var Lr=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,Si=e.unstable_cancelCallback,Fa=e.unstable_shouldYield,ou=e.unstable_requestPaint,vt=e.unstable_now,ze=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,fn=e.unstable_UserBlockingPriority,ys=e.unstable_NormalPriority,ib=e.unstable_LowPriority,Df=e.unstable_IdlePriority,ab=e.log,ob=e.unstable_setDisableYieldValue,wi=null,Ut=null;function Zn(n){if(typeof ab=="function"&&ob(n),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(wi,n)}catch{}}var Nt=Math.clz32?Math.clz32:cb,lb=Math.log,ub=Math.LN2;function cb(n){return n>>>=0,n===0?32:31-(lb(n)/ub|0)|0}var Qa=256,Ja=262144,Xa=4194304;function zr(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 Za(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var h=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?h=zr(o):(v&=S,v!==0?h=zr(v):i||(i=S&~n,i!==0&&(h=zr(i))))):(S=o&~f,S!==0?h=zr(S):v!==0?h=zr(v):i||(i=o&~n,i!==0&&(h=zr(i)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:h}function Ei(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function hb(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 Uf(){var n=Xa;return Xa<<=1,(Xa&62914560)===0&&(Xa=4194304),n}function lu(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ti(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fb(n,r,i,o,h,f){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,C=n.expirationTimes,L=n.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Nt(i),G=1<<q;S[q]=0,C[q]=-1;var z=L[q];if(z!==null)for(L[q]=null,q=0;q<z.length;q++){var P=z[q];P!==null&&(P.lane&=-536870913)}i&=~G}o!==0&&Nf(n,o,0),f!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function Nf(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-Nt(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function Lf(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-Nt(i),h=1<<o;h&r|n[o]&r&&(n[o]|=r),i&=~h}}function zf(n,r){var i=r&-r;return i=(i&42)!==0?1:uu(i),(i&(n.suspendedLanes|r))!==0?0:i}function uu(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 cu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pf(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:Ey(n.type))}function Bf(n,r){var i=Q.p;try{return Q.p=n,r()}finally{Q.p=i}}var Wn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Wn,Et="__reactProps$"+Wn,ms="__reactContainer$"+Wn,hu="__reactEvents$"+Wn,db="__reactListeners$"+Wn,pb="__reactHandles$"+Wn,Hf="__reactResources$"+Wn,Ri="__reactMarker$"+Wn;function fu(n){delete n[ft],delete n[Et],delete n[hu],delete n[db],delete n[pb]}function vs(n){var r=n[ft];if(r)return r;for(var i=n.parentNode;i;){if(r=i[ms]||i[ft]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=oy(n);n!==null;){if(i=n[ft])return i;n=oy(n)}return r}n=i,i=n.parentNode}return null}function bs(n){if(n=n[ft]||n[ms]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Ai(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function _s(n){var r=n[Hf];return r||(r=n[Hf]={hoistableStyles:new Map,hoistableScripts:new Map}),r}
vendor: 6,995 bytes, line 8
8function ot(n){n[Ri]=!0}var qf=new Set,If={};function Pr(n,r){Ss(n,r),Ss(n+"Capture",r)}function Ss(n,r){for(If[n]=r,n=0;n<r.length;n++)qf.add(r[n])}var gb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$f={},Gf={};function yb(n){return Lr.call(Gf,n)?!0:Lr.call($f,n)?!1:gb.test(n)?Gf[n]=!0:($f[n]=!0,!1)}function Wa(n,r,i){if(yb(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 eo(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 Rn(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 Gt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Vf(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function mb(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 h=o.get,f=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,f.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 du(n){if(!n._valueTracker){var r=Vf(n)?"checked":"value";n._valueTracker=mb(n,r,""+n[r])}}function Kf(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=Vf(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function to(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 vb=/[\n"\\]/g;function Vt(n){return n.replace(vb,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function pu(n,r,i,o,h,f,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=""+Gt(r)):n.value!==""+Gt(r)&&(n.value=""+Gt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?gu(n,v,Gt(r)):i!=null?gu(n,v,Gt(i)):o!=null&&n.removeAttribute("value"),h==null&&f!=null&&(n.defaultChecked=!!f),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Gt(S):n.removeAttribute("name")}function Yf(n,r,i,o,h,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){du(n);return}i=i!=null?""+Gt(i):"",r=r!=null?""+Gt(r):i,S||r===n.value||(n.value=r),n.defaultValue=r}o=o??h,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),du(n)}function gu(n,r,i){r==="number"&&to(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ws(n,r,i,o){if(n=n.options,r){r={};for(var h=0;h<i.length;h++)r["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=r.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&o&&(n[i].defaultSelected=!0)}else{for(i=""+Gt(i),r=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,o&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Ff(n,r,i){if(r!=null&&(r=""+Gt(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+Gt(i):""}function Qf(n,r,i,o){if(r==null){if(o!=null){if(i!=null)throw Error(a(92));if(Be(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),r=i}i=Gt(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),du(n)}function Es(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var bb=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 Jf(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||bb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function Xf(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 h in r)o=r[h],r.hasOwnProperty(h)&&i[h]!==o&&Jf(n,h,o)}else for(var f in r)r.hasOwnProperty(f)&&Jf(n,f,r[f])}function yu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _b=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
8dering","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"]]),Sb=/^[\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 no(n){return Sb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function An(){}var mu=null;function vu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ts=null,Rs=null;function Zf(n){var r=bs(n);if(r&&(n=r.stateNode)){var i=n[Et]||null;e:switch(n=r.stateNode,r.type){case"input":if(pu(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="'+Vt(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var h=o[Et]||null;if(!h)throw Error(a(90));pu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&Kf(o)}break e;case"textarea":Ff(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&ws(n,!!i.multiple,r,!1)}}}var bu=!1;function Wf(n,r,i){if(bu)return n(r,i);bu=!0;try{var o=n(r);return o}finally{if(bu=!1,(Ts!==null||Rs!==null)&&(Go(),Ts&&(r=Ts,n=Rs,Rs=Ts=null,Zf(r),n)))for(r=0;r<n.length;r++)Zf(n[r])}}function Oi(n,r){var i=n.stateNode;if(i===null)return null;var o=i[Et]||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 On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_u=!1;if(On)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){_u=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{_u=!1}var er=null,Su=null,ro=null;function ed(){if(ro)return ro;var n,r=Su,i=r.length,o,h="value"in er?er.value:er.textContent,f=h.length;for(n=0;n<i&&r[n]===h[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===h[f-o];o++);return ro=h.slice(n,1<o?1-o:void 0)}function so(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 io(){return!0}function td(){return!1}function Tt(n){function r(i,o,h,f,v){this._reactName=i,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?io:td,this.isPropagationStopped=td,this}return y(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=io)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),r}var Br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ao=Tt(Br),xi=y({},Br,{view:0,detail:0}),wb=Tt(xi),wu,Eu,ki,oo=y({},xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ru,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!==ki&&(ki&&n.type==="mousemove"?(wu=n.screenX-ki.screenX,Eu=n.screenY-ki.screenY):Eu=wu=0,ki=n),wu)},movementY:function(n){return"movementY"in n?n.movementY:Eu}}),nd=Tt(oo),Eb=y({},oo,{dataTransfer:0}),Tb=Tt(Eb),Rb=y({},xi,{relatedTarget:0}),Tu=Tt(Rb),Ab=y({},Br,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=Tt(Ab),Cb=y({},Br,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),xb=Tt(Cb),kb=y({},Br,{data:0}),rd=Tt(kb),jb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mb={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"},Db={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ub(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Db[n])?!!r[n]:!1}function Ru(){return Ub}var Nb=y({},xi,{key:function(n){if(n.key){var r=jb[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 4,948 bytes, line 8
8return n.type==="keypress"?(n=so(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Mb[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ru,charCode:function(n){return n.type==="keypress"?so(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?so(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Lb=Tt(Nb),zb=y({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sd=Tt(zb),Pb=y({},xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ru}),Bb=Tt(Pb),Hb=y({},Br,{propertyName:0,elapsedTime:0,pseudoElement:0}),qb=Tt(Hb),Ib=y({},oo,{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}),$b=Tt(Ib),Gb=y({},Br,{newState:0,oldState:0}),Vb=Tt(Gb),Kb=[9,13,27,32],Au=On&&"CompositionEvent"in window,ji=null;On&&"documentMode"in document&&(ji=document.documentMode);var Yb=On&&"TextEvent"in window&&!ji,id=On&&(!Au||ji&&8<ji&&11>=ji),ad=" ",od=!1;function ld(n,r){switch(n){case"keyup":return Kb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ud(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var As=!1;function Fb(n,r){switch(n){case"compositionend":return ud(r);case"keypress":return r.which!==32?null:(od=!0,ad);case"textInput":return n=r.data,n===ad&&od?null:n;default:return null}}function Qb(n,r){if(As)return n==="compositionend"||!Au&&ld(n,r)?(n=ed(),ro=Su=er=null,As=!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 id&&r.locale!=="ko"?null:r.data;default:return null}}var Jb={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 cd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!Jb[n.type]:r==="textarea"}function hd(n,r,i,o){Ts?Rs?Rs.push(o):Rs=[o]:Ts=o,r=Xo(r,"onChange"),0<r.length&&(i=new ao("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var Mi=null,Di=null;function Xb(n){Yg(n,0)}function lo(n){var r=Ai(n);if(Kf(r))return n}function fd(n,r){if(n==="change")return r}var dd=!1;if(On){var Ou;if(On){var Cu="oninput"in document;if(!Cu){var pd=document.createElement("div");pd.setAttribute("oninput","return;"),Cu=typeof pd.oninput=="function"}Ou=Cu}else Ou=!1;dd=Ou&&(!document.documentMode||9<document.documentMode)}function gd(){Mi&&(Mi.detachEvent("onpropertychange",yd),Di=Mi=null)}function yd(n){if(n.propertyName==="value"&&lo(Di)){var r=[];hd(r,Di,n,vu(n)),Wf(Xb,r)}}function Zb(n,r,i){n==="focusin"?(gd(),Mi=r,Di=i,Mi.attachEvent("onpropertychange",yd)):n==="focusout"&&gd()}function Wb(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return lo(Di)}function e_(n,r){if(n==="click")return lo(r)}function t_(n,r){if(n==="input"||n==="change")return lo(r)}function n_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Lt=typeof Object.is=="function"?Object.is:n_;function Ui(n,r){if(Lt(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 h=i[o];if(!Lr.call(r,h)||!Lt(n[h],r[h]))return!1}return!0}function md(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function vd(n,r){var i=md(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=md(i)}}function bd(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?bd(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function _d(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=to(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=to(n.document)}return r}function xu(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 r_=On&&"documentMode"in document&&11>=document.documentMode,Os=null,ku=null,Ni=null,ju=!1;function Sd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;
vendor: 16,018 bytes, line 8
8ju||Os==null||Os!==to(o)||(o=Os,"selectionStart"in o&&xu(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}),Ni&&Ui(Ni,o)||(Ni=o,o=Xo(ku,"onSelect"),0<o.length&&(r=new ao("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=Os)))}function Hr(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var Cs={animationend:Hr("Animation","AnimationEnd"),animationiteration:Hr("Animation","AnimationIteration"),animationstart:Hr("Animation","AnimationStart"),transitionrun:Hr("Transition","TransitionRun"),transitionstart:Hr("Transition","TransitionStart"),transitioncancel:Hr("Transition","TransitionCancel"),transitionend:Hr("Transition","TransitionEnd")},Mu={},wd={};On&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function qr(n){if(Mu[n])return Mu[n];if(!Cs[n])return n;var r=Cs[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in wd)return Mu[n]=r[i];return n}var Ed=qr("animationend"),Td=qr("animationiteration"),Rd=qr("animationstart"),s_=qr("transitionrun"),i_=qr("transitionstart"),a_=qr("transitioncancel"),Ad=qr("transitionend"),Od=new Map,Du="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(" ");Du.push("scrollEnd");function nn(n,r){Od.set(n,r),Pr(r,[n])}var uo=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)},Kt=[],xs=0,Uu=0;function co(){for(var n=xs,r=Uu=xs=0;r<n;){var i=Kt[r];Kt[r++]=null;var o=Kt[r];Kt[r++]=null;var h=Kt[r];Kt[r++]=null;var f=Kt[r];if(Kt[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&Cd(i,h,f)}}function ho(n,r,i,o){Kt[xs++]=n,Kt[xs++]=r,Kt[xs++]=i,Kt[xs++]=o,Uu|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Nu(n,r,i,o){return ho(n,r,i,o),fo(n)}function Ir(n,r){return ho(n,null,null,r),fo(n)}function Cd(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var h=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(h=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,h&&r!==null&&(h=31-Nt(i),n=f.hiddenUpdates,o=n[h],o===null?n[h]=[r]:o.push(r),r.lane=i|536870912),f):null}function fo(n){if(50<ra)throw ra=0,Gc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ks={};function o_(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 zt(n,r,i,o){return new o_(n,r,i,o)}function Lu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Cn(n,r){var i=n.alternate;return i===null?(i=zt(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 xd(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 po(n,r,i,o,h,f){var v=0;if(o=n,typeof n=="function")Lu(n)&&(v=1);else if(typeof n=="string")v=fS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=zt(31,i,r,h),n.elementType=J,n.lanes=f,n;case A:return $r(i.children,h,f,r);case E:v=8,h|=24;break;case O:return n=zt(12,i,r,h|2),n.elementType=O,n.lanes=f,n;case F:return n=zt(13,i,r,h),n.elementType=F,n.lanes=f,n;case V:return n=zt(19,i,r,h),n.elementType=V,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case M:v=9;break e;case N:v=11;break e;case H:v=14;break e;case K:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=zt(v,i,r,h),r.elementType=n,r.type=o,r.lanes=f,r}function $r(n,r,i,o){return n=zt(7,n,o,r),n.lanes=i,n}function zu(n,r,i){return n=zt(6,n,null,r),n.lanes=i,n}function kd(n){var r=zt(18,null,null,0);return r.stateNode=n,r}function Pu(n,r,i){return r=zt(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var jd=new WeakMap;function Yt(n,r){if(typeof n=="object"&&n!==null){var i=jd.get(n);return i!==void 0?i:(r={value:n,source:r,stack:Tn(r)},jd.set(n,r),r)}return{value:n,source:r,stack:Tn(r)}}var js=[],Ms=0,go=null,Li=0,Ft=[],Qt=0,tr=null,dn=1,pn="";function xn(n,r){js[Ms++]=Li,js[Ms++]=go,go=n,Li=r}function Md(n,r,i){Ft[Qt++]=dn,Ft[Qt++]=pn,Ft[Qt++]=tr,tr=n;var o=dn;n=pn;var h=32-Nt(o)-1;o&=~(1<<h),i+=1;var f=32-Nt(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,dn=1<<32-Nt(r)+h|i<<h|o,pn=f+n}else dn=1<<f|i<<h|o,pn=n}function Bu(n){n.return!==null&&(xn(n,1),Md(n,1,0))}function Hu(n){for(;n===go;)go=js[--Ms],js[Ms]=null,Li=js[--Ms],js[Ms]=null;for(;n===tr;)tr=Ft[--Qt],Ft[Qt]=null,pn=Ft[--Qt],Ft[Qt]=null,dn=Ft[--Qt],Ft[Qt]=null}function Dd(n,r){Ft[Qt++]=dn,Ft[Qt++]=pn,Ft[Qt++]=tr,dn=r.id,pn=r.overflow,tr=n}var dt=null,He=null,_e=!1,nr=null,Jt=!1,qu=Error(a(519));function rr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zi(Yt(r,n)),qu}function Ud(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[ft]=n,r[Et]=o,i){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<ia.length;i++)ye(ia[i],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),Yf(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Qf(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||Xg(r.textContent,i)?(o.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),o.onScroll!=null&&ye("scroll",r),o.onScrollEnd!=null&&ye("scrollend",r),o.onClick!=null&&(r.onclick=An),r=!0):r=!1,r||rr(n,!0)}function Nd(n){for(dt=n.return;dt;)switch(dt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:dt=dt.return}}function Ds(n){if(n!==dt)return!1;if(!_e)return Nd(n),_e=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||ih(n.type,n.memoizedProps)),i=!i),i&&He&&rr(n),Nd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=ay(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=ay(n)}else r===27?(r=He,mr(n.type)?(n=ch,ch=null,He=n):He=r):He=dt?Zt(n.stateNode.nextSibling):null;return!0}function Gr(){He=dt=null,_e=!1}function Iu(){var n=nr;return n!==null&&(Ct===null?Ct=n:Ct.push.apply(Ct,n),nr=null),n}function zi(n){nr===null?nr=[n]:nr.push(n)}var $u=k(null),Vr=null,kn=null;function sr(n,r,i){X($u,r._currentValue),r._currentValue=i}function jn(n){n._currentValue=$u.current,$($u)}function Gu(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 Vu(n,r,i,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=h;for(var C=0;C<r.length;C++)if(S.context===r[C]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),Gu(f.return,i,n),o||(v=null);break e}f=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),Gu(v,i,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Us(n,r,i,o){n=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=h.type;Lt(h.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(h===Se.current){if(v=h.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ca):n=[ca])}h=h.return}n!==null&&Vu(r,n,i,o),r.flags|=262144}function yo(n){for(n=n.firstContext;n!==null;){if(!Lt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Kr(n){Vr=n,kn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function pt(n){return Ld(Vr,n)}function mo(n,r){return Vr===null&&Kr(n),Ld(n,r)}function Ld(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},kn===null){if(n===null)throw Error(a(308));kn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else kn=kn.next=r;return i}var l_=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()})}},u_=e.unstable_scheduleCallback,c_=e.unstable_NormalPriority,Ze={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ku(){return{controller:new l_,data:new Map,refCount:0}}function Pi(n){n.refCount--,n.refCount===0&&u_(c_,function(){n.controller.abort()})}var Bi=null,Yu=0,Ns=0,Ls=null;function h_(n,r){if(Bi===null){var i=Bi=[];Yu=0,Ns=Jc(),Ls={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Yu++,r.then(zd,zd),r}function zd(){if(--Yu===0&&Bi!==null){Ls!==null&&(Ls.status="fulfilled");var n=Bi;Bi=null,Ns=0,Ls=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function f_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<i.length;h++)(0,i[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),o}var Pd=B.S;B.S=function(n,r){Sg=vt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&h_(n,r),Pd!==null&&Pd(n,r)};var Yr=k(null);function Fu(){var n=Yr.current;return n!==null?n:Ne.pooledCache}function vo(n,r){r===null?X(Yr,Yr.current):X(Yr,r.pool)}function Bd(){var n=Fu();return n===null?null:{parent:Ze._currentValue,pool:n}}var zs=Error(a(460)),Qu=Error(a(474)),bo=Error(a(542)),_o={then:function(){}};function Hd(n){return n=n.status,n==="fulfilled"||n==="rejected"}function qd(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(An,An),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,$d(n),n;default:if(typeof r.status=="string")r.then(An,An);else{if(n=Ne,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,$d(n),n}throw Qr=r,zs}}function Fr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qr=i,zs):i}}var Qr=null;function Id(){if(Qr===null)throw Error(a(459));var n=Qr;return Qr=null,n}function $d(n){if(n===zs||n===bo)throw Error(a(483))}var Ps=null,Hi=0;function So(n){var r=Hi;return Hi+=1,Ps===null&&(Ps=[]),qd(Ps,n,r)}function qi(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function wo(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 Gd(n){function r(D,x){if(n){var U=D.deletions;U===null?(D.deletions=[x],D.flags|=16):U.push(x)}}function i(D,x){if(!n)return null;for(;x!==null;)r(D,x),x=x.sibling;return null}function o(D){for(var x=new Map;D!==null;)D.key!==null?x.set(D.key,D):x.set(D.index,D),D=D.sibling;return x}function h(D,x){return D=Cn(D,x),D.index=0,D.sibling=null,D}function f(D,x,U){return D.index=U,n?(U=D.alternate,U!==null?(U=U.index,U<x?(D.flags|=67108866,x):U):(D.flags|=67108866,x)):(D.flags|=1048576,x)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function S(D,x,U,I){return x===null||x.tag!==6?(x=zu(U,D.mode,I),x.return=D,x):(x=h(x,U),x.return=D,x)}function C(D,x,U,I){var oe=U.type;return oe===A?q(D,x,U.props.children,I,U.key):x!==null&&(x.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Fr(oe)===x.type)?(x=h(x,U.props),qi(x,U),x.return=D,x):(x=po(U.type,U.key,U.props,null,D.mode,I),qi(x,U),x.return=D,x)}function L(D,x,U,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==U.containerInfo||x.stateNode.implementation!==U.implementation?(x=Pu(U,D.mode,I),x.return=D,x):(x=h(x,U.children||[]),x.return=D,x)}function q(D,x,U,I,oe){return x===null||x.tag!==7?(x=$r(U,D.mode,I,oe),x.return=D,x):(x=h(x,U),x.return=D,x)}function G(D,x,U){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=zu(""+x,D.mode,U),x.return=D,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _:return U=po(x.type,x.key,x.props,null,D.mode,U),qi(U,x),U.return=D,U;case w:return x=Pu(x,D.mode,U),x.return=D,x;case K:return x=Fr(x),G(D,x,U)}if(Be(x)||me(x))return x=$r(x,D.mode,U,null),x.return=D,x;if(typeof x.then=="function")return G(D,So(x),U);if(x.$$typeof===j)return G(D,mo(D,x),U);wo(D,x)}return null}function z(D,x,U,I){var oe=x!==null?x.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return oe!==null?null:S(D,x,""+U,I);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case _:return U.key===oe?C(D,x,U,I):null;case w:return U.key===oe?L(D,x,U,I):null;case K:return U=Fr(U),z(D,x,U,I)}if(Be(U)||me(U))return oe!==null?null:q(D,x,U,I,null);if(typeof U.then=="function")return z(D,x,So(U),I);if(U.$$typeof===j)return z(D,x,mo(D,U),I);wo(D,U)}return null}
vendor: 4,151 bytes, line 8
8function P(D,x,U,I,oe){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return D=D.get(U)||null,S(x,D,""+I,oe);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return D=D.get(I.key===null?U:I.key)||null,C(x,D,I,oe);case w:return D=D.get(I.key===null?U:I.key)||null,L(x,D,I,oe);case K:return I=Fr(I),P(D,x,U,I,oe)}if(Be(I)||me(I))return D=D.get(U)||null,q(x,D,I,oe,null);if(typeof I.then=="function")return P(D,x,U,So(I),oe);if(I.$$typeof===j)return P(D,x,U,mo(x,I),oe);wo(x,I)}return null}function ee(D,x,U,I){for(var oe=null,we=null,re=x,de=x=0,be=null;re!==null&&de<U.length;de++){re.index>de?(be=re,re=null):be=re.sibling;var Ee=z(D,re,U[de],I);if(Ee===null){re===null&&(re=be);break}n&&re&&Ee.alternate===null&&r(D,re),x=f(Ee,x,de),we===null?oe=Ee:we.sibling=Ee,we=Ee,re=be}if(de===U.length)return i(D,re),_e&&xn(D,de),oe;if(re===null){for(;de<U.length;de++)re=G(D,U[de],I),re!==null&&(x=f(re,x,de),we===null?oe=re:we.sibling=re,we=re);return _e&&xn(D,de),oe}for(re=o(re);de<U.length;de++)be=P(re,D,de,U[de],I),be!==null&&(n&&be.alternate!==null&&re.delete(be.key===null?de:be.key),x=f(be,x,de),we===null?oe=be:we.sibling=be,we=be);return n&&re.forEach(function(wr){return r(D,wr)}),_e&&xn(D,de),oe}function ue(D,x,U,I){if(U==null)throw Error(a(151));for(var oe=null,we=null,re=x,de=x=0,be=null,Ee=U.next();re!==null&&!Ee.done;de++,Ee=U.next()){re.index>de?(be=re,re=null):be=re.sibling;var wr=z(D,re,Ee.value,I);if(wr===null){re===null&&(re=be);break}n&&re&&wr.alternate===null&&r(D,re),x=f(wr,x,de),we===null?oe=wr:we.sibling=wr,we=wr,re=be}if(Ee.done)return i(D,re),_e&&xn(D,de),oe;if(re===null){for(;!Ee.done;de++,Ee=U.next())Ee=G(D,Ee.value,I),Ee!==null&&(x=f(Ee,x,de),we===null?oe=Ee:we.sibling=Ee,we=Ee);return _e&&xn(D,de),oe}for(re=o(re);!Ee.done;de++,Ee=U.next())Ee=P(re,D,de,Ee.value,I),Ee!==null&&(n&&Ee.alternate!==null&&re.delete(Ee.key===null?de:Ee.key),x=f(Ee,x,de),we===null?oe=Ee:we.sibling=Ee,we=Ee);return n&&re.forEach(function(ES){return r(D,ES)}),_e&&xn(D,de),oe}function De(D,x,U,I){if(typeof U=="object"&&U!==null&&U.type===A&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case _:e:{for(var oe=U.key;x!==null;){if(x.key===oe){if(oe=U.type,oe===A){if(x.tag===7){i(D,x.sibling),I=h(x,U.props.children),I.return=D,D=I;break e}}else if(x.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Fr(oe)===x.type){i(D,x.sibling),I=h(x,U.props),qi(I,U),I.return=D,D=I;break e}i(D,x);break}else r(D,x);x=x.sibling}U.type===A?(I=$r(U.props.children,D.mode,I,U.key),I.return=D,D=I):(I=po(U.type,U.key,U.props,null,D.mode,I),qi(I,U),I.return=D,D=I)}return v(D);case w:e:{for(oe=U.key;x!==null;){if(x.key===oe)if(x.tag===4&&x.stateNode.containerInfo===U.containerInfo&&x.stateNode.implementation===U.implementation){i(D,x.sibling),I=h(x,U.children||[]),I.return=D,D=I;break e}else{i(D,x);break}else r(D,x);x=x.sibling}I=Pu(U,D.mode,I),I.return=D,D=I}return v(D);case K:return U=Fr(U),De(D,x,U,I)}if(Be(U))return ee(D,x,U,I);if(me(U)){if(oe=me(U),typeof oe!="function")throw Error(a(150));return U=oe.call(U),ue(D,x,U,I)}if(typeof U.then=="function")return De(D,x,So(U),I);if(U.$$typeof===j)return De(D,x,mo(D,U),I);wo(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,x!==null&&x.tag===6?(i(D,x.sibling),I=h(x,U),I.return=D,D=I):(i(D,x),I=zu(U,D.mode,I),I.return=D,D=I),v(D)):i(D,x)}return function(D,x,U,I){try{Hi=0;var oe=De(D,x,U,I);return Ps=null,oe}catch(re){if(re===zs||re===bo)throw re;var we=zt(29,re,null,D.mode);return we.lanes=I,we.return=D,we}}}var Jr=Gd(!0),Vd=Gd(!1),ir=!1;function Ju(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xu(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 ar(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function or(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var h=o.pending;
vendor: 7,529 bytes, line 8
8return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=fo(n),Cd(n,null,i),r}return ho(n,o,r,i),fo(n)}function Ii(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,Lf(n,i)}}function Zu(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var h=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?h=f=r:f=f.next=r}else h=f=r;i={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,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 Wu=!1;function $i(){if(Wu){var n=Ls;if(n!==null)throw n}}function Gi(n,r,i,o){Wu=!1;var h=n.updateQueue;ir=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var C=S,L=C.next;C.next=null,v===null?f=L:v.next=L,v=C;var q=n.alternate;q!==null&&(q=q.updateQueue,S=q.lastBaseUpdate,S!==v&&(S===null?q.firstBaseUpdate=L:S.next=L,q.lastBaseUpdate=C))}if(f!==null){var G=h.baseState;v=0,q=L=C=null,S=f;do{var z=S.lane&-536870913,P=z!==S.lane;if(P?(ve&z)===z:(o&z)===z){z!==0&&z===Ns&&(Wu=!0),q!==null&&(q=q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ee=n,ue=S;z=r;var De=i;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(De,G,z);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,z=typeof ee=="function"?ee.call(De,G,z):ee,z==null)break e;G=y({},G,z);break e;case 2:ir=!0}}z=S.callback,z!==null&&(n.flags|=64,P&&(n.flags|=8192),P=h.callbacks,P===null?h.callbacks=[z]:P.push(z))}else P={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},q===null?(L=q=P,C=G):q=q.next=P,v|=z;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;P=S,S=P.next,P.next=null,h.lastBaseUpdate=P,h.shared.pending=null}}while(!0);q===null&&(C=G),h.baseState=C,h.firstBaseUpdate=L,h.lastBaseUpdate=q,f===null&&(h.shared.lanes=0),fr|=v,n.lanes=v,n.memoizedState=G}}function Kd(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Yd(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Kd(i[n],r)}var Bs=k(null),Eo=k(0);function Fd(n,r){n=Hn,X(Eo,n),X(Bs,r),Hn=n|r.baseLanes}function ec(){X(Eo,Hn),X(Bs,Bs.current)}function tc(){Hn=Eo.current,$(Bs),$(Eo)}var Pt=k(null),Xt=null;function lr(n){var r=n.alternate;X(Qe,Qe.current&1),X(Pt,n),Xt===null&&(r===null||Bs.current!==null||r.memoizedState!==null)&&(Xt=n)}function nc(n){X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)}function Qd(n){n.tag===22?(X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)):ur()}function ur(){X(Qe,Qe.current),X(Pt,Pt.current)}function Bt(n){$(Pt),Xt===n&&(Xt=null),$(Qe)}var Qe=k(0);function To(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||lh(i)||uh(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 Mn=0,fe=null,je=null,We=null,Ro=!1,Hs=!1,Xr=!1,Ao=0,Vi=0,qs=null,d_=0;function Ge(){throw Error(a(321))}function rc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Lt(n[i],r[i]))return!1;return!0}function sc(n,r,i,o,h,f){return Mn=f,fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=n===null||n.memoizedState===null?Mp:bc,Xr=!1,f=i(o,h),Xr=!1,Hs&&(f=Xd(r,i,o,h)),Jd(n),f}function Jd(n){B.H=Fi;var r=je!==null&&je.next!==null;if(Mn=0,We=je=fe=null,Ro=!1,Vi=0,qs=null,r)throw Error(a(300));n===null||et||(n=n.dependencies,n!==null&&yo(n)&&(et=!0))}function Xd(n,r,i,o){fe=n;var h=0;do{if(Hs&&(qs=null),Vi=0,Hs=!1,25<=h)throw Error(a(301));if(h+=1,We=je=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=Dp,f=r(i,o)}while(Hs);return f}function p_(){var n=B.H,r=n.useState()[0];return r=typeof r.then=="function"?Ki(r):r,n=n.useState()[0],(je!==null?je.memoizedState:null)!==n&&(fe.flags|=1024),r}function ic(){var n=Ao!==0;return Ao=0,n}function ac(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function oc(n){if(Ro){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Ro=!1}Mn=0,We=je=fe=null,Hs=!1,Vi=Ao=0,qs=null}function St(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?fe.memoizedState=We=n:We=We.next=n,We}function Je(){if(je===null){var n=fe.alternate;n=n!==null?n.memoizedState:null}else n=je.next;var r=We===null?fe.memoizedState:We.next;if(r!==null)We=r,je=n;else{if(n===null)throw fe.alternate===null?Error(a(467)):Error(a(310));je=n,n={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},We===null?fe.memoizedState=We=n:We=We.next=n}return We}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ki(n){var r=Vi;return Vi+=1,qs===null&&(qs=[]),n=qd(qs,n,r),r=fe,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Mp:bc),n}function Co(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ki(n);if(n.$$typeof===j)return pt(n)}throw Error(a(438,String(n)))}function lc(n){var r=null,i=fe.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var o=fe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Oo(),fe.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]=ie;return r.index++,i}function Dn(n,r){return typeof r=="function"?r(n):r}function xo(n){var r=Je();return uc(r,je,n)}function uc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var h=n.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=n.baseState,h===null)n.memoizedState=f;else{r=h.next;var S=v=null,C=null,L=r,q=!1;do{var G=L.lane&-536870913;if(G!==L.lane?(ve&G)===G:(Mn&G)===G){var z=L.revertLane;if(z===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),G===Ns&&(q=!0);else if((Mn&z)===z){L=L.next,z===Ns&&(q=!0);continue}else G={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=G,v=f):C=C.next=G,fe.lanes|=z,fr|=z;G=L.action,Xr&&i(f,G),f=L.hasEagerState?L.eagerState:i(f,G)}else z={lane:G,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=z,v=f):C=C.next=z,fe.lanes|=G,fr|=G;L=L.next}while(L!==null&&L!==r);if(C===null?v=f:C.next=S,!Lt(f,n.memoizedState)&&(et=!0,q&&(i=Ls,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=C,o.lastRenderedState=f}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function cc(n){var r=Je(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;
vendor: 6,781 bytes, line 8
8var o=i.dispatch,h=i.pending,f=r.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do f=n(f,v.action),v=v.next;while(v!==h);Lt(f,r.memoizedState)||(et=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,o]}function Zd(n,r,i){var o=fe,h=Je(),f=_e;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!Lt((je||h).memoizedState,i);if(v&&(h.memoizedState=i,et=!0),h=h.queue,dc(tp.bind(null,o,h,n),[n]),h.getSnapshot!==r||v||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,Is(9,{destroy:void 0},ep.bind(null,o,h,i,r),null),Ne===null)throw Error(a(349));f||(Mn&127)!==0||Wd(o,r,i)}return i}function Wd(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=fe.updateQueue,r===null?(r=Oo(),fe.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function ep(n,r,i,o){r.value=i,r.getSnapshot=o,np(r)&&rp(n)}function tp(n,r,i){return i(function(){np(r)&&rp(n)})}function np(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Lt(n,i)}catch{return!0}}function rp(n){var r=Ir(n,2);r!==null&&xt(r,n,2)}function hc(n){var r=St();if(typeof n=="function"){var i=n;if(n=i(),Xr){Zn(!0);try{i()}finally{Zn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:n},r}function sp(n,r,i,o){return n.baseState=i,uc(n,je,typeof o=="function"?o:Dn)}function g_(n,r,i,o,h){if(Mo(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};B.T!==null?i(!0):f.isTransition=!1,o(f),i=r.pending,i===null?(f.next=r.pending=f,ip(r,f)):(f.next=i.next,r.pending=i.next=f)}}function ip(n,r){var i=r.action,o=r.payload,h=n.state;if(r.isTransition){var f=B.T,v={};B.T=v;try{var S=i(h,o),C=B.S;C!==null&&C(v,S),ap(n,r,S)}catch(L){fc(n,r,L)}finally{f!==null&&v.types!==null&&(f.types=v.types),B.T=f}}else try{f=i(h,o),ap(n,r,f)}catch(L){fc(n,r,L)}}function ap(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){op(n,r,o)},function(o){return fc(n,r,o)}):op(n,r,i)}function op(n,r,i){r.status="fulfilled",r.value=i,lp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,ip(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,lp(r),r=r.next;while(r!==o)}n.action=null}function lp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function up(n,r){return r}function cp(n,r){if(_e){var i=Ne.formState;if(i!==null){e:{var o=fe;if(_e){if(He){t:{for(var h=He,f=Jt;h.nodeType!==8;){if(!f){h=null;break t}if(h=Zt(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){He=Zt(h.nextSibling),o=h.data==="F!";break e}}rr(o)}o=!1}o&&(r=i[0])}}return i=St(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:up,lastRenderedState:r},i.queue=o,i=xp.bind(null,fe,o),o.dispatch=i,o=hc(!1),f=vc.bind(null,fe,!1,o.queue),o=St(),h={state:r,dispatch:null,action:n,pending:null},o.queue=h,i=g_.bind(null,fe,h,f,i),h.dispatch=i,o.memoizedState=n,[r,i,!1]}function hp(n){var r=Je();return fp(r,je,n)}function fp(n,r,i){if(r=uc(n,r,up)[0],n=xo(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Ki(r)}catch(v){throw v===zs?bo:v}else o=r;r=Je();var h=r.queue,f=h.dispatch;return i!==r.memoizedState&&(fe.flags|=2048,Is(9,{destroy:void 0},y_.bind(null,h,i),null)),[o,f,n]}function y_(n,r){n.action=r}function dp(n){var r=Je(),i=je;if(i!==null)return fp(r,i,n);Je(),r=r.memoizedState,i=Je();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=fe.updateQueue,r===null&&(r=Oo(),fe.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 pp(){return Je().memoizedState}function ko(n,r,i,o){var h=St();fe.flags|=n,h.memoizedState=Is(1|r,{destroy:void 0},i,o===void 0?null:o)}function jo(n,r,i,o){var h=Je();o=o===void 0?null:o;var f=h.memoizedState.inst;je!==null&&o!==null&&rc(o,je.memoizedState.deps)?h.memoizedState=Is(r,f,i,o):(fe.flags|=n,h.memoizedState=Is(1|r,f,i,o))}function gp(n,r){ko(8390656,8,n,r)}function dc(n,r){jo(2048,8,n,r)}function m_(n){fe.flags|=4;var r=fe.updateQueue;if(r===null)r=Oo(),fe.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function yp(n){var r=Je().memoizedState;return m_({ref:r,nextImpl:n}),function(){if((Ae&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function mp(n,r){return jo(4,2,n,r)}function vp(n,r){return jo(4,4,n,r)}function bp(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 _p(n,r,i){i=i!=null?i.concat([n]):null,jo(4,4,bp.bind(null,r,n),i)}function pc(){}function Sp(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&rc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function wp(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&rc(r,o[1]))return o[0];if(o=n(),Xr){Zn(!0);try{n()}finally{Zn(!1)}}return i.memoizedState=[o,r],o}function gc(n,r,i){return i===void 0||(Mn&1073741824)!==0&&(ve&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Eg(),fe.lanes|=n,fr|=n,i)}function Ep(n,r,i,o){return Lt(i,r)?i:Bs.current!==null?(n=gc(n,i,o),Lt(n,r)||(et=!0),n):(Mn&42)===0||(Mn&1073741824)!==0&&(ve&261930)===0?(et=!0,n.memoizedState=i):(n=Eg(),fe.lanes|=n,fr|=n,r)}function Tp(n,r,i,o,h){var f=Q.p;Q.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,vc(n,!1,r,i);try{var C=h(),L=B.S;if(L!==null&&L(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var q=f_(C,o);Yi(n,r,q,It(n))}else Yi(n,r,o,It(n))}catch(G){Yi(n,r,{then:function(){},status:"rejected",reason:G},It())}finally{Q.p=f,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function v_(){}function yc(n,r,i,o){if(n.tag!==5)throw Error(a(476));var h=Rp(n).queue;Tp(n,h,r,le,i===null?v_:function(){return Ap(n),i(o)})}function Rp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:le},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Ap(n){var r=Rp(n);r.next===null&&(r=n.alternate.memoizedState),Yi(n,r.next.queue,{},It())}function mc(){return pt(ca)}function Op(){return Je().memoizedState}function Cp(){return Je().memoizedState}function b_(n){for(var r=n.return;r!==null;
vendor: 23,556 bytes, line 8
8){switch(r.tag){case 24:case 3:var i=It();n=ar(i);var o=or(r,n,i);o!==null&&(xt(o,r,i),Ii(o,r,i)),r={cache:Ku()},n.payload=r;return}r=r.return}}function __(n,r,i){var o=It();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Mo(n)?kp(r,i):(i=Nu(n,r,i,o),i!==null&&(xt(i,n,o),jp(i,r,o)))}function xp(n,r,i){var o=It();Yi(n,r,i,o)}function Yi(n,r,i,o){var h={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Mo(n))kp(r,h);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,S=f(v,i);if(h.hasEagerState=!0,h.eagerState=S,Lt(S,v))return ho(n,r,h,0),Ne===null&&co(),!1}catch{}if(i=Nu(n,r,h,o),i!==null)return xt(i,n,o),jp(i,r,o),!0}return!1}function vc(n,r,i,o){if(o={lane:2,revertLane:Jc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Mo(n)){if(r)throw Error(a(479))}else r=Nu(n,i,o,2),r!==null&&xt(r,n,2)}function Mo(n){var r=n.alternate;return n===fe||r!==null&&r===fe}function kp(n,r){Hs=Ro=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function jp(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Lf(n,i)}}var Fi={readContext:pt,use:Co,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Fi.useEffectEvent=Ge;var Mp={readContext:pt,use:Co,useCallback:function(n,r){return St().memoizedState=[n,r===void 0?null:r],n},useContext:pt,useEffect:gp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,ko(4194308,4,bp.bind(null,r,n),i)},useLayoutEffect:function(n,r){return ko(4194308,4,n,r)},useInsertionEffect:function(n,r){ko(4,2,n,r)},useMemo:function(n,r){var i=St();r=r===void 0?null:r;var o=n();if(Xr){Zn(!0);try{n()}finally{Zn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=St();if(i!==void 0){var h=i(r);if(Xr){Zn(!0);try{i(r)}finally{Zn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=__.bind(null,fe,n),[o.memoizedState,n]},useRef:function(n){var r=St();return n={current:n},r.memoizedState=n},useState:function(n){n=hc(n);var r=n.queue,i=xp.bind(null,fe,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:pc,useDeferredValue:function(n,r){var i=St();return gc(i,n,r)},useTransition:function(){var n=hc(!1);return n=Tp.bind(null,fe,n.queue,!0,!1),St().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=fe,h=St();if(_e){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ne===null)throw Error(a(349));(ve&127)!==0||Wd(o,r,i)}h.memoizedState=i;var f={value:i,getSnapshot:r};return h.queue=f,gp(tp.bind(null,o,f,n),[n]),o.flags|=2048,Is(9,{destroy:void 0},ep.bind(null,o,f,i,r),null),i},useId:function(){var n=St(),r=Ne.identifierPrefix;if(_e){var i=pn,o=dn;i=(o&~(1<<32-Nt(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Ao++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=d_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:mc,useFormState:cp,useActionState:cp,useOptimistic:function(n){var r=St();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=vc.bind(null,fe,!0,i),i.dispatch=r,[n,r]},useMemoCache:lc,useCacheRefresh:function(){return St().memoizedState=b_.bind(null,fe)},useEffectEvent:function(n){var r=St(),i={impl:n};return r.memoizedState=i,function(){if((Ae&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},bc={readContext:pt,use:Co,useCallback:Sp,useContext:pt,useEffect:dc,useImperativeHandle:_p,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:wp,useReducer:xo,useRef:pp,useState:function(){return xo(Dn)},useDebugValue:pc,useDeferredValue:function(n,r){var i=Je();return Ep(i,je.memoizedState,n,r)},useTransition:function(){var n=xo(Dn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Ki(n),r]},useSyncExternalStore:Zd,useId:Op,useHostTransitionStatus:mc,useFormState:hp,useActionState:hp,useOptimistic:function(n,r){var i=Je();return sp(i,je,n,r)},useMemoCache:lc,useCacheRefresh:Cp};bc.useEffectEvent=yp;var Dp={readContext:pt,use:Co,useCallback:Sp,useContext:pt,useEffect:dc,useImperativeHandle:_p,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:wp,useReducer:cc,useRef:pp,useState:function(){return cc(Dn)},useDebugValue:pc,useDeferredValue:function(n,r){var i=Je();return je===null?gc(i,n,r):Ep(i,je.memoizedState,n,r)},useTransition:function(){var n=cc(Dn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Ki(n),r]},useSyncExternalStore:Zd,useId:Op,useHostTransitionStatus:mc,useFormState:dp,useActionState:dp,useOptimistic:function(n,r){var i=Je();return je!==null?sp(i,je,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:lc,useCacheRefresh:Cp};Dp.useEffectEvent=yp;function _c(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:y({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Sc={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=It(),h=ar(o);h.payload=r,i!=null&&(h.callback=i),r=or(n,h,o),r!==null&&(xt(r,n,o),Ii(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=It(),h=ar(o);h.tag=1,h.payload=r,i!=null&&(h.callback=i),r=or(n,h,o),r!==null&&(xt(r,n,o),Ii(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=It(),o=ar(i);o.tag=2,r!=null&&(o.callback=r),r=or(n,o,i),r!==null&&(xt(r,n,i),Ii(r,n,i))}};function Up(n,r,i,o,h,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!Ui(i,o)||!Ui(h,f):!0}function Np(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&&Sc.enqueueReplaceState(r,r.state,null)}function Zr(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=y({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function Lp(n){uo(n)}function zp(n){console.error(n)}function Pp(n){uo(n)}function Do(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function Bp(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function wc(n,r,i){return i=ar(i),i.tag=3,i.payload={element:null},i.callback=function(){Do(n,r)},i}function Hp(n){return n=ar(n),n.tag=3,n}function qp(n,r,i,o){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;n.payload=function(){return h(f)},n.callback=function(){Bp(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Bp(r,i,o),typeof h!="function"&&(dr===null?dr=new Set([this]):dr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function S_(n,r,i,o,h){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&Us(r,i,h,!0),i=Pt.current,i!==null){switch(i.tag){case 31:case 13:return Xt===null?Vo():i.alternate===null&&Ve===0&&(Ve=3),i.flags&=-257,i.flags|=65536,i.lanes=h,o===_o?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),Yc(n,o,h)),!1;case 22:return i.flags|=65536,o===_o?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)),Yc(n,o,h)),!1}throw Error(a(435,i.tag))}return Yc(n,o,h),Vo(),!1}if(_e)return r=Pt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==qu&&(n=Error(a(422),{cause:o}),zi(Yt(n,i)))):(o!==qu&&(r=Error(a(423),{cause:o}),zi(Yt(r,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=Yt(o,i),h=wc(n.stateNode,o,h),Zu(n,h),Ve!==4&&(Ve=2)),!1;var f=Error(a(520),{cause:o});if(f=Yt(f,i),na===null?na=[f]:na.push(f),Ve!==4&&(Ve=2),r===null)return!0;o=Yt(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=wc(i.stateNode,o,n),Zu(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(dr===null||!dr.has(f))))return i.flags|=65536,h&=-h,i.lanes|=h,h=Hp(h),qp(h,n,i,o),Zu(i,h),!1}i=i.return}while(i!==null);return!1}var Ec=Error(a(461)),et=!1;function gt(n,r,i,o){r.child=n===null?Vd(r,null,i,o):Jr(r,n.child,i,o)}function Ip(n,r,i,o,h){i=i.render;var f=r.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Kr(r),o=sc(n,r,i,v,f,h),S=ic(),n!==null&&!et?(ac(n,r,h),Un(n,r,h)):(_e&&S&&Bu(r),r.flags|=1,gt(n,r,o,h),r.child)}function $p(n,r,i,o,h){if(n===null){var f=i.type;return typeof f=="function"&&!Lu(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,Gp(n,r,f,o,h)):(n=po(i.type,null,o,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!jc(n,h)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:Ui,i(v,o)&&n.ref===r.ref)return Un(n,r,h)}return r.flags|=1,n=Cn(f,o),n.ref=r.ref,n.return=r,r.child=n}function Gp(n,r,i,o,h){if(n!==null){var f=n.memoizedProps;if(Ui(f,o)&&n.ref===r.ref)if(et=!1,r.pendingProps=o=f,jc(n,h))(n.flags&131072)!==0&&(et=!0);else return r.lanes=n.lanes,Un(n,r,h)}return Tc(n,r,i,o,h)}function Vp(n,r,i,o){var h=o.children,f=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(f=f!==null?f.baseLanes|i:i,n!==null){for(o=r.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return Kp(n,r,f,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&vo(r,f!==null?f.cachePool:null),f!==null?Fd(r,f):ec(),Qd(r);else return o=r.lanes=536870912,Kp(n,r,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(vo(r,f.cachePool),Fd(r,f),ur(),r.memoizedState=null):(n!==null&&vo(r,null),ec(),ur());return gt(n,r,h,i),r.child}function Qi(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Kp(n,r,i,o,h){var f=Fu();return f=f===null?null:{parent:Ze._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&vo(r,null),ec(),Qd(r),n!==null&&Us(n,r,o,!0),r.childLanes=h,null}function Uo(n,r){return r=Lo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Yp(n,r,i){return Jr(r,n.child,null,i),n=Uo(r,r.pendingProps),n.flags|=2,Bt(r),r.memoizedState=null,n}function w_(n,r,i){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(_e){if(o.mode==="hidden")return n=Uo(r,o),r.lanes=536870912,Qi(null,n);if(nc(r),(n=He)?(n=iy(n,Jt),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:tr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=kd(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw rr(r);return r.lanes=536870912,null}return Uo(r,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(nc(r),h)if(r.flags&256)r.flags&=-257,r=Yp(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(et||Us(n,r,i,!1),h=(i&n.childLanes)!==0,et||h){if(o=Ne,o!==null&&(v=zf(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ir(n,v),xt(o,n,v),Ec;Vo(),r=Yp(n,r,i)}else n=f.treeContext,He=Zt(v.nextSibling),dt=r,_e=!0,nr=null,Jt=!1,n!==null&&Dd(r,n),r=Uo(r,o),r.flags|=4096;return r}return n=Cn(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function No(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 Tc(n,r,i,o,h){return Kr(r),i=sc(n,r,i,o,void 0,h),o=ic(),n!==null&&!et?(ac(n,r,h),Un(n,r,h)):(_e&&o&&Bu(r),r.flags|=1,gt(n,r,i,h),r.child)}function Fp(n,r,i,o,h,f){return Kr(r),r.updateQueue=null,i=Xd(r,o,i,h),Jd(n),o=ic(),n!==null&&!et?(ac(n,r,f),Un(n,r,f)):(_e&&o&&Bu(r),r.flags|=1,gt(n,r,i,f),r.child)}function Qp(n,r,i,o,h){if(Kr(r),r.stateNode===null){var f=ks,v=i.contextType;typeof v=="object"&&v!==null&&(f=pt(v)),f=new i(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Sc,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},Ju(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?pt(v):ks,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(_c(r,i,v,o),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Sc.enqueueReplaceState(f,f.state,null),Gi(r,o,f,h),$i(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){f=r.stateNode;var S=r.memoizedProps,C=Zr(i,S);f.props=C;var L=f.context,q=i.contextType;v=ks,typeof q=="object"&&q!==null&&(v=pt(q));var G=i.getDerivedStateFromProps;q=typeof G=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||L!==v)&&Np(r,f,o,v),ir=!1;var z=r.memoizedState;f.state=z,Gi(r,o,f,h),$i(),L=r.memoizedState,S||z!==L||ir?(typeof G=="function"&&(_c(r,i,G,o),L=r.memoizedState),(C=ir||Up(r,i,C,o,z,L,v))?(q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=L),f.props=o,f.state=L,f.context=v,o=C):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,Xu(n,r),v=r.memoizedProps,q=Zr(i,v),f.props=q,G=r.pendingProps,z=f.context,L=i.contextType,C=ks,typeof L=="object"&&L!==null&&(C=pt(L)),S=i.getDerivedStateFromProps,(L=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==G||z!==C)&&Np(r,f,o,C),ir=!1,z=r.memoizedState,f.state=z,Gi(r,o,f,h),$i();var P=r.memoizedState;v!==G||z!==P||ir||n!==null&&n.dependencies!==null&&yo(n.dependencies)?(typeof S=="function"&&(_c(r,i,S,o),P=r.memoizedState),(q=ir||Up(r,i,q,o,z,P,C)||n!==null&&n.dependencies!==null&&yo(n.dependencies))?(L||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,P,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,P,C)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=P),f.props=o,f.state=P,f.context=C,o=q):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),o=!1)}return f=o,No(n,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&o?(r.child=Jr(r,n.child,null,h),r.child=Jr(r,null,i,h)):gt(n,r,i,h),r.memoizedState=f.state,n=r.child):n=Un(n,r,h),n}function Jp(n,r,i,o){return Gr(),r.flags|=256,gt(n,r,i,o),r.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(n){return{baseLanes:n,cachePool:Bd()}}function Oc(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=qt),n}function Xp(n,r,i){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(_e){if(h?lr(r):ur(),(n=He)?(n=iy(n,Jt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:tr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=kd(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw rr(r);return uh(n)?r.lanes=32:r.lanes=536870912,null}var S=o.children;return o=o.fallback,h?(ur(),h=r.mode,S=Lo({mode:"hidden",children:S},h),o=$r(o,h,i,null),S.return=r,o.return=r,S.sibling=o,r.child=S,o=r.child,o.memoizedState=Ac(i),o.childLanes=Oc(n,v,i),r.memoizedState=Rc,Qi(null,o)):(lr(r),Cc(r,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)r.flags&256?(lr(r),r.flags&=-257,r=xc(n,r,i)):r.memoizedState!==null?(ur(),r.child=n.child,r.flags|=128,r=null):(ur(),S=o.fallback,h=r.mode,o=Lo({mode:"visible",children:o.children},h),S=$r(S,h,i,null),S.flags|=2,o.return=r,S.return=r,o.sibling=S,r.child=o,Jr(r,n.child,null,i),o=r.child,o.memoizedState=Ac(i),o.childLanes=Oc(n,v,i),r.memoizedState=Rc,r=Qi(null,o));else if(lr(r),uh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var L=v.dgst;v=L,o=Error(a(419)),o.stack="",o.digest=v,zi({value:o,source:null,stack:null}),r=xc(n,r,i)}else if(et||Us(n,r,i,!1),v=(i&n.childLanes)!==0,et||v){if(v=Ne,v!==null&&(o=zf(v,i),o!==0&&o!==C.retryLane))throw C.retryLane=o,Ir(n,o),xt(v,n,o),Ec;lh(S)||Vo(),r=xc(n,r,i)}else lh(S)?(r.flags|=192,r.child=n.child,r=null):(n=C.treeContext,He=Zt(S.nextSibling),dt=r,_e=!0,nr=null,Jt=!1,n!==null&&Dd(r,n),r=Cc(r,o.children),r.flags|=4096);return r}return h?(ur(),S=o.fallback,h=r.mode,C=n.child,L=C.sibling,o=Cn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,L!==null?S=Cn(L,S):(S=$r(S,h,i,null),S.flags|=2),S.return=r,o.return=r,o.sibling=S,r.child=o,Qi(null,o),o=r.child,S=n.child.memoizedState,S===null?S=Ac(i):(h=S.cachePool,h!==null?(C=Ze._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Bd(),S={baseLanes:S.baseLanes|i,cachePool:h}),o.memoizedState=S,o.childLanes=Oc(n,v,i),r.memoizedState=Rc,Qi(n.child,o)):(lr(r),i=n.child,n=i.sibling,i=Cn(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 Cc(n,r){return r=Lo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Lo(n,r){return n=zt(22,n,null,r),n.lanes=0,n}function xc(n,r,i){return Jr(r,n.child,null,i),n=Cc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Zp(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),Gu(n.return,r,i)}function kc(n,r,i,o,h,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=h,v.treeForkCount=f)}function Wp(n,r,i){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=Qe.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,X(Qe,v),gt(n,r,o,i),o=_e?Li:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Zp(n,i,r);else if(n.tag===19)Zp(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(h){case"forwards":for(i=r.child,h=null;i!==null;)n=i.alternate,n!==null&&To(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=r.child,r.child=null):(h=i.sibling,i.sibling=null),kc(r,!1,h,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&To(n)===null){r.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}kc(r,!0,i,null,f,o);break;case"together":kc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Un(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),fr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(Us(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=Cn(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=Cn(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function jc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&yo(n)))}function E_(n,r,i){switch(r.tag){case 3:Fe(r,r.stateNode.containerInfo),sr(r,Ze,n.memoizedState.cache),Gr();break;case 27:case 5:wn(r);break;case 4:Fe(r,r.stateNode.containerInfo);break;case 10:sr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,nc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(lr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Xp(n,r,i):(lr(r),n=Un(n,r,i),n!==null?n.sibling:null);lr(r);break;case 19:var h=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(Us(n,r,i,!1),o=(i&r.childLanes)!==0),h){if(o)return Wp(n,r,i);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),X(Qe,Qe.current),o)break;return null;case 22:return r.lanes=0,Vp(n,r,i,r.pendingProps);case 24:sr(r,Ze,n.memoizedState.cache)}return Un(n,r,i)}function eg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)et=!0;else{if(!jc(n,i)&&(r.flags&128)===0)return et=!1,E_(n,r,i);et=(n.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Md(r,Li,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Fr(r.elementType),r.type=n,typeof n=="function")Lu(n)?(o=Zr(n,o),r.tag=1,r=Qp(null,r,n,o,i)):(r.tag=0,r=Tc(null,r,n,o,i));else{if(n!=null){var h=n.$$typeof;if(h===N){r.tag=11,r=Ip(null,r,n,o,i);break e}else if(h===H){r.tag=14,r=$p(null,r,n,o,i);break e}}throw r=Ye(n)||n,Error(a(306,r,""))}}return r;case 0:return Tc(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,h=Zr(o,r.pendingProps),Qp(n,r,o,h,i);case 3:e:{if(Fe(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,Xu(n,r),Gi(r,o,null,i);var v=r.memoizedState;if(o=v.cache,sr(r,Ze,o),o!==f.cache&&Vu(r,[Ze],i,!0),$i(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=Jp(n,r,o,i);break e}else if(o!==h){h=Yt(Error(a(424)),r),zi(h),r=Jp(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,He=Zt(n.firstChild),dt=r,_e=!0,nr=null,Jt=!0,i=Vd(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Gr(),o===h){r=Un(n,r,i);break e}gt(n,r,o,i)}r=r.child}return r;case 26:return No(n,r),n===null?(i=hy(r.type,null,r.pendingProps,null))?r.memoizedState=i:_e||(i=r.type,n=r.pen
vendor: 4,917 bytes, line 8
8dingProps,o=Zo(pe.current).createElement(i),o[ft]=r,o[Et]=n,yt(o,i,n),ot(o),r.stateNode=o):r.memoizedState=hy(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return wn(r),n===null&&_e&&(o=r.stateNode=ly(r.type,r.pendingProps,pe.current),dt=r,Jt=!0,h=He,mr(r.type)?(ch=h,He=Zt(o.firstChild)):He=h),gt(n,r,r.pendingProps.children,i),No(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&_e&&((h=o=He)&&(o=W_(o,r.type,r.pendingProps,Jt),o!==null?(r.stateNode=o,dt=r,He=Zt(o.firstChild),Jt=!1,h=!0):h=!1),h||rr(r)),wn(r),h=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,ih(h,f)?o=null:v!==null&&ih(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=sc(n,r,p_,null,null,i),ca._currentValue=h),No(n,r),gt(n,r,o,i),r.child;case 6:return n===null&&_e&&((n=i=He)&&(i=eS(i,r.pendingProps,Jt),i!==null?(r.stateNode=i,dt=r,He=null,n=!0):n=!1),n||rr(r)),null;case 13:return Xp(n,r,i);case 4:return Fe(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Jr(r,null,o,i):gt(n,r,o,i),r.child;case 11:return Ip(n,r,r.type,r.pendingProps,i);case 7:return gt(n,r,r.pendingProps,i),r.child;case 8:return gt(n,r,r.pendingProps.children,i),r.child;case 12:return gt(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,sr(r,r.type,o.value),gt(n,r,o.children,i),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Kr(r),h=pt(h),o=o(h),r.flags|=1,gt(n,r,o,i),r.child;case 14:return $p(n,r,r.type,r.pendingProps,i);case 15:return Gp(n,r,r.type,r.pendingProps,i);case 19:return Wp(n,r,i);case 31:return w_(n,r,i);case 22:return Vp(n,r,i,r.pendingProps);case 24:return Kr(r),o=pt(Ze),n===null?(h=Fu(),h===null&&(h=Ne,f=Ku(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=i),h=f),r.memoizedState={parent:o,cache:h},Ju(r),sr(r,Ze,h)):((n.lanes&i)!==0&&(Xu(n,r),Gi(r,null,null,i),$i()),h=n.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),sr(r,Ze,o)):(o=f.cache,sr(r,Ze,o),o!==h.cache&&Vu(r,[Ze],i,!0))),gt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Nn(n){n.flags|=4}function Mc(n,r,i,o,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Og())n.flags|=8192;else throw Qr=_o,Qu}else n.flags&=-16777217}function tg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!yy(r))if(Og())n.flags|=8192;else throw Qr=_o,Qu}function zo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Uf():536870912,n.lanes|=r,Ks|=r)}function Ji(n,r){if(!_e)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 qe(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function T_(n,r,i){var o=r.pendingProps;switch(Hu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(r),null;case 1:return qe(r),null;case 3:return i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),jn(Ze),Ue(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Ds(r)?Nn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Iu())),qe(r),null;case 26:var h=r.type,f=r.memoizedState;return n===null?(Nn(r),f!==null?(qe(r),tg(r,f)):(qe(r),Mc(r,h,null,o,i))):f?f!==n.memoizedState?(Nn(r),qe(r),tg(r,f)):(qe(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&Nn(r),qe(r),Mc(r,h,n,o,i)),null;case 27:if(En(r),i=pe.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}n=W.current,Ds(r)?Ud(r):(n=ly(h,o,i),r.stateNode=n,Nn(r))}return qe(r),null;case 5:if(En(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}if(f=W.current,Ds(r))Ud(r);else{var v=Zo(pe.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
8",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}f[ft]=r,f[Et]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.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=f;e:switch(yt(f,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Nn(r)}}return qe(r),Mc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=pe.current,Ds(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,h=dt,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}n[ft]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Xg(n.nodeValue,i)),n||rr(r,!0)}else n=Zo(n).createTextNode(o),n[ft]=r,r.stateNode=n}return qe(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=Ds(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[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),n=!1}else i=Iu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(Bt(r),r):(Bt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return qe(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Ds(r),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),h=!1}else h=Iu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bt(r),r):(Bt(r),null)}return Bt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),zo(r,r.updateQueue),qe(r),null);case 4:return Ue(),n===null&&eh(r.stateNode.containerInfo),qe(r),null;case 10:return jn(r.type),qe(r),null;case 19:if($(Qe),o=r.memoizedState,o===null)return qe(r),null;if(h=(r.flags&128)!==0,f=o.rendering,f===null)if(h)Ji(o,!1);else{if(Ve!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=To(n),f!==null){for(r.flags|=128,Ji(o,!1),n=f.updateQueue,r.updateQueue=n,zo(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)xd(i,n),i=i.sibling;return X(Qe,Qe.current&1|2),_e&&xn(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&vt()>Io&&(r.flags|=128,h=!0,Ji(o,!1),r.lanes=4194304)}else{if(!h)if(n=To(f),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,zo(r,n),Ji(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!_e)return qe(r),null}else 2*vt()-o.renderingStartTime>Io&&i!==536870912&&(r.flags|=128,h=!0,Ji(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(n=o.last,n!==null?n.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=vt(),n.sibling=null,i=Qe.current,X(Qe,h?i&1|2:i&1),_e&&xn(r,o.treeForkCount),n):(qe(r),null);case 22:case 23:return Bt(r),tc(),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&&(qe(r),r.subtreeFlags&6&&(r.flags|=8192)):qe(r),i=r.updateQueue,i!==null&&zo(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&&$(Yr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),jn(Ze),qe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function R_(n,r){switch(Hu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return jn(Ze),Ue(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 31:if(r.memoizedState!==null){if(Bt(r),r.alternate===null)throw Error(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Bt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return $(Qe),null;case 4:return Ue(),null;case 10:return jn(r.type),null;case 22:case 23:return Bt(r),tc(),n!==null&&$(Yr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return jn(Ze),null;case 25:return null;default:return null}}function ng(n,r){switch(Hu(r),r.tag){case 3:jn(Ze),Ue();break;case 26:case 27:case 5:En(r);break;case 4:Ue();break;case 31:r.memoizedState!==null&&Bt(r);break;case 13:Bt(r);break;case 19:$(Qe);break;case 10:jn(r.type);break;case 22:case 23:Bt(r),tc(),n!==null&&$(Yr);break;case 24:jn(Ze)}}function Xi(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var h=o.next;i=h;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==h)}}catch(S){ke(r,r.return,S)}}function cr(n,r,i){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&n)===n){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=r;var C=i,L=S;try{L()}catch(q){ke(h,C,q)}}}o=o.next}while(o!==f)}}catch(q){ke(r,r.return,q)}}function rg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Yd(r,i)}catch(o){ke(n,n.return,o)}}}function sg(n,r,i){i.props=Zr(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,134 bytes, line 8
8try{i.componentWillUnmount()}catch(o){ke(n,r,o)}}function Zi(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(h){ke(n,r,h)}}function gn(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(h){ke(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){ke(n,r,h)}else i.current=null}function ig(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(h){ke(n,n.return,h)}}function Dc(n,r,i){try{var o=n.stateNode;Y_(o,n.type,i,r),o[Et]=r}catch(h){ke(n,n.return,h)}}function ag(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&mr(n.type)||n.tag===4}function Uc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ag(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&&mr(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 Nc(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=An));else if(o!==4&&(o===27&&mr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(Nc(n,r,i),n=n.sibling;n!==null;)Nc(n,r,i),n=n.sibling}function Po(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&&mr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Po(n,r,i),n=n.sibling;n!==null;)Po(n,r,i),n=n.sibling}function og(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);yt(r,o,i),r[ft]=n,r[Et]=i}catch(f){ke(n,n.return,f)}}var Ln=!1,tt=!1,Lc=!1,lg=typeof WeakSet=="function"?WeakSet:Set,lt=null;function A_(n,r){if(n=n.containerInfo,rh=il,n=_d(n),xu(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 h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,C=-1,L=0,q=0,G=n,z=null;t:for(;;){for(var P;G!==i||h!==0&&G.nodeType!==3||(S=v+h),G!==f||o!==0&&G.nodeType!==3||(C=v+o),G.nodeType===3&&(v+=G.nodeValue.length),(P=G.firstChild)!==null;)z=G,G=P;for(;;){if(G===n)break t;if(z===i&&++L===h&&(S=v),z===f&&++q===o&&(C=v),(P=G.nextSibling)!==null)break;G=z,z=G.parentNode}G=P}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(sh={focusedElem:n,selectionRange:i},il=!1,lt=r;lt!==null;)if(r=lt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,lt=n;else for(;lt!==null;){switch(r=lt,f=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++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,h=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ee=Zr(i.type,h);n=o.getSnapshotBeforeUpdate(ee,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(ue){ke(i,i.return,ue)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)oh(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":oh(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,lt=n;break}lt=r.return}}function ug(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Pn(n,i),o&4&&Xi(5,i);break;case 1:if(Pn(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){ke(i,i.return,v)}else{var h=Zr(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){ke(i,i.return,v)}}o&64&&rg(i),o&512&&Zi(i,i.return);break;case 3:if(Pn(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{Yd(n,r)}catch(v){ke(i,i.return,v)}}break;case 27:r===null&&o&4&&og(i);case 26:case 5:Pn(n,i),r===null&&o&4&&ig(i),o&512&&Zi(i,i.return);break;case 12:Pn(n,i);break;case 31:Pn(n,i),o&4&&fg(n,i);break;case 13:Pn(n,i),o&4&&dg(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=N_.bind(null,i),tS(n,i))));break;case 22:if(o=i.memoizedState!==null||Ln,!o){r=r!==null&&r.memoizedState!==null||tt,h=Ln;var f=tt;Ln=o,(tt=r)&&!f?Bn(n,i,(i.subtreeFlags&8772)!==0):Pn(n,i),Ln=h,tt=f}break;case 30:break;default:Pn(n,i)}}function cg(n){var r=n.alternate;r!==null&&(n.alternate=null,cg(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,Rt=!1;function zn(n,r,i){for(i=i.child;i!==null;)hg(n,r,i),i=i.sibling}function hg(n,r,i){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(wi,i)}catch{}switch(i.tag){case 26:tt||gn(i,r),zn(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:tt||gn(i,r);var o=Ie,h=Rt;mr(i.type)&&(Ie=i.stateNode,Rt=!1),zn(n,r,i),oa(i.stateNode),Ie=o,Rt=h;break;case 5:tt||gn(i,r);case 6:if(o=Ie,h=Rt,Ie=null,zn(n,r,i),Ie=o,Rt=h,Ie!==null)if(Rt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(i.stateNode)}catch(f){ke(i,r,f)}else try{Ie.removeChild(i.stateNode)}catch(f){ke(i,r,f)}break;case 18:Ie!==null&&(Rt?(n=Ie,ry(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),ei(n)):ry(Ie,i.stateNode));break;case 4:o=Ie,h=Rt,Ie=i.stateNode.containerInfo,Rt=!0,zn(n,r,i),Ie=o,Rt=h;break;case 0:case 11:case 14:case 15:cr(2,i,r),tt||cr(4,i,r),zn(n,r,i);break;case 1:tt||(gn(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&sg(i,r,o)),zn(n,r,i);break;case 21:zn(n,r,i);break;case 22:tt=(o=tt)||i.memoizedState!==null,zn(n,r,i),tt=o;break;default:zn(n,r,i)}}function fg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ei(n)}catch(i){ke(r,r.return,i)}}}function dg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ei(n)}catch(i){ke(r,r.return,i)}}function O_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new lg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new lg),r;default:throw Error(a(435,n.tag))}}function Bo(n,r){var i=O_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var h=L_.bind(null,n,o);o.then(h,h)}})}function At(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var h=i[o],f=n,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(mr(S.type)){Ie=S.stateNode,Rt=!1;break e}break;case 5:Ie=S.stateNode,Rt=!1;break e;case 3:case 4:Ie=S.stateNode.containerInfo,Rt=!0;break e}S=S.return}if(Ie===null)throw Error(a(160));hg(f,v,h),Ie=null,Rt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)pg(r,n),r=r.sibling}var rn=null;function pg(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:At(r,n),Ot(n),o&4&&(cr(3,n,n.return),Xi(3,n),cr(5,n,n.return));break;case 1:At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),o&64&&Ln&&(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 h=rn;if(At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),o&4){var f=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,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Ri]||f[ft]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),yt(f,o,i),f[ft]=n,ot(f),o=f;break e;case"link":var v=py("link","href",h).get(o+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=h.createElement(o),yt(f,o,i),h.head.appendChild(f);break;case"meta":if(v=py("meta","content",h).get(o+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=h.createElement(o),yt(f,o,i),h.head.appendChild(f);break;default:throw Error(a(468,o))}f[ft]=n,ot(f),o=f}n.stateNode=o}else gy(h,n.type,n.stateNode);else n.stateNode=dy(h,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?gy(h,n.type,n.stateNode):dy(h,o,n.memoizedProps)):o===null&&n.stateNode!==null&&Dc(n,n.memoizedProps,i.memoizedProps)}break;case 27:At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),i!==null&&o&4&&Dc(n,n.memoizedProps,i.memoizedProps);break;case 5:if(At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),n.flags&32){h=n.stateNode;try{Es(h,"")}catch(ee){ke(n,n.return,ee)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,Dc(n,h,i!==null?i.memoizedProps:h)),o&1024&&(Lc=!0);break;case 6:if(At(r,n),Ot(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(ee){ke(n,n.return,ee)}}break;case 3:if(tl=null,h=rn,rn=Wo(r.containerInfo),At(r,n),rn=h,Ot(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ei(r.containerInfo)}catch(ee){ke(n,n.return,ee)}Lc&&(Lc=!1,gg(n));break;case 4:o=rn,rn=Wo(n.stateNode.containerInfo),At(r,n),Ot(n),rn=o;break;case 12:At(r,n),Ot(n);break;case 31:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 13:At(r,n),Ot(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(qo=vt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 22:h=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,L=Ln,q=tt;if(Ln=L||h,tt=q||C,At(r,n),tt=q,Ln=L,Ot(n),o&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(i===null||C||Ln||tt||Wr(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){C=i=r;try{if(f=C.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var G=C.memoizedProps.style,z=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===6){if(i===null){C=r;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===18){if(i===null){C=r;try{var P=C.stateNode;h?sy(P,!0):sy(C.stateNode,!1)}catch(ee){ke(C,C.return,ee)}}}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,Bo(n,i))));break;case 19:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 30:break;case 21:break;default:At(r,n),Ot(n)}}function Ot(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(ag(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,f=Uc(n);Po(n,f,h);break;case 5:var v=i.stateNode;i.flags&32&&(Es(v,""),i.flags&=-33);var S=Uc(n);Po(n,S,v);break;case 3:case 4:var C=i.stateNode.containerInfo,L=Uc(n);Nc(n,L,C);break;default:throw Error(a(161))}}catch(q){ke(n,n.return,q)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function gg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;gg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Pn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)ug(n,r.alternate,r),r=r.sibling}function Wr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:cr(4,r,r.return),Wr(r);break;case 1:gn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&sg(r,r.return,i),Wr(r);break;case 27:oa(r.stateNode);case 26:case 5:gn(r,r.return),Wr(r);break;case 22:r.memoizedState===null&&Wr(r);break;case 30:Wr(r);break;default:Wr(r)}n=n.sibling}}function Bn(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:Bn(h,f,i),Xi(4,f);break;case 1:if(Bn(h,f,i),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(L){ke(o,o.return,L)}if(o=f,h=o.updateQueue,h!==null){var S=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)Kd(C[h],S)}catch(L){ke(o,o.return,L)}}i&&v&64&&rg(f),Zi(f,f.return);break;case 27:og(f);case 26:case 5:Bn(h,f,i),i&&o===null&&v&4&&ig(f),Zi(f,f.return);break;case 12:Bn(h,f,i);break;case 31:Bn(h,f,i),i&&v&4&&fg(h,f);break;case 13:Bn(h,f,i),i&&v&4&&dg(h,f);break;case 22:f.memoizedState===null&&Bn(h,f,i),Zi(f,f.return);break;case 30:break;default:Bn(h,f,i)}r=r.sibling}}function zc(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&&Pi(i))}function Pc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Pi(n))}function sn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)yg(n,r,i,o),r=r.sibling}function yg(n,r,i,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:sn(n,r,i,o),h&2048&&Xi(9,r);break;case 1:sn(n,r,i,o);break;case 3:sn(n,r,i,o),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Pi(n)));break;case 12:if(h&2048){sn(n,r,i,o),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){ke(r,r.return,C)}}else sn(n,r,i,o);break;case 31:sn(n,r,i,o);break;case 13:sn(n,r,i,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?sn(n,r,i,o):Wi(n,r):f._visibility&2?sn(n,r,i,o):(f._visibility|=2,$s(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&zc(v,r);break;case 24:sn(n,r,i,o),h&2048&&Pc(r.alternate,r);break;default:sn(n,r,i,o)}}function $s(n,r,i,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,S=i,C=o,L=v.flags;switch(v.tag){case 0:case 11:case 15:$s(f,v,S,C,h),Xi(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?$s(f,v,S,C,h):Wi(f,v):(q._visibility|=2,$s(f,v,S,C,h)),h&&L&2048&&zc(v.alternate,v);break;case 24:$s(f,v,S,C,h),h&&L&2048&&Pc(v.alternate,v);break;default:$s(f,v,S,C,h)}r=r.sibling}}function Wi(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,h=o.flags;switch(o.tag){case 22:Wi(i,o),h&2048&&zc(o.alternate,o);break;case 24:Wi(i,o),h&2048&&Pc(o.alternate,o);break;default:Wi(i,o)}r=r.sibling}}var ea=8192;function Gs(n,r,i){if(n.subtreeFlags&ea)for(n=n.child;n!==null;)mg(n,r,i),n=n.sibling}function mg(n,r,i){switch(n.tag){case 26:Gs(n,r,i),n.flags&ea&&n.memoizedState!==null&&dS(i,rn,n.memoizedState,n.memoizedProps);break;case 5:Gs(n,r,i);break;case 3:case 4:var o=rn;rn=Wo(n.stateNode.containerInfo),Gs(n,r,i),rn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=ea,ea=16777216,Gs(n,r,i),ea=o):Gs(n,r,i));break;default:Gs(n,r,i)}}function vg(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 ta(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];lt=o,_g(o,n)}vg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)bg(n),n=n.sibling}function bg(n){switch(n.tag){case 0:case 11:case 15:ta(n),n.flags&2048&&cr(9,n,n.return);break;case 3:ta(n);break;case 12:ta(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Ho(n)):ta(n);break;default:ta(n)}}function Ho(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];lt=o,_g(o,n)}vg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:cr(8,r,r.return),Ho(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Ho(r));break;default:Ho(r)}n=n.sibling}}function _g(n,r){for(;lt!==null;){var i=lt;switch(i.tag){case 0:case 11:case 15:cr(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:Pi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,lt=o;else e:for(i=n;lt!==null;){o=lt;var h=o.sibling,f=o.return;if(cg(o),o===i){lt=null;break e}if(h!==null){h.return=f,lt=h;break e}lt=f}}}var C_={getCacheForType:function(n){var r=pt(Ze),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i}
vendor: 20,491 bytes, line 8
8,cacheSignal:function(){return pt(Ze).controller.signal}},x_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ne=null,ge=null,ve=0,xe=0,Ht=null,hr=!1,Vs=!1,Bc=!1,Hn=0,Ve=0,fr=0,es=0,Hc=0,qt=0,Ks=0,na=null,Ct=null,qc=!1,qo=0,Sg=0,Io=1/0,$o=null,dr=null,st=0,pr=null,Ys=null,qn=0,Ic=0,$c=null,wg=null,ra=0,Gc=null;function It(){return(Ae&2)!==0&&ve!==0?ve&-ve:B.T!==null?Jc():Pf()}function Eg(){if(qt===0)if((ve&536870912)===0||_e){var n=Ja;Ja<<=1,(Ja&3932160)===0&&(Ja=262144),qt=n}else qt=536870912;return n=Pt.current,n!==null&&(n.flags|=32),qt}function xt(n,r,i){(n===Ne&&(xe===2||xe===9)||n.cancelPendingCommit!==null)&&(Fs(n,0),gr(n,ve,qt,!1)),Ti(n,i),((Ae&2)===0||n!==Ne)&&(n===Ne&&((Ae&2)===0&&(es|=i),Ve===4&&gr(n,ve,qt,!1)),yn(n))}function Tg(n,r,i){if((Ae&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Ei(n,r),h=o?M_(n,r):Kc(n,r,!0),f=o;do{if(h===0){Vs&&!o&&gr(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!k_(i)){h=Kc(n,r,!1),f=!1;continue}if(h===2){if(f=r,n.errorRecoveryDisabledLanes&f)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;h=na;var C=S.current.memoizedState.isDehydrated;if(C&&(Fs(S,v).flags|=256),v=Kc(S,v,!1),v!==2){if(Bc&&!C){S.errorRecoveryDisabledLanes|=f,es|=f,h=4;break e}f=Ct,Ct=h,f!==null&&(Ct===null?Ct=f:Ct.push.apply(Ct,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Fs(n,0),gr(n,r,0,!0);break}e:{switch(o=n,f=h,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:gr(o,r,qt,!hr);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=qo+300-vt(),10<h)){if(gr(o,r,qt,!hr),Za(o,0,!0)!==0)break e;qn=r,o.timeoutHandle=ty(Rg.bind(null,o,i,Ct,$o,qc,r,qt,es,Ks,hr,f,"Throttled",-0,0),h);break e}Rg(o,i,Ct,$o,qc,r,qt,es,Ks,hr,f,null,-0,0)}}break}while(!0);yn(n)}function Rg(n,r,i,o,h,f,v,S,C,L,q,G,z,P){if(n.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},mg(r,f,G);var ee=(f&62914560)===f?qo-vt():(f&4194048)===f?Sg-vt():0;if(ee=pS(G,ee),ee!==null){qn=f,n.cancelPendingCommit=ee(Dg.bind(null,n,r,f,i,o,h,v,S,C,q,G,null,z,P)),gr(n,f,v,!L);return}}Dg(n,r,f,i,o,h,v,S,C)}function k_(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 h=i[o],f=h.getSnapshot;h=h.value;try{if(!Lt(f(),h))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 gr(n,r,i,o){r&=~Hc,r&=~es,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var h=r;0<h;){var f=31-Nt(h),v=1<<f;o[f]=-1,h&=~v}i!==0&&Nf(n,i,r)}function Go(){return(Ae&6)===0?(sa(0),!1):!0}function Vc(){if(ge!==null){if(xe===0)var n=ge.return;else n=ge,kn=Vr=null,oc(n),Ps=null,Hi=0,n=ge;for(;n!==null;)ng(n.alternate,n),n=n.return;ge=null}}function Fs(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,J_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),qn=0,Vc(),Ne=n,ge=i=Cn(n.current,null),ve=r,xe=0,Ht=null,hr=!1,Vs=Ei(n,r),Bc=!1,Ks=qt=Hc=es=fr=Ve=0,Ct=na=null,qc=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var h=31-Nt(o),f=1<<h;r|=n[h],o&=~f}return Hn=r,co(),i}function Ag(n,r){fe=null,B.H=Fi,r===zs||r===bo?(r=Id(),xe=3):r===Qu?(r=Id(),xe=4):xe=r===Ec?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,ge===null&&(Ve=1,Do(n,Yt(r,n.current)))}function Og(){var n=Pt.current;return n===null?!0:(ve&4194048)===ve?Xt===null:(ve&62914560)===ve||(ve&536870912)!==0?n===Xt:!1}function Cg(){var n=B.H;return B.H=Fi,n===null?Fi:n}function xg(){var n=B.A;return B.A=C_,n}function Vo(){Ve=4,hr||(ve&4194048)!==ve&&Pt.current!==null||(Vs=!0),(fr&134217727)===0&&(es&134217727)===0||Ne===null||gr(Ne,ve,qt,!1)}function Kc(n,r,i){var o=Ae;Ae|=2;var h=Cg(),f=xg();(Ne!==n||ve!==r)&&($o=null,Fs(n,r)),r=!1;var v=Ve;e:do try{if(xe!==0&&ge!==null){var S=ge,C=Ht;switch(xe){case 8:Vc(),v=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(r=!0);var L=xe;if(xe=0,Ht=null,Qs(n,S,C,L),i&&Vs){v=0;break e}break;default:L=xe,xe=0,Ht=null,Qs(n,S,C,L)}}j_(),v=Ve;break}catch(q){Ag(n,q)}while(!0);return r&&n.shellSuspendCounter++,kn=Vr=null,Ae=o,B.H=h,B.A=f,ge===null&&(Ne=null,ve=0,co()),v}function j_(){for(;ge!==null;)kg(ge)}function M_(n,r){var i=Ae;Ae|=2;var o=Cg(),h=xg();Ne!==n||ve!==r?($o=null,Io=vt()+500,Fs(n,r)):Vs=Ei(n,r);e:do try{if(xe!==0&&ge!==null){r=ge;var f=Ht;t:switch(xe){case 1:xe=0,Ht=null,Qs(n,r,f,1);break;case 2:case 9:if(Hd(f)){xe=0,Ht=null,jg(r);break}r=function(){xe!==2&&xe!==9||Ne!==n||(xe=7),yn(n)},f.then(r,r);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:Hd(f)?(xe=0,Ht=null,jg(r)):(xe=0,Ht=null,Qs(n,r,f,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var S=ge;if(v?yy(v):S.stateNode.complete){xe=0,Ht=null;var C=S.sibling;if(C!==null)ge=C;else{var L=S.return;L!==null?(ge=L,Ko(L)):ge=null}break t}}xe=0,Ht=null,Qs(n,r,f,5);break;case 6:xe=0,Ht=null,Qs(n,r,f,6);break;case 8:Vc(),Ve=6;break e;default:throw Error(a(462))}}D_();break}catch(q){Ag(n,q)}while(!0);return kn=Vr=null,B.H=o,B.A=h,Ae=i,ge!==null?0:(Ne=null,ve=0,co(),Ve)}function D_(){for(;ge!==null&&!Fa();)kg(ge)}function kg(n){var r=eg(n.alternate,n,Hn);n.memoizedProps=n.pendingProps,r===null?Ko(n):ge=r}function jg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=Fp(i,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Fp(i,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:oc(r);default:ng(i,r),r=ge=xd(r,Hn),r=eg(i,r,Hn)}n.memoizedProps=n.pendingProps,r===null?Ko(n):ge=r}function Qs(n,r,i,o){kn=Vr=null,oc(r),Ps=null,Hi=0;var h=r.return;try{if(S_(n,h,r,i,ve)){Ve=1,Do(n,Yt(i,n.current)),ge=null;return}}catch(f){if(h!==null)throw ge=h,f;Ve=1,Do(n,Yt(i,n.current)),ge=null;return}r.flags&32768?(_e||o===1?n=!0:Vs||(ve&536870912)!==0?n=!1:(hr=n=!0,(o===2||o===9||o===3||o===6)&&(o=Pt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Mg(r,n)):Ko(r)}function Ko(n){var r=n;do{if((r.flags&32768)!==0){Mg(r,hr);return}n=r.return;var i=T_(r.alternate,r,Hn);if(i!==null){ge=i;return}if(r=r.sibling,r!==null){ge=r;return}ge=r=n}while(r!==null);Ve===0&&(Ve=5)}function Mg(n,r){do{var i=R_(n.alternate,n);if(i!==null){i.flags&=32767,ge=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){ge=n;return}ge=n=i}while(n!==null);Ve=6,ge=null}function Dg(n,r,i,o,h,f,v,S,C){n.cancelPendingCommit=null;do Yo();while(st!==0);if((Ae&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=Uu,fb(n,i,f,v,S,C),n===Ne&&(ge=Ne=null,ve=0),Ys=r,pr=n,qn=i,Ic=f,$c=h,wg=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,z_(ys,function(){return Pg(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,h=Q.p,Q.p=2,v=Ae,Ae|=4;try{A_(n,r,i)}finally{Ae=v,Q.p=h,B.T=o}}st=1,Ug(),Ng(),Lg()}}function Ug(){if(st===1){st=0;var n=pr,r=Ys,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var o=Q.p;Q.p=2;var h=Ae;Ae|=4;try{pg(r,n);var f=sh,v=_d(n.containerInfo),S=f.focusedElem,C=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&bd(S.ownerDocument.documentElement,S)){if(C!==null&&xu(S)){var L=C.start,q=C.end;if(q===void 0&&(q=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(q,S.value.length);else{var G=S.ownerDocument||document,z=G&&G.defaultView||window;if(z.getSelection){var P=z.getSelection(),ee=S.textContent.length,ue=Math.min(C.start,ee),De=C.end===void 0?ue:Math.min(C.end,ee);!P.extend&&ue>De&&(v=De,De=ue,ue=v);var D=vd(S,ue),x=vd(S,De);if(D&&x&&(P.rangeCount!==1||P.anchorNode!==D.node||P.anchorOffset!==D.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)){var U=G.createRange();U.setStart(D.node,D.offset),P.removeAllRanges(),ue>De?(P.addRange(U),P.extend(x.node,x.offset)):(U.setEnd(x.node,x.offset),P.addRange(U))}}}}for(G=[],P=S;P=P.parentNode;)P.nodeType===1&&G.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var I=G[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}il=!!rh,sh=rh=null}finally{Ae=h,Q.p=o,B.T=i}}n.current=r,st=2}}function Ng(){if(st===2){st=0;var n=pr,r=Ys,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var o=Q.p;Q.p=2;var h=Ae;Ae|=4;try{ug(n,r.alternate,r)}finally{Ae=h,Q.p=o,B.T=i}}st=3}}function Lg(){if(st===4||st===3){st=0,ou();var n=pr,r=Ys,i=qn,o=wg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?st=5:(st=0,Ys=pr=null,zg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(dr=null),cu(i),r=r.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(wi,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,h=Q.p,Q.p=2,B.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var S=o[v];f(S.value,{componentStack:S.stack})}}finally{B.T=r,Q.p=h}}(qn&3)!==0&&Yo(),yn(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===Gc?ra++:(ra=0,Gc=n):ra=0,sa(0)}}function zg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Pi(r)))}function Yo(){return Ug(),Ng(),Lg(),Pg()}function Pg(){if(st!==5)return!1;var n=pr,r=Ic;Ic=0;var i=cu(qn),o=B.T,h=Q.p;try{Q.p=32>i?32:i,B.T=null,i=$c,$c=null;var f=pr,v=qn;if(st=0,Ys=pr=null,qn=0,(Ae&6)!==0)throw Error(a(331));var S=Ae;if(Ae|=4,bg(f.current),yg(f,f.current,v,i),Ae=S,sa(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(wi,f)}catch{}return!0}finally{Q.p=h,B.T=o,zg(n,r)}}function Bg(n,r,i){r=Yt(i,r),r=wc(n.stateNode,r,2),n=or(n,r,2),n!==null&&(Ti(n,2),yn(n))}function ke(n,r,i){if(n.tag===3)Bg(n,n,i);else for(;r!==null;){if(r.tag===3){Bg(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(dr===null||!dr.has(o))){n=Yt(i,n),i=Hp(2),o=or(r,i,2),o!==null&&(qp(i,o,r,n),Ti(o,2),yn(o));break}}r=r.return}}function Yc(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new x_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(i)||(Bc=!0,h.add(i),n=U_.bind(null,n,r,i),r.then(n,n))}function U_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ne===n&&(ve&i)===i&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>vt()-qo?(Ae&2)===0&&Fs(n,0):Hc|=i,Ks===ve&&(Ks=0)),yn(n)}function Hg(n,r){r===0&&(r=Uf()),n=Ir(n,r),n!==null&&(Ti(n,r),yn(n))}function N_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),Hg(n,i)}function L_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(i=h.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),Hg(n,i)}function z_(n,r){return tn(n,r)}var Fo=null,Js=null,Fc=!1,Qo=!1,Qc=!1,yr=0;function yn(n){n!==Js&&n.next===null&&(Js===null?Fo=Js=n:Js=Js.next=n),Qo=!0,Fc||(Fc=!0,B_())}function sa(n,r){if(!Qc&&Qo){Qc=!0;do for(var i=!1,o=Fo;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-Nt(42|n)+1)-1,f&=h&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,Gg(o,f))}else f=ve,f=Za(o,o===Ne?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ei(o,f)||(i=!0,Gg(o,f));o=o.next}while(i);Qc=!1}}function P_(){qg()}function qg(){Qo=Fc=!1;var n=0;yr!==0&&Q_()&&(n=yr);for(var r=vt(),i=null,o=Fo;o!==null;){var h=o.next,f=Ig(o,r);f===0?(o.next=null,i===null?Fo=h:i.next=h,h===null&&(Js=i)):(i=o,(n!==0||(f&3)!==0)&&(Qo=!0)),o=h}st!==0&&st!==5||sa(n),yr!==0&&(yr=0)}function Ig(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-Nt(f),S=1<<v,C=h[v];C===-1?((S&i)===0||(S&o)!==0)&&(h[v]=hb(S,r)):C<=r&&(n.expiredLanes|=S),f&=~S}if(r=Ne,i=ve,i=Za(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(xe===2||xe===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&Si(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ei(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&Si(o),cu(i)){case 2:case 8:i=fn;break;case 32:i=ys;break;case 268435456:i=Df;break;default:i=ys}return o=$g.bind(null,n),i=tn(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&Si(o),n.callbackPriority=2,n.callbackNode=null,2}function $g(n,r){if(st!==0&&st!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Yo()&&n.callbackNode!==i)return null;var o=ve;return o=Za(n,n===Ne?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Tg(n,o,r),Ig(n,vt()),n.callbackNode!=null&&n.callbackNode===i?$g.bind(null,n):null)}function Gg(n,r){if(Yo())return null;Tg(n,r,!0)}function B_(){X_(function(){(Ae&6)!==0?tn(ht,P_):qg()})}function Jc(){if(yr===0){var n=Ns;n===0&&(n=Qa,Qa<<=1,(Qa&261888)===0&&(Qa=256)),yr=n}return yr}function Vg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:no(""+n)}function Kg(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 H_(n,r,i,o,h){if(r==="submit"&&i&&i.stateNode===h){var f=Vg((h[Et]||null).action),v=o.submitter;v&&(r=(r=v[Et]||null)?Vg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var S=new ao("action","action",null,o,h);n.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(yr!==0){var C=v?Kg(h,v):new FormData(h);yc(i,{pending:!0,data:C,method:h.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=v?Kg(h,v):new FormData(h),yc(i,{pending:!0,data:C,method:h.method,action:f},f,C))},currentTarget:h}]})}}for(var Xc=0;Xc<Du.length;Xc++){var Zc=Du[Xc],q_=Zc.toLowerCase(),I_=Zc[0].toUpperCase()+Zc.slice(1);nn(q_,"on"+I_)}nn(Ed,"onAnimationEnd"),nn(Td,"onAnimationIteration"),nn(Rd,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(s_,"onTransitionRun"),nn(i_,"onTransitionStart"),nn(a_,"onTransitionCancel"),nn(Ad,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ia="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(" "),$_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ia));function Yg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var S=o[v],C=S.instance,L=S.currentTarget;if(S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=L;try{f(h)}catch(q){uo(q)}h.currentTarget=null,f=C}else for(v=0;v<o.length;v++){if(S=o[v],C=S.instance,L=S.currentTarget,S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=L;try{f(h)}catch(q){uo(q)}h.currentTarget=null,f=C}}}}function ye(n,r){var i=r[hu];i===void 0&&(i=r[hu]=new Set);var o=n+"__bubble";i.has(o)||(Fg(r,n,2,!1),i.add(o))}function Wc(n,r,i){var o=0;r&&(o|=4),Fg(i,n,o,r)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function eh(n){if(!n[Jo]){n[Jo]=!0,qf.forEach(function(i){i!=="selectionchange"&&($_.has(i)||Wc(i,!1,n),Wc(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Jo]||(r[Jo]=!0,Wc("selectionchange",!1,r))}}function Fg(n,r,i,o){switch(Ey(r)){case 2:var h=mS;break;case 8:h=vS;break;default:h=gh}i=h.bind(null,r,i,n),h=void 0,!_u||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?n.addEventListener(r,i,{capture:!0,passive:h}):n.addEventListener(r,i,!0):h!==void 0?n.addEventListener(r,i,{passive:h}):n.addEventListener(r,i,!1)}function th(n,r,i,o,h){var f=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===h)break;if(v===4)for(v=o.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;S!==null;){if(v=vs(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){o=f=v;continue e}S=S.parentNode}}o=o.return}Wf(function(){var L=f,q=vu(i),G=[];e:{var z=Od.get(n);if(z!==void 0){var P=ao,ee=n;switch(n){case"keypress":if(so(i)===0)break e;case"keydown":case"keyup":P=Lb;break;case"focusin":ee="focus",P=Tu;break;case"focusout":ee="blur",P=Tu;break;case"beforeblur":case"afterblur":P=Tu;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":P=nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Tb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Bb;break;case Ed:case Td:case Rd:P=Ob;break;case Ad:P=qb;break;case"scroll":case"scrollend":P=wb;break;case"wheel":P=$b;break;case"copy":case"cut":case"paste":P=xb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=sd;break;case"toggle":case"beforetoggle":P=Vb}var ue=(r&4)!==0,De=!ue&&(n==="scroll"||n==="scrollend"),D=ue?z!==null?z+"Capture":null:z;ue=[];for(var x=L,U;x!==null;){var I=x;if(U=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||U===null||D===null||(I=Oi(x,D),I!=null&&ue.push(aa(x,I,U))),De)break;x=x.return}0<ue.length&&(z=new P(z,ee,null,i,q),G.push({event:z,listeners:ue}))}}if((r&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",P=n==="mouseout"||n==="pointerout",z&&i!==mu&&(ee=i.relatedTarget||i.fromElement)&&(vs(ee)||ee[ms]))break e;if((P||z)&&(z=q.window===q?q:(z=q.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ee=i.relatedTarget||i.toElement,P=L,ee=ee?vs(ee):null,ee!==null&&(De=u(ee),ue=ee.tag,ee!==De||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(P=null,ee=L),P!==ee)){if(ue=nd,I="onMouseLeave",D="onMouseEnter",x="mouse",(n==="pointerout"||n==="pointerover")&&(ue=sd,I="onPointerLeave",D="onPointerEnter",x="pointer"),De=P==null?z:Ai(P),U=ee==null?z:Ai(ee),z=new ue(I,x+"leave",P,i,q),z.target=De,z.relatedTarget=U,I=null,vs(q)===L&&(ue=new ue(D,x+"enter",ee,i,q),ue.target=U,ue.relatedTarget=De,I=ue),De=I,P&&ee)t:{for(ue=G_,D=P,x=ee,U=0,I=D;I;I=ue(I))U++;I=0;for(var oe=x;oe;oe=ue(oe))I++;for(;0<U-I;)D=ue(D),U--;for(;0<I-U;)x=ue(x),I--;for(;U--;){if(D===x||x!==null&&D===x.alternate){ue=D;break t}D=ue(D),x=ue(x)}ue=null}else ue=null;P!==null&&Qg(G,z,P,ue,!1),ee!==null&&De!==null&&Qg(G,De,ee,ue,!0)}}e:{if(z=L?Ai(L):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var we=fd;else if(cd(z))if(dd)we=t_;else{we=Wb;var re=Zb}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?L&&yu(L.elementType)&&(we=fd):we=e_;if(we&&(we=we(n,L))){hd(G,we,i,q);break e}re&&re(n,z,L),n==="focusout"&&L&&z.type==="number"&&L.memoizedProps.value!=null&&gu(z,"number",z.value)}switch(re=L?Ai(L):window,n){case"focusin":(cd(re)||re.contentEditable==="true")&&(Os=re,ku=L,Ni=null);break;case"focusout":Ni=ku=Os=null;break;case"mousedown":ju=!0;break;case"contextmenu":case"mouseup":case"dragend":ju=!1,Sd(G,i,q);break;case"selectionchange":if(r_)break;case"keydown":case"keyup":Sd(G,i,q)}var de;
vendor: 4,442 bytes, lines 8-9
8if(Au)e:{switch(n){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else As?ld(n,i)&&(be="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(id&&i.locale!=="ko"&&(As||be!=="onCompositionStart"?be==="onCompositionEnd"&&As&&(de=ed()):(er=q,Su="value"in er?er.value:er.textContent,As=!0)),re=Xo(L,be),0<re.length&&(be=new rd(be,n,null,i,q),G.push({event:be,listeners:re}),de?be.data=de:(de=ud(i),de!==null&&(be.data=de)))),(de=Yb?Fb(n,i):Qb(n,i))&&(be=Xo(L,"onBeforeInput"),0<be.length&&(re=new rd("onBeforeInput","beforeinput",null,i,q),G.push({event:re,listeners:be}),re.data=de)),H_(G,n,L,i,q)}Yg(G,r)})}function aa(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Xo(n,r){for(var i=r+"Capture",o=[];n!==null;){var h=n,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=Oi(n,i),h!=null&&o.unshift(aa(n,h,f)),h=Oi(n,r),h!=null&&o.push(aa(n,h,f))),n.tag===3)return o;n=n.return}return[]}function G_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Qg(n,r,i,o,h){for(var f=r._reactName,v=[];i!==null&&i!==o;){var S=i,C=S.alternate,L=S.stateNode;if(S=S.tag,C!==null&&C===o)break;S!==5&&S!==26&&S!==27||L===null||(C=L,h?(L=Oi(i,f),L!=null&&v.unshift(aa(i,L,C))):h||(L=Oi(i,f),L!=null&&v.push(aa(i,L,C)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var V_=/\r\n?/g,K_=/\u0000|\uFFFD/g;function Jg(n){return(typeof n=="string"?n:""+n).replace(V_,` 9`).replace(K_,"")}function Xg(n,r){return r=Jg(r),Jg(n)===r}function Me(n,r,i,o,h,f){switch(i){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||Es(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Es(n,""+o);break;case"className":eo(n,"class",o);break;case"tabIndex":eo(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":eo(n,i,o);break;case"style":Xf(n,o,f);break;case"data":if(r!=="object"){eo(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=no(""+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 f=="function"&&(i==="formAction"?(r!=="input"&&Me(n,r,"name",h.name,h,null),Me(n,r,"formEncType",h.formEncType,h,null),Me(n,r,"formMethod",h.formMethod,h,null),Me(n,r,"formTarget",h.formTarget,h,null)):(Me(n,r,"encType",h.encType,h,null),Me(n,r,"method",h.method,h,null),Me(n,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=no(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=An);break;case"onScroll":o!=null&&ye("scroll",n);break;case"onScrollEnd":o!=null&&ye("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(h.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=no(""+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
9ine":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":ye("beforetoggle",n),ye("toggle",n),Wa(n,"popover",o);break;case"xlinkActuate":Rn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Wa(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=_b.get(i)||i,Wa(n,i,o))}}function nh(n,r,i,o,h,f){switch(i){case"style":Xf(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof o=="string"?Es(n,o):(typeof o=="number"||typeof o=="bigint")&&Es(n,""+o);break;case"onScroll":o!=null&&ye("scroll",n);break;case"onScrollEnd":o!=null&&ye("scrollend",n);break;case"onClick":o!=null&&(n.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!If.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),r=i.slice(2,h?i.length-7:void 0),f=n[Et]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,h);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Wa(n,i,o)}}}function yt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",n),ye("load",n);var o=!1,h=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,f,v,i,null)}}h&&Me(n,r,"srcSet",i.srcSet,i,null),o&&Me(n,r,"src",i.src,i,null);return;case"input":ye("invalid",n);var S=f=v=h=null,C=null,L=null;for(o in i)if(i.hasOwnProperty(o)){var q=i[o];if(q!=null)switch(o){case"name":h=q;break;case"type":v=q;break;case"checked":C=q;break;case"defaultChecked":L=q;break;case"value":f=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:Me(n,r,o,q,i,null)}}Yf(n,f,S,C,L,v,h,!1);return;case"select":ye("invalid",n),o=v=f=null;for(h in i)if(i.hasOwnProperty(h)&&(S=i[h],S!=null))switch(h){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:Me(n,r,h,S,i,null)}r=f,i=v,n.multiple=!!o,r!=null?ws(n,!!o,r,!1):i!=null&&ws(n,!!o,i,!0);return;case"textarea":ye("invalid",n),f=h=o=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":h=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Me(n,r,v,S,i,null)}Qf(n,o,h,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(o=i[C],o!=null)&&(C==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(n,r,C,o,i,null));return;
vendor: 4,270 bytes, line 9
9case"dialog":ye("beforetoggle",n),ye("toggle",n),ye("cancel",n),ye("close",n);break;case"iframe":case"object":ye("load",n);break;case"video":case"audio":for(o=0;o<ia.length;o++)ye(ia[o],n);break;case"image":ye("error",n),ye("load",n);break;case"details":ye("toggle",n);break;case"embed":case"source":case"link":ye("error",n),ye("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(L in i)if(i.hasOwnProperty(L)&&(o=i[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,L,o,i,null)}return;default:if(yu(r)){for(q in i)i.hasOwnProperty(q)&&(o=i[q],o!==void 0&&nh(n,r,q,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&Me(n,r,S,o,i,null))}function Y_(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 h=null,f=null,v=null,S=null,C=null,L=null,q=null;for(P in i){var G=i[P];if(i.hasOwnProperty(P)&&G!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":C=G;default:o.hasOwnProperty(P)||Me(n,r,P,null,o,G)}}for(var z in o){var P=o[z];if(G=i[z],o.hasOwnProperty(z)&&(P!=null||G!=null))switch(z){case"type":f=P;break;case"name":h=P;break;case"checked":L=P;break;case"defaultChecked":q=P;break;case"value":v=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,r));break;default:P!==G&&Me(n,r,z,P,o,G)}}pu(n,v,S,C,L,q,f,h);return;case"select":P=v=S=z=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":P=C;default:o.hasOwnProperty(f)||Me(n,r,f,null,o,C)}for(h in o)if(f=o[h],C=i[h],o.hasOwnProperty(h)&&(f!=null||C!=null))switch(h){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==C&&Me(n,r,h,f,o,C)}r=S,i=v,o=P,z!=null?ws(n,!!i,z,!1):!!o!=!!i&&(r!=null?ws(n,!!i,r,!0):ws(n,!!i,i?[]:"",!1));return;case"textarea":P=z=null;for(S in i)if(h=i[S],i.hasOwnProperty(S)&&h!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(n,r,S,null,o,h)}for(v in o)if(h=o[v],f=i[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":z=h;break;case"defaultValue":P=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==f&&Me(n,r,v,h,o,f)}Ff(n,z,P);return;case"option":for(var ee in i)z=i[ee],i.hasOwnProperty(ee)&&z!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?n.selected=!1:Me(n,r,ee,null,o,z));for(C in o)z=o[C],P=i[C],o.hasOwnProperty(C)&&z!==P&&(z!=null||P!=null)&&(C==="selected"?n.selected=z&&typeof z!="function"&&typeof z!="symbol":Me(n,r,C,z,o,P));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 ue in i)z=i[ue],i.hasOwnProperty(ue)&&z!=null&&!o.hasOwnProperty(ue)&&Me(n,r,ue,null,o,z);for(L in o)if(z=o[L],P=i[L],o.hasOwnProperty(L)&&z!==P&&(z!=null||P!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:Me(n,r,L,z,o,P)}return;default:if(yu(r)){for(var De in i)z=i[De],i.hasOwnProperty(De)&&z!==void 0&&!o.hasOwnProperty(De)&&nh(n,r,De,void 0,o,z);for(q in o)z=o[q],P=i[q],!o.hasOwnProperty(q)||z===P||z===void 0&&P===void 0||nh(n,r,q,z,o,P);return}}for(var D in i)z=i[D],i.hasOwnProperty(D)&&z!=null&&!o.hasOwnProperty(D)&&Me(n,r,D,null,o,z);for(G in o)z=o[G],P=i[G],!o.hasOwnProperty(G)||z===P||z==null&&P==null||Me(n,r,G,z,o,P)}function Zg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function F_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var h=i[o],f=h.transferSize,v=h.initiatorType,S=h.duration;if(f&&S&&Zg(v)){for(v=0,S=h.responseEnd,o+=1;o<i.length;o++){var C=i[o],L=C.startTime;if(L>S)break;var q=C.transferSize,G=C.initiatorType;q&&Zg(G)&&(C=C.responseEnd,v+=q*(C<S?1:(S-L)/(C-L)))}if(--o,r+=8*(f+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 8,565 bytes, line 9
9n:5}var rh=null,sh=null;function Zo(n){return n.nodeType===9?n:n.ownerDocument}function Wg(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ey(n,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 ih(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 ah=null;function Q_(){var n=window.event;return n&&n.type==="popstate"?n===ah?!1:(ah=n,!0):(ah=null,!1)}var ty=typeof setTimeout=="function"?setTimeout:void 0,J_=typeof clearTimeout=="function"?clearTimeout:void 0,ny=typeof Promise=="function"?Promise:void 0,X_=typeof queueMicrotask=="function"?queueMicrotask:typeof ny<"u"?function(n){return ny.resolve(null).then(n).catch(Z_)}:ty;function Z_(n){setTimeout(function(){throw n})}function mr(n){return n==="head"}function ry(n,r){var i=r,o=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(h),ei(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")oa(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,oa(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[Ri]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&oa(n.ownerDocument.body);i=h}while(i);ei(r)}function sy(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 oh(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":oh(i),fu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function W_(n,r,i,o){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Ri])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=Zt(n.nextSibling),n===null)break}return null}function eS(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Zt(n.nextSibling),n===null))return null;return n}function iy(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Zt(n.nextSibling),n===null))return null;return n}function lh(n){return n.data==="$?"||n.data==="$~"}function uh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function tS(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 Zt(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;if(r==="/$"||r==="/&")return null}}return n}var ch=null;function ay(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return Zt(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function oy(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 ly(n,r,i){switch(r=Zo(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 oa(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);fu(n)}var Wt=new Map,uy=new Set;function Wo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var In=Q.d;Q.d={f:nS,r:rS,D:sS,C:iS,L:aS,m:oS,X:uS,S:lS,M:cS};function nS(){var n=In.f(),r=Go();return n||r}function rS(n){var r=bs(n);r!==null&&r.tag===5&&r.type==="form"?Ap(r):In.r(n)}var Xs=typeof document>"u"?null:document;function cy(n,r,i){var o=Xs;if(o&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),uy.has(h)||(uy.add(h),n={rel:n,crossOrigin:i,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),yt(r,"link",n),ot(r),o.head.appendChild(r)))}}function sS(n){In.D(n),cy("dns-prefetch",n,null)}function iS(n,r){In.C(n,r),cy("preconnect",n,r)}function aS(n,r,i){In.L(n,r,i);var o=Xs;if(o&&n&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+Vt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+Vt(i.imageSizes)+'"]')):h+='[href="'+Vt(n)+'"]';var f=h;switch(r){case"style":f=Zs(n);break;case"script":f=Ws(n)}Wt.has(f)||(n=y({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Wt.set(f,n),o.querySelector(h)!==null||r==="style"&&o.querySelector(la(f))||r==="script"&&o.querySelector(ua(f))||(r=o.createElement("link"),yt(r,"link",n),ot(r),o.head.appendChild(r)))}}function oS(n,r){In.m(n,r);var i=Xs;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(o)+'"][href="'+Vt(n)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ws(n)}if(!Wt.has(f)&&(n=y({rel:"modulepreload",href:n},r),Wt.set(f,n),i.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ua(f)))return}o=i.createElement("link"),yt(o,"link",n),ot(o),i.head.appendChild(o)}}}function lS(n,r,i){In.S(n,r,i);var o=Xs;if(o&&n){var h=_s(o).hoistableStyles,f=Zs(n);r=r||"default";var v=h.get(f);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(la(f)))S.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Wt.get(f))&&hh(n,i);var C=v=o.createElement("link");ot(C),yt(C,"link",n),C._p=new Promise(function(L,q){C.onload=L,C.onerror=q}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,el(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(f,v)}}}function uS(n,r){In.X(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(ua(h)),f||(n=y({src:n,async:!0},r),(r=Wt.get(h))&&fh(n,r),f=i.createElement("script"),ot(f),yt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function cS(n,r){In.M(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(ua(h)),f||(n=y({src:n,async:!0,type:"module"},r),(r=Wt.get(h))&&fh(n,r),f=i.createElement("script"),ot(f),yt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function hy(n,r,i,o){var h=(h=pe.current)?Wo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Zs(i.href),i=_s(
vendor: 4,604 bytes, line 9
9h).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=Zs(i.href);var f=_s(h).hoistableStyles,v=f.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=h.querySelector(la(n)))&&!f._p&&(v.instance=f,v.state.loading=5),Wt.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},Wt.set(n,i),f||hS(h,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"?(r=Ws(i),i=_s(h).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 Zs(n){return'href="'+Vt(n)+'"'}function la(n){return'link[rel="stylesheet"]['+n+"]"}function fy(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function hS(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}),yt(r,"link",i),ot(r),n.head.appendChild(r))}function Ws(n){return'[src="'+Vt(n)+'"]'}function ua(n){return"script[async]"+n}function dy(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+Vt(i.href)+'"]');if(o)return r.instance=o,ot(o),o;var h=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),ot(o),yt(o,"style",h),el(o,i.precedence,n),r.instance=o;case"stylesheet":h=Zs(i.href);var f=n.querySelector(la(h));if(f)return r.state.loading|=4,r.instance=f,ot(f),f;o=fy(i),(h=Wt.get(h))&&hh(o,h),f=(n.ownerDocument||n).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),yt(f,"link",o),r.state.loading|=4,el(f,i.precedence,n),r.instance=f;case"script":return f=Ws(i.src),(h=n.querySelector(ua(f)))?(r.instance=h,ot(h),h):(o=i,(h=Wt.get(f))&&(o=y({},i),fh(o,h)),n=n.ownerDocument||n,h=n.createElement("script"),ot(h),yt(h,"link",o),n.head.appendChild(h),r.instance=h);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,el(o,i.precedence,n));return r.instance}function el(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===r)f=S;else if(f!==h)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function hh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function fh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var tl=null;function py(n,r,i){if(tl===null){var o=new Map,h=tl=new Map;h.set(i,o)}else h=tl,o=h.get(i),o||(o=new Map,h.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var f=i[h];if(!(f[Ri]||f[ft]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var S=o.get(v);S?S.push(f):o.set(v,[f])}}return o}function gy(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function fS(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 yy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function dS(n,r,i,o){if(i.type==="stylesheet"&&(typeof o.media!="str
9ing"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var h=Zs(o.href),f=r.querySelector(la(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=nl.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,ot(f);return}f=r.ownerDocument||r,o=fy(o),(h=Wt.get(h))&&hh(o,h),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),yt(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=nl.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var dh=0;function pS(n,r){return n.stylesheets&&n.count===0&&sl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&sl(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&dh===0&&(dh=62500*F_());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&sl(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>dh?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function nl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var rl=null;function sl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,rl=new Map,r.forEach(gS,n),rl=null,nl.call(n))}function gS(n,r){if(!(r.state.loading&4)){var i=rl.get(n);if(i)var o=i.get(null);else{i=new Map,rl.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,h),i.set(v,h),this.count++,o=nl.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var ca={$$typeof:j,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function yS(n,r,i,o,h,f,v,S,C){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=lu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.hiddenUpdates=lu(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function my(n,r,i,o,h,f,v,S,C,L,q,G){return n=new yS(n,r,i,v,C,L,q,G,S),r=1,f===!0&&(r|=24),f=zt(3,null,null,r),n.current=f,f.stateNode=n,r=Ku(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:r},Ju(f),n}function vy(n){return n?(n=ks,n):ks}function by(n,r,i,o,h,f){h=vy(h),o.context===null?o.context=h:o.pendingContext=h,o=ar(r),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=or(n,o,r),i!==null&&(xt(i,n,r),Ii(i,n,r))}function _y(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function ph(n,r){_y(n,r),(n=n.alternate)&&_y(n,r)}function Sy(n){if(n.tag===13||n.tag===31){var r=Ir(n,67108864);r!==null&&xt(r,n,67108864),ph(n,67108864)}}function wy(n){if(n.tag===13||n.tag===31){var r=It();r=uu(r);var i=Ir(n,r);i!==null&&xt(i,n,r),ph(n,r)}}var il=!0;function mS(n,r,i,o){var h=B.T;B.T=null;var f=Q.p;try{Q.p=2,gh(n,r,i,o)}finally{Q.p=f,B.T=h}}function vS(n,r,i,o){var h=B.T;B.T=null;var f=Q.p;try{Q.p=8,gh(n,r,i,o)}finally{Q.p=f,B.T=h}}function gh(n,r,i,o){if(il){var h=yh(o);if(h===null)th(n,r,o,al,i),Ty(n,o);else if(_S(h,n,r,i,o))o.stopPropagation();else if(Ty(n,o),r&4&&-1<bS.indexOf(n)){for(;h!==null;){var f=bs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=zr(f.pen
vendor: 4,094 bytes, line 9
9dingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Nt(v);S.entanglements[1]|=C,v&=~C}yn(f),(Ae&6)===0&&(Io=vt()+500,sa(0))}}break;case 31:case 13:S=Ir(f,2),S!==null&&xt(S,f,2),Go(),ph(f,2)}if(f=yh(o),f===null&&th(n,r,o,al,i),f===h)break;h=f}h!==null&&o.stopPropagation()}else th(n,r,o,null,i)}}function yh(n){return n=vu(n),mh(n)}var al=null;function mh(n){if(al=null,n=vs(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 al=n,null}function Ey(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ze()){case ht:return 2;case fn:return 8;case ys:case ib:return 32;case Df:return 268435456;default:return 32}default:return 32}}var vh=!1,vr=null,br=null,_r=null,ha=new Map,fa=new Map,Sr=[],bS="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 Ty(n,r){switch(n){case"focusin":case"focusout":vr=null;break;case"dragenter":case"dragleave":br=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":ha.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(r.pointerId)}}function da(n,r,i,o,h,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=bs(r),r!==null&&Sy(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function _S(n,r,i,o,h){switch(r){case"focusin":return vr=da(vr,n,r,i,o,h),!0;case"dragenter":return br=da(br,n,r,i,o,h),!0;case"mouseover":return _r=da(_r,n,r,i,o,h),!0;case"pointerover":var f=h.pointerId;return ha.set(f,da(ha.get(f)||null,n,r,i,o,h)),!0;case"gotpointercapture":return f=h.pointerId,fa.set(f,da(fa.get(f)||null,n,r,i,o,h)),!0}return!1}function Ry(n){var r=vs(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,Bf(n.priority,function(){wy(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,Bf(n.priority,function(){wy(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 ol(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=yh(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=bs(i),r!==null&&Sy(r),n.blockedOn=i,!1;r.shift()}return!0}function Ay(n,r,i){ol(n)&&i.delete(r)}function SS(){vh=!1,vr!==null&&ol(vr)&&(vr=null),br!==null&&ol(br)&&(br=null),_r!==null&&ol(_r)&&(_r=null),ha.forEac
9h(Ay),fa.forEach(Ay)}function ll(n,r){n.blockedOn===r&&(n.blockedOn=null,vh||(vh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SS)))}var ul=null;function Oy(n){ul!==n&&(ul=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ul===n&&(ul=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],h=n[r+2];if(typeof o!="function"){if(mh(o||i)===null)continue;break}var f=bs(i);f!==null&&(n.splice(r,3),r-=3,yc(f,{pending:!0,data:h,method:i.method,action:o},o,h))}}))}function ei(n){function r(C){return ll(C,n)}vr!==null&&ll(vr,n),br!==null&&ll(br,n),_r!==null&&ll(_r,n),ha.forEach(r),fa.forEach(r);for(var i=0;i<Sr.length;i++){var o=Sr[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Sr.length&&(i=Sr[0],i.blockedOn===null);)Ry(i),i.blockedOn===null&&Sr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var h=i[o],f=i[o+1],v=h[Et]||null;if(typeof f=="function")v||Oy(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[Et]||null)S=v.formAction;else if(mh(h)!==null)continue}else S=v.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),Oy(i)}}}function Cy(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=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),h!==null&&(h(),h=null)}}}function bh(n){this._internalRoot=n}cl.prototype.render=bh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=It();by(i,o,n,r,null,null)},cl.prototype.unmount=bh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;by(n.current,2,null,n,null,null),Go(),r[ms]=null}};function cl(n){this._internalRoot=n}cl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Pf();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Sr.length&&r!==0&&r<Sr[i].priority;i++);Sr.splice(i,0,n),i===0&&Ry(n)}};var xy=t.version;if(xy!=="19.2.5")throw Error(a(527,xy,"19.2.5"));Q.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?m(n):null,n=n===null?null:n.stateNode,n};var wS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hl.isDisabled&&hl.supportsFiber)try{wi=hl.inject(wS),Ut=hl}catch{}}return ga.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",h=Lp,f=zp,v=Pp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=my(n,1,!1,null,null,i,o,null,h,f,v,Cy),n[ms]=r.current,eh(n),new bh(r)},ga.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,h="",f=Lp,v=zp,S=Pp,C=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),r=my(n,1,!0,r,i??null,o,h,C,f,v,S,Cy),r.context=vy(null),i=r.current,o=It(),o=uu(o),h=ar(o),h.callback=null,or(i,h,o),i=o,r.current.lanes=i,Ti(r,i),yn(r),n[ms]=r.current,eh(n),new cl(r)},ga.version="19.2.5",ga}var By;function MS(){if(By)return wh.exports;By=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(),wh.exports=jS(),wh.exports}var DS=MS(),US="__TSS_CONTEXT",Yh=Symbol.for("TSS_SERVER_FUNCTION"),NS="application/x-tss-framed",$n={JSON:0,CHUNK:1,END:2,ERROR:3},LS=/;\s*v=(\d+)/;function zS(e){const t=e.match(LS);return t?parseInt(t[1],10):void 0}function PS(e){const t=zS(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 bv=()=>window.__TSS_START_OPTIONS__,_v=!1;function ka(e){return e[e.length-1]}function BS(e){return typeof e=="function"}function Or(e,t){return BS(e)?e(t):e}var HS=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,qS=()=>Object.create(null),ts=(e,t)=>is(e,t,qS);function is(e,t,s=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const l=t,u=$y(e)&&$y(l);if(!u&&!(mi(e)&&mi(l)))return l;const c=u?e:qy(e);if(!c)return l;const d=u?l:qy(l);if(!d)return l;const p=c.length,g=d.length,m=u?new Array(g):s();let y=0;for(let b=0;b<g;b++){const _=u?b:d[b],w=e[_],A=l[_];if(w===A){m[_]=w,(u?b<p:HS.call(e,_))&&y++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){m[_]=A;continue}const E=is(w,A,s,a+1);m[_]=E,E===w&&y++}return p===g&&y===p?e:m}function qy(e){const t=Object.getOwnPropertyNames(e);for(const l of t)if(!Hy.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(!Hy.call(e,l))return!1;a.push(l)}return a}function mi(e){if(!Iy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!Iy(s)||!s.hasOwnProperty("isPrototypeOf"))}function Iy(e){return Object.prototype.toString.call(e)==="[object Object]"}function $y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jt(e,t,s){if(e===t)return!0;
9if(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(!jt(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)&&!jt(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||!jt(e[c],t[c],s)))return!1;return l===u}return!1}function fs(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 IS(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 ja(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $S(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Gy(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 $S(t)}var GS=["http:","https:","mailto:","tel:"];function Ml(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}var VS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},KS=/[&><\u2028\u2029]/g;function YS(e){return e.replace(KS,t=>VS[t])}function ya(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+=Gy(e.slice(s,l.index))+l[0],s=t.lastIndex;a=a+Gy(s?e.slice(s):e);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function FS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function QS(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 Dt(){throw new Error("Invariant failed")}function Ma(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
9)):(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,Sv=5;function JS(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 mf(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=JS(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 m=d+3,y=p;if(m<y)return s[0]=3,s[1]=t+d,s[2]=t+m,s[3]=t+y,s[4]=t+p+1,s[5]=l,s}}else if(g===36){const m=d+1,y=d+2;return y===p?(s[0]=2,s[1]=t+d,s[2]=t+m,s[3]=t+y,s[4]=t+p+1,s[5]=e.length,s):(s[0]=1,s[1]=t+d,s[2]=t+y,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 Fl(e,t,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,g=p.length,m=s.options?.caseSensitive??e,y=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=mf(p,d,t);let w;const A=d,E=_[5];switch(d=E+1,u++,_[0]){case 0:{const O=p.substring(_[2],_[3]);if(m){const M=l.static?.get(O);if(M)w=M;else{l.static??=new Map;const j=as(s.fullPath??s.from);j.parent=l,j.depth=u,w=j,l.static.set(O,j)}}else{const M=O.toLowerCase(),j=l.staticInsensitive?.get(M);if(j)w=j;else{l.staticInsensitive??=new Map;const N=as(s.fullPath??s.from);N.parent=l,N.depth=u,w=N,l.staticInsensitive.set(M,N)}}break}case 1:{const O=p.substring(A,_[1]),M=p.substring(_[4],E),j=m&&!!(O||M),N=O?j?O:O.toLowerCase():void 0,F=M?j?M:M.toLowerCase():void 0,V=!y&&l.dynamic?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===N&&H.suffix===F);if(V)w=V;else{const H=Oh(1,s.fullPath??s.from,j,N,F);w=H,H.depth=u,H.parent=l,l.dynamic??=[],l.dynamic.push(H)}break}case 3:{const O=p.substring(A,_[1]),M=p.substring(_[4],E),j=m&&!!(O||M),N=O?j?O:O.toLowerCase():void 0,F=M?j?M:M.toLowerCase():void 0,V=!y&&l.optional?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===N&&H.suffix===F);if(V)w=V;else{const H=Oh(3,s.fullPath??s.from,j,N,F);w=H,H.parent=l,H.depth=u,l.optional??=[],l.optional.push(H)}break}case 2:{const O=p.substring(A,_[1]),M=p.substring(_[4],E),j=m&&!!(O||M),N=O?j?O:O.toLowerCase():void 0,F=M?j?M:M.toLowerCase():void 0,V=Oh(2,s.fullPath??s.from,j,N,F);w=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=w}if(y&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=as(s.fullPath??s.from);_.kind=Sv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=as(s.fullPath??s.from);_.kind=Cr,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=y,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)Fl(e,t,p,d,l,u,c)}function Ah(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(Ah);for(const t of e.dynamic)Er(t)}if(e.optional?.length){e.optional.sort(Ah);for(const t of e.optional)Er(t)}if(e.wildcard?.length){e.wildcard.sort(Ah);for(const t of e.wildcard)Er(t)}}function as(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 Oh(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 XS(e,t){const s=as("/"),a=new Uint16Array(6);for(const l of e)Fl(!1,a,l,1,s,0);Er(s),t.masksTree=s,t.flatCache=Ma(1e3)}function ZS(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const a=vf(e,t.masksTree);return t.flatCache.set(e,a),a}function WS(e,t,s,a,l){e||="/",a||="/";const u=t?`case\0${e}`:e;let c=l.singleCache.get(u);return c||(c=as("/"),Fl(t,new Uint16Array(6),{from:e},1,c,0),l.singleCache.set(u,c)),vf(a,c,s)}function ew(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;
9try{u=vf(e,t.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=rw(u.route)),t.matchCache.set(a,u),u}function tw(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function nw(e,t=!1,s){const a=as(e.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return Fl(t,l,e,1,a,0,p=>{if(s?.(p,d),p.id in u&&Dt(),u[p.id]=p,d!==0&&p.path){const g=tw(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),Er(a),{processedTree:{segmentTree:a,singleCache:Ma(1e3),matchCache:Ma(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function vf(e,t,s=!1){const a=e.split("/"),l=iw(e,a,t,s);if(!l)return null;const[u]=wv(e,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function wv(e,t,s){const a=sw(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 m=a[d];if(m.kind===Cr)break;if(m.kind===Sv){g--,c--,p--;continue}const y=t[c],b=p;if(y&&(p+=y.length),m.kind===1){l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0;if(_.charCodeAt(w)===123){const A=m.suffix?.length??0,E=_.substring(w+2,_.length-A-1),O=y.substring(w,y.length-A);u[E]=decodeURIComponent(O)}else{const A=_.substring(1);u[A]=decodeURIComponent(y)}}else if(m.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0,A=m.suffix?.length??0,E=_.substring(w+3,_.length-A-1),O=m.suffix||m.prefix?y.substring(w,y.length-A):y;O&&(u[E]=decodeURIComponent(O))}else if(m.kind===2){const _=m,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),A=decodeURIComponent(w);u["*"]=A,u._splat=A;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function rw(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function sw(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function iw(e,t,s,a){if(e==="/"&&s.index)return{node:s.index,skipped:0};const l=!ka(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 m=d.pop(),{node:y,index:b,skipped:_,depth:w,statics:A,dynamics:E,optionals:O}=m;let{extract:M,rawParams:j,parsedParams:N}=m;if(y.kind===2&&y.route&&!dl(g,m))continue;if(y.skipOnParamError){if(!Vy(e,t,m))continue;j=m.rawParams,M=m.extract,N=m.parsedParams}a&&y.route&&y.kind!==Cr&&dl(p,m)&&(p=m);const F=b===c;if(F&&(y.route&&(!u||y.kind===Cr||y.kind===2)&&dl(g,m)&&(g=m),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const V=F?void 0:t[b];let H;if(F&&y.index){const K={node:y.index,index:b,skipped:_,depth:w+1,statics:A,dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N};let J=!0;if(y.index.skipOnParamError&&(Vy(e,t,K)||(J=!1)),J){if(!E&&!O&&!_&&aw(A,c))return K;dl(g,K)&&(g=K)}}if(y.wildcard)for(let K=y.wildcard.length-1;K>=0;K--){const J=y.wildcard[K],{prefix:ie,suffix:ne}=J;if(!(ie&&(F||!(J.caseSensitive?V:H??=V.toLowerCase()).startsWith(ie)))){if(ne){if(F)continue;const me=t.slice(b).join("/").slice(-ne.length);if((J.caseSensitive?me:me.toLowerCase())!==ne)continue}d.push({node:J,index:c,skipped:_,depth:w+1,statics:A,dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N})}}if(y.optional){const K=_|1<<w,J=w+1;for(let ie=y.optional.length-1;ie>=0;ie--){const ne=y.optional[ie];d.push({node:ne,index:b,skipped:K,depth:J,statics:A,dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N})}if(!F)for(let ie=y.optional.length-1;ie>=0;ie--){const ne=y.optional[ie],{prefix:me,suffix:Ce}=ne;if(me||Ce){const Ye=ne.caseSensitive?V:H??=V.toLowerCase();if(me&&!Ye.startsWith(me)||Ce&&!Ye.endsWith(Ce))continue}d.push({node:ne,index:b+1,skipped:_,depth:J,statics:A,dynamics:E,optionals:O+fl(c,b),extract:M,rawParams:j,parsedParams:N})}}if(!F&&y.dynamic&&V)for(let K=y.dynamic.length-1;K>=0;K--){const J=y.dynamic[K],{prefix:ie,suffix:ne}=J;if(ie||ne){const me=J.caseSensitive?V:H??=V.toLowerCase();if(ie&&!me.startsWith(ie)||ne&&!me.endsWith(ne))continue}d.push({node:J,index:b+1,skipped:_,depth:w+1,statics:A,dynamics:E+fl(c,b),optionals:O,extract:M,rawParams:j,parsedParams:N})}if(!F&&y.staticInsensitive){const K=y.staticInsensitive.get(H??=V.toLowerCase());K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+fl(c,b),dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N})}if(!F&&y.static){const K=y.static.get(V);K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+fl(c,b),dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N})}if(y.pathless){const K=w+1;for(let J=y.pathless.length-1;J>=0;J--){const ie=y.pathless[J];d.push({node:ie,index:b,skipped:_,depth:K,statics:A,dynamics:E,optionals:O,extract:M,rawParams:j,parsedParams:N})}}}if(g)return g;if(a&&p){let m=p.index;for(let b=0;b<p.index;b++)m+=t[b].length;const y=m===e.length?"/":e.slice(m);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(y),p}return null}function fl(e,t){return 2**(e-t-1)}function aw(e,t){return e===2**(t-1)-1}function Vy(e,t,s){try{const[a,l]=wv(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 dl(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 Al(e){return bf(e.filter(t=>t!==void 0).join("/"))}function bf(e){return e.replace(/\/{2,}/g,"/")}function Ev(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 Tv(e){return kr(Ev(e))}function Dl(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ow(e,t,s){return Dl(e,s)===Dl(t,s)}function lw({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 y=a.get(c);if(y)return y}let d;if(u)d=e.split("/");else if(l)d=t.split("/");else{for(d=e.split("/");d.length>1&&ka(d)==="";)d.pop();const y=t.split("/");for(let b=0,_=y.length;b<_;b++){const w=y[b];w===""?b?b===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}d.length>1&&(ka(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let y=0;y<d.length;y++){y>0&&(g+="/");const b=d[y];if(!b)continue;p=mf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const w=p[5],A=b.substring(0,p[1]),E=b.substring(p[4],w),O=b.substring(p[2],p[3]);_===1?g+=A||E?`${A}{$${O}}${E}`:`$${O}`:_===2?g+=A||E?`${A}{$}${E}`:"$":g+=`${A}{-$${O}}${E}`}g=bf(g);const m=g||"/";return c&&a&&a.set(c,m),m}function uw(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 Ch(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=>
9Yy(l,s)).join("/"):Yy(a,s)}function Ky({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 m=d;p=mf(e,m,p);const y=p[5];if(d=y+1,m===y)continue;const b=p[0];if(b===0){g+="/"+e.substring(m,y);continue}if(b===2){const _=t._splat;u._splat=_,u["*"]=_;const w=e.substring(m,p[1]),A=e.substring(p[4],y);if(!_){l=!0,(w||A)&&(g+="/"+w+A);continue}const E=Ch("_splat",t,s);g+="/"+w+E+A;continue}if(b===1){const _=e.substring(p[2],p[3]);!l&&!(_ in t)&&(l=!0),u[_]=t[_];const w=e.substring(m,p[1]),A=e.substring(p[4],y),E=Ch(_,t,s)??"undefined";g+="/"+w+E+A;continue}if(b===3){const _=e.substring(p[2],p[3]),w=t[_];if(w==null)continue;u[_]=w;const A=e.substring(m,p[1]),E=e.substring(p[4],y),O=Ch(_,t,s)??"";g+="/"+A+O+E;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Yy(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function ct(e){return e?.isNotFound===!0}function cw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var hw="tsr-scroll-restoration-v1_3";function fw(){const e=cw();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(hw,JSON.stringify(t))}catch{}}}}var Fy=fw(),dw=e=>e.state.__TSR_key||e.href;function pw(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 pl=!1,ma="window",Qy="data-scroll-restoration-id";function gw(e,t){if(!Fy)return;const s=Fy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,pl=!1;const a=e.options.getScrollRestorationKey||dw,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(pl||!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,m]of l){let y;if(g===ma)y=ma;else if(g.isConnected){const b=g.getAttribute(Qy);y=b?`[${Qy}="${b}"]`:pw(g)}y&&(p[y]=m)}};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,m=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){pl=!0;try{const y=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(y)for(const _ in y){const w=y[_];if(!mi(w))continue;const{scrollX:A,scrollY:E}=w;if(!(!Number.isFinite(A)||!Number.isFinite(E))){if(_===ma)window.scrollTo({top:E,left:A,behavior:g}),b=!0;else if(_){let O;try{O=document.querySelector(_)}catch{continue}O&&(O.scrollLeft=A,O.scrollTop=E,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const A=document.getElementById(_);A&&A.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),m)for(const A of m){if(A===ma)continue;const E=typeof A=="function"?A():document.querySelector(A);E&&E.scrollTo(w)}}}}finally{pl=!1}e.isScrollRestoring&&s.set(y=>(y[p]||={},y))}})}function Rv(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 xh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function yw(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]=xh(l):Array.isArray(u)?u.push(xh(l)):s[a]=[u,xh(l)]}return s}var mw=bw(JSON.parse),vw=_w(JSON.stringify,JSON.parse);function bw(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=yw(t);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=e(l)}catch{}}return s}}function _w(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=Rv(l,a);return u?`?${u}
9`:""}}var cs="__root__";function Av(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 Mt(e){return e instanceof Response&&!!e.options}function Sw(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Av(e)}function ww(e){return{input:({url:t})=>{for(const s of e)t=Fh(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=Ov(e[s],t);return t}}}function Ew(e){const t=Tv(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=Al(["/",t,c.pathname]),c)}}function Fh(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 Ov(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 Tw(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),m=s(e.loadedAt),y=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),w=s(e.resolvedLocation),A=s(e.statusCode),E=s(e.redirect),O=s([]),M=s([]),j=s([]),N=a(()=>kh(c,O.get())),F=a(()=>kh(d,M.get())),V=a(()=>kh(p,j.get())),H=a(()=>O.get()[0]),K=a(()=>O.get().some(Q=>c.get(Q)?.get().status==="pending")),J=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),ie=a(()=>({status:g.get(),loadedAt:m.get(),isLoading:y.get(),isTransitioning:b.get(),matches:N.get(),location:_.get(),resolvedLocation:w.get(),statusCode:A.get(),redirect:E.get()})),ne=Ma(64);function me(Q){let le=ne.get(Q);return le||(le=a(()=>{const Re=O.get();for(const Oe of Re){const k=c.get(Oe);if(k&&k.routeId===Q)return k.get()}}),ne.set(Q,le)),le}const Ce={status:g,loadedAt:m,isLoading:y,isTransitioning:b,location:_,resolvedLocation:w,statusCode:A,redirect:E,matchesId:O,pendingIds:M,cachedIds:j,matches:N,pendingMatches:F,cachedMatches:V,firstId:H,hasPending:K,matchRouteDeps:J,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:ie,getRouteMatchStore:me,setMatches:Ye,setPending:Be,setCached:B};Ye(e.matches),u?.(Ce);function Ye(Q){jh(Q,c,O,s,l)}function Be(Q){jh(Q,d,M,s,l)}function B(Q){jh(Q,p,j,s,l)}return Ce}function kh(e,t){const s=[];for(const a of t){const l=e.get(a);l&&s.push(l.get())}return s}function jh(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)}QS(s.get(),u)||s.set(u)})}var Qh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Rw=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ql=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),hs=(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},Jy=(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(!(!Mt(s)&&!ct(s)))throw Mt(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=>
9({...a,status:Mt(s)?"redirected":ct(s)?"notFound":a.status==="pending"?"success":a.status,context:hs(e,t.index),isFetching:!1,error:s})),ct(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Mt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},Cv=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},Xy=(e,t,s)=>{const a=hs(e,s);e.updateMatch(t,l=>({...l,context:a}))},va=(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&&!Mt(s)&&!ct(s)&&(e.serialError??=s)},xv=(e,t,s,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ql(e,t)&&(s.options.loader||s.options.beforeLoad||jv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Qh(e)},l);a._nonReactive.pendingTimeout=u}},Aw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;xv(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()},Ow=(e,t,s,a)=>{const l=e.router.getMatch(t);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=fs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&va(e,s,c,"PARSE_PARAMS"),d&&va(e,s,d,"VALIDATE_SEARCH"),xv(e,t,a,l);const p=new AbortController;let g=!1;const m=()=>{g||(g=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:p})))},y=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{m(),y()});return}l._nonReactive.beforeLoadPromise=fs();const b={...hs(e,s,!1),...l.__routeContext},{search:_,params:w,cause:A}=l,E=Ql(e,t),O={search:_,abortController:p,params:w,preload:E,context:b,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":A,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},M=N=>{if(N===void 0){e.router.batch(()=>{m(),y()});return}(Mt(N)||ct(N))&&(m(),va(e,s,N,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(t,F=>({...F,__beforeLoadContext:N})),y()})};let j;try{if(j=a.options.beforeLoad(O),ja(j))return m(),j.catch(N=>{va(e,s,N,"BEFORE_LOAD")}).then(M)}catch(N){m(),va(e,s,N,"BEFORE_LOAD")}M(j)},Cw=(e,t)=>{const{id:s,routeId:a}=e.matches[t],l=e.router.looseRoutesById[a],u=()=>d(),c=()=>Ow(e,s,t,l),d=()=>{if(Cv(e,s))return;const p=Aw(e,s,l);return ja(p)?p.then(c):c()};return u()},xw=(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}))},kv=(e,t,s,a,l)=>{const u=t[a-1],{params:c,loaderDeps:d,abortController:p,cause:g}=e.router.getMatch(s),m=hs(e,a),y=Ql(e,s);return{params:c,deps:d,preload:!!y,parentMatchPromise:u,abortController:p,context:m,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:y?"preload":g,route:l,...e.router.options.additionalContext}},Zy=async(e,t,s,a,l)=>{try{const u=e.router.getMatch(s);try{(!(_v??e.router.isServer)||u.ssr===!0)&&Da(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(kv(e,t,s,a,l)),g=!!d&&ja(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(s,y=>({...y,isFetching:"loader"})),d){const y=g?await p:p;xr(e,e.router.getMatch(s),y),y!==void 0&&e.updateMatch(s,b=>({...b,loaderData:y}))}l._lazyPromise&&await l._lazyPromise;const m=u._nonReactive.minPendingPromise;m&&await m,l._componentsPromise&&await l._componentsPromise,e.updateMatch(s,y=>({...y,error:void 0,context:hs(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:hs(e,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ct(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)}!Mt(d)&&!ct(d)&&await Da(l,["errorComponent"]),e.updateMatch(s,g=>
9({...g,error:d,context:hs(e,a),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),xr(e,c,u)}},kw=async(e,t,s)=>{async function a(_,w,A,E,O){const M=Date.now()-w.updatedAt,j=_?O.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:O.options.staleTime??e.router.options.defaultStaleTime??0,N=O.options.shouldReload,F=typeof N=="function"?N(kv(e,t,l,s,O)):N,{status:V,invalid:H}=E,K=M>=j&&(!!e.forceStaleReload||E.cause==="enter"||A!==void 0&&A!==E.id);c=V==="success"&&(H||(F??K)),_&&O.options.preload===!1||(c&&!e.sync&&m?(d=!0,(async()=>{try{await Zy(e,t,l,s,O);const J=e.router.getMatch(l);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Mt(J)&&await e.router.navigate(J.options)}})()):V!=="success"||c?await Zy(e,t,l,s,O):Xy(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,m=((typeof g=="function"?void 0:g?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Cv(e,l)){if(!e.router.getMatch(l))return e.matches[s];Xy(e,l,s)}else{const _=e.router.getMatch(l),w=e.router.stores.matchesId.get()[s],A=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===u?w:e.router.stores.matches.get().find(O=>O.routeId===u)?.id,E=Ql(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&m)return _;await _._nonReactive.loaderPromise;const O=e.router.getMatch(l),M=O._nonReactive.error||O.error;M&&xr(e,O,M),O.status==="pending"&&await a(E,_,A,O,p)}else{const O=E&&!e.router.stores.matchStores.has(l),M=e.router.getMatch(l);M._nonReactive.loaderPromise=fs(),O!==M.preload&&e.updateMatch(l,j=>({...j,preload:O})),await a(E,_,A,M,p)}}const y=e.router.getMatch(l);d||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,d||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const b=d?y.isFetching:!1;return b!==y.isFetching||y.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(l)):y};async function Wy(e){const t=e,s=[];Rw(t.router)&&Qh(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=Cw(t,b);ja(_)&&await _}catch(_){if(Mt(_))throw _;if(ct(_))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?Jy(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(kw(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(Mt(w))throw w;ct(w)?d??=w:p??=w}if(p!==void 0)throw p}const g=d??(a&&!t.preload?a:void 0);let m=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!g&&a&&t.preload)return t.matches;if(g){const b=Jy(t,g);b===void 0&&Dt();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],A=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&A&&(w.options.notFoundComponent=A),g.routeId=_.routeId;const E=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,O=>({...O,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),m=b,await Da(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 Da(b,["errorComponent"])}for(let b=0;b<=m;b++){const{id:_,routeId:w}=t.matches[b],A=t.router.looseRoutesById[w];try{const E=xw(t,_,A);if(E){const O=await E;t.updateMatch(_,M=>({...M,...O}))}}catch(E){console.error(`Error executing head for route ${w}:`,E)}}const y=Qh(t);if(ja(y)&&await y,g)throw g;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function em(e,t){const s=t.map(a=>
9e.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Da(e,t=Ol){!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===Ol?(()=>{if(e._componentsPromise===void 0){const a=em(e,Ol);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():em(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function jv(e){for(const t of Ol)if(e.options[t]?.preload)return!0;return!1}var Ol=["component","errorComponent","pendingComponent","notFoundComponent"],jr="__TSR_index",tm="popstate",nm="beforeunload";function jw(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?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&m)for(const y of g){const b=Ul(p.path,p.state);if(await y.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=rm(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=rm(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 rm(e,t){t||(t={});const s=_f();return{...t,key:s,__TSR_key:s,[jr]:e}}function Mw(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,a=t.history.replaceState;let l=[];const u=()=>l,c=K=>l=K,d=(K=>K),p=(()=>Ul(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const K=_f();t.history.replaceState({[jr]:0,key:K,__TSR_key:K},"")}let g=p(),m,y=!1,b=!1,_=!1,w=!1;const A=()=>g;let E,O;const M=()=>{E&&(H._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),H._ignoreSubscribers=!1,E=void 0,O=void 0,m=void 0)},j=(K,J,ie)=>{const ne=d(J);O||(m=g),g=Ul(J,ie),E={href:ne,state:ie,isPush:E?.isPush||K==="push"},O||(O=Promise.resolve().then(()=>M()))},N=K=>{g=p(),H.notify({type:K})},F=async()=>{if(b){b=!1;return}const K=p(),J=K.state[jr]-g.state[jr],ie=J===1,ne=J===-1,me=!ie&&!ne||y;y=!1;const Ce=me?"GO":ne?"BACK":"FORWARD",Ye=me?{type:"GO",index:J}:{type:ne?"BACK":"FORWARD"};if(_)_=!1;else{const Be=u();if(typeof document<"u"&&Be.length){for(const B of Be)if(await B.blockerFn({currentLocation:g,nextLocation:K,action:Ce})){b=!0,t.history.go(1),H.notify(Ye);return}}}g=p(),H.notify(Ye)},V=K=>{if(w){w=!1;return}let J=!1;const ie=u();if(typeof document<"u"&&ie.length)for(const ne of ie){const me=ne.enableBeforeUnload??!0;if(me===!0){J=!0;break}if(typeof me=="function"&&me()===!0){J=!0;break}}if(J)return K.preventDefault(),K.returnValue=""},H=jw({getLocation:A,getLength:()=>t.history.length,pushState:(K,J)=>j("push",K,J),replaceState:(K,J)=>j("replace",K,J),back:K=>(K&&(_=!0),w=!0,t.history.back()),forward:K=>{K&&(_=!0),w=!0,t.history.forward()},go:K=>{y=!0,t.history.go(K)},createHref:K=>d(K),flush:M,destroy:()=>{t.history.pushState=s,t.history.replaceState=a,t.removeEventListener(nm,V,{capture:!0}),t.removeEventListener(tm,F)},onBlocked:()=>{m&&g!==m&&(g=m)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(nm,V,{capture:!0}),t.addEventListener(tm,F),t.history.pushState=function(...K){const J=s.apply(t.history,K);return H._ignoreSubscribers||N("PUSH"),J},t.history.replaceState=function(...K){const J=a.apply(t.history,K);return H._ignoreSubscribers||N("REPLACE"),J},H}function Dw(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Ul(e,t){const s=Dw(e),a=s.indexOf("#"),l=s.indexOf("?"),u=_f();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 _f(){return(Math.random()+1).toString(36).substring(7)}function Uw(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 Nw=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=uw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Mw()),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 m;this.resolvePathCache=Ma(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=Tw(zw(this.latestLocation),m),gw(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const m=[],y=Tv(p);y&&y!=="/"&&m.push(Ew({basepath:p})),g&&m.push(g),this.rewrite=m.length===0?void 0:m.length===1?m[0]:ww(m),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=nw(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&XS(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=>
9{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:g,hash:m,href:y,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const O=this.options.parseSearch(g),M=this.options.stringifySearch(O);return{href:p+M+m,publicHref:p+M+m,pathname:ya(p).path,external:!1,searchStr:M,search:ts(a?.search,O),hash:ya(m.slice(1)).path,state:is(a?.state,b)}}const _=new URL(y,this.origin),w=Fh(this.rewrite,_),A=this.options.parseSearch(w.search),E=this.options.stringifySearch(A);return w.search=E,{href:w.href.replace(w.origin,""),publicHref:y,pathname:ya(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:E,search:ts(a?.search,A),hash:ya(w.hash.slice(1)).path,state:is(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)=>lw({base:s,to:bf(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=>Pw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(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,"."),m=d.search,y=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?y:Object.assign(y,Or(u.params,y)),w=this.getMatchedRoutes(b);let A=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const ie of A){const ne=ie.options.params?.stringify??ie.options.stringifyParams;if(ne)try{Object.assign(_,ne(_))}catch{}}const E=s.leaveParams?b:ya(Ky({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=m;if(s._includeValidateSearch&&this.options.search?.strict){const ie={};A.forEach(ne=>{if(ne.options.validateSearch)try{Object.assign(ie,Cl(ne.options.validateSearch,{...ie,...O}))}catch{}}),O=ie}O=Bw({search:O,dest:u,destRoutes:A,_includeValidateSearch:s._includeValidateSearch}),O=ts(m,O);const M=this.options.stringifySearch(O),j=u.hash===!0?c.hash:u.hash?Or(u.hash,c.hash):void 0,N=j?`#${j}`:"";let F=u.state===!0?c.state:u.state?Or(u.state,c.state):{};F=is(c.state,F);const V=`${E}${M}${N}`;let H,K,J=!1;if(this.rewrite){const ie=new URL(V,this.origin),ne=Ov(this.rewrite,ie);H=ie.href.replace(ie.origin,""),ne.origin!==this.origin?(K=ne.href,J=!0):K=ne.pathname+ne.search+ne.hash}else H=FS(V),K=H;return{publicHref:K,href:H,pathname:E,search:O,searchStr:M,state:F,hash:j??"",external:J,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 m=ZS(d.pathname,this.processedTree);if(m){Object.assign(g,m.rawParams);const{from:y,params:b,..._}=m.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(m=>{l.state[m]=this.latestLocation.state[m]}
9);const g=jt(l.state,this.latestLocation.state);return p.forEach(m=>{delete l.state[m]}),g},c=kr(this.latestLocation.href)===kr(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=fs(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...m}=l;p&&(m={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](m.publicHref,m.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 y=this.history.location.state.__TSR_index,b=Ul(d,{__TSR_index:s?y:y+1}),_=new URL(b.pathname,this.origin);p.to=Fh(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 m=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),m},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(Ml(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const m of g)if(m?.blockerFn&&await m.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,m=fi(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await Wy({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 y=null,b=null,_=null,w=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),E=A.length,O=this.stores.matches.get();y=E?O.filter(N=>!this.stores.pendingMatchStores.has(N.id)):null;const M=new Set;for(const N of this.stores.pendingMatchStores.values())N.routeId&&M.add(N.routeId);const j=new Set;for(const N of this.stores.matchStores.values())N.routeId&&j.add(N.routeId);b=E?O.filter(N=>!M.has(N.routeId)):null,_=E?A.filter(N=>!j.has(N.routeId)):null,w=E?A.filter(N=>j.has(N.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]),this.clearExpiredCache())});for(const[A,E]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(A)for(const O of A)this.looseRoutesById[O.routeId].options[E]?.(O)})})}})}catch(g){Mt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):ct(g)&&(l=g);const m=a?a.status:l?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),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(()=>
9{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&&Ml(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=Da,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.pendingIds.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 Wy({router:this,matches:l,location:a,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(m=>m.id===p?g(m):m):this.updateMatch(p,g)}}),l}catch(p){if(Mt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});ct(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=WS(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!jt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?jt(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??vw,parseSearch:e.parseSearch??mw,protocolAllowlist:e.protocolAllowlist??GS}),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,routeParam
9s: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?qw(this.options.notFoundMode,c):void 0,g=new Array(c.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<c.length;y++){const b=c[y],_=g[y-1];let w,A,E;{const Ce=_?.search??e.search,Ye=_?._strictSearch??void 0;try{const Be=Cl(b.options.validateSearch,{...Ce})??void 0;w={...Ce,...Be},A={...Ye,...Be},E=void 0}catch(Be){let B=Be;if(Be instanceof Nl||(B=new Nl(Be.message,{cause:Be})),t?.throwOnError)throw B;w=Ce,A={},E=B}}const O=b.options.loaderDeps?.({search:w})??"",M=O?JSON.stringify(O):"",{interpolatedPath:j,usedParams:N}=Ky({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),F=b.id+j+M,V=this.getMatch(F),H=m.get(b.id),K=V?._strictParams??N;let J;if(!V)try{sm(b,N,u,K)}catch(Ce){if(ct(Ce)||Mt(Ce)?J=Ce:J=new Lw(Ce.message,{cause:Ce}),t?.throwOnError)throw J}Object.assign(l,K);const ie=H?"stay":"enter";let ne;if(V)ne={...V,cause:ie,params:H?.params??l,_strictParams:K,search:ts(H?H.search:V.search,w),_strictSearch:A};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||jv(b)?"pending":"success";ne={id:F,ssr:b.options.ssr,index:y,routeId:b.id,params:H?.params??l,_strictParams:K,pathname:j,updatedAt:Date.now(),search:H?ts(H.search,w):w,_strictSearch:A,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:fs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ie,loaderDeps:H?is(H.loaderDeps,O):O,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||(ne.globalNotFound=p===b.id),ne.searchError=E;const me=this.getParentContext(_);ne.context={...me,...ne.__routeContext,...ne.__beforeLoadContext},g[y]=ne}for(let y=0;y<g.length;y++){const b=g[y],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),A=m.get(b.routeId);if(b.params=A?ts(A.params,l):l,!w){const E=g[y-1],O=this.getParentContext(E);if(_.options.context){const M={deps:b.loaderDeps,params:b.params,context:O??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(M)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s,parsedParams:a}=this.getMatchedRoutes(e.pathname),l=ka(t),u={...e.search};for(const m of t)try{Object.assign(u,Cl(m.options.validateSearch,u))}catch{}const c=ka(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 m=Object.assign(Object.create(null),s);for(const y of t)try{sm(y,s,a??{},m)}catch{}g=m}return{matchedRoutes:t,fullPath:l.fullPath,search:u,params:g}}},Nl=class extends Error{},Lw=class extends Error{};function zw(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Cl(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Nl("Async validation not supported");if(s.issues)throw new Nl(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 Pw({pathname:e,routesById:t,processedTree:s}){const a=Object.create(null),l=kr(e);let u,c;const d=ew(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 Bw({search:e,dest:t,destRoutes:s,_includeValidateSearch:a}){return Hw(s)(e,t,a??!1)}function Hw(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;
9"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((m,y)=>y(m),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((m,y)=>y(m),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,...Cl(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 qw(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 cs}function sm(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 bn=Symbol.for("TSR_DEFERRED_PROMISE");function Iw(e,t){const s=e;return s[bn]||(s[bn]={status:"pending"},s.then(a=>{s[bn].status="success",s[bn].data=a}).catch(a=>{s[bn].status="error",s[bn].error={data:Uw(a),__isServerError:!0}})),s}var $w="Error preloading route! âï¸";function im(e,t){if(e)return typeof e=="string"?e:e[t]}function Gw(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Vw(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 Kw(e,t){const s=Vw(t);return!!s&&e?.inlineCss?.styles[s]!==void 0}var Mv=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=cs:this.parentRoute||Dt();let l=a?cs:s?.path;l&&l!=="/"&&(l=Ev(l));const u=s?.id||l;let c=a?cs:Al([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Al(["/",c]));const d=c==="__root__"?"/":Al([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=>Av({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.")}},Yw=class extends Mv{constructor(e){super(e)}};function Fw(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)}}}var Qw=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(Qw||{}),Fn=Symbol.asyncIterator,Dv=Symbol.hasInstance,di=Symbol.isConcatSpreadable,Qn=Symbol.iterator,Uv=Symbol.match,Nv=Symbol.matchAll,Lv=Symbol.replace,zv=Symbol.search,Pv=Symbol.species,Bv=Symbol.split,Hv=Symbol.toPrimitive,pi=Symbol.toStringTag,qv=Symbol.unscopables,Iv={[Fn]:0,[Dv]:1,[di]:2,[Qn]:3,[Uv]:4,[Nv]:5,[Lv]:6,[zv]:7,[Pv]:8,[Bv]:9,[Hv]:10,[pi]:11,[qv]:12},Jw={0:Fn,1:Dv,2:di,3:Qn,4:Uv,5:Nv,6:Lv,7:zv,8:Pv,9:Bv,10:Hv,11:pi,12:qv},R=void 0,Xw={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},Zw={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},Ww={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Te(e,t,s,a,l,u,c,d,p,g,m,y){return{t:e,i:t,s,c:a,m:l,p:u,e:c,a:d,f:p,b:g,o:m,l:y}}function Mr(e){return Te(2,R,e,R,R,R,R,R,R,R,R,R)}var $v=Mr(2),Gv=Mr(3),eE=Mr(1),tE=Mr(0),nE=Mr(4),rE=Mr(5),sE=Mr(6),iE=Mr(7);function aE(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case` 10`: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 R}}function Dr(e){let t="",s=0,a;for(let l=0,u=e.length;l<u;l++)a=aE(e[l]),a&&(t+=e.slice(s,l)+a,s=l+1);return s===0?t=e:t+=e.slice(s),t}function oE(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 11`;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 Ur(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,oE)}var gl="__SEROVAL_REFS__",Vv=new Map,ci=new Map;function Kv(e){return Vv.has(e)}function lE(e){return ci.has(e)}function uE(e){if(Kv(e))return Vv.get(e);throw new HE(e)}function cE(e){if(lE(e))return ci.get(e);throw new qE(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1});function Sf(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 hE(e){let t=Zw[Sf(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Yv(e,t){let s=hE(e),a=Object.getOwnPropertyNames(e);for(let l=0,u=a.length,c;
11l<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 Fv(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function fE(e){switch(e){case Number.POSITIVE_INFINITY:return rE;case Number.NEGATIVE_INFINITY:return sE}return e!==e?iE:Object.is(e,-0)?nE:Te(0,R,e,R,R,R,R,R,R,R,R,R)}function Qv(e){return Te(1,R,Dr(e),R,R,R,R,R,R,R,R,R)}function dE(e){return Te(3,R,""+e,R,R,R,R,R,R,R,R,R)}function pE(e){return Te(4,e,R,R,R,R,R,R,R,R,R,R)}function gE(e,t){let s=t.valueOf();return Te(5,e,s!==s?"":t.toISOString(),R,R,R,R,R,R,R,R,R)}function yE(e,t){return Te(6,e,R,Dr(t.source),t.flags,R,R,R,R,R,R,R)}function mE(e,t){return Te(17,e,Iv[t],R,R,R,R,R,R,R,R,R)}function vE(e,t){return Te(18,e,Dr(uE(t)),R,R,R,R,R,R,R,R,R)}function bE(e,t,s){return Te(25,e,s,Dr(t),R,R,R,R,R,R,R,R)}function _E(e,t,s){return Te(9,e,R,R,R,R,R,s,R,R,Fv(t),R)}function SE(e,t){return Te(21,e,R,R,R,R,R,R,t,R,R,R)}function wE(e,t,s){return Te(15,e,R,t.constructor.name,R,R,R,R,s,t.byteOffset,R,t.length)}function EE(e,t,s){return Te(16,e,R,t.constructor.name,R,R,R,R,s,t.byteOffset,R,t.byteLength)}function TE(e,t,s){return Te(20,e,R,R,R,R,R,R,s,t.byteOffset,R,t.byteLength)}function RE(e,t,s){return Te(13,e,Sf(t),R,Dr(t.message),s,R,R,R,R,R,R)}function AE(e,t,s){return Te(14,e,Sf(t),R,Dr(t.message),s,R,R,R,R,R,R)}function OE(e,t){return Te(7,e,R,R,R,R,R,t,R,R,R,R)}function CE(e,t){return Te(28,R,R,R,R,R,R,[e,t],R,R,R,R)}function xE(e,t){return Te(30,R,R,R,R,R,R,[e,t],R,R,R,R)}function kE(e,t,s){return Te(31,e,R,R,R,R,R,s,t,R,R,R)}function jE(e,t){return Te(32,e,R,R,R,R,R,R,t,R,R,R)}function ME(e,t){return Te(33,e,R,R,R,R,R,R,t,R,R,R)}function DE(e,t){return Te(34,e,R,R,R,R,R,R,t,R,R,R)}function UE(e,t,s,a){return Te(35,e,s,R,R,R,R,t,R,R,R,a)}var NE={parsing:1,serialization:2,deserialization:3};function LE(e){return`Seroval Error (step: ${NE[e]})`}var zE=(e,t)=>LE(e),Jv=class extends Error{constructor(e,t){super(zE(e)),this.cause=t}},am=class extends Jv{constructor(e){super("parsing",e)}},PE=class extends Jv{constructor(e){super("deserialization",e)}};function Jn(e){return`Seroval Error (specific: ${e})`}var Jl=class extends Error{constructor(t){super(Jn(1)),this.value=t}},Xv=class extends Error{constructor(t){super(Jn(2))}},BE=class extends Error{constructor(e){super(Jn(3))}},Va=class extends Error{constructor(e){super(Jn(4))}},HE=class extends Error{constructor(e){super(Jn(5)),this.value=e}},qE=class extends Error{constructor(e){super(Jn(6))}},IE=class extends Error{constructor(e){super(Jn(7))}},Nr=class extends Error{constructor(e){super(Jn(8))}},$E=class extends Error{constructor(t){super(Jn(9))}},GE=class{constructor(e,t){this.value=e,this.replacement=t}},Xl=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,s)=>{e.s=t,e.f=s}),e},VE=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},KE=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Xl.toString();VE.toString();KE.toString();var YE=()=>{let e=[],t=[],s=!0,a=!1,l=0,u=(p,g,m)=>{for(m=0;m<l;m++)t[m]&&t[m][g](p)},c=(p,g,m,y)=>{for(g=0,m=e.length;g<m;g++)y=e[g],!s&&g===m-1?p[a?"return":"throw"](y):p.next(y)},d=(p,g)=>(s&&(g=l++,t[g]=p),c(p),()=>{s&&(t[g]=t[l],t[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(e.push(p),u(p,"next"))},throw:p=>{s&&(e.push(p),u(p,"throw"),s=!1,a=!1,t.length=0)},return:p=>{s&&(e.push(p),u(p,"return"),s=!1,a=!0,t.length=0)}}},FE=e=>t=>()=>{let s=0,a={[e]:()=>a,next:()=>{if(s>t.d)return{done:!0,value:void 0};let l=s++,u=t.v[l];if(l===t.t)throw u;return{done:l===t.d,value:u}}};return a},QE=(e,t)=>s=>()=>{let a=0,l=-1,u=!1,c=[],d=[],p=(m=0,y=d.length)=>{for(;m<y;m++)d[m].s({done:!0,value:void 0})};s.on({next:m=>{let y=d.shift();y&&y.s({done:!1,value:m}),c.push(m)},throw:m=>{let y=d.shift();y&&y.f(m),p(),l=c.length,u=!0,c.push(m)},return:m=>{let y=d.shift();y&&y.s({done:!0,value:m}),p(),l=c.length,c.push(m)}});let g={[e]:()=>g,next:()=>{if(l===-1){let b=a++;if(b>=c.length){let _=t();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};let m=a++,y=c[m];if(m!==l)return{done:!1,value:y};if(u)throw y;return{done:!0,value:y}}};return g},Zv=e=>{let 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};Zv.toString();
11function JE(e){return"__SEROVAL_SEQUENCE__"in e}function Wv(e,t,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:s}}function XE(e){let t=[],s=-1,a=-1,l=e[Qn]();for(;;)try{let u=l.next();if(t.push(u.value),u.done){a=t.length-1;break}}catch(u){s=t.length,t.push(u)}return Wv(t,s,a)}var ZE=FE(Qn);function WE(e){return ZE(e)}var eT={},tT={},nT={0:{},1:{},2:{},3:{},4:{},5:{}};function Zl(e){return"__SEROVAL_STREAM__"in e}function ds(){return YE()}function rT(e){let t=ds(),s=e[Fn]();async function a(){try{let 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}var sT=QE(Fn,Xl);function iT(e){return sT(e)}async function aT(e){try{return[1,await e]}catch(t){return[0,t]}}function oT(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function xl(e,t){e.marked.add(t)}function lT(e,t){let s=e.refs.size;return e.refs.set(t,s),s}function Wl(e,t){let s=e.refs.get(t);return s!=null?(xl(e,s),{type:1,value:pE(s)}):{type:0,value:lT(e,t)}}function wf(e,t){let s=Wl(e,t);return s.type===1?s:Kv(t)?{type:2,value:vE(s.value,t)}:s}function os(e,t){let s=wf(e,t);if(s.type!==0)return s.value;if(t in Iv)return mE(s.value,t);throw new Jl(t)}function eu(e,t){let s=Wl(e,nT[t]);return s.type===1?s.value:Te(26,s.value,t,R,R,R,R,R,R,R,R,R)}function uT(e){let t=Wl(e,eT);return t.type===1?t.value:Te(27,t.value,R,R,R,R,R,R,os(e,Qn),R,R,R)}function cT(e){let t=Wl(e,tT);return t.type===1?t.value:Te(29,t.value,R,R,R,R,R,[eu(e,1),os(e,Fn)],R,R,R,R)}function hT(e,t,s,a){return Te(s?11:10,e,R,R,R,a,R,R,R,R,Fv(t),R)}function fT(e,t,s,a){return Te(8,t,R,R,R,R,{k:s,v:a},R,eu(e,0),R,R,R)}function dT(e,t,s){let a=new Uint8Array(s),l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return Te(19,t,Dr(btoa(l)),R,R,R,R,R,eu(e,5),R,R,R)}function pT(e,t){return{base:oT(e,t),child:void 0}}var gT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return it(this._p,this.depth,e)}};async function yT(e,t,s){let a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await it(e,t,s[l]):a[l]=0;return a}async function mT(e,t,s,a){return _E(s,a,await yT(e,t,a))}async function Ef(e,t,s){let a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(Dr(a[c][0])),u.push(await it(e,t,a[c][1]));return Qn in s&&(l.push(os(e.base,Qn)),u.push(CE(uT(e.base),await it(e,t,XE(s))))),Fn in s&&(l.push(os(e.base,Fn)),u.push(xE(cT(e.base),await it(e,t,rT(s))))),pi in s&&(l.push(os(e.base,pi)),u.push(Qv(s[pi]))),di in s&&(l.push(os(e.base,di)),u.push(s[di]?$v:Gv)),{k:l,v:u}}async function Mh(e,t,s,a,l){return hT(s,a,l,await Ef(e,t,a))}async function vT(e,t,s,a){return SE(s,await it(e,t,a.valueOf()))}async function bT(e,t,s,a){return wE(s,a,await it(e,t,a.buffer))}async function _T(e,t,s,a){return EE(s,a,await it(e,t,a.buffer))}async function ST(e,t,s,a){return TE(s,a,await it(e,t,a.buffer))}async function om(e,t,s,a){let l=Yv(a,e.base.features);return RE(s,a,l?await Ef(e,t,l):R)}async function wT(e,t,s,a){let l=Yv(a,e.base.features);return AE(s,a,l?await Ef(e,t,l):R)}async function ET(e,t,s,a){let l=[],u=[];for(let[c,d]of a.entries())l.push(await it(e,t,c)),u.push(await it(e,t,d));return fT(e.base,s,l,u)}async function TT(e,t,s,a){let l=[];for(let u of a.keys())l.push(await it(e,t,u));return OE(s,l)}async function e0(e,t,s,a){let l=e.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(a))return bE(s,d.tag,await d.parse.async(a,new gT(e,t),{id:s}))}return R}async function RT(e,t,s,a){let[l,u]=await aT(a);return Te(12,s,l,R,R,R,R,R,await it(e,t,u),R,R,R)}function AT(e,t,s,a,l){let u=[],c=s.on({next:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(jE(t,p))},p=>{l(p),c()})},throw:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(ME(t,p)),a(u),c()},p=>{l(p),c()})},return:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(DE(t,p)),a(u),c()},p=>{l(p),c()})}})}async function OT(e,t,s,a){return kE(s,eu(e.base,4),await new Promise(AT.bind(e,t,s,a)))}async function CT(e,t,s,a){let l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await it(e,t,a.v[u]);return UE(s,l,a.t,a.d)}async function xT(e,t,s,a){if(Array.isArray(a))return mT(e,t,s,a);
11if(Zl(a))return OT(e,t,s,a);if(JE(a))return CT(e,t,s,a);let l=a.constructor;if(l===GE)return it(e,t,a.replacement);let u=await e0(e,t,s,a);if(u)return u;switch(l){case Object:return Mh(e,t,s,a,!1);case R:return Mh(e,t,s,a,!0);case Date:return gE(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return om(e,t,s,a);case Number:case Boolean:case String:case BigInt:return vT(e,t,s,a);case ArrayBuffer:return dT(e.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return bT(e,t,s,a);case DataView:return ST(e,t,s,a);case Map:return ET(e,t,s,a);case Set:return TT(e,t,s,a)}if(l===Promise||a instanceof Promise)return RT(e,t,s,a);let c=e.base.features;if(c&32&&l===RegExp)return yE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return _T(e,t,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return wT(e,t,s,a);if(a instanceof Error)return om(e,t,s,a);if(Qn in a||Fn in a)return Mh(e,t,s,a,!!l);throw new Jl(a)}async function kT(e,t,s){let a=wf(e.base,s);if(a.type!==0)return a.value;let l=await e0(e,t,a.value,s);if(l)return l;throw new Jl(s)}async function it(e,t,s){switch(typeof s){case"boolean":return s?$v:Gv;case"undefined":return eE;case"string":return Qv(s);case"number":return fE(s);case"bigint":return dE(s);case"object":{if(s){let a=wf(e.base,s);return a.type===0?await xT(e,t+1,a.value,s):a.value}return tE}case"symbol":return os(e.base,s);case"function":return kT(e,t,s);default:throw new Jl(s)}}async function jT(e,t){try{return await it(e,0,t)}catch(s){throw s instanceof am?s:new am(s)}}var MT=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(MT||{});function t0(e,t){for(let s=0,a=t.length;s<a;s++){let l=t[s];e.has(l)||(e.add(l),l.extends&&t0(e,l.extends))}}function n0(e){if(e){let t=new Set;return t0(t,e),[...t]}}function DT(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 IE(e)}}var UT=1e6,NT=1e4,LT=2e4;function r0(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}}var zT=1e3;function PT(e,t){var s;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(s=t.features)!=null?s:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||zT}}function BT(e){return{mode:2,base:PT(2,e),child:R}}var HT=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Le(this._p,this.depth,e)}};function s0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Nr({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function qT(e,t,s){return s0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,s),s}function IT(e,t,s){return s0(e.base,t),e.base.refs.set(t,s),s}function at(e,t,s){return e.mode===1?qT(e,t,s):IT(e,t,s)}function Jh(e,t,s){if(Object.hasOwn(t,s))return t[s];throw new Nr(e)}function $T(e,t){return at(e,t.i,cE(Ur(t.s)))}function GT(e,t,s){let a=s.a,l=a.length,u=at(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 r0(u,s.o),u}function VT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function KT(e){switch(e){case Fn:case di:case pi:case Qn:return!0;default:return!1}}
11function lm(e,t,s){VT(t)?e[t]=s:Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!0,writable:!0})}function YT(e,t,s,a,l){if(typeof a=="string")lm(s,Ur(a),Le(e,t,l));else{let u=Le(e,t,a);switch(typeof u){case"string":lm(s,u,Le(e,t,l));break;case"symbol":KT(u)&&(s[u]=Le(e,t,l));break;default:throw new Nr(a)}}}function i0(e,t,s,a){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)YT(e,t,a,l[u],c[u]);return a}function FT(e,t,s){let a=at(e,s.i,s.t===10?{}:Object.create(null));return i0(e,t,s.p,a),r0(a,s.o),a}function QT(e,t){return at(e,t.i,new Date(t.s))}function JT(e,t){if(e.base.features&32){let s=Ur(t.c);if(s.length>LT)throw new Nr(t);return at(e,t.i,new RegExp(s,t.m))}throw new Xv(t)}function XT(e,t,s){let a=at(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 ZT(e,t,s){let a=at(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 WT(e,t){if(t.s.length>UT)throw new Nr(t);return at(e,t.i,Zv(Ur(t.s)))}function eR(e,t,s){var a;let l=DT(s.c),u=Le(e,t,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>u.byteLength)throw new Nr(s);return at(e,s.i,new l(u,c,s.l))}function tR(e,t,s){var a;let l=Le(e,t,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>l.byteLength)throw new Nr(s);return at(e,s.i,new DataView(l,u,s.l))}function a0(e,t,s,a){if(s.p){let l=i0(e,t,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function nR(e,t,s){let a=at(e,s.i,new AggregateError([],Ur(s.m)));return a0(e,t,s,a)}function rR(e,t,s){let a=Jh(s,Ww,s.s),l=at(e,s.i,new a(Ur(s.m)));return a0(e,t,s,l)}function sR(e,t,s){let a=Xl(),l=at(e,s.i,a.p),u=Le(e,t,s.f);return s.s?a.s(u):a.f(u),l}function iR(e,t,s){return at(e,s.i,Object(Le(e,t,s.f)))}function aR(e,t,s){let a=e.base.plugins;if(a){let l=Ur(s.c);for(let u=0,c=a.length;u<c;u++){let d=a[u];if(d.tag===l)return at(e,s.i,d.deserialize(s.s,new HT(e,t),{id:s.i}))}}throw new BE(s.c)}function oR(e,t){return at(e,t.i,at(e,t.s,Xl()).p)}function lR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.s(Le(e,t,s.a[1])),R;throw new Va("Promise")}function uR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.f(Le(e,t,s.a[1])),R;throw new Va("Promise")}function cR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return WE(a)}function hR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return iT(a)}function fR(e,t,s){let a=at(e,s.i,ds()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)Le(e,t,l[c]);return a}function dR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.next(Le(e,t,s.f)),R;throw new Va("Stream")}function pR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.throw(Le(e,t,s.f)),R;throw new Va("Stream")}function gR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.return(Le(e,t,s.f)),R;throw new Va("Stream")}function yR(e,t,s){return Le(e,t,s.f),R}function mR(e,t,s){return Le(e,t,s.a[1]),R}function vR(e,t,s){let a=at(e,s.i,Wv([],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 $E(e.base.depthLimit);switch(t+=1,s.t){case 2:return Jh(s,Xw,s.s);case 0:return Number(s.s);case 1:return Ur(String(s.s));case 3:if(String(s.s).length>NT)throw new Nr(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return $T(e,s);case 9:return GT(e,t,s);case 10:case 11:return FT(e,t,s);case 5:return QT(e,s);case 6:return JT(e,s);case 7:return XT(e,t,s);case 8:return ZT(e,t,s);case 19:return WT(e,s);case 16:case 15:return eR(e,t,s);case 20:return tR(e,t,s);case 14:return nR(e,t,s);case 13:return rR(e,t,s);case 12:return sR(e,t,s);case 17:return Jh(s,Jw,s.s);case 21:return iR(e,t,s);case 25:return aR(e,t,s);case 22:return oR(e,s);case 23:return lR(e,t,s);case 24:return uR(e,t,s);case 28:return cR(e,t,s);case 30:return hR(e,t,s);case 31:return fR(e,t,s);case 32:return dR(e,t,s);case 33:return pR(e,t,s);case 34:return gR(e,t,s);case 27:return yR(e,t,s);case 29:return mR(e,t,s);case 35:return vR(e,t,s);default:throw new Xv(s)}}function bR(e,t){try{return Le(e,0,t)}catch(s){throw new PE(s)}}var _R=()=>T;_R.toString();function um(e,t){let s=n0(t.plugins),a=BT({plugins:s,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return bR(a,e)}async function SR(e,t={}){let s=n0(t.plugins),a=pT(1,{plugins:s,disabledFeatures:t.disabledFeatures});return{t:await jT(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function wR(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 ER=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Ll=globalThis.Buffer,o0=!!Ll&&typeof Ll.from=="function";function l0(e){if(e.length===0)return"";if(o0)return Ll.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 u0(e){if(e.length===0)return new Uint8Array(0);if(o0){const a=Ll.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 ba=Object.create(null),_a=Object.create(null),TR=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(u0(s))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),RR=new TextEncoder,AR=e=>new ReadableStream({start(t){e.on({next(s){try{typeof s=="string"?t.enqueue(RR.encode(s)):t.enqueue(u0(s.$b64))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),OR="(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;
11i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",CR="(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 cm(e){const t=ds(),s=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){t.return(void 0);break}t.next(l0(l))}}catch(a){t.throw(a)}finally{s.releaseLock()}})(),t}function hm(e){const t=ds(),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:l0(u)})}}}catch(l){t.throw(l)}finally{s.releaseLock()}})(),t}var xR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",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 OR},deserialize(e,t,s){return ba}},{tag:"tss/RawStreamFactoryText",test(e){return e===_a},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return CR},deserialize(e,t,s){return _a}}],test(e){return e instanceof ER},parse:{sync(e,t,s){const a=e.hint==="text"?_a:ba;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(ds())}},async async(e,t,s){const a=e.hint==="text"?_a:ba,l=e.hint==="text"?hm(e.stream):cm(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"?_a:ba,l=e.hint==="text"?hm(e.stream):cm(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"?AR(a):TR(a)}};function kR(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 jR={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))}},Tr={},c0=e=>new ReadableStream({start:t=>{e.on({next:s=>{try{t.enqueue(s)}catch{}},throw:s=>{t.error(s)},return:()=>{try{t.close()}catch{}}})}}),MR={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 c0.toString()},deserialize(){return Tr}};function fm(e){let t=ds(),s=e.getReader();async function a(){try{let l=await s.read();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var DR={tag:"seroval/plugins/web/ReadableStream",extends:[MR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Tr),stream:t.parse(ds())}},async async(e,t){return{factory:await t.parse(Tr),stream:await t.parse(fm(e))}},stream(e,t){return{factory:t.parse(Tr),stream:t.parse(fm(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let s=t.deserialize(e.stream);return c0(s)}},UR=DR,NR=[jR,xR,UR];function LR(){return[...bv()?.serializationAdapters?.map(wR)??[],...NR]}var dm=new TextDecoder,zR=new Uint8Array(0),pm=16*1024*1024,gm=32*1024*1024,ym=1024,mm=1e5;function PR(e){const t=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(y){d=y},cancel(){l=!0;try{u?.cancel()}catch{}t.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),s.clear(),a.clear()}});function g(y){const b=s.get(y);if(b)return b;if(a.has(y))return new ReadableStream({start(w){w.close()}});if(s.size>
11=ym)throw new Error(`Too many raw streams in framed response (max ${ym})`);const _=new ReadableStream({start(w){t.set(y,w)},cancel(){a.add(y),t.delete(y),s.delete(y)}});return s.set(y,_),_}function m(y){return g(y),t.get(y)}return(async()=>{const y=e.getReader();u=y;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 O=new Uint8Array(9);let M=0,j=9;for(let N=0;N<b.length&&j>0;N++){const F=b[N],V=Math.min(F.length,j);O.set(F.subarray(0,V),M),M+=V,j-=V}return{type:O[0],streamId:(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,length:(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0}}function A(E){if(E===0)return zR;const O=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const N=b[0];if(!N)break;const F=Math.min(N.length,j);O.set(N.subarray(0,F),M),M+=F,j-=F,F===N.length?b.shift():b[0]=N.subarray(F)}return _-=E,O}try{for(;;){const{done:E,value:O}=await y.read();if(l||E)break;if(O){if(_+O.length>gm)throw new Error(`Framed response buffer exceeded ${gm} bytes`);for(b.push(O),_+=O.length;;){const M=w();if(!M)break;const{type:j,streamId:N,length:F}=M;if(j!==$n.JSON&&j!==$n.CHUNK&&j!==$n.END&&j!==$n.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===$n.JSON){if(N!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(N===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(F>pm)throw new Error(`Frame payload too large: ${F} bytes (max ${pm})`);const V=9+F;if(_<V)break;if(++c>mm)throw new Error(`Too many frames in framed response (max ${mm})`);A(9);const H=A(F);switch(j){case $n.JSON:try{d.enqueue(dm.decode(H))}catch{}break;case $n.CHUNK:{const K=m(N);K&&K.enqueue(H);break}case $n.END:{const K=m(N);if(a.add(N),K){try{K.close()}catch{}t.delete(N)}break}case $n.ERROR:{const K=m(N);if(a.add(N),K){const J=dm.decode(H);K.error(new Error(J)),t.delete(N)}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(O=>{try{O.error(E)}catch{}}),t.clear()}finally{try{y.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Ua=null;async function Xh(e){e.length>0&&await Promise.allSettled(e)}var BR=Object.prototype.hasOwnProperty;function h0(e){for(const t in e)if(BR.call(e,t))return!0;return!1}async function HR(e,t,s){Ua||(Ua=LR());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",`${NS}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await f0(a);if(p!==void 0){const g=Rv({payload:p});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let d;if(a.method==="POST"){const p=await qR(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await IR(async()=>l(e,{method:a.method,headers:c,signal:a.signal,body:d}))}async function f0(e){let t=!1;const s={};if(e.data!==void 0&&(t=!0,s.data=e.data),e.context&&h0(e.context)&&(t=!0,s.context=e.context),t)return d0(s)}async function d0(e){return JSON.stringify(await Promise.resolve(SR(e,{plugins:Ua})))}async function qR(e){if(e.data instanceof FormData){let s;return e.context&&h0(e.context)&&(s=await d0(e.context)),s!==void 0&&e.data.set(US,s),{body:e.data}}const t=await f0(e);if(t)return{body:t,contentType:"application/json"}}async function IR(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||Dt(),t.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(PS(s),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=PR(t.body),c=[kR(l),...Ua||[]],d=new Map;a=await $R({jsonStream:u,onMessage:p=>um(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=um(l,{plugins:Ua}),await Xh(u)}if(a||Dt(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await t.json(),l=Sw(a);if(l)throw l;if(ct(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function $R({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:y,done:b}=await a.read();if(b)break;
11if(y)try{const _=[];try{t(JSON.parse(y))}finally{}await Xh(_)}catch(_){s?.(`Invalid JSON: ${y}`,_)}}}catch(y){d||s?.("Stream processing error:",y)}})();let g;const m=[];try{g=t(c)}catch(y){throw d=!0,a.cancel().catch(()=>{}),y}return await Xh(m),Promise.resolve(g).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function GR(e){const t="/_serverFn/"+e;return Object.assign((...l)=>{const u=bv()?.serverFns?.fetch;return HR(t,l,u??fetch)},{url:t,serverFnMeta:{id:e},[Yh]:!0})}var VR={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Yh in e)?!1:!!e[Yh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>GR(e)};function vm(e){return e.replaceAll("\0","/").replaceAll("�","/")}function KR(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 YR(e){window.$_TSR||Dt();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(O=>{E.set(O.key,O.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(O=>O())}window.$_TSR.initialized=!0,window.$_TSR.router||Dt();const s=window.$_TSR.router;s.matches.forEach(E=>{E.i=vm(E.i)}),s.lastMatchId&&(s.lastMatchId=vm(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 O=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const M=fs();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),e.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},O)}}function m(E){const O=e.looseRoutesById[E.routeId];O&&(O.options.ssr=E.ssr)}let y;d.forEach(E=>{const O=s.matches.find(M=>M.i===E.id);if(!O){E._nonReactive.dehydrated=!1,E.ssr=!1,m(E);return}KR(E,O),m(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&y===void 0&&(y=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 O=e.looseRoutesById[E.routeId],M=b[E.index-1]?.context??e.options.context;if(O.options.context){const V={deps:E.loaderDeps,params:E.params,context:M??{},location:_,navigate:H=>e.navigate({...H,_fromLocation:_}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:O.id};
11E.__routeContext=O.options.context(V)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},N=await O.options.head?.(j),F=await O.options.scripts?.(j);E.meta=N?.meta,E.links=N?.links,E.headScripts=N?.scripts,E.styles=N?.styles,E.scripts=F}catch(O){if(ct(O))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,O);else throw E.error=O,console.error(`Error during hydration for route ${E.routeId}:`,O),O}}));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 A=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(w){const E=d[1];E||Dt(),g(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=A,A.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,O=>({...O,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var zl=se.use,Ea=typeof window<"u"?se.useLayoutEffect:se.useEffect;function Dh(e){const t=se.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function FR(e,t,s={},a={}){se.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 QR(e){const t=se.useRef(null);return se.useImperativeHandle(e,()=>t.current,[]),t}function JR({promise:e}){if(zl)return zl(e);const t=Iw(e);if(t[bn].status==="pending")throw t;if(t[bn].status==="error")throw t[bn].error;return t[bn].data}function XR(e){const t=Y.jsx(ZR,{...e});return e.fallback?Y.jsx(se.Suspense,{fallback:e.fallback,children:t}):t}function ZR(e){const t=JR(e);return e.children(t)}function Tf(e){const t=e.errorComponent??Rf;return Y.jsx(WR,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:a})=>s?se.createElement(t,{error:s,reset:a}):e.children})}var WR=class extends se.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 Rf({error:e}){const[t,s]=se.useState(!1);return Y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Y.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"})]}),Y.jsx("div",{style:{height:".25rem"}}),t?Y.jsx("div",{children:Y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?Y.jsx("code",{children:e.message}):null})}):null]})}function eA({children:e,fallback:t=null}){return Af()?Y.jsx(yi.Fragment,{children:e}):Y.jsx(yi.Fragment,{children:t})}function Af(){return yi.useSyncExternalStore(tA,()=>!0,()=>!1)}function tA(){return()=>{}}var p0=se.createContext(null);function mt(e){return se.useContext(p0)}var tu=se.createContext(void 0),nA=se.createContext(void 0),$e=(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))($e||{});function rA({update:e,notify:t,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(g,m,y){const b=m.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:m.deps;if(_!==void 0&&_.dep===g){_.version=y,m.depsTail=_;return}const w=g.subsTail;if(w!==void 0&&w.version===y&&w.sub===m)return;const A=m.depsTail=g.subsTail={version:y,dep:g,sub:m,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:m.deps=A,w!==void 0?w.nextSub=A:g.subs=A}function l(g,m=g.sub){const y=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,A=g.prevSub;return _!==void 0?_.prevDep=b:m.depsTail=b,b!==void 0?b.nextDep=_:m.deps=_,w!==void 0?w.prevSub=A:y.subsTail=A,A!==void 0?A.nextSub=w:(y.subs=w)===void 0&&s(y),_}function u(g){let m=g.nextSub,y;
11e: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 A=(g=w).nextSub;A!==void 0&&(y={value:m,prev:y},m=A);continue}}if((g=m)!==void 0){m=g.nextSub;continue}for(;y!==void 0;)if(g=y.value,y=y.prev,g!==void 0){m=g.nextSub;continue e}break}while(!0)}function c(g,m){let y,b=0,_=!1;e:do{const w=g.dep,A=w.flags;if(m.flags&16)_=!0;else if((A&17)===17){if(e(w)){const E=w.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((A&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(y={value:g,prev:y}),g=w.deps,m=w,++b;continue}if(!_){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=m.subs,O=E.nextSub!==void 0;if(O?(g=y.value,y=y.prev):g=E,_){if(e(m)){O&&d(E),m=g.sub;continue}_=!1}else m.flags&=-33;m=g.sub;const M=g.nextDep;if(M!==void 0){g=M;continue e}}return _}while(!0)}function d(g){do{const m=g.sub,y=m.flags;(y&48)===32&&(m.flags=y|16,(y&6)===2&&t(m))}while((g=g.nextSub)!==void 0)}function p(g,m){let y=m.depsTail;for(;y!==void 0;){if(y===g)return!0;y=y.prevDep}return!1}}function sA(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 Zh=[];let kl=0;const{link:bm,unlink:iA,propagate:aA,checkDirty:g0,shallowPropagate:_m}=rA({update(e){return e._update()},notify(e){Zh[Wh++]=e,e.flags&=~$e.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=$e.Mutable|$e.Dirty,Pl(e))}});let yl=0,Wh=0,mn,ef=0;function y0(e){try{++ef,e()}finally{--ef||m0()}}function Pl(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=iA(s,e)}function m0(){if(!(ef>0)){for(;yl<Wh;){const e=Zh[yl];Zh[yl++]=void 0,e.notify()}yl=0,Wh=0}}function Sm(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?$e.None:$e.Mutable,get(){return mn!==void 0&&bm(l,mn,kl),l._snapshot},subscribe(u){const c=sA(u),d={current:!1},p=oA(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=mn,d=t?.compare??Object.is;if(s)mn=l,++kl,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=$e.Mutable|$e.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{mn=c,s&&(l.flags&=~$e.RecursedCheck),Pl(l)}}};return s?(l.flags=$e.Mutable|$e.Dirty,l.get=function(){const u=l.flags;if(u&$e.Dirty||u&$e.Pending&&g0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&_m(c)}}else u&$e.Pending&&(l.flags=u&~$e.Pending);return mn!==void 0&&bm(l,mn,kl),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(aA(c),_m(c),m0())}},l}function oA(e){const t=()=>{const a=mn;mn=s,++kl,s.depsTail=void 0,s.flags=$e.Watching|$e.RecursedCheck;try{return e()}finally{mn=a,s.flags&=~$e.RecursedCheck,Pl(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:$e.Watching|$e.RecursedCheck,notify(){const a=this.flags;a&$e.Dirty||a&$e.Pending&&g0(this.deps,this)?t():this.flags=$e.Watching},stop(){this.flags=$e.None,this.depsTail=void 0,Pl(this)}};return t(),s}var Uh={exports:{}},Nh={},Lh={exports:{}},zh={};var wm;function lA(){if(wm)return zh;wm=1;var e=Ga();function t(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&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(y,b){var _=b(),w=a({inst:{value:_,getSnapshot:b}}),A=w[0].inst,E=w[1];return u(function(){A.value=_,A.getSnapshot=b,p(A)&&E({inst:A})},[y,_,b]),l(function(){return p(A)&&E({inst:A}),y(function(){p(A)&&E({inst:A})})},[y]),c(_),_}function p(y){var b=y.getSnapshot;y=y.value;try{var _=b();return!s(y,_)}catch{return!0}}function g(y,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return zh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,zh}var Em;function uA(){return Em||(Em=1,Lh.exports=lA()),Lh.exports}var Tm;function cA(){if(Tm)return Nh;Tm=1;var e=Ga(),t=uA();function s(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}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 Nh.useSyncExternalStoreWithSelector=function(g,m,y,b,_){var w=u(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=d(function(){function O(V){if(!M){if(M=!0,j=V,V=b(V),_!==void 0&&A.hasValue){var H=A.value;if(_(H,V))return N=H}return N=V}if(H=N,a(j,V))return H;var K=b(V);return _!==void 0&&_(H,K)?(j=V,H):(j=V,N=K)}var M=!1,j,N,F=y===void 0?null:y;return[function(){return O(m())},F===null?void 0:function(){return O(F())}]},[m,y,b,_]);var E=l(g,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=E},[E]),p(E),E},Nh}var Rm;function hA(){return Rm||(Rm=1,Uh.exports=cA()),Uh.exports}var fA=hA();function dA(e,t){return e===t}function rt(e,t,s=dA){const a=se.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(c);return d},[e]),l=se.useCallback(()=>e?.get(),[e]);return fA.useSyncExternalStoreWithSelector(a,l,l,t,s)}var pA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ps(e){const t=mt(),s=se.useContext(e.from?nA:tu),a=e.from??s,l=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,u=se.useRef(void 0);return rt(l??pA,c=>
11{if((e.shouldThrow??!0)&&!c&&Dt(),c===void 0)return;const d=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=is(u.current,d);return u.current=p,p}return d})}function v0(e){return ps({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function b0(e){const{select:t,...s}=e;return ps({...s,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function _0(e){return ps({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 S0(e){return ps({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function w0(e){const t=mt();return se.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function E0(e){return ps({...e,select:t=>e.select?e.select(t.context):t.context})}var T0=vv();const nk=mv(T0);function gA(e,t){const s=mt(),a=QR(t),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:m,hashScrollIntoView:y,replace:b,startTransition:_,resetScroll:w,viewTransition:A,children:E,target:O,disabled:M,style:j,className:N,onClick:F,onBlur:V,onFocus:H,onMouseEnter:K,onMouseLeave:J,onTouchStart:ie,ignoreBlocker:ne,params:me,search:Ce,hash:Ye,state:Be,mask:B,reloadDocument:Q,unsafeRelative:le,from:Re,_fromLocation:Oe,...k}=e,$=Af(),X=se.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=rt(s.stores.location,ze=>ze,(ze,ht)=>ze.href===ht.href),ae=se.useMemo(()=>{const ze={_fromLocation:W,...X};return s.buildLocation(ze)},[s,W,X]),pe=ae.maskedLocation?ae.maskedLocation.publicHref:ae.publicHref,Se=ae.maskedLocation?ae.maskedLocation.external:ae.external,Fe=se.useMemo(()=>SA(pe,Se,s.history,M),[M,Se,pe,s.history]),Ue=se.useMemo(()=>{if(Fe?.external)return Ml(Fe.href,s.protocolAllowlist)?void 0:Fe.href;if(!wA(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Ml(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Fe,s.protocolAllowlist]),wn=se.useMemo(()=>{if(Ue)return!1;if(c?.exact){if(!ow(W.pathname,ae.pathname,s.basepath))return!1}else{const ze=Dl(W.pathname,s.basepath),ht=Dl(ae.pathname,s.basepath);if(!(ze.startsWith(ht)&&(ze.length===ht.length||ze[ht.length]==="/")))return!1}return(c?.includeSearch??!0)&&!jt(W.search,ae.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$&&W.hash===ae.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,W,Ue,$,ae.hash,ae.pathname,ae.search,s.basepath]),En=wn?Or(l,{})??yA:Ph,Xn=wn?Ph:Or(u,{})??Ph,bi=[N,En.className,Xn.className].filter(Boolean).join(" "),hn=(j||En.style||Xn.style)&&{...j,...En.style,...Xn.style},[_i,gs]=se.useState(!1),Ya=se.useRef(!1),Tn=e.reloadDocument||Ue?!1:p??s.options.defaultPreload,Lr=g??s.options.defaultPreloadDelay??0,tn=se.useCallback(()=>{s.preloadRoute({...X,_builtLocation:ae}).catch(ze=>{console.warn(ze),console.warn($w)})},[s,X,ae]);FR(a,se.useCallback(ze=>{ze?.isIntersecting&&tn()},[tn]),_A,{disabled:!!M||Tn!=="viewport"}),se.useEffect(()=>{Ya.current||!M&&Tn==="render"&&(tn(),Ya.current=!0)},[M,tn,Tn]);const Si=ze=>{const ht=ze.currentTarget.getAttribute("target"),fn=O!==void 0?O:ht;if(!M&&!EA(ze)&&!ze.defaultPrevented&&(!fn||fn==="_self")&&ze.button===0){ze.preventDefault(),T0.flushSync(()=>{gs(!0)});const ys=s.subscribe("onResolved",()=>{ys(),gs(!1)});s.navigate({...X,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:_,viewTransition:A,ignoreBlocker:ne})}};if(Ue)return{...k,ref:a,href:Ue,...E&&{children:E},...O&&{target:O},...M&&{disabled:M},...j&&{style:j},...N&&{className:N},...F&&{onClick:F},...V&&{onBlur:V},...H&&{onFocus:H},...K&&{onMouseEnter:K},...J&&{onMouseLeave:J},...ie&&{onTouchStart:ie}};const Fa=ze=>{if(M||Tn!=="intent")return;if(!Lr){tn();return}const ht=ze.currentTarget;if(Sa.has(ht))return;const fn=setTimeout(()=>{Sa.delete(ht),tn()},Lr);Sa.set(ht,fn)},ou=ze=>{M||Tn!=="intent"||tn()},vt=ze=>{if(M||!Tn||!Lr)return;const ht=ze.currentTarget,fn=Sa.get(ht);fn&&(clearTimeout(fn),Sa.delete(ht))};return{...k,...En,...Xn,href:Fe?.href,ref:a,onClick:ti([F,Si]),onBlur:ti([V,vt]),onFocus:ti([H,Fa]),onMouseEnter:ti([K,Fa]),onMouseLeave:ti([J,vt]),onTouchStart:ti([ie,ou]),disabled:!!M,target:O,...hn&&{style:hn},...bi&&{className:bi},...M&&mA,...wn&&vA,...$&&_i&&bA}}var Ph={},yA={className:"active"},mA={role:"link","aria-disabled":!0},vA={"data-status":"active","aria-current":"page"},bA={"data-transitioning":"transitioning"},Sa=new WeakMap,_A={rootMargin:"100px"},ti=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function SA(e,t,s,a){if(!a)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function wA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Of=se.forwardRef((e,t)=>
11{const{_asChild:s,...a}=e,{type:l,...u}=gA(a,t),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return se.createElement("a",p,c)}return se.createElement(s,u,c)});function EA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var TA=class extends Mv{constructor(t){super(t),this.useMatch=s=>ps({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>E0({...s,from:this.id}),this.useSearch=s=>S0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>_0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>b0({...s,from:this.id}),this.useLoaderData=s=>v0({...s,from:this.id}),this.useNavigate=()=>w0({from:this.fullPath}),this.Link=yi.forwardRef((s,a)=>Y.jsx(Of,{ref:a,from:this.fullPath,...s}))}};function RA(e){return new TA(e)}function AA(){return e=>CA(e)}var OA=class extends Yw{constructor(e){super(e),this.useMatch=t=>ps({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>E0({...t,from:this.id}),this.useSearch=t=>S0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>_0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>b0({...t,from:this.id}),this.useLoaderData=t=>v0({...t,from:this.id}),this.useNavigate=()=>w0({from:this.fullPath}),this.Link=yi.forwardRef((t,s)=>Y.jsx(Of,{ref:s,from:this.fullPath,...t}))}};function CA(e){return new OA(e)}function xA(e){return new kA(e,{silent:!0}).createRoute}var kA=class{constructor(e,t){this.path=e,this.createRoute=s=>{const a=RA(s);return a.isRoot=!1,a},this.silent=t?.silent}};function jA(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,IS(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(zl)zl(c());else throw c();return se.createElement(a,g)};return d.preload=c,d}function MA(e){const t=mt(),s=`not-found-${rt(t.stores.location,a=>a.pathname)}-${rt(t.stores.status,a=>a)}`;return Y.jsx(Tf,{getResetKey:()=>s,onCatch:(a,l)=>{if(ct(a))e.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(ct(a))return e.fallback?.(a);throw a},children:e.children})}function DA(){return Y.jsx("p",{children:"Not Found"})}function ai(e){return Y.jsx(Y.Fragment,{children:e.children})}function R0(e,t,s){return t.options.notFoundComponent?Y.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?Y.jsx(e.options.defaultNotFoundComponent,{...s}):Y.jsx(DA,{})}function UA(e){return null}function NA(){return UA(mt()),null}var A0=se.memo(function({matchId:t}){const s=mt(),a=s.stores.matchStores.get(t);a||Dt();const l=rt(s.stores.loadedAt,c=>c),u=rt(a,c=>c);return Y.jsx(LA,{router:s,matchId:t,resetKey:l,matchState:se.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?Y.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,m=a.ssr===!1||a.ssr==="data-only",y=(!l.isRoot||l.options.wrapInSuspense||m)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||m))?se.Suspense:ai,b=d?Tf:ai,_=g?MA:ai;return Y.jsxs(l.isRoot?l.options.shellComponent??ai:ai,{children:[Y.jsx(tu.Provider,{value:t,children:Y.jsx(y,{fallback:c,children:Y.jsx(b,{getResetKey:()=>s,errorComponent:d||Rf,onCatch:(w,A)=>{if(ct(w))throw w.routeId??=a.routeId,w;p?.(w,A)},children:Y.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!g||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
11!l.isRoot)throw w;return se.createElement(g,w)},children:m||a._displayPending?Y.jsx(eA,{fallback:c,children:Y.jsx(Am,{matchId:t})}):Y.jsx(Am,{matchId:t})})})})}),a.parentRouteId===cs?Y.jsxs(Y.Fragment,{children:[Y.jsx(zA,{resetKey:s}),e.options.scrollRestoration&&_v?Y.jsx(NA,{}):null]}):null]})}function zA({resetKey:e}){const t=mt(),s=se.useRef(void 0);return Ea(()=>{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 Am=se.memo(function({matchId:t}){const s=mt(),a=(m,y)=>s.getMatch(m.id)?._nonReactive[y]??m._nonReactive[y],l=s.stores.matchStores.get(t);l||Dt();const u=rt(l,m=>m),c=u.routeId,d=s.routesById[c],p=se.useMemo(()=>{const m=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return m?JSON.stringify(m):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=se.useMemo(()=>{const m=d.options.component??s.options.defaultComponent;return m?Y.jsx(m,{},p):Y.jsx(O0,{})},[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 m=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(m){const y=s.getMatch(u.id);if(y&&!y._nonReactive.minPendingPromise){const b=fs();y._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw a(u,"loadPromise")}if(u.status==="notFound")return ct(u.error)||Dt(),R0(s,d,u.error);if(u.status==="redirected")throw Mt(u.error)||Dt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),O0=se.memo(function(){const t=mt(),s=se.useContext(tu);let a,l=!1,u;{const g=s?t.stores.matchStores.get(s):void 0;[a,l]=rt(g,m=>[m?.routeId,m?.globalNotFound??!1]),u=rt(t.stores.matchesId,m=>m[m.findIndex(y=>y===s)+1])}const c=a?t.routesById[a]:void 0,d=t.options.defaultPendingComponent?Y.jsx(t.options.defaultPendingComponent,{}):null;if(l)return c||Dt(),R0(t,c,void 0);if(!u)return null;const p=Y.jsx(A0,{matchId:u});return a===cs?Y.jsx(se.Suspense,{fallback:d,children:p}):p});function PA(){const e=mt(),t=se.useRef({router:e,mounted:!1}),[s,a]=se.useState(!1),l=rt(e.stores.isLoading,y=>y),u=rt(e.stores.hasPending,y=>y),c=Dh(l),d=l||s||u,p=Dh(d),g=l||u,m=Dh(g);return e.startTransition=y=>{a(!0),se.startTransition(()=>{y(),a(!1)})},se.useEffect(()=>{const y=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}),()=>{y()}},[e,e.history]),Ea(()=>{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]),Ea(()=>{c&&!l&&e.emit({type:"onLoad",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,l]),Ea(()=>{m&&!g&&e.emit({type:"onBeforeRouteMount",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,m,e]),Ea(()=>{if(p&&!d){const y=fi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...y}),y0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),y.hrefChanged&&Fw(e)}},[d,p,e]),null}function BA(){const e=mt(),t=e.routesById[cs].options.pendingComponent??e.options.defaultPendingComponent,s=t?Y.jsx(t,{}):null,a=Y.jsxs(typeof document<"u"&&e.ssr?ai:se.Suspense,{fallback:s,children:[Y.jsx(PA,{}),Y.jsx(HA,{})]});return e.options.InnerWrap?Y.jsx(e.options.InnerWrap,{children:a}):a}function HA(){const e=mt(),t=rt(e.stores.firstId,l=>l),s=rt(e.stores.loadedAt,l=>l),a=t?Y.jsx(A0,{matchId:t}):null;return Y.jsx(tu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:Y.jsx(Tf,{getResetKey:()=>s,errorComponent:Rf,onCatch:void 0,children:a})})}var qA=e=>({createMutableStore:Sm,createReadonlyStore:Sm,batch:y0}),IA=e=>new $A(e),$A=class extends Nw{constructor(e){super(e,qA)}};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=Y.jsx(p0.Provider,{value:e,children:t});return e.options.Wrap?Y.jsx(e.options.Wrap,{children:a}):a}function VA({router:e,...t}){return Y.jsx(GA,{router:e,...t,children:Y.jsx(BA,{})})}function C0(e){const{attrs:t,children:s,nonce:a}=e;switch(e.tag){case"title":return Y.jsx("title",{...t,suppressHydrationWarning:!0,children:s});case"meta":return Y.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return Y.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,Y.jsx("style",{...t,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return Y.jsx(KA,{attrs:t,children:s});default:return null}}function KA({attrs:e,children:t}){mt();const s=Af(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(se.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");
11if(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 Y.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return Y.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return Y.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var YA=e=>{const t=mt(),s=t.options.ssr?.nonce,a=rt(t.stores.matches,g=>g.map(m=>m.meta).filter(Boolean),jt),l=se.useMemo(()=>{const g=[],m={};let y;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const A=_[w];if(A)if(A.title)y||(y={tag:"title",children:A.title});else if("script:ld+json"in A)try{const E=JSON.stringify(A["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:YS(E)})}catch{}else{const E=A.name??A.property;if(E){if(m[E])continue;m[E]=!0}g.push({tag:"meta",attrs:{...A,nonce:s}})}}}return y&&g.push(y),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[a,s]),u=rt(t.stores.matches,g=>{const m=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),y=t.ssr?.manifest,b=g.map(_=>y?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?Kw(y,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:im(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...m,...b]},jt),c=rt(t.stores.matches,g=>{const m=[];return g.map(y=>t.looseRoutesById[y.routeId]).forEach(y=>t.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(b=>{const _=Gw(b);m.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:im(e,"modulepreload")??_.crossOrigin,nonce:s}})})),m},jt),d=rt(t.stores.matches,g=>g.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:s},children:m})),jt),p=rt(t.stores.matches,g=>g.map(m=>m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:s},children:m})),jt);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=mt().options.ssr?.nonce;return Y.jsx(Y.Fragment,{children:t.map(a=>se.createElement(C0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var JA=()=>{const e=mt(),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=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:c})),l=rt(e.stores.matches,s,jt);return XA(e,rt(e.stores.matches,a,jt),l)};function XA(e,t,s){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...t,...s];return a&&l.unshift(a),Y.jsx(Y.Fragment,{children:l.map((u,c)=>se.createElement(C0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var ls=(e,t)=>{const s={type:"request",...t||e};return{options:s,middleware:a=>ls({},Object.assign(s,{middleware:a})),inputValidator:a=>ls({},Object.assign(s,{inputValidator:a})),client:a=>ls({},Object.assign(s,{client:a})),server:a=>ls({},Object.assign(s,{server:a}))}};function x0(e,t){for(let s=0,a=t.length;s<a;s++){const l=t[s];e.has(l)||(e.add(l),l.extends&&x0(e,l.extends))}}var ZA=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const s=new Set;x0(s,t.serializationAdapters),t.serializationAdapters=Array.from(s)}return t},createMiddleware:ls}),Om=function(){return Om=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},Om.apply(this,arguments)};function nu(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)})}
11return new(s||(s=Promise))(function(u,c){function d(m){try{g(a.next(m))}catch(y){c(y)}}function p(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):l(m.value).then(d,p)}g((a=a.apply(e,t||[])).next())})}function sk(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 Cf 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 Cf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Cm extends Cf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class xm extends Cf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var tf;(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"})(tf||(tf={}));class nO{constructor(t,{headers:s={},customFetch:a,region:l=tf.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:m,timeout:y}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let A;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",A=g):typeof g=="string"?(b["Content-Type"]="text/plain",A=g):typeof FormData<"u"&&g instanceof FormData?A=g:(b["Content-Type"]="application/json",A=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?A=JSON.stringify(g):A=g;let E=m;y&&(c=new AbortController,u=setTimeout(()=>c.abort(),y),m?(E=c.signal,m.addEventListener("abort",()=>c.abort())):E=c.signal);const O=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:A,signal:E}).catch(F=>{throw new tO(F)}),M=O.headers.get("x-relay-error");if(M&&M==="true")throw new Cm(O);if(!O.ok)throw new xm(O);let j=((l=O.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),N;return j==="application/json"?N=yield O.json():j==="application/octet-stream"||j==="application/pdf"?N=yield O.blob():j==="text/event-stream"?N=O:j==="multipart/form-data"?N=yield O.formData():N=yield O.text(),{data:N,error:null,response:O}}catch(d){return{data:null,error:d,response:d instanceof xm||d instanceof Cm?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const k0=3,km=e=>Math.min(1e3*2**e,3e4),rO=[520,503],j0=["GET","HEAD","OPTIONS"];var jm=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
11de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Mm(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>=k0||!j0.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=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={};s.headers.forEach((y,b)=>{g[b]=y}),c>0&&(g["X-Retry-Count"]=String(c));let m;try{m=await a(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(y,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(y){if(y?.name==="AbortError"||y?.code==="ABORT_ERR"||!j0.includes(s.method))throw y;if(s.retryEnabled&&c<k0){const b=km(c);c++,await Mm(b,s.signal);continue}throw y}if(sO(s.method,m.status,c,s.retryEnabled)){var d,p;const y=(d=(p=m.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=y!==null?Math.max(0,parseInt(y,10)||0)*1e3:km(c);await m.text(),c++,await Mm(b,s.signal);continue}return await s.processResponse(m)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",m="";const y=c?.cause;if(y){var b,_,w,A;const M=(b=y?.message)!==null&&b!==void 0?b:"",j=(_=y?.code)!==null&&_!==void 0?_:"";p=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,p+=` 12 13Caused by: ${(A=y?.name)!==null&&A!==void 0?A:"Error"}: ${M}`,j&&(p+=` (${j})`),y?.stack&&(p+=` 14${y.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const O=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(m="",g="Request was aborted (timeout or manual cancellation)",O>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${O} 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.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(m="",g="HTTP headers exceeded server limits (typically 16KB)",O>this.urlLengthLimit&&(g+=`. Your request URL is ${O} 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:m},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")))
14a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,t.shouldThrowOnError)throw new jm({message:b,details:"",hint:"",code:""})}}const m=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),y=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");m&&y&&y.length>1&&(l=parseInt(y[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 m=await e.text();try{s=JSON.parse(m),Array.isArray(s)&&e.status===404&&(a=[],s=null,u=200,c="OK")}catch{e.status===404&&m===""?(u=204,c="No Content"):s={message:m}}if(s&&t.shouldThrowOnError)throw new jm(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{throwOnError(){return super.throwOnError()}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}explain({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 Dm=new RegExp("[,()]");var oi=class extends aO{throwOnError(){return super.throwOnError()}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=>
14typeof a=="string"&&Dm.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"&&Dm.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 oi({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 oi({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((m,y)=>m.concat(Object.keys(y)),[]);if(g.length>0){const m=[...new Set(g)].map(y=>`"${y}"`);d.searchParams.set("columns",m.join(","))}}return new oi({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 oi({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 oi({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 Na(e){"@babel/helpers - typeof";return Na=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},Na(e)}function lO(e,t){if(Na(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Na(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 Na(t)=="symbol"?t:t+""}
14function 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 Um(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 ml(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(s),!0).forEach(function(a){cO(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Um(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var hO=class M0{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,m)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),u),_=m?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,m);const w=()=>{clearTimeout(b),y.abort()};return _.addEventListener("abort",w,{once:!0}),p(g,ml(ml({},m),{},{signal:y.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(g,ml(ml({},m),{},{signal:y.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 M0(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 m=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(m)),y=a&&Object.values(s).some(m);y?(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 y?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new oi({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 fO{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: 15import ws from "ws" 16new 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+=` 17 18Suggested 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.108.2",pO=`realtime-js/${dO}`,gO="1.0.0",D0="2.0.0",yO=D0,mO=1e4,vO=100,Rr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},U0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},nf={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;
18const 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,m=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},y=Object.keys(m).length===0?"":JSON.stringify(m);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(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+g.length+y.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),A=0;w.setUint8(A++,this.KINDS.userBroadcastPush),w.setUint8(A++,p.length),w.setUint8(A++,d.length),w.setUint8(A++,c.length),w.setUint8(A++,g.length),w.setUint8(A++,y.length),w.setUint8(A++,s),Array.from(p,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(d,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(c,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(g,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(y,O=>w.setUint8(A++,O.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 m=a.decode(t.slice(p,p+u));p=p+u;const y=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:m,payload:_};return c>0&&(w.meta=JSON.parse(y)),{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 Pe;(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"})(Pe||(Pe={}));const Nm=(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)?N0(u,c):rf(c)},N0=(e,t)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return TO(t,s)}switch(e){case Pe.bool:return SO(t);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return wO(t);case Pe.json:case Pe.jsonb:return EO(t);case Pe.timestamp:return RO(t);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return rf(t);default:return rf(t)}}
vendor: 4,904 bytes, line 18
18,rf=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=>N0(t,d))}return e},RO=e=>typeof e=="string"?e.replace(" ","T"):e,L0=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 Oa=e=>typeof e=="function"?e:function(){return e},AO=typeof self<"u"?self:null,li=typeof window<"u"?window:null,vn=AO||li||globalThis,OO="2.0.0",CO=1e4,xO=1e3,_n={connecting:0,open:1,closing:2,closed:3},kt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},sf={longpoll:"longpoll",websocket:"websocket"},kO={complete:4},af="base64url.bearer.phx.",vl=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.recHooks=[],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})}},z0=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=kt.closed,this.topic=e,this.params=Oa(t||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new vl(this,Vn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new z0(()=>{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=kt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=kt.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=kt.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=kt.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 vl(this,Vn.leave,Oa({}),this.timeout).send(),this.state=kt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Vn.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}
vendor: 5,263 bytes, line 18
18teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=kt.closed,this.bindings=[]}onClose(e){this.on(Vn.close,e)}onError(e){return this.on(Vn.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 vl(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=kt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Vn.close,"leave")},s=new vl(this,Vn.leave,Oa({}),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=kt.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===kt.closed}isErrored(){return this.state===kt.errored}isJoined(){return this.state===kt.joined}isJoining(){return this.state===kt.joining}isLeaving(){return this.state===kt.leaving}},Bl=class{static request(e,t,s,a,l,u,c){if(vn.XDomainRequest){let d=new vn.XDomainRequest;return this.xdomainRequest(d,e,t,a,l,u,c)}else if(vn.XMLHttpRequest){let d=new vn.XMLHttpRequest;return this.xhrRequest(d,e,t,s,a,l,u,c)}else{if(vn.fetch&&vn.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),vn.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)}`}},MO=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)},ni=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(af)&&(this.authToken=atob(t[1].slice(af.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=_n.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+sf.websocket),"$1/"+sf.longpoll)}endpointURL(){return Bl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,s){this.close(e,t,s),this.readyState=_n.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===_n.open||this.readyState===_n.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=_n.open,this.onopen({}),this.poll();break;
18case 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=MO(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(` 19`),()=>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=_n.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=Bl.request(e,this.endpointURL(),t,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},DO=class Ta{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=Ta.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ta.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=Ta.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 Ta.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 m=u[p];if(m){let y=g.metas.map(A=>A.phx_ref),b=m.metas.map(A=>A.phx_ref),_=g.metas.filter(A=>b.indexOf(A.phx_ref)<0),w=m.metas.filter(A=>y.indexOf(A.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),w.length>0&&(d[p]=this.clone(m),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 m=t[d].metas.map(b=>b.phx_ref),y=g.metas.filter(b=>m.indexOf(b.phx_ref)<0);t[d].metas.unshift(...y)}a(d,g,p)}),this.map(c,(d,p)=>{let g=t[d];if(!g)return;let m=p.metas.map(y=>y.phx_ref);g.metas=g.metas.filter(y=>m.indexOf(y.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))}},bl={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,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(s,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(l,y=>
19p.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>p.setUint8(g++,y.charCodeAt(0)));var m=new Uint8Array(d.byteLength+u.byteLength);return m.set(new Uint8Array(d),0),m.set(new Uint8Array(u),d.byteLength),m.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 m=e.slice(c,e.byteLength);return{join_ref:d,ref:null,topic:p,event:g,payload:m}},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 m=s.decode(e.slice(d,d+u));d=d+u;let y=s.decode(e.slice(d,d+c));d=d+c;let b=e.slice(d,e.byteLength),_={status:y,response:b};return{join_ref:p,ref:g,topic:m,event:Vn.reply,payload:_}},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}}},UO=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||vn.WebSocket||ni,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=vn&&vn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=bl.encode.bind(bl),this.defaultDecoder=bl.decode.bind(bl),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!==ni?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;li&&li.addEventListener&&(li.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),li.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),li.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=Oa(t.params||{}),this.endPoint=`${e}/${sf.websocket}`,this.vsn=t.vsn||OO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new z0(()=>{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 ni}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=Bl.appendParams(Bl.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=Oa(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ni?this.connectWithF
vendor: 4,353 bytes, line 19
19allback(ni,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===ni?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${af}${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===_n.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)}
19triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Vn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case _n.connecting:return"connecting";case _n.open:return"open";case _n.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 Ca{constructor(t,s){const a=LO(s);this.presence=new DO(t.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=Ca.onJoinPayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=Ca.onLeavePayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ca.transformState(this.presence.state)}static transformState(t){return t=NO(t),Object.getOwnPropertyNames(t).reduce((s,a)=>{const l=t[a];return s[a]=jl(l),s},{})}static onJoinPayload(t,s,a){const l=Lm(s),u=jl(a);return{event:"join",key:t,currentPresences:l,newPresences:u}}static onLeavePayload(t,s,a){const l=Lm(s),u=jl(a);return{event:"leave",key:t,currentPresences:l,leftPresences:u}}}function jl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function NO(e){return JSON.parse(JSON.stringify(e))}function LO(e){return e?.events&&{events:e.events}}function Lm(e){return e?.metas?jl(e):[]}var zm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(zm||(zm={}));class zO{get state(){return this.presenceAdapter.state}constructor(t,s){this.channel=t,this.presenceAdapter=new Ca(this.channel.channelAdapter,s)}}function PO(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
19if(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=HO(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 HO(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Pm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Pm||(Pm={}));var hi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(hi||(hi={}));var Kn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Kn||(Kn={}));class xa{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=L0(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:[],m=!!this.bindings[hi.PRESENCE]&&this.bindings[hi.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,y={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:m}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(Kn.CHANNEL_ERROR,PO(_))}),this._onClose(()=>t?.(Kn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},y)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
19{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(Kn.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Rr.errored;const w=Object.values(_).join(", ")||"error";t?.(Kn.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(Kn.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:m,table:y,filter:b}}=p,_=t&&t[d];if(_&&_.event===g&&xa.isFilterValueEqual(_.schema,m)&&xa.isFilterValueEqual(_.table,y)&&xa.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Rr.errored,s?.(Kn.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(Kn.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===hi.PRESENCE||t===hi.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};if(g.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let m=g.statusText;try{const y=await g.json();m=y.error||y.message||m}catch{}return Promise.reject(new Error(m))}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
19in 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,m;
19const y=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,a))return!1;const b=(l=this.bindings[y])===null||l===void 0?void 0:l.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))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 _==="*"||_===((m=s?.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(t,s){const{close:a,error:l,leave:u,join:c}=U0;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=Nm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(s.old=Nm(t.columns,t.old_record)),s}}class qO{constructor(t,s){this.socket=new UO(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()==nf.connecting}isDisconnecting(){return this.socket.connectionState()==nf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Bm={HEARTBEAT_INTERVAL:25e3},IO=[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=` 20 addEventListener("message", (e) => { 21 if (e.data.event === "start") { 22 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 23 } 24 });`;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={}
24,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 qO(t,l),this.httpEndpoint=L0(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} 25 26To use Realtime in Node.js, you need to provide a WebSocket implementation: 27 28Option 1: Use Node.js 22+ which has native WebSocket support 29Option 2: Install and provide the "ws" package: 30 31 npm install ws 32 33 import ws from "ws" 34 const client = new RealtimeClient(url, { 35 ...options, 36 transport: ws 37 })`):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()||nf.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 xa(`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}
37this._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(U0.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,m,y,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:mO,w.heartbeatIntervalMs=(u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:Bm.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:Bm.HEARTBEAT_INTERVAL),w.transport=(p=t?.transport)!==null&&p!==void 0?p:fO.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=(m=t?.reconnectAfterMs)!==null&&m!==void 0?m:(M=>IO[M-1]||$O);let A,E;const O=(y=t?.vsn)!==null&&y!==void 0?y:yO;switch(O){case gO:A=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case D0:A=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=O,w.encode=(b=t?.encode)!==null&&b!==void 0?b:A,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()}}
37var La=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}),m=await g.text(),y=(g.headers.get("content-type")||"").includes("application/json"),b=y&&m?JSON.parse(m):m;if(!g.ok){const _=y?b:void 0,w=_?.error;throw new La(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 _l(e){return e.join("�")}var XO=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:_l(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/${_l(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_l(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${_l(e.namespace)}`}),!0}catch(t){if(t instanceof La&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(s){if(s instanceof La&&s.status===409)return;throw s}}};function ri(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/${ri(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/${ri(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/${ri(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/${ri(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/${ri(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/${ri(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(s){if(s instanceof La&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(s){if(s instanceof La&&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)}
37async 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 za(e){"@babel/helpers - typeof";return za=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},za(e)}function e1(e,t){if(za(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(za(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 za(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 Hm(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 ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(s),!0).forEach(function(a){n1(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Hm(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var ru=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 su(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var of=class extends ru{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 ce({},super.toJSON())}},P0=class extends ru{constructor(e,t,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Hl(e,t,s){const a=ce({},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)},lf=e=>{if(Array.isArray(e))return e.map(s=>lf(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]=lf(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),qm=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 of(qm(c),u,d,a))}).catch(()=>{const c=u+"";t(new of(l.statusText||`HTTP ${u} error`,u,c,a))})}else t(new P0(qm(e),e,a))},l1=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ce(ce({},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=Hl(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),ce(ce({},l),s)};async function wa(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 m=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!m||!m.includes("application/json"))return{}}return g.json()}).then(g=>d(g)).catch(g=>o1(g,p,a,c))})}function B0(e="storage"){return{get:async(t,s,a,l)=>wa(t,"GET",s,a,l,void 0,e),post:async(t,s,a,l,u)=>wa(t,"POST",s,l,u,a,e),put:async(t,s,a,l,u)=>wa(t,"PUT",s,l,u,a,e),head:async(t,s,a,l)=>wa(t,"HEAD",s,ce(ce({},a),{},{noResolveJson:!0}),l,void 0,e),remove:async(t,s,a,l,u)=>wa(t,"DELETE",s,l,u,a,e)}}const u1=B0("storage"),{get:Pa,post:ln,put:uf,head:c1,remove:xf}=u1,$t=B0("vectors");var vi=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=Hl(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(su(s))return{data:null,error:s};throw s}}};let H0;H0=Symbol.toStringTag;var h1=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[H0]="StreamDownloadBuilder",this.promise=null}
37then(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(su(t))return{data:null,error:t};throw t}}};let q0;q0=Symbol.toStringTag;var f1=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[q0]="BlobDownloadBuilder",this.promise=null}asStream(){return new h1(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(su(t))return{data:null,error:t};throw t}}};const d1={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Im={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var p1=class extends vi{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=ce(ce({},Im),a);let d=ce(ce({},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=Hl(d,b,_);const g=l._removeEmptyFolders(t),m=l._getFinalPath(g),y=await(e=="PUT"?uf:ln)(l.fetch,`${l.url}/object/${m}`,u,ce({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:y.Id,fullPath:y.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=ce(ce({},Im),a);let m=ce(ce({},l.headers),{"x-upsert":String(g.upsert)});const y=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),y&&p.append("metadata",l.encodeMetadata(y)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),y&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(y))):(p=s,m["cache-control"]=`max-age=${g.cac
37heControl}`,m["content-type"]=g.contentType,y&&(m["x-metadata"]=l.toBase64(l.encodeMetadata(y))),(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))m=Hl(m,b,_);return{path:u,fullPath:(await uf(l.fetch,d.toString(),p,ce({headers:m},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(e);const l=ce({},s.headers);t?.upsert&&(l["x-upsert"]="true");const u=await ln(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 ru("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 ln(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 ln(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
37stinationBucket: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 ln(a.fetch,`${a.url}/object/sign/${l}`,ce({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 ln(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=>ce(ce({},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=()=>Pa(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new f1(d,this.shouldThrowOnError)}async info(e){var t=this;const s=t._getFinalPath(e);return t.handleOperation(async()=>lf(await Pa(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(su(l)){var a;const u=l instanceof of?l.status:l instanceof P0?(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 xf(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=ce(ce(ce({},d1),t),{},{prefix:e||""});return await ln(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=ce({},e);return await ln(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.108.2",Ka={"X-Client-Info":`storage-js/${g1}`};var y1=class extends vi{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=ce(ce({},Ka),t);super(u,c,s,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=t.listBucketOptionsToQueryString(e);return await Pa(t.fetch,`${t.url}/bucket${s}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Pa(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var s=this;return s.handleOperation(async()=>await ln(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 uf(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 ln(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await xf(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():""}},m1=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),t);super(a,l,s,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ln(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 Pa(t.fetch,l,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await xf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!a1(e))throw new ru("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 vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers})||{})}},b1=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"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 $t.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await $t.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");
37if(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 $t.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await $t.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 $t.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},_1=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await $t.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,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,s=this;return t().call(s,ce(ce({},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,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var t=()=>super.getVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},T1=class extends y1{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 m1(this.url+"/iceberg",this.headers,this.fetch)}};const I0="2.108.2",Yn=30*1e3,Ra=3,Bh=Ra*Yn,R1=2*Yn,A1="http://localhost:9999",O1="supabase.auth.token",C1={"X-Client-Info":`gotrue-js/${I0}`},cf="X-Supabase-Api-Version",$0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},x1=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,k1=600*1e3;class Ba 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 Z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class j1 extends Ba{constructor(t,s,a){super(t,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function M1(e){return Z(e)&&e.name==="AuthApiError"}
37class cn extends Ba{constructor(t,s){super(t),this.name="AuthUnknownError",this.originalError=s}}class Sn extends Ba{constructor(t,s,a,l){super(t,a,l),this.name=s,this.status=a}}class ut extends Sn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Sl(e){return Z(e)&&e.name==="AuthSessionMissingError"}class si extends Sn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class wl extends Sn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class El extends Sn{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 D1(e){return Z(e)&&e.name==="AuthImplicitGrantRedirectError"}class $m extends Sn{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 U1 extends Sn{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 hf extends Sn{constructor(t,s){super(t,"AuthRetryableFetchError",s,void 0)}}function Gm(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Vm extends Sn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function N1(e){return Z(e)&&e.name==="AuthRefreshDiscardedError"}class Km extends Sn{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 ql extends Sn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Ym=` 38\r=`.split(""),L1=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Ym.length;t+=1)e[Ym[t].charCodeAt(0)]=-2;for(let t=0;t<Il.length;t+=1)e[Il[t].charCodeAt(0)]=t;return e})();function Fm(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 G0(e,t,s){const a=L1[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 Qm(e){const t=[],s=c=>{t.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{B1(c,a,s)};for(let c=0;c<e.length;c+=1)G0(e.charCodeAt(c),l,u);return t.join("")}function z1(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 P1(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}z1(a,t)}}function B1(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 gi(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)G0(e.charCodeAt(l),s,a);return new Uint8Array(t)}function H1(e){const t=[];return P1(e,s=>t.push(s)),new Uint8Array(t)}function us(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};return e.forEach(l=>Fm(l,s,a)),Fm(null,s,a),t.join("")}function q1(e){return Math.round(Date.now()/1e3)+e}function I1(){return Symbol("auth-callback")}const _t=()=>typeof window<"u"&&typeof document<"u",ns={tested:!1,writable:!1},V0=()=>
38{if(!_t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ns.tested)return ns.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ns.tested=!0,ns.writable=!0}catch{ns.tested=!0,ns.writable=!1}return ns.writable};function $1(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 K0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),G1=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ui=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},an=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch{return null}},Xe=async(e,t)=>{await e.removeItem(t)};class iu{constructor(){this.promise=new iu.promiseConstructor((t,s)=>{this.resolve=t,this.reject=s})}}iu.promiseConstructor=Promise;function Tl(e){const t=e.split(".");if(t.length!==3)throw new ql("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!x1.test(t[a]))throw new ql("JWT not in base64url format");return{header:JSON.parse(Qm(t[0])),payload:JSON.parse(Qm(t[1])),signature:gi(t[2]),raw:{header:t[0],payload:t[1]}}}async function V1(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function K1(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 Y1(e){return("0"+e.toString(16)).substr(-2)}function F1(){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,Y1).join("")}async function Q1(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 J1(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 Q1(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function rs(e,t,s=!1){const a=F1();let l=a;s&&(l+="/recovery"),await ui(e,`${t}-code-verifier`,l);const u=await J1(a);return[u,a===u?"plain":"s256"]}const X1=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Z1(e){const t=e.headers.get(cf);if(!t||!t.match(X1))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function W1(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 eC(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 tC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(e){if(!tC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function on(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 Hh(){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 nC(e,t){return new Proxy(e,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
38if(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 Jm(e){return JSON.parse(JSON.stringify(e))}const ss=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)},rC=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Xm(e){var t;if(!G1(e))throw new hf(ss(e),0);if(rC.includes(e.status))throw new hf(ss(e),e.status);let s;try{s=await e.json()}catch(u){throw new cn(ss(u),u)}let a;const l=Z1(e);if(l&&l.getTime()>=$0["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 Km(ss(s),e.status,((t=s.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new ut}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 Km(ss(s),e.status,s.weak_password.reasons);throw new j1(ss(s),e.status||500,a)}const sC=(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 te(e,t,s,a){var l;const u=Object.assign({},a?.headers);u[cf]||(u[cf]=$0["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 iC(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 iC(e,t,s,a,l,u){const c=sC(t,a,l,u);let d;try{d=await e(s,Object.assign({},c))}catch(p){throw console.error(p),new hf(ss(p),0)}if(d.ok||await Xm(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await Xm(p)}}function en(e){var t;let s=null;lC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=q1(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 Zm(e){const t=en(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 aC(e){return{data:e,error:null}}function oC(e){const{action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=e,c=nu(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 Wm(e){return e}function lC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const qh=["global","local","others"];class uC{constructor({url:t="",headers:s={},fetch:a,experimental:l}){this.url=t,this.headers=s,this.fetch=K0(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=qh[0]){if(qh.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qh.join(", ")}`);try{return await te(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Z(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,s={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:s}=t,a=nu(t,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:oC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(t){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ar})}catch(s){if(Z(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},m=await te(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:Wm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{users:[]},error:g};throw g}}async getUserById(t){Gn(t);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ar})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(t,s){Gn(t);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:s,headers:this.headers,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,s=!1){Gn(t);
38try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:s},xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){Gn(t.userId);try{const{data:s,error:a}=await te(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(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(t){Gn(t.userId),Gn(t.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(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},m=await te(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:Wm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(t){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listCustomProviders(t){try{const s={};return t?.type&&(s.type=t.type),await te(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(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(t){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(t){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(t){on(this.experimental),Gn(t.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(t){on(this.experimental),Gn(t.userId),Gn(t.passkeyId);
38try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function ev(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}globalThis&&V0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class cC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function hC(){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 Y0(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 dC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function pC(e){var t;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:g,scheme:m,uri:y,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(!y)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(` 39`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=Y0(e.address),w=m?`${m}://${a}`:a,A=e.statement?`${e.statement} 40`:"",E=`${w} wants you to sign in with your Ethereum account: 41${_} 42 43${A}`;let O=`URI: ${y} 44Version: ${b} 45Chain ID: ${s}${c?` 46Nonce: ${c}`:""} 47Issued At: ${u.toISOString()}`;if(l&&(O+=` 48Expiration Time: ${l.toISOString()}`),d&&(O+=` 49Not Before: ${d.toISOString()}`),p&&(O+=` 50Request ID: ${p}`),g){let M=` 51Resources:`;for(const j of g){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);M+=` 52- ${j}`}O+=M}return`${E} 53${O}`}class nt 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 $l extends nt{constructor(t,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:t}),this.name="WebAuthnUnknownError",this.originalError=s}}function gC({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 nt({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 nt({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 nt({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 nt({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 nt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new nt({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 nt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new nt({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;
53if(F0(c)){if(u.rp.id!==c)return new nt({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({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 nt({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 nt({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 nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function yC({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 nt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new nt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(F0(a)){if(s.rpId!==a)return new nt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new nt({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 nt({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 ff=new mC;function tv(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=nu(e,["challenge","user","excludeCredentials"]),u=gi(t).buffer,c=Object.assign(Object.assign({},s),{id:gi(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:gi(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function nv(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=nu(e,["challenge","allowCredentials"]),l=gi(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:gi(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function rv(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:us(new Uint8Array(e.response.attestationObject)),clientDataJSON:us(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sv(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:us(new Uint8Array(l.authenticatorData)),clientDataJSON:us(new Uint8Array(l.clientDataJSON)),signature:us(new Uint8Array(l.signature)),userHandle:l.userHandle?us(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function F0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Gl(){var e,t;return!!(_t()&&"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 Q0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",t)}:{data:null,error:new $l("Empty credential response",t)}}
53catch(t){return{data:null,error:gC({error:t,options:e})}}}async function J0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",t)}:{data:null,error:new $l("Empty credential response",t)}}catch(t){return{data:null,error:yC({error:t,options:e})}}}const vC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},bC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Vl(...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]=Vl(d,c):a[u]=Vl(c)}else a[u]=c}return a}function _C(e,t){return Vl(vC,e,t||{})}function SC(e,t){return Vl(bC,e,t||{})}class wC{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??ff.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:m}=d.webauthn.credential_options.publicKey;if(!m.name){const y=a;if(y)m.name=`${m.id}:${y}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";m.name=`${m.id}:${w}`}}m.displayName||(m.displayName=m.name)}switch(d.webauthn.type){case"create":{const m=_C(d.webauthn.credential_options.publicKey,u?.create),{data:y,error:b}=await Q0({publicKey:m,signal:g});return y?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const m=SC(d.webauthn.credential_options.publicKey,u?.request),{data:y,error:b}=await J0(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:m,signal:g}));return y?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new cn("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 Ba("rpId is required for WebAuthn authentication")};try{if(!Gl())return{data:null,error:new cn("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 Z(c)?{data:null,error:c}:{data:null,error:new cn("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 Ba("rpId is required for WebAuthn registration")};try{if(!Gl())return{data:null,error:new cn("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(m=>{var y;return(y=m.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.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 Z(c)?{data:null,error:c}:{data:null,error:new cn("Unexpected error in register",c)}}}}hC();const EC={url:A1,storageKey:O1,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:C1,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ii={};class Ha{get jwks(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[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.lastRefreshFailure=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({},EC),t);
53if(this.storageKey=u.storageKey,this.instanceID=(s=Ha.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,Ha.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&_t()){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 uC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=K0(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 wC(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:V0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ev(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=ev(this.memoryStorage)),_t()&&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),(c.data.event==="TOKEN_REFRESHED"||c.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);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} (${I0}) ${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(_t()&&(s=$1(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),_t()&&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),D1(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 Z(s)?this._returnResult({error:s}):this._returnResult({error:new cn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var s,a,l;try{const u=await te(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:en}),{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(Z(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:m,password:y,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await rs(this.storage,this.storageKey)),u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:m,password:y,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:en})}else if("phone"in t){const{phone:m,password:y,options:b}=t;u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:y,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:en})}else throw new wl("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await Xe(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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 te(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:Zm})}else if("phone"in t){const{phone:u,password:c,options:d}=t;s=await te(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:Zm})}else throw new wl("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 si;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(Z(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,m,y,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:A,wallet:E,statement:O,options:M}=t;let j;if(_t())if(typeof E=="object")j=E;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")j=J.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"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const N=new URL((s=M?.url)!==null&&s!==void 0?s:window.location.href),F=await j.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=Y0(F[0]);let H=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!H){const J=await j.request({method:"eth_chainId"});H=fC(J)}const K={domain:N.host,address:V,statement:O,uri:N.href,version:"1",chainId:H,nonce:(l=M?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=M?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=M?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=M?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.resources};_=pC(K),w=await j.request({method:"personal_sign",params:[dC(_),V]})}try{const{data:A,error:E}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((y=t.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:en});if(E)throw E;if(!A||!A.session||!A.user){const O=new si;return this._returnResult({data:{user:null,session:null},error:O})}
53return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:E})}catch(A){if(Z(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var s,a,l,u,c,d,p,g,m,y,b,_;let w,A;if("message"in t)w=t.message,A=t.signature;else{const{chain:E,wallet:O,statement:M,options:j}=t;let N;if(_t())if(typeof O=="object")N=O;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))N=V.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 O!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=O}const F=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in N&&N.signIn){const V=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),M?{statement:M}:null));let H;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")H=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)H=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in H&&"signature"in H&&(typeof H.signedMessage=="string"||H.signedMessage instanceof Uint8Array)&&H.signature instanceof Uint8Array)w=typeof H.signedMessage=="string"?H.signedMessage:new TextDecoder().decode(H.signedMessage),A=H.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${F.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(l=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((y=(m=j?.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||y===void 0)&&y.length?["Resources",...j.signInWithSolana.resources.map(H=>`- ${H}`)]:[]].join(` 54`);const V=await N.signMessage(new TextEncoder().encode(w),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=V}}try{const{data:E,error:O}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:us(A)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:en});if(O)throw O;if(!E||!E.session||!E.user){const M=new si;return this._returnResult({data:{user:null,session:null},error:M})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:O})}
54catch(E){if(Z(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const s=await an(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new U1;const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:en});if(await Xe(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new si;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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 te(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:en}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const m=new si;return this._returnResult({data:{user:null,session:null},error:m})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(Z(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,m=null;this.flowType==="pkce"&&([g,m]=await rs(this.storage,this.storageKey));const{error:y}=await te(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:m},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in t){const{phone:d,options:p}=t,{data:g,error:m}=await te(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:m})}throw new wl("You must provide either an email or phone number.")}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:en});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(Z(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 rs(this.storage,this.storageKey));const g=await te(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:aC});return!((u=g.data)===null||u===void 0)&&u.url&&_t()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 ut;const{error:l}=await te(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(Z(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;
54let c=null,d=null;this.flowType==="pkce"&&([c,d]=await rs(this.storage,this.storageKey));const{error:p}=await te(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:u?.emailRedirectTo});return p&&await Xe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in t){const{phone:a,type:l,options:u}=t,{data:c,error:d}=await te(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 wl("You must provide either an email or phone number and a type")}catch(s){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 an(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 valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Bh:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const c=await an(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Hh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=nC(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);if(u){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const d=await an(this.storage,this.storageKey);if(d&&d.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:u})}return 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 te(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 ut}:await te(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(Z(s))return Sl(s)&&(await this._removeSession(),await Xe(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 ut;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&t.email!=null&&([d,p]=await rs(this.storage,this.storageKey));const{data:g,error:m}=await te(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(m)throw m;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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 ut;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=Tl(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(Z(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;
54if(d)throw d;t=(a=c.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new ut;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(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(t,s){var a;try{if(!_t())throw new El("No browser detected.");if(t.error||t.error_description||t.error_code)throw new El(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 $m("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new El("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 $m("No code detected.");const{data:j,error:N}=await this._exchangeCodeForSession(t.code);if(N)throw N;const F=new URL(window.location.href);return F.searchParams.delete("code"),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:j.session,redirectType:(a=j.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:m}=t;if(!c||!p||!d||!m)throw new El("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(p);let _=y+b;g&&(_=parseInt(g));const w=_-y;w*1e3<=Yn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const A=_-b;y-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,y):y-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,y);const{data:E,error:O}=await this._getUser(c);if(O)throw O;const M={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:m,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:t.type},error:null})}catch(l){if(Z(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 an(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&&!Sl(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&&!(M1(d)&&(d.status===404||d.status===401||d.status===403)||Sl(d)))return this._returnResult({error:d})}return t!=="others"&&(await this._removeSession(),await Xe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const s=I1(),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),Sl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(t,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await rs(this.storage,this.storageKey,!0));try{return await te(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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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(Z(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,m;
54const{data:y,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 te(this.fetch,"GET",_,{headers:this.headers,jwt:(m=(g=y.session)===null||g===void 0?void 0:g.access_token)!==null&&m!==void 0?m:void 0})});if(l)throw l;return _t()&&!(!((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(Z(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:m}=t,y=await te(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:m,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:en}),{data:b,error:_}=y;return _?this._returnResult({data:{user:null,session:null},error:_}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new si}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(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 te(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(Z(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 K1(async l=>(l>0&&await V1(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await te(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:en})),(l,u)=>{const c=200*Math.pow(2,l);return u&&Gm(u)&&Date.now()+c-a<Yn})}catch(a){if(this._debug(s,"error",a),Z(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),_t()&&!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 an(this.storage,this.storageKey);if(l&&this.userStorage){let c=await an(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await ui(this.userStorage,this.storageKey+"-user",c)),l.user=(t=c?.user)!==null&&t!==void 0?t:Hh()}else if(l&&!l.user&&!l.user){const c=await an(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await Xe(this.storage,this.storageKey+"-user"),await ui(this.storage,this.storageKey,l)):l.user=Hh()}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()<Bh;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${Bh}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(N1(c)?this._debug(a,"refresh discarded by commit guard",c):this._debug(a,"refresh failed",c))}}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 ut;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning c
54ached failure (cooldown active)"),this.lastRefreshFailure.result;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new iu;const u=await an(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!c.session)throw new ut;const p=await an(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 Vm};return this.refreshingDeferred.resolve(b),b}const m=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==m){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Xe(this.storage,this.storageKey),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Vm};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const y={data:c.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(y),y}catch(u){if(this._debug(l,"error",u),Z(u)){const c={data:null,error:u};if(!Gm(u)){const d=await an(this.storage,this.storageKey);!!(d?.expires_at&&d.expires_at*1e3>Date.now())?this._debug(l,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:c,expiresAt:Date.now()+R1},(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 Xe(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 ui(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Jm(l);await ui(this.storage,this.storageKey,u)}else{const l=Jm(s);await ui(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Xe(this.storage,this.storageKey),await Xe(this.storage,this.storageKey+"-code-verifier"),await Xe(this.storage,this.storageKey+"-user"),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&_t()&&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(),Yn);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)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Yn}ms, refresh threshold is ${Ra} ticks`),l<=Ra&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
54)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof cC)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)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Yn}ms, refresh threshold is ${Ra} ticks`),l<=Ra&&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()"),!_t()||!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 rs(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 te(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(Z(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 te(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(Z(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"?rv(t.webauthn.credential_response):sv(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:g}=await te(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(Z(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 te(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:tv(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:nv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(Z(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:_}=Tl(t);let w=null;_.aal&&(w=_.aal);let A=w;const{data:{user:E},error:O}=await this.getUser(t);if(O)return this._returnResult({data:null,error:O});((a=(s=E?.factors)===null||s===void 0?void 0:s.filter(N=>N.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(A="aal2");const j=_.amr||[];return{data:{currentLevel:w,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(_){if(Z(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
54=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}=Tl(c.access_token);let g=null;p.aal&&(g=p.aal);let m=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(m="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:m,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 te(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 ut})})}catch(s){if(Z(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 ut});const c=await te(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&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(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 ut});const c=await te(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&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(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 te(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 ut})})}catch(t){if(Z(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 te(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 ut})})}catch(s){if(Z(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+k1>l)return a;const{data:u,error:c}=await te(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}
54=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}}=Tl(a);if(!s?.allowExpired)try{W1(u.exp)}catch(_){throw new ql(_ 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 m=eC(l.alg),y=await crypto.subtle.importKey("jwk",g,m,!0,["verify"]);if(!await crypto.subtle.verify(m,y,c,H1(`${d}.${p}`)))throw new ql("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var s,a,l;on(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new cn("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=nv(u.options),p=(l=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:ff.createNewAbortSignal(),{data:g,error:m}=await J0({publicKey:d,signal:p});if(m||!g)return this._returnResult({data:null,error:m??new cn("WebAuthn ceremony failed",null)});const y=sv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:y})}catch(u){if(Z(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(t){var s,a;on(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new cn("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=tv(l.options),d=(a=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:ff.createNewAbortSignal(),{data:p,error:g}=await Q0({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new cn("WebAuthn ceremony failed",null)});const m=rv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:m})}catch(l){if(Z(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){on(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 ut});const{data:l,error:u}=await te(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(Z(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){on(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 ut});const{data:u,error:c}=await te(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(Z(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(t){var s;on(this.experimental);try{const{data:a,error:l}=await te(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(Z(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){on(this.experimental);try{const{data:s,error:a}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:en});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(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){on(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 ut});const{data:l,error:u}=await te(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(Z(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){on(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 ut});const{data:u,error:c}=await te(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(Z(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(t){on(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 ut});const{error:u}
54=await te(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(Z(s))return this._returnResult({data:null,error:s});throw s}}}Ha.nextInstanceID={};const TC=Ha,RC="2.108.2";let Aa="",Kl;if(typeof Deno<"u"){var Ih;Aa="deno",Kl=(Ih=Deno.version)===null||Ih===void 0?void 0:Ih.deno}else if(typeof document<"u")Aa="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Aa="react-native";else{var $h;Aa="node",Kl=typeof process<"u"?($h=process.version)===null||$h===void 0?void 0:$h.replace(/^v/,""):void 0}const X0=[`runtime=${Aa}`];Kl&&X0.push(`runtime-version=${Kl}`);const AC={"X-Client-Info":`supabase-js/${RC}; ${X0.join("; ")}`},OC={headers:AC},CC={schema:"public"},xC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},kC={},jC={enabled:!1,respectSamplingDecision:!0};function MC(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(m){try{g(a.next(m))}catch(y){c(y)}}function p(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):l(m.value).then(d,p)}g((a=a.apply(e,[])).next())})}let Gh=null;const DC="@opentelemetry/api";function UC(){return Gh===null&&(Gh=import(DC).catch(()=>null)),Gh}function NC(){return MC(this,void 0,void 0,function*(){try{const e=yield UC();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 LC(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 zC(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(PC(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 PC(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 BC(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 qa(e){"@babel/helpers - typeof";return qa=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},qa(e)}function HC(e,t){if(qa(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(qa(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qC(e){var t=HC(e,"string");return qa(t)=="symbol"?t:t+""}function IC(e,t,s){return(t=qC(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function iv(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 Ke(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?iv(Object(s),!0).forEach(function(a){IC(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):iv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}const $C=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GC=()=>Headers,VC=(e,t,s,a,l)=>{const u=$C(a),c=GC(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=d?BC(t):null;return async(m,y)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:e;let w=new c(y?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),g){const A=await KC(m,g,p);A&&(A.traceparent&&!w.has("traceparent")&&w.set("traceparent",A.traceparent),A.tracestate&&!w.has("tracestate")&&w.set("tracestate",A.tracestate),A.baggage&&!w.has("baggage")&&w.set("baggage",A.baggage))}return u(m,Ke(Ke({},y),{},{headers:w}))}};async function KC(e,t,s){if(!zC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await NC();if(!a||!a.traceparent)return null;if(s){const l=LC(a.traceparent);if(l&&!l.isSampled)return null}return a}function av(e){return typeof e=="boolean"?{enabled:e}:e}function YC(e){return e.endsWith("/")?e:e+"/"}function FC(e,t){var s,a,l,u,c,d;const{db:p,auth:g,realtime:m,global:y}=e,{db:b,auth:_,realtime:w,global:A}=t,E=av(e.tracePropagation),O=av(t.tracePropagation),M={db:Ke(Ke({},b),p),auth:Ke(Ke({},_),g),realtime:Ke(Ke({},w),m),storage:{},global:Ke(Ke(Ke({},A),y),{},{headers:Ke(Ke({},(s=A?.headers)!==null&&s!==void 0?s:{}),(a=y?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=E?.enabled)!==null&&u!==void 0?u:O?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:O?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?M.accessToken=e.accessToken:delete M.accessToken,M}function QC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
54if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(YC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var JC=class extends TC{constructor(e){super(e)}},XC=class{constructor(e,t,s){var a,l;this.supabaseUrl=e,this.supabaseKey=t;const u=QC(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:CC,realtime:kC,auth:Ke(Ke({},xC),{},{storageKey:c}),global:OC,tracePropagation:jC},p=FC(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:(m,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} 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=VC(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Ke({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new hO(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:m,lockAcquireTimeout:y,skipAutoInitialize:b},_,w){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new JC({url:this.authUrl.href,headers:Ke(Ke({},A),_),storageKey:u,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:m,fetch:w,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new YO(this.realtimeUrl.href,Ke(Ke({},e),{},{params:Ke(Ke({},{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 ZC=(e,t,s)=>new XC(e,t,s);function WC(){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}WC()&&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
54ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function ex(){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"],m="lovable-preview-auth:result",y=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(E,O,M)=>new Promise(j=>{const N=b();let F=!1,V;const H=ie=>{F||(F=!0,clearTimeout(V),window.removeEventListener("message",K),j(ie))},K=ie=>{if(g.indexOf(ie.origin)<0)return;const ne=ie.data;ne&&ne.type===m&&ne.requestId===N&&H(ne)};window.addEventListener("message",K);const J={type:E,requestId:N,projectId:l,key:O};M!==void 0&&(J.value=M);for(const ie of g)window.parent.postMessage(J,ie);V=setTimeout(()=>H(null),y)});let w=!0;const A=250;return{getItem:async E=>{let O=await _("lovable-preview-auth:get",E);return!O&&w&&(await new Promise(M=>setTimeout(M,A)),O=await _("lovable-preview-auth:get",E)),w=!1,O&&O.ok&&typeof O.value=="string"?O.value===""?(localStorage.removeItem(E),null):O.value:localStorage.getItem(E)},setItem:(E,O)=>(localStorage.setItem(E,O),_("lovable-preview-auth:set",E,O).then(()=>{})),removeItem:E=>(localStorage.removeItem(E),_("lovable-preview-auth:remove",E).then(()=>{}))}}function tx(){return ZC("https://qanulbtyzbdqbiujfewm.supabase.co","sb_publishable_xomJQ69-MuNbJ2tDThN5yw_I3-WOzxn",{auth:{storage:ex(),persistSession:!0,autoRefreshToken:!0}})}let Vh;const nx=new Proxy({},{get(e,t,s){return Vh||(Vh=tx()),Reflect.get(Vh,t,s)}}),rx=ls({type:"function"}).client(async({next:e})=>{const{data:t}=await nx.auth.getSession(),s=t.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),sx=ls(),ov=ZA(()=>({functionMiddleware:[rx],requestMiddleware:[sx]}));var au=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(){}},ix=class extends au{#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"}},Z0=new ix,ax={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ox=class{#e=ax;#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)}},df=new ox;function lx(e){setTimeout(e,0)}var ux=typeof window>"u"||"Deno"in globalThis;function un(){}function cx(e,t){return typeof e=="function"?e(t):e}function hx(e){return typeof e=="number"&&e>=0&&e!==1/0}function fx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pf(e,t){return typeof e=="function"?e(t):e}function dx(e,t){return typeof e=="function"?e(t):e}function lv(e,t){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==kf(c,t.options))return!1}else if(!$a(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 uv(e,t){const{exact:s,status:a,predicate:l,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(s){if(Ia(t.options.mutationKey)!==Ia(u))return!1}else if(!$a(t.options.mutationKey,u))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function kf(e,t){return(t?.queryKeyHashFn||Ia)(e)}function Ia(e){return JSON.stringify(e,(t,s)=>gf(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function $a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>$a(e[s],t[s])):!1}var px=Object.prototype.hasOwnProperty;function W0(e,t,s=0){if(e===t)return e;if(s>500)return t;const a=cv(e)&&cv(t);if(!a&&!(gf(e)&&gf(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 m=0;m<d;m++){const y=a?m:c[m],b=e[y],_=t[y];if(b===_){p[y]=b,(a?m<u:px.call(e,y))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[y]=_;continue}const w=W0(b,_,s+1);p[y]=w,w===b&&g++}return u===d&&g===u?e:p}function cv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gf(e){if(!hv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!hv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hv(e){return Object.prototype.toString.call(e)==="[object Object]"}function gx(e){return new Promise(t=>{df.setTimeout(t,e)})}function yx(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?W0(e,t):t}function mx(e,t,s=0){const a=[...e,t];return s&&a.length>s?a.slice(1):a}function vx(e,t,s=0){const a=[t,...e];return s&&a.length>s?a.slice(0,-1):a}var jf=Symbol();function eb(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===jf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bx(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 tb=(()=>{let e=()=>ux;return{isServer(){return e()},setIsServer(t){e=t}}})();function _x(){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 Sx=lx;function wx(){let e=[],t=0,s=d=>{d()},a=d=>{d()},l=Sx;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 wt=wx(),Ex=class extends au{#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))}
vendor: 23,940 bytes, line 54
54setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Yl=new Ex;function Tx(e){return Math.min(1e3*2**e,3e4)}function nb(e){return(e??"online")==="online"?Yl.isOnline():!0}var yf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rb(e){let t=!1,s=0,a;const l=_x(),u=()=>l.status!=="pending",c=A=>{if(!u()){const E=new yf(A);b(E),e.onCancel?.(E)}},d=()=>{t=!0},p=()=>{t=!1},g=()=>Z0.isFocused()&&(e.networkMode==="always"||Yl.isOnline())&&e.canRun(),m=()=>nb(e.networkMode)&&e.canRun(),y=A=>{u()||(a?.(),l.resolve(A))},b=A=>{u()||(a?.(),l.reject(A))},_=()=>new Promise(A=>{a=E=>{(u()||g())&&A(E)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let A;const E=s===0?e.initialPromise:void 0;try{A=E??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(y).catch(O=>{if(u())return;const M=e.retry??(tb.isServer()?0:3),j=e.retryDelay??Tx,N=typeof j=="function"?j(s,O):j,F=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,O);if(t||!F){b(O);return}s++,e.onFail?.(s,O),gx(N).then(()=>g()?void 0:_()).then(()=>{t?b(O):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:m,start:()=>(m()?w():_().then(w),l)}}var sb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hx(this.gcTime)&&(this.#e=df.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(df.clearTimeout(this.#e),this.#e=void 0)}},Rx=class extends sb{#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=dv(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=dv(this.options);t.data!==void 0&&(this.setState(fv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const s=yx(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(un).catch(un):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=>dx(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pf(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=eb(this.options,t),g=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(m),m})();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=rb({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof yf&&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 yf){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,...Ax(s.data,this.options),fetchMeta:e.meta??null};case"success":const a={...s,...fv(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),wt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Ax(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dv(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 pv(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 m=!1;const y=w=>{bx(w,()=>t.signal,()=>m=!0)},b=eb(t.options,t.fetchOptions),_=async(w,A,E)=>{if(m)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const M=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:A,direction:E?"backward":"forward",meta:t.options.meta};return y(V),V})(),j=await b(M),{maxPages:N}=t.options,F=E?vx:mx;return{pages:F(w.pages,j,N),pageParams:F(w.pageParams,A,N)}};if(l&&u.length){const w=l==="backward",A=w?Ox:gv,E={pages:u,pageParams:c},O=A(a,E);d=await _(E,O,w)}else{const w=e??u.length;do{const A=p===0?c[0]??a.initialPageParam:gv(a,d);if(p>0&&A==null)break;d=await _(d,A),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 gv(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 Ox(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var Cx=class extends sb{#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||xx(),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=rb({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),wt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function xx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kx=class extends au{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 Cx({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=Rl(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=Rl(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=Rl(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=Rl(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.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=>uv(t,s))}findAll(e={}){return this.getAll().filter(t=>uv(e,t))}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return wt.batch(()=>Promise.all(e.map(t=>t.continue().catch(un))))}};function Rl(e){return e.options.scope?.id}var jx=class extends au{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const a=t.queryKey,l=t.queryHash??kf(a,t);let u=this.get(l);return u||(u=new Rx({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(){wt.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=>lv(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>lv(e,s)):t}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Mx=class{#e;#n;#t;#s;#r;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new jx,this.#n=e.mutationCache||new kx,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Z0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Yl.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(pf(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=cx(t,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return wt.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;wt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return wt.batch(()=>(s.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},a=wt.batch(()=>this.#e.findAll(e).map(l=>l.cancel(s)));return Promise.all(a).then(un).catch(un)}invalidateQueries(e,t={}){return wt.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=wt.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(un)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(pf(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e.behavior=pv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e.behavior=pv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yl.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(Ia(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(a=>{$a(e,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(Ia(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(a=>{$a(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=kf(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===jf&&(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()}},Dx=se.createContext(void 0),Ux=({client:e,children:t})=>(se.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Y.jsx(Dx.Provider,{value:e,children:t}));const Nx="/assets/styles-Dm4mqE3A.css";function Lx(){return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Y.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Y.jsx("div",{className:"mt-6",children:Y.jsx(Of,{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=mt();return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Y.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."}),Y.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Y.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"}),Y.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 Mf=AA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Lovable App"},{name:"description",content:"Lovable Generated Project"},{name:"author",content:"Lovable"},{property:"og:title",content:"Lovable App"},{property:"og:description",content:"Lovable Generated Project"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@Lovable"}],links:[{rel:"stylesheet",href:Nx},{rel:"icon",type:"image/png",href:"/favicon.png"}]}),shellComponent:Px,component:Bx,notFoundComponent:Lx,errorComponent:zx});function Px({children:e}){return Y.jsxs("html",{lang:"en",children:[Y.jsx("head",{children:Y.jsx(QA,{})}),Y.jsxs("body",{children:[e,Y.jsx(JA,{})]})]})}function Bx(){const{queryClient:e}=Mf.useRouteContext();return Y.jsx(Ux,{client:e,children:Y.jsx(O0,{})})}const Hx="modulepreload",qx=function(e){return"/"+e},yv={},Ix=function(t,s,a){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=qx(g),g in yv)return;yv[g]=!0;const m=g.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":Hx,m||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)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)})},$x=()=>Ix(()=>import("./index-Clw8XT8O.js"),[]),Gx=xA("/")({head:()=>({meta:[{title:"Tervisehäkaton 2026 â Tallinna Tervishoiu Kõrgkool"},{name:"description",content:"24 tunniga ideest tervishoiulahenduseni. Esimene Tervisehäkaton 9.â10. oktoober 2026 Tallinna Tervishoiu Kõrgkoolis. Registreeru kohe."},{property:"og:title",content:"Tervisehäkaton 2026 â Tallinna Tervishoiu Kõrgkool"},{property:"og:description",content:"24 tunniga ideest tervishoiulahenduseni. 9.â10. oktoober 2026."},{property:"og:type",content:"website"},{property:"og:url",content:"/"}],links:[{rel:"canonical",href:"/"}]}),component:jA($x,"component")}),Vx=Gx.update({id:"/",path:"/",getParentRoute:()=>Mf}),Kx={IndexRoute:Vx},Yx=Mf._addFileChildren(Kx),Fx=()=>{const e=new Mx;return IA({routeTree:Yx,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function Qx(){const e=await Fx();let t;if(ov){const s=await ov.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,t=s.seri
54alizationAdapters,e.options.defaultSsr=s.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(VR),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await YR(e),e}async function Jx(){const e=await Qx();return window.$_TSR?.h(),e}var Kh;function Xx(){return Kh||(Kh=Jx()),Y.jsx(XR,{promise:Kh,children:e=>Y.jsx(VA,{router:e})})}se.startTransition(()=>{DS.hydrateRoot(document,Y.jsx(se.StrictMode,{children:Y.jsx(Xx,{})}))});export{Zx as R,Om as _,yi as a,T0 as b,nk as c,nu as d,sk as e,Y as j,se 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.