PageSourceSearch

https://thepitchchapelhill.com/assets/index-BiXu8FMX.js

js thepitchchapelhill.com collected 2026-10-04 13:23:58 UTC 597,150 bytes, 56 lines download raw bytes

vendor: 4,188 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Lnt4VvHm.js","assets/SiteFooter-H3Y0k5GM.js","assets/index-D3Dvtaho.js","assets/select-6oGEAdA8.js","assets/the-ivy-CBden3Az.js","assets/auth-C8Y1DaRC.js","assets/Ivy_Empty_Bar_Liquors_4.JPG.asset-C6DOcYOD.js","assets/shield-check-oEf23hba.js","assets/book-BY7Tyrjo.js","assets/gallery-Bn6bsZ6f.js","assets/ops-YRei7t3K.js","assets/spaces-CwgLSuoS.js"])))=>i.map(i=>d[i]);
2function CS(t,e){for(var i=0;i<e.length;i++){const s=e[i];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in t)){const u=Object.getOwnPropertyDescriptor(s,l);u&&Object.defineProperty(t,l,u.get?u:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Wx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var eh={exports:{}},Qa={};var my;function kS(){if(my)return Qa;my=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var h in l)h!=="key"&&(u[h]=l[h])}else u=l;return l=u.ref,{$$typeof:t,type:s,key:c,ref:l!==void 0?l:null,props:u}}return Qa.Fragment=e,Qa.jsx=i,Qa.jsxs=i,Qa}var yy;function xS(){return yy||(yy=1,eh.exports=kS()),eh.exports}var X=xS(),th={exports:{}},be={};var vy;function NS(){if(vy)return be;vy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function _(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function T(O,I,$){this.props=O,this.context=I,this.refs=A,this.updater=$||S}T.prototype.isReactComponent={},T.prototype.setState=function(O,I){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,I,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function x(){}x.prototype=T.prototype;function k(O,I,$){this.props=O,this.context=I,this.refs=A,this.updater=$||S}var P=k.prototype=new x;P.constructor=k,E(P,T.prototype),P.isPureReactComponent=!0;var Z=Array.isArray;function z(){}var D={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function te(O,I,$){var Q=$.ref;return{$$typeof:t,type:O,key:I,ref:Q!==void 0?Q:null,props:$}}function le(O,I){return te(O.type,I,O.props)}function V(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){var I={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function($){return I[$]})}var W=/\/+/g;function pe(O,I){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):I.toString(36)}function se(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(z,z):(O.status="pending",O.then(function(I){O.status==="pending"&&(O.status="fulfilled",O.value=I)},function(I){O.status==="pending"&&(O.status="rejected",O.reason=I)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function j(O,I,$,Q,ne){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var ue=!1;if(O===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(O.$$typeof){case t:case e:ue=!0;break;case y:return ue=O._init,j(ue(O._payload),I,$,Q,ne)}}if(ue)return ne=ne(O),ue=Q===""?"."+pe(O,0):Q,Z(ne)?($="",ue!=null&&($=ue.replace(W,"$&/")+"/"),j(ne,I,$,"",function(Et){return Et}
vendor: 5,130 bytes, line 2
2)):ne!=null&&(V(ne)&&(ne=le(ne,$+(ne.key==null||O&&O.key===ne.key?"":(""+ne.key).replace(W,"$&/")+"/")+ue)),I.push(ne)),1;ue=0;var ce=Q===""?".":Q+":";if(Z(O))for(var Ce=0;Ce<O.length;Ce++)Q=O[Ce],he=ce+pe(Q,Ce),ue+=j(Q,I,$,he,ne);else if(Ce=_(O),typeof Ce=="function")for(O=Ce.call(O),Ce=0;!(Q=O.next()).done;)Q=Q.value,he=ce+pe(Q,Ce++),ue+=j(Q,I,$,he,ne);else if(he==="object"){if(typeof O.then=="function")return j(se(O),I,$,Q,ne);throw I=String(O),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function F(O,I,$){if(O==null)return O;var Q=[],ne=0;return j(O,Q,"","",function(he){return I.call($,he,ne++)}),Q}function ae(O){if(O._status===-1){var I=O._result;I=I(),I.then(function($){(O._status===0||O._status===-1)&&(O._status=1,O._result=$)},function($){(O._status===0||O._status===-1)&&(O._status=2,O._result=$)}),O._status===-1&&(O._status=0,O._result=I)}if(O._status===1)return O._result.default;throw O._result}var Se=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},ye={map:F,forEach:function(O,I,$){F(O,function(){I.apply(this,arguments)},$)},count:function(O){var I=0;return F(O,function(){I++}),I},toArray:function(O){return F(O,function(I){return I})||[]},only:function(O){if(!V(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return be.Activity=m,be.Children=ye,be.Component=T,be.Fragment=i,be.Profiler=l,be.PureComponent=k,be.StrictMode=s,be.Suspense=p,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return D.H.useMemoCache(O)}},be.cache=function(O){return function(){return O.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(O,I,$){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Q=E({},O.props),ne=O.key;if(I!=null)for(he in I.key!==void 0&&(ne=""+I.key),I)!Y.call(I,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&I.ref===void 0||(Q[he]=I[he]);var he=arguments.length-2;if(he===1)Q.children=$;else if(1<he){for(var ue=Array(he),ce=0;ce<he;ce++)ue[ce]=arguments[ce+2];Q.children=ue}return te(O.type,ne,Q)},be.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},be.createElement=function(O,I,$){var Q,ne={},he=null;if(I!=null)for(Q in I.key!==void 0&&(he=""+I.key),I)Y.call(I,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ne[Q]=I[Q]);var ue=arguments.length-2;if(ue===1)ne.children=$;else if(1<ue){for(var ce=Array(ue),Ce=0;Ce<ue;Ce++)ce[Ce]=arguments[Ce+2];ne.children=ce}if(O&&O.defaultProps)for(Q in ue=O.defaultProps,ue)ne[Q]===void 0&&(ne[Q]=ue[Q]);return te(O,he,ne)},be.createRef=function(){return{current:null}},be.forwardRef=function(O){return{$$typeof:h,render:O}},be.isValidElement=V,be.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ae}},be.memo=function(O,I){return{$$typeof:g,type:O,compare:I===void 0?null:I}},be.startTransition=function(O){var I=D.T,$={};D.T=$;try{var Q=O(),ne=D.S;ne!==null&&ne($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(z,Se)}catch(he){Se(he)}finally{I!==null&&$.types!==null&&(I.types=$.types),D.T=I}},be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},be.use=function(O){return D.H.use(O)},be.useActionState=function(O,I,$){return D.H.useActionState(O,I,$)},be.useCallback=function(O,I){return D.H.useCallback(O,I)},be.useContext=function(O){return D.H.useContext(O)},be.useDebugValue=function(){},be.useDeferredValue=function(O,I){return D.H.useDeferredValue(O,I)},be.useEffect=function(O,I){return D.H.useEffect(O,I)},be.useEffectEvent=function(O){return D.H.useEffectEvent(O)},be.useId=function(){return D.H.useId()},be.useImperativeHandle=function(O,I,$){return D.H.useImperativeHandle(O,I,$)},be.useInsertionEffect=function(O,I){return D.H.useInsertionEffect(O,I)},be.useLayoutEffect=function(O,I){return D.H.useLayoutEffect(O,I)},be.useMemo=function(O,I){return D.H.useMemo(O,I)},be.useOptimistic=function(O,I){return D.H.useOptimistic(O,I)},be.useReducer=function(O,I,$){return D.H.useReducer(O,I,$)},be.useRef=function(O){return D.H.useRef(O)},be.useState=function(O){return D.H.useState(O)},be.useSyncExternalStore=function(O,I,$){return D.H.useSyncExternalStore(O,I,$)},be.useTransition=function(){return D.H.useTransition()},be.version="19.2.5",be}var by;function Ao(){return by||(by=1,th.exports=NS()),th.exports}var de=Ao();const J=n0(de),eN=CS({__proto__:null,default:J},[de]);
vendor: 12,309 bytes, lines 2-4
2var nh={exports:{}},Ja={},ih={exports:{}},rh={};var _y;function jS(){return _y||(_y=1,(function(t){function e(j,F){var ae=j.length;j.push(F);e:for(;0<ae;){var Se=ae-1>>>1,ye=j[Se];if(0<l(ye,F))j[Se]=F,j[ae]=ye,ae=Se;else break e}}function i(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var F=j[0],ae=j.pop();if(ae!==F){j[0]=ae;e:for(var Se=0,ye=j.length,O=ye>>>1;Se<O;){var I=2*(Se+1)-1,$=j[I],Q=I+1,ne=j[Q];if(0>l($,ae))Q<ye&&0>l(ne,$)?(j[Se]=ne,j[Q]=ae,Se=Q):(j[Se]=$,j[I]=ae,Se=I);else if(Q<ye&&0>l(ne,ae))j[Se]=ne,j[Q]=ae,Se=Q;else break e}}return F}function l(j,F){var ae=j.sortIndex-F.sortIndex;return ae!==0?ae:j.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,h=c.now();t.unstable_now=function(){return c.now()-h}}var p=[],g=[],y=1,m=null,b=3,_=!1,S=!1,E=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function P(j){for(var F=i(g);F!==null;){if(F.callback===null)s(g);else if(F.startTime<=j)s(g),F.sortIndex=F.expirationTime,e(p,F);else break;F=i(g)}}function Z(j){if(E=!1,P(j),!S)if(i(p)!==null)S=!0,z||(z=!0,K());else{var F=i(g);F!==null&&se(Z,F.startTime-j)}}var z=!1,D=-1,Y=5,te=-1;function le(){return A?!0:!(t.unstable_now()-te<Y)}function V(){if(A=!1,z){var j=t.unstable_now();te=j;var F=!0;try{e:{S=!1,E&&(E=!1,x(D),D=-1),_=!0;var ae=b;try{t:{for(P(j),m=i(p);m!==null&&!(m.expirationTime>j&&le());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,b=m.priorityLevel;var ye=Se(m.expirationTime<=j);if(j=t.unstable_now(),typeof ye=="function"){m.callback=ye,P(j),F=!0;break t}m===i(p)&&s(p),P(j)}else s(p);m=i(p)}if(m!==null)F=!0;else{var O=i(g);O!==null&&se(Z,O.startTime-j),F=!1}}break e}finally{m=null,b=ae,_=!1}F=void 0}}finally{F?K():z=!1}}}var K;if(typeof k=="function")K=function(){k(V)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,pe=W.port2;W.port1.onmessage=V,K=function(){pe.postMessage(null)}}else K=function(){T(V,0)};function se(j,F){D=T(function(){j(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(j){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var ae=b;b=F;try{return j()}finally{b=ae}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(j,F){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ae=b;b=j;try{return F()}finally{b=ae}},t.unstable_scheduleCallback=function(j,F,ae){var Se=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Se+ae:Se):ae=Se,j){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ae+ye,j={id:y++,callback:F,priorityLevel:j,startTime:ae,expirationTime:ye,sortIndex:-1},ae>Se?(j.sortIndex=ae,e(g,j),i(p)===null&&j===i(g)&&(E?(x(D),D=-1):E=!0,se(Z,ae-Se))):(j.sortIndex=ye,e(p,j),S||_||(S=!0,z||(z=!0,K()))),j},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(j){var F=b;return function(){var ae=b;b=F;try{return j.apply(this,arguments)}finally{b=ae}}}})(rh)),rh}var wy;function DS(){return wy||(wy=1,ih.exports=jS()),ih.exports}var sh={exports:{}},wt={};var Sy;function LS(){if(Sy)return wt;Sy=1;var t=Ao();function e(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:p,containerInfo:g,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,wt.createPortal=function(p,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return u(p,g,null,y)},wt.flushSync=function(p){var g=c.T,y=s.p;try{if(c.T=null,s.p=2,p)return p()}finally{c.T=g,s.p=y,s.d.f()}},wt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(p,g))},wt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},wt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=h(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?s.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&s.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},wt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=h(g.as,g.crossOrigin);s.d.M(p,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&s.d.M(p)},wt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=h(y,g.crossOrigin);s.d.L(p,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},wt.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=h(g.as,g.crossOrigin);s.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else s.d.m(p)},wt.requestFormReset=function(p){s.d.r(p)},wt.unstable_batchedUpdates=function(p,g){return p(g)},wt.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},wt.useFormStatus=function(){return c.H.useHostTransitionStatus()},wt.version="19.2.5",wt}var Ey;function i0(){if(Ey)return sh.exports;Ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),sh.exports=LS(),sh.exports}var Ty;function MS(){if(Ty)return Ja;Ty=1;var t=DS(),e=Ao(),i=i0();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}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,a=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(a=r.return),n=r.return;while(n)}return r.tag===3?a: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 h(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(s(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,o=r;;){var f=a.return;if(f===null)break;var d=f.alternate;if(d===null){if(o=f.return,o!==null){a=o;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===a)return p(f),n;if(d===o)return p(f),r;d=d.sibling}throw Error(s(188))}if(a.return!==o.return)a=f,o=d;else{for(var v=!1,w=f.child;w;){if(w===a){v=!0,a=f,o=d;break}if(w===o){v=!0,o=f,a=d;break}w=w.sibling}if(!v){for(w=d.child;w;){if(w===a){v=!0,a=d,o=f;break}if(w===o){v=!0,o=d,a=f;break}w=w.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==o)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),k=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function K(n){return n===null||typeof n!="object"?null:(n=V&&n[V]||n["@@iterator"],typeof n=="function"?n:null)}var W=Symbol.for("react.client.reference");function pe(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===W?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case T:return"Profiler";case A:return"StrictMode";case Z:return"Suspense";case z:return"SuspenseList";case te:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case x:return(n._context.displayName||"Context")+".Consumer";case P:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return r=n.displayName||null,r!==null?r:pe(n.type)||"Memo";case Y:r=n._payload,n=n._init;try{return pe(n(r))}catch{}}return null}var se=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Se=[],ye=-1;function O(n){return{current:n}}function I(n){0>ye||(n.current=Se[ye],Se[ye]=null,ye--)}function $(n,r){ye++,Se[ye]=n.current,n.current=r}var Q=O(null),ne=O(null),he=O(null),ue=O(null);function ce(n,r){switch($(he,r),$(ne,n),$(Q,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Pm(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Pm(r),n=Hm(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(Q),$(Q,n)}function Ce(){I(Q),I(ne),I(he)}function Et(n){n.memoizedState!==null&&$(ue,n);var r=Q.current,a=Hm(r,n.type);r!==a&&($(ne,n),$(Q,a))}function Zt(n){ne.current===n&&(I(Q),I(ne)),ue.current===n&&(I(ue),Va._currentValue=ae)}var vt,ko;function fn(n){if(vt===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);vt=r&&r[1]||"",ko=-1<a.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+vt+n+ko}var ea=!1;function qr(n,r){if(!n||ea)return"";ea=!0;var a=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(B){var U=B}Reflect.construct(n,[],G)}else{try{G.call()}catch(B){U=B}n.call(G.prototype)}}else{try{throw Error()}catch(B){U=B}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 6,458 bytes, lines 4-9
4catch(B){if(B&&U&&typeof B.stack=="string")return[B.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),v=d[0],w=d[1];if(v&&w){var R=v.split(`
5`),M=w.split(`
6`);for(f=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;f<M.length&&!M[f].includes("DetermineComponentFrameRoot");)f++;if(o===R.length||f===M.length)for(o=R.length-1,f=M.length-1;1<=o&&0<=f&&R[o]!==M[f];)f--;for(;1<=o&&0<=f;o--,f--)if(R[o]!==M[f]){if(o!==1||f!==1)do if(o--,f--,0>f||R[o]!==M[f]){var H=`
7`+R[o].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=o&&0<=f);break}}}finally{ea=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?fn(a):""}function or(n,r){switch(n.tag){case 26:case 27:case 5:return fn(n.type);case 16:return fn("Lazy");case 13:return n.child!==r&&r!==null?fn("Suspense Fallback"):fn("Suspense");case 19:return fn("SuspenseList");case 0:case 15:return qr(n.type,!1);case 11:return qr(n.type.render,!1);case 1:return qr(n.type,!0);case 31:return fn("Activity");default:return""}}function ta(n){try{var r="",a=null;do r+=or(n,a),a=n,n=n.return;while(n);return r}catch(o){return`
8Error generating stack: `+o.message+`
9`+o.stack}}var $t=Object.prototype.hasOwnProperty,na=t.unstable_scheduleCallback,ia=t.unstable_cancelCallback,Tt=t.unstable_shouldYield,Si=t.unstable_requestPaint,At=t.unstable_now,Iu=t.unstable_getCurrentPriorityLevel,lr=t.unstable_ImmediatePriority,xo=t.unstable_UserBlockingPriority,ur=t.unstable_NormalPriority,ra=t.unstable_LowPriority,In=t.unstable_IdlePriority,No=t.log,Ei=t.unstable_setDisableYieldValue,cr=null,Rt=null;function hn(n){if(typeof No=="function"&&Ei(n),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(cr,n)}catch{}}var bt=Math.clz32?Math.clz32:Rn,qu=Math.log,sa=Math.LN2;function Rn(n){return n>>>=0,n===0?32:31-(qu(n)/sa|0)|0}var $r=256,Gr=262144,fr=4194304;function On(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 ve(n,r,a){var o=n.pendingLanes;if(o===0)return 0;var f=0,d=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var w=o&134217727;return w!==0?(o=w&~d,o!==0?f=On(o):(v&=w,v!==0?f=On(v):a||(a=w&~n,a!==0&&(f=On(a))))):(w=o&~d,w!==0?f=On(w):v!==0?f=On(v):a||(a=o&~n,a!==0&&(f=On(a)))),f===0?0:r!==0&&r!==f&&(r&d)===0&&(d=f&-f,a=r&-r,d>=a||d===32&&(a&4194048)!==0)?r:f}function Ge(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function at(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 _t(){var n=fr;return fr<<=1,(fr&62914560)===0&&(fr=4194304),n}function Ti(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function Ke(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Nt(n,r,a,o,f,d){var v=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var w=n.entanglements,R=n.expirationTimes,M=n.hiddenUpdates;for(a=v&~a;0<a;){var H=31-bt(a),G=1<<H;w[H]=0,R[H]=-1;var U=M[H];if(U!==null)for(M[H]=null,H=0;H<U.length;H++){var B=U[H];B!==null&&(B.lane&=-536870913)}a&=~G}o!==0&&hr(n,o,0),d!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=d&~(v&~r))}function hr(n,r,a){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-bt(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|a&261930}function jt(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var o=31-bt(a),f=1<<o;f&r|n[o]&r&&(n[o]|=r),a&=~f}}function Dt(n,r){var a=r&-r;return a=(a&42)!==0?1:Vr(a),(a&(n.suspendedLanes|r))!==0?0:a}function Vr(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 dn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function $u(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:uy(n.type))}function Ad(n,r){var a=F.p;try{return F.p=n,r()}finally{F.p=a}}var Ai=Math.random().toString(36).slice(2),ft="__reactFiber$"+Ai,Lt="__reactProps$"+Ai,Kr="__reactContainer$"+Ai,Gu="__reactEvents$"+Ai,y_="__reactListeners$"+Ai,v_="__reactHandles$"+Ai,Rd="__reactResources$"+Ai,aa="__reactMarker$"+Ai;function Vu(n){delete n[ft],delete n[Lt],delete n[Gu],delete n[y_],delete n[v_]}function Fr(n){var r=n[ft];if(r)return r;for(var a=n.parentNode;a;){if(r=a[Kr]||a[ft]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=Fm(n);n!==null;){if(a=n[ft])return a;n=Fm(n)}return r}n=a,a=n.parentNode}return null}function Yr(n){if(n=n[ft]||n[Kr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function oa(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Qr(n){var r=n[Rd];return r||(r=n[Rd]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ot(n){n[aa]=!0}var Od=new Set,Cd={};function dr(n,r){Jr(n,r),Jr(n+"Capture",r)}function Jr(n,r){for(Cd[n]=r,n=0;n<r.length;n++)Od.add(r[n])}var b_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),kd={},xd={};function __(n){return $t.call(xd,n)?!0:$t.call(kd,n)?!1:b_.test(n)?xd[n]=!0:(kd[n]=!0,!1)}function jo(n,r,a){if(__(r))if(a===null)n.removeAttribute(r);else{switch(typeof a){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,""+a)}}function Do(n,r,a){if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+a)}}function qn(n,r,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(r,a,""+o)}}function Wt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Nd(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function w_(n,r,a){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,d=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,d.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ku(n){if(!n._valueTracker){var r=Nd(n)?"checked":"value";n._valueTracker=w_(n,r,""+n[r])}}function jd(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),o="";return n&&(o=Nd(n)?n.checked?"true":"false":n.value),n=o,n!==a?(r.setValue(n),!0):!1}function Lo(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 S_=/[\n"\\]/g;function en(n){return n.replace(S_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Fu(n,r,a,o,f,d,v,w){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=""+Wt(r)):n.value!==""+Wt(r)&&(n.value=""+Wt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?Yu(n,v,Wt(r)):a!=null?Yu(n,v,Wt(a)):o!=null&&n.removeAttribute("value"),f==null&&d!=null&&(n.defaultChecked=!!d),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+Wt(w):n.removeAttribute("name")}function Dd(n,r,a,o,f,d,v,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(n.type=d),r!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||r!=null)){Ku(n);return}a=a!=null?""+Wt(a):"",r=r!=null?""+Wt(r):a,w||r===n.value||(n.value=r),n.defaultValue=r}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=w?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Ku(n)}function Yu(n,r,a){r==="number"&&Lo(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Xr(n,r,a,o){if(n=n.options,r){r={};for(var f=0;f<a.length;f++)r["$"+a[f]]=!0;for(a=0;a<n.length;a++)f=r.hasOwnProperty("$"+n[a].value),n[a].selected!==f&&(n[a].selected=f),f&&o&&(n[a].defaultSelected=!0)}else{for(a=""+Wt(a),r=null,f=0;f<n.length;f++){if(n[f].value===a){n[f].selected=!0,o&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function Ld(n,r,a){if(r!=null&&(r=""+Wt(r),r!==n.value&&(n.value=r),a==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=a!=null?""+Wt(a):""}function Md(n,r,a,o){if(r==null){if(o!=null){if(a!=null)throw Error(s(92));if(se(o)){if(1<o.length)throw Error(s(93));o=o[0]}a=o}a==null&&(a=""),r=a}a=Wt(r),n.defaultValue=a,o=n.textContent,o===a&&o!==""&&o!==null&&(n.value=o),Ku(n)}function Zr(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var E_=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 Ud(n,r,a){var o=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,a):typeof a!="number"||a===0||E_.has(r)?r==="float"?n.cssFloat=a:n[r]=(""+a).trim():n[r]=a+"px"}function zd(n,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var f in r)o=r[f],r.hasOwnProperty(f)&&a[f]!==o&&Ud(n,f,o)}else for(var d in r)r.hasOwnProperty(d)&&Ud(n,d,r[d])}function Qu(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 T_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),A_=/^[\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 Mo(n){return A_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function $n(){}var Ju=null;function Xu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Wr=null,es=null;function Bd(n){var r=Yr(n);if(r&&(n=r.stateNode)){var a=n[Lt]||null;e:switch(n=r.stateNode,r.type){case"input":if(Fu(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+en(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var o=a[r];if(o!==n&&o.form===n.form){var f=o[Lt]||null;if(!f)throw Error(s(90));Fu(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<a.length;r++)o=a[r],o.form===n.form&&jd(o)}break e;case"textarea":Ld(n,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Xr(n,!!a.multiple,r,!1)}}}var Zu=!1;function Pd(n,r,a){if(Zu)return n(r,a);Zu=!0;try{var o=n(r);return o}finally{if(Zu=!1,(Wr!==null||es!==null)&&(Sl(),Wr&&(r=Wr,n=es,es=Wr=null,Bd(r),n)))for(r=0;r<n.length;r++)Bd(n[r])}}function la(n,r){var a=n.stateNode;if(a===null)return null;var o=a[Lt]||null;if(o===null)return null;a=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(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=!1;if(Gn)try{var ua={};Object.defineProperty(ua,"passive",{get:function(){Wu=!0}}),window.addEventListener("test",ua,ua),window.removeEventListener("test",ua,ua)}catch{Wu=!1}
vendor: 3,180 bytes, line 9
9var Ri=null,ec=null,Uo=null;function Hd(){if(Uo)return Uo;var n,r=ec,a=r.length,o,f="value"in Ri?Ri.value:Ri.textContent,d=f.length;for(n=0;n<a&&r[n]===f[n];n++);var v=a-n;for(o=1;o<=v&&r[a-o]===f[d-o];o++);return Uo=f.slice(n,1<o?1-o:void 0)}function zo(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 Bo(){return!0}function Id(){return!1}function Mt(n){function r(a,o,f,d,v){this._reactName=a,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(a=n[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Bo:Id,this.isPropagationStopped=Id,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Bo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Bo)},persist:function(){},isPersistent:Bo}),r}var pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=Mt(pr),ca=m({},pr,{view:0,detail:0}),R_=Mt(ca),tc,nc,fa,Ho=m({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,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!==fa&&(fa&&n.type==="mousemove"?(tc=n.screenX-fa.screenX,nc=n.screenY-fa.screenY):nc=tc=0,fa=n),tc)},movementY:function(n){return"movementY"in n?n.movementY:nc}}),qd=Mt(Ho),O_=m({},Ho,{dataTransfer:0}),C_=Mt(O_),k_=m({},ca,{relatedTarget:0}),ic=Mt(k_),x_=m({},pr,{animationName:0,elapsedTime:0,pseudoElement:0}),N_=Mt(x_),j_=m({},pr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),D_=Mt(j_),L_=m({},pr,{data:0}),$d=Mt(L_),M_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},U_={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"},z_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B_(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=z_[n])?!!r[n]:!1}function rc(){return B_}var P_=m({},ca,{key:function(n){if(n.key){var r=M_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=zo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?U_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(n){return n.type==="keypress"?zo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?zo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),H_=Mt(P_),I_=m({},Ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gd=Mt(I_),q_=m({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),$_=Mt(q_),G_=m({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),V_=Mt(G_),K_=m({},Ho,{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}),F_=Mt(K_),Y_=m({},pr,{newState:0,oldState:0}),Q_=Mt(Y_),J_=[9,13,27,32],sc=Gn&&"CompositionEvent"in window,ha=null;Gn&&"documentMode"in document&&(ha=document.documentMode);var X_=Gn&&"TextEvent"in window&&!ha,Vd=Gn&&(!sc||ha&&8<ha&&11>=ha),Kd=" ",Fd=!1;function Yd(n,r){switch(n){case"keyup":return J_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ts=!1;function Z_(n,r){switch(n){case"compositionend":return Qd(r);case"keypress":return r.which!==32?null:(Fd=!0,Kd);case"textInput":return n=r.data,n===Kd&&Fd?null:n;default:return null}}function W_(n,r){if(ts)return n==="compositionend"||!sc&&Yd(n,r)?(n=Hd(),Uo=ec=Ri=null,ts=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Vd&&r.locale!=="ko"?null:r.data;default:return null}}var ew={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 Jd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!ew[n.type]:r==="textarea"}function Xd(n,r,a,o){Wr?es?es.push(o):es=[o]:Wr=o,r=kl(r,"onChange"),0<r.length&&(a=new Po("onChange","change",null,a,o),n.push({event:a,listeners:r}))}var da=null,pa=null;function tw(n){Dm(n,0)}function Io(n){var r=oa(n);if(jd(r))return n}function Zd(n,r){if(n==="change")return r}var Wd=!1;if(Gn){var ac;if(Gn){var oc="oninput"in document;if(!oc){var ep=document.createElement("div");ep.setAttribute("oninput","return;"),oc=typeof ep.oninput=="function"}ac=oc}else ac=!1;Wd=ac&&(!document.documentMode||9<document.documentMode)}function tp(){da&&(da.detachEvent("onpropertychange",np),pa=da=null)}function np(n){if(n.propertyName==="value"&&Io(pa)){var r=[];Xd(r,pa,n,Xu(n)),Pd(tw,r)}}function nw(n,r,a){n==="focusin"?(tp(),da=r,pa=a,da.attachEvent("onpropertychange",np)):n==="focusout"&&tp()}function iw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Io(pa)}function rw(n,r){if(n==="click")return Io(r)}function sw(n,r){if(n==="input"||n==="change")return Io(r)}function aw(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Gt=typeof Object.is=="function"?Object.is:aw;function ga(n,r){if(Gt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),o=Object.keys(r);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var f=a[o];if(!$t.call(r,f)||!Gt(n[f],r[f]))return!1}return!0}function ip(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function rp(n,r){var a=ip(n);n=0;for(var o;a;){if(a.nodeType===3){if(o=n+a.textContent.length,n<=r&&o>=r)return{node:a,offset:r-n};n=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ip(a)}}function sp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?sp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function ap(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Lo(n.document);r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Lo(n.document)}return r}function lc(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 ow=Gn&&"documentMode"in document&&11>=document.documentMode,ns=null,uc=null,ma=null,cc=!1;function op(n,r,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;cc||ns==null||ns!==Lo(o)||(o=ns,"selectionStart"in o&&lc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 16,402 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),ma&&ga(ma,o)||(ma=o,o=kl(uc,"onSelect"),0<o.length&&(r=new Po("onSelect","select",null,r,a),n.push({event:r,listeners:o}),r.target=ns)))}function gr(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var is={animationend:gr("Animation","AnimationEnd"),animationiteration:gr("Animation","AnimationIteration"),animationstart:gr("Animation","AnimationStart"),transitionrun:gr("Transition","TransitionRun"),transitionstart:gr("Transition","TransitionStart"),transitioncancel:gr("Transition","TransitionCancel"),transitionend:gr("Transition","TransitionEnd")},fc={},lp={};Gn&&(lp=document.createElement("div").style,"AnimationEvent"in window||(delete is.animationend.animation,delete is.animationiteration.animation,delete is.animationstart.animation),"TransitionEvent"in window||delete is.transitionend.transition);function mr(n){if(fc[n])return fc[n];if(!is[n])return n;var r=is[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in lp)return fc[n]=r[a];return n}var up=mr("animationend"),cp=mr("animationiteration"),fp=mr("animationstart"),lw=mr("transitionrun"),uw=mr("transitionstart"),cw=mr("transitioncancel"),hp=mr("transitionend"),dp=new Map,hc="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(" ");hc.push("scrollEnd");function pn(n,r){dp.set(n,r),dr(r,[n])}var qo=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)},tn=[],rs=0,dc=0;function $o(){for(var n=rs,r=dc=rs=0;r<n;){var a=tn[r];tn[r++]=null;var o=tn[r];tn[r++]=null;var f=tn[r];tn[r++]=null;var d=tn[r];if(tn[r++]=null,o!==null&&f!==null){var v=o.pending;v===null?f.next=f:(f.next=v.next,v.next=f),o.pending=f}d!==0&&pp(a,f,d)}}function Go(n,r,a,o){tn[rs++]=n,tn[rs++]=r,tn[rs++]=a,tn[rs++]=o,dc|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function pc(n,r,a,o){return Go(n,r,a,o),Vo(n)}function yr(n,r){return Go(n,null,null,r),Vo(n)}function pp(n,r,a){n.lanes|=a;var o=n.alternate;o!==null&&(o.lanes|=a);for(var f=!1,d=n.return;d!==null;)d.childLanes|=a,o=d.alternate,o!==null&&(o.childLanes|=a),d.tag===22&&(n=d.stateNode,n===null||n._visibility&1||(f=!0)),n=d,d=d.return;return n.tag===3?(d=n.stateNode,f&&r!==null&&(f=31-bt(a),n=d.hiddenUpdates,o=n[f],o===null?n[f]=[r]:o.push(r),r.lane=a|536870912),d):null}function Vo(n){if(50<Ba)throw Ba=0,Tf=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ss={};function fw(n,r,a,o){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=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 Vt(n,r,a,o){return new fw(n,r,a,o)}function gc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Vn(n,r){var a=n.alternate;return a===null?(a=Vt(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function gp(n,r){n.flags&=65011714;var a=n.alternate;return a===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=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,r=a.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Ko(n,r,a,o,f,d){var v=0;if(o=n,typeof n=="function")gc(n)&&(v=1);else if(typeof n=="string")v=mS(n,a,Q.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case te:return n=Vt(31,a,r,f),n.elementType=te,n.lanes=d,n;case E:return vr(a.children,f,d,r);case A:v=8,f|=24;break;case T:return n=Vt(12,a,r,f|2),n.elementType=T,n.lanes=d,n;case Z:return n=Vt(13,a,r,f),n.elementType=Z,n.lanes=d,n;case z:return n=Vt(19,a,r,f),n.elementType=z,n.lanes=d,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:v=10;break e;case x:v=9;break e;case P:v=11;break e;case D:v=14;break e;case Y:v=16,o=null;break e}v=29,a=Error(s(130,n===null?"null":typeof n,"")),o=null}return r=Vt(v,a,r,f),r.elementType=n,r.type=o,r.lanes=d,r}function vr(n,r,a,o){return n=Vt(7,n,o,r),n.lanes=a,n}function mc(n,r,a){return n=Vt(6,n,null,r),n.lanes=a,n}function mp(n){var r=Vt(18,null,null,0);return r.stateNode=n,r}function yc(n,r,a){return r=Vt(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var yp=new WeakMap;function nn(n,r){if(typeof n=="object"&&n!==null){var a=yp.get(n);return a!==void 0?a:(r={value:n,source:r,stack:ta(r)},yp.set(n,r),r)}return{value:n,source:r,stack:ta(r)}}var as=[],os=0,Fo=null,ya=0,rn=[],sn=0,Oi=null,Cn=1,kn="";function Kn(n,r){as[os++]=ya,as[os++]=Fo,Fo=n,ya=r}function vp(n,r,a){rn[sn++]=Cn,rn[sn++]=kn,rn[sn++]=Oi,Oi=n;var o=Cn;n=kn;var f=32-bt(o)-1;o&=~(1<<f),a+=1;var d=32-bt(r)+f;if(30<d){var v=f-f%5;d=(o&(1<<v)-1).toString(32),o>>=v,f-=v,Cn=1<<32-bt(r)+f|a<<f|o,kn=d+n}else Cn=1<<d|a<<f|o,kn=n}function vc(n){n.return!==null&&(Kn(n,1),vp(n,1,0))}function bc(n){for(;n===Fo;)Fo=as[--os],as[os]=null,ya=as[--os],as[os]=null;for(;n===Oi;)Oi=rn[--sn],rn[sn]=null,kn=rn[--sn],rn[sn]=null,Cn=rn[--sn],rn[sn]=null}function bp(n,r){rn[sn++]=Cn,rn[sn++]=kn,rn[sn++]=Oi,Cn=r.id,kn=r.overflow,Oi=n}var ht=null,qe=null,Oe=!1,Ci=null,an=!1,_c=Error(s(519));function ki(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw va(nn(r,n)),_c}function _p(n){var r=n.stateNode,a=n.type,o=n.memoizedProps;switch(r[ft]=n,r[Lt]=o,a){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(a=0;a<Ha.length;a++)Te(Ha[a],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Te("invalid",r),Dd(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Te("invalid",r);break;case"textarea":Te("invalid",r),Md(r,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||o.suppressHydrationWarning===!0||zm(r.textContent,a)?(o.popover!=null&&(Te("beforetoggle",r),Te("toggle",r)),o.onScroll!=null&&Te("scroll",r),o.onScrollEnd!=null&&Te("scrollend",r),o.onClick!=null&&(r.onclick=$n),r=!0):r=!1,r||ki(n,!0)}function wp(n){for(ht=n.return;ht;)switch(ht.tag){case 5:case 31:case 13:an=!1;return;case 27:case 3:an=!0;return;default:ht=ht.return}}function ls(n){if(n!==ht)return!1;if(!Oe)return wp(n),Oe=!0,!1;var r=n.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||Pf(n.type,n.memoizedProps)),a=!a),a&&qe&&ki(n),wp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));qe=Km(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));qe=Km(n)}else r===27?(r=qe,$i(n.type)?(n=Gf,Gf=null,qe=n):qe=r):qe=ht?ln(n.stateNode.nextSibling):null;return!0}function br(){qe=ht=null,Oe=!1}function wc(){var n=Ci;return n!==null&&(Pt===null?Pt=n:Pt.push.apply(Pt,n),Ci=null),n}function va(n){Ci===null?Ci=[n]:Ci.push(n)}var Sc=O(null),_r=null,Fn=null;function xi(n,r,a){$(Sc,r._currentValue),r._currentValue=a}function Yn(n){n._currentValue=Sc.current,I(Sc)}function Ec(n,r,a){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===a)break;n=n.return}}function Tc(n,r,a,o){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=f;for(var R=0;R<r.length;R++)if(w.context===r[R]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),Ec(d.return,a,n),o||(v=null);break e}d=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(s(341));v.lanes|=a,d=v.alternate,d!==null&&(d.lanes|=a),Ec(v,a,n),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===n){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function us(n,r,a,o){n=null;for(var f=r,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var w=f.type;Gt(f.pendingProps.value,v.value)||(n!==null?n.push(w):n=[w])}}else if(f===ue.current){if(v=f.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(Va):n=[Va])}f=f.return}n!==null&&Tc(r,n,a,o),r.flags|=262144}function Yo(n){for(n=n.firstContext;n!==null;){if(!Gt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function wr(n){_r=n,Fn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function dt(n){return Sp(_r,n)}function Qo(n,r){return _r===null&&wr(n),Sp(n,r)}function Sp(n,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Fn===null){if(n===null)throw Error(s(308));Fn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Fn=Fn.next=r;return a}var hw=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(a,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(a){return a()})}},dw=t.unstable_scheduleCallback,pw=t.unstable_NormalPriority,Ze={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ac(){return{controller:new hw,data:new Map,refCount:0}}function ba(n){n.refCount--,n.refCount===0&&dw(pw,function(){n.controller.abort()})}var _a=null,Rc=0,cs=0,fs=null;function gw(n,r){if(_a===null){var a=_a=[];Rc=0,cs=xf(),fs={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Rc++,r.then(Ep,Ep),r}function Ep(){if(--Rc===0&&_a!==null){fs!==null&&(fs.status="fulfilled");var n=_a;_a=null,cs=0,fs=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function mw(n,r){var a=[],o={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var f=0;f<a.length;f++)(0,a[f])(r)},function(f){for(o.status="rejected",o.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),o}var Tp=j.S;j.S=function(n,r){om=At(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&gw(n,r),Tp!==null&&Tp(n,r)};var Sr=O(null);function Oc(){var n=Sr.current;return n!==null?n:Pe.pooledCache}function Jo(n,r){r===null?$(Sr,Sr.current):$(Sr,r.pool)}function Ap(){var n=Oc();return n===null?null:{parent:Ze._currentValue,pool:n}}var hs=Error(s(460)),Cc=Error(s(474)),Xo=Error(s(542)),Zo={then:function(){}};function Rp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Op(n,r,a){switch(a=n[a],a===void 0?n.push(r):a!==r&&(r.then($n,$n),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,kp(n),n;default:if(typeof r.status=="string")r.then($n,$n);else{if(n=Pe,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=o}},function(o){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,kp(n),n}throw Tr=r,hs}}function Er(n){try{var r=n._init;return r(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Tr=a,hs):a}}var Tr=null;function Cp(){if(Tr===null)throw Error(s(459));var n=Tr;return Tr=null,n}function kp(n){if(n===hs||n===Xo)throw Error(s(483))}var ds=null,wa=0;function Wo(n){var r=wa;return wa+=1,ds===null&&(ds=[]),Op(ds,n,r)}function Sa(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function el(n,r){throw r.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function xp(n){function r(N,C){if(n){var L=N.deletions;L===null?(N.deletions=[C],N.flags|=16):L.push(C)}}function a(N,C){if(!n)return null;for(;C!==null;)r(N,C),C=C.sibling;return null}function o(N){for(var C=new Map;N!==null;)N.key!==null?C.set(N.key,N):C.set(N.index,N),N=N.sibling;return C}function f(N,C){return N=Vn(N,C),N.index=0,N.sibling=null,N}function d(N,C,L){return N.index=L,n?(L=N.alternate,L!==null?(L=L.index,L<C?(N.flags|=67108866,C):L):(N.flags|=67108866,C)):(N.flags|=1048576,C)}function v(N){return n&&N.alternate===null&&(N.flags|=67108866),N}function w(N,C,L,q){return C===null||C.tag!==6?(C=mc(L,N.mode,q),C.return=N,C):(C=f(C,L),C.return=N,C)}function R(N,C,L,q){var fe=L.type;return fe===E?H(N,C,L.props.children,q,L.key):C!==null&&(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Y&&Er(fe)===C.type)?(C=f(C,L.props),Sa(C,L),C.return=N,C):(C=Ko(L.type,L.key,L.props,null,N.mode,q),Sa(C,L),C.return=N,C)}function M(N,C,L,q){return C===null||C.tag!==4||C.stateNode.containerInfo!==L.containerInfo||C.stateNode.implementation!==L.implementation?(C=yc(L,N.mode,q),C.return=N,C):(C=f(C,L.children||[]),C.return=N,C)}function H(N,C,L,q,fe){return C===null||C.tag!==7?(C=vr(L,N.mode,q,fe),C.return=N,C):(C=f(C,L),C.return=N,C)}function G(N,C,L){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=mc(""+C,N.mode,L),C.return=N,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return L=Ko(C.type,C.key,C.props,null,N.mode,L),Sa(L,C),L.return=N,L;case S:return C=yc(C,N.mode,L),C.return=N,C;case Y:return C=Er(C),G(N,C,L)}if(se(C)||K(C))return C=vr(C,N.mode,L,null),C.return=N,C;if(typeof C.then=="function")return G(N,Wo(C),L);if(C.$$typeof===k)return G(N,Qo(N,C),L);el(N,C)}return null}function U(N,C,L,q){var fe=C!==null?C.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return fe!==null?null:w(N,C,""+L,q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case _:return L.key===fe?R(N,C,L,q):null;case S:return L.key===fe?M(N,C,L,q):null;case Y:return L=Er(L),U(N,C,L,q)}if(se(L)||K(L))return fe!==null?null:H(N,C,L,q,null);if(typeof L.then=="function")return U(N,C,Wo(L),q);if(L.$$typeof===k)return U(N,C,Qo(N,L),q);el(N,L)}return null}function B(N,C,L,q,fe){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return N=N.get(L)||null,w(C,N,""+q,fe);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return N=N.get(q.key===null?L:q.key)||null,R(C,N,q,fe);case S:return N=N.get(q.key===null?L:q.key)||null,M(C,N,q,fe);case Y:return q=Er(q),B(N,C,L,q,fe)}if(se(q)||K(q))return N=N.get(L)||null,H(C,N,q,fe,null);if(typeof q.then=="function")return B(N,C,L,Wo(q),fe);if(q.$$typeof===k)return B(N,C,L,Qo(C,q),fe);el(C,q)}return null}function ie(N,C,L,q){for(var fe=null,xe=null,oe=C,we=C=0,Re=null;oe!==null&&we<L.length;we++){oe.index>
vendor: 5,767 bytes, line 9
9we?(Re=oe,oe=null):Re=oe.sibling;var Ne=U(N,oe,L[we],q);if(Ne===null){oe===null&&(oe=Re);break}n&&oe&&Ne.alternate===null&&r(N,oe),C=d(Ne,C,we),xe===null?fe=Ne:xe.sibling=Ne,xe=Ne,oe=Re}if(we===L.length)return a(N,oe),Oe&&Kn(N,we),fe;if(oe===null){for(;we<L.length;we++)oe=G(N,L[we],q),oe!==null&&(C=d(oe,C,we),xe===null?fe=oe:xe.sibling=oe,xe=oe);return Oe&&Kn(N,we),fe}for(oe=o(oe);we<L.length;we++)Re=B(oe,N,we,L[we],q),Re!==null&&(n&&Re.alternate!==null&&oe.delete(Re.key===null?we:Re.key),C=d(Re,C,we),xe===null?fe=Re:xe.sibling=Re,xe=Re);return n&&oe.forEach(function(Yi){return r(N,Yi)}),Oe&&Kn(N,we),fe}function ge(N,C,L,q){if(L==null)throw Error(s(151));for(var fe=null,xe=null,oe=C,we=C=0,Re=null,Ne=L.next();oe!==null&&!Ne.done;we++,Ne=L.next()){oe.index>we?(Re=oe,oe=null):Re=oe.sibling;var Yi=U(N,oe,Ne.value,q);if(Yi===null){oe===null&&(oe=Re);break}n&&oe&&Yi.alternate===null&&r(N,oe),C=d(Yi,C,we),xe===null?fe=Yi:xe.sibling=Yi,xe=Yi,oe=Re}if(Ne.done)return a(N,oe),Oe&&Kn(N,we),fe;if(oe===null){for(;!Ne.done;we++,Ne=L.next())Ne=G(N,Ne.value,q),Ne!==null&&(C=d(Ne,C,we),xe===null?fe=Ne:xe.sibling=Ne,xe=Ne);return Oe&&Kn(N,we),fe}for(oe=o(oe);!Ne.done;we++,Ne=L.next())Ne=B(oe,N,we,Ne.value,q),Ne!==null&&(n&&Ne.alternate!==null&&oe.delete(Ne.key===null?we:Ne.key),C=d(Ne,C,we),xe===null?fe=Ne:xe.sibling=Ne,xe=Ne);return n&&oe.forEach(function(OS){return r(N,OS)}),Oe&&Kn(N,we),fe}function ze(N,C,L,q){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case _:e:{for(var fe=L.key;C!==null;){if(C.key===fe){if(fe=L.type,fe===E){if(C.tag===7){a(N,C.sibling),q=f(C,L.props.children),q.return=N,N=q;break e}}else if(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Y&&Er(fe)===C.type){a(N,C.sibling),q=f(C,L.props),Sa(q,L),q.return=N,N=q;break e}a(N,C);break}else r(N,C);C=C.sibling}L.type===E?(q=vr(L.props.children,N.mode,q,L.key),q.return=N,N=q):(q=Ko(L.type,L.key,L.props,null,N.mode,q),Sa(q,L),q.return=N,N=q)}return v(N);case S:e:{for(fe=L.key;C!==null;){if(C.key===fe)if(C.tag===4&&C.stateNode.containerInfo===L.containerInfo&&C.stateNode.implementation===L.implementation){a(N,C.sibling),q=f(C,L.children||[]),q.return=N,N=q;break e}else{a(N,C);break}else r(N,C);C=C.sibling}q=yc(L,N.mode,q),q.return=N,N=q}return v(N);case Y:return L=Er(L),ze(N,C,L,q)}if(se(L))return ie(N,C,L,q);if(K(L)){if(fe=K(L),typeof fe!="function")throw Error(s(150));return L=fe.call(L),ge(N,C,L,q)}if(typeof L.then=="function")return ze(N,C,Wo(L),q);if(L.$$typeof===k)return ze(N,C,Qo(N,L),q);el(N,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,C!==null&&C.tag===6?(a(N,C.sibling),q=f(C,L),q.return=N,N=q):(a(N,C),q=mc(L,N.mode,q),q.return=N,N=q),v(N)):a(N,C)}return function(N,C,L,q){try{wa=0;var fe=ze(N,C,L,q);return ds=null,fe}catch(oe){if(oe===hs||oe===Xo)throw oe;var xe=Vt(29,oe,null,N.mode);return xe.lanes=q,xe.return=N,xe}}}var Ar=xp(!0),Np=xp(!1),Ni=!1;function kc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xc(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 ji(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Di(n,r,a){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(je&2)!==0){var f=o.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),o.pending=r,r=Vo(n),pp(n,null,a),r}return Go(n,o,r,a),Vo(n)}function Ea(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,a|=o,r.lanes=a,jt(n,a)}}function Nc(n,r){var a=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var f=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,a=a.next}while(a!==null);d===null?f=d=r:d=d.next=r}else f=d=r;a={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}var jc=!1;function Ta(){if(jc){var n=fs;if(n!==null)throw n}}function Aa(n,r,a,o){jc=!1;var f=n.updateQueue;Ni=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var R=w,M=R.next;R.next=null,v===null?d=M:v.next=M,v=R;var H=n.alternate;H!==null&&(H=H.updateQueue,w=H.lastBaseUpdate,w!==v&&(w===null?H.firstBaseUpdate=M:w.next=M,H.lastBaseUpdate=R))}if(d!==null){var G=f.baseState;v=0,H=M=R=null,w=d;do{var U=w.lane&-536870913,B=U!==w.lane;if(B?(Ae&U)===U:(o&U)===U){U!==0&&U===cs&&(jc=!0),H!==null&&(H=H.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ie=n,ge=w;U=r;var ze=a;switch(ge.tag){case 1:if(ie=ge.payload,typeof ie=="function"){G=ie.call(ze,G,U);break e}G=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ge.payload,U=typeof ie=="function"?ie.call(ze,G,U):ie,U==null)break e;G=m({},G,U);break e;case 2:Ni=!0}}U=w.callback,U!==null&&(n.flags|=64,B&&(n.flags|=8192),B=f.callbacks,B===null?f.callbacks=[U]:B.push(U))}else B={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},H===null?(M=H=B,R=G):H=H.next=B,v|=U;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;B=w,w=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);H===null&&(R=G),f.baseState=R,f.firstBaseUpdate=M,f.lastBaseUpdate=H,d===null&&(f.shared.lanes=0),Bi|=v,n.lanes=v,n.memoizedState=G}}function jp(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function Dp(n,r){var a=n.callbacks;
vendor: 2,624 bytes, line 9
9if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)jp(a[n],r)}var ps=O(null),tl=O(0);function Lp(n,r){n=ii,$(tl,n),$(ps,r),ii=n|r.baseLanes}function Dc(){$(tl,ii),$(ps,ps.current)}function Lc(){ii=tl.current,I(ps),I(tl)}var Kt=O(null),on=null;function Li(n){var r=n.alternate;$(Je,Je.current&1),$(Kt,n),on===null&&(r===null||ps.current!==null||r.memoizedState!==null)&&(on=n)}function Mc(n){$(Je,Je.current),$(Kt,n),on===null&&(on=n)}function Mp(n){n.tag===22?($(Je,Je.current),$(Kt,n),on===null&&(on=n)):Mi()}function Mi(){$(Je,Je.current),$(Kt,Kt.current)}function Ft(n){I(Kt),on===n&&(on=null),I(Je)}var Je=O(0);function nl(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||qf(a)||$f(a)))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 Qn=0,_e=null,Me=null,We=null,il=!1,gs=!1,Rr=!1,rl=0,Ra=0,ms=null,yw=0;function Fe(){throw Error(s(321))}function Uc(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!Gt(n[a],r[a]))return!1;return!0}function zc(n,r,a,o,f,d){return Qn=d,_e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,j.H=n===null||n.memoizedState===null?vg:Zc,Rr=!1,d=a(o,f),Rr=!1,gs&&(d=zp(r,a,o,f)),Up(n),d}function Up(n){j.H=ka;var r=Me!==null&&Me.next!==null;if(Qn=0,We=Me=_e=null,il=!1,Ra=0,ms=null,r)throw Error(s(300));n===null||et||(n=n.dependencies,n!==null&&Yo(n)&&(et=!0))}function zp(n,r,a,o){_e=n;var f=0;do{if(gs&&(ms=null),Ra=0,gs=!1,25<=f)throw Error(s(301));if(f+=1,We=Me=null,n.updateQueue!=null){var d=n.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}j.H=bg,d=r(a,o)}while(gs);return d}function vw(){var n=j.H,r=n.useState()[0];return r=typeof r.then=="function"?Oa(r):r,n=n.useState()[0],(Me!==null?Me.memoizedState:null)!==n&&(_e.flags|=1024),r}function Bc(){var n=rl!==0;return rl=0,n}function Pc(n,r,a){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~a}function Hc(n){if(il){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}il=!1}Qn=0,We=Me=_e=null,gs=!1,Ra=rl=0,ms=null}function Ot(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?_e.memoizedState=We=n:We=We.next=n,We}
vendor: 5,856 bytes, line 9
9function Xe(){if(Me===null){var n=_e.alternate;n=n!==null?n.memoizedState:null}else n=Me.next;var r=We===null?_e.memoizedState:We.next;if(r!==null)We=r,Me=n;else{if(n===null)throw _e.alternate===null?Error(s(467)):Error(s(310));Me=n,n={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},We===null?_e.memoizedState=We=n:We=We.next=n}return We}function sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oa(n){var r=Ra;return Ra+=1,ms===null&&(ms=[]),n=Op(ms,n,r),r=_e,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,j.H=r===null||r.memoizedState===null?vg:Zc),n}function al(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Oa(n);if(n.$$typeof===k)return dt(n)}throw Error(s(438,String(n)))}function Ic(n){var r=null,a=_e.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var o=_e.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=sl(),_e.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(n),o=0;o<n;o++)a[o]=le;return r.index++,a}function Jn(n,r){return typeof r=="function"?r(n):r}function ol(n){var r=Xe();return qc(r,Me,n)}function qc(n,r,a){var o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=a;var f=n.baseQueue,d=o.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}r.baseQueue=f=d,o.pending=null}if(d=n.baseState,f===null)n.memoizedState=d;else{r=f.next;var w=v=null,R=null,M=r,H=!1;do{var G=M.lane&-536870913;if(G!==M.lane?(Ae&G)===G:(Qn&G)===G){var U=M.revertLane;if(U===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),G===cs&&(H=!0);else if((Qn&U)===U){M=M.next,U===cs&&(H=!0);continue}else G={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},R===null?(w=R=G,v=d):R=R.next=G,_e.lanes|=U,Bi|=U;G=M.action,Rr&&a(d,G),d=M.hasEagerState?M.eagerState:a(d,G)}else U={lane:G,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},R===null?(w=R=U,v=d):R=R.next=U,_e.lanes|=G,Bi|=G;M=M.next}while(M!==null&&M!==r);if(R===null?v=d:R.next=w,!Gt(d,n.memoizedState)&&(et=!0,H&&(a=fs,a!==null)))throw a;n.memoizedState=d,n.baseState=v,n.baseQueue=R,o.lastRenderedState=d}return f===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function $c(n){var r=Xe(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var o=a.dispatch,f=a.pending,d=r.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do d=n(d,v.action),v=v.next;while(v!==f);Gt(d,r.memoizedState)||(et=!0),r.memoizedState=d,r.baseQueue===null&&(r.baseState=d),a.lastRenderedState=d}return[d,o]}function Bp(n,r,a){var o=_e,f=Xe(),d=Oe;if(d){if(a===void 0)throw Error(s(407));a=a()}else a=r();var v=!Gt((Me||f).memoizedState,a);if(v&&(f.memoizedState=a,et=!0),f=f.queue,Kc(Ip.bind(null,o,f,n),[n]),f.getSnapshot!==r||v||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,ys(9,{destroy:void 0},Hp.bind(null,o,f,a,r),null),Pe===null)throw Error(s(349));d||(Qn&127)!==0||Pp(o,r,a)}return a}function Pp(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=_e.updateQueue,r===null?(r=sl(),_e.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function Hp(n,r,a,o){r.value=a,r.getSnapshot=o,qp(r)&&$p(n)}function Ip(n,r,a){return a(function(){qp(r)&&$p(n)})}function qp(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!Gt(n,a)}catch{return!0}}function $p(n){var r=yr(n,2);r!==null&&Ht(r,n,2)}function Gc(n){var r=Ot();if(typeof n=="function"){var a=n;if(n=a(),Rr){hn(!0);try{a()}finally{hn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:n},r}function Gp(n,r,a,o){return n.baseState=a,qc(n,Me,typeof o=="function"?o:Jn)}function bw(n,r,a,o,f){if(cl(n))throw Error(s(485));if(n=r.action,n!==null){var d={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};j.T!==null?a(!0):d.isTransition=!1,o(d),a=r.pending,a===null?(d.next=r.pending=d,Vp(r,d)):(d.next=a.next,r.pending=a.next=d)}}function Vp(n,r){var a=r.action,o=r.payload,f=n.state;if(r.isTransition){var d=j.T,v={};j.T=v;try{var w=a(f,o),R=j.S;R!==null&&R(v,w),Kp(n,r,w)}catch(M){Vc(n,r,M)}finally{d!==null&&v.types!==null&&(d.types=v.types),j.T=d}}else try{d=a(f,o),Kp(n,r,d)}catch(M){Vc(n,r,M)}}function Kp(n,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Fp(n,r,o)},function(o){return Vc(n,r,o)}):Fp(n,r,a)}function Fp(n,r,a){r.status="fulfilled",r.value=a,Yp(r),n.state=a,r=n.pending,r!==null&&(a=r.next,a===r?n.pending=null:(a=a.next,r.next=a,Vp(n,a)))}function Vc(n,r,a){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=a,Yp(r),r=r.next;while(r!==o)}n.action=null}function Yp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Qp(n,r){return r}function Jp(n,r){if(Oe){var a=Pe.formState;if(a!==null){e:{var o=_e;if(Oe){if(qe){t:{for(var f=qe,d=an;f.nodeType!==8;){if(!d){f=null;break t}if(f=ln(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){qe=ln(f.nextSibling),o=f.data==="F!";break e}}ki(o)}o=!1}o&&(r=a[0])}}return a=Ot(),a.memoizedState=a.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qp,lastRenderedState:r},a.queue=o,a=gg.bind(null,_e,o),o.dispatch=a,o=Gc(!1),d=Xc.bind(null,_e,!1,o.queue),o=Ot(),f={state:r,dispatch:null,action:n,pending:null},o.queue=f,a=bw.bind(null,_e,f,d,a),f.dispatch=a,o.memoizedState=n,[r,a,!1]}function Xp(n){var r=Xe();
vendor: 4,674 bytes, line 9
9return Zp(r,Me,n)}function Zp(n,r,a){if(r=qc(n,r,Qp)[0],n=ol(Jn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Oa(r)}catch(v){throw v===hs?Xo:v}else o=r;r=Xe();var f=r.queue,d=f.dispatch;return a!==r.memoizedState&&(_e.flags|=2048,ys(9,{destroy:void 0},_w.bind(null,f,a),null)),[o,d,n]}function _w(n,r){n.action=r}function Wp(n){var r=Xe(),a=Me;if(a!==null)return Zp(r,a,n);Xe(),r=r.memoizedState,a=Xe();var o=a.queue.dispatch;return a.memoizedState=n,[r,o,!1]}function ys(n,r,a,o){return n={tag:n,create:a,deps:o,inst:r,next:null},r=_e.updateQueue,r===null&&(r=sl(),_e.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=n.next=n:(o=a.next,a.next=n,n.next=o,r.lastEffect=n),n}function eg(){return Xe().memoizedState}function ll(n,r,a,o){var f=Ot();_e.flags|=n,f.memoizedState=ys(1|r,{destroy:void 0},a,o===void 0?null:o)}function ul(n,r,a,o){var f=Xe();o=o===void 0?null:o;var d=f.memoizedState.inst;Me!==null&&o!==null&&Uc(o,Me.memoizedState.deps)?f.memoizedState=ys(r,d,a,o):(_e.flags|=n,f.memoizedState=ys(1|r,d,a,o))}function tg(n,r){ll(8390656,8,n,r)}function Kc(n,r){ul(2048,8,n,r)}function ww(n){_e.flags|=4;var r=_e.updateQueue;if(r===null)r=sl(),_e.updateQueue=r,r.events=[n];else{var a=r.events;a===null?r.events=[n]:a.push(n)}}function ng(n){var r=Xe().memoizedState;return ww({ref:r,nextImpl:n}),function(){if((je&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function ig(n,r){return ul(4,2,n,r)}function rg(n,r){return ul(4,4,n,r)}function sg(n,r){if(typeof r=="function"){n=n();var a=r(n);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function ag(n,r,a){a=a!=null?a.concat([n]):null,ul(4,4,sg.bind(null,r,n),a)}function Fc(){}function og(n,r){var a=Xe();r=r===void 0?null:r;var o=a.memoizedState;return r!==null&&Uc(r,o[1])?o[0]:(a.memoizedState=[n,r],n)}function lg(n,r){var a=Xe();r=r===void 0?null:r;var o=a.memoizedState;if(r!==null&&Uc(r,o[1]))return o[0];if(o=n(),Rr){hn(!0);try{n()}finally{hn(!1)}}return a.memoizedState=[o,r],o}function Yc(n,r,a){return a===void 0||(Qn&1073741824)!==0&&(Ae&261930)===0?n.memoizedState=r:(n.memoizedState=a,n=um(),_e.lanes|=n,Bi|=n,a)}function ug(n,r,a,o){return Gt(a,r)?a:ps.current!==null?(n=Yc(n,a,o),Gt(n,r)||(et=!0),n):(Qn&42)===0||(Qn&1073741824)!==0&&(Ae&261930)===0?(et=!0,n.memoizedState=a):(n=um(),_e.lanes|=n,Bi|=n,r)}function cg(n,r,a,o,f){var d=F.p;F.p=d!==0&&8>d?d:8;var v=j.T,w={};j.T=w,Xc(n,!1,r,a);try{var R=f(),M=j.S;if(M!==null&&M(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=mw(R,o);Ca(n,r,H,Jt(n))}else Ca(n,r,o,Jt(n))}catch(G){Ca(n,r,{then:function(){},status:"rejected",reason:G},Jt())}finally{F.p=d,v!==null&&w.types!==null&&(v.types=w.types),j.T=v}}function Sw(){}function Qc(n,r,a,o){if(n.tag!==5)throw Error(s(476));var f=fg(n).queue;cg(n,f,r,ae,a===null?Sw:function(){return hg(n),a(o)})}function fg(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:ae},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function hg(n){var r=fg(n);r.next===null&&(r=n.alternate.memoizedState),Ca(n,r.next.queue,{},Jt())}function Jc(){return dt(Va)}function dg(){return Xe().memoizedState}function pg(){return Xe().memoizedState}function Ew(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var a=Jt();n=ji(a);var o=Di(r,n,a);o!==null&&(Ht(o,r,a),Ea(o,r,a)),r={cache:Ac()},n.payload=r;return}r=r.return}}function Tw(n,r,a){var o=Jt();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cl(n)?mg(r,a):(a=pc(n,r,a,o),a!==null&&(Ht(a,n,o),yg(a,r,o)))}function gg(n,r,a){var o=Jt();Ca(n,r,a,o)}function Ca(n,r,a,o){var f={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cl(n))mg(r,f);else{var d=n.alternate;if(n.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var v=r.lastRenderedState,w=d(v,a);if(f.hasEagerState=!0,f.eagerState=w,Gt(w,v))return Go(n,r,f,0),Pe===null&&$o(),!1}catch{}if(a=pc(n,r,f,o),a!==null)return Ht(a,n,o),yg(a,r,o),!0}return!1}function Xc(n,r,a,o){if(o={lane:2,revertLane:xf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},cl(n)){if(r)throw Error(s(479))}else r=pc(n,a,o,2),r!==null&&Ht(r,n,2)}function cl(n){var r=n.alternate;return n===_e||r!==null&&r===_e}function mg(n,r){gs=il=!0;var a=n.pending;
vendor: 6,578 bytes, line 9
9a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function yg(n,r,a){if((a&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,a|=o,r.lanes=a,jt(n,a)}}var ka={readContext:dt,use:al,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};ka.useEffectEvent=Fe;var vg={readContext:dt,use:al,useCallback:function(n,r){return Ot().memoizedState=[n,r===void 0?null:r],n},useContext:dt,useEffect:tg,useImperativeHandle:function(n,r,a){a=a!=null?a.concat([n]):null,ll(4194308,4,sg.bind(null,r,n),a)},useLayoutEffect:function(n,r){return ll(4194308,4,n,r)},useInsertionEffect:function(n,r){ll(4,2,n,r)},useMemo:function(n,r){var a=Ot();r=r===void 0?null:r;var o=n();if(Rr){hn(!0);try{n()}finally{hn(!1)}}return a.memoizedState=[o,r],o},useReducer:function(n,r,a){var o=Ot();if(a!==void 0){var f=a(r);if(Rr){hn(!0);try{a(r)}finally{hn(!1)}}}else f=r;return o.memoizedState=o.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},o.queue=n,n=n.dispatch=Tw.bind(null,_e,n),[o.memoizedState,n]},useRef:function(n){var r=Ot();return n={current:n},r.memoizedState=n},useState:function(n){n=Gc(n);var r=n.queue,a=gg.bind(null,_e,r);return r.dispatch=a,[n.memoizedState,a]},useDebugValue:Fc,useDeferredValue:function(n,r){var a=Ot();return Yc(a,n,r)},useTransition:function(){var n=Gc(!1);return n=cg.bind(null,_e,n.queue,!0,!1),Ot().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,a){var o=_e,f=Ot();if(Oe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),Pe===null)throw Error(s(349));(Ae&127)!==0||Pp(o,r,a)}f.memoizedState=a;var d={value:a,getSnapshot:r};return f.queue=d,tg(Ip.bind(null,o,d,n),[n]),o.flags|=2048,ys(9,{destroy:void 0},Hp.bind(null,o,d,a,r),null),a},useId:function(){var n=Ot(),r=Pe.identifierPrefix;if(Oe){var a=kn,o=Cn;a=(o&~(1<<32-bt(o)-1)).toString(32)+a,r="_"+r+"R_"+a,a=rl++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=yw++,r="_"+r+"r_"+a.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Jc,useFormState:Jp,useActionState:Jp,useOptimistic:function(n){var r=Ot();r.memoizedState=r.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Xc.bind(null,_e,!0,a),a.dispatch=r,[n,r]},useMemoCache:Ic,useCacheRefresh:function(){return Ot().memoizedState=Ew.bind(null,_e)},useEffectEvent:function(n){var r=Ot(),a={impl:n};return r.memoizedState=a,function(){if((je&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Zc={readContext:dt,use:al,useCallback:og,useContext:dt,useEffect:Kc,useImperativeHandle:ag,useInsertionEffect:ig,useLayoutEffect:rg,useMemo:lg,useReducer:ol,useRef:eg,useState:function(){return ol(Jn)},useDebugValue:Fc,useDeferredValue:function(n,r){var a=Xe();return ug(a,Me.memoizedState,n,r)},useTransition:function(){var n=ol(Jn)[0],r=Xe().memoizedState;return[typeof n=="boolean"?n:Oa(n),r]},useSyncExternalStore:Bp,useId:dg,useHostTransitionStatus:Jc,useFormState:Xp,useActionState:Xp,useOptimistic:function(n,r){var a=Xe();return Gp(a,Me,n,r)},useMemoCache:Ic,useCacheRefresh:pg};Zc.useEffectEvent=ng;var bg={readContext:dt,use:al,useCallback:og,useContext:dt,useEffect:Kc,useImperativeHandle:ag,useInsertionEffect:ig,useLayoutEffect:rg,useMemo:lg,useReducer:$c,useRef:eg,useState:function(){return $c(Jn)},useDebugValue:Fc,useDeferredValue:function(n,r){var a=Xe();return Me===null?Yc(a,n,r):ug(a,Me.memoizedState,n,r)},useTransition:function(){var n=$c(Jn)[0],r=Xe().memoizedState;return[typeof n=="boolean"?n:Oa(n),r]},useSyncExternalStore:Bp,useId:dg,useHostTransitionStatus:Jc,useFormState:Wp,useActionState:Wp,useOptimistic:function(n,r){var a=Xe();return Me!==null?Gp(a,Me,n,r):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:pg};bg.useEffectEvent=ng;function Wc(n,r,a,o){r=n.memoizedState,a=a(o,r),a=a==null?r:m({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var ef={enqueueSetState:function(n,r,a){n=n._reactInternals;var o=Jt(),f=ji(o);f.payload=r,a!=null&&(f.callback=a),r=Di(n,f,o),r!==null&&(Ht(r,n,o),Ea(r,n,o))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var o=Jt(),f=ji(o);f.tag=1,f.payload=r,a!=null&&(f.callback=a),r=Di(n,f,o),r!==null&&(Ht(r,n,o),Ea(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=Jt(),o=ji(a);o.tag=2,r!=null&&(o.callback=r),r=Di(n,o,a),r!==null&&(Ht(r,n,a),Ea(r,n,a))}};function _g(n,r,a,o,f,d,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,d,v):r.prototype&&r.prototype.isPureReactComponent?!ga(a,o)||!ga(f,d):!0}function wg(n,r,a,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,o),r.state!==n&&ef.enqueueReplaceState(r,r.state,null)}function Or(n,r){var a=r;if("ref"in r){a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}if(n=n.defaultProps){a===r&&(a=m({},a));for(var f in n)a[f]===void 0&&(a[f]=n[f])}return a}function Sg(n){qo(n)}function Eg(n){console.error(n)}function Tg(n){qo(n)}function fl(n,r){try{var a=n.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function Ag(n,r,a){try{var o=n.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function tf(n,r,a){return a=ji(a),a.tag=3,a.payload={element:null},a.callback=function(){fl(n,r)},a}function Rg(n){return n=ji(n),n.tag=3,n}function Og(n,r,a,o){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;n.payload=function(){return f(d)},n.callback=function(){Ag(r,a,o)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Ag(r,a,o),typeof f!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function Aw(n,r,a,o,f){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=a.alternate,r!==null&&us(r,a,f,!0),a=Kt.current,a!==null){switch(a.tag){case 31:case 13:return on===null?El():a.alternate===null&&Ye===0&&(Ye=3),a.flags&=-257,a.flags|=65536,a.lanes=f,o===Zo?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([o]):r.add(o),Of(n,o,f)),!1;
vendor: 10,508 bytes, line 9
9case 22:return a.flags|=65536,o===Zo?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([o]):a.add(o)),Of(n,o,f)),!1}throw Error(s(435,a.tag))}return Of(n,o,f),El(),!1}if(Oe)return r=Kt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,o!==_c&&(n=Error(s(422),{cause:o}),va(nn(n,a)))):(o!==_c&&(r=Error(s(423),{cause:o}),va(nn(r,a))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,o=nn(o,a),f=tf(n.stateNode,o,f),Nc(n,f),Ye!==4&&(Ye=2)),!1;var d=Error(s(520),{cause:o});if(d=nn(d,a),za===null?za=[d]:za.push(d),Ye!==4&&(Ye=2),r===null)return!0;o=nn(o,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,n=f&-f,a.lanes|=n,n=tf(a.stateNode,o,n),Nc(a,n),!1;case 1:if(r=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Pi===null||!Pi.has(d))))return a.flags|=65536,f&=-f,a.lanes|=f,f=Rg(f),Og(f,n,a,o),Nc(a,f),!1}a=a.return}while(a!==null);return!1}var nf=Error(s(461)),et=!1;function pt(n,r,a,o){r.child=n===null?Np(r,null,a,o):Ar(r,n.child,a,o)}function Cg(n,r,a,o,f){a=a.render;var d=r.ref;if("ref"in o){var v={};for(var w in o)w!=="ref"&&(v[w]=o[w])}else v=o;return wr(r),o=zc(n,r,a,v,d,f),w=Bc(),n!==null&&!et?(Pc(n,r,f),Xn(n,r,f)):(Oe&&w&&vc(r),r.flags|=1,pt(n,r,o,f),r.child)}function kg(n,r,a,o,f){if(n===null){var d=a.type;return typeof d=="function"&&!gc(d)&&d.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=d,xg(n,r,d,o,f)):(n=Ko(a.type,null,o,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(d=n.child,!ff(n,f)){var v=d.memoizedProps;if(a=a.compare,a=a!==null?a:ga,a(v,o)&&n.ref===r.ref)return Xn(n,r,f)}return r.flags|=1,n=Vn(d,o),n.ref=r.ref,n.return=r,r.child=n}function xg(n,r,a,o,f){if(n!==null){var d=n.memoizedProps;if(ga(d,o)&&n.ref===r.ref)if(et=!1,r.pendingProps=o=d,ff(n,f))(n.flags&131072)!==0&&(et=!0);else return r.lanes=n.lanes,Xn(n,r,f)}return rf(n,r,a,o,f)}function Ng(n,r,a,o){var f=o.children,d=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(d=d!==null?d.baseLanes|a:a,n!==null){for(o=r.child=n.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,r.child=null;return jg(n,r,d,a,o)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Jo(r,d!==null?d.cachePool:null),d!==null?Lp(r,d):Dc(),Mp(r);else return o=r.lanes=536870912,jg(n,r,d!==null?d.baseLanes|a:a,a,o)}else d!==null?(Jo(r,d.cachePool),Lp(r,d),Mi(),r.memoizedState=null):(n!==null&&Jo(r,null),Dc(),Mi());return pt(n,r,f,a),r.child}function xa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function jg(n,r,a,o,f){var d=Oc();return d=d===null?null:{parent:Ze._currentValue,pool:d},r.memoizedState={baseLanes:a,cachePool:d},n!==null&&Jo(r,null),Dc(),Mp(r),n!==null&&us(n,r,o,!0),r.childLanes=f,null}function hl(n,r){return r=pl({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Dg(n,r,a){return Ar(r,n.child,null,a),n=hl(r,r.pendingProps),n.flags|=2,Ft(r),r.memoizedState=null,n}function Rw(n,r,a){var o=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Oe){if(o.mode==="hidden")return n=hl(r,o),r.lanes=536870912,xa(null,n);if(Mc(r),(n=qe)?(n=Vm(n,an),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Oi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},a=mp(n),a.return=r,r.child=a,ht=r,qe=null)):n=null,n===null)throw ki(r);return r.lanes=536870912,null}return hl(r,o)}var d=n.memoizedState;if(d!==null){var v=d.dehydrated;if(Mc(r),f)if(r.flags&256)r.flags&=-257,r=Dg(n,r,a);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(et||us(n,r,a,!1),f=(a&n.childLanes)!==0,et||f){if(o=Pe,o!==null&&(v=Dt(o,a),v!==0&&v!==d.retryLane))throw d.retryLane=v,yr(n,v),Ht(o,n,v),nf;El(),r=Dg(n,r,a)}else n=d.treeContext,qe=ln(v.nextSibling),ht=r,Oe=!0,Ci=null,an=!1,n!==null&&bp(r,n),r=hl(r,o),r.flags|=4096;return r}return n=Vn(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function dl(n,r){var a=r.ref;if(a===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(r.flags|=4194816)}}function rf(n,r,a,o,f){return wr(r),a=zc(n,r,a,o,void 0,f),o=Bc(),n!==null&&!et?(Pc(n,r,f),Xn(n,r,f)):(Oe&&o&&vc(r),r.flags|=1,pt(n,r,a,f),r.child)}function Lg(n,r,a,o,f,d){return wr(r),r.updateQueue=null,a=zp(r,o,a,f),Up(n),o=Bc(),n!==null&&!et?(Pc(n,r,d),Xn(n,r,d)):(Oe&&o&&vc(r),r.flags|=1,pt(n,r,a,d),r.child)}function Mg(n,r,a,o,f){if(wr(r),r.stateNode===null){var d=ss,v=a.contextType;typeof v=="object"&&v!==null&&(d=dt(v)),d=new a(o,d),r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=ef,r.stateNode=d,d._reactInternals=r,d=r.stateNode,d.props=o,d.state=r.memoizedState,d.refs={},kc(r),v=a.contextType,d.context=typeof v=="object"&&v!==null?dt(v):ss,d.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Wc(r,a,v,o),d.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&ef.enqueueReplaceState(d,d.state,null),Aa(r,o,d,f),Ta(),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){d=r.stateNode;var w=r.memoizedProps,R=Or(a,w);d.props=R;var M=d.context,H=a.contextType;v=ss,typeof H=="object"&&H!==null&&(v=dt(H));var G=a.getDerivedStateFromProps;H=typeof G=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,H||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||M!==v)&&wg(r,d,o,v),Ni=!1;var U=r.memoizedState;d.state=U,Aa(r,o,d,f),Ta(),M=r.memoizedState,w||U!==M||Ni?(typeof G=="function"&&(Wc(r,a,G,o),M=r.memoizedState),(R=Ni||_g(r,a,R,o,U,M,v))?(H||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(r.flags|=4194308)):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=M),d.props=o,d.state=M,d.context=v,o=R):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{d=r.stateNode,xc(n,r),v=r.memoizedProps,H=Or(a,v),d.props=H,G=r.pendingProps,U=d.context,M=a.contextType,R=ss,typeof M=="object"&&M!==null&&(R=dt(M)),w=a.getDerivedStateFromProps,(M=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==G||U!==R)&&wg(r,d,o,R),Ni=!1,U=r.memoizedState,d.state=U,Aa(r,o,d,f),Ta();var B=r.memoizedState;v!==G||U!==B||Ni||n!==null&&n.dependencies!==null&&Yo(n.dependencies)?(typeof w=="function"&&(Wc(r,a,w,o),B=r.memoizedState),(H=Ni||_g(r,a,H,o,U,B,R)||n!==null&&n.dependencies!==null&&Yo(n.dependencies))?(M||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,B,R),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,B,R)),typeof d.componentDidUpdate=="function"&&(r.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=B),d.props=o,d.state=B,d.context=R,o=H):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),o=!1)}return d=o,dl(n,r),o=(r.flags&128)!==0,d||o?(d=r.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:d.render(),r.flags|=1,n!==null&&o?(r.child=Ar(r,n.child,null,f),r.child=Ar(r,null,a,f)):pt(n,r,a,f),r.memoizedState=d.state,n=r.child):n=Xn(n,r,f),n}function Ug(n,r,a,o){return br(),r.flags|=256,pt(n,r,a,o),r.child}var sf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function af(n){return{baseLanes:n,cachePool:Ap()}}function of(n,r,a){return n=n!==null?n.childLanes&~a:0,r&&(n|=Qt),n}function zg(n,r,a){var o=r.pendingProps,f=!1,d=(r.flags&128)!==0,v;if((v=d)||(v=n!==null&&n.memoizedState===null?!1:(Je.current&2)!==0),v&&(f=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Oe){if(f?Li(r):Mi(),(n=qe)?(n=Vm(n,an),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Oi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},a=mp(n),a.return=r,r.child=a,ht=r,qe=null)):n=null,n===null)throw ki(r);return $f(n)?r.lanes=32:r.lanes=536870912,null}var w=o.children;return o=o.fallback,f?(Mi(),f=r.mode,w=pl({mode:"hidden",children:w},f),o=vr(o,f,a,null),w.return=r,o.return=r,w.sibling=o,r.child=w,o=r.child,o.memoizedState=af(a),o.childLanes=of(n,v,a),r.memoizedState=sf,xa(null,o)):(Li(r),lf(r,w))}var R=n.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(d)r.flags&256?(Li(r),r.flags&=-257,r=uf(n,r,a)):r.memoizedState!==null?(Mi(),r.child=n.child,r.flags|=128,r=null):(Mi(),w=o.fallback,f=r.mode,o=pl({mode:"visible",children:o.children},f),w=vr(w,f,a,null),w.flags|=2,o.return=r,w.return=r,o.sibling=w,r.child=o,Ar(r,n.child,null,a),o=r.child,o.memoizedState=af(a),o.childLanes=of(n,v,a),r.memoizedState=sf,r=xa(null,o));else if(Li(r),$f(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var M=v.dgst;v=M,o=Error(s(419)),o.stack="",o.digest=v,va({value:o,source:null,stack:null}),r=uf(n,r,a)}else if(et||us(n,r,a,!1),v=(a&n.childLanes)!==0,et||v){if(v=Pe,v!==null&&(o=Dt(v,a),o!==0&&o!==R.retryLane))throw R.retryLane=o,yr(n,o),Ht(v,n,o),nf;
vendor: 5,385 bytes, line 9
9qf(w)||El(),r=uf(n,r,a)}else qf(w)?(r.flags|=192,r.child=n.child,r=null):(n=R.treeContext,qe=ln(w.nextSibling),ht=r,Oe=!0,Ci=null,an=!1,n!==null&&bp(r,n),r=lf(r,o.children),r.flags|=4096);return r}return f?(Mi(),w=o.fallback,f=r.mode,R=n.child,M=R.sibling,o=Vn(R,{mode:"hidden",children:o.children}),o.subtreeFlags=R.subtreeFlags&65011712,M!==null?w=Vn(M,w):(w=vr(w,f,a,null),w.flags|=2),w.return=r,o.return=r,o.sibling=w,r.child=o,xa(null,o),o=r.child,w=n.child.memoizedState,w===null?w=af(a):(f=w.cachePool,f!==null?(R=Ze._currentValue,f=f.parent!==R?{parent:R,pool:R}:f):f=Ap(),w={baseLanes:w.baseLanes|a,cachePool:f}),o.memoizedState=w,o.childLanes=of(n,v,a),r.memoizedState=sf,xa(n.child,o)):(Li(r),a=n.child,n=a.sibling,a=Vn(a,{mode:"visible",children:o.children}),a.return=r,a.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=a,r.memoizedState=null,a)}function lf(n,r){return r=pl({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function pl(n,r){return n=Vt(22,n,null,r),n.lanes=0,n}function uf(n,r,a){return Ar(r,n.child,null,a),n=lf(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Bg(n,r,a){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),Ec(n.return,r,a)}function cf(n,r,a,o,f,d){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:f,treeForkCount:d}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=a,v.tailMode=f,v.treeForkCount=d)}function Pg(n,r,a){var o=r.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var v=Je.current,w=(v&2)!==0;if(w?(v=v&1|2,r.flags|=128):v&=1,$(Je,v),pt(n,r,o,a),o=Oe?ya:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Bg(n,a,r);else if(n.tag===19)Bg(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(a=r.child,f=null;a!==null;)n=a.alternate,n!==null&&nl(n)===null&&(f=a),a=a.sibling;a=f,a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null),cf(r,!1,f,a,d,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&nl(n)===null){r.child=f;break}n=f.sibling,f.sibling=a,a=f,f=n}cf(r,!0,a,null,d,o);break;case"together":cf(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Xn(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Bi|=r.lanes,(a&r.childLanes)===0)if(n!==null){if(us(n,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,a=Vn(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=Vn(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function ff(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Yo(n)))}function Ow(n,r,a){switch(r.tag){case 3:ce(r,r.stateNode.containerInfo),xi(r,Ze,n.memoizedState.cache),br();break;case 27:case 5:Et(r);break;case 4:ce(r,r.stateNode.containerInfo);break;case 10:xi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Mc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(Li(r),r.flags|=128,null):(a&r.child.childLanes)!==0?zg(n,r,a):(Li(r),n=Xn(n,r,a),n!==null?n.sibling:null);Li(r);break;case 19:var f=(n.flags&128)!==0;if(o=(a&r.childLanes)!==0,o||(us(n,r,a,!1),o=(a&r.childLanes)!==0),f){if(o)return Pg(n,r,a);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),$(Je,Je.current),o)break;return null;case 22:return r.lanes=0,Ng(n,r,a,r.pendingProps);case 24:xi(r,Ze,n.memoizedState.cache)}return Xn(n,r,a)}function Hg(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps)et=!0;else{if(!ff(n,a)&&(r.flags&128)===0)return et=!1,Ow(n,r,a);et=(n.flags&131072)!==0}else et=!1,Oe&&(r.flags&1048576)!==0&&vp(r,ya,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Er(r.elementType),r.type=n,typeof n=="function")gc(n)?(o=Or(n,o),r.tag=1,r=Mg(null,r,n,o,a)):(r.tag=0,r=rf(null,r,n,o,a));else{if(n!=null){var f=n.$$typeof;if(f===P){r.tag=11,r=Cg(null,r,n,o,a);break e}else if(f===D){r.tag=14,r=kg(null,r,n,o,a);break e}}throw r=pe(n)||n,Error(s(306,r,""))}}return r;case 0:return rf(n,r,r.type,r.pendingProps,a);case 1:return o=r.type,f=Or(o,r.pendingProps),Mg(n,r,o,f,a);case 3:e:{if(ce(r,r.stateNode.containerInfo),n===null)throw Error(s(387));o=r.pendingProps;var d=r.memoizedState;f=d.element,xc(n,r),Aa(r,o,null,a);var v=r.memoizedState;if(o=v.cache,xi(r,Ze,o),o!==d.cache&&Tc(r,[Ze],a,!0),Ta(),o=v.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){r=Ug(n,r,o,a);break e}else if(o!==f){f=nn(Error(s(424)),r),va(f),r=Ug(n,r,o,a);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,qe=ln(n.firstChild),ht=r,Oe=!0,Ci=null,an=!0,a=Np(r,null,o,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(br(),o===f){r=Xn(n,r,a);break e}pt(n,r,o,a)}r=r.child}return r;case 26:return dl(n,r),n===null?(a=Xm(r.type,null,r.pendingProps,null))?r.memoizedState=a:Oe||(a=r.type,n=r.pen
vendor: 4,955 bytes, line 9
9dingProps,o=xl(he.current).createElement(a),o[ft]=r,o[Lt]=n,gt(o,a,n),ot(o),r.stateNode=o):r.memoizedState=Xm(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Et(r),n===null&&Oe&&(o=r.stateNode=Ym(r.type,r.pendingProps,he.current),ht=r,an=!0,f=qe,$i(r.type)?(Gf=f,qe=ln(o.firstChild)):qe=f),pt(n,r,r.pendingProps.children,a),dl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Oe&&((f=o=qe)&&(o=iS(o,r.type,r.pendingProps,an),o!==null?(r.stateNode=o,ht=r,qe=ln(o.firstChild),an=!1,f=!0):f=!1),f||ki(r)),Et(r),f=r.type,d=r.pendingProps,v=n!==null?n.memoizedProps:null,o=d.children,Pf(f,d)?o=null:v!==null&&Pf(f,v)&&(r.flags|=32),r.memoizedState!==null&&(f=zc(n,r,vw,null,null,a),Va._currentValue=f),dl(n,r),pt(n,r,o,a),r.child;case 6:return n===null&&Oe&&((n=a=qe)&&(a=rS(a,r.pendingProps,an),a!==null?(r.stateNode=a,ht=r,qe=null,n=!0):n=!1),n||ki(r)),null;case 13:return zg(n,r,a);case 4:return ce(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Ar(r,null,o,a):pt(n,r,o,a),r.child;case 11:return Cg(n,r,r.type,r.pendingProps,a);case 7:return pt(n,r,r.pendingProps,a),r.child;case 8:return pt(n,r,r.pendingProps.children,a),r.child;case 12:return pt(n,r,r.pendingProps.children,a),r.child;case 10:return o=r.pendingProps,xi(r,r.type,o.value),pt(n,r,o.children,a),r.child;case 9:return f=r.type._context,o=r.pendingProps.children,wr(r),f=dt(f),o=o(f),r.flags|=1,pt(n,r,o,a),r.child;case 14:return kg(n,r,r.type,r.pendingProps,a);case 15:return xg(n,r,r.type,r.pendingProps,a);case 19:return Pg(n,r,a);case 31:return Rw(n,r,a);case 22:return Ng(n,r,a,r.pendingProps);case 24:return wr(r),o=dt(Ze),n===null?(f=Oc(),f===null&&(f=Pe,d=Ac(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=a),f=d),r.memoizedState={parent:o,cache:f},kc(r),xi(r,Ze,f)):((n.lanes&a)!==0&&(xc(n,r),Aa(r,null,null,a),Ta()),f=n.memoizedState,d=r.memoizedState,f.parent!==o?(f={parent:o,cache:o},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),xi(r,Ze,o)):(o=d.cache,xi(r,Ze,o),o!==f.cache&&Tc(r,[Ze],a,!0))),pt(n,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Zn(n){n.flags|=4}function hf(n,r,a,o,f){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(dm())n.flags|=8192;else throw Tr=Zo,Cc}else n.flags&=-16777217}function Ig(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ny(r))if(dm())n.flags|=8192;else throw Tr=Zo,Cc}function gl(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?_t():536870912,n.lanes|=r,ws|=r)}function Na(n,r){if(!Oe)switch(n.tailMode){case"hidden":r=n.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function $e(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,o=0;if(r)for(var f=n.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=o,n.childLanes=a,r}function Cw(n,r,a){var o=r.pendingProps;switch(bc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(r),null;case 1:return $e(r),null;case 3:return a=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Yn(Ze),Ce(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(ls(r)?Zn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,wc())),$e(r),null;case 26:var f=r.type,d=r.memoizedState;return n===null?(Zn(r),d!==null?($e(r),Ig(r,d)):($e(r),hf(r,f,null,o,a))):d?d!==n.memoizedState?(Zn(r),$e(r),Ig(r,d)):($e(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&Zn(r),$e(r),hf(r,f,n,o,a)),null;case 27:if(Zt(r),a=he.current,f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Zn(r);else{if(!o){if(r.stateNode===null)throw Error(s(166));return $e(r),null}n=Q.current,ls(r)?_p(r):(n=Ym(f,o,a),r.stateNode=n,Zn(r))}return $e(r),null;case 5:if(Zt(r),f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Zn(r);else{if(!o){if(r.stateNode===null)throw Error(s(166));return $e(r),null}if(d=Q.current,ls(r))_p(r);else{var v=xl(he.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;
vendor: 25,447 bytes, line 9
9case"select":d=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?v.createElement(f,{is:o.is}):v.createElement(f)}}d[ft]=r,d[Lt]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)d.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=d;e:switch(gt(d,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Zn(r)}}return $e(r),hf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,a),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&Zn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(s(166));if(n=he.current,ls(r)){if(n=r.stateNode,a=r.memoizedProps,o=null,f=ht,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}n[ft]=r,n=!!(n.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||zm(n.nodeValue,a)),n||ki(r,!0)}else n=xl(n).createTextNode(o),n[ft]=r,r.stateNode=n}return $e(r),null;case 31:if(a=r.memoizedState,n===null||n.memoizedState!==null){if(o=ls(r),a!==null){if(n===null){if(!o)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ft]=r}else br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;$e(r),n=!1}else a=wc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return r.flags&256?(Ft(r),r):(Ft(r),null);if((r.flags&128)!==0)throw Error(s(558))}return $e(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=ls(r),o!==null&&o.dehydrated!==null){if(n===null){if(!f)throw Error(s(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[ft]=r}else br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;$e(r),f=!1}else f=wc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(Ft(r),r):(Ft(r),null)}return Ft(r),(r.flags&128)!==0?(r.lanes=a,r):(a=o!==null,n=n!==null&&n.memoizedState!==null,a&&(o=r.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),a!==n&&a&&(r.child.flags|=8192),gl(r,r.updateQueue),$e(r),null);case 4:return Ce(),n===null&&Lf(r.stateNode.containerInfo),$e(r),null;case 10:return Yn(r.type),$e(r),null;case 19:if(I(Je),o=r.memoizedState,o===null)return $e(r),null;if(f=(r.flags&128)!==0,d=o.rendering,d===null)if(f)Na(o,!1);else{if(Ye!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(d=nl(n),d!==null){for(r.flags|=128,Na(o,!1),n=d.updateQueue,r.updateQueue=n,gl(r,n),r.subtreeFlags=0,n=a,a=r.child;a!==null;)gp(a,n),a=a.sibling;return $(Je,Je.current&1|2),Oe&&Kn(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&At()>_l&&(r.flags|=128,f=!0,Na(o,!1),r.lanes=4194304)}else{if(!f)if(n=nl(d),n!==null){if(r.flags|=128,f=!0,n=n.updateQueue,r.updateQueue=n,gl(r,n),Na(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!Oe)return $e(r),null}else 2*At()-o.renderingStartTime>_l&&a!==536870912&&(r.flags|=128,f=!0,Na(o,!1),r.lanes=4194304);o.isBackwards?(d.sibling=r.child,r.child=d):(n=o.last,n!==null?n.sibling=d:r.child=d,o.last=d)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=At(),n.sibling=null,a=Je.current,$(Je,f?a&1|2:a&1),Oe&&Kn(r,o.treeForkCount),n):($e(r),null);case 22:case 23:return Ft(r),Lc(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(a&536870912)!==0&&(r.flags&128)===0&&($e(r),r.subtreeFlags&6&&(r.flags|=8192)):$e(r),a=r.updateQueue,a!==null&&gl(r,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048),n!==null&&I(Sr),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Yn(Ze),$e(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function kw(n,r){switch(bc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Yn(Ze),Ce(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Zt(r),null;case 31:if(r.memoizedState!==null){if(Ft(r),r.alternate===null)throw Error(s(340));br()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Ft(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));br()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return I(Je),null;case 4:return Ce(),null;case 10:return Yn(r.type),null;case 22:case 23:return Ft(r),Lc(),n!==null&&I(Sr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Yn(Ze),null;case 25:return null;default:return null}}function qg(n,r){switch(bc(r),r.tag){case 3:Yn(Ze),Ce();break;case 26:case 27:case 5:Zt(r);break;case 4:Ce();break;case 31:r.memoizedState!==null&&Ft(r);break;case 13:Ft(r);break;case 19:I(Je);break;case 10:Yn(r.type);break;case 22:case 23:Ft(r),Lc(),n!==null&&I(Sr);break;case 24:Yn(Ze)}}function ja(n,r){try{var a=r.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var f=o.next;a=f;do{if((a.tag&n)===n){o=void 0;var d=a.create,v=a.inst;o=d(),v.destroy=o}a=a.next}while(a!==f)}}catch(w){Le(r,r.return,w)}}function Ui(n,r,a){try{var o=r.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&n)===n){var v=o.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=r;var R=a,M=w;try{M()}catch(H){Le(f,R,H)}}}o=o.next}while(o!==d)}}catch(H){Le(r,r.return,H)}}function $g(n){var r=n.updateQueue;if(r!==null){var a=n.stateNode;try{Dp(r,a)}catch(o){Le(n,n.return,o)}}}function Gg(n,r,a){a.props=Or(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(o){Le(n,r,o)}}function Da(n,r){try{var a=n.ref;if(a!==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 a=="function"?n.refCleanup=a(o):a.current=o}}catch(f){Le(n,r,f)}}function xn(n,r){var a=n.ref,o=n.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(f){Le(n,r,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Le(n,r,f)}else a.current=null}function Vg(n){var r=n.type,a=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(f){Le(n,n.return,f)}}function df(n,r,a){try{var o=n.stateNode;Xw(o,n.type,a,r),o[Lt]=r}catch(f){Le(n,n.return,f)}}function Kg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&$i(n.type)||n.tag===4}function pf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Kg(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&&$i(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 gf(n,r,a){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(n),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=$n));else if(o!==4&&(o===27&&$i(n.type)&&(a=n.stateNode,r=null),n=n.child,n!==null))for(gf(n,r,a),n=n.sibling;n!==null;)gf(n,r,a),n=n.sibling}function ml(n,r,a){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?a.insertBefore(n,r):a.appendChild(n);else if(o!==4&&(o===27&&$i(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(ml(n,r,a),n=n.sibling;n!==null;)ml(n,r,a),n=n.sibling}function Fg(n){var r=n.stateNode,a=n.memoizedProps;try{for(var o=n.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);gt(r,o,a),r[ft]=n,r[Lt]=a}catch(d){Le(n,n.return,d)}}var Wn=!1,tt=!1,mf=!1,Yg=typeof WeakSet=="function"?WeakSet:Set,lt=null;function xw(n,r){if(n=n.containerInfo,zf=zl,n=ap(n),lc(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var v=0,w=-1,R=-1,M=0,H=0,G=n,U=null;t:for(;;){for(var B;G!==a||f!==0&&G.nodeType!==3||(w=v+f),G!==d||o!==0&&G.nodeType!==3||(R=v+o),G.nodeType===3&&(v+=G.nodeValue.length),(B=G.firstChild)!==null;)U=G,G=B;for(;;){if(G===n)break t;if(U===a&&++M===f&&(w=v),U===d&&++H===o&&(R=v),(B=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=B}a=w===-1||R===-1?null:{start:w,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bf={focusedElem:n,selectionRange:a},zl=!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,d=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(a=0;a<n.length;a++)f=n[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&d!==null){n=void 0,a=r,f=d.memoizedProps,d=d.memoizedState,o=a.stateNode;try{var ie=Or(a.type,f);n=o.getSnapshotBeforeUpdate(ie,d),o.__reactInternalSnapshotBeforeUpdate=n}catch(ge){Le(a,a.return,ge)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,a=n.nodeType,a===9)If(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":If(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(s(163))}if(n=r.sibling,n!==null){n.return=r.return,lt=n;break}lt=r.return}}function Qg(n,r,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:ti(n,a),o&4&&ja(5,a);break;case 1:if(ti(n,a),o&4)if(n=a.stateNode,r===null)try{n.componentDidMount()}catch(v){Le(a,a.return,v)}else{var f=Or(a.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(f,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Le(a,a.return,v)}}o&64&&$g(a),o&512&&Da(a,a.return);break;case 3:if(ti(n,a),o&64&&(n=a.updateQueue,n!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Dp(n,r)}catch(v){Le(a,a.return,v)}}break;case 27:r===null&&o&4&&Fg(a);case 26:case 5:ti(n,a),r===null&&o&4&&Vg(a),o&512&&Da(a,a.return);break;case 12:ti(n,a);break;case 31:ti(n,a),o&4&&Zg(n,a);break;case 13:ti(n,a),o&4&&Wg(n,a),o&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=Pw.bind(null,a),sS(n,a))));break;case 22:if(o=a.memoizedState!==null||Wn,!o){r=r!==null&&r.memoizedState!==null||tt,f=Wn;var d=tt;Wn=o,(tt=r)&&!d?ni(n,a,(a.subtreeFlags&8772)!==0):ti(n,a),Wn=f,tt=d}break;case 30:break;default:ti(n,a)}}function Jg(n){var r=n.alternate;r!==null&&(n.alternate=null,Jg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Vu(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 Ve=null,Ut=!1;function ei(n,r,a){for(a=a.child;a!==null;)Xg(n,r,a),a=a.sibling}function Xg(n,r,a){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(cr,a)}catch{}switch(a.tag){case 26:tt||xn(a,r),ei(n,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||xn(a,r);var o=Ve,f=Ut;$i(a.type)&&(Ve=a.stateNode,Ut=!1),ei(n,r,a),qa(a.stateNode),Ve=o,Ut=f;break;case 5:tt||xn(a,r);case 6:if(o=Ve,f=Ut,Ve=null,ei(n,r,a),Ve=o,Ut=f,Ve!==null)if(Ut)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(a.stateNode)}catch(d){Le(a,r,d)}else try{Ve.removeChild(a.stateNode)}catch(d){Le(a,r,d)}break;case 18:Ve!==null&&(Ut?(n=Ve,$m(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),ks(n)):$m(Ve,a.stateNode));break;case 4:o=Ve,f=Ut,Ve=a.stateNode.containerInfo,Ut=!0,ei(n,r,a),Ve=o,Ut=f;break;case 0:case 11:case 14:case 15:Ui(2,a,r),tt||Ui(4,a,r),ei(n,r,a);break;case 1:tt||(xn(a,r),o=a.stateNode,typeof o.componentWillUnmount=="function"&&Gg(a,r,o)),ei(n,r,a);break;case 21:ei(n,r,a);break;case 22:tt=(o=tt)||a.memoizedState!==null,ei(n,r,a),tt=o;break;default:ei(n,r,a)}}function Zg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ks(n)}catch(a){Le(r,r.return,a)}}}function Wg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ks(n)}catch(a){Le(r,r.return,a)}}function Nw(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Yg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Yg),r;default:throw Error(s(435,n.tag))}}function yl(n,r){var a=Nw(n);r.forEach(function(o){if(!a.has(o)){a.add(o);var f=Hw.bind(null,n,o);o.then(f,f)}})}function zt(n,r){var a=r.deletions;if(a!==null)for(var o=0;o<a.length;o++){var f=a[o],d=n,v=r,w=v;e:for(;w!==null;){switch(w.tag){case 27:if($i(w.type)){Ve=w.stateNode,Ut=!1;break e}break;case 5:Ve=w.stateNode,Ut=!1;break e;case 3:case 4:Ve=w.stateNode.containerInfo,Ut=!0;break e}w=w.return}if(Ve===null)throw Error(s(160));Xg(d,v,f),Ve=null,Ut=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)em(r,n),r=r.sibling}var gn=null;function em(n,r){var a=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:zt(r,n),Bt(n),o&4&&(Ui(3,n,n.return),ja(3,n),Ui(5,n,n.return));break;case 1:zt(r,n),Bt(n),o&512&&(tt||a===null||xn(a,a.return)),o&64&&Wn&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var f=gn;if(zt(r,n),Bt(n),o&512&&(tt||a===null||xn(a,a.return)),o&4){var d=a!==null?a.memoizedState:null;if(o=n.memoizedState,a===null)if(o===null)if(n.stateNode===null){e:{o=n.type,a=n.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[aa]||d[ft]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),gt(d,o,a),d[ft]=n,ot(d),o=d;break e;case"link":var v=ey("link","href",f).get(o+(a.href||""));if(v){for(var w=0;w<v.length;w++)if(d=v[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(w,1);break t}}d=f.createElement(o),gt(d,o,a),f.head.appendChild(d);break;case"meta":if(v=ey("meta","content",f).get(o+(a.content||""))){for(w=0;w<v.length;w++)if(d=v[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(w,1);break t}}d=f.createElement(o),gt(d,o,a),f.head.appendChild(d);break;default:throw Error(s(468,o))}d[ft]=n,ot(d),o=d}n.stateNode=o}else ty(f,n.type,n.stateNode);else n.stateNode=Wm(f,o,n.memoizedProps);else d!==o?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,o===null?ty(f,n.type,n.stateNode):Wm(f,o,n.memoizedProps)):o===null&&n.stateNode!==null&&df(n,n.memoizedProps,a.memoizedProps)}break;case 27:zt(r,n),Bt(n),o&512&&(tt||a===null||xn(a,a.return)),a!==null&&o&4&&df(n,n.memoizedProps,a.memoizedProps);break;case 5:if(zt(r,n),Bt(n),o&512&&(tt||a===null||xn(a,a.return)),n.flags&32){f=n.stateNode;try{Zr(f,"")}catch(ie){Le(n,n.return,ie)}}o&4&&n.stateNode!=null&&(f=n.memoizedProps,df(n,f,a!==null?a.memoizedProps:f)),o&1024&&(mf=!0);break;case 6:if(zt(r,n),Bt(n),o&4){if(n.stateNode===null)throw Error(s(162));o=n.memoizedProps,a=n.stateNode;try{a.nodeValue=o}catch(ie){Le(n,n.return,ie)}}break;case 3:if(Dl=null,f=gn,gn=Nl(r.containerInfo),zt(r,n),gn=f,Bt(n),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ks(r.containerInfo)}catch(ie){Le(n,n.return,ie)}mf&&(mf=!1,tm(n));break;case 4:o=gn,gn=Nl(n.stateNode.containerInfo),zt(r,n),Bt(n),gn=o;break;case 12:zt(r,n),Bt(n);break;case 31:zt(r,n),Bt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,yl(n,o)));break;case 13:zt(r,n),Bt(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bl=At()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,yl(n,o)));break;case 22:f=n.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,M=Wn,H=tt;if(Wn=M||f,tt=H||R,zt(r,n),tt=H,Wn=M,Bt(n),o&8192)e:for(r=n.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(a===null||R||Wn||tt||Cr(n)),a=null,r=n;;){if(r.tag===5||r.tag===26){if(a===null){R=a=r;try{if(d=R.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=R.stateNode;var G=R.memoizedProps.style,U=G!=null&&G.hasOwnProperty("display")?G.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){Le(R,R.return,ie)}}}else if(r.tag===6){if(a===null){R=r;try{R.stateNode.nodeValue=f?"":R.memoizedProps}catch(ie){Le(R,R.return,ie)}}}else if(r.tag===18){if(a===null){R=r;try{var B=R.stateNode;f?Gm(B,!0):Gm(R.stateNode,!1)}catch(ie){Le(R,R.return,ie)}}}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;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,yl(n,a))));break;case 19:zt(r,n),Bt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,yl(n,o)));break;case 30:break;case 21:break;default:zt(r,n),Bt(n)}}function Bt(n){var r=n.flags;if(r&2){try{for(var a,o=n.return;o!==null;){if(Kg(o)){a=o;break}o=o.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var f=a.stateNode,d=pf(n);ml(n,d,f);break;case 5:var v=a.stateNode;a.flags&32&&(Zr(v,""),a.flags&=-33);var w=pf(n);ml(n,w,v);break;case 3:case 4:var R=a.stateNode.containerInfo,M=pf(n);gf(n,M,R);break;default:throw Error(s(161))}}catch(H){Le(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function tm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;tm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function ti(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Qg(n,r.alternate,r),r=r.sibling}function Cr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Ui(4,r,r.return),Cr(r);break;case 1:xn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Gg(r,r.return,a),Cr(r);break;case 27:qa(r.stateNode);case 26:case 5:xn(r,r.return),Cr(r);break;case 22:r.memoizedState===null&&Cr(r);break;case 30:Cr(r);break;default:Cr(r)}n=n.sibling}}function ni(n,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,f=n,d=r,v=d.flags;switch(d.tag){case 0:case 11:case 15:ni(f,d,a),ja(4,d);break;case 1:if(ni(f,d,a),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(M){Le(o,o.return,M)}if(o=d,f=o.updateQueue,f!==null){var w=o.stateNode;try{var R=f.shared.hiddenCallbacks;if(R!==null)for(f.shared.hiddenCallbacks=null,f=0;f<R.length;f++)jp(R[f],w)}catch(M){Le(o,o.return,M)}}a&&v&64&&$g(d),Da(d,d.return);break;case 27:Fg(d);case 26:case 5:ni(f,d,a),a&&o===null&&v&4&&Vg(d),Da(d,d.return);break;case 12:ni(f,d,a);break;case 31:ni(f,d,a),a&&v&4&&Zg(f,d);break;case 13:ni(f,d,a),a&&v&4&&Wg(f,d);break;case 22:d.memoizedState===null&&ni(f,d,a),Da(d,d.return);break;case 30:break;default:ni(f,d,a)}r=r.sibling}}function yf(n,r){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&ba(a))}function vf(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ba(n))}function mn(n,r,a,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)nm(n,r,a,o),r=r.sibling}function nm(n,r,a,o){var f=r.flags;switch(r.tag){case 0:case 11:case 15:mn(n,r,a,o),f&2048&&ja(9,r);break;case 1:mn(n,r,a,o);break;case 3:mn(n,r,a,o),f&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ba(n)));break;case 12:if(f&2048){mn(n,r,a,o),n=r.stateNode;try{var d=r.memoizedProps,v=d.id,w=d.onPostCommit;typeof w=="function"&&w(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(R){Le(r,r.return,R)}}else mn(n,r,a,o);break;case 31:mn(n,r,a,o);break;case 13:mn(n,r,a,o);break;case 23:break;case 22:d=r.stateNode,v=r.alternate,r.memoizedState!==null?d._visibility&2?mn(n,r,a,o):La(n,r):d._visibility&2?mn(n,r,a,o):(d._visibility|=2,vs(n,r,a,o,(r.subtreeFlags&10256)!==0||!1)),f&2048&&yf(v,r);break;case 24:mn(n,r,a,o),f&2048&&vf(r.alternate,r);break;default:mn(n,r,a,o)}}function vs(n,r,a,o,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var d=n,v=r,w=a,R=o,M=v.flags;switch(v.tag){case 0:case 11:case 15:vs(d,v,w,R,f),ja(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?vs(d,v,w,R,f):La(d,v):(H._visibility|=2,vs(d,v,w,R,f)),f&&M&2048&&yf(v.alternate,v);break;case 24:vs(d,v,w,R,f),f&&M&2048&&vf(v.alternate,v);break;default:vs(d,v,w,R,f)}r=r.sibling}}function La(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=n,o=r,f=o.flags;switch(o.tag){case 22:La(a,o),f&2048&&yf(o.alternate,o);break;case 24:La(a,o),f&2048&&vf(o.alternate,o);break;default:La(a,o)}r=r.sibling}}var Ma=8192;function bs(n,r,a){if(n.subtreeFlags&Ma)for(n=n.child;n!==null;)im(n,r,a),n=n.sibling}function im(n,r,a){switch(n.tag){case 26:bs(n,r,a),n.flags&Ma&&n.memoizedState!==null&&yS(a,gn,n.memoizedState,n.memoizedProps);break;case 5:bs(n,r,a);break;case 3:case 4:var o=gn;gn=Nl(n.stateNode.containerInfo),bs(n,r,a),gn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=Ma,Ma=16777216,bs(n,r,a),Ma=o):bs(n,r,a));break;default:bs(n,r,a)}}function rm(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 Ua(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];lt=o,am(o,n)}rm(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)sm(n),n=n.sibling}function sm(n){switch(n.tag){case 0:case 11:case 15:Ua(n),n.flags&2048&&Ui(9,n,n.return);break;case 3:Ua(n);break;case 12:Ua(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,vl(n)):Ua(n);break;default:Ua(n)}}function vl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];lt=o,am(o,n)}rm(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Ui(8,r,r.return),vl(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,vl(r));break;default:vl(r)}n=n.sibling}}function am(n,r){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:Ui(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ba(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,lt=o;else e:for(a=n;lt!==null;){o=lt;var f=o.sibling,d=o.return;if(Jg(o),o===a){lt=null;break e}if(f!==null){f.return=d,lt=f;break e}lt=d}}}var jw={getCacheForType:function(n){var r=dt(Ze),a=r.data.get(n);return a===void 0&&(a=n(),r.data.set(n,a)),a},cacheSignal:function(){return dt(Ze).controller.signal}},Dw=typeof WeakMap=="function"?WeakMap:Map,je=0,Pe=null,Ee=null,Ae=0,De=0,Yt=null,zi=!1,_s=!1,bf=!1,ii=0,Ye=0,Bi=0,kr=0,_f=0,Qt=0,ws=0,za=null,Pt=null,wf=!1,bl=0,om=0,_l=1/0,wl=null,Pi=null,rt=0,Hi=null,Ss=null,ri=0,Sf=0,Ef=null,lm=null,Ba=0,Tf=null;function Jt(){return(je&2)!==0&&Ae!==0?Ae&-Ae:j.T!==null?xf():$u()}function um(){if(Qt===0)if((Ae&536870912)===0||Oe){var n=Gr;Gr<<=1,(Gr&3932160)===0&&(Gr=262144),Qt=n}else Qt=536870912;return n=Kt.current,n!==null&&(n.flags|=32),Qt}function Ht(n,r,a){(n===Pe&&(De===2||De===9)||n.cancelPendingCommit!==null)&&(Es(n,0),Ii(n,Ae,Qt,!1)),Ke(n,a),((je&2)===0||n!==Pe)&&(n===Pe&&((je&2)===0&&(kr|=a),Ye===4&&Ii(n,Ae,Qt,!1)),Nn(n))}function cm(n,r,a){if((je&6)!==0)throw Error(s(327));var o=!a&&(r&127)===0&&(r&n.expiredLanes)===0||Ge(n,r),f=o?Uw(n,r):Rf(n,r,!0),d=o;do{if(f===0){_s&&!o&&Ii(n,r,0,!1);break}else{if(a=n.current.alternate,d&&!Lw(a)){f=Rf(n,r,!1),d=!1;continue}if(f===2){if(d=r,n.errorRecoveryDisabledLanes&d)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var w=n;
vendor: 13,769 bytes, line 9
9f=za;var R=w.current.memoizedState.isDehydrated;if(R&&(Es(w,v).flags|=256),v=Rf(w,v,!1),v!==2){if(bf&&!R){w.errorRecoveryDisabledLanes|=d,kr|=d,f=4;break e}d=Pt,Pt=f,d!==null&&(Pt===null?Pt=d:Pt.push.apply(Pt,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){Es(n,0),Ii(n,r,0,!0);break}e:{switch(o=n,d=f,d){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Ii(o,r,Qt,!zi);break e;case 2:Pt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(f=bl+300-At(),10<f)){if(Ii(o,r,Qt,!zi),ve(o,0,!0)!==0)break e;ri=r,o.timeoutHandle=Im(fm.bind(null,o,a,Pt,wl,wf,r,Qt,kr,ws,zi,d,"Throttled",-0,0),f);break e}fm(o,a,Pt,wl,wf,r,Qt,kr,ws,zi,d,null,-0,0)}}break}while(!0);Nn(n)}function fm(n,r,a,o,f,d,v,w,R,M,H,G,U,B){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:$n},im(r,d,G);var ie=(d&62914560)===d?bl-At():(d&4194048)===d?om-At():0;if(ie=vS(G,ie),ie!==null){ri=d,n.cancelPendingCommit=ie(bm.bind(null,n,r,d,a,o,f,v,w,R,H,G,null,U,B)),Ii(n,d,v,!M);return}}bm(n,r,d,a,o,f,v,w,R)}function Lw(n){for(var r=n;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var f=a[o],d=f.getSnapshot;f=f.value;try{if(!Gt(d(),f))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;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 Ii(n,r,a,o){r&=~_f,r&=~kr,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var f=r;0<f;){var d=31-bt(f),v=1<<d;o[d]=-1,f&=~v}a!==0&&hr(n,a,r)}function Sl(){return(je&6)===0?(Pa(0),!1):!0}function Af(){if(Ee!==null){if(De===0)var n=Ee.return;else n=Ee,Fn=_r=null,Hc(n),ds=null,wa=0,n=Ee;for(;n!==null;)qg(n.alternate,n),n=n.return;Ee=null}}function Es(n,r){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,eS(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),ri=0,Af(),Pe=n,Ee=a=Vn(n.current,null),Ae=r,De=0,Yt=null,zi=!1,_s=Ge(n,r),bf=!1,ws=Qt=_f=kr=Bi=Ye=0,Pt=za=null,wf=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var f=31-bt(o),d=1<<f;r|=n[f],o&=~d}return ii=r,$o(),a}function hm(n,r){_e=null,j.H=ka,r===hs||r===Xo?(r=Cp(),De=3):r===Cc?(r=Cp(),De=4):De=r===nf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Yt=r,Ee===null&&(Ye=1,fl(n,nn(r,n.current)))}function dm(){var n=Kt.current;return n===null?!0:(Ae&4194048)===Ae?on===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?n===on:!1}function pm(){var n=j.H;return j.H=ka,n===null?ka:n}function gm(){var n=j.A;return j.A=jw,n}function El(){Ye=4,zi||(Ae&4194048)!==Ae&&Kt.current!==null||(_s=!0),(Bi&134217727)===0&&(kr&134217727)===0||Pe===null||Ii(Pe,Ae,Qt,!1)}function Rf(n,r,a){var o=je;je|=2;var f=pm(),d=gm();(Pe!==n||Ae!==r)&&(wl=null,Es(n,r)),r=!1;var v=Ye;e:do try{if(De!==0&&Ee!==null){var w=Ee,R=Yt;switch(De){case 8:Af(),v=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(r=!0);var M=De;if(De=0,Yt=null,Ts(n,w,R,M),a&&_s){v=0;break e}break;default:M=De,De=0,Yt=null,Ts(n,w,R,M)}}Mw(),v=Ye;break}catch(H){hm(n,H)}while(!0);return r&&n.shellSuspendCounter++,Fn=_r=null,je=o,j.H=f,j.A=d,Ee===null&&(Pe=null,Ae=0,$o()),v}function Mw(){for(;Ee!==null;)mm(Ee)}function Uw(n,r){var a=je;je|=2;var o=pm(),f=gm();Pe!==n||Ae!==r?(wl=null,_l=At()+500,Es(n,r)):_s=Ge(n,r);e:do try{if(De!==0&&Ee!==null){r=Ee;var d=Yt;t:switch(De){case 1:De=0,Yt=null,Ts(n,r,d,1);break;case 2:case 9:if(Rp(d)){De=0,Yt=null,ym(r);break}r=function(){De!==2&&De!==9||Pe!==n||(De=7),Nn(n)},d.then(r,r);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Rp(d)?(De=0,Yt=null,ym(r)):(De=0,Yt=null,Ts(n,r,d,7));break;case 5:var v=null;switch(Ee.tag){case 26:v=Ee.memoizedState;case 5:case 27:var w=Ee;if(v?ny(v):w.stateNode.complete){De=0,Yt=null;var R=w.sibling;if(R!==null)Ee=R;else{var M=w.return;M!==null?(Ee=M,Tl(M)):Ee=null}break t}}De=0,Yt=null,Ts(n,r,d,5);break;case 6:De=0,Yt=null,Ts(n,r,d,6);break;case 8:Af(),Ye=6;break e;default:throw Error(s(462))}}zw();break}catch(H){hm(n,H)}while(!0);return Fn=_r=null,j.H=o,j.A=f,je=a,Ee!==null?0:(Pe=null,Ae=0,$o(),Ye)}function zw(){for(;Ee!==null&&!Tt();)mm(Ee)}function mm(n){var r=Hg(n.alternate,n,ii);n.memoizedProps=n.pendingProps,r===null?Tl(n):Ee=r}function ym(n){var r=n,a=r.alternate;switch(r.tag){case 15:case 0:r=Lg(a,r,r.pendingProps,r.type,void 0,Ae);break;case 11:r=Lg(a,r,r.pendingProps,r.type.render,r.ref,Ae);break;case 5:Hc(r);default:qg(a,r),r=Ee=gp(r,ii),r=Hg(a,r,ii)}n.memoizedProps=n.pendingProps,r===null?Tl(n):Ee=r}function Ts(n,r,a,o){Fn=_r=null,Hc(r),ds=null,wa=0;var f=r.return;try{if(Aw(n,f,r,a,Ae)){Ye=1,fl(n,nn(a,n.current)),Ee=null;return}}catch(d){if(f!==null)throw Ee=f,d;Ye=1,fl(n,nn(a,n.current)),Ee=null;return}r.flags&32768?(Oe||o===1?n=!0:_s||(Ae&536870912)!==0?n=!1:(zi=n=!0,(o===2||o===9||o===3||o===6)&&(o=Kt.current,o!==null&&o.tag===13&&(o.flags|=16384))),vm(r,n)):Tl(r)}function Tl(n){var r=n;do{if((r.flags&32768)!==0){vm(r,zi);return}n=r.return;var a=Cw(r.alternate,r,ii);if(a!==null){Ee=a;return}if(r=r.sibling,r!==null){Ee=r;return}Ee=r=n}while(r!==null);Ye===0&&(Ye=5)}function vm(n,r){do{var a=kw(n.alternate,n);if(a!==null){a.flags&=32767,Ee=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(n=n.sibling,n!==null)){Ee=n;return}Ee=n=a}while(n!==null);Ye=6,Ee=null}function bm(n,r,a,o,f,d,v,w,R){n.cancelPendingCommit=null;do Al();while(rt!==0);if((je&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(d=r.lanes|r.childLanes,d|=dc,Nt(n,a,d,v,w,R),n===Pe&&(Ee=Pe=null,Ae=0),Ss=r,Hi=n,ri=a,Sf=d,Ef=f,lm=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Iw(ur,function(){return Tm(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=j.T,j.T=null,f=F.p,F.p=2,v=je,je|=4;try{xw(n,r,a)}finally{je=v,F.p=f,j.T=o}}rt=1,_m(),wm(),Sm()}}function _m(){if(rt===1){rt=0;var n=Hi,r=Ss,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var o=F.p;F.p=2;var f=je;je|=4;try{em(r,n);var d=Bf,v=ap(n.containerInfo),w=d.focusedElem,R=d.selectionRange;if(v!==w&&w&&w.ownerDocument&&sp(w.ownerDocument.documentElement,w)){if(R!==null&&lc(w)){var M=R.start,H=R.end;if(H===void 0&&(H=M),"selectionStart"in w)w.selectionStart=M,w.selectionEnd=Math.min(H,w.value.length);else{var G=w.ownerDocument||document,U=G&&G.defaultView||window;if(U.getSelection){var B=U.getSelection(),ie=w.textContent.length,ge=Math.min(R.start,ie),ze=R.end===void 0?ge:Math.min(R.end,ie);!B.extend&&ge>ze&&(v=ze,ze=ge,ge=v);var N=rp(w,ge),C=rp(w,ze);if(N&&C&&(B.rangeCount!==1||B.anchorNode!==N.node||B.anchorOffset!==N.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var L=G.createRange();L.setStart(N.node,N.offset),B.removeAllRanges(),ge>ze?(B.addRange(L),B.extend(C.node,C.offset)):(L.setEnd(C.node,C.offset),B.addRange(L))}}}}for(G=[],B=w;B=B.parentNode;)B.nodeType===1&&G.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<G.length;w++){var q=G[w];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}zl=!!zf,Bf=zf=null}finally{je=f,F.p=o,j.T=a}}n.current=r,rt=2}}function wm(){if(rt===2){rt=0;var n=Hi,r=Ss,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var o=F.p;F.p=2;var f=je;je|=4;try{Qg(n,r.alternate,r)}finally{je=f,F.p=o,j.T=a}}rt=3}}function Sm(){if(rt===4||rt===3){rt=0,Si();var n=Hi,r=Ss,a=ri,o=lm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?rt=5:(rt=0,Ss=Hi=null,Em(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(Pi=null),dn(a),r=r.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(cr,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=j.T,f=F.p,F.p=2,j.T=null;try{for(var d=n.onRecoverableError,v=0;v<o.length;v++){var w=o[v];d(w.value,{componentStack:w.stack})}}finally{j.T=r,F.p=f}}(ri&3)!==0&&Al(),Nn(n),f=n.pendingLanes,(a&261930)!==0&&(f&42)!==0?n===Tf?Ba++:(Ba=0,Tf=n):Ba=0,Pa(0)}}function Em(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,ba(r)))}function Al(){return _m(),wm(),Sm(),Tm()}function Tm(){if(rt!==5)return!1;var n=Hi,r=Sf;Sf=0;var a=dn(ri),o=j.T,f=F.p;try{F.p=32>a?32:a,j.T=null,a=Ef,Ef=null;var d=Hi,v=ri;if(rt=0,Ss=Hi=null,ri=0,(je&6)!==0)throw Error(s(331));var w=je;if(je|=4,sm(d.current),nm(d,d.current,v,a),je=w,Pa(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(cr,d)}catch{}return!0}finally{F.p=f,j.T=o,Em(n,r)}}function Am(n,r,a){r=nn(a,r),r=tf(n.stateNode,r,2),n=Di(n,r,2),n!==null&&(Ke(n,2),Nn(n))}function Le(n,r,a){if(n.tag===3)Am(n,n,a);else for(;r!==null;){if(r.tag===3){Am(r,n,a);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Pi===null||!Pi.has(o))){n=nn(a,n),a=Rg(2),o=Di(r,a,2),o!==null&&(Og(a,o,r,n),Ke(o,2),Nn(o));break}}r=r.return}}function Of(n,r,a){var o=n.pingCache;if(o===null){o=n.pingCache=new Dw;var f=new Set;o.set(r,f)}else f=o.get(r),f===void 0&&(f=new Set,o.set(r,f));f.has(a)||(bf=!0,f.add(a),n=Bw.bind(null,n,r,a),r.then(n,n))}function Bw(n,r,a){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,Pe===n&&(Ae&a)===a&&(Ye===4||Ye===3&&(Ae&62914560)===Ae&&300>At()-bl?(je&2)===0&&Es(n,0):_f|=a,ws===Ae&&(ws=0)),Nn(n)}function Rm(n,r){r===0&&(r=_t()),n=yr(n,r),n!==null&&(Ke(n,r),Nn(n))}function Pw(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),Rm(n,a)}function Hw(n,r){var a=0;switch(n.tag){case 31:case 13:var o=n.stateNode,f=n.memoizedState;f!==null&&(a=f.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(r),Rm(n,a)}function Iw(n,r){return na(n,r)}var Rl=null,As=null,Cf=!1,Ol=!1,kf=!1,qi=0;function Nn(n){n!==As&&n.next===null&&(As===null?Rl=As=n:As=As.next=n),Ol=!0,Cf||(Cf=!0,$w())}function Pa(n,r){if(!kf&&Ol){kf=!0;do for(var a=!1,o=Rl;o!==null;){if(n!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var v=o.suspendedLanes,w=o.pingedLanes;d=(1<<31-bt(42|n)+1)-1,d&=f&~(v&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,xm(o,d))}else d=Ae,d=ve(o,o===Pe?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Ge(o,d)||(a=!0,xm(o,d));o=o.next}while(a);kf=!1}}function qw(){Om()}function Om(){Ol=Cf=!1;var n=0;qi!==0&&Ww()&&(n=qi);for(var r=At(),a=null,o=Rl;o!==null;){var f=o.next,d=Cm(o,r);d===0?(o.next=null,a===null?Rl=f:a.next=f,f===null&&(As=a)):(a=o,(n!==0||(d&3)!==0)&&(Ol=!0)),o=f}rt!==0&&rt!==5||Pa(n),qi!==0&&(qi=0)}function Cm(n,r){for(var a=n.suspendedLanes,o=n.pingedLanes,f=n.expirationTimes,d=n.pendingLanes&-62914561;0<d;){var v=31-bt(d),w=1<<v,R=f[v];R===-1?((w&a)===0||(w&o)!==0)&&(f[v]=at(w,r)):R<=r&&(n.expiredLanes|=w),d&=~w}if(r=Pe,a=Ae,a=ve(n,n===r?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,a===0||n===r&&(De===2||De===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&ia(o),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Ge(n,a)){if(r=a&-a,r===n.callbackPriority)return r;switch(o!==null&&ia(o),dn(a)){case 2:case 8:a=xo;break;case 32:a=ur;break;case 268435456:a=In;break;default:a=ur}return o=km.bind(null,n),a=na(a,o),n.callbackPriority=r,n.callbackNode=a,r}return o!==null&&o!==null&&ia(o),n.callbackPriority=2,n.callbackNode=null,2}function km(n,r){if(rt!==0&&rt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Al()&&n.callbackNode!==a)return null;var o=Ae;return o=ve(n,n===Pe?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(cm(n,o,r),Cm(n,At()),n.callbackNode!=null&&n.callbackNode===a?km.bind(null,n):null)}function xm(n,r){if(Al())return null;cm(n,r,!0)}function $w(){tS(function(){(je&6)!==0?na(lr,qw):Om()})}function xf(){if(qi===0){var n=cs;n===0&&(n=$r,$r<<=1,($r&261888)===0&&($r=256)),qi=n}return qi}function Nm(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Mo(""+n)}function jm(n,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,n.id&&a.setAttribute("form",n.id),r.parentNode.insertBefore(a,r),n=new FormData(n),a.parentNode.removeChild(a),n}function Gw(n,r,a,o,f){if(r==="submit"&&a&&a.stateNode===f){var d=Nm((f[Lt]||null).action),v=o.submitter;v&&(r=(r=v[Lt]||null)?Nm(r.formAction):v.getAttribute("formAction"),r!==null&&(d=r,v=null));var w=new Po("action","action",null,o,f);n.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(qi!==0){var R=v?jm(f,v):new FormData(f);Qc(a,{pending:!0,data:R,method:f.method,action:d},null,R)}}else typeof d=="function"&&(w.preventDefault(),R=v?jm(f,v):new FormData(f),Qc(a,{pending:!0,data:R,method:f.method,action:d},d,R))},currentTarget:f}]})}}for(var Nf=0;Nf<hc.length;Nf++){var jf=hc[Nf],Vw=jf.toLowerCase(),Kw=jf[0].toUpperCase()+jf.slice(1);pn(Vw,"on"+Kw)}pn(up,"onAnimationEnd"),pn(cp,"onAnimationIteration"),pn(fp,"onAnimationStart"),pn("dblclick","onDoubleClick"),pn("focusin","onFocus"),pn("focusout","onBlur"),pn(lw,"onTransitionRun"),pn(uw,"onTransitionStart"),pn(cw,"onTransitionCancel"),pn(hp,"onTransitionEnd"),Jr("onMouseEnter",["mouseout","mouseover"]),Jr("onMouseLeave",["mouseout","mouseover"]),Jr("onPointerEnter",["pointerout","pointerover"]),Jr("onPointerLeave",["pointerout","pointerover"]),dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dr("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),dr("onBeforeInput",["compositionend","keypress","textInput","paste"]),dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ha="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(" "),Fw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ha));function Dm(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var o=n[a],f=o.event;o=o.listeners;e:{var d=void 0;if(r)for(var v=o.length-1;0<=v;v--){var w=o[v],R=w.instance,M=w.currentTarget;if(w=w.listener,R!==d&&f.isPropagationStopped())break e;d=w,f.currentTarget=M;try{d(f)}catch(H){qo(H)}f.currentTarget=null,d=R}else for(v=0;v<o.length;v++){if(w=o[v],R=w.instance,M=w.currentTarget,w=w.listener,R!==d&&f.isPropagationStopped())break e;d=w,f.currentTarget=M;try{d(f)}catch(H){qo(H)}f.currentTarget=null,d=R}}}}function Te(n,r){var a=r[Gu];a===void 0&&(a=r[Gu]=new Set);var o=n+"__bubble";a.has(o)||(Lm(r,n,2,!1),a.add(o))}function Df(n,r,a){var o=0;r&&(o|=4),Lm(a,n,o,r)}var Cl="_reactListening"+Math.random().toString(36).slice(2);function Lf(n){if(!n[Cl]){n[Cl]=!0,Od.forEach(function(a){a!=="selectionchange"&&(Fw.has(a)||Df(a,!1,n),Df(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Cl]||(r[Cl]=!0,Df("selectionchange",!1,r))}}function Lm(n,r,a,o){switch(uy(r)){case 2:var f=wS;break;case 8:f=SS;break;default:f=Qf}a=f.bind(null,r,a,n),f=void 0,!Wu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),o?f!==void 0?n.addEventListener(r,a,{capture:!0,passive:f}):n.addEventListener(r,a,!0):f!==void 0?n.addEventListener(r,a,{passive:f}):n.addEventListener(r,a,!1)}function Mf(n,r,a,o,f){var d=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 w=o.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=o.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=Fr(w),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){o=d=v;continue e}w=w.parentNode}}o=o.return}Pd(function(){var M=d,H=Xu(a),G=[];e:{var U=dp.get(n);if(U!==void 0){var B=Po,ie=n;switch(n){case"keypress":if(zo(a)===0)break e;case"keydown":case"keyup":B=H_;break;case"focusin":ie="focus",B=ic;break;case"focusout":ie="blur",B=ic;break;case"beforeblur":case"afterblur":B=ic;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=C_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=$_;break;case up:case cp:case fp:B=N_;break;case hp:B=V_;break;case"scroll":case"scrollend":B=R_;break;case"wheel":B=F_;break;case"copy":case"cut":case"paste":B=D_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Gd;break;case"toggle":case"beforetoggle":B=Q_}var ge=(r&4)!==0,ze=!ge&&(n==="scroll"||n==="scrollend"),N=ge?U!==null?U+"Capture":null:U;ge=[];for(var C=M,L;C!==null;){var q=C;if(L=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||L===null||N===null||(q=la(C,N),q!=null&&ge.push(Ia(C,q,L))),ze)break;C=C.return}0<ge.length&&(U=new B(U,ie,null,a,H),G.push({event:U,listeners:ge}))}}if((r&7)===0){e:{if(U=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",U&&a!==Ju&&(ie=a.relatedTarget||a.fromElement)&&(Fr(ie)||ie[Kr]))break e;if((B||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,B?(ie=a.relatedTarget||a.toElement,B=M,ie=ie?Fr(ie):null,ie!==null&&(ze=u(ie),ge=ie.tag,ie!==ze||ge!==5&&ge!==27&&ge!==6)&&(ie=null)):(B=null,ie=M),B!==ie)){if(ge=qd,q="onMouseLeave",N="onMouseEnter",C="mouse",(n==="pointerout"||n==="pointerover")&&(ge=Gd,q="onPointerLeave",N="onPointerEnter",C="pointer"),ze=B==null?U:oa(B),L=ie==null?U:oa(ie),U=new ge(q,C+"leave",B,a,H),U.target=ze,U.relatedTarget=L,q=null,Fr(H)===M&&(ge=new ge(N,C+"enter",ie,a,H),ge.target=L,ge.relatedTarget=ze,q=ge),ze=q,B&&ie)t:{for(ge=Yw,N=B,C=ie,L=0,q=N;q;q=ge(q))L++;q=0;for(var fe=C;fe;fe=ge(fe))q++;for(;0<L-q;)N=ge(N),L--;for(;0<q-L;)C=ge(C),q--;for(;L--;){if(N===C||C!==null&&N===C.alternate){ge=N;break t}N=ge(N),C=ge(C)}ge=null}else ge=null;B!==null&&Mm(G,U,B,ge,!1),ie!==null&&ze!==null&&Mm(G,ze,ie,ge,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(U=M?oa(M):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var xe=Zd;else if(Jd(U))if(Wd)xe=sw;else{xe=iw;var oe=nw}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?M&&Qu(M.elementType)&&(xe=Zd):xe=rw;if(xe&&(xe=xe(n,M))){Xd(G,xe,a,H);break e}oe&&oe(n,U,M),n==="focusout"&&M&&U.type==="number"&&M.memoizedProps.value!=null&&Yu(U,"number",U.value)}switch(oe=M?oa(M):window,n){case"focusin":(Jd(oe)||oe.contentEditable==="true")&&(ns=oe,uc=M,ma=null);break;case"focusout":ma=uc=ns=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,op(G,a,H);break;case"selectionchange":if(ow)break;case"keydown":case"keyup":op(G,a,H)}var we;if(sc)e:{switch(n){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else ts?Yd(n,a)&&(Re="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(Vd&&a.locale!=="ko"&&(ts||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&ts&&(we=Hd()):(Ri=H,ec="value"in Ri?Ri.value:Ri.textContent,ts=!0)),oe=kl(M,Re),0<oe.length&&(Re=new $d(Re,n,null,a,H),G.push({event:Re,listeners:oe}),we?Re.data=we:(we=Qd(a),we!==null&&(Re.data=we)))),(we=X_?Z_(n,a):W_(n,a))&&(Re=kl(M,"onBeforeInput"),0<Re.length&&(oe=new $d("onBeforeInput","beforeinput",null,a,H),G.push({event:oe,listeners:Re}),oe.data=we)),Gw(G,n,M,a,H)}Dm(G,r)})}function Ia(n,r,a){return{instance:n,listener:r,currentTarget:a}}function kl(n,r){for(var a=r+"Capture",o=[];n!==null;){var f=n,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=la(n,a),f!=null&&o.unshift(Ia(n,f,d)),f=la(n,r),f!=null&&o.push(Ia(n,f,d))),n.tag===3)return o;n=n.return}return[]}function Yw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Mm(n,r,a,o,f){for(var d=r._reactName,v=[];a!==null&&a!==o;){var w=a,R=w.alternate,M=w.stateNode;if(w=w.tag,R!==null&&R===o)break;w!==5&&w!==26&&w!==27||M===null||(R=M,f?(M=la(a,d),M!=null&&v.unshift(Ia(a,M,R))):f||(M=la(a,d),M!=null&&v.push(Ia(a,M,R)))),a=a.return}v.length!==0&&n.push({event:r,listeners:v})}var Qw=/\r\n?/g,Jw=/\u0000|\uFFFD/g;function Um(n){return(typeof n=="string"?n:""+n).replace(Qw,`
10`).replace(Jw,"")}function zm(n,r){return r=Um(r),Um(n)===r}function Ue(n,r,a,o,f,d){switch(a){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||Zr(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Zr(n,""+o);break;case"className":Do(n,"class",o);break;case"tabIndex":Do(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Do(n,a,o);break;case"style":zd(n,o,d);break;case"data":if(r!=="object"){Do(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||a!=="href")){n.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(a);break}o=Mo(""+o),n.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(r!=="input"&&Ue(n,r,"name",f.name,f,null),Ue(n,r,"formEncType",f.formEncType,f,null),Ue(n,r,"formMethod",f.formMethod,f,null),Ue(n,r,"formTarget",f.formTarget,f,null)):(Ue(n,r,"encType",f.encType,f,null),Ue(n,r,"method",f.method,f,null),Ue(n,r,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(a);break}o=Mo(""+o),n.setAttribute(a,o);break;case"onClick":o!=null&&(n.onclick=$n);break;case"onScroll":o!=null&&Te("scroll",n);break;case"onScrollEnd":o!=null&&Te("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(s(60));n.innerHTML=a}}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}a=Mo(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,""+o):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":o===!0?n.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,o):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(a,o):n.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(a):n.setAttribute(a,o);break;case"popover":Te("beforetoggle",n),Te("toggle",n),jo(n,"popover",o);break;case"xlinkActuate":qn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":qn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":qn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":qn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":qn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":qn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":qn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":qn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":qn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jo(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=T_.get(a)||a,jo(n,a,o))}}function Uf(n,r,a,o,f,d){switch(a){case"style":zd(n,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"children":typeof o=="string"?Zr(n,o):(typeof o=="number"||typeof o=="bigint")&&Zr(n,""+o);break;case"onScroll":o!=null&&Te("scroll",n);break;case"onScrollEnd":o!=null&&Te("scrollend",n);break;case"onClick":o!=null&&(n.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),r=a.slice(2,f?a.length-7:void 0),d=n[Lt]||null,d=d!=null?d[a]:null,typeof d=="function"&&n.removeEventListener(r,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(r,o,f);break e}a in n?n[a]=o:o===!0?n.setAttribute(a,""):jo(n,a,o)}}}function gt(n,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",n),Te("load",n);var o=!1,f=!1,d;for(d in a)if(a.hasOwnProperty(d)){var v=a[d];if(v!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ue(n,r,d,v,a,null)}}f&&Ue(n,r,"srcSet",a.srcSet,a,null),o&&Ue(n,r,"src",a.src,a,null);return;case"input":Te("invalid",n);var w=d=v=f=null,R=null,M=null;for(o in a)if(a.hasOwnProperty(o)){var H=a[o];if(H!=null)switch(o){case"name":f=H;break;case"type":v=H;break;case"checked":R=H;break;case"defaultChecked":M=H;break;case"value":d=H;break;case"defaultValue":w=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,r));break;default:Ue(n,r,o,H,a,null)}}Dd(n,d,w,R,M,v,f,!1);return;case"select":Te("invalid",n),o=v=d=null;for(f in a)if(a.hasOwnProperty(f)&&(w=a[f],w!=null))switch(f){case"value":d=w;break;case"defaultValue":v=w;break;case"multiple":o=w;default:Ue(n,r,f,w,a,null)}r=d,a=v,n.multiple=!!o,r!=null?Xr(n,!!o,r,!1):a!=null&&Xr(n,!!o,a,!0);return;case"textarea":Te("invalid",n),d=f=o=null;for(v in a)if(a.hasOwnProperty(v)&&(w=a[v],w!=null))switch(v){case"value":o=w;break;case"defaultValue":f=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:Ue(n,r,v,w,a,null)}Md(n,o,f,d);return;case"option":for(R in a)a.hasOwnProperty(R)&&(o=a[R],o!=null)&&(R==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Ue(n,r,R,o,a,null));return;case"dialog":Te("beforetoggle",n),Te("toggle",n),Te("cancel",n),Te("close",n);break;case"iframe":case"object":Te("load",n);break;case"video":case"audio":for(o=0;o<Ha.length;o++)Te(Ha[o],n);break;case"image":Te("error",n),Te("load",n);break;case"details":Te("toggle",n);break;case"embed":case"source":case"link":Te("error",n),Te("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(M in a)if(a.hasOwnProperty(M)&&(o=a[M],o!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ue(n,r,M,o,a,null)}return;default:if(Qu(r)){for(H in a)a.hasOwnProperty(H)&&(o=a[H],o!==void 0&&Uf(n,r,H,o,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(o=a[w],o!=null&&Ue(n,r,w,o,a,null))}function Xw(n,r,a,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,w=null,R=null,M=null,H=null;for(B in a){var G=a[B];if(a.hasOwnProperty(B)&&G!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":R=G;default:o.hasOwnProperty(B)||Ue(n,r,B,null,o,G)}}for(var U in o){var B=o[U];if(G=a[U],o.hasOwnProperty(U)&&(B!=null||G!=null))switch(U){case"type":d=B;break;case"name":f=B;break;case"checked":M=B;break;case"defaultChecked":H=B;break;case"value":v=B;break;case"defaultValue":w=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:B!==G&&Ue(n,r,U,B,o,G)}}Fu(n,v,w,R,M,H,d,f);return;case"select":B=v=w=U=null;for(d in a)if(R=a[d],a.hasOwnProperty(d)&&R!=null)switch(d){case"value":break;case"multiple":B=R;default:o.hasOwnProperty(d)||Ue(n,r,d,null,o,R)}for(f in o)if(d=o[f],R=a[f],o.hasOwnProperty(f)&&(d!=null||R!=null))switch(f){case"value":U=d;break;case"defaultValue":w=d;break;case"multiple":v=d;default:d!==R&&Ue(n,r,f,d,o,R)}r=w,a=v,o=B,U!=null?Xr(n,!!a,U,!1):!!o!=!!a&&(r!=null?Xr(n,!!a,r,!0):Xr(n,!!a,a?[]:"",!1));return;case"textarea":B=U=null;for(w in a)if(f=a[w],a.hasOwnProperty(w)&&f!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ue(n,r,w,null,o,f)}for(v in o)if(f=o[v],d=a[v],o.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":U=f;break;case"defaultValue":B=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==d&&Ue(n,r,v,f,o,d)}Ld(n,U,B);return;case"option":for(var ie in a)U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!o.hasOwnProperty(ie)&&(ie==="selected"?n.selected=!1:Ue(n,r,ie,null,o,U));for(R in o)U=o[R],B=a[R],o.hasOwnProperty(R)&&U!==B&&(U!=null||B!=null)&&(R==="selected"?n.selected=U&&typeof U!="function"&&typeof U!="symbol":Ue(n,r,R,U,o,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ge in a)U=a[ge],a.hasOwnProperty(ge)&&U!=null&&!o.hasOwnProperty(ge)&&Ue(n,r,ge,null,o,U);for(M in o)if(U=o[M],B=a[M],o.hasOwnProperty(M)&&U!==B&&(U!=null||B!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:Ue(n,r,M,U,o,B)}return;default:if(Qu(r)){for(var ze in a)U=a[ze],a.hasOwnProperty(ze)&&U!==void 0&&!o.hasOwnProperty(ze)&&Uf(n,r,ze,void 0,o,U);for(H in o)U=o[H],B=a[H],!o.hasOwnProperty(H)||U===B||U===void 0&&B===void 0||Uf(n,r,H,U,o,B);return}}for(var N in a)U=a[N],a.hasOwnProperty(N)&&U!=null&&!o.hasOwnProperty(N)&&Ue(n,r,N,null,o,U);for(G in o)U=o[G],B=a[G],!o.hasOwnProperty(G)||U===B||U==null&&B==null||Ue(n,r,G,U,o,B)}function Bm(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zw(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var f=a[o],d=f.transferSize,v=f.initiatorType,w=f.duration;if(d&&w&&Bm(v)){for(v=0,w=f.responseEnd,o+=1;o<a.length;o++){var R=a[o],M=R.startTime;if(M>w)break;var H=R.transferSize,G=R.initiatorType;H&&Bm(G)&&(R=R.responseEnd,v+=H*(R<w?1:(w-M)/(R-M)))}if(--o,r+=8*(d+v)/(f.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 8,957 bytes, line 10
10n:5}var zf=null,Bf=null;function xl(n){return n.nodeType===9?n:n.ownerDocument}function Pm(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 Hm(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 Pf(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 Hf=null;function Ww(){var n=window.event;return n&&n.type==="popstate"?n===Hf?!1:(Hf=n,!0):(Hf=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,eS=typeof clearTimeout=="function"?clearTimeout:void 0,qm=typeof Promise=="function"?Promise:void 0,tS=typeof queueMicrotask=="function"?queueMicrotask:typeof qm<"u"?function(n){return qm.resolve(null).then(n).catch(nS)}:Im;function nS(n){setTimeout(function(){throw n})}function $i(n){return n==="head"}function $m(n,r){var a=r,o=0;do{var f=a.nextSibling;if(n.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(o===0){n.removeChild(f),ks(r);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")qa(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,qa(a);for(var d=a.firstChild;d;){var v=d.nextSibling,w=d.nodeName;d[aa]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=v}}else a==="body"&&qa(n.ownerDocument.body);a=f}while(a);ks(r)}function Gm(n,r){var a=n;n=0;do{var o=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=o}while(a)}function If(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":If(a),Vu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function iS(n,r,a,o){for(;n.nodeType===1;){var f=a;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[aa])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(d=n.getAttribute("rel"),d==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(d!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(d=n.getAttribute("src"),(d!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===d)return n}else return n;if(n=ln(n.nextSibling),n===null)break}return null}function rS(n,r,a){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=ln(n.nextSibling),n===null))return null;return n}function Vm(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=ln(n.nextSibling),n===null))return null;return n}function qf(n){return n.data==="$?"||n.data==="$~"}function $f(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function sS(n,r){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||a.readyState!=="loading")r();else{var o=function(){r(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function ln(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 Gf=null;function Km(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(r===0)return ln(n.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}n=n.nextSibling}return null}function Fm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return n;r--}else a!=="/$"&&a!=="/&"||r++}n=n.previousSibling}return null}function Ym(n,r,a){switch(r=xl(a),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function qa(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Vu(n)}var un=new Map,Qm=new Set;function Nl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var si=F.d;F.d={f:aS,r:oS,D:lS,C:uS,L:cS,m:fS,X:dS,S:hS,M:pS};function aS(){var n=si.f(),r=Sl();return n||r}function oS(n){var r=Yr(n);r!==null&&r.tag===5&&r.type==="form"?hg(r):si.r(n)}var Rs=typeof document>"u"?null:document;function Jm(n,r,a){var o=Rs;if(o&&typeof r=="string"&&r){var f=en(r);f='link[rel="'+n+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),Qm.has(f)||(Qm.add(f),n={rel:n,crossOrigin:a,href:r},o.querySelector(f)===null&&(r=o.createElement("link"),gt(r,"link",n),ot(r),o.head.appendChild(r)))}}function lS(n){si.D(n),Jm("dns-prefetch",n,null)}function uS(n,r){si.C(n,r),Jm("preconnect",n,r)}function cS(n,r,a){si.L(n,r,a);var o=Rs;if(o&&n&&r){var f='link[rel="preload"][as="'+en(r)+'"]';r==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+en(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+en(a.imageSizes)+'"]')):f+='[href="'+en(n)+'"]';var d=f;switch(r){case"style":d=Os(n);break;case"script":d=Cs(n)}un.has(d)||(n=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:n,as:r},a),un.set(d,n),o.querySelector(f)!==null||r==="style"&&o.querySelector($a(d))||r==="script"&&o.querySelector(Ga(d))||(r=o.createElement("link"),gt(r,"link",n),ot(r),o.head.appendChild(r)))}}function fS(n,r){si.m(n,r);var a=Rs;if(a&&n){var o=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+en(o)+'"][href="'+en(n)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Cs(n)}if(!un.has(d)&&(n=m({rel:"modulepreload",href:n},r),un.set(d,n),a.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ga(d)))return}o=a.createElement("link"),gt(o,"link",n),ot(o),a.head.appendChild(o)}}}function hS(n,r,a){si.S(n,r,a);var o=Rs;if(o&&n){var f=Qr(o).hoistableStyles,d=Os(n);r=r||"default";var v=f.get(d);if(!v){var w={loading:0,preload:null};if(v=o.querySelector($a(d)))w.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},a),(a=un.get(d))&&Vf(n,a);var R=v=o.createElement("link");ot(R),gt(R,"link",n),R._p=new Promise(function(M,H){R.onload=M,R.onerror=H}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,jl(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(d,v)}}}function dS(n,r){si.X(n,r);var a=Rs;if(a&&n){var o=Qr(a).hoistableScripts,f=Cs(n),d=o.get(f);d||(d=a.querySelector(Ga(f)),d||(n=m({src:n,async:!0},r),(r=un.get(f))&&Kf(n,r),d=a.createElement("script"),ot(d),gt(d,"link",n),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function pS(n,r){si.M(n,r);var a=Rs;if(a&&n){var o=Qr(a).hoistableScripts,f=Cs(n),d=o.get(f);d||(d=a.querySelector(Ga(f)),d||(n=m({src:n,async:!0,type:"module"},r),(r=un.get(f))&&Kf(n,r),d=a.createElement("script"),ot(d),gt(d,"link",n),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Xm(n,r,a,o){var f=(f=he.current)?Nl(f):null;if(!f)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Os(a.href),a=Qr(f).hoistableStyles,o=a.get(r),o||(o={type:"style",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Os(a.href);var d=Qr(f).hoistableStyles,v=d.get(n);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}}
vendor: 4,212 bytes, line 10
10,d.set(n,v),(d=f.querySelector($a(n)))&&!d._p&&(v.instance=d,v.state.loading=5),un.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},un.set(n,a),d||gS(f,n,a,v.state))),r&&o===null)throw Error(s(528,""));return v}if(r&&o!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Cs(a),a=Qr(f).hoistableScripts,o=a.get(r),o||(o={type:"script",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Os(n){return'href="'+en(n)+'"'}function $a(n){return'link[rel="stylesheet"]['+n+"]"}function Zm(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function gS(n,r,a,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}),gt(r,"link",a),ot(r),n.head.appendChild(r))}function Cs(n){return'[src="'+en(n)+'"]'}function Ga(n){return"script[async]"+n}function Wm(n,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+en(a.href)+'"]');if(o)return r.instance=o,ot(o),o;var f=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),ot(o),gt(o,"style",f),jl(o,a.precedence,n),r.instance=o;case"stylesheet":f=Os(a.href);var d=n.querySelector($a(f));if(d)return r.state.loading|=4,r.instance=d,ot(d),d;o=Zm(a),(f=un.get(f))&&Vf(o,f),d=(n.ownerDocument||n).createElement("link"),ot(d);var v=d;return v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),gt(d,"link",o),r.state.loading|=4,jl(d,a.precedence,n),r.instance=d;case"script":return d=Cs(a.src),(f=n.querySelector(Ga(d)))?(r.instance=f,ot(f),f):(o=a,(f=un.get(d))&&(o=m({},a),Kf(o,f)),n=n.ownerDocument||n,f=n.createElement("script"),ot(f),gt(f,"link",o),n.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,jl(o,a.precedence,n));return r.instance}function jl(n,r,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,v=0;v<o.length;v++){var w=o[v];if(w.dataset.precedence===r)d=w;else if(d!==f)break}d?d.parentNode.insertBefore(n,d.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(n,r.firstChild))}function Vf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Kf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Dl=null;function ey(n,r,a){if(Dl===null){var o=new Map,f=Dl=new Map;f.set(a,o)}else f=Dl,o=f.get(a),o||(o=new Map,f.set(a,o));if(o.has(n))return o;for(o.set(n,null),a=a.getElementsByTagName(n),f=0;f<a.length;f++){var d=a[f];if(!(d[aa]||d[ft]||n==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(r)||"";v=n+v;var w=o.get(v);w?w.push(d):o.set(v,[d])}}return o}function ty(n,r,a){n=n.ownerDocument||n,n.head.insertBefore(a,r==="title"?n.querySelector("head > title"):null)}function mS(n,r,a){if(a===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 ny(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function yS(n,r,a,o){if(a.type==="stylesheet"&&(typeof o.media!="str
10ing"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Os(o.href),d=r.querySelector($a(f));if(d){r=d._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Ll.bind(n),r.then(n,n)),a.state.loading|=4,a.instance=d,ot(d);return}d=r.ownerDocument||r,o=Zm(o),(f=un.get(f))&&Vf(o,f),d=d.createElement("link"),ot(d);var v=d;v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),gt(d,"link",o),a.instance=d}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=Ll.bind(n),r.addEventListener("load",a),r.addEventListener("error",a))}}var Ff=0;function vS(n,r){return n.stylesheets&&n.count===0&&Ul(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var o=setTimeout(function(){if(n.stylesheets&&Ul(n,n.stylesheets),n.unsuspend){var d=n.unsuspend;n.unsuspend=null,d()}},6e4+r);0<n.imgBytes&&Ff===0&&(Ff=62500*Zw());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ul(n,n.stylesheets),n.unsuspend)){var d=n.unsuspend;n.unsuspend=null,d()}},(n.imgBytes>Ff?50:800)+r);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ul(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ml=null;function Ul(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ml=new Map,r.forEach(bS,n),Ml=null,Ll.call(n))}function bS(n,r){if(!(r.state.loading&4)){var a=Ml.get(n);if(a)var o=a.get(null);else{a=new Map,Ml.set(n,a);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),o=v)}o&&a.set(null,o)}f=r.instance,v=f.getAttribute("data-precedence"),d=a.get(v)||o,d===o&&a.set(null,f),a.set(v,f),this.count++,o=Ll.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),r.state.loading|=4}}var Va={$$typeof:k,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function _S(n,r,a,o,f,d,v,w,R){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=Ti(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ti(0),this.hiddenUpdates=Ti(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function iy(n,r,a,o,f,d,v,w,R,M,H,G){return n=new _S(n,r,a,v,R,M,H,G,w),r=1,d===!0&&(r|=24),d=Vt(3,null,null,r),n.current=d,d.stateNode=n,r=Ac(),r.refCount++,n.pooledCache=r,r.refCount++,d.memoizedState={element:o,isDehydrated:a,cache:r},kc(d),n}function ry(n){return n?(n=ss,n):ss}function sy(n,r,a,o,f,d){f=ry(f),o.context===null?o.context=f:o.pendingContext=f,o=ji(r),o.payload={element:a},d=d===void 0?null:d,d!==null&&(o.callback=d),a=Di(n,o,r),a!==null&&(Ht(a,n,r),Ea(a,n,r))}function ay(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function Yf(n,r){ay(n,r),(n=n.alternate)&&ay(n,r)}function oy(n){if(n.tag===13||n.tag===31){var r=yr(n,67108864);r!==null&&Ht(r,n,67108864),Yf(n,67108864)}}function ly(n){if(n.tag===13||n.tag===31){var r=Jt();r=Vr(r);var a=yr(n,r);a!==null&&Ht(a,n,r),Yf(n,r)}}var zl=!0;function wS(n,r,a,o){var f=j.T;j.T=null;var d=F.p;try{F.p=2,Qf(n,r,a,o)}finally{F.p=d,j.T=f}}function SS(n,r,a,o){var f=j.T;j.T=null;var d=F.p;try{F.p=8,Qf(n,r,a,o)}finally{F.p=d,j.T=f}}function Qf(n,r,a,o){if(zl){var f=Jf(o);if(f===null)Mf(n,r,o,Bl,a),cy(n,o);else if(TS(f,n,r,a,o))o.stopPropagation();else if(cy(n,o),r&4&&-1<ES.indexOf(n)){for(;f!==null;){var d=Yr(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=On(d.pendingLanes);if(v!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var R=1<<31-bt(v);w.entanglements[1]|=R,v&=~R}Nn(d),(je&6)===0&&(_l=At()+500,Pa(0))}}break;case 31:case 13:w=yr(d,2),w!==null&&Ht(w,d,2),Sl(),Yf(d,2)}if(d=Jf(o),d===null&&Mf(n,r,o,Bl,a),d===f)break;f=d}f!==null&&o.stopPropagation()}else Mf(n,r,o,null,a)}}function Jf(n){return n=Xu(n),Xf(n)}var Bl=null;function Xf(n){if(Bl=null,n=Fr(n),n!==null){var r=u(n);if(r===null)n=null;else{var a=r.tag;if(a===13){if(n=c(r),n!==null)return n;n=null}else if(a===31){if(n=h(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Bl=n,null}function uy(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 3,304 bytes, line 10
10: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(Iu()){case lr:return 2;case xo:return 8;case ur:case ra:return 32;case In:return 268435456;default:return 32}default:return 32}}var Zf=!1,Gi=null,Vi=null,Ki=null,Ka=new Map,Fa=new Map,Fi=[],ES="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 cy(n,r){switch(n){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Ka.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fa.delete(r.pointerId)}}function Ya(n,r,a,o,f,d){return n===null||n.nativeEvent!==d?(n={blockedOn:r,domEventName:a,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},r!==null&&(r=Yr(r),r!==null&&oy(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function TS(n,r,a,o,f){switch(r){case"focusin":return Gi=Ya(Gi,n,r,a,o,f),!0;case"dragenter":return Vi=Ya(Vi,n,r,a,o,f),!0;case"mouseover":return Ki=Ya(Ki,n,r,a,o,f),!0;case"pointerover":var d=f.pointerId;return Ka.set(d,Ya(Ka.get(d)||null,n,r,a,o,f)),!0;case"gotpointercapture":return d=f.pointerId,Fa.set(d,Ya(Fa.get(d)||null,n,r,a,o,f)),!0}return!1}function fy(n){var r=Fr(n.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){n.blockedOn=r,Ad(n.priority,function(){ly(a)});return}}else if(r===31){if(r=h(a),r!==null){n.blockedOn=r,Ad(n.priority,function(){ly(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Pl(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=Jf(n.nativeEvent);if(a===null){a=n.nativeEvent;var o=new a.constructor(a.type,a);Ju=o,a.target.dispatchEvent(o),Ju=null}else return r=Yr(a),r!==null&&oy(r),n.blockedOn=a,!1;r.shift()}return!0}function hy(n,r,a){Pl(n)&&a.delete(r)}function AS(){Zf=!1,Gi!==null&&Pl(Gi)&&(Gi=null),Vi!==null&&Pl(Vi)&&(Vi=null),Ki!==null&&Pl(Ki)&&(Ki=null),Ka.forEach(hy),Fa.forEac
10h(hy)}function Hl(n,r){n.blockedOn===r&&(n.blockedOn=null,Zf||(Zf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AS)))}var Il=null;function dy(n){Il!==n&&(Il=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Il===n&&(Il=null);for(var r=0;r<n.length;r+=3){var a=n[r],o=n[r+1],f=n[r+2];if(typeof o!="function"){if(Xf(o||a)===null)continue;break}var d=Yr(a);d!==null&&(n.splice(r,3),r-=3,Qc(d,{pending:!0,data:f,method:a.method,action:o},o,f))}}))}function ks(n){function r(R){return Hl(R,n)}Gi!==null&&Hl(Gi,n),Vi!==null&&Hl(Vi,n),Ki!==null&&Hl(Ki,n),Ka.forEach(r),Fa.forEach(r);for(var a=0;a<Fi.length;a++){var o=Fi[a];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Fi.length&&(a=Fi[0],a.blockedOn===null);)fy(a),a.blockedOn===null&&Fi.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var f=a[o],d=a[o+1],v=f[Lt]||null;if(typeof d=="function")v||dy(a);else if(v){var w=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[Lt]||null)w=v.formAction;else if(Xf(f)!==null)continue}else w=v.action;typeof w=="function"?a[o+1]=w:(a.splice(o,3),o-=3),dy(a)}}}function py(){function n(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function Wf(n){this._internalRoot=n}ql.prototype.render=Wf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,o=Jt();sy(a,o,n,r,null,null)},ql.prototype.unmount=Wf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;sy(n.current,2,null,n,null,null),Sl(),r[Kr]=null}};function ql(n){this._internalRoot=n}ql.prototype.unstable_scheduleHydration=function(n){if(n){var r=$u();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Fi.length&&r!==0&&r<Fi[a].priority;a++);Fi.splice(a,0,n),a===0&&fy(n)}};var gy=e.version;if(gy!=="19.2.5")throw Error(s(527,gy,"19.2.5"));F.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=g(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var RS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{cr=$l.inject(RS),Rt=$l}catch{}}return Ja.createRoot=function(n,r){if(!l(n))throw Error(s(299));var a=!1,o="",f=Sg,d=Eg,v=Tg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=iy(n,1,!1,null,null,a,o,null,f,d,v,py),n[Kr]=r.current,Lf(n),new Wf(r)},Ja.hydrateRoot=function(n,r,a){if(!l(n))throw Error(s(299));var o=!1,f="",d=Sg,v=Eg,w=Tg,R=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),r=iy(n,1,!0,r,a??null,o,f,R,d,v,w,py),r.context=ry(null),a=r.current,o=Jt(),o=Vr(o),f=ji(o),f.callback=null,Di(a,f,o),a=o,r.current.lanes=a,Ke(r,a),Nn(r),n[Kr]=r.current,Lf(n),new ql(r)},Ja.version="19.2.5",Ja}var Ay;function US(){if(Ay)return nh.exports;Ay=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),nh.exports=MS(),nh.exports}var zS=US(),BS="__TSS_CONTEXT",Ah=Symbol.for("TSS_SERVER_FUNCTION"),tN=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),PS="application/x-tss-framed",r0=()=>window.__TSS_START_OPTIONS__;function Br(t){return t?.isNotFound===!0}function Ro(t){t.statusCode=t.statusCode||t.code||307;const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const i=new Response(null,{status:t.statusCode,headers:e});if(i.options=t,t.throw)throw i;return i}function s0(t){return t instanceof Response&&!!t.options}function HS(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return Ro(t)}function IS(t){return t.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(e,i)=>i==="0"?"\0":i==="r"?"�":i)}const Ry=!1;function nr(t){return t[t.length-1]}function a0(t,e){return typeof t=="function"?t(e):t}const ed=Object.prototype.hasOwnProperty;function o0(t){for(const e in t)if(ed.call(t,e))return!0;return!1}const lu=()=>Object.create(null),xs=(t,e)=>er(t,e,!0);function er(t,e,i,s=0){if(t===e)return t;if(s++>500)return e;const l=Array.isArray(t)&&Array.isArray(e);if(!l&&!(mu(t)&&mu(e)))return e;const u=Object.keys(t),c=u.length,h=Object.keys(e),p=h.length;if(l?c!==t.length||p!==e.length||c&&nr(u)!==`${c-1}`||p&&nr(h)!==`${p-1}`:c!==Object.getOwnPropertyNames(t).length||p!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let g=0,y,m,b;if(l){for(;g<p&&(b=g,m=t[b],y=e[b],y=m===y?m:typeof m=="object"?er(m,y,i,s):y,y===m);g++);if(g===p&&c===p)return t}else{let S=c===p,E=!0;for(;g<p;g++){b=h[g],m=t[b];const A=e[b];
10y=m===A?m:typeof m=="object"?er(m,A,i,s):A,S&&=y===m&&(u[g]===b||ed.call(t,b)),E&&=Object.is(y,A),u[g]=y}if(S)return Object.getOwnPropertySymbols(t).length?e:t;if(E)return e}const _=l?h.fill(0):i?lu():{};for(let S=0;S<p;S++)b=l?S:h[S],l?(m=t[b],S>g&&(y=e[b],y=m===y?m:typeof m=="object"?er(m,y,i,s):y),_[b]=S<g?m:y):_[b]=u[S];return _}function mu(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Tn(t,e,i,s){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let l=0,u=t.length;l<u;l++){const c=t[l],h=e[l];if(c!==h&&!Tn(c,h,i,s))return!1}return!0}if(mu(t)&&mu(e)){if(i){for(const u in e)if((s||e[u]!==void 0)&&!Tn(t[u],e[u],i,s))return!1;return!0}let l=0;if(s)l=Object.keys(t).length;else for(const u in t)t[u]!==void 0&&l++;for(const u in e)if((s||e[u]!==void 0)&&(l--===0||!Tn(t[u],e[u],i,s)))return!1;return l===0}return!1}function qS(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}const $S=/[\x00-\x1f\x7f"<>`{}]/g;function GS(t){return t.replace($S,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Oy(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return GS(e)}const VS=["http:","https:","mailto:","tel:"];function uo(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const l0=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function u0(t,e){if(!t)return!1;if(l0.test(t))return!0;const i=uo(t);return i?!e.has(i):!1}const KS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},FS=/[&><\u2028\u2029]/g;function YS(t){return t.replace(FS,e=>KS[e])}function Xa(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const i=/%25|%5C/gi;let s=0,l;for(e="";(l=i.exec(t))!==null;)e+=Oy(t.slice(s,l.index))+l[0],s=i.lastIndex;e+=Oy(s?t.slice(s):t)}return e}function QS(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function JS(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}function Fs(t){return t.replace(/\/{2,}/g,"/")}function c0(t){return t==="/"?t:t.replace(/^\/+/,"")}function Bn(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}function f0(t){return Bn(c0(t))}function Cy(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function ky(t,e,i="never",s){if(e.includes("//")&&(e=Fs(e)),e.startsWith("/"))return e.length===1||i==="preserve"?e:i==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;const l=e===".";let u;if(s){u=l?t:t+"\0"+e;const g=s.get(u);if(g)return g}let c;if(l)c=t.split("/");else{for(t.includes("//")&&(t=Fs(t)),c=t.split("/");c.length>1&&nr(c)==="";)c.pop();const g=e.split("/");for(let y=0,m=g.length;y<m;y++){const b=g[y];
10b===""?y?y===m-1&&c.push(b):c=[b]:b===".."?c.length>1?c.pop():c=[""]:b==="."||c.push(b)}}c.length>1&&(nr(c)===""?i==="never"&&c.pop():i==="always"&&c.push(""));const h=c.join("/"),p=(l?Fs(h):h)||"/";return u&&s&&s.set(u,p),p}function XS(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),i=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return s=>s.replace(i,l=>e.get(l)??l)}function ZS(t){return t==null||t===""}function WS(t,e,i){if(typeof e!="string")return""+(e??void 0);const s=t==="_splat";if(s&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let l=encodeURIComponent(e);return s&&(l=l.replaceAll("%2F","/")),i?i(l):l}function xy(t,e,i,s,l){const u=t.endsWith("/")?"/":"";let c="";for(const h of e){if(typeof h=="string"){c+=h;continue}const[p,g,y,m]=h,b=p===2,_=b&&m!==void 0?m+u:m;let S=i[g];if(!(p===3&&S==null)){if(l&&(l[g]=S,b&&(l["*"]=S)),b&&ZS(S)){if(y==="/"&&!_)continue;S=""}c+=y+WS(g,S,s)+(_||"")}}return c+u||"/"}function yu(t){const e=new Map;let i,s;return{get(l){const u=e.get(l);if(u)return u.visited=!0,u.value},set(l,u){const c=e.get(l);if(c){c.value=u;return}if(e.size>=t){let p=i?.next().value;for(;!p||p.visited;)p?p.visited=!1:i=e.values(),p=i.next().value;p===s&&(i=void 0),e.delete(p.key)}const h={key:l,value:u,visited:!1};s=h,e.set(l,h)},clear(){e.clear(),i=void 0,s=void 0}}}function co(){throw new Error("Invariant failed")}const Wi=4,h0=5;function eE(t){const e=t.names;if(e)return e;const i=[];for(const s of t)typeof s!="string"&&i.push(s[1]);return t.names=i}function tE(t,e,i){const s=t.substring(e,i);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(1),"",""];const l=s.indexOf("{");if(l>=0){const u=s.indexOf("}",l),c=s.charCodeAt(l+1)===45,h=l+(c?3:2);if(u>=0&&s.charCodeAt(h-1)===36&&(!c||h<u)){const p=s.substring(h,u);return[c?3:p?1:2,p||"_splat",s.substring(0,l),t.substring(e+u+1,p?i:t.length)]}}return s}function fo(t,e,i,s,l,u){let c=i;const h=e.fullPath??e.from,p=e.options,g=h.length,y=h.endsWith("/")?g-1:g,m=p?.caseSensitive??t,b=p?.params?.parse??p?.parseParams;let _,S=u?i-1:0;if(!s||h.includes("$")){_=u?.slice()??[];const T=nr(_);T&&typeof T!="string"&&T[0]===2&&(_[_.length-1]=[T[0],T[1],T[2],T[3]===void 0?void 0:T[3]+h.substring(i-(h[i-2]==="/"?2:1),y)],S=g)}for(;c<g;){const T=c,x=h.indexOf("/",T);let k=x===-1?g:x;const P=tE(h,T,k);c=k+1;let Z;if(typeof P=="string"){if(!s)continue;let z=P,D;m?D=s.static??=new Map:(z=P.toLowerCase(),D=s.staticInsensitive??=new Map);const Y=D.get(z);if(Y)Z=Y;else{const te=Dr(s);Z=te,D.set(z,te)}}else{const z=P[0];let D=P[2],Y=P[3]??"";if(z===2&&(k=g,c=k+1),_&&S<k&&(S<T-1&&_.push(h.substring(S,T-1)),P[2]="/"+D,z===2&&P[3]!==void 0&&y<g&&(P[3]=Y.slice(0,-1)),_.push(P),S=k),!s)continue;const te=m&&!!(D||Y);m||(D=D.toLowerCase(),Y=Y.toLowerCase());const le=z===1?s.dynamic??=[]:z===3?s.optional??=[]:s.wildcard??=[],V=z!==2&&!b&&le.find(K=>!K.parse&&K.caseSensitive===te&&K.prefix===D&&K.suffix===Y);if(V)Z=V;else{const K=Dr(s,z,te,D,Y);Z=K,le.push(K),le.length===2&&l?.push(le)}}s=Z}_&&S<y&&_.push(h.substring(S,y));const E=_?.slice();if(!s)return E;if(b&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){const T=Dr(s,h0);(s.pathless??=[]).push(T),s=T}const A=(e.path||!e.children)&&!e.isRoot;if(A&&y<g){const T=Dr(s,Wi);s.index=T,s=T}return s.parse=b??null,s.priority=p?.params?.priority??0,s.route||(s.data=E,A&&(s.route=e)),[s,c,E]}function d0(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Dr(t,e=0,i,s,l){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:i,prefix:s,suffix:l}}function nE(t,e){const i=Dr(),s=[];function l(u,c,h,p){const[g,y,m]=fo(!1,u,c,h,s,p);if(u.children)for(const b of u.children)l(b,y,g,m)}for(const u of t)l(u,1,i);for(const u of s)u.sort(d0);e.masksTree=i,e.flatCache=yu(1e3)}function iE(t,e){t||="/";const i=e.flatCache.get(t);if(i!==void 0)return i;const s=td(t,e.masksTree);return e.flatCache.set(t,s),s}function rE(t,e,i,s,l){t||="/",s||="/";const u=e?`case\0${t}`:t;let c=l.singleCache.get(u);return c||(c=Dr(),fo(e,{from:t},1,c),l.singleCache.set(u,c)),td(s,c,i)}
10function sE(t,e,i=!1){const s=i?t:`nofuzz\0${t}`,l=e.matchCache.get(s);if(l!==void 0)return l;t||="/";let u;try{u=td(t,e.segmentTree,i)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=g0(u.route)),e.matchCache.set(s,u),u}function aE(t,e=!1){const i=Dr(),s=[],l={},u={};let c=0;function h(p,g,y,m){if(p.init(c),p.id in l&&co(),l[p.id]=p,c!==0&&p.path){const E=Bn(p.fullPath);(!u[E]||p.fullPath.endsWith("/"))&&(u[E]=p)}c++;const[b,_,S]=fo(e,p,g,y,s,m);if(p._interpolation=S,p.children)for(const E of p.children)h(E,_,b,S)}h(t,1,i);for(const p of s)p.sort(d0);return{processedTree:{segmentTree:i,singleCache:yu(1e3),matchCache:yu(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function td(t,e,i=!1){const s=t.split("/"),l=lE(t,s,e,i);if(!l)return null;const[u]=p0(t,s,l);return{route:l.node.route,rawParams:u}}function p0(t,e,i){const s=oE(i.node),l=i.node.data&&eE(i.node.data),u=Object.create(null);let c=i.extract?.part??0,h=i.extract?.node??0,p=i.extract?.path??0,g=i.extract?.param??0;for(;h<s.length;c++,h++,p++){const y=s[h];if(y.kind===Wi)break;if(y.kind===h0){c--,p--;continue}const m=e[c],b=p;if(m&&(p+=m.length),y.kind===1||y.kind===3){const _=l[g++];if(y.kind===3&&i.skipped&1<<h){c--,p=b-1;continue}const S=y.suffix||y.prefix?m.substring(y.prefix.length,m.length-y.suffix.length):m;(S||y.kind===1)&&(u[_]=decodeURIComponent(S))}else if(y.kind===2){const _=y,S=t.substring(b+_.prefix.length,t.length-_.suffix.length),E=decodeURIComponent(S);u["*"]=E,u._splat=E;break}}return i.rawParams&&Object.assign(u,i.rawParams),[u,{part:c,node:h,path:p,param:g}]}function g0(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function oE(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function lE(t,e,i,s){if(t==="/"&&i.index)return{node:i.index,skipped:0};const l=!nr(e),u=l&&t!=="/",c=e.length-(l?1:0),h=[{node:i,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;h.length;){const y=h.pop(),{node:m,index:b,skipped:_,statics:S,dynamics:E,optionals:A}=y;let{extract:T,rawParams:x}=y;if(m.kind===2&&m.route&&!Vl(g,y))continue;if(m.parse){if(!Ny(t,e,y))continue;x=y.rawParams,T=y.extract}s&&m.route&&m.kind!==Wi&&Vl(p,y)&&(p=y);const k=b===c;if(k&&(m.route&&(!u||m.kind===Wi||m.kind===2)&&Vl(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const P=k?void 0:e[b];let Z;if(k&&m.index){const z={node:m.index,index:b,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:x};let D=!0;if(m.index.parse&&(Ny(t,e,z)||(D=!1)),D){if(!E&&!A&&!_&&uE(S,c))return z;Vl(g,z)&&(g=z)}}if(m.wildcard)for(let z=m.wildcard.length-1;z>=0;z--){const D=m.wildcard[z],{prefix:Y,suffix:te}=D;if(!(Y&&(k||!(D.caseSensitive?P:Z??=P.toLowerCase()).startsWith(Y)))){if(te){if(k)continue;const le=e.slice(b).join("/"),V=le.slice(-te.length);if((D.caseSensitive?V:V.toLowerCase())!==te||le.length-te.length<Y.length)continue}h.push({node:D,index:c,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:x})}}if(m.optional){const z=_|1<<m.depth+1;for(let D=m.optional.length-1;D>=0;D--){const Y=m.optional[D];h.push({node:Y,index:b,skipped:z,statics:S,dynamics:E,optionals:A,extract:T,rawParams:x})}if(!k)for(let D=m.optional.length-1;D>=0;D--){const Y=m.optional[D],{prefix:te,suffix:le}=Y;if(te||le){const V=Y.caseSensitive?P:Z??=P.toLowerCase();if(te&&!V.startsWith(te)||le&&V.indexOf(le,V.length-le.length)<te.length)continue}h.push({node:Y,index:b+1,skipped:_,statics:S,dynamics:E,optionals:A+Gl(c,b),extract:T,rawParams:x})}}if(!k&&m.dynamic&&P)for(let z=m.dynamic.length-1;z>=0;z--){const D=m.dynamic[z],{prefix:Y,suffix:te}=D;if(Y||te){const le=D.caseSensitive?P:Z??=P.toLowerCase();if(Y&&!le.startsWith(Y)||te&&le.indexOf(te,le.length-te.length)<Y.length)continue}h.push({node:D,index:b+1,skipped:_,statics:S,dynamics:E+Gl(c,b),optionals:A,extract:T,rawParams:x})}if(!k&&m.staticInsensitive){const z=m.staticInsensitive.get(Z??=P.toLowerCase());z&&h.push({node:z,index:b+1,skipped:_,statics:S+Gl(c,b),dynamics:E,optionals:A,extract:T,rawParams:x})}if(!k&&m.static){const z=m.static.get(P);z&&h.push({node:z,index:b+1,skipped:_,statics:S+Gl(c,b),dynamics:E,optionals:A,extract:T,rawParams:x})}if(m.pathless)for(let z=m.pathless.length-1;z>=0;z--){const D=m.pathless[z];h.push({node:D,index:b,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:x})}}if(g)return g;if(s&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=e[b].length;const m=y===t.length?"/":t.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function Gl(t,e){return 2**(t-e-1)}function uE(t,e){return t===2**(e-1)-1}function Ny(t,e,i){let s,l;try{[s,l]=p0(t,e,i)}catch{return null}if(i.rawParams=s,i.extract=l,!i.node.parse)return!0;try{if(i.node.parse(s)===!1)return null}catch{}return!0}function Vl(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Wi)>(t.node.kind===Wi)||e.node.kind===Wi==(t.node.kind===Wi)&&e.node.depth>
10t.node.depth))):!0}function cE(){try{return sessionStorage}catch{return}}const fE="tsr-scroll-restoration-v1_3",m0=cE();function hE(){try{return JSON.parse(m0?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Ns=hE(),jy="data-scroll-restoration-id",dE=t=>t.state.__TSR_key||t.href;function pE(t){const e=t.getAttribute(jy);if(e)return`[${jy}="${e}"]`;let i="",s=t,l;for(;l=s.parentNode;){let u=1,c=s;for(;c=c.previousElementSibling;)u++;const h=`${s.localName}:nth-child(${u})`;i=i?`${h} > ${i}`:h,s=l}return i}let Kl=!1;const uu="window";function Rh(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Dy(t){const e=new Set;for(const i of t){if(i===uu)continue;const s=Rh(i);s&&e.add(s)}return e}function gE(t,e){const i=t.options.scrollRestoration,s=t._scroll;i&&(s.e=!0);const l=t.options.getScrollRestorationKey||dE,u=new Set,c=h=>{const p=Ns[h]||={};for(const g of u)g===document?p[uu]={scrollX,scrollY}:g.isConnected&&(p[pE(g)]={scrollX:g.scrollLeft,scrollY:g.scrollTop})};i&&!s.s&&(s.s=!0,Kl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Kl||u.add(h.target)},!0),t.subscribe("onBeforeLoad",h=>{h.fromLocation&&c(l(h.fromLocation)),u.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",c(l(t.stores.resolvedLocation.get()??t.stores.location.get()));try{m0?.setItem(fE,JSON.stringify(Ns))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!s.r&&(s.r=!0,t.subscribe("onRendered",h=>{const p=t.options.scrollRestorationBehavior,g=t.options.scrollToTopSelectors,y=s.n,m=s.h;let b;if(u.clear(),s.n=!0,s.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const _=l(h.toLocation),S=h.fromLocation&&l(h.fromLocation);if(s.e&&S&&S!==_){const E=Ns[S];if(E){let A=Ns[_];for(const T in E){if(T===uu){if(y)continue}else{const x=Rh(T);if(!x||y&&g&&(b??=Dy(g),b.has(x)))continue}A||(A=Ns[_]={}),A[T]??=E[T]}}}Kl=!0;try{const E=h.toLocation.hash,A=h.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(y){!E&&g&&(b??=Dy(g));const x=E&&A&&m,k=s.e?Ns[_]:void 0;if(k)for(const P in k){const{scrollX:Z,scrollY:z}=k[P];if(P===uu){if(x)continue;scrollTo({top:z,left:Z,behavior:p}),T=!0}else{const D=Rh(P);D&&(D.scrollLeft=Z,D.scrollTop=z,b?.delete(D))}}if(!E){const P={top:0,left:0,behavior:p};if(T||scrollTo(P),b)for(const Z of b)Z.scrollTo(P)}}!T&&E&&A&&document.getElementById(E)?.scrollIntoView(A)}finally{Kl=!1}}))}function y0(t,e=String){let i;for(const s in t){const l=t[s];l!==void 0&&(i||=new URLSearchParams).set(s,e(l))}return i?i.toString():""}function ah(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function mE(t){const e=new URLSearchParams(t),i=Object.create(null);for(const[s,l]of e.entries()){const u=i[s];u==null?i[s]=ah(l):Array.isArray(u)?u.push(ah(l)):i[s]=[u,ah(l)]}return i}const v0=/^(?:\s|["[{\d-]|fa|nu|tr)/,yE=bE(JSON.parse),vE=_E(JSON.stringify,JSON.parse);function bE(t){const e=t===JSON.parse;return i=>{i[0]==="?"&&(i=i.substring(1));const s=mE(i);for(const l in s){const u=s[l];if(typeof u=="string"){if(e&&!v0.test(u))continue;try{s[l]=t(u)}catch{}}}return s}}function _E(t,e){const i=e===JSON.parse;function s(l){if(l&&typeof l=="object")try{return t(l)}catch{}else if(e&&typeof l=="string"){if(i&&!v0.test(l))return l;try{return e(l),t(l)}catch{}}return l}return l=>{const u=y0(l,s);return u?`?${u}`:""}}const Ys="__root__";function wE(t,e,i){const s=f0(t),l=`/${s}`,u=e?l:l.toLowerCase(),c=`${u}/`,h={input:({url:p})=>{const g=e?p.pathname:p.pathname.toLowerCase();return g===u?p.pathname="/":g.startsWith(c)&&(p.pathname=p.pathname.slice(l.length)),p},output:({url:p})=>(p.pathname=Fs(`/${s}${p.pathname}`),p)};return i?{input:({url:p})=>Oh(i,h.input({url:p})),output:({url:p})=>h.output({url:b0(i,p)})}:h}function Oh(t,e){const i=t?.input?.({url:e});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return e}function b0(t,e){const i=t?.output?.({url:e});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return e}function SE(t,e){const{createMutableStore:i,createReadonlyStore:s,batch:l}=e,u=new Map,c=i("idle"),h=i(t),p=i(void 0),g=i([]),y=s(()=>g.get().map(E=>u.get(E).get())),m=s(()=>({status:c.get(),isLoading:c.get()==="pending",matches:y.get(),location:h.get(),resolvedLocation:p.get()}));function b(E){let A=u.get(E);return A||(A=i(void 0),u.set(E,A)),A}const _={status:c,location:h,resolvedLocation:p,ids:g,matches:y,by
10Route:u,__store:m,getMatchStore:b,setMatches:S};function S(E){const A=g.get(),T=E.map(x=>x.routeId);l(()=>{JS(A,T)||g.set(T);for(const x of A)T.includes(x)||u.get(x).set(()=>{});for(const x of E){const k=b(x.routeId);k.get()!==x&&k.set(x)}})}return _}var tr="__TSR_index",Ly="popstate",My="beforeunload",EE=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function cu(t){const e=EE.exec(t);return e?"/"+t.slice(e[0].length):t}function _0(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>`	
11\r`.includes(e)?"":encodeURIComponent(e))),cu(t)}function TE(t){let e=t.getLocation();const i=new Set,s=c=>{e=t.getLocation(),i.forEach(h=>h({location:e,action:c}))},l=c=>{t.notifyOnIndexChange??!0?s(c):e=t.getLocation()},u=async({task:c,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){c();return}const g=t.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=vu(p.path,p.state);if(await m.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:i,subscribe:c=>(i.add(c),()=>{i.delete(c)}),push:(c,h,p)=>{const g=e.state[tr];h=Uy(g+1,h),u({task:()=>{t.pushState(c,h),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:h})},replace:(c,h,p)=>{const g=e.state[tr];h=Uy(g,h),u({task:()=>{t.replaceState(c,h),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:h})},go:(c,h)=>{u({task:()=>{t.go(c,h?.ignoreBlocker??!1),l({type:"GO",index:c})},navigateOpts:h,type:"GO"})},back:c=>{u({task:()=>{t.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{t.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[tr]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:s,_getBlockers:()=>t.getBlockers?.()??[]}}function Uy(t,e){const i=nd();return{...e,key:i,__TSR_key:i,[tr]:t}}function AE(t){const e=typeof document<"u"?window:void 0,i=e.history.pushState,s=e.history.replaceState;let l=[];const u=()=>l,c=D=>l=D,h=D=>_0(D),p=(()=>vu(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const D=nd();e.history.replaceState({[tr]:0,key:D,__TSR_key:D},"")}let g=p(),y,m=!1,b=!1,_=!1,S=!1;const E=()=>g;let A;const T=()=>{A&&(z._ignoreSubscribers=!0,(A[2]?e.history.pushState:e.history.replaceState)(A[1],"",A[0]),z._ignoreSubscribers=!1,A=void 0,y=void 0)},x=(D,Y,te)=>{const le=!!A;le||(y=g),g=vu(Y,te),A=[g.href,te,A?.[2]||D],le||queueMicrotask(()=>T())},k=D=>{g=p(),z.notify({type:D})},P=async()=>{if(S=!1,b){b=!1;return}const D=p(),Y=D.state[tr]-g.state[tr],te=Y===1,le=Y===-1,V=!te&&!le||m;m=!1;const K=V?"GO":le?"BACK":"FORWARD",W=V?{type:"GO",index:Y}:{type:le?"BACK":"FORWARD"};if(_)_=!1;else{const pe=u();if(typeof document<"u"&&pe.length){for(const se of pe)if(await se.blockerFn({currentLocation:g,nextLocation:D,action:K})){b=!0,e.history.go(-Y),z.notify(W);return}}}g=p(),z.notify(W)},Z=D=>
11{if(S){S=!1;return}let Y=!1;const te=u();if(typeof document<"u"&&te.length)for(const le of te){const V=le.enableBeforeUnload??!0;if(V===!0){Y=!0;break}if(typeof V=="function"&&V()===!0){Y=!0;break}}if(Y)return D.preventDefault(),D.returnValue=""},z=TE({getLocation:E,getLength:()=>e.history.length,pushState:(D,Y)=>x(!0,D,Y),replaceState:(D,Y)=>x(!1,D,Y),back:D=>(D&&(_=!0,S=!0),e.history.back()),forward:D=>{D&&(_=!0,S=!0),e.history.forward()},go:(D,Y)=>{m=!0,Y&&(_=!0,S=!0),e.history.go(D)},createHref:D=>h(D),flush:T,destroy:()=>{e.history.pushState=i,e.history.replaceState=s,e.removeEventListener(My,Z,{capture:!0}),e.removeEventListener(Ly,P)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return z._ignoreNextBeforeUnload=D=>{S=!1;try{D=new URL(D,e.document.baseURI).href,S=/^https?:/.test(D)&&(!D.includes("#")||D.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(My,Z,{capture:!0}),e.addEventListener(Ly,P),e.history.pushState=function(...D){const Y=i.apply(e.history,D);return z._ignoreSubscribers||k("PUSH"),Y},e.history.replaceState=function(...D){const Y=s.apply(e.history,D);return z._ignoreSubscribers||k("REPLACE"),Y},z}function vu(t,e){const i=_0(t),s=i.indexOf("#"),l=i.indexOf("?");if(!e){const u=nd();e={[tr]:0,key:u,__TSR_key:u}}return{href:i,pathname:i.substring(0,s>0?l>0?Math.min(s,l):s:l>0?l:i.length),hash:s>-1?i.substring(s):"",search:l>-1?i.slice(l,s===-1?void 0:s):"",state:e}}function nd(){return(Math.random()+1).toString(36).substring(7)}function oh(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}function lh(t){return t.pathname+t.search+t.hash}function zy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function RE(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function ku(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}function By({key:t,__TSR_key:e,__TSR_index:i,__hashScrollIntoViewOptions:s,...l}){return l}function w0(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}function OE(t,e,i,s,l,u){s&&(e=e.slice(0,s)),l&&(i=i.slice(0,l));for(const c of e){if(u&&t._tx!==u)return;i.some(h=>h.routeId===c.routeId)||t.routesById[c.routeId].options.onLeave?.(c)}for(const c of i){if(u&&t._tx!==u)return;t.routesById[c.routeId].options[e.some(h=>h.routeId===c.routeId)?"onStay":"onEnter"]?.(c)}}var CE=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async i=>(i(),!1),this.update=i=>{const s=this.options;this.options={...s,...i},this.isServer=this.options.isServer??Ry??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=AE()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const l=this.options.basepath??"/",u=this.options.rewrite,c=this.basepath!==l||s?.rewrite!==u||s?.caseSensitive!==this.options.caseSensitive;if(c&&(this.basepath=l,this.rewrite=l!=="/"&&f0(l)?wE(l,this.options.caseSensitive,u):u),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Ry){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)c&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=SE(this.latestLocation,h),gE(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=aE(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&nE(this.options.routeMasks,i.processedTree),{...i,resolvePathCache:yu(1e3)}},this.subscribe=(i,s)=>{const l={eventType:i,fn:s};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=i=>{for(const s of this.subscribers)if(s.eventType===i.type)try{s.fn(i)}catch(l){console.error(l)}},this.parseLocation=(i,s)=>{const l=({pathname:p,search:g,hash:y,href:m},b)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(g),T=this.options.stringifySearch(A);return{href:p+T+y,publicHref:p+T+y,pathname:Xa(p),external:!1,searchStr:T,search:xs(s?.search,A),hash:Xa(y.slice(1)),state:er(s?.state,b)}}const _=Oh(this.rewrite,new URL(m,this.origin)),S=this.options.parseSearch(_.search),E=this.options.stringifySearch(S);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:m,pathname:Xa(cu(_.pathname)),external:!!this.rewrite&&oh(_,this.origin),searchStr:E,search:xs(s?.search,S),hash:Xa(_.hash.slice(1)),state:er(s?.state,b)}},u=l(i,i.state),{__tempLocation:c,__tempKey:h}=u.state;if(c&&(!h||h===this.tempLocationKey)){const p=l(c,{...c.state,__tempLocation:void 0,key:u.state.key,__TSR_key:u.state.__TSR_key});return p.maskedLocation=u,p}return u},this.matchRoutes=(i,s,l)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:s},l):this.matchRoutesInternal(i,s),this.getMatchedRoutes=i=>{const s=Object.create(null),l=sE(Bn(i),this.processedTree,!0);return l&&Object.assign(s,l.rawParams),[l?.branch||[this.routesById.__root__],s,l?.route]},this.buildLocation=i=>{{const c=this.staticLocations.get(i);if(c)return c}let s=!1;const l=(c={})=>
11{if(c.href){const pe=vu(c.href,{});c={...c,to:Oh(this.rewrite,new URL(pe.pathname,this.origin)).pathname,search:this.options.parseSearch(pe.search),hash:pe.hash.slice(1)}}const h=c._fromLocation||this._pendingLocation||this.latestLocation;let p;const g=()=>(s=!0,h),y=()=>(s=!0,p??=this.matchRoutesLightweight(h)),m=c.to?`${c.to}`:".",b=ky(m[0]==="/"?"":c.unsafeRelative==="path"?g().pathname:c.from??y()[1],m,this.options.trailingSlash,this.resolvePathCache),_=this.routesByPath[Bn(b)],S=b.includes("$");let E;if(_)E=_._branch??=g0(_);else if(S)E=[];else{const[pe,se,j]=this.getMatchedRoutes(b);E=pe,this.options.notFoundRoute&&(!j||j.path!=="/"&&se["**"])&&(E=[...E,this.options.notFoundRoute])}const A=S?_?._interpolation??fo(!1,{fullPath:b},0):void 0;let T;for(const pe of E){const se=pe.options.params?.stringify??pe.options.stringifyParams;if(se){const j=y()[3];if(T??=uh(c.params,j),!o0(T))break;T===j&&(T=Object.assign(lu(),T));try{Object.assign(T,se(T))}catch{}}}T??=uh(c.params,xE(c.params,A)?y()[3]:ch);const x=i.leaveParams?b:cu(Xa(A?xy(b,A,T,this.pathParamsDecoder):b)),k=NE(E,i._includeValidateSearch),P=()=>{let pe=y()[2];if(i._includeValidateSearch&&this.options.search?.strict){const se={};E.forEach(j=>{if(j.options.validateSearch)try{Object.assign(se,fu(j.options.validateSearch,{...se,...pe}))}catch{}}),pe=se}return pe},Z=k.length?jE(k,P(),c):c.search===!0?P():typeof c.search=="function"?c.search(P()):c.search||ch,z=this.options.stringifySearch(Z),D=c.hash===!0?g().hash:typeof c.hash=="function"?c.hash(g().hash):c.hash||void 0,Y=D?`#${D}`:"",te=c.state?c.state===!0?g().state:typeof c.state=="function"?c.state(g().state):c.state:ch,le=`${x}${z}${Y}`;let V,K,W=!1;if(this.rewrite){const pe=new URL(le,this.origin),se=pe.origin,j=b0(this.rewrite,pe);V=lh(pe),oh(j,se)?(K=j.href,W=!0):K=cu(lh(j))}else V=QS(le),K=V;return{publicHref:K,href:V,pathname:x,search:Z,searchStr:z,state:te,hash:D??"",external:W,unmaskOnReload:c.unmaskOnReload}},u=l(i);if(i.mask)u.maskedLocation=l({from:i.from,...i.mask});else if(this.options.routeMasks){const c=iE(u.pathname,this.processedTree);if(c){const h=Object.assign(lu(),c.rawParams),{from:p,params:g,...y}=c.route,m=uh(g,h);u.maskedLocation=l({from:i.from,...y,params:m})}}return!s&&i._fromLocation&&!u.maskedLocation&&this.staticLocations.set(i,u),u},this.commitLocation=async({viewTransition:i,ignoreBlocker:s,...l})=>{const u=l.maskedLocation??l;if(u.external)return Py(this,u.publicHref,{replace:l.replace,ignoreBlocker:s});let c;const h=Bn(this.latestLocation.href)===Bn(l.href)&&Tn(By(l.state),By(this.latestLocation.state)),p=this._commitPromise;let g;const y=new Promise(m=>{g=m});if(y.resolve=()=>{g(),p?.resolve()},this._commitPromise=y,h)this.load();else{let{maskedLocation:m,hashScrollIntoView:b,..._}=l;m&&(_={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{..._,search:_.searchStr,state:{..._.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(_.unmaskOnReload??this.options.unmaskOnReload??!1)&&(_.state.__tempKey=this.tempLocationKey)),_.state={..._.state,__hashScrollIntoViewOptions:b??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=i,c=l.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](_.publicHref,_.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.n=l.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:i,resetScroll:s,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,...h}={})=>{const p=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=p;const g=this.commitLocation({...p,viewTransition:u,replace:i,resetScroll:s,hashScrollIntoView:l,ignoreBlocker:c});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:i,reloadDocument:s,href:l,publicHref:u,...c})=>{const h=l?uo(l):void 0;if(h||s){if(i!==void 0||!l){const g=this.buildLocation({to:i,...c}),y=g.maskedLocation??g;l??=y.publicHref,u??=y.publicHref}return Py(this,!h&&u?u:l,c)}return this.buildAndCommitLocation({...c,href:l,to:i,_isNavigate:!0})},this.load=async i=>{this.updateLatestLocation(),i?.action&&(this._scroll.h=i.action.type==="PUSH"||i.action.type==="REPLACE"),await HE(this,i)},this.startViewTransition=i=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let l;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),h=typeof s.types=="function"?s.types(ku(u,c)):s.types;if(h===!1)return i();l={update:i,types:h}}else l=i;return document.startViewTransition(l).updateCallbackDone}return i()},this.invalidate=i=>{const s=this._committed,l=i?.filter,u=this._preloads,c=new Set,h=y=>{(!l||l(y))&&c.add(y.id)};
11s.forEach(h),this._cache.forEach(h),u?.forEach(y=>y.forEach(h)),this._tx?.[3].forEach(h);const p=[];for(const[y,m]of u??[])m.some(b=>c.has(b.id))&&(u.delete(y),p.push(y));const g=y=>{if(c.has(y.id)){const m=this.routesById[y.routeId],b={...y,invalid:!0,...(i?.forcePending||y.status==="error"||y.status==="notFound")&&zy(m)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,b}return y};this._committed=s.map(g);for(const[y,m]of this._cache)c.has(y)&&(m.invalid=!0,i?.forcePending&&(m.status="pending"));for(const y of c){const m=this._flights?.get(y);this._flights?.delete(y),m&&!m[2]&&p.push(m[1])}for(const y of p)y.abort();return this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.resolveRedirect=i=>{const s=i.options;let l=i.headers.get("Location")||s.href;if(!l){const c=this.buildLocation(s);l=(c.maskedLocation??c).publicHref||"/"}let u;if(l0.test(l)||(u=uo(l))&&!this.protocolAllowlist.has(u))throw new Error("Redirect blocked: unsafe protocol");if(u==="http:"||u==="https:"){const c=new URL(l);c.pathname.startsWith("//")?l=c.href:oh(c,this.origin)||(l=lh(c),u=void 0)}return u&&(s.reloadDocument=!0),s.href=l,i.headers.set("Location",l),i},this.clearCache=i=>{const s=this._cache,l=this._preloads,u=i?.filter,c=[],h=[];for(const[g,y]of s)(!u||u(y))&&(h.push(g),c.push(y));const p=[];for(const[g,y]of l??[])(!u||y.some(u))&&(p.push(g),c.push(...y));for(const g of h)s.delete(g);for(const g of p)l.delete(g);for(const g of c){const y=g._flight;g._flight=void 0,y&&!--y[2]&&(this._flights?.get(g.id)===y&&this._flights.delete(g.id),p.push(y[1]))}for(const g of p)g.abort()},this.loadRouteChunk=hi,this.preloadRoute=i=>IE(this,i),this.matchRoute=(i,s)=>{const l={...i,to:i.to?ky(i.from||"",i.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:i.params||{},leaveParams:!0},u=this.buildLocation(l),c=this.stores.status.get()==="pending";if(s?.pending&&!c)return!1;const h=s?.pending??!c?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=rE(u.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,h.pathname,this.processedTree);return!p||i.params&&!Tn(p.rawParams,i.params,!0)?!1:s?.includeSearch??!0?Tn(h.search,u.search,!0)?p.rawParams:!1:p.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=XS(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??vE,parseSearch:t.parseSearch??yE,protocolAllowlist:t.protocolAllowlist??VS}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=fo(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){const[i,s,l]=this.getMatchedRoutes(t.pathname);let u=i,c=!1;(l?l.path!=="/"&&s["**"]:Bn(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:c=!0);const h=c?DE(this.options.notFoundMode,u):void 0,p=new Array(u.length),g=this._committed,y=(b,_)=>{const S=g[_];return S?.routeId===b.id?S:b===this.options.notFoundRoute?g.find(E=>E.routeId===b.id):void 0};let m;for(let b=0;b<u.length;b++){const _=u[b],S=p[b-1];let E,A,T;{const W=S?.search??t.search,pe=S?._strictSearch??void 0;try{const se=fu(_.options.validateSearch,{...W})??void 0;E={...W,...se},A={...pe,...se}}catch(se){let j=se;if(se instanceof bu||(j=new bu(se.message,{cause:se})),e?.throwOnError)throw j;E=W,A={},T=j}}let x="",k="";try{x=_.options.loaderDeps?.({search:E})??"",k=x&&JSON.stringify(x)||""}catch(W){if(e?.throwOnError)throw W;T??=W}const P=lu(),Z=_._interpolation?xy(_.fullPath,_._interpolation,s,this.pathParamsDecoder,P):_.fullPath,z=_.id+Z+k,D=y(_,b),Y=this._cache.get(z)??(D?.id===z?D:void 0);m=Y?._strictParams??Object.assign(P,m);let te;if(!Y)try{Hy(_,m)}catch(W){if(Br(W)||s0(W)?te=W:te=new kE(W.message,{cause:W}),e?.throwOnError)throw te}const le=D?"stay":"enter";let V;if(Y)V={...Y,cause:le,search:xs(D?D.search:Y.search,E),_strictSearch:A,searchError:T};else{const W=zy(_)?"pending":"success";V={id:z,ssr:_.options.ssr,index:b,routeId:_.id,params:D?.params??m,_strictParams:m,pathname:Z,updatedAt:Date.now(),search:D?xs(D.search,E):E,_strictSearch:A,searchError:T,status:W,is
11Fetching:!1,error:void 0,paramsError:te,context:{},abortController:e?._controller??new AbortController,cause:le,loaderDeps:D?er(D.loaderDeps,x):x,invalid:!1,preload:!1,staticData:_.options.staticData||{},fullPath:_.fullPath}}const K=h===_.id;V._notFound&&!K&&(V.error=void 0),V._notFound=K,p[b]=V}for(let b=0;b<p.length;b++){const _=p[b];_.params=_.cause==="stay"?xs(_.params,m):m,e?._controller&&(_.context={})}return p}matchRoutesLightweight(t){const e=nr(this.stores.ids.get()),i=e?this.stores.byRoute.get(e).get():void 0,s=i?.id,l=this.lightweightCache.get(t);if(l&&l[0]===s)return l[1];const[u,c]=this.getMatchedRoutes(t.pathname),h=nr(u),p={...t.search};for(const b of u)try{Object.assign(p,fu(b.options.validateSearch,p))}catch{}const g=i&&i.routeId===h.id&&i.pathname===t.pathname;let y;if(g)y=i.params;else{const b=c;for(const _ of u)try{Hy(_,b)}catch{}y=b}const m=[u,h.fullPath,p,y];return this.lightweightCache.set(t,[s,m]),m}};async function Py(t,e,{replace:i,ignoreBlocker:s}){if(!u0(e,t.protocolAllowlist)){if(!s){const l=t.history._getBlockers();for(const u of l)if(u?.blockerFn&&await u.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:i?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),i?window.location.replace(e):window.location.href=e}}var bu=class extends Error{},kE=class extends Error{};function fu(t,e){if(t==null)return{};if("~standard"in t){const i=t["~standard"].validate(e);if(i instanceof Promise)throw new bu("Async validation not supported");if(i.issues)throw new bu(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function uh(t,e){if(t===void 0||t===!0)return e;const i=Object.create(null);return t===!1||t===null?i:typeof t=="function"?(Object.assign(i,e),Object.assign(i,t(i))):Object.assign(i,e,t)}function xE(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(i=>typeof i!="string"&&!ed.call(t,i[1]))}const ch=Object.freeze({});function NE(t,e){const i=[];for(let s=0;s<t.length;s++){const l=t[s].options;if("search"in l)l.search?.middlewares&&i.push(...l.search.middlewares);else if(l.preSearchFilters||l.postSearchFilters){const c=({search:h,next:p})=>{const g=p(l.preSearchFilters?l.preSearchFilters.reduce((y,m)=>m(y),h):h);return l.postSearchFilters?l.postSearchFilters.reduce((y,m)=>m(y),g):g};i.push(c)}const u=l.validateSearch;if(e&&u){const c=({search:h,next:p,meta:g})=>{const y=p(h);try{const m=fu(u,y);if(g&&m)for(const b in m)b in y||(g.defaulted||=new Map).set(b,m[b]);return{...y,...m}}catch{}return y};i.push(c)}}return i}function jE(t,e,i){const s=(l,u,c)=>{if(l>=t.length){if(!i.search)return{};if(i.search===!0)return u;const p=a0(i.search,u);return c&&(c.explicit=p),p}const h=(p,g)=>{if(g){const y=c||{};return{search:s(l+1,p,y),meta:y}}return s(l+1,p,c)};return t[l]({search:u,next:h,meta:c})};return s(0,e)}function DE(t,e){if(t!=="root"){let i;for(let s=e.length-1;s>=0;s--){const l=e[s];if(l.options.notFoundComponent)return l.id;i||=l.children&&l.id}if(i)return i}return Ys}function Hy(t,e){const i=t.options.params?.parse??t.options.parseParams;i&&Object.assign(e,i(e))}function Ch(t,e){return t.options[e]?.preload?.()}function LE(t,e){const i=Ch(t,"component");let s=Ch(t,"pendingComponent");return e&&(s?s=s.then(e):e()),i&&s?Promise.all([i,s]).then(()=>{}):i??s}function hi(t,e,i){const s=()=>e===!1?void 0:e?Ch(t,e):LE(t,i),l=t._lazy;if(l)return l===!0?s():l.then(s);if(!t.lazyFn)return s();const u=t.lazyFn().then(c=>{{const{id:h,...p}=c.options;Object.assign(t.options,p),t._lazy=!0}},c=>{throw t._lazy=void 0,c});return t._lazy=u,u.then(s)}function id(t){const e=t.findIndex(i=>i.status!=="success"||i._notFound)+1;return e&&e<t.length?t.slice(0,e):t}function S0(t){let e=t.length;for(let i=0;i<e;i++){const s=t[i];if(s._assetEnd!==void 0){e=Math.min(e,Math.max(i+1,s._assetEnd));continue}if(s.status!=="success"||s._notFound){e=i+1;break}}return e<t.length?t.slice(0,e):t}const Pn=0,di=1,xu=2,kt=3,ir=[4];function ho(t){return typeof t[0]=="number"}function pi(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((i,s)=>{const l=()=>s(e);e.addEventListener("abort",l,{once:!0}),Promise.resolve(t).then(i,s).then(()=>e.removeEventListener("abort",l))})}function En(t,e){return t.routesById[e.routeId]}function po(t,e,i){return s0(t)?[kt,t]:Br(t)?(t.routeId||=i,[xu,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{c
11ause:t})),[di,t]):[Pn,t]}function rd(t,e){let i=po(e,!0,t.id);if(i[0]!==di)return i;try{t.options.onError?.(i[1])}catch(s){i=po(s,!0,t.id)}return i}function ro(t,e,i,s,l){return l[0].signal.aborted?ir:od(t,e,i,rd(i,s),l)}async function ME(t,e,i,s,l,u){const[c,h]=e,p=i[0].signal,g=!!i[3];for(let y=i[6]??0;y<s;y++){const m=h[y],b=En(t,m);m.abortController=i[0];const _=h[y-1]?.context??t.options.context??{},S={params:m.params,location:c,navigate:x=>t.navigate({...x,_fromLocation:c}),buildLocation:t.buildLocation,cause:g?"preload":m.cause,abortController:i[0],preload:g,matches:h,routeId:b.id};try{const x=m._ctx||=b.options.context?b.options.context({...S,deps:m.loaderDeps,context:_})||{}:void 0;m.context={..._,...x}}catch(x){return fi(t,m),[y,ro(t,e,b,x,i)]}if(p.aborted)return[y,ir];const E=m.paramsError??m.searchError;if(E!==void 0)return fi(t,m),[y,ro(t,e,b,E,i)];const A=b.options.beforeLoad;if(!A)continue;const T=m.status;y>=u&&(m.status="pending",i[7]?.());try{go(t,m,"beforeLoad",i[0]);const x=A({...S,search:m.search,context:m.context,...t.options.additionalContext}),k=await(typeof x?.then=="function"?pi(x,p):x);if(p.aborted)return[y,ir];const P=od(t,e,b,po(k,!1,b.id),i);if(P[0]!==Pn)return fi(t,m),[y,P];m.context={...m.context,...k}}catch(x){return fi(t,m),[y,ro(t,e,b,x,i)]}finally{m.status=T,go(t,m,!1,i[0])}}l()}function sd(t,e,i){if(!(!i||--i[2])){if(t._flights?.get(e.id)===i){const s=t._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(e)&&s[3].some(l=>l.id===e.id)&&s[3].some(l=>l.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return i[1]}}function fi(t,e){const i=e._flight;e._flight=void 0,sd(t,e,i)?.abort()}function St(t,e,i,s){const l=[];for(const u of e)if(!i?.includes(u)){const c=u._flight;if(u._flight=void 0,s&&c?.[2]===1&&t._flights?.get(u.id)===c&&i?.some(h=>h.id===u.id))c[2]=0;else{const h=sd(t,u,c);h&&l.push(h)}}for(const u of l)u.abort()}function ad(t){for(const e of t){const i=e._flight;i&&i[2]++}}function go(t,e,i,s){if(e.isFetching=i,s&&t._tx?.[0]!==s)return;const l=t.stores.byRoute.get(e.routeId),u=l?.get();u?.id===e.id&&l.set({...u,isFetching:i})}function E0(t,e,i,s,l,u,c){const h=e[0];return{params:i.params,location:h,navigate:p=>t.navigate({...p,_fromLocation:h}),cause:c?"preload":i.cause,abortController:l,preload:c,deps:i.loaderDeps,parentMatchPromise:u,context:i.context,route:s,...t.options.additionalContext}}async function Iy(t,e,i,s,l,u,c){const h=c[0],p=h.signal;if(p.aborted)return ir;if(!l)return[Pn,void 0];let g=i._flight;go(t,i,"loader",h);try{if(!g){const y=new AbortController;g=[Promise.resolve().then(()=>l(E0(t,e,i,s,y,u,!!c[3]))).then(m=>po(m,!1,s.id),m=>po(m,!0,s.id)).then(m=>(m[0]!==Pn&&t._flights?.get(i.id)===g&&(t._flights.delete(i.id),g[2]||y.abort()),m[0]===di&&g[2]?rd(s,m[1]):m)),y,1],(t._flights??=new Map).set(i.id,g)}return i._flight=g,i.abortController=g[1],od(t,e,s,await pi(g[0],p),c)}catch(y){if(y!==p||!p.aborted)throw y;return fi(t,i),ir}finally{go(t,i,!1,h)}}function qy(t,e,i){e[0]!==kt&&(t.status="success",t.error=void 0,e[0]===Pn?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=i):t.invalid=!0)}function T0(t,e,i){const s=t._cache.get(e.id);if(s!==i||t._committed.some(u=>u.id===e.id&&u._flight===e._flight))return;const l={...e,_notFound:void 0,context:{}};l._flight&&l._flight[2]++,t._cache.set(e.id,l),s&&fi(t,s)}function $y(t,e){return e[0]===di||e[0]===xu?{...t,status:e[0]===di?"error":"notFound",error:e[1],_flight:void 0}:t}function UE(t,e,i,s,l,u,c){const h=e[1][i],p=En(t,h),g=!!u[3],y=t._cache.get(h.id);let m,b=!1,_;try{if(h.status==="success"&&(m=p.options.shouldReload,typeof m=="function"&&(m=m(E0(t,e,h,p,u[0],l,g))),u[0].signal.aborted&&(_=ir)),!_)if(h.status!=="success")b=!0;else{const K=g||h.preload?p.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:p.options.staleTime??t.options.defaultStaleTime??0;b=!!(h.invalid||m||m===void 0&&Date.now()-h.updatedAt>=K&&(u[5]||h.cause==="enter"||u[2].some(W=>W.routeId===h.routeId&&W.id!==h.id)))}}catch(K){h.invalid=!0,fi(t,h),_=ro(t,e,p,K,u)}const S=p.options.loader,E=typeof S=="function",A=E?S:S?.handler,T=!g||p.options.preload!==!1;let x=T&&S?t._flights?.get(h.id):void 0;x===h._flight||_?x=void 0:x&&!b&&!g&&m===void 0?b=!0:b||(x=void 0);const k=!!(S&&b&&h.status==="success"&&!g&&!u[4]&&((E?void 0:S.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),P=b&&T,Z=P&&!k&&(h.status!=="success"||!!S),z=i>=c?u[7]:void 0,D=p.lazyFn&&p._lazy!==!0?z:void 0;if(P&&!S&&(h.invalid=!1,h.updatedAt=Date.now()),x&&x[2]++,Z){const K=h._flight;h._flight=x,sd(t,h,K)?.abort(),i>=c&&(h.status="pending"),z?.()}P||(h.isFetching=!1);const Y=!_&&Z?Iy(t,e,h,p,A,l,u).then(K=>(qy(h,K,g),K[0]===Pn&&(S&&!u[0].signal.aborted&&T0(t,h,y),i>=c&&(h.status="pending")),K)):Promise.resolve(_??[Pn,h.loaderData]),te=(async()=>{try{const W=hi(p,void 0,D);W&&await pi(W,u[0].signal)}catch(W){if(!e[1].some((pe,se)=>se<=i&&(pe.status==="error"||pe.status==="notFound"||pe._notFound)))return[i,ro(t,e,p,W,u)]}const K=await Y;Z&&K[0]===Pn&&h.status==="pending"&&!u[0].signal.aborted&&(h.status="success",z?.())})();if(s.push([i,Y,te]),!k)return Y.then(K=>$y(h,K));const le={...h,status:"pending",preload:!1,_flight:x};h.invalid=!1,h.isFetching="loader";const V=Iy(t,e,le,p,A,l,u).then(K=>(h.isFetching=!1,qy(le,K,!1),K));return(e[2]??=[]).push([i,V,te,le]),V.then(K=>$y(le,K))}async function kh(t,e,i,s,l=0){const u=i?.[1][1];let c=u?.routeId?e.findIndex(h=>h.routeId===u.routeId):i?.[0]??e.length-1;c<0&&(c=0);for(let h=c;h>=0;h--){const p=En(t,e[h]);try{const g=hi(p,!1);g&&await pi(g,s)}catch(g){if(g===s&&s.aborted)throw g}if(p.options.notFoundComponent)return h}return u?.routeId?c:l}function zr(t,e){e[2]&&(St(t,e[2].map(i=>i[3])),e[2]=void 0)}async function Gy(t,e,i,s){let l;try{await Promise.all(t.map(u=>u[1].then(async c=>{const h=u[0];if(!(s&&h>=await s)){if(c[0]>=kt)throw[h,c];!l&&c[0]!==Pn&&(l=[h,c],await Promise.all((i??[]).map(p=>{if(!(p[0]<=h))return p[1].then(g=>{if(g[0]===kt)throw[p[0],g]})})))}})))}catch(u){return u}return e??l}function od(t,e,i,s,l,u){for(;s[0]===kt;){const c=s[1],h=c.options;try{if((h.href||c.headers.has("Location"))&&(t.resolveRedirect(c),h.reloadDocument)||(h.reloadDocument?l[3]:l[1]>=20))return s;const p=t.buildLocation({...h,_fromLocation:e[0],_includeValidateSearch:!0}),g=p.maskedLocation??p;if(g.external){const y=c.clone();return y.options={...h},y.headers.set("Location",g.publicHref),t.resolveRedirect(y),l[3]?[kt,y]:[
11kt,y,g]}return[kt,c,p]}catch(p){s=u?[di,p]:rd(i,p),u=!0}}return s}async function A0(t,e,i,s,l,u){const c=e[1];let h=await l,p=!1;const g=c.findIndex(_=>_._notFound),y=_=>_[1][0]===xu?kh(t,c,_,s.signal):_[0];let m=g<0?c.length:g;if((h?.[1][0]??0)>=kt)m=0;else if(h){m=h[2]??=await y(h);for(const _ of i){if(_[0]>=m)break;const S=await _[1];if(S[0]!==Pn&&S[0]<kt&&!("loaderData"in c[_[0]])){h=[_[0],S],m=h[2]=await y(h);break}}}for(const _ of i){if(_[0]>=m)break;const S=await _[2];if(S){h=S;break}}if((h?.[1][0]??0)>=kt){const _=h[1];if(_[0]!==kt||_[1].options.reloadDocument||_[2])return zr(t,e),_;p=!0,h=[0,[di,new Error("Too many redirects")]]}const b=h?h[2]??await y(h):g;if(b>=0){const _=h?.[1],S=_?.[0],E=c[b],A=_?.[1],T=()=>{_&&(E._notFound=void 0,S===di?E.status="error":(A.routeId=E.routeId,E.routeId===t.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=A,E.isFetching=!1)};T(),_||u?.();const x=En(t,E);try{await pi(_?Promise.resolve().then(()=>hi(x,S===di?"errorComponent":"notFoundComponent")):Promise.all([hi(x),hi(x,"notFoundComponent")]),s.signal)}catch(k){if(k===s.signal&&s.signal.aborted)return zr(t,e),ir}_?p&&(s.abort(),await Promise.all([...i.map(k=>k[1]),...i.map(k=>k[2]),...(e[2]??[]).map(k=>k[1])]),zr(t,e),St(t,c),T()):E.status="success"}return e}async function ld(t,e,i,s=0,l=e[1].length){const u=e[1];for(let c=s;c<l;c++){const h=u[c],p=En(t,h).options;if(p.head||p.scripts)try{const g={ssr:t.options.ssr,matches:u,match:h,params:h.params,loaderData:h.loaderData},[y,m]=await pi(Promise.all([p.head?.(g),p.scripts?.(g)]),i);h.meta=y?.meta,h.links=y?.links,h.headScripts=y?.scripts,h.styles=y?.styles,h.scripts=m}catch(g){if(g===i&&i.aborted)break;console.error(g)}if(h.status!=="success"||h._notFound)break}return e}async function R0(t,e,i,s){const l=[e,i],u=s[0].signal;let c;try{const h=t.stores.matches.get();let p=i.findIndex(T=>T._notFound);if(t.options.notFoundMode!=="root"&&p>=0){const T=await kh(t,i,void 0,u,p);i[p]._notFound=void 0,i[T]._notFound=!0,p=T}let g=p<0?i.length:p+1,y=0;for(;y<g&&y!==p;){const T=i[y],x=s[2][y],k=h[y];if(x?.id!==T.id||x.status!=="success"||T.preload||k?.id!==T.id||k.status!=="success"||(y++,x._notFound||k._notFound))break}const m=[],b=s[6]??0;let _=b?Promise.resolve(i[b-1]):void 0;const S=()=>{for(let T=b;T<g&&!u.aborted;T++)_=UE(t,l,T,m,_,s,y)},E=await ME(t,l,s,g,S,y);if(E){if(s[4]=!0,g=E[0],E[1][0]===xu){const T=await kh(t,i,E,u);E[2]=T,g=Math.min(g,T+1)}else E[1][0]>=kt&&(g=0);S()}if(!u.aborted&&!s[3]){const T=[];for(const[x,k]of t._flights??[])k[2]||(t._flights.delete(x),T.push(k[1]));for(const x of T)x.abort()}const A=A0(t,l,m,s[0],Gy(m,E,l[2]),s[7]);l[2]?.length&&(l[3]=Gy(l[2],void 0,void 0,A.then(T=>ho(T)?0:id(i).length,()=>0))),c=await A}catch(h){if(zr(t,l),h===u&&u.aborted)return ir;throw h}return ho(c)?c:ld(t,c,u,s[6]===i.length?s[6]:0)}function xh(t,e){if(t._tx!==e)return;const i=e[3],s=t.stores.matches.get();let l=t._pending;for(let u=0;u<i.length;u++){const c=i[u],h=c.status==="success"&&!c._notFound,p=s[u]?.id===c.id&&s[u]?.status==="pending";if(h&&!p)continue;const g=En(t,c),y=h||c.invalid?0:g.options.pendingMs??t.options.defaultPendingMs,m=g.options.pendingComponent??t.options.defaultPendingComponent;if(!m||typeof y!="number"||y===1/0){l&&(l[0]=e,l[2]=0,l[4]=!0);return}const b=g.options.pendingMinMs??t.options.defaultPendingMinMs??0;let _=!1;if(l?.[1]===c.id?(_=l[0]!==e,l[0]=e):(clearTimeout(l?.[3]),t._pending=l=void 0),l||(t._pending=l=[e,c.id,p?Date.now()+b:e[4]+y,void 0,p||void 0,m]),l[4]&&!_&&l[5]===m)return;if(l[5]=m,!l[4]){clearTimeout(l[3]);const A=l[2]-Date.now();if(A>0){l[3]=setTimeout(()=>xh(t,e),A);return}l[2]=0}const S=i.map(A=>({...A,_flight:void 0}));S[u].status="pending";const E=l[4]=t.startTransition(()=>t.stores.setMatches(S),S).then(A=>(A&&t._pending===l&&l[4]===E&&!l[2]&&(l[2]=Date.now()+b),A));return}}function Za(t,e){const i=t._pending;(t._tx===e||!t._tx?.[3].some(s=>s.id===i?.[1]))&&(clearTimeout(i?.[3]),t._pending=void 0)}async function Vy(t,e){const i=t._pending;if(!i)return;clearTimeout(i[3]);const s=i[2]-Date.now();if(!i[4]||s<=0||!id(e[3]).some(u=>u.id===i[1]))return;let l;try{await pi(new Promise(u=>{l=setTimeout(u,s)}),e[0].signal)}catch{}clearTimeout(l)}function O0(t,e){t._committed=e,t.stores.setMatches(e)}function zE(t,e,i,s){const l=t._committed,u=t._lifecycleEnd,c=t._cache;for(const y of i)y.preload=!1,s&&(y._assetEnd=void 0);const h=id(i).length,p=new Map;{const y=Date.now(),m=new Set;for(let b=0;b<i.length;b++){const _=i[b];(b<h||_.status==="success")&&m.add(_.id)}for(const b of[...l,...c.values()]){if(b.status!=="success"||m.has(b.id))continue;const _=En(t,b);!_.options.loader||y-b.updatedAt>=(b.preload?_.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:_.options.gcTime??t.options.defaultGcTime??3e5)||p.set(b.id,c.get(b.id)===b?b:{...b,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=p;const g=t._lifecycleEnd=w0(i);O0(t,i),St(t,[...c.values(),...l].filter(y=>
11y._flight&&p.get(y.id)!==y),i),OE(t,l,i,u,g,e)}async function Fl(t,e){let i=t._tx;for(;i&&i!==e;)e=i,await i[5],i=t._tx}function C0(t,e,i){const s=i[1].options,l=i[2];if(!l)return t.navigate({...s,replace:!0,ignoreBlocker:!0});if(s.reloadDocument)return t.navigate({href:(l.maskedLocation??l).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});l._redirects=e[1]+1,t._pendingLocation=l;const u=t.commitLocation({...l,viewTransition:s.viewTransition,replace:!0,resetScroll:s.resetScroll,hashScrollIntoView:s.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===l&&(t._pendingLocation=void 0)}),u}async function BE(t,e,i,s,l){const u=i.map(p=>({...p}));ad(u);for(const p of s)fi(t,u[p[0]]),u[p[0]]=p[3];const c=[e[2],u];let h;try{h=await A0(t,c,s,e[0],l)}catch(p){throw St(t,u),p}if(ho(h)){St(t,u),h[0]===kt&&t._tx===e&&t._committed===i&&await C0(t,e,h);return}if(await ld(t,h,e[0].signal),t._tx!==e||t._committed!==i){St(t,u);return}for(const p of u){const g=t._cache.get(p.id);g?._flight&&g._flight===p._flight&&(t._cache.delete(p.id),fi(t,g))}O0(t,u),St(t,i,u)}async function PE(t,e,i,s,l,u){const c=await R0(t,e[2],e[3],[e[0],e[1],t._committed,void 0,l,i,u,s]);if(ho(c)){const m=c[0]===kt&&t._tx===e;if((!m||c[1].options.reloadDocument)&&Za(t,e),St(t,e[3]),e[3]=[],!m)return;if(t._tx!==e){Za(t,e);return}await C0(t,e,c);return}const h=c[1];if(t._tx===e&&await Vy(t,e),t._tx!==e){Za(t,e),St(t,h),zr(t,c);return}const p=e[2],g=ku(p,t.stores.resolvedLocation.get()),y=c[2];await t.startViewTransition(async()=>{if(t._tx===e&&await Vy(t,e),t._tx!==e){Za(t,e),St(t,h),zr(t,c);return}const m=()=>{Za(t,e),zE(t,e,h,u),t._tx===e&&(t.emit({type:"onLoad",...g}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...g}))},b=await t.startTransition(m,h);if(t._tx!==e){zr(t,c);return}y?.length&&BE(t,e,h,y,c[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(p),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...g}),b&&t._tx===e&&t.emit({type:"onRendered",...g})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function HE(t,e){const i=t._tx,s=t.stores.resolvedLocation.get(),l=s??t.stores.location.get(),u=t.latestLocation,c=t._pendingLocation,h=c?.href===u.href?c._redirects??0:0,p=t._handoff,g=p?.[0](),y=new AbortController,m=t._preflight;if(t._preflight=y,g||p?.[1](),m?.abort(),!y.signal.aborted){const P=ku(u,s);t.emit({type:"onBeforeNavigate",...P}),y.signal.aborted||t.emit({type:"onBeforeLoad",...P})}if(y.signal.aborted){await Fl(t,i);return}const b=l.href===u.href;let _=y;const S=t.matchRoutes(u,{_controller:y});ad(S);const E=g?p[1](S):void 0;if(E?_=g:g?.abort(),y.signal.aborted){St(t,S),await Fl(t,i);return}t._preflight=void 0;let A;const T=()=>PE(t,k,b,()=>xh(t,k),e?.sync,E),x=e?.sync?new Promise(P=>A=P):Promise.resolve().then(T),k=[_,h,u,S,Date.now(),x.then(()=>Fl(t,k))];if(t._tx=k,i){for(const P of t.stores.matches.get()){if(t._tx!==k)break;P.isFetching&&go(t,P,!1)}i[0].abort(),St(t,i[3],k[3],!0)}if(t._tx!==k){St(t,k[3]),k[3]=[],A?.(),await Fl(t,k);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(u)}),(E||!t._committed.length&&S[0]?.status!=="success"&&!S.some(P=>P._notFound))&&xh(t,k),A?.(T()),await k[5]}async function IE(t,e){let i=t.buildLocation(e);for(let s=0;;s++){const l=t._committed,u=new AbortController;let c,h,p;try{try{c=t.matchRoutes(i,{_controller:u}),ad(c),h=(t._preloads??=new Map).set(u,c),p=await R0(t,i,c,[u,s,l,!0])}finally{h&&(h=h.delete(u),St(t,c)),u.abort()}if(!ho(p))return p[1];if(!h||p.length<3)return;i=p[2]}catch(g){Br(g)||console.error(g);return}}}async function qE(t){const e=window.$_TSR,i=t.options.serializationAdapters;i?.length&&(e.t=new Map(i.map(V=>[V.key,V.fromSerializable])),e.buffer.forEach(V=>V())),e.initialized=!0;const s=e.router;t.ssr={manifest:s.manifest},t.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const l=s.matches,u=new AbortController,c=t._preflight;t._preflight=u,c?.abort();const h=()=>t._preflight===u;let p,g,y,m;try{if(await pi(t.options.hydrate?.(s.dehydratedData),u.signal),!h())return;const V=t.history.location;y=V.href,m=V.state,t.updateLatestLocation(),p=t.latestLocation,t.stores.location.set(p),g=t.matchRoutes(p,{_controller:u})}catch(V){if(h()&&(t._preflight=void 0),u.abort(V),V!==u.signal)throw V}if(!h())return;const b=[];let _,S=0;const E=V=>{S=Math.min(S,V+1);const K=b.splice(V);for(const W of K)En(t,W).options.loader&&(W.status==="success"||!W.invali
11d&&"loaderData"in W)&&T0(t,{...W,status:"success",error:void 0,preload:!0},t._cache.get(W.id));St(t,K)},A=l.length>g.length?g.findIndex(V=>V._notFound)+1:l.length;let T=!1;for(let V=0;V<A;V++){const K=g[V],W=l[V];if(typeof W.i!="string"||IS(W.i)!==K.id){_??=V;break}S=V+1;const pe=En(t,K);if(("l"in W||W.s==="success"&&W.e===void 0&&pe.options.loader)&&(K.loaderData=W.l),K.status=W.s,K.ssr=W.ssr,pe.options.ssr=K.ssr,K.updatedAt=W.u,K.error=W.e,K._notFound||=W.g,K.status==="error"||K.status==="notFound"||K._notFound){T=!0,b.push(K),(K.ssr===!1||K.ssr==="data-only")&&(_??=V);break}if(K.status==="pending"){_??=V;break}b.push(K),K.ssr==="data-only"&&(_??=V)}!T&&b.length===A&&A<g.length&&(_=A);const x=b.map(async V=>{try{const K=En(t,V);return await(V._notFound?Promise.all([hi(K),hi(K,"notFoundComponent")]):hi(K,V.status==="error"?"errorComponent":V.status==="notFound"?"notFoundComponent":void 0)),!0}catch{return!1}});let k=0;try{for(;k<x.length&&await pi(x[k],u.signal);)k++}catch{return}if(!h())return;k<b.length&&E(k);const P=Math.max(_===b.length?b.length+1:b.length,k<x.length?k:S);for(let V=0;V<P;V++){const K=g[V],W=En(t,K),pe=g[V-1]?.context??t.options.context??{};let se;if(W.options.context){try{se=K._ctx=W.options.context({deps:K.loaderDeps,params:K.params,context:pe,location:p,navigate:j=>t.navigate({...j,_fromLocation:p}),buildLocation:t.buildLocation,cause:K.cause,abortController:u,preload:!1,matches:g,routeId:W.id})||{}}catch{if(!h())return;if(K.status!=="error"&&K.status!=="notFound"&&!K._notFound){_=Math.min(_??V,V),E(V);break}}if(!h())return}K.context={...pe,...se,...b[V]&&l[V].b}}if(await ld(t,[p,g],u.signal,0,S),!h())return;const Z=_!==void 0||b.length<A,z=T&&b.length===A?g:b;let D=Z?g:z,Y;if(Z&&_!==void 0){const V=D[_];Y=V.ssr==="data-only"&&S>_+1?S:void 0,D=D.slice(),D[_]={...V,status:"pending",ssr:V.ssr==="data-only"?"data-only":!1,_assetEnd:Y}}const te=()=>{const V=t.history.location;return Z&&!t._tx&&V.href===y&&V.state===m&&t._committed===z&&z.length&&!u.signal.aborted?u:void 0},le=[te,V=>{if(t._handoff!==le)return;t._handoff=void 0;const K=z.length;if(!V||!te()||z.some((se,j)=>se.id!==V[j]?.id)){u.abort();return}let W=Y;if(W!==void 0){for(let se=K;se<W;se++)if(g[se]?.id!==V[se]?.id){W=se>_+1?se:void 0;break}}const pe=z.map(se=>({...se}));W!==void 0&&(pe[_]._assetEnd=W),St(t,V.splice(0,K,...pe));for(let se=K;se<V.length;se++){const j=V[se],F=g[se];F?.id===j.id&&F._ctx&&(j._ctx=F._ctx),j.abortController=u}return K}];t._committed=z,t._lifecycleEnd=w0(z),t._handoff=le,t._preflight=void 0,t.batch(()=>{t.stores.setMatches(D),t.stores.status.set("idle"),Z||t.stores.resolvedLocation.set(t.stores.location.get())})}const gi=Symbol.asyncIterator,k0=Symbol.hasInstance,Qs=Symbol.isConcatSpreadable,mi=Symbol.iterator,x0=Symbol.match,N0=Symbol.matchAll,j0=Symbol.replace,D0=Symbol.search,L0=Symbol.species,M0=Symbol.split,U0=Symbol.toPrimitive,Js=Symbol.toStringTag,z0=Symbol.unscopables,B0={[gi]:0,[k0]:1,[Qs]:2,[mi]:3,[x0]:4,[N0]:5,[j0]:6,[D0]:7,[L0]:8,[M0]:9,[U0]:10,[Js]:11,[z0]:12},$E={0:gi,1:k0,2:Qs,3:mi,4:x0,5:N0,6:j0,7:D0,8:L0,9:M0,10:U0,11:Js,12:z0},GE={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},VE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},KE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function ke(t,e,i,s,l,u,c,h,p,g,y,m){return{t,i:e,s:i,c:s,m:l,p:u,e:c,a:h,f:p,b:g,o:y,l:m}}function sr(t){return ke(2,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const P0=sr(2),H0=sr(3),FE=sr(1),YE=sr(0),QE=sr(4),JE=sr(5),XE=sr(6),ZE=sr(7),WE=64,eT=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function tT(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case`
12`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function Pr(t){if(t.length>=WE&&!eT.test(t))return JSON.stringify(t).slice(1,-1);let e="",i=0,s;for(let l=0,u=t.length;l<u;l++)s=tT(t[l]),s&&(e+=t.slice(i,l)+s,i=l+1);return i===0?e=t:e+=t.slice(i),e}function nT(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
13`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function ar(t){return typeof t=="string"&&!t.includes("\\")?t:t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,nT)}
13const iT={parsing:1,serialization:2,deserialization:3};function rT(t){return`Seroval Error (step: ${iT[t]})`}const sT=(t,e)=>rT(t);var I0=class extends Error{constructor(t,e){super(sT(t)),this.cause=e}},Ky=class extends I0{constructor(t){super("parsing",t)}},aT=class extends I0{constructor(t){super("deserialization",t)}};function yi(t){return`Seroval Error (specific: ${t})`}var Hr=class extends Error{constructor(t){super(yi(1)),this.value=t}},ud=class extends Error{constructor(t){super(yi(2))}},oT=class extends Error{constructor(t){super(yi(3))}},Nu=class extends Error{constructor(t){super(yi(4))}},lT=class extends Error{constructor(t){super(yi(5)),this.value=t}},uT=class extends Error{constructor(t){super(yi(6))}},cT=class extends Error{constructor(t){super(yi(7))}},ct=class extends Error{constructor(t){super(yi(8))}},q0=class extends Error{constructor(t){super(yi(9))}};const Yl="__SEROVAL_REFS__",$0=new Map,$s=new Map;function G0(t){return $0.has(t)}function fT(t){return $s.has(t)}function hT(t){if(G0(t))return $0.get(t);throw new lT(t)}function dT(t){if(fT(t))return $s.get(t);throw new uT(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,Yl,{value:$s,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Yl,{value:$s,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Yl,{value:$s,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Yl,{value:$s,configurable:!0,writable:!1,enumerable:!1});function cd(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function pT(t){const e=VE[cd(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function V0(t,e){let i=pT(t);const s=Object.getOwnPropertyNames(t);for(let l=0,u=s.length,c;l<u;l++)c=s[l],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(i=i||{},i[c]=t[c]):(i=i||{},i[c]=t[c]));return i}function K0(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function gT(t){switch(t){case Number.POSITIVE_INFINITY:return JE;case Number.NEGATIVE_INFINITY:return XE}return t!==t?ZE:Object.is(t,-0)?QE:ke(0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function F0(t){return ke(1,void 0,Pr(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function mT(t){return ke(3,void 0,""+t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function yT(t){return ke(4,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function vT(t,e){const i=e.valueOf();return ke(5,t,i!==i?"":e.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Qi(t,e,i){return ke(36,t,i.toString(),e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function bT(t,e){return ke(6,t,void 0,Pr(e.source),e.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _T(t,e){return ke(17,t,B0[e],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function wT(t,e){return ke(18,t,Pr(hT(e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ST(t,e,i){return ke(25,t,i,Pr(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ET(t,e,i){return ke(9,t,void 0,void 0,void 0,void 0,void 0,i,void 0,void 0,K0(e),void 0)}function TT(t,e){return ke(21,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}const fd=1e6;function AT(t,e,i){if(e.length>fd)throw new Hr(e);return ke(15,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,i,e.byteOffset,void 0,e.length)}function RT(t,e,i){if(e.length>fd)throw new Hr(e);return ke(16,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,i,e.byteOffset,void 0,e.length)}function OT(t,e,i){if(e.byteLength>fd)throw new Hr(e);return ke(20,t,void 0,void 0,void 0,void 0,void 0,void 0,i,e.byteOffset,void 0,e.byteLength)}function CT(t,e,i){return ke(13,t,cd(e),void 0,Pr(e.message),i,void 0,void 0,void 0,void 0,void 0,void 0)}function kT(t,e,i){return ke(14,t,cd(e),void 0,Pr(e.message),i,void 0,void 0,void 0,void 0,void 0,void 0)}function xT(t,e){return ke(7,t,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,void 0)}function NT(t,e){return ke(28,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function jT(t,e){return ke(30,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function DT(t,e,i){return ke(31,t,void 0,void 0,void 0,void 0,void 0,i,e,void 0,void 0,void 0)}function LT(t,e){return ke(32,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function MT(t,e){return ke(33,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function UT(t,e){return ke(34,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function zT(t,e,i,s){return ke(35,t,i,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,s)}var BT=class{constructor(t,e){this.value=t,this.replacement=e}};const hd=()=>{const t={p:0,s:0,f:0};return t.p=new Promise((e,i)=>{t.s=e,t.f=i}),t},PT=t=>e=>()=>{let i=0;const s={[t](){return s},next(){if(i>e.d)return{done:!0,value:void 0};const l=i++,u=e.v[l];if(l===e.t)throw u;return{done:l===e.d,value:u}}};return s},HT=(t,e)=>i=>()=>{let s=0,l=-1,u=!1;const c=[],h=[],p={finalize(y=0,m=h.length){for(;y<m;y++)h[y].s({done:!0,value:void 0})}};i.on({next(y){const m=h.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw(y){const m=h.shift();m&&m.f(y),p.finalize(),l=c.length,u=!0,c.push(y)},return(y){const m=h.shift();m&&m.s({done:!0,value:y}),p.finalize(),l=c.length,c.push(y)}});const g={[t](){return g},next(){if(l===-1){const b=s++;if(b>=c.length){const _=e();return h.push(_),_.p}return{done:!1,value:c[b]}}if(s>l)return{done:!0,value:void 0};const y=s++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},IT=t=>{const e=atob(t),i=e.length,s=new Uint8Array(i);for(let l=0;l<i;l++)s[l]=e.charCodeAt(l);return s.buffer};var Y0=class{constructor(t,e,i){this.v=t,this.t=e,this.d=i}};function Q0(t){return t instanceof Y0}function J0(t,e,i){return new Y0(t,e,i)}function qT(t){const e=[];let i=-1,s=-1;const l=t[mi]();for(;;)try{const u=l.next();if(e.push(u.value),u.done){s=e.length-1;break}}catch(u){i=e.length,s=i,e.push(u);break}return J0(e,i,s)}const $T=PT(mi);function GT(t){return $T(t)}const VT={},KT={},FT={0:{},1:{},2:{},3:{}
13,4:{},5:{}};function X0(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function YT(t,e){X0(t,e),e.add(t)}function Wa(t,e,i){X0(t,e),e.set(t,i)}function Gs(t,e,i){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function Be(t,e){return t.get(Gs(t,e))}function js(t,e,i){return t.set(Gs(t,e),i),i}var Vs=new WeakMap,oi=new WeakMap,li=new WeakMap,hu=new WeakMap,yn=new WeakMap,eo=new WeakSet,Z0=class{constructor(){YT(this,eo),Wa(this,Vs,[]),Wa(this,oi,[]),Wa(this,li,!0),Wa(this,hu,!1),Wa(this,yn,0)}on(t){let e=Be(li,this),i=0;if(e){for(;i<Be(yn,this)&&Be(oi,this)[i];i++);if(i===Be(yn,this)){var s;js(yn,this,(s=Be(yn,this),s++,s))}Be(oi,this)[i]=t}return Gs(eo,this,QT).call(this,t),()=>{if(Be(li,this)&&e){for(e=!1,Be(oi,this)[i]=void 0;Be(yn,this)>0&&!Be(oi,this)[Be(yn,this)-1];){var l;js(yn,this,(l=Be(yn,this),l--,l))}Be(oi,this).length=Be(yn,this)}}}next(t){Be(li,this)&&(Be(Vs,this).push(t),Gs(eo,this,fh).call(this,t,"next"))}throw(t){Be(li,this)&&(Be(Vs,this).push(t),Gs(eo,this,fh).call(this,t,"throw"),js(li,this,!1),js(hu,this,!1),Be(oi,this).length=0)}return(t){Be(li,this)&&(Be(Vs,this).push(t),Gs(eo,this,fh).call(this,t,"return"),js(li,this,!1),js(hu,this,!0),Be(oi,this).length=0)}};function fh(t,e){for(let s=0;s<Be(yn,this);s++){var i;(i=Be(oi,this)[s])===null||i===void 0||i[e](t)}}function QT(t){for(let e=0,i=Be(Vs,this).length;e<i;e++){const s=Be(Vs,this)[e];!Be(li,this)&&e===i-1?t[Be(hu,this)?"return":"throw"](s):t.next(s)}}function dd(t){return t instanceof Z0}function Oo(){return new Z0}function JT(t,e){const i=Oo(),s=t[gi]();let l=!1,u=!1;async function c(){try{for(;!l;){const h=await s.next();if(h.done){u=!0,i.return(h.value);break}i.next(h.value)}}catch(h){u=!0,i.throw(h)}}return c().catch(()=>{}),i}const XT=HT(gi,hd);function ZT(t){return XT(t)}async function WT(t){try{return[1,await t]}catch(e){return[0,e]}}function e1(t,e){var i;return{plugins:e.plugins,mode:t,marked:new Set,features:127^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:(i=e.compactArrayBufferViews)!==null&&i!==void 0?i:!1}}function du(t,e){t.marked.add(e)}function t1(t,e){const i=t.refs.size;return t.refs.set(e,i),i}function ju(t,e){const i=t.refs.get(e);return i!=null?(du(t,i),{type:1,value:yT(i)}):{type:0,value:t1(t,e)}}function pd(t,e){const i=ju(t,e);return i.type===1?i:G0(e)?{type:2,value:wT(i.value,e)}:i}function Lr(t,e){const i=pd(t,e);if(i.type!==0)return i.value;if(e in B0)return _T(i.value,e);throw new Hr(e)}function Du(t,e){const i=ju(t,FT[e]);return i.type===1?i.value:ke(26,i.value,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function n1(t){const e=ju(t,VT);return e.type===1?e.value:ke(27,e.value,void 0,void 0,void 0,void 0,void 0,void 0,Lr(t,mi),void 0,void 0,void 0)}function i1(t){const e=ju(t,KT);return e.type===1?e.value:ke(29,e.value,void 0,void 0,void 0,void 0,void 0,[Du(t,1),Lr(t,gi)],void 0,void 0,void 0,void 0)}function r1(t,e,i,s){return ke(i?11:10,t,void 0,void 0,void 0,s,void 0,void 0,void 0,void 0,K0(e),void 0)}function s1(t,e,i,s){return ke(8,e,void 0,void 0,void 0,void 0,{k:i,v:s},void 0,Du(t,0),void 0,void 0,void 0)}function gd(t,e){if(!t.compactArrayBufferViews)return e;const i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice().buffer,s=e.constructor;return new s(i)}function a1(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");const e=new Uint8Array(t);if(typeof e.toBase64=="function")return e.toBase64();let i="";for(let s=0,l=e.length;s<l;s++)i+=String.fromCharCode(e[s]);return btoa(i)}function o1(t,e,i){return ke(19,e,a1(i),void 0,void 0,void 0,void 0,void 0,Du(t,5),void 0,void 0,void 0)}function l1(t,e){return{base:e1(t,e),child:void 0}}var u1=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return st(this._p,this.depth,t)}};async function c1(t,e,i){const s=[];for(let l=0,u=i.length;l<u;l++)l in i?s[l]=await st(t,e,i[l]):s[l]=0;return s}async function f1(t,e,i,s){return ET(i,s,await c1(t,e,s))}
13async function md(t,e,i){const s=Object.entries(i),l=[],u=[];for(let c=0,h=s.length;c<h;c++)l.push(Pr(s[c][0])),u.push(await st(t,e,s[c][1]));return mi in i&&(l.push(Lr(t.base,mi)),u.push(NT(n1(t.base),await st(t,e,qT(i))))),gi in i&&(l.push(Lr(t.base,gi)),u.push(jT(i1(t.base),await st(t,e,JT(i))))),Js in i&&(l.push(Lr(t.base,Js)),u.push(F0(i[Js]))),Qs in i&&(l.push(Lr(t.base,Qs)),u.push(i[Qs]?P0:H0)),{k:l,v:u}}async function hh(t,e,i,s,l){return r1(i,s,l,await md(t,e,s))}async function h1(t,e,i,s){return TT(i,await st(t,e,s.valueOf()))}async function d1(t,e,i,s){return s=gd(t.base,s),AT(i,s,await st(t,e,s.buffer))}async function p1(t,e,i,s){return s=gd(t.base,s),RT(i,s,await st(t,e,s.buffer))}async function g1(t,e,i,s){return s=gd(t.base,s),OT(i,s,await st(t,e,s.buffer))}async function Fy(t,e,i,s){const l=V0(s,t.base.features);return CT(i,s,l?await md(t,e,l):void 0)}async function m1(t,e,i,s){const l=V0(s,t.base.features);return kT(i,s,l?await md(t,e,l):void 0)}async function y1(t,e,i,s){const l=[],u=[];for(const[c,h]of s.entries())l.push(await st(t,e,c)),u.push(await st(t,e,h));return s1(t.base,i,l,u)}async function v1(t,e,i,s){const l=[];for(const u of s.keys())l.push(await st(t,e,u));return xT(i,l)}async function W0(t,e,i,s){const l=t.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){const h=l[u];if(h.parse.async&&h.test(s))return ST(i,h.tag,await h.parse.async(s,new u1(t,e),{id:i}))}}async function b1(t,e,i,s){const[l,u]=await WT(s);return ke(12,i,l,void 0,void 0,void 0,void 0,void 0,await st(t,e,u),void 0,void 0,void 0)}function _1(t,e,i,s,l){const u=[],c=i.on({next:h=>{du(this.base,e),st(this,t,h).then(p=>{u.push(LT(e,p))},p=>{l(p),c()})},throw:h=>{du(this.base,e),st(this,t,h).then(p=>{u.push(MT(e,p)),s(u),c()},p=>{l(p),c()})},return:h=>{du(this.base,e),st(this,t,h).then(p=>{u.push(UT(e,p)),s(u),c()},p=>{l(p),c()})}})}async function w1(t,e,i,s){return DT(i,Du(t.base,4),await new Promise(_1.bind(t,e,i,s)))}async function S1(t,e,i,s){const l=[];for(let u=0,c=s.v.length;u<c;u++)l[u]=await st(t,e,s.v[u]);return zT(i,l,s.t,s.d)}async function E1(t,e,i,s){if(Array.isArray(s))return f1(t,e,i,s);if(dd(s))return w1(t,e,i,s);if(Q0(s))return S1(t,e,i,s);let l=s.constructor;if(l!==void 0&&typeof l!="function"){const h=Object.getPrototypeOf(s);l=h===null?void 0:h.constructor}if(l===BT)return st(t,e,s.replacement);const u=await W0(t,e,i,s);if(u)return u;switch(l){case Object:return hh(t,e,i,s,!1);case void 0:return hh(t,e,i,s,!0);case Date:return vT(i,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Fy(t,e,i,s);case Number:case Boolean:case String:case BigInt:return h1(t,e,i,s);case ArrayBuffer:return o1(t.base,i,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return d1(t,e,i,s);case DataView:return g1(t,e,i,s);case Map:return y1(t,e,i,s);case Set:return v1(t,e,i,s)}if(l===Promise||s instanceof Promise)return b1(t,e,i,s);const c=t.base.features;if(c&32&&l===RegExp)return bT(i,s);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return p1(t,e,i,s)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||s instanceof AggregateError))return m1(t,e,i,s);if(c&64&&typeof Temporal<"u")switch(l){case Temporal.Instant:return Qi(i,0,s);case Temporal.Duration:return Qi(i,1,s);case Temporal.PlainDate:return Qi(i,2,s);case Temporal.PlainDateTime:return Qi(i,3,s);case Temporal.PlainMonthDay:return Qi(i,4,s);case Temporal.PlainTime:return Qi(i,5,s);case Temporal.PlainYearMonth:return Qi(i,6,s);case Temporal.ZonedDateTime:return Qi(i,7,s)}if(s instanceof Error)return Fy(t,e,i,s);if(mi in s||gi in s)return hh(t,e,i,s,!!l);throw new Hr(s)}async function T1(t,e,i){const s=pd(t.base,i);if(s.type!==0)return s.value;const l=await W0(t,e,s.value,i);if(l)return l;throw new Hr(i)}async function st(t,e,i){if(e>=t.base.depthLimit)throw new q0(t.base.depthLimit);switch(typeof i){case"boolean":return i?P0:H0;case"undefined":return FE;case"string":return F0(i);case"number":return gT(i);case"bigint":return mT(i);case"object":if(i){const s=pd(t.base,i);return s.type===0?await E1(t,e+1,s.value,i):s.value}return YE;case"symbol":return Lr(t.base,i);case"function":return T1(t,e,i);default:throw new Hr(i)}}async function A1(t,e){try{return await st(t,0,e)}catch(i){throw i instanceof Ky?i:new Ky(i)}}function eb(t,e){for(let i=0,s=e.length;i<s;i++){const l=e[i];t.has(l)||(t.add(l),l.extends&&eb(t,l.extends))}}function tb(t){if(t){const e=new Set;return eb(e,t),[...e]}}function R1(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new cT(t)}}function O1(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function C1(t){switch(t){case gi:case Qs:case Js:case mi:return!0;default:return!1}}const k1=1e6,x1=512,N1=1e4,j1=2e4;function nb(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}const D1=1e3;function L1(t,e){var i,s;const l=(i=e.maxBase64Length)!==null&&i!==void 0?i:k1;if(!Number.isSafeInteger(l)||l<0)throw new RangeError("maxBase64Length must be a non-negative safe integer");const u=e.refs||new Map;return"types"in u||Object.assign(u,{types:new Map}),{mode:t,plugins:e.plugins,refs:u,features:(s=e.features)!==null&&s!==void 0?s:127^(e.disabledFeatures||0),depthLimit:e.depthLimit||D1,maxBase64Length:l}}
13function M1(t){return{mode:2,base:L1(2,t),child:void 0}}var U1=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return Ie(this._p,this.depth,t)}};function ib(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new ct({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function rb(t){return!!t&&(typeof t=="object"||typeof t=="function")&&"then"in t&&typeof t.then=="function"}function z1(t,e,i){return ib(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,i),i}function B1(t,e,i){return ib(t.base,e),t.base.refs.set(e,i),i}function it(t,e,i){return t.mode===1?z1(t,e,i):B1(t,e,i)}function Nh(t,e,i){if(Object.hasOwn(e,i))return e[i];throw new ct(t)}function P1(t,e){return it(t,e.i,dT(ar(e.s)))}function rr(t,e){if(!Array.isArray(e))throw new ct(t)}function H1(t,e,i){const s=i.a;rr(i,s);const l=s.length,u=it(t,i.i,new Array(l));for(let c=0,h;c<l;c++)h=s[c],h&&(u[c]=Ie(t,e,h));return nb(u,i.o),u}function Yy(t,e,i){O1(e)?t[e]=i:Object.defineProperty(t,e,{value:i,configurable:!0,enumerable:!0,writable:!0})}function I1(t,e,i,s,l){if(typeof s=="string")Yy(i,ar(s),Ie(t,e,l));else{const u=Ie(t,e,s);switch(typeof u){case"string":Yy(i,u,Ie(t,e,l));break;case"symbol":C1(u)&&(i[u]=Ie(t,e,l));break;default:throw new ct(s)}}}function sb(t,e,i){t.base.refs.types.set(e,i)}function Lu(t,e,i,s){if(t.base.refs.types.get(i)!==s)throw new ct(e)}function ab(t,e,i,s){const l=i.k;if(rr(i,l),rr(i,i.v),l.length>0)for(let u=0,c=i.v,h=l.length;u<h;u++)I1(t,e,s,l[u],c[u]);return s}function q1(t,e,i){const s=it(t,i.i,i.t===10?{}:Object.create(null));return ab(t,e,i.p,s),nb(s,i.o),s}function $1(t,e){return it(t,e.i,new Date(e.s))}function G1(t,e){if(!(t.base.features&64))throw new ud(e);let i;switch(e.c){case 0:i=Temporal.Instant.from(e.s);break;case 1:i=Temporal.Duration.from(e.s);break;case 2:i=Temporal.PlainDate.from(e.s);break;case 3:i=Temporal.PlainDateTime.from(e.s);break;case 4:i=Temporal.PlainMonthDay.from(e.s);break;case 5:i=Temporal.PlainTime.from(e.s);break;case 6:i=Temporal.PlainYearMonth.from(e.s);break;case 7:i=Temporal.ZonedDateTime.from(e.s);break;default:throw new ct(e)}return it(t,e.i,i)}function V1(t,e){if(t.base.features&32){const i=ar(e.c);if(i.length>j1)throw new ct(e);return it(t,e.i,new RegExp(i,e.m))}throw new ud(e)}function K1(t,e,i){const s=it(t,i.i,new Set);rr(i,i.a);for(let l=0,u=i.a,c=u.length;l<c;l++)s.add(Ie(t,e,u[l]));return s}function F1(t,e,i){const s=it(t,i.i,new Map);rr(i,i.e.k),rr(i,i.e.v);for(let l=0,u=i.e.k,c=i.e.v,h=u.length;l<h;l++)s.set(Ie(t,e,u[l]),Ie(t,e,c[l]));return s}function Y1(t,e){if(typeof e.s!="string")throw new ct(e);if(e.s.length>t.base.maxBase64Length)throw new RangeError("ArrayBuffer exceeds maxBase64Length ("+t.base.maxBase64Length+")");const i=ar(e.s);let s;if(i.length<x1||typeof Buffer>"u")s=IT(i);else{const l=atob(i);s=new ArrayBuffer(l.length),Buffer.from(s).write(l,"latin1")}return it(t,e.i,s)}function Q1(t,e,i){var s;const l=R1(i.c),u=Ie(t,e,i.f);if(!(u instanceof ArrayBuffer))throw new ct(i);const c=(s=i.b)!==null&&s!==void 0?s:0;if(c<0||c>u.byteLength)throw new ct(i);return it(t,i.i,new l(u,c,i.l))}function J1(t,e,i){var s;const l=Ie(t,e,i.f);if(!(l instanceof ArrayBuffer))throw new ct(i);const u=(s=i.b)!==null&&s!==void 0?s:0;if(u<0||u>l.byteLength)throw new ct(i);return it(t,i.i,new DataView(l,u,i.l))}function ob(t,e,i,s){if(i.p){const l=ab(t,e,i.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(l))}return s}function X1(t,e,i){return ob(t,e,i,it(t,i.i,new AggregateError([],ar(i.m))))}function Z1(t,e,i){const s=Nh(i,KE,i.s);return ob(t,e,i,it(t,i.i,new s(ar(i.m))))}function W1(t,e,i){const s=hd(),l=it(t,i.i,s.p),u=Ie(t,e,i.f);if(rb(u))throw new ct(i.f);return i.s?s.s(u):s.f(u),l}function eA(t,e,i){return it(t,i.i,Object(Ie(t,e,i.f)))}function tA(t,e,i){const s=t.base.plugins;if(s){const l=ar(i.c);for(let u=0,c=s.length;u<c;u++){const h=s[u];if(h.tag===l)return it(t,i.i,h.deserialize(i.s,new U1(t,e),{id:i.i}))}}throw new oT(i.c)}function nA(t,e){const i=it(t,e.i,it(t,e.s,hd()).p);return sb(t,e.s,22),i}function iA(t,e,i){const s=t.base.refs.get(i.i);if(s){Lu(t,i,i.i,22);const l=Ie(t,e,i.a[1]);if(rb(l))throw new ct(i.a[1]);i.t===23?s.s(l):s.f(l);return}throw new Nu("Promise")}function rA(t,e,i){Ie(t,e,i.a[0]);const s=Ie(t,e,i.a[1]);if(!Q0(s))throw new ct(i.a[1]);return GT(s)}function sA(t,e,i){Ie(t,e,i.a[0]);const s=Ie(t,e,i.a[1]);if(!dd(s))throw new ct(i.a[1]);return ZT(s)}function aA(t,e,i){const s=it(t,i.i,Oo());sb(t,i.i,31);const l=i.a;rr(i,l);const u=l.length;if(u)for(let c=0;c<u;c++)Ie(t,e,l[c]);return s}function oA(t,e,i){const s=t.base.refs.get(i.i);if(s){Lu(t,i,i.i,31),s.next(Ie(t,e,i.f));return}throw new Nu("Stream")}function lA(t,e,i){const s=t.base.refs.get(i.i);if(s){Lu(t,i,i.i,31),s.throw(Ie(t,e,i.f));return}throw new Nu("Stream")}function uA(t,e,i){const s=t.base.refs.get(i.i);if(s){Lu(t,i,i.i,31),s.return(Ie(t,e,i.f));return}throw new Nu("Stream")}function cA(t,e,i){Ie(t,e,i.f)}function fA(t,e,i){Ie(t,e,i.a[1])}function Qy(t,e){return Number.isInteger(t)&&t>=-1&&t<e}function hA(t,e,i){rr(i,i.a);const s=i.a.length;if(!(Qy(i.s,s)&&Qy(i.l,s)))throw new ct(i);const l=it(t,i.i,J0([],i.s,i.l));for(let u=0;u<s;u++)l.v[u]=Ie(t,e,i.a[u]);return l}function Ie(t,e,i){if(e>t.base.depthLimit)throw new q0(t.base.depthLimit);switch(e+=1,i.t){case 2:return Nh(i,GE,i.s);case 0:return Number(i.s);case 1:return ar(String(i.s));case 3:if(String(i.s).length>N1)throw new ct(i);return BigInt(i.s);case 4:return t.base.refs.get(i.i);case 18:return P1(t,i);
13case 9:return H1(t,e,i);case 10:case 11:return q1(t,e,i);case 5:return $1(t,i);case 6:return V1(t,i);case 7:return K1(t,e,i);case 8:return F1(t,e,i);case 19:return Y1(t,i);case 16:case 15:return Q1(t,e,i);case 20:return J1(t,e,i);case 14:return X1(t,e,i);case 13:return Z1(t,e,i);case 12:return W1(t,e,i);case 17:return Nh(i,$E,i.s);case 21:return eA(t,e,i);case 25:return tA(t,e,i);case 22:return nA(t,i);case 23:case 24:return iA(t,e,i);case 28:return rA(t,e,i);case 30:return sA(t,e,i);case 31:return aA(t,e,i);case 32:return oA(t,e,i);case 33:return lA(t,e,i);case 34:return uA(t,e,i);case 27:return cA(t,e,i);case 29:return fA(t,e,i);case 35:return hA(t,e,i);case 36:return G1(t,i);default:throw new ud(i)}}function dA(t,e){try{return Ie(t,0,e)}catch(i){throw new aT(i)}}function pA(t,e){const i=tb(e.plugins);return dA(M1({maxBase64Length:e.maxBase64Length,plugins:i,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit}),t)}async function gA(t,e={}){const i=tb(e.plugins),s=l1(1,{compactArrayBufferViews:e.compactArrayBufferViews,plugins:i,disabledFeatures:e.disabledFeatures});return{t:await A1(s,t),f:s.base.features,m:Array.from(s.base.marked)}}function mA(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,i){return{v:i.parse(t.toSerializable(e))}},async async(e,i){return{v:await i.parse(t.toSerializable(e))}},stream(e,i){return{v:i.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,i){return t.fromSerializable(i.deserialize(e.v))}}}const yA={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};var vA=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}};function lb(t){const e=[];for(let i=0;i<t.length;i+=32768)e.push(String.fromCharCode.apply(null,t.subarray(i,i+32768)));return btoa(e.join(""))}function ub(t){const e=atob(t),i=new Uint8Array(e.length);for(let s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i}const bA=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function _A(t){try{return"t"+bA.decode(t)}catch{return"b"+lb(t)}}const wA=new TextEncoder;function SA(t){const e=t.slice(1);return t[0]==="t"?wA.encode(e):ub(e)}function EA(t,e,i){i?.throwIfAborted();const s=Oo(),l=t.getReader();let u=!0;const c=()=>{u=!1,i?.removeEventListener("abort",p),l.releaseLock()},h=g=>u?(l.cancel(g).catch(()=>{}),c(),!0):!1,p=()=>{h(i.reason)&&s.throw(i.reason)};return i?.addEventListener("abort",p),(async()=>{try{for(;u;){const{done:g,value:y}=await l.read();if(!u)return;if(g){c(),s.return(void 0);return}s.next(e(y))}}catch(g){h(g)&&s.throw(g)}})(),[s,h]}function TA(t,e){let i,s=!1;return new ReadableStream({start(l){const u=t.on({next(c){if(!s)try{l.enqueue(e(c))}catch(h){s=!0;const p=i;i=void 0,p?.(),l.error(h)}},throw(c){s||(s=!0,i=void 0,l.error(c))},return(){s||(s=!0,i=void 0,l.close())}});s?u():i=u},cancel(){const l=i;i=void 0,l?.()}})}function cb(t){return{tag:"tss/RawStream",test:e=>e instanceof vA,parse:{async:async(e,i)=>{const s=await i.parse(e.hint==="text"),[l]=EA(e.stream,e.hint==="text"?_A:lb,t);return{text:s,stream:await i.parse(l)}}},serialize:void 0,deserialize:void 0}}const AA=cb(),RA={tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(t,e){return TA(e.deserialize(t.stream),e.deserialize(t.text)?SA:ub)}},Ji={},fb=t=>new ReadableStream({start(e){t.on({next(i){try{e.enqueue(i)}catch{}},throw(i){e.error(i)},return(){try{e.close()}catch{}}})}}),OA={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Ji},parse:{sync(){return Ji},async async(){return await Promise.resolve(Ji)},stream(){return Ji}},serialize(){return fb.toString()},deserialize(){return Ji}};async function CA(t,e){try{for(;;){const i=await e.read();if(i.done){t.return(i.value),e.releaseLock();break}t.next(i.value)}}catch(i){e.releaseLock(),t.throw(i)}}function kA(t){t.cancel().catch(()=>{}),t.releaseLock()}function Jy(t){const e=Oo(),i=t.getReader(),s=kA.bind(null,i);return CA(e,i).catch(s),[e,s]}const xA={tag:"seroval/plugins/web/ReadableStream",extends:[OA],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(Ji),stream:e.parse(Oo())}},async async(t,e){return{factory:await e.parse(Ji),stream:await e.parse(Jy(t)[0])}},stream(t,e){const[i,s]=Jy(t);return e.addCleanup(s),{factory:e.parse(Ji),stream:e.parse(i)}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){const i=e.deserialize(t.stream);
13if(!i||typeof i!="object"||!dd(i))throw new Error("Expected a stream source.");return fb(i)}};function hb(t){return[yA,t?cb(t):AA,xA]}const NA=hb();[...NA];function jA(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(e,i){return t(i.deserialize(e.streamId))}}}function DA(t){return[...r0()?.serializationAdapters?.map(mA)??[],...t]}function db(t){return DA(hb(t))}var Xy=new TextDecoder,jn=new Uint8Array,LA=new ByteLengthQueuingStrategy({highWaterMark:0});function MA(t){const e=t.getReader(),i=new Map;let s=0,l,u;const c=()=>{l?.(),l=void 0},h=(m,b)=>{const _=m[1];m[1]=!1,_&&(b===1?_.close():_.error(b[0]))},p=new ReadableStream({start(m){u=m},pull:c,cancel(m){const b=[m===void 0?new Error("Framed response cancelled"):m];s=b,c(),e.cancel(m).catch(()=>{});for(const _ of i.values())h(_,b)}});function g(m){const b=i.get(m);if(b)return b;if(i.size>=1024)throw new Error("Too many raw streams");let _;const S=[new ReadableStream({start(E){_=E},cancel(){S[1]!==!1&&(S[1]=null)}},LA),_];return i.set(m,S),s!==0&&h(S,s),S}function y(m){if(m===0||m>>>0!==m)throw new RangeError("Invalid raw stream ID");return g(m)[0]}return(async()=>{let m=jn,b=0;async function _(){for(;b===m.byteLength;){m=jn,b=0;const E=await e.read();if(s!==0||E.done)return!1;m=E.value}return!0}async function S(E,A){if(E===0)return jn;if(!await _()){if(A)return;throw new Error("Incomplete frame")}if(m.byteLength-b>=E){const k=m.subarray(b,b+E);return b+=E,b===m.byteLength&&(m=jn,b=0),k}const T=new Uint8Array(E);let x=0;for(;x<E;){if(!await _())throw new Error("Incomplete frame");const k=Math.min(E-x,m.byteLength-b);T.set(m.subarray(b,b+k),x),b+=k,x+=k}return b===m.byteLength&&(m=jn,b=0),T}try{for(;s===0;){let E=await S(9,!0);if(s!==0)return;if(!E){for(const Z of i.values())if(Z[1])throw new Error("Incomplete raw stream");s=1,u.close();return}const A=E[0],T=(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,x=(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0;if(E=jn,A>3||A===0!=(T===0)||x>16777216||A===2&&x!==0)throw new Error("Invalid frame");const k=A===0?void 0:g(T);if(k?.[1]===!1)throw new Error("Raw stream already ended");let P=await S(x);if(s!==0)return;if(!k){const Z=Xy.decode(P);for(P=jn,u.enqueue(Z);s===0&&u.desiredSize<=0;)await new Promise(z=>{l=z});continue}if(A===1){const Z=k[1];if(Z){if(-Z.desiredSize>134217728){Z.error(new Error(`Raw stream ${T} has too many unread bytes`)),k[1]=null,P=jn;continue}const z=P.byteLength*4<P.buffer.byteLength?P.slice():P;P=jn,Z.enqueue(z)}}else h(k,A===2?1:[new Error(Xy.decode(P))])}}catch(E){if(s===0){const A=[E];s=A,e.cancel(E).catch(()=>{}),u.error(E);for(const T of i.values())h(T,A)}}finally{m=jn,e.releaseLock()}})(),[p,y]}const Un=Symbol.for("TSR_DEFERRED_PROMISE");function UA(t,e){const i=t;return i[Un]||(i[Un]={status:"pending"},i.then(s=>{i[Un].status="success",i[Un].data=s}).catch(s=>{i[Un].status="error",i[Un].error={data:RE(s),__isServerError:!0}})),i}const zA="Error preloading route! ☝️";function pb(t,e){if(t)return typeof t=="string"?t:t[e]}function BA(t){return t?.scriptFormat??"module"}function PA(t,e,i){const s=HA(e),l=pb(i,"script")??s.crossOrigin;return{...BA(t)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:s.href,...l?{crossOrigin:l}:{}}}function HA(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function Ql(t,e){if(e.length===0)return;if(e.length===1){t.push(e[0]);return}const i=new Set;for(const s of e){const l=JSON.stringify(s);i.has(l)||(i.add(l),t.push(s))}}function IA(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function qA(t,e,i,s){const l=S0(t),u=[],c=[];for(const h of l)for(const p of Array.isArray(h.scripts)?h.scripts:[]){if(!p)continue;const{children:g,...y}=p;u.push({tag:"script",attrs:{...y,...s,nonce:i},children:g})}if(e)for(const h of l)for(const p of e.routes[h.routeId]?.scripts??[])c.push({tag:"script",attrs:{...p.attrs,nonce:i},children:p.children});return[u,c]}function $A([t,e],i){return[...t,...e]}var gb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;const i=this.options,s=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ys:this.parentRoute||co();let l=s?Ys:i?.path;l&&l!=="/"&&(l=c0(l));const u=i?.id||l,c=s?Ys:Fs((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(u??""));l==="__root__"&&(l="/");const h=c==="__root__"?"/":l===void 0?this.parentRoute.fullPath:Fs(this.parentRoute.fullPath+"/"+l);this._path=l,this._id=c,this._fullPath=h,this._to=Bn(h)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ro({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},GA=class extends gb{constructor(t){super(t)}};var mo;function jh(t,e,i){try{return pA(t,e)}catch(s){throw yb(i),s}}async function mb(t){t.length>0&&(await Promise.allSettled(t),t.length=0)}function yb(t){for(const e of t)e.catch(()=>{});t.length=0}var VA=Object.prototype.hasOwnProperty;function vb(t){for(const e in t)if(VA.call(t,e))return!0;return!1}async function KA(t,e,i){mo||(mo=db());const s=e[0],l=s.fetch??i,u=s.data instanceof FormData,c=new Headers(s.headers);if(c.set("x-tsr-serverFn","true"),u||c.set("accept",`${PS}, application/x-ndjson, application/json`),s.method==="GET"){if(u)throw new Error("FormData is not supported with GET requests");const p=await bb(s);if(p!==void 0){const g=y0({payload:p});t.includes("?")?t+=`&${g}`:t+=`?${g}`}}let h;return s.method==="POST"&&(h=await FA(s),typeof h=="string"&&c.set("content-type","application/json")),YA(()=>l(t,{method:s.method,headers:c,signal:s.signal,body:h}))}async function bb(t){let e;return t.data!==void 0&&(e={data:t.data}),t.context&&vb(t.context)&&((e??={}).context=t.context),e?_b(e,t.signal):void 0}async function _b(t,e){e?.throwIfAborted();let i;try{i=await gA(t,{plugins:e?db(e):mo})}finally{e?.throwIfAborted()}return JSON.stringify(i)}async function FA(t){if(t.data instanceof FormData){let e;return t.context&&vb(t.context)&&(e=await _b(t.context,t.signal)),e!==void 0&&t.data.set(BS,e),t.data}return bb(t)}async function YA(t){let e;try{e=await t()}catch(s){if(s instanceof Response)e=s;else throw s}if(e.headers.get("x-tss-raw")==="true")return e;const i=e.headers.get("content-type");if(i||co(),e.headers.get("x-tss-serialized")){let s;if(i.includes("application/x-tss-framed")){const l=/;\s*v=(\d+)/.exec(i)?.[1];if(l&&+l!=1)throw new Error(`Unsupported framed protocol version ${l}`);if(!e.body)throw new Error("No response body for framed response");const[u,c]=MA(e.body);s=await QA(u,[jA(c),...mo])}else if(i.includes("application/json")){const l=await e.json(),u=[];s=jh(l,{plugins:mo},u),await mb(u)}if(s||co(),s instanceof Error)throw s;return s}if(i.includes("application/json")){const s=await e.json(),l=HS(s);if(l)throw l;if(Br(s))throw s;return s}if(!e.ok)throw new Error(await e.text());return e}async function QA(t,e){const i=t.getReader(),s={refs:new Map,plugins:e},l=h=>{i.cancel(h).catch(()=>{})};let u;const c=[];try{const h=await i.read();if(h.done)throw new Error("Stream ended before first object");u=jh(JSON.parse(h.value),s,c)}catch(h){throw l(h),i.releaseLock(),h}return(async()=>{const h=[];try{for(;;){const p=await i.read();if(p.done)return;jh(JSON.parse(p.value),s,h),yb(h)}}catch(p){l(p),console.error("Stream processing error:",p)}finally{i.releaseLock()}})(),await mb(c),u}function JA(t){const e="/_serverFn/"+t;return Object.assign((...l)=>{const u=r0()?.serverFns?.fetch;return KA(e,l,u??fetch)},{url:e,serverFnMeta:{id:t},[Ah]:!0})}var XA={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(Ah in t)?!1:!!t[Ah],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>JA(t)},_u=de.use,wb=de.useLayoutEffect;function ZA({promise:t}){if(_u)return _u(t);const e=UA(t);if(e[Un].status==="pending")throw e;if(e[Un].status==="error")throw e[Un].error;return e[Un].data}function WA(t){const e=X.jsx(eR,{...t});
13return t.fallback?X.jsx(de.Suspense,{fallback:t.fallback,children:e}):e}function eR(t){const e=ZA(t);return t.children(e)}var yd=class extends de.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){const i=t.getResetKey();return e.error&&e.resetKey!==i?{resetKey:i,error:0}:{resetKey:i}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){const t=this.state.error;return t?de.createElement(this.props.errorComponent??tR,{error:t[0],reset:this.reset}):this.props.children}};function tR({error:t}){const[e,i]=de.useState(!1);return X.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[X.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),X.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(s=>!s),children:e?"Hide Error":"Show Error"})]}),X.jsx("div",{style:{height:".25rem"}}),e?X.jsx("div",{children:X.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?X.jsx("code",{children:t.message}):null})}):null]})}var Zy=()=>!0,nR=()=>!1;function iR({children:t,fallback:e=null}){return X.jsx(J.Fragment,{children:vd()?t:e})}function vd(t=!0){return J.useSyncExternalStore(rR,Zy,t?nR:Zy)}function rR(){return()=>{}}var Sb=de.createContext(null);function xt(t){return de.useContext(Sb)}var bd=de.createContext(void 0),sR=de.createContext(void 0);function aR({update:t,notify:e,unwatched:i}){return{link:s,unlink:l,propagate:u,checkDirty:c,shallowPropagate:h};function s(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===g){_.version=m,y.depsTail=_;return}const S=g.subsTail;if(S!==void 0&&S.version===m&&S.sub===y)return;const E=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=E),b!==void 0?b.nextDep=E:y.deps=E,S!==void 0?S.nextSub=E:g.subs=E}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,S=g.nextSub,E=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=E:m.subsTail=E,E!==void 0?E.nextSub=S:(m.subs=S)===void 0&&i(m),_}function u(g){let y=g.nextSub,m;e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&e(b),_&1){const S=b.subs;if(S!==void 0){const E=(g=S).nextSub;E!==void 0&&(m={value:y,prev:m},y=E);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,_=!1;e:do{const S=g.dep,E=S.flags;if(y.flags&16)_=!0;else if((E&17)===17){if(t(S)){const A=S.subs;A.nextSub!==void 0&&h(A),_=!0}}else if((E&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=S.deps,y=S,++b;continue}if(!_){const A=g.nextDep;if(A!==void 0){g=A;continue}}for(;b--;){const A=y.subs,T=A.nextSub!==void 0;if(T?(g=m.value,m=m.prev):g=A,_){if(t(y)){T&&h(A),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const x=g.nextDep;if(x!==void 0){g=x;continue e}}return _}while(!0)}function h(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&e(y))}while((g=g.nextSub)!==void 0)}function p(g,y){let m=y.depsTail;for(;m!==void 0;){if(m===g)return!0;m=m.prevDep}return!1}}function oR(t,e,i){const s=typeof t=="object",l=s?t:void 0;return{next:(s?t.next:t)?.bind(l),error:(s?t.error:e)?.bind(l),complete:(s?t.complete:i)?.bind(l)}}const Dh=[];let pu=0;const{link:Wy,unlink:lR,propagate:uR,checkDirty:Eb,shallowPropagate:ev}=aR({update(t){return t._update()},notify(t){Dh[Lh++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,wu(t))}});let Jl=0,Lh=0,bn,Mh=0;function cR(t){try{++Mh,t()}finally{--Mh||Tb()}}function wu(t){const e=t.depsTail;let i=e!==void 0?e.nextDep:t.deps;for(;i!==void 0;)i=lR(i,t)}function Tb(){if(!(Mh>0)){for(;Jl<Lh;){const t=Dh[Jl];Dh[Jl++]=void 0,t.notify()}Jl=0,Lh=0}}function tv(t,e){const i=typeof t=="function",s=t,l={_snapshot:i?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?0:1,get(){return bn!==void 0&&Wy(l,bn,pu),l._snapshot},subscribe(u){const c=oR(u),h={current:!1},p=fR(()=>{l.get(),h.current?(bn=void 0,c.next?.(l._snapshot)):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=bn,h=e?.compare??Object.is;if(i)bn=l,++pu,l.depsTail=void 0;else if(u===void 0)return!1;i&&(l.flags=5);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&i?s(p):u;return p===void 0||!h(p,g)?(l._snapshot=g,!0):!1}finally{bn=c,i&&(l.flags&=-5),wu(l)}}};return i?(l.flags=17,l.get=function(){const u=l.flags;if(u&16||u&32&&Eb(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&ev(c)}}else u&32&&(l.flags=u&-33);return bn!==void 0&&Wy(l,bn,pu),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(uR(c),ev(c),Tb())}},l}function fR(t){const e=()=>{const s=bn;bn=i,++pu,i.depsTail=void 0,i.flags=6;try{return t()}finally{bn=s,i.flags&=-5,wu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const s=this.flags;s&16||s&32&&Eb(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,wu(this)}};return e(),i}var dh={exports:{}},ph={},gh={exports:{}},mh={};var nv;function hR(){if(nv)return mh;nv=1;var t=Ao();function e(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var i=typeof Object.is=="function"?Object.is:e,s=t.useState,l=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function h(m,b){var _=b(),S=s({inst:{value:_,getSnapshot:b}}),E=S[0].inst,A=S[1];return u(function(){E.value=_,E.getSnapshot=b,p(E)&&A({inst:E})},[m,_,b]),l(function(){return p(E)&&A({inst:E}),m(function(){p(E)&&A({inst:E})})},[m]),c(_),_}function p(m){var b=m.getSnapshot;m=m.value;try{var _=b();return!i(m,_)}catch{return!0}}function g(m,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return mh.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,mh}var iv;function dR(){return iv||(iv=1,gh.exports=hR()),gh.exports}var rv;function pR(){if(rv)return ph;rv=1;var t=Ao(),e=dR();function i(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var s=typeof Object.is=="function"?Object.is:i,l=e.useSyncExternalStore,u=t.useRef,c=t.useEffect,h=t.useMemo,p=t.useDebugValue;return ph.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var S=u(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=h(function(){function T(z){if(!x){if(x=!0,k=z,z=b(z),_!==void 0&&E.hasValue){var D=E.value;if(_(D,z))return P=D}return P=z}if(D=P,s(k,z))return D;var Y=b(z);return _!==void 0&&_(D,Y)?(k=z,D):(k=z,P=Y)}var x=!1,k,P,Z=m===void 0?null:m;return[function(){return T(y())},Z===null?void 0:function(){return T(Z())}]},[y,m,b,_]);var A=l(g,S[0],S[1]);return c(function(){E.hasValue=!0,E.value=A},[A]),p(A),A},ph}var sv;function gR(){return sv||(sv=1,dh.exports=pR()),dh.exports}var mR=gR();function yR(t,e){return t===e}function Hn(t,e=s=>s,i){const s=i?.compare??yR,l=de.useCallback(c=>{const{unsubscribe:h}=t.subscribe(c);return h},[t]),u=de.useCallback(()=>t.get(),[t]);return mR.useSyncExternalStoreWithSelector(l,u,u,e,s)}var av={};function vR(t,e){const i=de.useRef();return s=>{const l=t?.select?t.select(s):s;return t?.structuralSharing??e.options.defaultStructuralSharing?i.current=er(i.current,l):l}}function Ir(t){const e=xt(),i=de.useContext(t.from?sR:bd),s=t.from??i,l=e.stores.getMatchStore(s),u=vR(t,e),c=Hn(l,h=>
13h?u(h):av);if(c!==av)return c;(t.shouldThrow??!0)&&co()}function Ab(t){return Ir({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function Rb(t){const{select:e,...i}=t;return Ir({...i,select:s=>e?e(s.loaderDeps):s.loaderDeps})}function Ob(t){return Ir({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const i=t.strict===!1?e.params:e._strictParams;return t.select?t.select(i):i}})}function Cb(t){return Ir({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function kb(t){const e=xt();return de.useCallback(i=>e.navigate({...i,from:i.from??t?.from}),[t?.from,e])}function xb(t){return Ir({...t,select:e=>t.select?t.select(e.context):e.context})}function bR(...t){const e=de.useRef(t),i=e.current;return t.forEach((s,l)=>{Tn(i[l],s,!1,!0)||(i[l]=s)}),e.current}function Xl(t,e){t.preloadRoute(e).catch(i=>{console.warn(i),console.warn(zA)})}var _R={compare:(t,e)=>t[0]===e[0]&&t[1]===e[1]};function wR(t,e){const i=typeof t=="string"&&uo(t);if(i)return e.has(i)?t:null}function SR(t,e,i,s,l){const u=Cy(t.pathname,s),c=Cy(e.pathname,s);return(i?.exact?u!==c:!(u.startsWith(c)&&(u.length===c.length||u[c.length]==="/")))||(i?.includeSearch??!0)&&!Tn(t.search,e.search,!i?.exact,i?.explicitUndefined)?!1:i?.includeHash?l&&t.hash===e.hash:!0}function ER(t,e,i){const s=xt(),l=de.useRef(null),u=de.useCallback(ue=>{if(l.current=ue,typeof e=="function")return e(ue);e&&(e.current=ue)},[e]),{activeOptions:c,to:h,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:m,startTransition:b,resetScroll:_,viewTransition:S,ignoreBlocker:E,disabled:A,target:T,onClick:x,onBlur:k,onFocus:P,onMouseEnter:Z,onMouseLeave:z,onTouchStart:D}=t,Y=vd(!!c?.includeHash),[te,le,V]=bR(t.search,t.params,c),[K,W]=de.useMemo(()=>[t,{...t}],[s,t.from,t._fromLocation,t.hash,t.to,te,le,t.state,t.mask,t.unsafeRelative]),pe=de.useMemo(()=>{const ue=wR(h,s.protocolAllowlist);if(ue!==void 0){const Et=[ue??void 0];return()=>Et}let ce,Ce;return Et=>{K._fromLocation||(W._fromLocation=Et);const Zt=s.buildLocation(W),vt=CR(Zt,s,A);return(!ce||ce[0]!==vt)&&(ce=[vt,!(A||vt&&!uo(vt))&&void 0],Ce=[vt,!0]),ce[1]!==void 0&&SR(Et,Zt,V,s.basepath,Y)?Ce:ce}},[V,A,Y,K,W,s,h]),[se,j]=Hn(s.stores.location,pe,_R),F=j===void 0&&se,ae=A||se===void 0,Se=de.useRef(!1),ye=t.reloadDocument||F||ae?!1:p??s.options.defaultPreload,O=g??s.options.defaultPreloadDelay??0,I=de.useCallback(ue=>{const ce=ue?.isIntersecting;if(!(ce??ye==="intent")){ce===!1&&yh(l);return}if(!O){Xl(s,K);return}so.has(l)||so.set(l,setTimeout(()=>{so.delete(l),Xl(s,K)},O))},[s,K,l,ye,O]);de.useEffect(()=>{if(!ye)return;ye==="render"&&!Se.current&&(Se.current=!0,Xl(s,K));let ue=!0,ce;return ye==="viewport"&&l.current&&typeof IntersectionObserver=="function"&&(ce=new IntersectionObserver(Ce=>{ue&&I(Ce.pop())},{rootMargin:"100px"}),ce.observe(l.current)),()=>{ue=!1,ce?.disconnect(),yh(l)}},[s,K,ye,I,l]);const $=RR(t,i);if($.ref=e?u:l,F)return $.href=F,$;const Q=ue=>{const ce=T??ue.currentTarget.getAttribute("target");!ae&&!(ue.metaKey||ue.altKey||ue.ctrlKey||ue.shiftKey)&&!ue.defaultPrevented&&(!ce||ce==="_self")&&ue.button===0&&(ue.preventDefault(),s.navigate({...K,replace:m,resetScroll:_,hashScrollIntoView:y,startTransition:b,viewTransition:S,ignoreBlocker:E}))},ne=()=>{ye==="intent"&&Xl(s,K)},he=()=>{ye==="intent"&&yh(l)};return $.onClick=Ds(x,Q),$.onBlur=Ds(k,he),$.onFocus=Ds(P,I),$.onMouseEnter=Ds(Z,I),$.onMouseLeave=Ds(z,he),$.onTouchStart=Ds(D,ne),OR($,t,j,se,ae,i)}var TR={},AR={className:"active"},Nb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function RR(t,e){const i={};for(const s in t)Nb.has(s)||s==="type"&&e!==void 0||s==="disabled"&&e==="a"||(i[s]=t[s]);return i}function OR(t,e,i,s,l,u){const{activeProps:c,inactiveProps:h,className:p,style:g,target:y}=e,m=a0(i?c:h,{})??(i?AR:TR);Object.assign(t,m),t.href=s,u!=="a"&&(t.disabled=l),t.target=y;const b=m.style;(g||b)&&(t.style=g&&b?{...g,...b}:g||b);const _=m.className;return(p||_)&&(t.className=p?_?`${p} ${_}`:p:_),l&&(t.role="link",t["aria-disabled"]=!0),i&&(t["data-status"]="active",t["aria-current"]="page"),t}var so=new WeakMap,yh=t=>{clearTimeout(so.get(t)),so.delete(t)},Ds=(t,e)=>t?i=>i.defaultPrevented||(t(i),i.defaultPrevented||e(i)):e;function CR(t,e,i){if(i)return;const s=t.maskedLocation??t,l=s.external?s.publicHref:e.history.createHref(s.publicHref)||"/";if(!((s.external||l!==s.publicHref)&&u0(l,e.protocolAllowlist)))return l}var _d=de.memo(de.forwardRef((t,e)=>{const i=t._asChild||"a",s=ER(t,e,i),l=typeof t.children=="function"?t.children({isActive:s["data-status"]==="active"}):t.children;return de.createElement(i,s,l)}),kR);function kR(t,e){let i=0;for(const s in e)if(i++,t[s]!==e[s]&&(!Nb.has(s)||!Tn(t[s],e[s],!1,!0)))return!1;for(const s in t)i--;return i===0}var xR=class extends gb{constructor(e){super(e),this.useMatch=i=>Ir({...i,from:this.id}),this.useRouteContext=i=>xb({...i,from:this.id}),this.useSearch=i=>Cb({...i,from:this.id}),this.useParams=i=>Ob({...i,from:this.id}),this.useLoaderDeps=i=>Rb({...i,from:this.id}),this.useLoaderData=i=>Ab({...i,from:this.id}),this.useNavigate=()=>kb({from:this.fullPath}),this.Link=J.forwardRef((i,s)=>X.jsx(_d,{ref:s,from:this.fullPath,...i}))}};function NR(t){return new xR(t)}function jR(){return t=>LR(t)}var DR=class extends GA{constructor(t){super(t),this.useMatch=e=>Ir({...e,from:this.id}),this.useRouteContext=e=>xb({...e,from:this.id}),this.useSearch=e=>Cb({...e,from:this.id}),this.useParams=e=>Ob({...e,from:this.id}),this.useLoaderDeps=e=>Rb({...e,from:this.id}),this.useLoaderData=e=>Ab({...e,from:this.id}),this.useNavigate=()=>kb({from:this.fullPath}),this.Link=J.forwardRef((e,i)=>X.jsx(_d,{ref:i,from:this.fullPath,...e}))}};function LR(t){return new DR(t)}function vi(t){return e=>{const i=NR(e);return i.isRoot=!1,i}}function bi(t,e){let i,s,l;const u=()=>(i||(l=void 0,i=t().then(h=>{i=void 0,c.preload=void 0,s=h[e]}).catch(h=>{i=void 0,l=h})),i),c=function(p){if(l){if(qS(l)&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;
13if(!sessionStorage.getItem(g))throw sessionStorage.setItem(g,"1"),window.location.reload(),new Promise(()=>{})}throw l}if(!s)if(_u)_u(u());else throw u();return de.createElement(s,p)};return c.preload=u,c}function MR(t){const e=xt(),i=`not-found-${Hn(e.stores.location,s=>s.pathname)}-${Hn(e.stores.status)}`;return X.jsx(yd,{getResetKey:()=>i,onCatch:(s,l)=>{if(Br(s))t.onCatch?.(s,l);else throw s},errorComponent:({error:s})=>{if(Br(s))return t.fallback?.(s);throw s},children:t.children})}function UR(){return X.jsx("p",{children:"Not Found"})}function jb(t,e,i){return e.options.notFoundComponent?X.jsx(e.options.notFoundComponent,{...i}):t.options.defaultNotFoundComponent?X.jsx(t.options.defaultNotFoundComponent,{...i}):X.jsx(UR,{})}function Mu(t,e){const i=e?.options.pendingComponent??t.options.defaultPendingComponent;return i?X.jsx(i,{}):null}var zR=(t,e)=>t[0]===e[0]&&t[1]===e[1],Db=(t,e,i)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||i===!1||i==="data-only"||!t.ssr,Lb=de.memo(function({routeId:e}){const i=xt();return X.jsx(BR,{router:i,match:Hn(i.stores.getMatchStore(e))})});function BR({router:t,match:e}){const i=t.routesById[e.routeId],s=Mu(t,i),l=i.options.errorComponent??t.options.defaultErrorComponent,u=i.options.onCatch??t.options.defaultOnCatch,c=i.isRoot?i.options.notFoundComponent??t.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=e.ssr===!1||e.ssr==="data-only",p=Db(t,i,e.ssr)&&(i.options.wrapInSuspense??s??(i.options.errorComponent?.preload||h));let g=X.jsx(PR,{match:e});h&&(g=X.jsx(iR,{fallback:s,children:g})),c&&(g=X.jsx(MR,{fallback:b=>{if(b.routeId??=e.routeId,b.routeId!==e.routeId)throw b;return de.createElement(c,b)},children:g})),l&&(g=X.jsx(yd,{getResetKey:()=>e,errorComponent:l,onCatch:(b,_)=>{if(Br(b))throw b.routeId??=e.routeId,b;u?.(b,_)},children:g})),p&&(g=X.jsx(de.Suspense,{fallback:s,children:g}));const y=null,m=i.isRoot?i.options.shellComponent:void 0;return X.jsx(bd.Provider,{value:e.routeId,children:m?X.jsxs(m,{children:[g,y]}):X.jsxs(X.Fragment,{children:[g,y]})})}var PR=de.memo(function({match:e}){const i=xt(),s=e.routeId,l=i.routesById[s],u=de.useMemo(()=>{const h=(l.options.remountDeps??i.options.defaultRemountDeps)?.({routeId:s,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return h?JSON.stringify(h):void 0},[s,e.loaderDeps,e._strictParams,e._strictSearch,l.options.remountDeps,i.options.defaultRemountDeps]),c=de.useMemo(()=>{const h=l.options.component??i.options.defaultComponent;return h?X.jsx(h,{},u):X.jsx(Mb,{})},[u,l.options.component,i.options.defaultComponent]);if(e.status==="pending"){if(i.ssr&&!Db(i,l,e.ssr))return c;if(i._tx)throw i._tx[5];return Mu(i,l)}if(e.status==="notFound")return jb(i,l,e.error);if(e.status==="error")throw e.error;return c}),Mb=de.memo(function(){const e=xt(),i=de.useContext(bd);let s,l,u;{const h=e.stores.getMatchStore(i);[s,l]=Hn(h,p=>[!!p._notFound,p.error],{compare:zR}),u=Hn(e.stores.ids,p=>p[p.indexOf(i)+1])}if(s)return jb(e,e.routesById[i],l);if(!u)return null;const c=X.jsx(Lb,{routeId:u});return i===Ys?X.jsx(de.Suspense,{fallback:Mu(e),children:c}):c});function Ub(t,e){const i=t[1];t.length=0,i?.(e)}function HR({t}){const e=xt(),i=e._rendered??=[];return e.startTransition=(s,l)=>new Promise(u=>{Ub(i,!1),i.push(l,u),t(e),de.startTransition(s)}),wb(()=>{const s=e.history.subscribe(e.load);e.updateLatestLocation();const l=e.latestLocation,u=e.buildLocation({to:l.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Bn(l.publicHref)!==Bn(u.publicHref))return e.commitLocation({...u,replace:!0,ignoreBlocker:!0}),s;const c=e.stores.resolvedLocation.get();return c?.href===l.href&&c.state.__TSR_key===l.state.__TSR_key?i.push(e.stores.matches.get(),h=>{h&&e.emit({type:"onRendered",...ku(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),s},[e,e.history]),null}function IR(){const t=xt(),e=t.routesById[Ys],i=Mu(t,e),s=X.jsxs(X.Fragment,{children:[X.jsx(HR,{t:de.useState()[1]}),t.ssr?X.jsx(ov,{}):X.jsx(de.Suspense,{fallback:i,children:X.jsx(ov,{})})]});return t.options.InnerWrap?X.jsx(t.options.InnerWrap,{children:s}):s}function ov(){const t=xt(),e=t._rendered,i=Hn(t.stores.matches,c=>e[0]??c),s=i[0],l=s?.routeId;wb(()=>{e[0]===i&&Ub(e,!0)},[e,i]);const u=l?X.jsx(Lb,{routeId:l}):null;return t.options.disableGlobalCatchBoundary?u:X.jsx(yd,{getResetKey:()=>s,onCatch:void 0,children:u})}var qR=t=>({createMutableStore:tv,createReadonlyStore:tv,batch:cR}),$R=t=>new GR(t),GR=class extends CE{constructor(t){super(t,qR)}};function VR({router:t,children:e,...i}){o0(i)&&t.update({...t.options,...i,context:{...t.options.context,...i.context}});const s=X.jsx(Sb.Provider,{value:t,children:e});return t.options.Wrap?X.jsx(t.options.Wrap,{children:s}):s}function KR({router:t,...e}){return X.jsx(VR,{router:t,...e,children:X.jsx(IR,{})})}function lv(t,e){if(e)for(const[i,s]of Object.entries(e))i!=="suppressHydrationWarning"&&s!==void 0&&s!==!1&&t.setAttribute(i,typeof s=="boolean"?"":String(s))}function zb(t){const{attrs:e,children:i,nonce:s,preventScriptHoist:l}=t,u=de.useMemo(()=>i===void 0?void 0:{__html:i},[i]);switch(t.tag){case"title":return X.jsx("title",{...e,suppressHydrationWarning:!0,children:i});case"meta":return X.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return X.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return t.inlineCss,X.jsx("style",{...e,dangerouslySetInnerHTML:u,nonce:s}
13);case"script":return X.jsx(FR,{attrs:e,preventScriptHoist:l,children:i});default:return null}}function FR({attrs:t,children:e,preventScriptHoist:i}){xt();const s=vd(),l=de.useMemo(()=>e===void 0?void 0:{__html:e},[e]),u=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(de.useEffect(()=>{if(!u){if(t?.src){const c=document.createElement("a");c.href=t.src;const h=c.href;for(const g of document.scripts)if(g.src===h)return;const p=document.createElement("script");return lv(p,t),document.head.appendChild(p),()=>p.remove()}if(typeof e=="string"){const c=typeof t?.type=="string"?t.type:"text/javascript",h=typeof t?.nonce=="string"?t.nonce:void 0;for(const g of document.scripts){if(g.hasAttribute("src"))continue;const y=g.getAttribute("type")??"text/javascript",m=g.getAttribute("nonce")??void 0;if(g.textContent===e&&y===c&&m===h)return}const p=document.createElement("script");return p.textContent=e,lv(p,t),document.head.appendChild(p),()=>p.remove()}}},[t,e,u]),u&&typeof e=="string")return X.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:l});if(!s){if(t?.src)return X.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return X.jsx("script",{...t,dangerouslySetInnerHTML:l,suppressHydrationWarning:!0})}return null}function YR(t,e,i,s){i=S0(i);const l=i.map(E=>E.meta).filter(E=>E!==void 0),u=[],c={};let h;for(let E=l.length-1;E>=0;E--){const A=l[E];for(let T=A.length-1;T>=0;T--){const x=A[T];if(x)if(x.title)h||(h={tag:"title",children:x.title});else if("script:ld+json"in x)try{const k=JSON.stringify(x["script:ld+json"]);u.push({tag:"script",attrs:{type:"application/ld+json"},children:YS(k)})}catch{}else{const k=x.name??x.property;if(k){if(c[k])continue;c[k]=!0}u.push({tag:"meta",attrs:{...x,nonce:e}})}}}h&&u.push(h),e&&u.push({tag:"meta",attrs:{property:"csp-nonce",content:e}}),u.reverse();const p=i.flatMap(E=>E.links??[]).filter(E=>E!==void 0).map(E=>({tag:"link",attrs:{...E,nonce:e}})),g=t.ssr?.manifest,y=[];g&&(i.forEach(E=>{g.routes[E.routeId]?.css?.forEach(A=>{const T=IA(A);y.push({tag:"link",attrs:{rel:"stylesheet",...T,crossOrigin:pb(s,"stylesheet")??T.crossOrigin,suppressHydrationWarning:!0,nonce:e}})})}),g.inlineStyle&&y.push({tag:"style",attrs:{...g.inlineStyle.attrs,nonce:e},children:g.inlineStyle.children,inlineCss:!0}));const m=[];g&&i.forEach(E=>{g.routes[E.routeId]?.preloads?.forEach(A=>{m.push({tag:"link",attrs:{...PA(g,A,s),nonce:e}})})});const b=i.flatMap(E=>E.styles??[]).filter(E=>E!==void 0).map(({children:E,...A})=>({tag:"style",attrs:{...A,nonce:e},children:E})),_=i.flatMap(E=>E.headScripts??[]).filter(E=>E!==void 0).map(({children:E,...A})=>({tag:"script",attrs:{...A,nonce:e},children:E})),S=[];return Ql(S,u),S.push(...m),Ql(S,p),S.push(...y),Ql(S,b),Ql(S,_),S}var QR=t=>{const e=xt(),i=e.options.ssr?.nonce,s=de.useCallback(l=>YR(e,i,l,t),[t,i,e]);return Hn(e.stores.matches,s,{compare:Tn})};function JR(t){const e=QR(t.assetCrossOrigin),i=xt().options.ssr?.nonce;return X.jsx(X.Fragment,{children:e.map(s=>de.createElement(zb,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:i}))})}var XR={suppressHydrationWarning:!0},ZR=()=>{const t=xt(),e=t.options.ssr?.nonce,i=l=>{const u=qA(l,t.ssr?.manifest,e,XR);for(const c of u[1])if(typeof c.attrs?.src=="string"){const h=c;h.preventScriptHoist=!0}return u},s=l=>$A(i(l));return WR(Hn(t.stores.matches,s,{compare:Tn}))};function WR(t){return X.jsx(X.Fragment,{children:t.map((e,i)=>de.createElement(zb,{...e,key:`tsr-scripts-${e.tag}-${i}`}))})}var Mr=(t,e)=>{const i={type:"request",...e||t},s=l=>Mr({},Object.assign(i,{validator:l,inputValidator:l}));return{options:i,middleware:l=>Mr({},Object.assign(i,{middleware:l})),validator:s,inputValidator:s,client:l=>Mr({},Object.assign(i,{client:l})),server:l=>Mr({},Object.assign(i,{server:l}))}};function Bb(t,e){for(let i=0,s=e.length;i<s;i++){const l=e[i];t.has(l)||(t.add(l),l.extends&&Bb(t,l.extends))}}var eO=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const i=new Set;Bb(i,e.serializationAdapters),e.serializationAdapters=Array.from(i)}return e},createMiddleware:Mr}),uv=function(){return uv=Object.assign||function(e){for(var i,s=1,l=arguments.length;s<l;s++){i=arguments[s];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(e[u]=i[u])}return e},uv.apply(this,arguments)};function Uu(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)e.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(i[s[l]]=t[s[l]]);return i}function tO(t,e,i,s){function l(u){return u instanceof i?u:new i(function(c){c(u)})}
13return new(i||(i=Promise))(function(u,c){function h(y){try{g(s.next(y))}catch(m){c(m)}}function p(y){try{g(s.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(h,p)}g((s=s.apply(t,e||[])).next())})}function iN(t,e,i){if(i||arguments.length===2)for(var s=0,l=e.length,u;s<l;s++)(u||!(s in e))&&(u||(u=Array.prototype.slice.call(e,0,s)),u[s]=e[s]);return t.concat(u||Array.prototype.slice.call(e))}const nO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class wd extends Error{constructor(e,i="FunctionsError",s){super(e),this.name=i,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class iO extends wd{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class cv extends wd{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class fv extends wd{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Uh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Uh||(Uh={}));class rO{constructor(e,{headers:i={},customFetch:s,region:l=Uh.Any}={}){this.url=e,this.headers=i,this.region=l,this.fetch=nO(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return tO(this,arguments,void 0,function*(i,s={}){var l;let u,c;try{const{headers:h,method:p,body:g,signal:y,timeout:m}=s;let b={},{region:_}=s;_||(_=this.region);const S=new URL(`${this.url}/${i}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let E;g&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",E=g):typeof g=="string"?(b["Content-Type"]="text/plain",E=g):typeof FormData<"u"&&g instanceof FormData?E=g:(b["Content-Type"]="application/json",E=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?E=JSON.stringify(g):E=g;let A=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(A=c.signal,y.addEventListener("abort",()=>c.abort())):A=c.signal);const T=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:E,signal:A}).catch(Z=>{throw new iO(Z)}),x=T.headers.get("x-relay-error");if(x&&x==="true")throw new cv(T);if(!T.ok)throw new fv(T);let k=((l=T.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),P;return k==="application/json"?P=yield T.json():k==="application/octet-stream"||k==="application/pdf"?P=yield T.blob():k==="text/event-stream"?P=T:k==="multipart/form-data"?P=yield T.formData():P=yield T.text(),{data:P,error:null,response:T}}catch(h){return{data:null,error:h,response:h instanceof fv||h instanceof cv?h.context:void 0}}finally{u&&clearTimeout(u)}})}}const Pb=3,hv=t=>Math.min(1e3*2**t,3e4),sO=[520,503],Hb=["GET","HEAD","OPTIONS"];var aO=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
13de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function dv(t,e){return new Promise(i=>{if(e?.aborted){i();return}const s=setTimeout(()=>{e?.removeEventListener("abort",l),i()},t);function l(){clearTimeout(s),i()}e?.addEventListener("abort",l)})}function oO(t,e,i,s){return!(!s||i>=Pb||!Hb.includes(t)||!sO.includes(e))}var lO=class{constructor(t){var e,i,s,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(i=t.isMaybeSingle)!==null&&i!==void 0?i:!1,this.shouldStripNulls=(s=t.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var i=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 s=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(i.headers);c>0&&g.set("X-Retry-Count",String(c));let y;try{y=await s(i.url.toString(),{method:i.method,headers:g,body:JSON.stringify(i.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:i.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!Hb.includes(i.method))throw m;if(i.retryEnabled&&c<Pb){const b=hv(c);c++,await dv(b,i.signal);continue}throw m}if(oO(i.method,y.status,c,i.retryEnabled)){var h,p;const m=(h=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&h!==void 0?h:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:hv(c);await y.text(),c++,await dv(b,i.signal);continue}return await i.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var h;let p="",g="",y="";const m=c?.cause;if(m){var b,_,S,E;const x=(b=m?.message)!==null&&b!==void 0?b:"",k=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=`
14
15Caused by: ${(E=m?.name)!==null&&E!==void 0?E:"Error"}: ${x}`,k&&(p+=` (${k})`),m?.stack&&(p+=`
16${m.stack}`)}else{var A;p=(A=c?.stack)!==null&&A!==void 0?A:""}const T=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${T} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",g="HTTP headers exceeded server limits (typically 16KB)",T>this.urlLengthLimit&&(g+=`. Your request URL is ${T} 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:`${(h=c?.name)!==null&&h!==void 0?h:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;
16let i=null,s=null,l=null,u=t.status,c=t.statusText;if(t.ok){var h,p;if(e.method!=="HEAD"){var g;const b=await t.text();b===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((g=e.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text"))?s=b:s=JSON.parse(b))}const y=(h=e.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),m=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(l=parseInt(m[1])),e.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(i={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,l=null,u=406,c="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const y=await t.text();try{i=JSON.parse(y),Array.isArray(i)&&t.status===404&&(s=[],i=null,u=200,c="OK")}catch{t.status===404&&y===""?(u=204,c="No Content"):i={message:y}}if(i&&e.shouldThrowOnError)throw new aO(i)}return{success:i===null,error:i,data:s,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},uO=class extends lO{select(t){let e=!1;const i=(t??"*").split("").map(s=>/\s/.test(s)&&!e?"":(s==='"'&&(e=!e),s)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:i,foreignTable:s,referencedTable:l=s}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:i=e}={}){const s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,e,{foreignTable:i,referencedTable:s=i}={}){const l=typeof s>"u"?"offset":`${s}.offset`,u=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(u,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:i=!1,buffers:s=!1,wal:l=!1,format:u="text"}={}){var c;const h=[t?"analyze":null,e?"verbose":null,i?"settings":null,s?"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=${h};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const pv=new RegExp("[,()]");var Ps=class extends uO{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const i=Array.from(new Set(e)).map(s=>typeof s=="string"&&pv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${i})`),this}notIn(t,e){const i=Array.from(new Set(e)).map(s=>typeof s=="string"&&pv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`not.in.(${i})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:i,type:s}={}){let l="";s==="plain"?l="pl":s==="phrase"?l="ph":s==="websearch"&&(l="w");const u=i===void 0?"":`(${i})`;return this.url.searchParams.append(t,`${l}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,i])=>
16i!==void 0).forEach(([e,i])=>{this.url.searchParams.append(e,`eq.${i}`)}),this}not(t,e,i){return this.url.searchParams.append(t,`not.${e}.${i}`),this}or(t,{foreignTable:e,referencedTable:i=e}={}){const s=i?`${i}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,e,i){return this.url.searchParams.append(t,`${e}.${i}`),this}},cO=class{constructor(t,{headers:e={},schema:i,fetch:s,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=i,this.fetch=s,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:i=!1,count:s}=e??{},l=i?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:h,headers:p}=this.cloneRequestState();return h.searchParams.set("select",c),s&&p.append("Prefer",`count=${s}`),new Ps({method:l,url:h,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:i=!0}={}){var s;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),i||c.append("Prefer","missing=default"),Array.isArray(t)){const h=t.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(h.length>0){const p=[...new Set(h)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new Ps({method:l,url:u,headers:c,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:i=!1,count:s,defaultToNull:l=!0}={}){var u;const c="POST",{url:h,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),e!==void 0&&h.searchParams.set("on_conflict",e),s&&p.append("Prefer",`count=${s}`),l||p.append("Prefer","missing=default"),Array.isArray(t)){const g=t.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);h.searchParams.set("columns",y.join(","))}}return new Ps({method:c,url:h,headers:p,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var i;const s="PATCH",{url:l,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new Ps({method:s,url:l,headers:u,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const i="DELETE",{url:s,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new Ps({method:i,url:s,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function yo(t){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(t)}function fO(t,e){if(yo(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if(yo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hO(t){var e=fO(t,"string");return yo(e)=="symbol"?e:e+""}function dO(t,e,i){return(e=hO(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function gv(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),i.push.apply(i,s)}return i}function Zl(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?gv(Object(i),!0).forEach(function(s){dO(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):gv(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}var pO=class Ib{constructor(e,{headers:i={},schema:s,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:h}={}){this.url=e,this.headers=new Headers(i),this.schemaName=s,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,y);const S=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",S,{once:!0}),p(g,Zl(Zl({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(g,Zl(Zl({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=h}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new cO(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Ib(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,i={},{head:s=!1,get:l=!1,count:u}={}){var c;let h;const p=new URL(`${this.url}/rpc/${e}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=s&&Object.values(i).some(y);m?(h="POST",g=i):s||l?(h=s?"HEAD":"GET",Object.entries(i).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}
16`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(h="POST",g=i);const b=new Headers(this.headers);return m?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new Ps({method:h,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 gO{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const i=globalThis;if(typeof globalThis<"u"&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};const s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};if(typeof globalThis<"u"&&typeof i.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"&&i.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,h=parseInt(c.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
17import ws from "ws"
18new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let i=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(i+=`
19
20Suggested solution: ${e.workaround}`),new Error(i)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const mO="2.106.1",yO=`realtime-js/${mO}`,vO="1.0.0",qb="2.0.0",bO=qb,_O=1e4,wO=100,Xi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},$b={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},zh={connecting:"connecting",closing:"closing",closed:"closed"};class SO{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,i){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return i(this._binaryEncodeUserBroadcastPush(e));let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return i(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(e){var i;return this._isArrayBuffer((i=e.payload)===null||i===void 0?void 0:i.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var i,s;const l=(s=(i=e.payload)===null||i===void 0?void 0:i.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(e){var i,s;const l=(s=(i=e.payload)===null||i===void 0?void 0:i.payload)!==null&&s!==void 0?s:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,i,s){var l,u;
20const c=e.topic,h=(l=e.ref)!==null&&l!==void 0?l:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",g=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},m=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+h.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),E=0;S.setUint8(E++,this.KINDS.userBroadcastPush),S.setUint8(E++,p.length),S.setUint8(E++,h.length),S.setUint8(E++,c.length),S.setUint8(E++,g.length),S.setUint8(E++,m.length),S.setUint8(E++,i),Array.from(p,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(h,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(c,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(g,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(m,T=>S.setUint8(E++,T.charCodeAt(0)));var A=new Uint8Array(_.byteLength+s.byteLength);return A.set(new Uint8Array(_),0),A.set(new Uint8Array(s),_.byteLength),A.buffer}decode(e,i){if(this._isArrayBuffer(e)){let s=this._binaryDecode(e);return i(s)}if(typeof e=="string"){const s=JSON.parse(e),[l,u,c,h,p]=s;return i({join_ref:l,ref:u,topic:c,event:h,payload:p})}return i({})}_binaryDecode(e){const i=new DataView(e),s=i.getUint8(0),l=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,i,l)}_decodeUserBroadcast(e,i,s){const l=i.getUint8(1),u=i.getUint8(2),c=i.getUint8(3),h=i.getUint8(4);let p=this.HEADER_LENGTH+4;const g=s.decode(e.slice(p,p+l));p=p+l;const y=s.decode(e.slice(p,p+u));p=p+u;const m=s.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),_=h===this.JSON_ENCODING?JSON.parse(s.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var i;return e instanceof ArrayBuffer||((i=e?.constructor)===null||i===void 0?void 0:i.name)==="ArrayBuffer"}_pick(e,i){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([s])=>i.includes(s)))}}var He;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(He||(He={}));const mv=(t,e,i={})=>{var s;const l=(s=i.skipTypes)!==null&&s!==void 0?s:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=EO(c,t,e,l),u),{}):{}},EO=(t,e,i,s)=>{const l=e.find(h=>h.name===t),u=l?.type,c=i[t];return u&&!s.includes(u)?Gb(u,c):Bh(c)},Gb=(t,e)=>{if(t.charAt(0)==="_"){const i=t.slice(1,t.length);return OO(e,i)}switch(t){case He.bool:return TO(e);case He.float4:case He.float8:case He.int2:case He.int4:case He.int8:case He.numeric:case He.oid:return AO(e);case He.json:case He.jsonb:return RO(e);case He.timestamp:return CO(e);case He.abstime:case He.date:case He.daterange:case He.int4range:case He.int8range:case He.money:case He.reltime:case He.text:case He.time:case He.timestamptz:case He.timetz:case He.tsrange:case He.t
vendor: 9,138 bytes, line 20
20stzrange:return Bh(e);default:return Bh(e)}},Bh=t=>t,TO=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},AO=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},RO=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},OO=(t,e)=>{if(typeof t!="string")return t;const i=t.length-1,s=t[i];if(t[0]==="{"&&s==="}"){let u;const c=t.slice(1,i);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(h=>Gb(e,h))}return t},CO=t=>typeof t=="string"?t.replace(" ","T"):t,Vb=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var ao=t=>typeof t=="function"?t:function(){return t},kO=typeof self<"u"?self:null,Hs=typeof window<"u"?window:null,Mn=kO||Hs||globalThis,xO="2.0.0",NO=1e4,jO=1e3,zn={connecting:0,open:1,closing:2,closed:3},It={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ui={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ph={longpoll:"longpoll",websocket:"websocket"},DO={complete:4},Hh="base64url.bearer.phx.",Wl=class{constructor(t,e,i,s){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(s=>s.status===t).forEach(s=>s.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Kb=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},LO=class{constructor(t,e,i){this.state=It.closed,this.topic=t,this.params=ao(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Wl(this,ui.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Kb(()=>{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=It.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=It.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=It.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=It.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 Wl(this,ui.leave,ao({}),this.timeout).send(),this.state=It.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ui.reply,(s,l)=>{this.trigger(this.replyEventName(l),s)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=It.closed,this.bindings=[]}onClose(t){this.on(ui.close,t)}onError(t){return this.on(ui.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e>"u"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new Wl(this,t,function(){return e},i);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=It.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ui.close,"leave")},i=new Wl(this,ui.leave,ao({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}filterBindings(t,e,i){return!0}isMember(t,e,i,s){return this.topic!==t?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=It.joining,this.joinPush.resend(t))}trigger(t,e,i,s){let l=this.onMessage(t,e,i,s);if(e&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,e,i));for(let c=0;c<u.length;c++)u[c].callback(l,i,s||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===It.closed}isErrored(){return this.state===It.errored}isJoined(){return this.state===It.joined}isJoining(){return this.state===It.joining}isLeaving(){return this.state===It.leaving}},Su=class{static request(t,e,i,s,l,u,c){if(Mn.XDomainRequest){let h=new Mn.XDomainRequest;return this.xdomainRequest(h,t,e,s,l,u,c)}else if(Mn.XMLHttpRequest){let h=new Mn.XMLHttpRequest;return this.xhrRequest(h,t,e,i,s,l,u,c)}else{if(Mn.fetch&&Mn.AbortController)return this.fetchRequest(t,e,i,s,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,i,s,l,u,c){let h={method:t,headers:i,body:s},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),h.signal=p.signal),Mn.fetch(e,h).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(t,e,i,s,l,u,c){return t.timeout=l,t.open(e,i),t.onload=()=>{let h=this.parseJSON(t.responseText);c&&c(h)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(s),t}static xhrRequest(t,e,i,s,l,u,c,h){t.open(e,i,!0),t.timeout=u;for(let[p,g]of Object.entries(s))t.setRequestHeader(p,g);return t.onerror=()=>h&&h(null),t.onreadystatechange=()=>{if(t.readyState===DO.complete&&h){let p=this.parseJSON(t.responseText);h(p)}},c&&(t.ontimeout=c),t.send(l),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let l=e?`${e}[${s}]`:s,u=t[s];typeof u=="object"?i.push(this.serialize(u,l)):i.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},MO=t=>{let e="",i=new Uint8Array(t),s=i.byteLength;for(let l=0;l<s;l++)e+=String.fromCharCode(i[l]);return btoa(e)},Ls=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Hh)&&(this.authToken=atob(e[1].slice(Hh.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(){}
vendor: 1,073 bytes, line 20
20,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=zn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ph.websocket),"$1/"+Ph.longpoll)}endpointURL(){return Su.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=zn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===zn.open||this.readyState===zn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:i,token:s,messages:l}=e;if(i===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else i=0;switch(i){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=zn.open,this.onopen({}),this.poll();break;
20case 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 ${i}`)}})}send(t){typeof t!="string"&&(t=MO(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
21`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let l of this.reqs)l.abort();this.readyState=zn.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(t,e,i,s,l){let u,c=()=>{this.reqs.delete(u),s()};u=Su.request(t,this.endpointURL(),e,i,this.timeout,c,h=>{this.reqs.delete(u),this.isActive()&&l(h)}),this.reqs.add(u)}},UO=class no{constructor(e,i={}){let s=i.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,l=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=no.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=no.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],h()}),this.channel.on(s.diff,l=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=no.syncDiff(this.state,l,u,c),h())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return no.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,i,s,l){let u=this.clone(e),c={},h={};return this.map(u,(p,g)=>{i[p]||(h[p]=g)}),this.map(i,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(E=>E.phx_ref),b=y.metas.map(E=>E.phx_ref),_=g.metas.filter(E=>b.indexOf(E.phx_ref)<0),S=y.metas.filter(E=>m.indexOf(E.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),S.length>0&&(h[p]=this.clone(y),h[p].metas=S)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:h},s,l)}static syncDiff(e,i,s,l){let{joins:u,leaves:c}=this.clone(i);return s||(s=function(){}),l||(l=function(){}),this.map(u,(h,p)=>{let g=e[h];if(e[h]=this.clone(p),g){let y=e[h].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[h].metas.unshift(...m)}s(h,g,p)}),this.map(c,(h,p)=>{let g=e[h];if(!g)return;let y=p.metas.map(m=>m.phx_ref);g.metas=g.metas.filter(m=>y.indexOf(m.phx_ref)<0),l(h,g,p),g.metas.length===0&&delete e[h]}),e}static list(e,i){return i||(i=function(s,l){return l}),this.map(e,(s,l)=>i(s,l))}static map(e,i){return Object.getOwnPropertyNames(e).map(s=>i(s,e[s]))}static clone(e){return JSON.parse(JSON.stringify(e))}},eu={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,s,l,u,c]=JSON.parse(t);return e({join_ref:i,ref:s,topic:l,event:u,payload:c})}},binaryEncode(t){let{join_ref:e,ref:i,event:s,topic:l,payload:u}=t,c=this.META_LENGTH+e.length+i.length+l.length+s.length,h=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(h),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,e.length),p.setUint8(g++,i.length),p.setUint8(g++,l.length),p.setUint8(g++,s.length),Array.from(e,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(i,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(l,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(s,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(h.byteLength+u.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(u),h.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),s=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,s);case this.KINDS.reply:return this.decodeReply(t,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,s)}},decodePush(t,e,i){let s=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,h=i.decode(t.slice(c,c+s));c=c+s;let p=i.decode(t.slice(c,c+l));c=c+l;let g=i.decode(t.slice(c,c+u));c=c+u;let y=t.slice(c,t.byteLength);return{join_ref:h,ref:null,topic:p,event:g,payload:y}},decodeReply(t,e,i){let s=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,p=i.decode(t.slice(h,h+s));h=h+s;let g=i.decode(t.slice(h,h+l));h=h+l;let y=i.decode(t.slice(h,h+u));h=h+u;let m=i.decode(t.slice(h,h+c));h=h+c;let b=t.slice(h,t.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:ui.reply,payload:_}},decodeBroadcast(t,e,i){let s=e.getUint8(1),l=e.getUint8(2),u=this.HEADER_LENGTH+2,c=i.decode(t.slice(u,u+s));u=u+s;let h=i.decode(t.slice(u,u+l));u=u+l;let p=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:c,event:h,payload:p}}},zO=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||NO,this.transport=e.transport||Mn.WebSocket||Ls,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let i=null;try{i=Mn&&Mn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||i,this.establishedConnections=0,this.defaultEncoder=eu.encode.bind(eu),this.defaultDecoder=eu.decode.bind(eu),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ls?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;Hs&&Hs.addEventListener&&(Hs.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),s=this.connectClock)}),Hs.addEventListener("pageshow",l=>{s===this.connectClock&&(s=null,this.connect())}),Hs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>e.rejoinAfterMs?e.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>e.reconnectAfterMs?e.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ao(e.params||{}),this.endPoint=`${t}/${Ph.websocket}`,this.vsn=e.vsn||xO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Kb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Ls}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
vendor: 4,337 bytes, line 21
21close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Su.appendParams(Su.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ao(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ls?this.connectWithFallback(Ls,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(l=>{l.ref===e&&(this.off([s]),t(Date.now()-i))});return!0}transportName(t){return t===Ls?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Hh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,s=!0,l,u,c=this.transportName(t),h=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),s=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return h("memorized");this.fallbackTimer=setTimeout(h,e),u=this.onError(p=>{this.log("transport","error",p),s&&!i&&(clearTimeout(this.fallbackTimer),h(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!s){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,e),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),jO,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();const s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,i||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
21,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,i=1){if(i===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,i+1)},150*i)}waitForSocketClosed(t,e,i=1){if(i===5||t.readyState===zn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,i+1)},150*i)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,i=this.establishedConnections;this.triggerStateCallbacks("error",t,e,i),(e===this.transport||i>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ui.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case zn.connecting:return"connecting";case zn.open:return"open";case zn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new LO(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:s,ref:l,join_ref:u}=t;this.log("push",`${e} ${i} (${u}, ${l})`,s)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:s,payload:l,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",h)}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||""} ${i} ${s} ${u&&"("+u+")"||""}`.trim(),l);for(let h=0;h<this.channels.length;h++){const p=this.channels[h];p.isMember(i,s,l,c)&&p.trigger(s,l,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([i,s])=>{try{s(...e)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(i){this.log("error",`error triggering ${t} callbacks`,i)}}leaveOpenTopic(t){let e=this.channels.find(i=>i.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class oo{constructor(e,i){const s=PO(i);this.presence=new UO(e.getChannel(),s),this.presence.onJoin((l,u,c)=>{const h=oo.onJoinPayload(l,u,c);e.getChannel().trigger("presence",h)}),this.presence.onLeave((l,u,c)=>{const h=oo.onLeavePayload(l,u,c);e.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return oo.transformState(this.presence.state)}static transformState(e){return e=BO(e),Object.getOwnPropertyNames(e).reduce((i,s)=>{const l=e[s];return i[s]=gu(l),i},{})}static onJoinPayload(e,i,s){const l=yv(i),u=gu(s);return{event:"join",key:e,currentPresences:l,newPresences:u}}static onLeavePayload(e,i,s){const l=yv(i),u=gu(s);return{event:"leave",key:e,currentPresences:l,leftPresences:u}}}function gu(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function BO(t){return JSON.parse(JSON.stringify(t))}function PO(t){return t?.events&&{events:t.events}}function yv(t){return t?.metas?gu(t):[]}var vv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(vv||(vv={}));class HO{get state(){return this.presenceAdapter.state}constructor(e,i){this.channel=e,this.presenceAdapter=new oo(this.channel.channelAdapter,i)}}function IO(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
21if(typeof e.code=="number"){const i=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${i}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class qO{constructor(e,i,s){const l=$O(s);this.channel=e.getSocket().channel(i,l),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,i){return this.channel.on(e,i)}off(e,i){this.channel.off(e,i)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,i,s){let l;try{l=this.channel.push(e,i,s)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>wO){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(e){const i=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},i),e)}canPush(){return this.socket.isConnected()&&this.state===Xi.joined}isJoined(){return this.state===Xi.joined}isJoining(){return this.state===Xi.joining}isClosed(){return this.state===Xi.closed}isLeaving(){return this.state===Xi.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function $O(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var bv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(bv||(bv={}));var Ks;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ks||(Ks={}));var ci;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ci||(ci={}));class lo{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,i={config:{}},s){var l,u;if(this.topic=e,this.params=i,this.socket=s,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},i.config),this.channelAdapter=new qO(this.socket.socketAdapter,e,this.params),this.presence=new HO(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Vb(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(e,i=this.timeout){var s,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:h,private:p}}=this.params,g=(l=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[Ks.PRESENCE]&&this.bindings[Ks.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,m={},b={broadcast:c,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(ci.CHANNEL_ERROR,IO(_))}),this._onClose(()=>e?.(ci.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(i).receive("ok",async({postgres_changes:_})=>
21{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(ci.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Xi.errored;const S=Object.values(_).join(", ")||"error";e?.(ci.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(ci.TIMED_OUT)})}return this}_updatePostgresBindings(e,i){var s;const l=this.bindings.postgres_changes,u=(s=l?.length)!==null&&s!==void 0?s:0,c=[];for(let h=0;h<u;h++){const p=l[h],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=e&&e[h];if(_&&_.event===g&&lo.isFilterValueEqual(_.schema,y)&&lo.isFilterValueEqual(_.table,m)&&lo.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Xi.errored,i?.(ci.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Xi.errored&&i&&i(ci.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,i={}){return await this.send({type:"presence",event:"track",payload:e},i.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,i,s){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===Ks.PRESENCE||e===Ks.PO
21STGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,i,s)}async httpSend(e,i,s={}){var l;if(i==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:i,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(l=s.timeout)!==null&&l!==void 0?l:this.timeout);if(h.status===202)return{success:!0};let p=h.statusText;try{const g=await h.json();p=g.error||g.message||p}catch{}return Promise.reject(new Error(p))}async send(e,i={}){var s,l;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
21in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(s=i.timeout)!==null&&s!==void 0?s: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,h,p;const g=this.channelAdapter.push(e.type,e,i.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(h=(c=this.params)===null||c===void 0?void 0:c.config)===null||h===void 0?void 0:h.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(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(i=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>i("ok")).receive("timeout",()=>i("timed out")).receive("error",()=>i("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,i,s){const l=new AbortController,u=setTimeout(()=>l.abort(),s),c=await this.socket.fetch(e,Object.assign(Object.assign({},i),{signal:l.signal}));return clearTimeout(u),c}_on(e,i,s){const l=e.toLocaleLowerCase(),u=this.channelAdapter.on(e,s),c={type:l,filter:i,callback:s,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,i,s)=>{var l,u,c,h,p,g,y;const m=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,s))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=i.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((h=i.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((y=i?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(e,i){const{close:s,error:l,leave:u,join:c}=$b;return i&&[s,l,u,c].includes(e)&&i!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,i,s)=>{if(typeof i=="object"&&"ids"in i){const l=i.data,{schema:u,table:c,commit_timestamp:h,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:h,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return i})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const i in e.bindings)for(const s of e.bindings[i])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(e,i){return(e??void 0)===(i??void 0)}_getPayloadRecords(e){const i={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(i.new=mv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(i.old=mv(e.columns,e.old_record)),i}}class GO{constructor(e,i){this.socket=new zO(e,i)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,i,s,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{e(),u("ok")},i,s)})}push(e){this.socket.push(e)}log(e,i,s){this.socket.log(e,i,s)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==zh.connecting}isDisconnecting(){return this.socket.connectionState()==zh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const _v={HEARTBEAT_INTERVAL:25e3},VO=[1e3,2e3,5e3,1e4],KO=1e4;function FO(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var i;return(i=Array.from(t.keys())[e])!==null&&i!==void 0?i:null},removeItem(e){t.delete(e)},setItem(e,i){t.set(e,String(i))}}}function YO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return FO()}const QO=`
22  addEventListener("message", (e) => {
23    if (e.data.event === "start") {
24      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
25    }
26  });`;class JO{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,i){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
26,this.ref=0,this.serializer=new SO,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),!(!((s=i?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=i.params.apikey;const l=this._initializeOptions(i);this.socketAdapter=new GO(e,l),this.httpEndpoint=Vb(e),this.fetch=this._resolveFetch(i?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const i=e.message;throw i.includes("Node.js")?new Error(`${i}
27
28To use Realtime in Node.js, you need to provide a WebSocket implementation:
29
30Option 1: Use Node.js 22+ which has native WebSocket support
31Option 2: Install and provide the "ws" package:
32
33  npm install ws
34
35  import ws from "ws"
36  const client = new RealtimeClient(url, {
37    ...options,
38    transport: ws
39  })`):new Error(`WebSocket not available: ${i}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,i){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,i)}getChannels(){return this.channels}async removeChannel(e){const i=await e.unsubscribe();return i==="ok"&&e.teardown(),i}async removeAllChannels(){const e=this.channels.map(async s=>{const l=await s.unsubscribe();return s.teardown(),l}),i=await Promise.all(e);return await this.disconnect(),i}log(e,i,s){this.socketAdapter.log(e,i,s)}connectionState(){return this.socketAdapter.connectionState()||zh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,i={config:{}}){const s=`realtime:${e}`,l=this.getChannels().find(u=>u.topic===s);if(l)return l;{const u=new lo(`realtime:${e}`,i,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(i=>i.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
39this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let i,s=!1;if(e)i=e,s=!0;else if(this.accessToken)try{i=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),i=this.accessTokenValue}else i=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=i&&(this.accessTokenValue=i,this.channels.forEach(l=>{const u={access_token:i,version:yO};i&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push($b.access_token,{access_token:i})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(i=>{this.log("error",`Error setting auth in ${e}`,i)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(i=>{this.log("error","error waiting for auth on connect",i)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(i,s)=>{i=="sent"&&this._setAuthSafely(),e&&e(i,s)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=i=>{this.log("worker","worker error",i.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=i=>{i.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let i;if(e)i=e;else{const s=new Blob([QO],{type:"application/javascript"});i=URL.createObjectURL(s)}return i}_initializeOptions(e){var i,s,l,u,c,h,p,g,y,m,b,_;this.worker=(i=e?.worker)!==null&&i!==void 0?i:!1,this.accessToken=(s=e?.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(l=e?.timeout)!==null&&l!==void 0?l:_O,S.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:_v.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((h=e?.heartbeatIntervalMs)!==null&&h!==void 0?h:_v.HEARTBEAT_INTERVAL),S.transport=(p=e?.transport)!==null&&p!==void 0?p:gO.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(g=e?.sessionStorage)!==null&&g!==void 0?g:YO(),S.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(x=>VO[x-1]||KO);let E,A;const T=(m=e?.vsn)!==null&&m!==void 0?m:bO;switch(T){case vO:E=(x,k)=>k(JSON.stringify(x)),A=(x,k)=>k(JSON.parse(x));break;case qb:E=this.serializer.encode.bind(this.serializer),A=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=T,S.encode=(b=e?.encode)!==null&&b!==void 0?b:E,S.decode=(_=e?.decode)!==null&&_!==void 0?_:A,S.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
39var vo=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function XO(t,e,i){const s=new URL(e,t);if(i)for(const[l,u]of Object.entries(i))u!==void 0&&s.searchParams.set(l,u);return s.toString()}async function ZO(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function WO(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:i,path:s,query:l,body:u,headers:c}){const h=XO(t.baseUrl,s,l),p=await ZO(t.auth),g=await e(h,{method:i,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const _=m?b:void 0,S=_?.error;throw new vo(S?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function tu(t){return t.join("�")}var eC=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:tu(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(t,e){const i={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:i})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${tu(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${tu(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${tu(t.namespace)}`}),!0}catch(e){if(e instanceof vo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(i){if(i instanceof vo&&i.status===409)return;throw i}}};function Ms(t){return t.join("�")}var tC=class{constructor(t,e="",i){this.client=t,this.prefix=e,this.accessDelegation=i}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const i={};return this.accessDelegation&&(i["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables`,body:e,headers:i})).data.metadata}async updateTable(t,e){const i=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":i.data["metadata-location"],metadata:i.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ms(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(i){if(i instanceof vo&&i.status===404)return!1;throw i}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(i){if(i instanceof vo&&i.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw i}}},nC=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const i=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=WO({baseUrl:i,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new eC(this.client,e),this.tableOps=new tC(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
39async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function bo(t){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(t)}function iC(t,e){if(bo(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if(bo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rC(t){var e=iC(t,"string");return bo(e)=="symbol"?e:e+""}function sC(t,e,i){return(e=rC(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function wv(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),i.push.apply(i,s)}return i}function me(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?wv(Object(i),!0).forEach(function(s){sC(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wv(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}var zu=class extends Error{constructor(t,e="storage",i,s){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=i,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Bu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Ih=class extends zu{constructor(t,e,i,s="storage"){super(t,s,e,i),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=i}toJSON(){return me({},super.toJSON())}},Fb=class extends zu{constructor(t,e,i="storage"){super(t,i),this.name=i==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Eu(t,e,i){const s=me({},t),l=e.toLowerCase();for(const u of Object.keys(s))u.toLowerCase()===l&&delete s[u];return s[l]=i,s}function aC(t){const e={};for(const[i,s]of Object.entries(t))e[i.toLowerCase()]=s;return e}const oC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),lC=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qh=t=>{if(Array.isArray(t))return t.map(i=>qh(i));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([i,s])=>{const l=i.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[l]=qh(s)}),e},uC=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Sv=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const i=e.error;if(typeof i.message=="string")return i.message}}return JSON.stringify(t)},cC=async(t,e,i,s)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const l=t;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const h=c?.statusCode||c?.code||u+"";e(new Ih(Sv(c),u,h,s))}).catch(()=>{const c=u+"";e(new Ih(l.statusText||`HTTP ${u}
39 error`,u,c,s))})}else e(new Fb(Sv(t),t,s))},fC=(t,e,i,s)=>{const l={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!s)return me(me({},l),i);if(lC(s)){var u;const c=e?.headers||{};let h;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(h=g);l.headers=Eu(c,"Content-Type",(u=h)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(s)}else l.body=s;return e?.duplex&&(l.duplex=e.duplex),me(me({},l),i)};async function to(t,e,i,s,l,u,c){return new Promise((h,p)=>{t(i,fC(e,s,l,u)).then(g=>{if(!g.ok)throw g;if(s?.noResolveJson)return g;if(c==="vectors"){const y=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!y||!y.includes("application/json"))return{}}return g.json()}).then(g=>h(g)).catch(g=>cC(g,p,s,c))})}function Yb(t="storage"){return{get:async(e,i,s,l)=>to(e,"GET",i,s,l,void 0,t),post:async(e,i,s,l,u)=>to(e,"POST",i,l,u,s,t),put:async(e,i,s,l,u)=>to(e,"PUT",i,l,u,s,t),head:async(e,i,s,l)=>to(e,"HEAD",i,me(me({},s),{},{noResolveJson:!0}),l,void 0,t),remove:async(e,i,s,l,u)=>to(e,"DELETE",i,l,u,s,t)}}const hC=Yb("storage"),{get:_o,post:_n,put:$h,head:dC,remove:Sd}=hC,Xt=Yb("vectors");var Ws=class{constructor(t,e={},i,s="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=aC(e),this.fetch=oC(i),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Eu(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(Bu(i))return{data:null,error:i};throw i}}};let Qb;Qb=Symbol.toStringTag;var pC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Qb]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Bu(e))return{data:null,error:e};throw e}}};let Jb;Jb=Symbol.toStringTag;var gC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Jb]="BlobDownloadBuilder",this.promise=null}asStream(){return new pC(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Bu(e))return{data:null,error:e};throw e}}};const mC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ev={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var yC=class extends Ws{constructor(t,e={},i,s){super(t,e,s,"storage"),this.bucketId=i}async uploadOrUpdate(t,e,i,s){var l=this;return l.handleOperation(async()=>{let u;const c=me(me({},Ev),s);let h=me(me({},l.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&i instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",i)):typeof FormData<"u"&&i instanceof FormData?(u=i,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=i,h["cache-control"]=`max-age=${c.cacheControl}`,h["content-type"]=c.contentType,p&&(h["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")),s?.headers)for(const[b,_]of Object.entries(s.headers))h=Eu(h,b,_);const g=l._removeEmptyFolders(e),y=l._getFinalPath(g),m=await(t=="PUT"?$h:_n)(l.fetch,`${l.url}/object/${y}`,u,me({headers:h},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(t,e,i){return this.uploadOrUpdate("POST",t,e,i)}async uploadToSignedUrl(t,e,i,s){var l=this;const u=l._removeEmptyFolders(t),c=l._getFinalPath(u),h=new URL(l.url+`/object/upload/sign/${c}`);return h.searchParams.set("token",e),l.handleOperation(async()=>{let p;const g=me(me({},Ev),s);let y=me(me({},l.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&i instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",l.encodeMetadata(m)),p.append("",i)):typeof FormData<"u"&&i instanceof FormData?(p=i,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(m))):(p=i,y["cac
39he-control"]=`max-age=${g.cacheControl}`,y["content-type"]=g.contentType,m&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(m))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),s?.headers)for(const[b,_]of Object.entries(s.headers))y=Eu(y,b,_);return{path:u,fullPath:(await $h(l.fetch,h.toString(),p,me({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var i=this;return i.handleOperation(async()=>{let s=i._getFinalPath(t);const l=me({},i.headers);e?.upsert&&(l["x-upsert"]="true");const u=await _n(i.fetch,`${i.url}/object/upload/sign/${s}`,{},{headers:l}),c=new URL(i.url+u.url),h=c.searchParams.get("token");if(!h)throw new zu("No token returned by API");return{signedUrl:c.toString(),path:t,token:h}})}async update(t,e,i){return this.uploadOrUpdate("PUT",t,e,i)}async move(t,e,i){var s=this;return s.handleOperation(async()=>await _n(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i?.destinationBucket},{headers:s.headers}))}async copy(t,e,i){var s=this;return s.handleOperation(async()=>({path:(await _n(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(t,e,i){var s=this;return s.handleOperation(async()=>{let l=s._getFinalPath(t);const u=typeof i?.transform=="object"&&i.transform!==null&&Object.keys(i.transform).length>0;let c=await _n(s.fetch,`${s.url}/object/sign/${l}`,me({expiresIn:e},u?{transform:i.transform}:{}),{headers:s.headers});const h=new URLSearchParams;i?.download&&h.set("download",i.download===!0?"":i.download),i?.cacheNonce!=null&&h.set("cacheNonce",String(i.cacheNonce));const p=h.toString();return{signedUrl:encodeURI(`${s.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,e,i){var s=this;return s.handleOperation(async()=>{const l=await _n(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:e,paths:t},{headers:s.headers}),u=new URLSearchParams;i?.download&&u.set("download",i.download===!0?"":i.download),i?.cacheNonce!=null&&u.set("cacheNonce",String(i.cacheNonce));const c=u.toString();return l.map(h=>me(me({},h),{},{signedUrl:h.signedURL?encodeURI(`${s.url}${h.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,i){const s=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(l,e.transform),e?.cacheNonce!=null&&l.set("cacheNonce",String(e.cacheNonce));const u=l.toString(),c=this._getFinalPath(t),h=()=>_o(this.fetch,`${this.url}/${s}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},i);return new gC(h,this.shouldThrowOnError)}async info(t){var e=this;const i=e._getFinalPath(t);return e.handleOperation(async()=>qh(await _o(e.fetch,`${e.url}/object/info/${i}`,{headers:e.headers})))}async exists(t){var e=this;const i=e._getFinalPath(t);try{return await dC(e.fetch,`${e.url}/object/${i}`,{headers:e.headers}),{data:!0,error:null}}catch(l){if(e.shouldThrowOnError)throw l;if(Bu(l)){var s;const u=l instanceof Ih?l.status:l instanceof Fb?(s=l.originalError)===null||s===void 0?void 0:s.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,e){const i=this._getFinalPath(t),s=new URLSearchParams;e?.download&&s.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(s,e.transform),e?.cacheNonce!=null&&s.set("cacheNonce",String(e.cacheNonce));const l=s.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${i}`)+(l?`?${l}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Sd(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,i){var s=this;return s.handleOperation(async()=>{const l=me(me(me({},mC),e),{},{prefix:t||""});return await _n(s.fetch,`${s.url}/object/list/${s.bucketId}`,l,{headers:s.headers},i)})}async listV2(t,e){var i=this;return i.handleOperation(async()=>{const s=me({},t);return await _n(i.fetch,`${i.url}/object/list-v2/${i.bucketId}`,s,{headers:i.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
39ity",e.quality.toString()),t}};const vC="2.106.1",Co={"X-Client-Info":`storage-js/${vC}`};var bC=class extends Ws{constructor(t,e={},i,s){const l=new URL(t);s?.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=me(me({},Co),e);super(u,c,i,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const i=e.listBucketOptionsToQueryString(t);return await _o(e.fetch,`${e.url}/bucket${i}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await _o(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var i=this;return i.handleOperation(async()=>await _n(i.fetch,`${i.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:i.headers}))}async updateBucket(t,e){var i=this;return i.handleOperation(async()=>await $h(i.fetch,`${i.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:i.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await _n(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Sd(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},_C=class extends Ws{constructor(t,e={},i){const s=t.replace(/\/$/,""),l=me(me({},Co),e);super(s,l,i,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await _n(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const i=new URLSearchParams;t?.limit!==void 0&&i.set("limit",t.limit.toString()),t?.offset!==void 0&&i.set("offset",t.offset.toString()),t?.sortColumn&&i.set("sortColumn",t.sortColumn),t?.sortOrder&&i.set("sortOrder",t.sortOrder),t?.search&&i.set("search",t.search);const s=i.toString(),l=s?`${e.url}/bucket?${s}`:`${e.url}/bucket`;return await _o(e.fetch,l,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Sd(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!uC(t))throw new zu("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 i=new nC({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(i,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...h)=>{try{return{data:await c.apply(l,h),error:null}}catch(p){if(s)throw p;return{data:null,error:p}}}}})}},wC=class extends Ws{constructor(t,e={},i){const s=t.replace(/\/$/,""),l=me(me({},Co),{},{"Content-Type":"application/json"},e);super(s,l,i,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var i=this;return i.handleOperation(async()=>await Xt.post(i.fetch,`${i.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:i.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var i=this;return i.handleOperation(async()=>await Xt.post(i.fetch,`${i.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:i.headers})||{})}},SC=class extends Ws{constructor(t,e={},i){const s=t.replace(/\/$/,""),l=me(me({},Co),{},{"Content-Type":"application/json"},e);super(s,l,i,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
39if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},EC=class extends Ws{constructor(t,e={},i){const s=t.replace(/\/$/,""),l=me(me({},Co),{},{"Content-Type":"application/json"},e);super(s,l,i,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Xt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},TC=class extends EC{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new AC(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,i=this;return e().call(i,t)}async getBucket(t){var e=()=>super.getBucket,i=this;return e().call(i,t)}async listBuckets(t={}){var e=()=>super.listBuckets,i=this;return e().call(i,t)}async deleteBucket(t){var e=()=>super.deleteBucket,i=this;return e().call(i,t)}},AC=class extends wC{constructor(t,e,i,s){super(t,e,s),this.vectorBucketName=i}async createIndex(t){var e=()=>super.createIndex,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,i=this;return e().call(i,i.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,i=this;return e().call(i,i.vectorBucketName,t)}index(t){return new RC(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},RC=class extends SC{constructor(t,e,i,s,l){super(t,e,l),this.vectorBucketName=i,this.indexName=s}async putVectors(t){var e=()=>super.putVectors,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async getVectors(t){var e=()=>super.getVectors,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,i=this;return e().call(i,me(me({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}},OC=class extends bC{constructor(t,e={},i,s){super(t,e,i,s)}from(t){return new yC(this.url,this.headers,t,this.fetch)}get vectors(){return new TC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _C(this.url+"/iceberg",this.headers,this.fetch)}};const Xb="2.106.1",Is=30*1e3,Gh=3,vh=Gh*Is,CC="http://localhost:9999",kC="supabase.auth.token",xC={"X-Client-Info":`gotrue-js/${Xb}`},Vh="X-Supabase-Api-Version",Zb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},NC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,jC=600*1e3;class Zs extends Error{constructor(e,i,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=i,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ee(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class DC extends Zs{constructor(e,i,s){super(e,i,s),this.name="AuthApiError",this.status=i,this.code=s}}function LC(t){return ee(t)&&t.name==="AuthApiError"}class Sn extends Zs{constructor(e,i){super(e),this.name="AuthUnknownError",this.originalError=i}}class _i extends Zs{constructor(e,i,s,l){super(e,s,l),this.name=i,this.status=s}}class ut extends _i{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function nu(t){return ee(t)&&t.name==="AuthSessionMissingError"}class Us extends _i{constructor(){super("Auth session or user missing","AuthInvalidToken
39ResponseError",500,void 0)}}class iu extends _i{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ru extends _i{constructor(e,i=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function MC(t){return ee(t)&&t.name==="AuthImplicitGrantRedirectError"}class Tv extends _i{constructor(e,i=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class UC extends _i{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 Kh extends _i{constructor(e,i){super(e,"AuthRetryableFetchError",i,void 0)}}function bh(t){return ee(t)&&t.name==="AuthRetryableFetchError"}class Av extends _i{constructor(e,i,s){super(e,"AuthWeakPasswordError",i,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Fh extends _i{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Tu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Rv=` 	
40\r=`.split(""),zC=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Rv.length;e+=1)t[Rv[e].charCodeAt(0)]=-2;for(let e=0;e<Tu.length;e+=1)t[Tu[e].charCodeAt(0)]=e;return t})();function Ov(t,e,i){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;i(Tu[s]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;i(Tu[s]),e.queuedBits-=6}}function Wb(t,e,i){const s=zC[t];if(s>-1)for(e.queue=e.queue<<6|s,e.queuedBits+=6;e.queuedBits>=8;)i(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Cv(t){const e=[],i=c=>{e.push(String.fromCodePoint(c))},s={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{HC(c,s,i)};for(let c=0;c<t.length;c+=1)Wb(t.charCodeAt(c),l,u);return e.join("")}function BC(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function PC(t,e){for(let i=0;i<t.length;i+=1){let s=t.charCodeAt(i);if(s>55295&&s<=56319){const l=(s-55296)*1024&65535;s=(t.charCodeAt(i+1)-56320&65535|l)+65536,i+=1}BC(s,e)}}function HC(t,e,i){if(e.utf8seq===0){if(t<=127){i(t);return}for(let s=1;s<6;s+=1)if((t>>7-s&1)===0){e.utf8seq=s;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&i(e.codepoint)}}function Xs(t){const e=[],i={queue:0,queuedBits:0},s=l=>{e.push(l)};for(let l=0;l<t.length;l+=1)Wb(t.charCodeAt(l),i,s);return new Uint8Array(e)}function IC(t){const e=[];return PC(t,i=>e.push(i)),new Uint8Array(e)}function Ur(t){const e=[],i={queue:0,queuedBits:0},s=l=>{e.push(l)};return t.forEach(l=>Ov(l,i,s)),Ov(null,i,s),e.join("")}function qC(t){return Math.round(Date.now()/1e3)+t}function $C(){return Symbol("auth-callback")}const yt=()=>typeof window<"u"&&typeof document<"u",xr={tested:!1,writable:!1},e_=()=>{if(!yt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xr.tested)return xr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),xr.tested=!0,xr.writable=!0}catch{xr.tested=!0,xr.writable=!1}return xr.writable};function GC(t){const e={},i=new URL(t);if(i.hash&&i.hash[0]==="#")try{new URLSearchParams(i.hash.substring(1)).forEac
40h((l,u)=>{e[u]=l})}catch{}return i.searchParams.forEach((s,l)=>{e[l]=s}),e}const t_=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),VC=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",qs=async(t,e,i)=>{await t.setItem(e,JSON.stringify(i))},Nr=async(t,e)=>{const i=await t.getItem(e);if(!i)return null;try{return JSON.parse(i)}catch{return null}},mt=async(t,e)=>{await t.removeItem(e)};class Pu{constructor(){this.promise=new Pu.promiseConstructor((e,i)=>{this.resolve=e,this.reject=i})}}Pu.promiseConstructor=Promise;function su(t){const e=t.split(".");if(e.length!==3)throw new Fh("Invalid JWT structure");for(let s=0;s<e.length;s++)if(!NC.test(e[s]))throw new Fh("JWT not in base64url format");return{header:JSON.parse(Cv(e[0])),payload:JSON.parse(Cv(e[1])),signature:Xs(e[2]),raw:{header:e[0],payload:e[1]}}}async function KC(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function FC(t,e){return new Promise((s,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!e(u,null,c)){s(c);return}}catch(c){if(!e(u,c)){l(c);return}}})()})}function YC(t){return("0"+t.toString(16)).substr(-2)}function QC(){const e=new Uint32Array(56);if(typeof crypto>"u"){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=i.length;let l="";for(let u=0;u<56;u++)l+=i.charAt(Math.floor(Math.random()*s));return l}return crypto.getRandomValues(e),Array.from(e,YC).join("")}async function JC(t){const i=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",i),l=new Uint8Array(s);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function XC(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const i=await JC(t);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function zs(t,e,i=!1){const s=QC();let l=s;i&&(l+="/recovery"),await qs(t,`${e}-code-verifier`,l);const u=await XC(s);return[u,s===u?"plain":"s256"]}const ZC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function WC(t){const e=t.headers.get(Vh);if(!e||!e.match(ZC))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function e2(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function t2(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const n2=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ai(t){if(!n2.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function vn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function _h(){const t={};return new Proxy(t,{get:(e,i)=>{if(i==="__isUserNotAvailableProxy")return!0;if(typeof i=="symbol"){const s=i.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="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 "${i}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function i2(t,e){return new Proxy(t,{get:(i,s,l)=>{if(s==="__isInsecureUserWarningProxy")return!0;
40if(typeof s=="symbol"){const u=s.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(i,s,l)}return!e.value&&typeof s=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(i,s,l)}})}function kv(t){return JSON.parse(JSON.stringify(t))}const jr=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},r2=[502,503,504,520,521,522,523,524,530];async function xv(t){var e;if(!VC(t))throw new Kh(jr(t),0);if(r2.includes(t.status))throw new Kh(jr(t),t.status);let i;try{i=await t.json()}catch(u){throw new Sn(jr(u),u)}let s;const l=WC(t);if(l&&l.getTime()>=Zb["2024-01-01"].timestamp&&typeof i=="object"&&i&&typeof i.code=="string"?s=i.code:typeof i=="object"&&i&&typeof i.error_code=="string"&&(s=i.error_code),s){if(s==="weak_password")throw new Av(jr(i),t.status,((e=i.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new ut}else if(typeof i=="object"&&i&&typeof i.weak_password=="object"&&i.weak_password&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Av(jr(i),t.status,i.weak_password.reasons);throw new DC(jr(i),t.status||500,s)}const s2=(t,e,i,s)=>{const l={method:t,headers:e?.headers||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),l.body=JSON.stringify(s),Object.assign(Object.assign({},l),i))};async function re(t,e,i,s){var l;const u=Object.assign({},s?.headers);u[Vh]||(u[Vh]=Zb["2024-01-01"].name),s?.jwt&&(u.Authorization=`Bearer ${s.jwt}`);const c=(l=s?.query)!==null&&l!==void 0?l:{};s?.redirectTo&&(c.redirect_to=s.redirectTo);const h=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await a2(t,e,i+h,{headers:u,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(p):{data:Object.assign({},p),error:null}}async function a2(t,e,i,s,l,u){const c=s2(e,s,l,u);let h;try{h=await t(i,Object.assign({},c))}catch(p){throw console.error(p),new Kh(jr(p),0)}if(h.ok||await xv(h),s?.noResolveJson)return h;try{return await h.json()}catch(p){await xv(p)}}function cn(t){var e;let i=null;u2(t)&&(i=Object.assign({},t),t.expires_at||(i.expires_at=qC(t.expires_in)));const s=(e=t.user)!==null&&e!==void 0?e:null;return{data:{session:i,user:s},error:null}}function Nv(t){const e=cn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((i,s)=>i&&typeof s=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Zi(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function o2(t){return{data:t,error:null}}function l2(t){const{action_link:e,email_otp:i,hashed_token:s,redirect_to:l,verification_type:u}=t,c=Uu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:e,email_otp:i,hashed_token:s,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:h,user:p},error:null}}function jv(t){return t}function u2(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const wh=["global","local","others"];class c2{_encodePathSegment(e){if(e==="."||e==="..")throw new Zs("Invalid path segment");return encodeURIComponent(e)}constructor({url:e="",headers:i={},fetch:s,experimental:l}){this.url=e,this.headers=i,this.fetch=t_(s),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)}}
40async signOut(e,i=wh[0]){if(wh.indexOf(i)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${wh.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${i}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(ee(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,i={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:i.data},headers:this.headers,redirectTo:i.redirectTo,xform:Zi})}catch(s){if(ee(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:i}=e,s=Uu(e,["options"]),l=Object.assign(Object.assign({},s),i);return"newEmail"in s&&(l.new_email=s?.newEmail,delete l.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:l2,redirectTo:i?.redirectTo})}catch(i){if(ee(i))return{data:{properties:null,user:null},error:i};throw i}}async createUser(e){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Zi})}catch(i){if(ee(i))return{data:{user:null},error:i};throw i}}async listUsers(e){var i,s,l,u,c,h,p;try{const g={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(i=e?.page)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:jv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);g[`${A}Page`]=E}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(ee(g))return{data:{users:[]},error:g};throw g}}async getUserById(e){ai(e);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Zi})}catch(i){if(ee(i))return{data:{user:null},error:i};throw i}}async updateUserById(e,i){ai(e);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:i,headers:this.headers,xform:Zi})}catch(s){if(ee(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,i=!1){ai(e);try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:i},xform:Zi})}catch(s){if(ee(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){ai(e.userId);try{const{data:i,error:s}=await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:i,error:s}}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _deleteFactor(e){ai(e.userId),ai(e.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _listOAuthClients(e){var i,s,l,u,c,h,p;try{const g={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(i=e?.page)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:jv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);g[`${A}Page`]=E}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(ee(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(e){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _getOAuthClient(e){try{const i=this._encodePathSegment(e);return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${i}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _updateOAuthClient(e,i){try{const s=this._encodePathSegment(e);return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${s}`,{body:i,headers:this.headers,xform:l=>({data:l,error:null})})}catch(s){if(ee(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(e){try{const i=this._encodePathSegment(e);
40return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${i}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _regenerateOAuthClientSecret(e){try{const i=this._encodePathSegment(e);return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${i}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _listCustomProviders(e){try{const i={};return e?.type&&(i.type=e.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:i,xform:s=>{var l;return{data:{providers:(l=s?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(i){if(ee(i))return{data:{providers:[]},error:i};throw i}}async _createCustomProvider(e){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _getCustomProvider(e){try{const i=this._encodePathSegment(e);return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${i}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _updateCustomProvider(e,i){try{const s=this._encodePathSegment(e);return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${s}`,{body:i,headers:this.headers,xform:l=>({data:l,error:null})})}catch(s){if(ee(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(e){try{const i=this._encodePathSegment(e);return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${i}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _adminListPasskeys(e){vn(this.experimental),ai(e.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _adminDeletePasskey(e){vn(this.experimental),ai(e.userId),ai(e.passkeyId);try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(ee(i))return{data:null,error:i};throw i}}}function Dv(t={}){return{getItem:e=>t[e]||null,setItem:(e,i)=>{t[e]=i},removeItem:e=>{delete t[e]}}}const Dn={debug:!!(globalThis&&e_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class n_ extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Lv extends n_{}async function f2(t,e,i){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const s=new globalThis.AbortController;let l;e>0&&(l=setTimeout(()=>{s.abort(),Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async u=>{if(u){clearTimeout(l),Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,u.name);try{return await i()}finally{Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,u.name)}}else{if(e===0)throw Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Lv(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Dn.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null,"  "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(l),await i()}})}catch(u){if(e>0&&clearTimeout(l),u!==null&&typeof u=="object"&&"name"in u&&u.name==="AbortError"&&e>0){if(s.signal.aborted)return Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@
40supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async c=>{if(c){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,c.name);try{return await i()}finally{Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await i()}));throw Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Lv(`Lock "${t}" was released because another request stole it`)}throw u}}function h2(){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 i_(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function d2(t){return parseInt(t,16)}function p2(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,s=>s.toString(16).padStart(2,"0")).join("")}function g2(t){var e;const{chainId:i,domain:s,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:h,requestId:p,resources:g,scheme:y,uri:m,version:b}=t;{if(!Number.isInteger(i))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${i}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
41`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=i_(t.address),S=y?`${y}://${s}`:s,E=t.statement?`${t.statement}
42`:"",A=`${S} wants you to sign in with your Ethereum account:
43${_}
44
45${E}`;let T=`URI: ${m}
46Version: ${b}
47Chain ID: ${i}${c?`
48Nonce: ${c}`:""}
49Issued At: ${u.toISOString()}`;if(l&&(T+=`
50Expiration Time: ${l.toISOString()}`),h&&(T+=`
51Not Before: ${h.toISOString()}`),p&&(T+=`
52Request ID: ${p}`),g){let x=`
53Resources:`;for(const k of g){if(!k||typeof k!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${k}`);x+=`
54- ${k}`}T+=x}return`${A}
55${T}`}class nt extends Error{constructor({message:e,code:i,cause:s,name:l}){var u;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(u=l??(s instanceof Error?s.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=i}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Au extends nt{constructor(e,i){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i,message:e}),this.name="WebAuthnUnknownError",this.originalError=i}}function m2({error:t,options:e}){var i,s,l;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new nt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((i=u.authenticatorSelection)===null||i===void 0?void 0:i.requireResidentKey)===!0)return new nt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((s=u.authenticatorSelection)===null||s===void 0?void 0:s.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:t});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:t})}else{if(t.name==="InvalidStateError")return new nt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new nt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new nt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new nt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if(r_(c)){if(u.rp.id!==c)return new nt({message:`The RP ID "${u.rp.id}
55" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.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:t})}else if(t.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:t})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function y2({error:t,options:e}){const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new nt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new nt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(r_(s)){if(i.rpId!==s)return new nt({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.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:t})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class v2{createNewAbortSignal(){if(this.controller){const i=new Error("Cancelling existing WebAuthn API call for new one");i.name="AbortError",this.controller.abort(i)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Yh=new v2;function Mv(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:i,excludeCredentials:s}=t,l=Uu(t,["challenge","user","excludeCredentials"]),u=Xs(e).buffer,c=Object.assign(Object.assign({},i),{id:Xs(i.id).buffer}),h=Object.assign(Object.assign({},l),{challenge:u,user:c});if(s&&s.length>0){h.excludeCredentials=new Array(s.length);for(let p=0;p<s.length;p++){const g=s[p];h.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:Xs(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return h}function Uv(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:i}=t,s=Uu(t,["challenge","allowCredentials"]),l=Xs(e).buffer,u=Object.assign(Object.assign({},s),{challenge:l});if(i&&i.length>0){u.allowCredentials=new Array(i.length);for(let c=0;c<i.length;c++){const h=i[c];u.allowCredentials[c]=Object.assign(Object.assign({},h),{id:Xs(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return u}function zv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const i=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ur(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ur(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=i.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Bv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const i=t,s=t.getClientExtensionResults(),l=t.response;
55return{id:t.id,rawId:t.id,response:{authenticatorData:Ur(new Uint8Array(l.authenticatorData)),clientDataJSON:Ur(new Uint8Array(l.clientDataJSON)),signature:Ur(new Uint8Array(l.signature)),userHandle:l.userHandle?Ur(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(e=i.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function r_(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Ru(){var t,e;return!!(yt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function s_(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Au("Browser returned unexpected credential type",e)}:{data:null,error:new Au("Empty credential response",e)}}catch(e){return{data:null,error:m2({error:e,options:t})}}}async function a_(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Au("Browser returned unexpected credential type",e)}:{data:null,error:new Au("Empty credential response",e)}}catch(e){return{data:null,error:y2({error:e,options:t})}}}const b2={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},_2={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ou(...t){const e=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),i=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),s={};for(const l of t)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))s[u]=c;else if(i(c))s[u]=c;else if(e(c)){const h=s[u];e(h)?s[u]=Ou(h,c):s[u]=Ou(c)}else s[u]=c}return s}function w2(t,e){return Ou(b2,t,e||{})}function S2(t,e){return Ou(_2,t,e||{})}class E2{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:i,friendlyName:s,signal:l},u){var c;try{const{data:h,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:i});if(!h)return{data:null,error:p};const g=l??Yh.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const m=s;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,S=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=w2(h.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await s_({publicKey:y,signal:g});return m?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=S2(h.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await a_(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(h){return ee(h)?{data:null,error:h}:{data:null,error:new Sn("Unexpected error in challenge",h)}}}async _verify({challengeId:e,factorId:i,webauthn:s}){return this.client.mfa.verify({factorId:i,challengeId:e,webauthn:s})}async _authenticate({factorId:e,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!i)return{data:null,error:new Zs("rpId is required for WebAuthn authentication")};try{if(!Ru())return{data:null,error:new Sn("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this.challenge({factorId:e,webauthn:{rpId:i,rpOrigins:s},signal:l},{request:u});if(!c)return{data:null,error:h};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:i,rpOrigins:s,credential_response:p.credential_response}})}catch(c){return ee(c)?{data:null,error:c}:{data:null,error:new Sn("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!i)return{data:null,error:new Zs("rpId is required for WebAuthn registration")};try{if(!Ru())return{data:null,error:new Sn("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this._enroll({friendlyName:e});if(!c)return await this.client.mfa.listFactors().then(y=>{var m;return(m=y.data)===null||m===void 0?void 0:m.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:h};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:i,rpOrigins:s},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:i,rpOrigins:s,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return ee(c)?{data:null,error:c}:{data:null,error:new Sn("Unexpected error in register",c)}}}}h2();const T2={url:CC,storageKey:kC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:xC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Pv(t,e,i){return await i()}const Bs={};class wo{get jwks(){var e,i;return(i=(e=Bs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&i!==void 0?i:{keys:[]}}set jwks(e){Bs[this.storageKey]=Object.assign(Object.assign({},Bs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,i;return(i=(e=Bs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&i!==void 0?i:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Bs[this.storageKey]=Object.assign(Object.assign({},Bs[this.storageKey]),{cachedAt:e})}constructor(e){var i,s,l,u;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},T2),e);if(this.storageKey=c.storageKey,this.instanceID=(i=wo.nextInstanceID[this.storageKey])!==null&&i!==void 0?i:0,wo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&yt()){const h=`${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(h),this.logDebugMessages&&console.trace(h)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(s=c.experimental)!==null&&s!==void 0?s:{}
55,this.admin=new c2({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=t_(c.fetch),this.lock=c.lock||Pv,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&yt()&&(!((l=globalThis?.navigator)===null||l===void 0)&&l.locks)?this.lock=f2:this.lock=Pv,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 E2(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?(c.storage?this.storage=c.storage:e_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Dv(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Dv(this.memoryStorage)),yt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(h){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",h)}(u=this.broadcastChannel)===null||u===void 0||u.addEventListener("message",async h=>{this._debug("received broadcast notification from other tab or client",h);try{await this._notifyAllSubscribers(h.data.event,h.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}c.skipAutoInitialize||this.initialize().catch(h=>{this._debug("#initialize()","error",h)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Xb}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let i={},s="none";if(yt()&&(i=GC(window.location.href),this._isImplicitGrantCallback(i)?s="implicit":await this._isPKCECallback(i)&&(s="pkce")),yt()&&this.detectSessionInUrl&&s!=="none"){const{data:l,error:u}=await this._getSessionFromURL(i,s);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),MC(u)){const p=(e=u.details)===null||e===void 0?void 0:e.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:h}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",h),await this._saveSession(c),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(i){return ee(i)?this._returnResult({error:i}):this._returnResult({error:new Sn("Unexpected error during initialization",i)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var i,s,l;
55try{const u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(i=e?.options)===null||i===void 0?void 0:i.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(l=e?.options)===null||l===void 0?void 0:l.captchaToken}},xform:cn}),{data:c,error:h}=u;if(h||!c)return this._returnResult({data:{user:null,session:null},error:h});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(ee(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var i,s,l;try{let u;if("email"in e){const{email:y,password:m,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await zs(this.storage,this.storageKey)),u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(i=b?.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:cn})}else if("phone"in e){const{phone:y,password:m,options:b}=e;u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(s=b?.data)!==null&&s!==void 0?s:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:cn})}else throw new iu("You must provide either an email or phone number and a password");const{data:c,error:h}=u;if(h||!c)return await mt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});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 mt(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let i;if("email"in e){const{email:u,password:c,options:h}=e;i=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Nv})}else if("phone"in e){const{phone:u,password:c,options:h}=e;i=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Nv})}else throw new iu("You must provide either an email or phone number and a password");const{data:s,error:l}=i;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!s||!s.session||!s.user){const u=new Us;return this._returnResult({data:{user:null,session:null},error:u})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:l})}catch(i){if(ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOAuth(e){var i,s,l,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(i=e.options)===null||i===void 0?void 0:i.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:i}=e;switch(i){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${i}"`)}}async signInWithEthereum(e){var i,s,l,u,c,h,p,g,y,m,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:E,wallet:A,statement:T,options:x}=e;let k;if(yt())if(typeof A=="object")k=A;else{const te=window;if("ethereum"in te&&typeof te.ethereum=="object"&&"request"in te.ethereum&&typeof te.ethereum.request=="function")k=te.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 A!="object"||!x?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=A}const P=new URL((i=x?.url)!==null&&i!==void 0?i:window.location.href),Z=await k.request({method:"eth_requestAccounts"}).then(te=>
55te).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Z||Z.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const z=i_(Z[0]);let D=(s=x?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!D){const te=await k.request({method:"eth_chainId"});D=d2(te)}const Y={domain:P.host,address:z,statement:T,uri:P.href,version:"1",chainId:D,nonce:(l=x?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=x?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(h=x?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(p=x?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=x?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=x?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=g2(Y),S=await k.request({method:"personal_sign",params:[p2(_),z]})}try{const{data:E,error:A}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((m=e.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:cn});if(A)throw A;if(!E||!E.session||!E.user){const T=new Us;return this._returnResult({data:{user:null,session:null},error:T})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:A})}catch(E){if(ee(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async signInWithSolana(e){var i,s,l,u,c,h,p,g,y,m,b,_;let S,E;if("message"in e)S=e.message,E=e.signature;else{const{chain:A,wallet:T,statement:x,options:k}=e;let P;if(yt())if(typeof T=="object")P=T;else{const z=window;if("solana"in z&&typeof z.solana=="object"&&("signIn"in z.solana&&typeof z.solana.signIn=="function"||"signMessage"in z.solana&&typeof z.solana.signMessage=="function"))P=z.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 T!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");P=T}const Z=new URL((i=k?.url)!==null&&i!==void 0?i:window.location.href);if("signIn"in P&&P.signIn){const z=await P.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},k?.signInWithSolana),{version:"1",domain:Z.host,uri:Z.href}),x?{statement:x}:null));let D;if(Array.isArray(z)&&z[0]&&typeof z[0]=="object")D=z[0];else if(z&&typeof z=="object"&&"signedMessage"in z&&"signature"in z)D=z;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)S=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),E=D.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in P)||typeof P.signMessage!="function"||!("publicKey"in P)||typeof P!="object"||!P.publicKey||!("toBase58"in P.publicKey)||typeof P.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${Z.host} wants you to sign in with your Solana account:`,P.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${Z.href}`,`Issued At: ${(l=(s=k?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=k?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${k.signInWithSolana.notBefore}`]:[],...!((c=k?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${k.signInWithSolana.expirationTime}
55`]:[],...!((h=k?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${k.signInWithSolana.chainId}`]:[],...!((p=k?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${k.signInWithSolana.nonce}`]:[],...!((g=k?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${k.signInWithSolana.requestId}`]:[],...!((m=(y=k?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...k.signInWithSolana.resources.map(D=>`- ${D}`)]:[]].join(`
56`);const z=await P.signMessage(new TextEncoder().encode(S),"utf8");if(!z||!(z instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");E=z}}try{const{data:A,error:T}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Ur(E)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:cn});if(T)throw T;if(!A||!A.session||!A.user){const x=new Us;return this._returnResult({data:{user:null,session:null},error:x})}return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:T})}catch(A){if(ee(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async _exchangeCodeForSession(e){const i=await Nr(this.storage,`${this.storageKey}-code-verifier`),[s,l]=(i??"").split("/");try{if(!s&&this.flowType==="pkce")throw new UC;const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:cn});if(await mt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const h=new Us;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}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 mt(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:i,provider:s,token:l,access_token:u,nonce:c}=e,h=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:cn}),{data:p,error:g}=h;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new Us;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(i){if(ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOtp(e){var i,s,l,u,c;try{if("email"in e){const{email:h,options:p}=e;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await zs(this.storage,this.storageKey));const{error:m}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(i=p?.data)!==null&&i!==void 0?i:{},create_user:(s=p?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in e){const{phone:h,options:p}=e,{data:g,error:y}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:y})}throw new iu("You must provide either an email or phone number.")}catch(h){if(await mt(this.storage,`${this.storageKey}-code-verifier`),ee(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(e){var i,s;try{let l,u;"options"in e&&(l=(i=e.options)===null||i===void 0?void 0:i.redirectTo,u=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:h}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:cn});if(h)throw h;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(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(ee(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(e){var i,s,l,u,c;try{let h=null,p=null;this.flowType==="pkce"&&([h,p]=await zs(this.storage,this.storageKey));const g=await re(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(i=e.options)===null||i===void 0?void 0:i.redirectTo)!==null&&s!==void 0?s:void 0}),!((l=e?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:p}),headers:this.headers,xform:o2});return!((u=g.data)===null||u===void 0)&&u.url&&yt()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(h){if(await mt(this.storage,`${this.storageKey}-code-verifier`),ee(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)throw s;if(!i)throw new ut;const{error:l}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:i.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(e){if(ee(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const i=`${this.url}/resend`;if("email"in e){const{email:s,type:l,options:u}=e,{error:c}=await re(this.fetch,"POST",i,{headers:this.headers,body:{email:s,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:s,type:l,options:u}=e,{data:c,error:h}=await re(this.fetch,"POST",i,{headers:this.headers,body:{phone:s,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:h})}throw new iu("You must provide either an email or phone number and a type")}catch(i){if(ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async i=>i))}async _acquireLock(e,i){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await s,await i()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=i();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const i=await this.__loadSession();return await e(i)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const i=await Nr(this.storage,this.storageKey);
56if(this._debug("#getSession()","session from storage",i),i!==null&&(this._isValidSession(i)?e=i:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at*1e3-Date.now()<vh:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){const c=await Nr(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=_h()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=i2(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const i=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return i.data.user&&(this.suppressGetSessionWarning=!0),i}async _getUser(e){try{return e?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Zi}):await this._useSession(async i=>{var s,l,u;const{data:c,error:h}=i;if(h)throw h;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ut}:await re(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:Zi})})}catch(i){if(ee(i))return nu(i)&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:i});throw i}}async updateUser(e,i={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,i))}async _updateUser(e,i={}){try{return await this._useSession(async s=>{const{data:l,error:u}=s;if(u)throw u;if(!l.session)throw new ut;const c=l.session;let h=null,p=null;this.flowType==="pkce"&&e.email!=null&&([h,p]=await zs(this.storage,this.storageKey));const{data:g,error:y}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:i?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:h,code_challenge_method:p}),jwt:c.access_token,xform:Zi});if(y)throw y;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(s){if(await mt(this.storage,`${this.storageKey}-code-verifier`),ee(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ut;const i=Date.now()/1e3;let s=i,l=!0,u=null;const{payload:c}=su(e.access_token);if(c.exp&&(s=c.exp,l=s<=i),l){const{data:h,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!h)return{data:{user:null,session:null},error:null};u=h}else{const{data:h,error:p}=await this._getUser(e.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:e.access_token,refresh_token:e.refresh_token,user:h.user,token_type:"bearer",expires_in:s-i,expires_at:s},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(i){if(ee(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async i=>{var s;if(!e){const{data:c,error:h}=i;if(h)throw h;e=(s=c.session)!==null&&s!==void 0?s:void 0}if(!e?.refresh_token)throw new ut;const{data:l,error:u}=await this._callRefreshToken(e.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(i){if(ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async _getSessionFromURL(e,i){var s;try{if(!yt())throw new ru("No browser detected.");
56if(e.error||e.error_description||e.error_code)throw new ru(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(i){case"implicit":if(this.flowType==="pkce")throw new Tv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ru("Not a valid implicit grant flow url.");break;default:}if(i==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Tv("No code detected.");const{data:k,error:P}=await this._exchangeCodeForSession(e.code);if(P)throw P;const Z=new URL(window.location.href);return Z.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Z.toString()),{data:{session:k.session,redirectType:(s=k.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:h,expires_in:p,expires_at:g,token_type:y}=e;if(!c||!p||!h||!y)throw new ru("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const S=_-m;S*1e3<=Is&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const E=_-b;m-E>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",E,_,m):m-E<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",E,_,m);const{data:A,error:T}=await this._getUser(c);if(T)throw T;const x={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:h,token_type:y,user:A.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:e.type},error:null})}catch(l){if(ee(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const i=await Nr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&i)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async i=>{var s;const{data:l,error:u}=i;if(u&&!nu(u))return this._returnResult({error:u});const c=(s=l.session)===null||s===void 0?void 0:s.access_token;if(c){const{error:h}=await this.admin.signOut(c,e);if(h&&!(LC(h)&&(h.status===404||h.status===401||h.status===403)||nu(h)))return this._returnResult({error:h})}return e!=="others"&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const i=$C(),s={id:i,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",i),this.stateChangeEmitters.delete(i)}};return this._debug("#onAuthStateChange()","registered callback with id",i),this.stateChangeEmitters.set(i,s),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(i)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async i=>{var s,l;try{const{data:{session:u},error:c}=i;if(c)throw c;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(e))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),nu(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,i={}){let s=null,l=null;this.flowType==="pkce"&&([s,l]=await zs(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:l,gotrue_meta_security:{captcha_token:i.captchaToken}},headers:this.headers,redirectTo:i.redirectTo})}catch(u){if(await mt(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:i,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(e=i.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var i;try{const{data:s,error:l}=await this._useSession(async u=>{var c,h,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(h=e.options)===null||h===void 0?void 0:h.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await re(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(g=m.session)===null||g===void 0?void 0:g.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return yt()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:e.provider,url:s?.url},error:null})}catch(s){if(ee(s))return this._returnResult({data:{provider:e.provider,url:null},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async i=>{var s;try{const{error:l,data:{session:u}}=i;if(l)throw l;const{options:c,provider:h,token:p,access_token:g,nonce:y}=e,m=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=u?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:h,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:cn}),{data:b,error:_}=m;return _?this._returnResult({data:{user:null,session:null},error:_}
56):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Us}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await mt(this.storage,`${this.storageKey}-code-verifier`),ee(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(e){try{return await this._useSession(async i=>{var s,l;const{data:u,error:c}=i;if(c)throw c;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(l=(s=u.session)===null||s===void 0?void 0:s.access_token)!==null&&l!==void 0?l:void 0})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _refreshAccessToken(e){const i=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{const s=Date.now();return await FC(async l=>(l>0&&await KC(200*Math.pow(2,l-1)),this._debug(i,"refreshing attempt",l),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:cn})),(l,u)=>{const c=200*Math.pow(2,l);return u&&bh(u)&&Date.now()+c-s<Is})}catch(s){if(this._debug(i,"error",s),ee(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(i,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,i){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:i.redirectTo,scopes:i.scopes,queryParams:i.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",i,"url",s),yt()&&!i.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,i;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const l=await Nr(this.storage,this.storageKey);if(l&&this.userStorage){let c=await Nr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await qs(this.userStorage,this.storageKey+"-user",c)),l.user=(e=c?.user)!==null&&e!==void 0?e:_h()}else if(l&&!l.user&&!l.user){const c=await Nr(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await mt(this.storage,this.storageKey+"-user"),await qs(this.storage,this.storageKey,l)):l.user=_h()}if(this._debug(s,"session from storage",l),!this._isValidSession(l)){this._debug(s,"session is not valid"),l!==null&&await this._removeSession();return}const u=((i=l.expires_at)!==null&&i!==void 0?i:1/0)*1e3-Date.now()<vh;if(this._debug(s,`session has${u?"":" not"} expired with margin of ${vh}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(console.error(c),bh(c)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:h}=await this._getUser(l.access_token);!h&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(s,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(s,"error",l),console.error(l);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var i,s;if(!e)throw new ut;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new Pu;const{data:u,error:c}=await this._refreshAccessToken(e);if(c)throw c;if(!u.session)throw new ut;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const h={data:u.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(u){if(this._debug(l,"error",u),ee(u)){const c={data:null,error:u};return bh(u)||await this._removeSession(),(i=this.refreshingDeferred)===null||i===void 0||i.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(e,i,s=!0){const l=`#_notifyAllSubscribers(${e})`;this._debug(l,"begin",i,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:i});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(e,i)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let h=0;h<u.length;h+=1)console.error(u[h]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await mt(this.storage,`${this.storageKey}-code-verifier`);const i=Object.assign({},e),s=i.user&&i.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&i.user&&await qs(this.userStorage,this.storageKey+"-user",{user:i.user});const l=Object.assign({},i);delete l.user;const u=kv(l);await qs(this.storage,this.storageKey,u)}else{const l=kv(i);await qs(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await mt(this.storage,this.storageKey),await mt(this.storage,this.storageKey+"-code-verifier"),await mt(this.storage,this.storageKey+"-user"),this.userStorage&&await mt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&yt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}
56catch(i){console.error("removing visibilitychange callback failed",i)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Is);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const i=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=i,i&&typeof i=="object"&&typeof i.unref=="function"?i.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(i)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const i=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,i&&clearTimeout(i)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async i=>{const{data:{session:s}}=i;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((s.expires_at*1e3-e)/Is);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Is}ms, refresh threshold is ${Gh} ticks`),l<=Gh&&await this._callRefreshToken(s.refresh_token)})}catch(i){console.error("Auto refresh tick failed with error. This is likely a transient error.",i)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof n_)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!yt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const i=`#_onVisibilityChanged(${e})`;this._debug(i,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(i,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,i,s){const l=[`provider=${encodeURIComponent(i)}`];if(s?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&l.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[u,c]=await zs(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(h.toString())}if(s?.queryParams){const u=new URLSearchParams(s.queryParams);l.push(u.toString())}return s?.skipBrowserRedirect&&l.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${l.join("&")}`}async _unenroll(e){try{return await this._useSession(async i=>{var s;const{data:l,error:u}=i;return u?this._returnResult({data:null,error:u}):await re(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _enroll(e){try{return await this._useSession(async i=>{var s,l;const{data:u,error:c}=i;if(c)return this._returnResult({data:null,error:c});const h=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:g}=await re(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(s=u?.session)===null||s===void 0?void 0:s.access_token});return g?this._returnResult({data:null,error:g}):(e.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(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async i=>{var s;const{data:l,error:u}=i;if(u)return this._returnResult({data:null,error:u});const c=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?zv(e.webauthn.credential_response):Bv(e.webauthn.credential_response)})}:{code:e.code}),{data:h,error:p}=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:c,headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:p}))})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async i=>{var s;const{data:l,error:u}=i;if(u)return this._returnResult({data:null,error:u});const c=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token});if(c.error)return c;const{data:h}=c;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Mv(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Uv(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}})}async _challengeAndVerify(e){const{data:i,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:i.id,code:e.code})}async _listFactors(){var e;const{data:{user:i},error:s}=await this.getUser();if(s)return{data:null,error:s};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=i?.factors)!==null&&e!==void 0?e:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(e){var i,s,l,u;if(e)try{const{payload:_}=su(e);let S=null;_.aal&&(S=_.aal);let E=S;const{data:{user:A},error:T}=await this.getUser(e);if(T)return this._returnResult({data:null,error:T});((s=(i=A?.factors)===null||i===void 0?void 0:i.filter(P=>P.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(E="aal2");const k=_.amr||[];return{data:{currentLevel:S,nextLevel:E,currentAuthenticationMethods:k},error:null}}catch(_){if(ee(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:h}
56=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=su(c.access_token);let g=null;p.aal&&(g=p.aal);let y=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async i=>{const{data:{session:s},error:l}=i;return l?this._returnResult({data:null,error:l}):s?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ut})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _approveAuthorization(e,i){try{return await this._useSession(async s=>{const{data:{session:l},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&yt()&&!i?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(ee(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(e,i){try{return await this._useSession(async s=>{const{data:{session:l},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&yt()&&!i?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(ee(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;return s?this._returnResult({data:null,error:s}):i?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new ut})})}catch(e){if(ee(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async i=>{const{data:{session:s},error:l}=i;return l?this._returnResult({data:null,error:l}):s?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ut})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async fetchJwk(e,i={keys:[]}){let s=i.keys.find(h=>h.kid===e);if(s)return s;const l=Date.now();if(s=this.jwks.keys.find(h=>h.kid===e),s&&this.jwks_cached_at+jC>l)return s;const{data:u,error:c}=await re(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,s=u.keys.find(h=>h.kid===e),!s)?null:s}async getClaims(e,i={}){try{let s=e;if(!s){const{data:_,error:S}
56=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});s=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:h,payload:p}}=su(s);i?.allowExpired||e2(u.exp);const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,i?.keys?{keys:i.keys}:i?.jwks);if(!g){const{error:_}=await this.getUser(s);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=t2(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,IC(`${h}.${p}`)))throw new Fh("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(s){if(ee(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(e){var i,s,l;vn(this.experimental);try{if(!Ru())return this._returnResult({data:null,error:new Sn("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(i=e?.options)===null||i===void 0?void 0:i.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const h=Uv(u.options),p=(l=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&l!==void 0?l:Yh.createNewAbortSignal(),{data:g,error:y}=await a_({publicKey:h,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new Sn("WebAuthn ceremony failed",null)});const m=Bv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(ee(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var i,s;vn(this.experimental);try{if(!Ru())return this._returnResult({data:null,error:new Sn("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=Mv(l.options),h=(s=(i=e?.options)===null||i===void 0?void 0:i.signal)!==null&&s!==void 0?s:Yh.createNewAbortSignal(),{data:p,error:g}=await s_({publicKey:c,signal:h});if(g||!p)return this._returnResult({data:null,error:g??new Sn("WebAuthn ceremony failed",null)});const y=zv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(ee(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){vn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ut});const{data:l,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:i.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(ee(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){vn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:l}=i;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyAuthentication(e){var i;vn(this.experimental);try{const{data:s,error:l}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(i=e?.options)===null||i===void 0?void 0:i.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:s,error:null})}catch(s){if(ee(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(e){vn(this.experimental);try{const{data:i,error:s}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:cn});return s?this._returnResult({data:null,error:s}):(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:i,error:null}))}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _listPasskeys(){vn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ut});const{data:l,error:u}=await re(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:i.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(ee(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){vn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:l}=i;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _deletePasskey(e){vn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:l}=i;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new ut});const{error:u}
56=await re(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}}wo.nextInstanceID={};const A2=wo,R2="2.106.1";let io="";typeof Deno<"u"?io="deno":typeof document<"u"?io="web":typeof navigator<"u"&&navigator.product==="ReactNative"?io="react-native":io="node";const O2={"X-Client-Info":`supabase-js-${io}/${R2}`},C2={headers:O2},k2={schema:"public"},x2={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},N2={},j2={enabled:!1,respectSamplingDecision:!0};function D2(t,e,i,s){function l(u){return u instanceof i?u:new i(function(c){c(u)})}return new(i||(i=Promise))(function(u,c){function h(y){try{g(s.next(y))}catch(m){c(m)}}function p(y){try{g(s.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(h,p)}g((s=s.apply(t,[])).next())})}let Sh=null;const L2="@opentelemetry/api";function M2(){return Sh===null&&(Sh=import(L2).catch(()=>null)),Sh}function U2(){return D2(this,void 0,void 0,function*(){try{const t=yield M2();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const i=e.traceparent;return i?{traceparent:i,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function z2(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[i,s,l,u]=e;if(i.length!==2||s.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(i)||!c.test(s)||!c.test(l)||!c.test(u)||s==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:i,traceId:s,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function B2(t,e){if(!t||!e||e.length===0)return!1;let i;if(t instanceof URL)i=t;else try{i=new URL(t)}catch{return!1}for(const s of e)try{if(typeof s=="string"){if(P2(i.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(i.hostname))return!0}else if(typeof s=="function"&&s(i))return!0}catch{continue}return!1}function P2(t,e){if(e===t)return!0;if(e.startsWith("*.")){const i=e.slice(2);if(t.endsWith(i)&&(t===i||t.endsWith("."+i)))return!0}return!1}function H2(t){const e=[];try{const i=new URL(t);e.push(i.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function So(t){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},So(t)}function I2(t,e){if(So(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if(So(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q2(t){var e=I2(t,"string");return So(e)=="symbol"?e:e+""}function $2(t,e,i){return(e=q2(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Hv(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),i.push.apply(i,s)}return i}function Qe(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Hv(Object(i),!0).forEach(function(s){$2(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hv(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}const G2=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),V2=()=>Headers,K2=(t,e,i,s,l)=>{const u=G2(s),c=V2(),h=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=h?H2(e):null;return async(y,m)=>{var b;const _=(b=await i())!==null&&b!==void 0?b:t;let S=new c(m?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),g){const E=await F2(y,g,p);E&&(E.traceparent&&!S.has("traceparent")&&S.set("traceparent",E.traceparent),E.tracestate&&!S.has("tracestate")&&S.set("tracestate",E.tracestate),E.baggage&&!S.has("baggage")&&S.set("baggage",E.baggage))}return u(y,Qe(Qe({},m),{},{headers:S}))}};async function F2(t,e,i){if(!B2(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const s=await U2();if(!s||!s.traceparent)return null;if(i){const l=z2(s.traceparent);if(l&&!l.isSampled)return null}return s}function Iv(t){return typeof t=="boolean"?{enabled:t}:t}function Y2(t){return t.endsWith("/")?t:t+"/"}function Q2(t,e){var i,s,l,u,c,h;const{db:p,auth:g,realtime:y,global:m}=t,{db:b,auth:_,realtime:S,global:E}=e,A=Iv(t.tracePropagation),T=Iv(e.tracePropagation),x={db:Qe(Qe({},b),p),auth:Qe(Qe({},_),g),realtime:Qe(Qe({},S),y),storage:{},global:Qe(Qe(Qe({},E),m),{},{headers:Qe(Qe({},(i=E?.headers)!==null&&i!==void 0?i:{}),(s=m?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(l=(u=A?.enabled)!==null&&u!==void 0?u:T?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(h=A?.respectSamplingDecision)!==null&&h!==void 0?h:T?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return t.accessToken?x.accessToken=t.accessToken:delete x.accessToken,x}function J2(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
56if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Y2(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var X2=class extends A2{constructor(t){super(t)}},Z2=class{constructor(t,e,i){var s,l;this.supabaseUrl=t,this.supabaseKey=e;const u=J2(t);if(!e)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`,h={db:k2,realtime:N2,auth:Qe(Qe({},x2),{},{storageKey:c}),global:C2,tracePropagation:j2},p=Q2(i??{},h);if(this.settings=p,this.storageKey=(s=p.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=K2(e,t,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Qe({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new pO(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 OC(this.storageUrl.href,this.headers,this.fetch,i?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new rO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},i={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,i)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,i;if(t.accessToken)return await t.accessToken();const{data:s}=await t.auth.getSession();return(e=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:s,userStorage:l,storageKey:u,flowType:c,lock:h,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},_,S){const E={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new X2({url:this.authUrl.href,headers:Qe(Qe({},E),_),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:s,userStorage:l,flowType:c,lock:h,debug:p,throwOnError:g,experimental:y,fetch:S,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(A=>A.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new JO(this.realtimeUrl.href,Qe(Qe({},t),{},{params:Qe(Qe({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,i){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==i?(this.changedAccessToken=i,this.realtime.setAuth(i)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const W2=(t,e,i)=>new Z2(t,e,i);function ek(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const i=e.match(/^v(\d+)\./);return i?parseInt(i[1],10)<=18:!1}ek()&&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
56ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function tk(){if(typeof window>"u")return;const t=location.hostname,i=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(A=>t===A||t.endsWith("."+A)),s="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",l=i?t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+s+")(?:-dev)?(?=\\.|$)","i"))?.[1]??t.match(new RegExp("^("+s+")(?=[.-])","i"))?.[1]:void 0,u=window.parent&&window.parent!==window;if(!l||!u)return localStorage;const c=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),h=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&&h.test(p)?[p]:c?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",m=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(A,T,x)=>new Promise(k=>{const P=b();let Z=!1,z;const D=le=>{Z||(Z=!0,clearTimeout(z),window.removeEventListener("message",Y),k(le))},Y=le=>{if(g.indexOf(le.origin)<0)return;const V=le.data;V&&V.type===y&&V.requestId===P&&D(V)};window.addEventListener("message",Y);const te={type:A,requestId:P,projectId:l,key:T};x!==void 0&&(te.value=x);for(const le of g)window.parent.postMessage(te,le);z=setTimeout(()=>D(null),m)});let S=!0;const E=250;return{getItem:async A=>{let T=await _("lovable-preview-auth:get",A);return!T&&S&&(await new Promise(x=>setTimeout(x,E)),T=await _("lovable-preview-auth:get",A)),S=!1,T&&T.ok&&typeof T.value=="string"?T.value===""?(localStorage.removeItem(A),null):T.value:localStorage.getItem(A)},setItem:(A,T)=>(localStorage.setItem(A,T),_("lovable-preview-auth:set",A,T).then(x=>{x&&x.ok&&typeof x.value=="string"&&localStorage.getItem(A)===T&&(x.value===""?localStorage.removeItem(A):localStorage.setItem(A,x.value))})),removeItem:A=>(localStorage.removeItem(A),_("lovable-preview-auth:remove",A).then(()=>{}))}}function nk(){return W2("https://hteqrbxooelafofqfwui.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh0ZXFyYnhvb2VsYWZvZnFmd3VpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkzNzIzMDksImV4cCI6MjA5NDk0ODMwOX0.amphnhgMUGM_Dt5g92bhOhL5lFl90BqUWSiH22KkMCo",{auth:{storage:tk(),persistSession:!0,autoRefreshToken:!0}})}let Eh;const ik=new Proxy({},{get(t,e,i){return Eh||(Eh=nk()),Reflect.get(Eh,e,i)}}),rk=Mr({type:"function"}).client(async({next:t})=>{const{data:e}=await ik.auth.getSession(),i=e.session?.access_token;return t({headers:i?{Authorization:`Bearer ${i}`}:{}})}),sk=Mr(),qv=eO(()=>({functionMiddleware:[rk],requestMiddleware:[sk]}));var Hu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ak=class extends Hu{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},o_=new ak,ok={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},lk=class{#e=ok;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Qh=new lk;function uk(t){setTimeout(t,0)}var ck=typeof window>"u"||"Deno"in globalThis;function wn(){}function fk(t,e){return typeof t=="function"?t(e):t}function hk(t){return typeof t=="number"&&t>=0&&t!==1/0}function dk(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Jh(t,e){return typeof t=="function"?t(e):t}function pk(t,e){return typeof t=="function"?t(e):t}function $v(t,e){const{type:i="all",exact:s,fetchStatus:l,predicate:u,queryKey:c,stale:h}=t;if(c){if(s){if(e.queryHash!==Ed(c,e.options))return!1}else if(!To(e.queryKey,c))return!1}if(i!=="all"){const p=e.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||l&&l!==e.state.fetchStatus||u&&!u(e))}function Gv(t,e){const{exact:i,status:s,predicate:l,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(i){if(Eo(e.options.mutationKey)!==Eo(u))return!1}else if(!To(e.options.mutationKey,u))return!1}return!(s&&e.state.status!==s||l&&!l(e))}function Ed(t,e){return(e?.queryKeyHashFn||Eo)(t)}function Eo(t){return JSON.stringify(t,(e,i)=>Xh(i)?Object.keys(i).sort().reduce((s,l)=>(s[l]=i[l],s),{}):i)}function To(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(i=>To(t[i],e[i])):!1}var gk=Object.prototype.hasOwnProperty;function l_(t,e,i=0){if(t===e)return t;if(i>500)return e;const s=Vv(t)&&Vv(e);if(!s&&!(Xh(t)&&Xh(e)))return e;const u=(s?t:Object.keys(t)).length,c=s?e:Object.keys(e),h=c.length,p=s?new Array(h):{};let g=0;for(let y=0;y<h;y++){const m=s?y:c[y],b=t[m],_=e[m];if(b===_){p[m]=b,(s?y<u:gk.call(t,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const S=l_(b,_,i+1);p[m]=S,S===b&&g++}return u===h&&g===u?t:p}function rN(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(t[i]!==e[i])return!1;return!0}function Vv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Xh(t){if(!Kv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!Kv(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Kv(t){return Object.prototype.toString.call(t)==="[object Object]"}function mk(t){return new Promise(e=>{Qh.setTimeout(e,t)})}function yk(t,e,i){return typeof i.structuralSharing=="function"?i.structuralSharing(t,e):i.structuralSharing!==!1?l_(t,e):e}function vk(t,e,i=0){const s=[...t,e];return i&&s.length>i?s.slice(1):s}function bk(t,e,i=0){const s=[e,...t];return i&&s.length>i?s.slice(0,-1):s}var Td=Symbol();function u_(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Td?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function sN(t,e){return typeof t=="function"?t(...e):!!t}function _k(t,e,i){let s=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=e(),s||(s=!0,l.aborted?i():l.addEventListener("abort",i,{once:!0})),l)}),t}var c_=(()=>{let t=()=>ck;return{isServer(){return t()},setIsServer(e){t=e}}})();function wk(){let t,e;const i=new Promise((l,u)=>{t=l,e=u});i.status="pending",i.catch(()=>{});function s(l){Object.assign(i,l),delete i.resolve,delete i.reject}return i.resolve=l=>{s({status:"fulfilled",value:l}),t(l)},i.reject=l=>{s({status:"rejected",reason:l}),e(l)},i}var Sk=uk;function Ek(){let t=[],e=0,i=h=>{h()},s=h=>{h()},l=Sk;const u=h=>{e?t.push(h):l(()=>
vendor: 20,602 bytes, line 56
56{i(h)})},c=()=>{const h=t;t=[],h.length&&l(()=>{s(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;e++;try{p=h()}finally{e--,e||c()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var Ct=Ek(),Tk=class extends Hu{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}},Cu=new Tk;function Ak(t){return Math.min(1e3*2**t,3e4)}function f_(t){return(t??"online")==="online"?Cu.isOnline():!0}var Zh=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function h_(t){let e=!1,i=0,s;const l=wk(),u=()=>l.status!=="pending",c=E=>{if(!u()){const A=new Zh(E);b(A),t.onCancel?.(A)}},h=()=>{e=!0},p=()=>{e=!1},g=()=>o_.isFocused()&&(t.networkMode==="always"||Cu.isOnline())&&t.canRun(),y=()=>f_(t.networkMode)&&t.canRun(),m=E=>{u()||(s?.(),l.resolve(E))},b=E=>{u()||(s?.(),l.reject(E))},_=()=>new Promise(E=>{s=A=>{(u()||g())&&E(A)},t.onPause?.()}).then(()=>{s=void 0,u()||t.onContinue?.()}),S=()=>{if(u())return;let E;const A=i===0?t.initialPromise:void 0;try{E=A??t.fn()}catch(T){E=Promise.reject(T)}Promise.resolve(E).then(m).catch(T=>{if(u())return;const x=t.retry??(c_.isServer()?0:3),k=t.retryDelay??Ak,P=typeof k=="function"?k(i,T):k,Z=x===!0||typeof x=="number"&&i<x||typeof x=="function"&&x(i,T);if(e||!Z){b(T);return}i++,t.onFail?.(i,T),mk(P).then(()=>g()?void 0:_()).then(()=>{e?b(T):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(s?.(),l),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?S():_().then(S),l)}}var d_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hk(this.gcTime)&&(this.#e=Qh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(c_.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Qh.clearTimeout(this.#e),this.#e=void 0)}},Rk=class extends d_{#e;#n;#t;#r;#i;#s;#a;constructor(t){super(),this.#a=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#t=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Yv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Yv(this.options);e.data!==void 0&&(this.setState(Fv(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const i=yk(this.state.data,t,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),i}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>pk(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Td||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Jh(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!dk(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#a||this.#l()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}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(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,i.signal)})},l=()=>{const h=u_(this.options,e),g=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#a=!1,this.options.persister?this.options.persister(h,g,this):h(g)},c=(()=>{const h={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l};return s(h),h})();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.#i=h_({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof Zh&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(h,p)=>{this.#o({type:"failed",failureCount:h,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 h=await this.#i.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#t.config.onSuccess?.(h,this),this.#t.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Zh){if(h.silent)return this.#i.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#t.config.onError?.(h,this),this.#t.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(t){const e=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Ok(i.data,this.options),fetchMeta:t.meta??null};case"success":const s={...i,...Fv(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?s:void 0,s;case"error":const l=t.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=e(this.state),Ct.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function Ok(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:f_(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Fv(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yv(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,i=e!==void 0,s=i?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}function Qv(t){return{onFetch:(e,i)=>{const s=e.options,l=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=S=>{_k(S,()=>e.signal,()=>y=!0)},b=u_(e.options,e.fetchOptions),_=async(S,E,A)=>{if(y)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const x=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:E,direction:A?"backward":"forward",meta:e.options.meta};return m(z),z})(),k=await b(x),{maxPages:P}=e.options,Z=A?bk:vk;return{pages:Z(S.pages,k,P),pageParams:Z(S.pageParams,E,P)}};if(l&&u.length){const S=l==="backward",E=S?Ck:Jv,A={pages:u,pageParams:c},T=E(s,A);h=await _(A,T,S)}else{const S=t??u.length;do{const E=p===0?c[0]??s.initialPageParam:Jv(s,h);if(p>0&&E==null)break;h=await _(h,E),p++}while(p<S)}return h};e.options.persister?e.fetchFn=()=>e.options.persister?.(g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i):e.fetchFn=g}}}function Jv(t,{pages:e,pageParams:i}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,i[s],i):void 0}function Ck(t,{pages:e,pageParams:i}){return e.length>0?t.getPreviousPageParam?.(e[0],e,i[0],i):void 0}var kk=class extends d_{#e;#n;#t;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||xk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=h_({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#i({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const s=this.state.status==="pending",l=!this.#r.canStart();try{if(s)e();else{this.#i({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,i);const c=await this.options.onMutate?.(t,i);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:l})}const u=await this.#r.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,i),await this.options.onSuccess?.(u,t,this.state.context,i),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,t,this.state.context,i),this.#i({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,i)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,i)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#i(t){const e=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Ct.batch(()=>{this.#n.forEach(i=>{i.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function xk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var p_=class extends Hu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,i){const s=new kk({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:i});return this.add(s),s}add(t){this.#e.add(t);const e=au(t);if(typeof e=="string"){const i=this.#n.get(e);i?i.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=au(t);if(typeof e=="string"){const i=this.#n.get(e);if(i)if(i.length>1){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}else i[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=au(t);if(typeof e=="string"){const s=this.#n.get(e)?.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=au(t);return typeof e=="string"?this.#n.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ct.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(i=>Gv(e,i))}findAll(t={}){return this.getAll().filter(e=>Gv(t,e))}notify(t){Ct.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Ct.batch(()=>Promise.all(t.map(e=>e.continue().catch(wn))))}};function au(t){return t.options.scope?.id}var g_=class extends Hu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,i){const s=e.queryKey,l=e.queryHash??Ed(s,e);let u=this.get(l);return u||(u=new Rk({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(s)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(i=>$v(e,i))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(i=>$v(t,i)):e}notify(t){Ct.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Nk=class{#e;#n;#t;#r;#i;#s;#a;#l;constructor(t={}){this.#e=t.queryCache||new g_,this.#n=t.mutationCache||new p_,this.#t=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=o_.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Cu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),i=this.#e.build(this,e),s=i.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime(Jh(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:i})=>{const s=i.data;return[e,s]})}setQueryData(t,e,i){const s=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(s.queryHash)?.state.data,c=fk(e,u);if(c!==void 0)return this.#e.build(this,s).setData(c,{...i,manual:!0})}setQueriesData(t,e,i){return Ct.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Ct.batch(()=>{e.findAll(t).forEach(i=>{e.remove(i)})})}resetQueries(t,e){const i=this.#e;return Ct.batch(()=>(i.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const i={revert:!0,...e},s=Ct.batch(()=>this.#e.findAll(t).map(l=>l.cancel(i)));return Promise.all(s).then(wn).catch(wn)}invalidateQueries(t,e={}){return Ct.batch(()=>(this.#e.findAll(t).forEach(i=>{i.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},s=Ct.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,i);return i.throwOnError||(u=u.catch(wn)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(wn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const i=this.#e.build(this,e);return i.isStaleByTime(Jh(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(wn).catch(wn)}fetchInfiniteQuery(t){return t.behavior=Qv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(wn).catch(wn)}ensureInfiniteQueryData(t){return t.behavior=Qv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Cu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,e){this.#r.set(Eo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],i={};return e.forEach(s=>{To(t,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(t,e){this.#i.set(Eo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],i={};return e.forEach(s=>{To(t,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ed(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Td&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},m_=de.createContext(void 0),aN=t=>{const e=de.useContext(m_);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},jk=({client:t,children:e})=>(de.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),X.jsx(m_.Provider,{value:t,children:e})),Dk=i0();const Lk=n0(Dk);function Mk(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}const Uk=t=>{switch(t){case"success":return Pk;case"info":return Ik;case"warning":return Hk;case"error":return qk;default:return null}},zk=Array(12).fill(0),Bk=({visible:t,className:e})=>J.createElement("div",{className:["sonner-loading-wrapper",e].filter(
vendor: 6,020 bytes, line 56
56Boolean).join(" "),"data-visible":t},J.createElement("div",{className:"sonner-spinner"},zk.map((i,s)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Pk=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Hk=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ik=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),qk=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$k=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Gk=()=>{const[t,e]=J.useState(document.hidden);return J.useEffect(()=>{const i=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),t};let Wh=1;class Vk{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const i=this.subscribers.indexOf(e);this.subscribers.splice(i,1)}),this.publish=e=>{this.subscribers.forEach(i=>i(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var i;const{message:s,...l}=e,u=typeof e?.id=="number"||((i=e.id)==null?void 0:i.length)>0?e.id:Wh++,c=this.toasts.find(p=>p.id===u),h=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),c?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...e,id:u,title:s}),{...p,...e,id:u,dismissible:h,title:s}):p):this.addToast({title:s,...l,dismissible:h,id:u}),u},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:e,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(s=>s({id:i.id,dismiss:!0}))}),e),this.message=(e,i)=>this.create({...i,message:e}),this.error=(e,i)=>this.create({...i,message:e,type:"error"}),this.success=(e,i)=>this.create({...i,type:"success",message:e}),this.info=(e,i)=>this.create({...i,type:"info",message:e}),this.warning=(e,i)=>this.create({...i,type:"warning",message:e}),this.loading=(e,i)=>this.create({...i,type:"loading",message:e}),this.promise=(e,i)=>{if(!i)return;let s;i.loading!==void 0&&(s=this.create({...i,promise:e,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const l=Promise.resolve(e instanceof Function?e():e);let u=s!==void 0,c;const h=l.then(async g=>{if(c=["resolve",g],J.isValidElement(g))u=!1,this.create({id:s,type:"default",message:g});else if(Fk(g)&&!g.ok){u=!1;const m=typeof i.error=="function"?await i.error(`HTTP error! status: ${g.status}`):i.error,b=typeof i.description=="function"?await i.description(`HTTP error! status: ${g.status}`):i.description,S=typeof m=="object"&&!J.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(g instanceof Error){u=!1;const m=typeof i.error=="function"?await i.error(g):i.error,b=typeof i.description=="function"?await i.description(g):i.description,S=typeof m=="object"&&!J.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(i.success!==void 0){u=!1;const m=typeof i.success=="function"?await i.success(g):i.success,b=typeof i.description=="function"?await i.description(g):i.description,S=typeof m=="object"&&!J.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...S})}}).catch(async g=>{if(c=["reject",g],i.error!==void 0){u=!1;const y=typeof i.error=="function"?await i.error(g):i.error,m=typeof i.description=="function"?await i.description(g):i.description,_=typeof y=="object"&&!J.isValidElement(y)?y:{message:y};this.create({id:s,type:"error",description:m,..._})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),i.finally==null||i.finally.call(i)}),p=()=>new Promise((g,y)=>h.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof s!="string"&&typeof s!="number"?{unwrap:p}:Object.assign(s,{unwrap:p})},this.custom=(e,i)=>{const s=i?.id||Wh++;return this.create({jsx:e(s),id:s,...i}),s},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qt=new Vk,Kk=(t,e)=>{const i=e?.id||Wh++;return qt.addToast({title:t,...e,id:i}),i},Fk=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Yk=Kk,Qk=()=>qt.toasts,Jk=()=>qt.getActiveToasts(),oN=Object.assign(Yk,{success:qt.success,info:qt.info,warning:qt.warning,error:qt.error,custom:qt.custom,message:qt.message,promise:qt.promise,dismiss:qt.dismiss,loading:qt.loading},{getHistory:Qk,getToasts:Jk});Mk
vendor: 14,873 bytes, line 56
56("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
56ou(t){return t.label!==void 0}const Xk=3,Zk="24px",Wk="16px",Xv=4e3,ex=356,tx=14,nx=45,ix=200;function Ln(...t){return t.filter(Boolean).join(" ")}function rx(t){const[e,i]=t.split("-"),s=[];return e&&s.push(e),i&&s.push(i),s}const sx=t=>{var e,i,s,l,u,c,h,p,g;
vendor: 4,794 bytes, line 56
56const{invert:y,toast:m,unstyled:b,interacting:_,setHeights:S,visibleToasts:E,heights:A,index:T,toasts:x,expanded:k,removeToast:P,defaultRichColors:Z,closeButton:z,style:D,cancelButtonStyle:Y,actionButtonStyle:te,className:le="",descriptionClassName:V="",duration:K,position:W,gap:pe,expandByDefault:se,classNames:j,icons:F,closeButtonAriaLabel:ae="Close toast"}=t,[Se,ye]=J.useState(null),[O,I]=J.useState(null),[$,Q]=J.useState(!1),[ne,he]=J.useState(!1),[ue,ce]=J.useState(!1),[Ce,Et]=J.useState(!1),[Zt,vt]=J.useState(!1),[ko,fn]=J.useState(0),[ea,qr]=J.useState(0),or=J.useRef(m.duration||K||Xv),ta=J.useRef(null),$t=J.useRef(null),na=T===0,ia=T+1<=E,Tt=m.type,Si=m.dismissible!==!1,At=m.className||"",Iu=m.descriptionClassName||"",lr=J.useMemo(()=>A.findIndex(ve=>ve.toastId===m.id)||0,[A,m.id]),xo=J.useMemo(()=>{var ve;return(ve=m.closeButton)!=null?ve:z},[m.closeButton,z]),ur=J.useMemo(()=>m.duration||K||Xv,[m.duration,K]),ra=J.useRef(0),In=J.useRef(0),No=J.useRef(0),Ei=J.useRef(null),[cr,Rt]=W.split("-"),hn=J.useMemo(()=>A.reduce((ve,Ge,at)=>at>=lr?ve:ve+Ge.height,0),[A,lr]),bt=Gk(),qu=m.invert||y,sa=Tt==="loading";In.current=J.useMemo(()=>lr*pe+hn,[lr,hn]),J.useEffect(()=>{or.current=ur},[ur]),J.useEffect(()=>{Q(!0)},[]),J.useEffect(()=>{const ve=$t.current;if(ve){const Ge=ve.getBoundingClientRect().height;return qr(Ge),S(at=>[{toastId:m.id,height:Ge,position:m.position},...at]),()=>S(at=>at.filter(_t=>_t.toastId!==m.id))}},[S,m.id]),J.useLayoutEffect(()=>{if(!$)return;const ve=$t.current,Ge=ve.style.height;ve.style.height="auto";const at=ve.getBoundingClientRect().height;ve.style.height=Ge,qr(at),S(_t=>_t.find(Ke=>Ke.toastId===m.id)?_t.map(Ke=>Ke.toastId===m.id?{...Ke,height:at}:Ke):[{toastId:m.id,height:at,position:m.position},..._t])},[$,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const Rn=J.useCallback(()=>{he(!0),fn(In.current),S(ve=>ve.filter(Ge=>Ge.toastId!==m.id)),setTimeout(()=>{P(m)},ix)},[m,P,S,In]);J.useEffect(()=>{if(m.promise&&Tt==="loading"||m.duration===1/0||m.type==="loading")return;let ve;return k||_||bt?(()=>{if(No.current<ra.current){const _t=new Date().getTime()-ra.current;or.current=or.current-_t}No.current=new Date().getTime()})():or.current!==1/0&&(ra.current=new Date().getTime(),ve=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Rn()},or.current)),()=>clearTimeout(ve)},[k,_,m,Tt,bt,Rn]),J.useEffect(()=>{m.delete&&(Rn(),m.onDismiss==null||m.onDismiss.call(m,m))},[Rn,m.delete]);function $r(){var ve;if(F?.loading){var Ge;return J.createElement("div",{className:Ln(j?.loader,m==null||(Ge=m.classNames)==null?void 0:Ge.loader,"sonner-loader"),"data-visible":Tt==="loading"},F.loading)}return J.createElement(Bk,{className:Ln(j?.loader,m==null||(ve=m.classNames)==null?void 0:ve.loader),visible:Tt==="loading"})}const Gr=m.icon||F?.[Tt]||Uk(Tt);var fr,On;return J.createElement("li",{tabIndex:0,ref:$t,className:Ln(le,At,j?.toast,m==null||(e=m.classNames)==null?void 0:e.toast,j?.default,j?.[Tt],m==null||(i=m.classNames)==null?void 0:i[Tt]),"data-sonner-toast":"","data-rich-colors":(fr=m.richColors)!=null?fr:Z,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":$,"data-promise":!!m.promise,"data-swiped":Zt,"data-removed":ne,"data-visible":ia,"data-y-position":cr,"data-x-position":Rt,"data-index":T,"data-front":na,"data-swiping":ue,"data-dismissible":Si,"data-type":Tt,"data-invert":qu,"data-swipe-out":Ce,"data-swipe-direction":O,"data-expanded":!!(k||se&&$),"data-testid":m.testId,style:{"--index":T,"--toasts-before":T,"--z-index":x.length-T,"--offset":`${ne?ko:In.current}px`,"--initial-height":se?"auto":`${ea}px`,...D,...m.style},onDragEnd:()=>{ce(!1),ye(null),Ei.current=null},onPointerDown:ve=>{ve.button!==2&&(sa||!Si||(ta.current=new Date,fn(In.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(ce(!0),Ei.current={x:ve.clientX,y:ve.clientY})))},onPointerUp:()=>{var ve,Ge,at;if(Ce||!Si)return;Ei.current=null;const _t=Number(((ve=$t.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ti=Number(((Ge=$t.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((at=ta.current)==null?void 0:at.getTime()),Nt=Se==="x"?_t:Ti,hr=Math.abs(Nt)/Ke;if(Math.abs(Nt)>=nx||hr>.11){fn(In.current),m.onDismiss==null||m.onDismiss.call(m,m),I(Se==="x"?_t>0?"right":"left":Ti>0?"down":"up"),Rn(),Et(!0);return}else{var jt,Dt;(jt=$t.current)==null||jt.style.setProperty("--swipe-amount-x","0px"),(Dt=$t.current)==null||Dt.style.setProperty("--swipe-amount-y","0px")}vt(!1),ce(!1),ye(null)},onPointerMove:ve=>{var Ge,at,_t;if(!Ei.current||!Si||((Ge=window.getSelection())==null?void 0:Ge.toString().length)>0)return;const Ke=ve.clientY-Ei.current.y,Nt=ve.clientX-Ei.current.x;var hr;
vendor: 4,181 bytes, line 56
56const jt=(hr=t.swipeDirections)!=null?hr:rx(W);!Se&&(Math.abs(Nt)>1||Math.abs(Ke)>1)&&ye(Math.abs(Nt)>Math.abs(Ke)?"x":"y");let Dt={x:0,y:0};const Vr=dn=>1/(1.5+Math.abs(dn)/20);if(Se==="y"){if(jt.includes("top")||jt.includes("bottom"))if(jt.includes("top")&&Ke<0||jt.includes("bottom")&&Ke>0)Dt.y=Ke;else{const dn=Ke*Vr(Ke);Dt.y=Math.abs(dn)<Math.abs(Ke)?dn:Ke}}else if(Se==="x"&&(jt.includes("left")||jt.includes("right")))if(jt.includes("left")&&Nt<0||jt.includes("right")&&Nt>0)Dt.x=Nt;else{const dn=Nt*Vr(Nt);Dt.x=Math.abs(dn)<Math.abs(Nt)?dn:Nt}(Math.abs(Dt.x)>0||Math.abs(Dt.y)>0)&&vt(!0),(at=$t.current)==null||at.style.setProperty("--swipe-amount-x",`${Dt.x}px`),(_t=$t.current)==null||_t.style.setProperty("--swipe-amount-y",`${Dt.y}px`)}},xo&&!m.jsx&&Tt!=="loading"?J.createElement("button",{"aria-label":ae,"data-disabled":sa,"data-close-button":!0,onClick:sa||!Si?()=>{}:()=>{Rn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Ln(j?.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(On=F?.close)!=null?On:$k):null,(Tt||m.icon||m.promise)&&m.icon!==null&&(F?.[Tt]!==null||m.icon)?J.createElement("div",{"data-icon":"",className:Ln(j?.icon,m==null||(l=m.classNames)==null?void 0:l.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||$r():null,m.type!=="loading"?Gr:null):null,J.createElement("div",{"data-content":"",className:Ln(j?.content,m==null||(u=m.classNames)==null?void 0:u.content)},J.createElement("div",{"data-title":"",className:Ln(j?.title,m==null||(c=m.classNames)==null?void 0:c.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?J.createElement("div",{"data-description":"",className:Ln(V,Iu,j?.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),J.isValidElement(m.cancel)?m.cancel:m.cancel&&ou(m.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||Y,onClick:ve=>{ou(m.cancel)&&Si&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,ve),Rn())},className:Ln(j?.cancelButton,m==null||(p=m.classNames)==null?void 0:p.cancelButton)},m.cancel.label):null,J.isValidElement(m.action)?m.action:m.action&&ou(m.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||te,onClick:ve=>{ou(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,ve),!ve.defaultPrevented&&Rn())},className:Ln(j?.actionButton,m==null||(g=m.classNames)==null?void 0:g.actionButton)},m.action.label):null)};function Zv(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function ax(t,e){const i={};return[t,e].forEach((s,l)=>{const u=l===1,c=u?"--mobile-offset":"--offset",h=u?Wk:Zk;function p(g){["top","right","bottom","left"].forEach(y=>{i[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof s=="number"||typeof s=="string"?p(s):typeof s=="object"?["top","right","bottom","left"].forEach(g=>{s[g]===void 0?i[`${c}-${g}`]=h:i[`${c}-${g}`]=typeof s[g]=="number"?`${s[g]}px`:s[g]}):p(h)}),i}const ox=J.forwardRef(function(e,i){const{id:s,invert:l,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:h,closeButton:p,className:g,offset:y,mobileOffset:m,theme:b="light",richColors:_,duration:S,style:E,visibleToasts:A=Xk,toastOptions:T,dir:x=Zv(),gap:k=tx,icons:P,containerAriaLabel:Z="Notifications"}=e,[z,D]=J.useState([]),Y=J.useMemo(()=>s?z.filter($=>$.toasterId===s):z.filter($=>!$.toasterId),[z,s]),te=J.useMemo(()=>Array.from(new Set([u].concat(Y.filter($=>$.position).map($=>$.position)))),[Y,u]),[le,V]=J.useState([]),[K,W]=J.useState(!1),[pe,se]=J.useState(!1),[j,F]=J.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=J.useRef(null),Se=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=J.useRef(null),O=J.useRef(!1),I=J.useCallback($=>{D(Q=>{var ne;return(ne=Q.find(he=>he.id===$.id))!=null&&ne.delete||qt.dismiss($.id),Q.filter(({id:he})=>he!==$.id)})},[]);return J.useEffect(()=>qt.subscribe($=>
vendor: 4,594 bytes, line 56
56{if($.dismiss){requestAnimationFrame(()=>{D(Q=>Q.map(ne=>ne.id===$.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{Lk.flushSync(()=>{D(Q=>{const ne=Q.findIndex(he=>he.id===$.id);return ne!==-1?[...Q.slice(0,ne),{...Q[ne],...$},...Q.slice(ne+1)]:[$,...Q]})})})}),[z]),J.useEffect(()=>{if(b!=="system"){F(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:Q})=>{F(Q?"dark":"light")})}catch{$.addListener(({matches:ne})=>{try{F(ne?"dark":"light")}catch(he){console.error(he)}})}},[b]),J.useEffect(()=>{z.length<=1&&W(!1)},[z]),J.useEffect(()=>{const $=Q=>{var ne;if(c.every(ce=>Q[ce]||Q.code===ce)){var ue;W(!0),(ue=ae.current)==null||ue.focus()}Q.code==="Escape"&&(document.activeElement===ae.current||(ne=ae.current)!=null&&ne.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[c]),J.useEffect(()=>{if(ae.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,O.current=!1)}},[ae.current]),J.createElement("section",{ref:i,"aria-label":`${Z} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},te.map(($,Q)=>{var ne;const[he,ue]=$.split("-");return Y.length?J.createElement("ol",{key:$,dir:x==="auto"?Zv():x,tabIndex:-1,ref:ae,className:g,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":he,"data-x-position":ue,style:{"--front-toast-height":`${((ne=le[0])==null?void 0:ne.height)||0}px`,"--width":`${ex}px`,"--gap":`${k}px`,...E,...ax(y,m)},onBlur:ce=>{O.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(O.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||O.current||(O.current=!0,ye.current=ce.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{pe||W(!1)},onDragEnd:()=>W(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},Y.filter(ce=>!ce.position&&Q===0||ce.position===$).map((ce,Ce)=>{var Et,Zt;return J.createElement(sx,{key:ce.id,icons:P,index:Ce,toast:ce,defaultRichColors:_,duration:(Et=T?.duration)!=null?Et:S,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:l,visibleToasts:A,closeButton:(Zt=T?.closeButton)!=null?Zt:p,interacting:pe,position:$,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:I,toasts:Y.filter(vt=>vt.position==ce.position),heights:le.filter(vt=>vt.position==ce.position),setHeights:V,expandByDefault:h,gap:k,expanded:K,swipeDirections:e.swipeDirections})})):null}))}),lx=({...t})=>X.jsx(ox,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t}),ux="/assets/styles-BVc7SeZj.css";function cx(){return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-7xl font-bold text-navy",children:"404"}),X.jsx("h2",{className:"mt-4 text-xl font-semibold",children:"Page not found"}),X.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist."}),X.jsx(_d,{to:"/",className:"mt-6 inline-flex items-center justify-center btn-carolina rounded-full px-5 py-2.5 text-sm font-semibold",children:"Go home"})]})})}function fx({error:t,reset:e}){console.error(t);const i=xt();return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-xl font-semibold",children:"Something went wrong"}),X.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try again or head back home."}),X.jsxs("div",{className:"mt-6 flex justify-center gap-2",children:[X.jsx("button",{onClick:()=>{i.invalidate(),e()}
56,className:"btn-carolina rounded-full px-5 py-2.5 text-sm font-semibold",children:"Try again"}),X.jsx("a",{href:"/",className:"rounded-full border border-border bg-background px-5 py-2.5 text-sm font-semibold",children:"Go home"})]})]})})}const An=jR()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"},{name:"theme-color",content:"#0b1f3a"},{name:"apple-mobile-web-app-capable",content:"yes"},{name:"apple-mobile-web-app-title",content:"PITCH Ops"},{title:"The Pitch — Chapel Hill's Modern Hub"},{name:"description",content:"Book event venues, coffee shop, podcast studio, and creative workspace at The Pitch in Chapel Hill."},{property:"og:title",content:"The Pitch — Chapel Hill's Modern Hub"},{property:"og:description",content:"Book event venues, coffee shop, podcast studio, and creative workspace at The Pitch in Chapel Hill."},{property:"og:type",content:"website"},{name:"twitter:title",content:"The Pitch — Chapel Hill's Modern Hub"},{name:"twitter:description",content:"Book event venues, coffee shop, podcast studio, and creative workspace at The Pitch in Chapel Hill."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/7d7e5947-4802-4ac8-a1d3-407a8d3d4401/id-preview-bbc98afd--8ba77804-4c14-475c-b932-325909ae6948.lovable.app-1779375423667.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/7d7e5947-4802-4ac8-a1d3-407a8d3d4401/id-preview-bbc98afd--8ba77804-4c14-475c-b932-325909ae6948.lovable.app-1779375423667.png"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"stylesheet",href:ux},{rel:"manifest",href:"/manifest.webmanifest"},{rel:"apple-touch-icon",href:"/pitch-ops-icon-512.png"},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&family=Montserrat:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800;900&family=Caveat:wght@600;700&family=Bebas+Neue&family=Barlow:wght@400;500;600;700&family=Archivo+Black&family=Hind:wght@300;400;500;600;700&display=swap"}]}),shellComponent:dx,component:px,notFoundComponent:cx,errorComponent:fx}),hx="(function(){try{if(!location.pathname.startsWith('/ops'))return;var s=localStorage.getItem('pitch-ops-appearance');var d=s==='dark'||(s!=='light'&&window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches);document.documentElement.style.colorScheme=d?'dark':'light';document.addEventListener('DOMContentLoaded',function(){document.body.classList.add('ops-theme');if(d)document.body.classList.add('ops-dark');});}catch(e){}})();";function dx({children:t}){return X.jsxs("html",{lang:"en",suppressHydrationWarning:!0,children:[X.jsxs("head",{children:[X.jsx(JR,{}),X.jsx("script",{dangerouslySetInnerHTML:{__html:hx}})]}),X.jsxs("body",{suppressHydrationWarning:!0,children:[t,X.jsx(ZR,{})]})]})}function px(){const{queryClient:t}=An.useRouteContext();return X.jsxs(jk,{client:t,children:[X.jsx(Mb,{}),X.jsx(lx,{position:"top-right",duration:5e3,closeButton:!0,richColors:!0})]})}const gx="modulepreload",mx=function(t){return"/"+t},Wv={},wi=function(e,i,s){let l=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=c?.nonce||c?.getAttribute("nonce");l=p(i.map(g=>{if(g=mx(g),g in Wv)return;Wv[g]=!0;const y=g.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${m}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":gx,y||(b.as="script"),b.crossOrigin="",b.href=g,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return l.then(c=>{for(const h of c||[])h.status==="rejected"&&u(h.reason);return e().catch(u)})},yx=()=>wi(()=>import("./index-Lnt4VvHm.js"),__vite__mapDeps([0,1,2,3,4])),vx=vi()({head:()=>({meta:[{title:"The Ivy at The Pitch — Chapel Hill Event Venue"},{name:"description",content:"The Ivy at The Pitch — Chapel Hill's premier event venue for corporate events, private parties, and productions. Full-service bar, catering coordination, and media studio."},{property:"og:title",content:"The Ivy at The Pitch — Chapel Hill Event Venue"},{property:"og:description",content:"Corporate & private events, full-service bar, catering coordination, and a professional media studio in Chapel Hill."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),component:bi(yx,"component")}),bx=()=>wi(()=>import("./admin-DtqBFgK5.js"),[]),_x=vi()({beforeLoad:()=>{throw Ro({to:"/ops"})},component:bi(bx,"component")}),wx=()=>wi(()=>import("./auth-C8Y1DaRC.js"),__vite__mapDeps([5,2,6,7])),Sx=vi()({head:()=>({meta:[{title:"Employees & Partners Sign In — THE PITCH"},{name:"robots",content:"noindex, nofollow"},{name:"description",content:"The operating hub for THE PITCH personnel, partners, and owners creating exceptional experiences together."}]}),component:bi(wx,"component")}),Ex=()=>wi(()=>import("./book-BY7Tyrjo.js"),__vite__mapDeps([8,3,2,1])),Tx=vi()({head:()=>({meta:[{title:"Contact Us — The Pitch Chapel Hill"},{name:"description",content:"Tell us about your event and we'll follow up with your inquiry within 48 hours."}]}),validateSearch:t=>({...typeof t.space=="string"?{space:t.space}:{},...typeof t.pkg=="string"?{pkg:t.pkg}:{}}),component:bi(Ex,"component")}),Ax=()=>wi(()=>import("./gallery-Bn6bsZ6f.js"),__vite__mapDeps([9,1,2,3])),Rx=vi()({head:()=>({meta:[{title:"Gallery — The Ivy at The Pitch"},{name:"description",content:"Photos and videos from The Ivy and our spaces at The Pitch Chapel Hill."},{property:"og:title",content:"Gallery — The Ivy at The Pitch"}
56,{property:"og:description",content:"Explore photography from The Ivy and signature spaces at The Pitch."}]}),component:bi(Ax,"component")}),Ox=()=>wi(()=>import("./ops-YRei7t3K.js"),__vite__mapDeps([10,3,2,7])),Cx=vi()({validateSearch:t=>({...typeof t.m=="string"?{m:t.m}:{},...typeof t.r=="string"?{r:t.r}:{}}),head:()=>({meta:[{title:"THE PITCH OPERATIONS HUB"},{name:"robots",content:"noindex, nofollow"}]}),component:bi(Ox,"component")}),kx=()=>wi(()=>import("./private-DtqBFgK5.js"),[]),xx=vi()({beforeLoad:()=>{throw Ro({to:"/ops"})},component:bi(kx,"component")}),Nx=()=>wi(()=>import("./spaces-CwgLSuoS.js"),__vite__mapDeps([11,1,2,3,6,4])),jx=vi()({head:()=>({meta:[{title:"The PITCH Ecosystem — The Pitch Chapel Hill"},{name:"description",content:"Explore The PITCH Ecosystem: The Ivy, The Grounds, The Branch, and The Roots — event, coffee, office, and studio spaces in Chapel Hill."},{property:"og:title",content:"The PITCH Ecosystem — The Pitch Chapel Hill"},{property:"og:description",content:"Step inside The Pitch with an immersive walkthrough, then dive into each of our four spaces."}]}),component:bi(Nx,"component")}),Dx=()=>wi(()=>import("./walkthrough-DtqBFgK5.js"),[]),Lx=vi()({beforeLoad:()=>{throw Ro({to:"/spaces"})},component:bi(Dx,"component")}),Mx=vx.update({id:"/",path:"/",getParentRoute:()=>An}),Ux=_x.update({id:"/admin",path:"/admin",getParentRoute:()=>An}),zx=Sx.update({id:"/auth",path:"/auth",getParentRoute:()=>An}),Bx=Tx.update({id:"/book",path:"/book",getParentRoute:()=>An}),Px=Rx.update({id:"/gallery",path:"/gallery",getParentRoute:()=>An}),Hx=Cx.update({id:"/ops",path:"/ops",getParentRoute:()=>An}),Ix=xx.update({id:"/private",path:"/private",getParentRoute:()=>An}),qx=jx.update({id:"/spaces",path:"/spaces",getParentRoute:()=>An}),$x=Lx.update({id:"/walkthrough",path:"/walkthrough",getParentRoute:()=>An}),Gx={IndexRoute:Mx,AdminRoute:Ux,AuthRoute:zx,BookRoute:Bx,GalleryRoute:Px,OpsRoute:Hx,PrivateRoute:Ix,SpacesRoute:qx,WalkthroughRoute:$x},Vx=An._addFileChildren(Gx),Kx=["sign in to use the assistant","sign in to open the operations os","sign in to continue","jwt expired","invalid claim","unauthorized"];function e0(t){const i=(t instanceof Error?t.message:String(t??"")).toLowerCase();return Kx.some(s=>i.includes(s))}let t0=!1;function Fx(){typeof window>"u"||t0||window.location.pathname!=="/auth"&&(t0=!0,window.location.replace("/auth"))}const Yx=()=>{const t=s=>{e0(s)&&Fx()},e=new Nk({queryCache:new g_({onError:t}),mutationCache:new p_({onError:t}),defaultOptions:{queries:{retry:(s,l)=>!e0(l)&&s<1}}});return $R({routeTree:Vx,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function Qx(){const t=await Yx();let e;if(qv){const i=await qv.getOptions();i.serializationAdapters=i.serializationAdapters??[],window.__TSS_START_OPTIONS__=i,e=i.serializationAdapters,t.options.defaultSsr=i.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(XA),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.ids.get().length||await qE(t),t}var Jx=Qx;function Xx(){return Jx().finally(()=>window.$_TSR?.h())}var Th;function Zx(){return Th||(Th=Xx()),X.jsx(WA,{promise:Th,children:t=>X.jsx(KR,{router:t})})}de.startTransition(()=>{zS.hydrateRoot(document,X.jsx(de.StrictMode,{children:X.jsx(Zx,{})}))});export{J as A,Cb as B,xt as C,s0 as D,HS as E,r0 as F,eN as G,Lk as H,uv as I,Uu as J,iN as K,_d as L,Dk as M,Tx as R,Hu as S,tN as T,wi as _,pk as a,rN as b,JA as c,Jh as d,c_ as e,Qh as f,o_ as g,Ok as h,hk as i,X as j,yk as k,Ct as l,Eo as m,wn as n,xk as o,wk as p,sN as q,de as r,ik as s,dk as t,kb as u,aN as v,oN as w,Mr as x,Wx as y,n0 as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.