vendor: 6,595 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/support-GpoV_X7f.js","assets/PageLayout-5dzngzbZ.js","assets/Footer-DSNkqosq.js","assets/Navbar-BVVX5YAz.js","assets/PageHero-Q2Mss8G-.js","assets/FAQ-CfZ-pVeT.js","assets/ContactForm-DAiXWi3S.js","assets/input-DYVv7KzY.js","assets/label-DC_p5wxB.js","assets/gamer-hub-ShP_V6ir.js","assets/download-DJCexns7.js","assets/lock-DlDM9BDw.js","assets/users-D2pa37w6.js","assets/messages-square-CfvrWW6E.js","assets/shopping-cart-Cys-0JnK.js","assets/contact-DeiThOo-.js","assets/community-CyV7qgXf.js","assets/arrow-right-C-VAFlvW.js","assets/shield-check-RIB519-H.js","assets/buy-Ft76xtMs.js","assets/OfferStack-D1zQK0U2.js","assets/EmailForm-Qx5QivI7.js","assets/layers-BpCrN8oZ.js","assets/book-open-mhPPVBub.js","assets/book-hWMbD3MQ.js","assets/products-B_Z0nVAO.js","assets/book-cover.asset-Dm2_iVcL.js","assets/auth-B_6OFlyc.js","assets/loader-circle-CcoUaKOE.js","assets/affiliates-D6FXrALR.js","assets/gamepad-2-BofOOnpN.js","assets/index-DFXVLz1J.js","assets/shield-alert-DuJPrr0r.js","assets/circle-check-DCJT0lyt.js","assets/layout-dashboard-C2MEm9CN.js","assets/order-complete-BIHCgCAD.js","assets/payments.functions-D2Su3pEU.js","assets/auth-middleware-BA2pY57R.js","assets/stripe-CuFaIc99.js","assets/checkout-FYf3X0FT.js","assets/admin-DgK8-wYb.js","assets/admin.functions-CY2TclR0.js","assets/account-RnjrQ5X1.js"])))=>i.map(i=>d[i]); 2function Bw(t,e){for(var s=0;s<e.length;s++){const a=e[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const u=Object.getOwnPropertyDescriptor(a,l);u&&Object.defineProperty(t,l,u.get?u:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Bv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qh={exports:{}},Hi={};var Jg;function Pw(){if(Jg)return Hi;Jg=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:t,type:a,key:c,ref:l!==void 0?l:null,props:u}}return Hi.Fragment=e,Hi.jsx=s,Hi.jsxs=s,Hi}var Xg;function zw(){return Xg||(Xg=1,qh.exports=Pw()),qh.exports}var Q=zw(),$h={exports:{}},me={};var Zg;function Iw(){if(Zg)return me;Zg=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,E={};function A(C,q,G){this.props=C,this.context=q,this.refs=E,this.updater=G||S}A.prototype.isReactComponent={},A.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,q,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=A.prototype;function j(C,q,G){this.props=C,this.context=q,this.refs=E,this.updater=G||S}var N=j.prototype=new M;N.constructor=j,O(N,A.prototype),N.isPureReactComponent=!0;var X=Array.isArray;function V(){}var I={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function W(C,q,G){var J=G.ref;return{$$typeof:t,type:C,key:q,ref:J!==void 0?J:null,props:G}}function le(C,q){return W(C.type,q,C.props)}function ie(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ge(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(G){return q[G]})}var _e=/\/+/g;function qe(C,q){return typeof C=="object"&&C!==null&&C.key!=null?ge(""+C.key):q.toString(36)}function Me(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(V,V):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,q,G,J,ee){var ce=typeof C;(ce==="undefined"||ce==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(ce){case"bigint":case"string":case"number":we=!0;break;case"object":switch(C.$$typeof){case t:case e:we=!0;break;case y:return we=C._init,L(we(C._payload),q,G,J,ee)}}if(we)return ee=ee(C),we=J===""?"."+qe(C,0):J,X(ee)?(G="",we!=null&&(G=we.replace(_e,"$&/")+"/"),L(ee,q,G,"",function(Bt){return Bt})):ee!=null&&(ie(ee)&&(ee=le(ee,G+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(_e,"$&/")+"/")+we)),q.push(ee)),1;we=0;var de=J===""?".":J+":";if(X(C))for(var xe=0;xe<C.length;xe++)J=C[xe],ce=de+qe(J,xe),we+=L(J,q,G,ce,ee);else if(xe=_(C),typeof xe=="function")for(C=xe.call(C),xe=0;!(J=C.next()).done;)J=J.value,ce=de+qe(J,xe++),we+=L(J,q,G,ce,ee);else if(ce==="object"){if(typeof C.then=="function")return L(Me(C),q,G,J,ee);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return we}function F(C,q,G){if(C==null)return C;var J=[],ee=0;return L(C,J,"","",function(ce){return q.call(G,ce,ee++)}),J}function se(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(G){(C._status===0||C._status===-1)&&(C._status=1,C._result=G)},function(G){(C._status===0||C._status===-1)&&(C._status=2,C._result=G)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var Se=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)}
vendor: 6,209 bytes, line 2
2,ye={map:F,forEach:function(C,q,G){F(C,function(){q.apply(this,arguments)},G)},count:function(C){var q=0;return F(C,function(){q++}),q},toArray:function(C){return F(C,function(q){return q})||[]},only:function(C){if(!ie(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return me.Activity=g,me.Children=ye,me.Component=A,me.Fragment=s,me.Profiler=l,me.PureComponent=j,me.StrictMode=a,me.Suspense=p,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,me.__COMPILER_RUNTIME={__proto__:null,c:function(C){return I.H.useMemoCache(C)}},me.cache=function(C){return function(){return C.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(C,q,G){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=O({},C.props),ee=C.key;if(q!=null)for(ce in q.key!==void 0&&(ee=""+q.key),q)!Y.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(J[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)J.children=G;else if(1<ce){for(var we=Array(ce),de=0;de<ce;de++)we[de]=arguments[de+2];J.children=we}return W(C.type,ee,J)},me.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},me.createElement=function(C,q,G){var J,ee={},ce=null;if(q!=null)for(J in q.key!==void 0&&(ce=""+q.key),q)Y.call(q,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ee[J]=q[J]);var we=arguments.length-2;if(we===1)ee.children=G;else if(1<we){for(var de=Array(we),xe=0;xe<we;xe++)de[xe]=arguments[xe+2];ee.children=de}if(C&&C.defaultProps)for(J in we=C.defaultProps,we)ee[J]===void 0&&(ee[J]=we[J]);return W(C,ce,ee)},me.createRef=function(){return{current:null}},me.forwardRef=function(C){return{$$typeof:d,render:C}},me.isValidElement=ie,me.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:se}},me.memo=function(C,q){return{$$typeof:m,type:C,compare:q===void 0?null:q}},me.startTransition=function(C){var q=I.T,G={};I.T=G;try{var J=C(),ee=I.S;ee!==null&&ee(G,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(V,Se)}catch(ce){Se(ce)}finally{q!==null&&G.types!==null&&(q.types=G.types),I.T=q}},me.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},me.use=function(C){return I.H.use(C)},me.useActionState=function(C,q,G){return I.H.useActionState(C,q,G)},me.useCallback=function(C,q){return I.H.useCallback(C,q)},me.useContext=function(C){return I.H.useContext(C)},me.useDebugValue=function(){},me.useDeferredValue=function(C,q){return I.H.useDeferredValue(C,q)},me.useEffect=function(C,q){return I.H.useEffect(C,q)},me.useEffectEvent=function(C){return I.H.useEffectEvent(C)},me.useId=function(){return I.H.useId()},me.useImperativeHandle=function(C,q,G){return I.H.useImperativeHandle(C,q,G)},me.useInsertionEffect=function(C,q){return I.H.useInsertionEffect(C,q)},me.useLayoutEffect=function(C,q){return I.H.useLayoutEffect(C,q)},me.useMemo=function(C,q){return I.H.useMemo(C,q)},me.useOptimistic=function(C,q){return I.H.useOptimistic(C,q)},me.useReducer=function(C,q,G){return I.H.useReducer(C,q,G)},me.useRef=function(C){return I.H.useRef(C)},me.useState=function(C){return I.H.useState(C)},me.useSyncExternalStore=function(C,q,G){return I.H.useSyncExternalStore(C,q,G)},me.useTransition=function(){return I.H.useTransition()},me.version="19.2.5",me}var Wg;function vo(){return Wg||(Wg=1,$h.exports=Iw()),$h.exports}var ae=vo();const Z=Bv(ae),R2=Bw({__proto__:null,default:Z},[ae]);var Kh={exports:{}},qi={},Gh={exports:{}},Vh={};var ey;function Hw(){return ey||(ey=1,(function(t){function e(L,F){var se=L.length;L.push(F);e:for(;0<se;){var Se=se-1>>>1,ye=L[Se];if(0<l(ye,F))L[Se]=F,L[se]=ye,se=Se;else break e}}function s(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var F=L[0],se=L.pop();if(se!==F){L[0]=se;e:for(var Se=0,ye=L.length,C=ye>>>1;Se<C;){var q=2*(Se+1)-1,G=L[q],J=q+1,ee=L[J];if(0>l(G,se))J<ye&&0>l(ee,G)?(L[Se]=ee,L[J]=se,Se=J):(L[Se]=G,L[q]=se,Se=q);else if(J<ye&&0>l(ee,se))L[Se]=ee,L[J]=se,Se=J;else break e}}return F}function l(L,F){var se=L.sortIndex-F.sortIndex;return se!==0?se:L.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,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],y=1,g=null,b=3,_=!1,S=!1,O=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var F=s(m);F!==null;){if(F.callback===null)a(m);else if(F.startTime<=L)a(m),F.sortIndex=F.expirationTime,e(p,F);else break;F=s(m)}}function X(L){if(O=!1,N(L),!S)if(s(p)!==null)S=!0,V||(V=!0,ge());else{var F=s(m);F!==null&&Me(X,F.startTime-L)}}var V=!1,I=-1,Y=5,W=-1;function le(){return E?!0:!(t.unstable_now()-W<Y)}function ie(){if(E=!1,V){var L=t.unstable_now();W=L;var F=!0;try{e:{S=!1,O&&(O=!1,M(I),I=-1),_=!0;var se=b;try{t:{for(N(L),g=s(p);g!==null&&!(g.expirationTime>L&&le());){var Se=g.callback;if(typeof Se=="function"){g.callback=null,b=g.priorityLevel;var ye=Se(g.expirationTime<=L);if(L=t.unstable_now(),typeof ye=="function"){g.callback=ye,N(L),F=!0;break t}g===s(p)&&a(p),N(L)}else a(p);g=s(p)}if(g!==null)F=!0;else{var C=s(m);C!==null&&Me(X,C.startTime-L),F=!1}}break e}finally{g=null,b=se,_=!1}F=void 0}}finally{F?ge():V=!1}}}var ge;if(typeof j=="function")ge=function(){j(ie)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,qe=_e.port2;_e.port1.onmessage=ie,ge=function(){qe.postMessage(null)}}else ge=function(){A(ie,0)};function Me(L,F){I=A(function(){L(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(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<L?Math.floor(1e3/L):
vendor: 8,180 bytes, line 2
25},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(L){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var se=b;b=F;try{return L()}finally{b=se}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var se=b;b=L;try{return F()}finally{b=se}},t.unstable_scheduleCallback=function(L,F,se){var Se=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Se+se:Se):se=Se,L){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=se+ye,L={id:y++,callback:F,priorityLevel:L,startTime:se,expirationTime:ye,sortIndex:-1},se>Se?(L.sortIndex=se,e(m,L),s(p)===null&&L===s(m)&&(O?(M(I),I=-1):O=!0,Me(X,se-Se))):(L.sortIndex=ye,e(p,L),S||_||(S=!0,V||(V=!0,ge()))),L},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(L){var F=b;return function(){var se=b;b=F;try{return L.apply(this,arguments)}finally{b=se}}}})(Vh)),Vh}var ty;function qw(){return ty||(ty=1,Gh.exports=Hw()),Gh.exports}var Yh={exports:{}},xt={};var ny;function $w(){if(ny)return xt;ny=1;var t=vo();function e(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(e(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,xt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return u(p,m,null,y)},xt.flushSync=function(p){var m=c.T,y=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=m,a.p=y,a.d.f()}},xt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},xt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},xt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},xt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},xt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);a.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},xt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=d(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},xt.requestFormReset=function(p){a.d.r(p)},xt.unstable_batchedUpdates=function(p,m){return p(m)},xt.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},xt.useFormStatus=function(){return c.H.useHostTransitionStatus()},xt.version="19.2.5",xt}var ry;function Pv(){if(ry)return Yh.exports;ry=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(),Yh.exports=$w(),Yh.exports}var sy;function Kw(){if(sy)return qi;sy=1;var t=qw(),e=vo(),s=Pv();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function m(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,o=r;;){var h=i.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){i=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===i)return p(h),n;if(f===o)return p(h),r;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=h,o=f;else{for(var v=!1,w=h.child;w;){if(w===i){v=!0,i=h,o=f;break}if(w===o){v=!0,o=h,i=f;break}w=w.sibling}if(!v){for(w=f.child;w;){if(w===i){v=!0,i=f,o=h;break}if(w===o){v=!0,o=f,i=h;break}w=w.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ge(n){return n===null||typeof n!="object"?null:(n=ie&&n[ie]||n["@@iterator"],typeof n=="function"?n:null)}var _e=Symbol.for("react.client.reference");function qe(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===_e?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case O:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case V:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case N:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return r=n.displayName||null,r!==null?r:qe(n.type)||"Memo";case Y:r=n._payload,n=n._init;try{return qe(n(r))}catch{}}return null}var Me=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pen
vendor: 4,200 bytes, lines 2-9
2ding:!1,data:null,method:null,action:null},Se=[],ye=-1;function C(n){return{current:n}}function q(n){0>ye||(n.current=Se[ye],Se[ye]=null,ye--)}function G(n,r){ye++,Se[ye]=n.current,n.current=r}var J=C(null),ee=C(null),ce=C(null),we=C(null);function de(n,r){switch(G(ce,r),G(ee,n),G(J,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?bg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=bg(r),n=_g(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(J),G(J,n)}function xe(){q(J),q(ee),q(ce)}function Bt(n){n.memoizedState!==null&&G(we,n);var r=J.current,i=_g(r,n.type);r!==i&&(G(ee,n),G(J,i))}function Pt(n){ee.current===n&&(q(J),q(ee)),we.current===n&&(q(we),Bi._currentValue=se)}var kt,us;function zt(n){if(kt===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);kt=r&&r[1]||"",us=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+kt+n+us}var cs=!1;function Fn(n,r){if(!n||cs)return"";cs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(z){var P=z}Reflect.construct(n,[],K)}else{try{K.call()}catch(z){P=z}n.call(K.prototype)}}else{try{throw Error()}catch(z){P=z}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(z){if(z&&P&&typeof z.stack=="string")return[z.stack,P.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],w=f[1];if(v&&w){var x=v.split(` 5`),B=w.split(` 6`);for(h=o=0;o<x.length&&!x[o].includes("DetermineComponentFrameRoot");)o++;for(;h<B.length&&!B[h].includes("DetermineComponentFrameRoot");)h++;if(o===x.length||h===B.length)for(o=x.length-1,h=B.length-1;1<=o&&0<=h&&x[o]!==B[h];)h--;for(;1<=o&&0<=h;o--,h--)if(x[o]!==B[h]){if(o!==1||h!==1)do if(o--,h--,0>h||x[o]!==B[h]){var H=` 7`+x[o].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=o&&0<=h);break}}}finally{cs=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?zt(i):""}function Nn(n,r){switch(n.tag){case 26:case 27:case 5:return zt(n.type);case 16:return zt("Lazy");case 13:return n.child!==r&&r!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return Fn(n.type,!1);case 11:return Fn(n.type.render,!1);case 1:return Fn(n.type,!0);case 31:return zt("Activity");default:return""}}function fn(n){try{var r="",i=null;do r+=Nn(n,i),i=n,n=n.return;while(n);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var _t=Object.prototype.hasOwnProperty,tn=t.unstable_scheduleCallback,hs=t.unstable_cancelCallback,ft=t.unstable_shouldYield,Un=t.unstable_requestPaint,dt=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,dn=t.unstable_UserBlockingPriority,Qn=t.unstable_NormalPriority,Ja=t.unstable_LowPriority,Jn=t.unstable_IdlePriority,So=t.log,Er=t.unstable_setDisableYieldValue,fs=null,jt=null;function Rn(n){if(typeof So=="function"&&Er(n),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(fs,n)}catch{}}var At=Math.clz32?Math.clz32:Ln,ju=Math.log,Xa=Math.LN2;function Ln(n){return n>>>=0,n===0?32:31-(ju(n)/Xa|0)|0}var Vs=256,Ys=262144,ds=4194304;function Bn(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;
vendor: 7,104 bytes, line 9
9case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function pe(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var h=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var w=o&134217727;return w!==0?(o=w&~f,o!==0?h=Bn(o):(v&=w,v!==0?h=Bn(v):i||(i=w&~n,i!==0&&(h=Bn(i))))):(w=o&~f,w!==0?h=Bn(w):v!==0?h=Bn(v):i||(i=o&~n,i!==0&&(h=Bn(i)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:h}function Ve(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function pt(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 Ot(){var n=ds;return ds<<=1,(ds&62914560)===0&&(ds=4194304),n}function Tr(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Qe(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function It(n,r,i,o,h,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var w=n.entanglements,x=n.expirationTimes,B=n.hiddenUpdates;for(i=v&~i;0<i;){var H=31-At(i),K=1<<H;w[H]=0,x[H]=-1;var P=B[H];if(P!==null)for(B[H]=null,H=0;H<P.length;H++){var z=P[H];z!==null&&(z.lane&=-536870913)}i&=~K}o!==0&&ps(n,o,0),f!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function ps(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-At(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function Ht(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-At(i),h=1<<o;h&r|n[o]&r&&(n[o]|=r),i&=~h}}function qt(n,r){var i=r&-r;return i=(i&42)!==0?1:Fs(i),(i&(n.suspendedLanes|r))!==0?0:i}function Fs(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 An(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Mu(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:$g(n.type))}function ad(n,r){var i=F.p;try{return F.p=n,r()}finally{F.p=i}}var Rr=Math.random().toString(36).slice(2),wt="__reactFiber$"+Rr,$t="__reactProps$"+Rr,Qs="__reactContainer$"+Rr,Du="__reactEvents$"+Rr,Ab="__reactListeners$"+Rr,Ob="__reactHandles$"+Rr,id="__reactResources$"+Rr,Za="__reactMarker$"+Rr;function Nu(n){delete n[wt],delete n[$t],delete n[Du],delete n[Ab],delete n[Ob]}function Js(n){var r=n[wt];if(r)return r;for(var i=n.parentNode;i;){if(r=i[Qs]||i[wt]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=Og(n);n!==null;){if(i=n[wt])return i;n=Og(n)}return r}n=i,i=n.parentNode}return null}function Xs(n){if(n=n[wt]||n[Qs]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Wa(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function Zs(n){var r=n[id];return r||(r=n[id]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function mt(n){n[Za]=!0}var od=new Set,ld={};function ms(n,r){Ws(n,r),Ws(n+"Capture",r)}function Ws(n,r){for(ld[n]=r,n=0;n<r.length;n++)od.add(r[n])}var xb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ud={},cd={};function Cb(n){return _t.call(cd,n)?!0:_t.call(ud,n)?!1:xb.test(n)?cd[n]=!0:(ud[n]=!0,!1)}function Eo(n,r,i){if(Cb(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function To(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Xn(n,r,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+o)}}function pn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function hd(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function kb(n,r,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,f=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Uu(n){if(!n._valueTracker){var r=hd(n)?"checked":"value";n._valueTracker=kb(n,r,""+n[r])}}function fd(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=hd(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function Ro(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 jb=/[\n"\\]/g;function mn(n){return n.replace(jb,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Lu(n,r,i,o,h,f,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=""+pn(r)):n.value!==""+pn(r)&&(n.value=""+pn(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?Bu(n,v,pn(r)):i!=null?Bu(n,v,pn(i)):o!=null&&n.removeAttribute("value"),h==null&&f!=null&&(n.defaultChecked=!!f),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+pn(w):n.removeAttribute("name")}function dd(n,r,i,o,h,f,v,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){Uu(n);return}i=i!=null?""+pn(i):"",r=r!=null?""+pn(r):i,w||r===n.value||(n.value=r),n.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=w?
vendor: 5,194 bytes, line 9
9n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Uu(n)}function Bu(n,r,i){r==="number"&&Ro(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ea(n,r,i,o){if(n=n.options,r){r={};for(var h=0;h<i.length;h++)r["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=r.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&o&&(n[i].defaultSelected=!0)}else{for(i=""+pn(i),r=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,o&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function pd(n,r,i){if(r!=null&&(r=""+pn(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+pn(i):""}function md(n,r,i,o){if(r==null){if(o!=null){if(i!=null)throw Error(a(92));if(Me(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),r=i}i=pn(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),Uu(n)}function ta(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var Mb=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 gd(n,r,i){var o=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,i):typeof i!="number"||i===0||Mb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function yd(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&i[h]!==o&&gd(n,h,o)}else for(var f in r)r.hasOwnProperty(f)&&gd(n,f,r[f])}function Pu(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 Db=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"],["colorRendering","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
9-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"]]),Nb=/^[\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 Ao(n){return Nb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Zn(){}var zu=null;function Iu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var na=null,ra=null;function vd(n){var r=Xs(n);if(r&&(n=r.stateNode)){var i=n[$t]||null;e:switch(n=r.stateNode,r.type){case"input":if(Lu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+mn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var h=o[$t]||null;if(!h)throw Error(a(90));Lu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&fd(o)}break e;case"textarea":pd(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&ea(n,!!i.multiple,r,!1)}}}var Hu=!1;function bd(n,r,i){if(Hu)return n(r,i);Hu=!0;try{var o=n(r);return o}finally{if(Hu=!1,(na!==null||ra!==null)&&(dl(),na&&(r=na,n=ra,ra=na=null,vd(r),n)))for(r=0;r<n.length;r++)vd(n[r])}}function ei(n,r){var i=n.stateNode;if(i===null)return null;var o=i[$t]||null;if(o===null)return null;i=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(Wn)try{var ti={};Object.defineProperty(ti,"passive",{get:function(){qu=!0}}),window.addEventListener("test",ti,ti),window.removeEventListener("test",ti,ti)}catch{qu=!1}var Ar=null,$u=null,Oo=null;function _d(){if(Oo)return Oo;var n,r=$u,i=r.length,o,h="value"in Ar?Ar.value:Ar.textContent,f=h.length;for(n=0;n<i&&r[n]===h[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===h[f-o];o++);return Oo=h.slice(n,1<o?1-o:void 0)}function xo(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 Co(){return!0}function wd(){return!1}function Kt(n){function r(i,o,h,f,v){this._reactName=i,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(i=n[w],this[w]=i?i(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Co:wd,this.isPropagationStopped=wd,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),r}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=Kt(gs),ni=g({},gs,{view:0,detail:0}),Ub=Kt(ni),Ku,Gu,ri,jo=g({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yu,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!==ri&&(ri&&n.type==="mousemove"?(Ku=n.screenX-ri.screenX,Gu=n.screenY-ri.screenY):Gu=Ku=0,ri=n),Ku)},movementY:function(n){return"movementY"in n?n.movementY:Gu}}),Sd=Kt(jo),Lb=g({},jo,{dataTransfer:0}),Bb=Kt(Lb),Pb=g({},ni,{relatedTarget:0}),Vu=Kt(Pb),zb=g({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),Ib=Kt(zb),Hb=g({},gs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),qb=Kt(Hb),$b=g({},gs,{data:0}),Ed=Kt($b),Kb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gb={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"},Vb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yb(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Vb[n])?!!r[n]:!1}function Yu(){return Yb}var Fb=g({},ni,{key:function(n){if(n.key){var r=Kb[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=xo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Gb[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yu,charCode:function(n){return n.type==="keypress"?xo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?xo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Qb=Kt(Fb),Jb=g({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=Kt(Jb),Xb=g({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yu}),Zb=Kt(Xb),Wb=g({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),e_=Kt(Wb),t_=g({},jo,{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}),n_=Kt(t_),r_=g({},gs,{newState:0,oldState:0}),s_=Kt(r_),a_=[9,13,27,32],Fu=Wn&&"CompositionEvent"in window,si=null;Wn&&"documentMode"in document&&(si=document.documentMode);var i_=Wn&&"TextEvent"in window&&!si,Rd=Wn&&(!Fu||si&&8<si&&11>=si),Ad=" ",Od=!1;function xd(n,r){switch(n){case"keyup":return a_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var sa=!1;function o_(n,r){switch(n){case"compositionend":return Cd(r);case"keypress":return r.which!==32?null:(Od=!0,Ad);case"textInput":return n=r.data,n===Ad&&Od?null:n;default:return null}}function l_(n,r){if(sa)return n==="compositionend"||!Fu&&xd(n,r)?(n=_d(),Oo=$u=Ar=null,sa=!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 Rd&&r.locale!=="ko"?null:r.data;default:return null}}var u_={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 kd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!u_[n.type]:r==="textarea"}function jd(n,r,i,o){na?ra?ra.push(o):ra=[o]:na=o,r=_l(r,"onChange"),0<r.length&&(i=new ko("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var ai=null,ii=null;function c_(n){dg(n,0)}function Mo(n){var r=Wa(n);if(fd(r))return n}function Md(n,r){if(n==="change")return r}var Dd=!1;if(Wn){var Qu;if(Wn){var Ju="oninput"in document;if(!Ju){var Nd=document.createElement("div");Nd.setAttribute("oninput","return;"),Ju=typeof Nd.oninput=="function"}Qu=Ju}else Qu=!1;Dd=Qu&&(!document.documentMode||9<document.documentMode)}function Ud(){ai&&(ai.detachEvent("onpropertychange",Ld),ii=ai=null)}function Ld(n){if(n.propertyName==="value"&&Mo(ii)){var r=[];jd(r,ii,n,Iu(n)),bd(c_,r)}}function h_(n,r,i){n==="focusin"?(Ud(),ai=r,ii=i,ai.attachEvent("onpropertychange",Ld)):n==="focusout"&&Ud()}function f_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Mo(ii)}function d_(n,r){if(n==="click")return Mo(r)}function p_(n,r){if(n==="input"||n==="change")return Mo(r)}function m_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var nn=typeof Object.is=="function"?Object.is:m_;function oi(n,r){if(nn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var h=i[o];if(!_t.call(r,h)||!nn(n[h],r[h]))return!1}return!0}function Bd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Pd(n,r){var i=Bd(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=r&&o>=r)return{node:i,offset:r-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Bd(i)}}function zd(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?zd(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Id(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Ro(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=Ro(n.document)}return r}function Xu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var g_=Wn&&"documentMode"in document&&11>=document.documentMode,aa=null,Zu=null,li=null,Wu=!1;function Hd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wu||aa==null||aa!==Ro(o)||(o=aa,"selectionStart"in o&&Xu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 15,718 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),li&&oi(li,o)||(li=o,o=_l(Zu,"onSelect"),0<o.length&&(r=new ko("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=aa)))}function ys(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var ia={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionrun:ys("Transition","TransitionRun"),transitionstart:ys("Transition","TransitionStart"),transitioncancel:ys("Transition","TransitionCancel"),transitionend:ys("Transition","TransitionEnd")},ec={},qd={};Wn&&(qd=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function vs(n){if(ec[n])return ec[n];if(!ia[n])return n;var r=ia[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in qd)return ec[n]=r[i];return n}var $d=vs("animationend"),Kd=vs("animationiteration"),Gd=vs("animationstart"),y_=vs("transitionrun"),v_=vs("transitionstart"),b_=vs("transitioncancel"),Vd=vs("transitionend"),Yd=new Map,tc="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(" ");tc.push("scrollEnd");function On(n,r){Yd.set(n,r),ms(r,[n])}var Do=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)},gn=[],oa=0,nc=0;function No(){for(var n=oa,r=nc=oa=0;r<n;){var i=gn[r];gn[r++]=null;var o=gn[r];gn[r++]=null;var h=gn[r];gn[r++]=null;var f=gn[r];if(gn[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&Fd(i,h,f)}}function Uo(n,r,i,o){gn[oa++]=n,gn[oa++]=r,gn[oa++]=i,gn[oa++]=o,nc|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function rc(n,r,i,o){return Uo(n,r,i,o),Lo(n)}function bs(n,r){return Uo(n,null,null,r),Lo(n)}function Fd(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var h=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(h=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,h&&r!==null&&(h=31-At(i),n=f.hiddenUpdates,o=n[h],o===null?n[h]=[r]:o.push(r),r.lane=i|536870912),f):null}function Lo(n){if(50<ki)throw ki=0,fh=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var la={};function __(n,r,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(n,r,i,o){return new __(n,r,i,o)}function sc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function er(n,r){var i=n.alternate;return i===null?(i=rn(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Qd(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Bo(n,r,i,o,h,f){var v=0;if(o=n,typeof n=="function")sc(n)&&(v=1);else if(typeof n=="string")v=Rw(n,i,J.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=rn(31,i,r,h),n.elementType=W,n.lanes=f,n;case O:return _s(i.children,h,f,r);case E:v=8,h|=24;break;case A:return n=rn(12,i,r,h|2),n.elementType=A,n.lanes=f,n;case X:return n=rn(13,i,r,h),n.elementType=X,n.lanes=f,n;case V:return n=rn(19,i,r,h),n.elementType=V,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case M:v=9;break e;case N:v=11;break e;case I:v=14;break e;case Y:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=rn(v,i,r,h),r.elementType=n,r.type=o,r.lanes=f,r}function _s(n,r,i,o){return n=rn(7,n,o,r),n.lanes=i,n}function ac(n,r,i){return n=rn(6,n,null,r),n.lanes=i,n}function Jd(n){var r=rn(18,null,null,0);return r.stateNode=n,r}function ic(n,r,i){return r=rn(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Xd=new WeakMap;function yn(n,r){if(typeof n=="object"&&n!==null){var i=Xd.get(n);return i!==void 0?i:(r={value:n,source:r,stack:fn(r)},Xd.set(n,r),r)}return{value:n,source:r,stack:fn(r)}}var ua=[],ca=0,Po=null,ui=0,vn=[],bn=0,Or=null,Pn=1,zn="";function tr(n,r){ua[ca++]=ui,ua[ca++]=Po,Po=n,ui=r}function Zd(n,r,i){vn[bn++]=Pn,vn[bn++]=zn,vn[bn++]=Or,Or=n;var o=Pn;n=zn;var h=32-At(o)-1;o&=~(1<<h),i+=1;var f=32-At(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,Pn=1<<32-At(r)+h|i<<h|o,zn=f+n}else Pn=1<<f|i<<h|o,zn=n}function oc(n){n.return!==null&&(tr(n,1),Zd(n,1,0))}function lc(n){for(;n===Po;)Po=ua[--ca],ua[ca]=null,ui=ua[--ca],ua[ca]=null;for(;n===Or;)Or=vn[--bn],vn[bn]=null,zn=vn[--bn],vn[bn]=null,Pn=vn[--bn],vn[bn]=null}function Wd(n,r){vn[bn++]=Pn,vn[bn++]=zn,vn[bn++]=Or,Pn=r.id,zn=r.overflow,Or=n}var St=null,Ke=null,Oe=!1,xr=null,_n=!1,uc=Error(a(519));function Cr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ci(yn(r,n)),uc}function ep(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[wt]=n,r[$t]=o,i){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(i=0;i<Mi.length;i++)Te(Mi[i],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)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||o.suppressHydrationWarning===!0||yg(r.textContent,i)?(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=Zn),r=!0):r=!1,r||Cr(n,!0)}function tp(n){for(St=n.return;St;)switch(St.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:St=St.return}}function ha(n){if(n!==St)return!1;if(!Oe)return tp(n),Oe=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Oh(n.type,n.memoizedProps)),i=!i),i&&Ke&&Cr(n),tp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ke=Ag(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ke=Ag(n)}else r===27?(r=Ke,$r(n.type)?(n=Mh,Mh=null,Ke=n):Ke=r):Ke=St?Sn(n.stateNode.nextSibling):null;return!0}function ws(){Ke=St=null,Oe=!1}function cc(){var n=xr;return n!==null&&(Ft===null?Ft=n:Ft.push.apply(Ft,n),xr=null),n}function ci(n){xr===null?xr=[n]:xr.push(n)}var hc=C(null),Ss=null,nr=null;function kr(n,r,i){G(hc,r._currentValue),r._currentValue=i}function rr(n){n._currentValue=hc.current,q(hc)}function fc(n,r,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===i)break;n=n.return}}function dc(n,r,i,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=h;for(var x=0;x<r.length;x++)if(w.context===r[x]){f.lanes|=i,w=f.alternate,w!==null&&(w.lanes|=i),fc(f.return,i,n),o||(v=null);break e}f=w.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),fc(v,i,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function fa(n,r,i,o){n=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var w=h.type;nn(h.pendingProps.value,v.value)||(n!==null?n.push(w):n=[w])}}else if(h===we.current){if(v=h.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(Bi):n=[Bi])}h=h.return}n!==null&&dc(r,n,i,o),r.flags|=262144}function zo(n){for(n=n.firstContext;n!==null;){if(!nn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Es(n){Ss=n,nr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Et(n){return np(Ss,n)}function Io(n,r){return Ss===null&&Es(n),np(n,r)}function np(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},nr===null){if(n===null)throw Error(a(308));nr=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else nr=nr.next=r;return i}var w_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},S_=t.unstable_scheduleCallback,E_=t.unstable_NormalPriority,rt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pc(){return{controller:new w_,data:new Map,refCount:0}}function hi(n){n.refCount--,n.refCount===0&&S_(E_,function(){n.controller.abort()})}var fi=null,mc=0,da=0,pa=null;function T_(n,r){if(fi===null){var i=fi=[];mc=0,da=vh(),pa={status:"pending",value:void 0,then:function(o){i.push(o)}}}return mc++,r.then(rp,rp),r}function rp(){if(--mc===0&&fi!==null){pa!==null&&(pa.status="fulfilled");var n=fi;fi=null,da=0,pa=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function R_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<i.length;h++)(0,i[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),o}var sp=L.S;L.S=function(n,r){Hm=dt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&T_(n,r),sp!==null&&sp(n,r)};var Ts=C(null);function gc(){var n=Ts.current;return n!==null?n:Ie.pooledCache}function Ho(n,r){r===null?G(Ts,Ts.current):G(Ts,r.pool)}function ap(){var n=gc();return n===null?null:{parent:rt._currentValue,pool:n}}var ma=Error(a(460)),yc=Error(a(474)),qo=Error(a(542)),$o={then:function(){}};function ip(n){return n=n.status,n==="fulfilled"||n==="rejected"}function op(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(Zn,Zn),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,up(n),n;default:if(typeof r.status=="string")r.then(Zn,Zn);else{if(n=Ie,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,up(n),n}throw As=r,ma}}function Rs(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(As=i,ma):i}}var As=null;function lp(){if(As===null)throw Error(a(459));var n=As;return As=null,n}function up(n){if(n===ma||n===qo)throw Error(a(483))}var ga=null,di=0;function Ko(n){var r=di;return di+=1,ga===null&&(ga=[]),op(ga,n,r)}function pi(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Go(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function cp(n){function r(D,k){if(n){var U=D.deletions;U===null?(D.deletions=[k],D.flags|=16):U.push(k)}}function i(D,k){if(!n)return null;for(;k!==null;)r(D,k),k=k.sibling;return null}function o(D){for(var k=new Map;D!==null;)D.key!==null?k.set(D.key,D):k.set(D.index,D),D=D.sibling;return k}function h(D,k){return D=er(D,k),D.index=0,D.sibling=null,D}function f(D,k,U){return D.index=U,n?(U=D.alternate,U!==null?(U=U.index,U<k?(D.flags|=67108866,k):U):(D.flags|=67108866,k)):(D.flags|=1048576,k)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function w(D,k,U,$){return k===null||k.tag!==6?(k=ac(U,D.mode,$),k.return=D,k):(k=h(k,U),k.return=D,k)}function x(D,k,U,$){var ue=U.type;return ue===O?H(D,k,U.props.children,$,U.key):k!==null&&(k.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Y&&Rs(ue)===k.type)?(k=h(k,U.props),pi(k,U),k.return=D,k):(k=Bo(U.type,U.key,U.props,null,D.mode,$),pi(k,U),k.return=D,k)}function B(D,k,U,$){return k===null||k.tag!==4||k.stateNode.containerInfo!==U.containerInfo||k.stateNode.implementation!==U.implementation?(k=ic(U,D.mode,$),k.return=D,k):(k=h(k,U.children||[]),k.return=D,k)}function H(D,k,U,$,ue){return k===null||k.tag!==7?(k=_s(U,D.mode,$,ue),k.return=D,k):(k=h(k,U),k.return=D,k)}function K(D,k,U){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ac(""+k,D.mode,U),k.return=D,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return U=Bo(k.type,k.key,k.props,null,D.mode,U),pi(U,k),U.return=D,U;case S:return k=ic(k,D.mode,U),k.return=D,k;case Y:return k=Rs(k),K(D,k,U)}if(Me(k)||ge(k))return k=_s(k,D.mode,U,null),k.return=D,k;if(typeof k.then=="function")return K(D,Ko(k),U);if(k.$$typeof===j)return K(D,Io(D,k),U);Go(D,k)}return null}function P(D,k,U,$){var ue=k!==null?k.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ue!==null?null:w(D,k,""+U,$);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case _:return U.key===ue?x(D,k,U,$):null;case S:return U.key===ue?B(D,k,U,$):null;case Y:return U=Rs(U),P(D,k,U,$)}if(Me(U)||ge(U))return ue!==null?null:H(D,k,U,$,null);if(typeof U.then=="function")return P(D,k,Ko(U),$);
vendor: 4,213 bytes, line 9
9if(U.$$typeof===j)return P(D,k,Io(D,U),$);Go(D,U)}return null}function z(D,k,U,$,ue){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return D=D.get(U)||null,w(k,D,""+$,ue);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return D=D.get($.key===null?U:$.key)||null,x(k,D,$,ue);case S:return D=D.get($.key===null?U:$.key)||null,B(k,D,$,ue);case Y:return $=Rs($),z(D,k,U,$,ue)}if(Me($)||ge($))return D=D.get(U)||null,H(k,D,$,ue,null);if(typeof $.then=="function")return z(D,k,U,Ko($),ue);if($.$$typeof===j)return z(D,k,U,Io(k,$),ue);Go(k,$)}return null}function ne(D,k,U,$){for(var ue=null,Ce=null,oe=k,be=k=0,Ae=null;oe!==null&&be<U.length;be++){oe.index>be?(Ae=oe,oe=null):Ae=oe.sibling;var ke=P(D,oe,U[be],$);if(ke===null){oe===null&&(oe=Ae);break}n&&oe&&ke.alternate===null&&r(D,oe),k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke,oe=Ae}if(be===U.length)return i(D,oe),Oe&&tr(D,be),ue;if(oe===null){for(;be<U.length;be++)oe=K(D,U[be],$),oe!==null&&(k=f(oe,k,be),Ce===null?ue=oe:Ce.sibling=oe,Ce=oe);return Oe&&tr(D,be),ue}for(oe=o(oe);be<U.length;be++)Ae=z(oe,D,be,U[be],$),Ae!==null&&(n&&Ae.alternate!==null&&oe.delete(Ae.key===null?be:Ae.key),k=f(Ae,k,be),Ce===null?ue=Ae:Ce.sibling=Ae,Ce=Ae);return n&&oe.forEach(function(Fr){return r(D,Fr)}),Oe&&tr(D,be),ue}function he(D,k,U,$){if(U==null)throw Error(a(151));for(var ue=null,Ce=null,oe=k,be=k=0,Ae=null,ke=U.next();oe!==null&&!ke.done;be++,ke=U.next()){oe.index>be?(Ae=oe,oe=null):Ae=oe.sibling;var Fr=P(D,oe,ke.value,$);if(Fr===null){oe===null&&(oe=Ae);break}n&&oe&&Fr.alternate===null&&r(D,oe),k=f(Fr,k,be),Ce===null?ue=Fr:Ce.sibling=Fr,Ce=Fr,oe=Ae}if(ke.done)return i(D,oe),Oe&&tr(D,be),ue;if(oe===null){for(;!ke.done;be++,ke=U.next())ke=K(D,ke.value,$),ke!==null&&(k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke);return Oe&&tr(D,be),ue}for(oe=o(oe);!ke.done;be++,ke=U.next())ke=z(oe,D,be,ke.value,$),ke!==null&&(n&&ke.alternate!==null&&oe.delete(ke.key===null?be:ke.key),k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke);return n&&oe.forEach(function(Lw){return r(D,Lw)}),Oe&&tr(D,be),ue}function ze(D,k,U,$){if(typeof U=="object"&&U!==null&&U.type===O&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case _:e:{for(var ue=U.key;k!==null;){if(k.key===ue){if(ue=U.type,ue===O){if(k.tag===7){i(D,k.sibling),$=h(k,U.props.children),$.return=D,D=$;break e}}else if(k.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Y&&Rs(ue)===k.type){i(D,k.sibling),$=h(k,U.props),pi($,U),$.return=D,D=$;break e}i(D,k);break}else r(D,k);k=k.sibling}U.type===O?($=_s(U.props.children,D.mode,$,U.key),$.return=D,D=$):($=Bo(U.type,U.key,U.props,null,D.mode,$),pi($,U),$.return=D,D=$)}return v(D);case S:e:{for(ue=U.key;k!==null;){if(k.key===ue)if(k.tag===4&&k.stateNode.containerInfo===U.containerInfo&&k.stateNode.implementation===U.implementation){i(D,k.sibling),$=h(k,U.children||[]),$.return=D,D=$;break e}else{i(D,k);break}else r(D,k);k=k.sibling}$=ic(U,D.mode,$),$.return=D,D=$}return v(D);case Y:return U=Rs(U),ze(D,k,U,$)}if(Me(U))return ne(D,k,U,$);if(ge(U)){if(ue=ge(U),typeof ue!="function")throw Error(a(150));return U=ue.call(U),he(D,k,U,$)}if(typeof U.then=="function")return ze(D,k,Ko(U),$);if(U.$$typeof===j)return ze(D,k,Io(D,U),$);Go(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,k!==null&&k.tag===6?(i(D,k.sibling),$=h(k,U),$.return=D,D=$):(i(D,k),$=ac(U,D.mode,$),$.return=D,D=$),v(D)):i(D,k)}return function(D,k,U,$){try{di=0;var ue=ze(D,k,U,$);return ga=null,ue}catch(oe){if(oe===ma||oe===qo)throw oe;var Ce=rn(29,oe,null,D.mode);return Ce.lanes=$,Ce.return=D,Ce}}}var Os=cp(!0),hp=cp(!1),jr=!1;function vc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 Mr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Dr(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var h=o.pending;
vendor: 7,529 bytes, line 9
9return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=Lo(n),Fd(n,null,i),r}return Uo(n,o,r,i),Lo(n)}function mi(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Ht(n,i)}}function _c(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var h=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?h=f=r:f=f.next=r}else h=f=r;i={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var wc=!1;function gi(){if(wc){var n=pa;if(n!==null)throw n}}function yi(n,r,i,o){wc=!1;var h=n.updateQueue;jr=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,w=h.shared.pending;if(w!==null){h.shared.pending=null;var x=w,B=x.next;x.next=null,v===null?f=B:v.next=B,v=x;var H=n.alternate;H!==null&&(H=H.updateQueue,w=H.lastBaseUpdate,w!==v&&(w===null?H.firstBaseUpdate=B:w.next=B,H.lastBaseUpdate=x))}if(f!==null){var K=h.baseState;v=0,H=B=x=null,w=f;do{var P=w.lane&-536870913,z=P!==w.lane;if(z?(Re&P)===P:(o&P)===P){P!==0&&P===da&&(wc=!0),H!==null&&(H=H.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ne=n,he=w;P=r;var ze=i;switch(he.tag){case 1:if(ne=he.payload,typeof ne=="function"){K=ne.call(ze,K,P);break e}K=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=he.payload,P=typeof ne=="function"?ne.call(ze,K,P):ne,P==null)break e;K=g({},K,P);break e;case 2:jr=!0}}P=w.callback,P!==null&&(n.flags|=64,z&&(n.flags|=8192),z=h.callbacks,z===null?h.callbacks=[P]:z.push(P))}else z={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},H===null?(B=H=z,x=K):H=H.next=z,v|=P;if(w=w.next,w===null){if(w=h.shared.pending,w===null)break;z=w,w=z.next,z.next=null,h.lastBaseUpdate=z,h.shared.pending=null}}while(!0);H===null&&(x=K),h.baseState=x,h.firstBaseUpdate=B,h.lastBaseUpdate=H,f===null&&(h.shared.lanes=0),Pr|=v,n.lanes=v,n.memoizedState=K}}function fp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function dp(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)fp(i[n],r)}var ya=C(null),Vo=C(0);function pp(n,r){n=fr,G(Vo,n),G(ya,r),fr=n|r.baseLanes}function Sc(){G(Vo,fr),G(ya,ya.current)}function Ec(){fr=Vo.current,q(ya),q(Vo)}var sn=C(null),wn=null;function Nr(n){var r=n.alternate;G(et,et.current&1),G(sn,n),wn===null&&(r===null||ya.current!==null||r.memoizedState!==null)&&(wn=n)}function Tc(n){G(et,et.current),G(sn,n),wn===null&&(wn=n)}function mp(n){n.tag===22?(G(et,et.current),G(sn,n),wn===null&&(wn=n)):Ur()}function Ur(){G(et,et.current),G(sn,sn.current)}function an(n){q(sn),wn===n&&(wn=null),q(et)}var et=C(0);function Yo(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||kh(i)||jh(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var sr=0,ve=null,Be=null,st=null,Fo=!1,va=!1,xs=!1,Qo=0,vi=0,ba=null,A_=0;function Xe(){throw Error(a(321))}function Rc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!nn(n[i],r[i]))return!1;return!0}function Ac(n,r,i,o,h,f){return sr=f,ve=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,L.H=n===null||n.memoizedState===null?Zp:Hc,xs=!1,f=i(o,h),xs=!1,va&&(f=yp(r,i,o,h)),gp(n),f}function gp(n){L.H=wi;var r=Be!==null&&Be.next!==null;if(sr=0,st=Be=ve=null,Fo=!1,vi=0,ba=null,r)throw Error(a(300));n===null||at||(n=n.dependencies,n!==null&&zo(n)&&(at=!0))}function yp(n,r,i,o){ve=n;var h=0;do{if(va&&(ba=null),vi=0,va=!1,25<=h)throw Error(a(301));if(h+=1,st=Be=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}L.H=Wp,f=r(i,o)}while(va);return f}function O_(){var n=L.H,r=n.useState()[0];return r=typeof r.then=="function"?bi(r):r,n=n.useState()[0],(Be!==null?Be.memoizedState:null)!==n&&(ve.flags|=1024),r}function Oc(){var n=Qo!==0;return Qo=0,n}function xc(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function Cc(n){if(Fo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Fo=!1}sr=0,st=Be=ve=null,va=!1,vi=Qo=0,ba=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ve.memoizedState=st=n:st=st.next=n,st}function tt(){if(Be===null){var n=ve.alternate;n=n!==null?n.memoizedState:null}else n=Be.next;var r=st===null?ve.memoizedState:st.next;if(r!==null)st=r,Be=n;else{if(n===null)throw ve.alternate===null?Error(a(467)):Error(a(310));Be=n,n={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},st===null?ve.memoizedState=st=n:st=st.next=n}return st}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bi(n){var r=vi;return vi+=1,ba===null&&(ba=[]),n=op(ba,n,r),r=ve,(st===null?r.memoizedState:st.next)===null&&(r=r.alternate,L.H=r===null||r.memoizedState===null?Zp:Hc),n}function Xo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return bi(n);if(n.$$typeof===j)return Et(n)}throw Error(a(438,String(n)))}function kc(n){var r=null,i=ve.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var o=ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Jo(),ve.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),o=0;o<n;o++)i[o]=le;return r.index++,i}function ar(n,r){return typeof r=="function"?r(n):r}function Zo(n){var r=tt();return jc(r,Be,n)}function jc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var h=n.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=n.baseState,h===null)n.memoizedState=f;else{r=h.next;var w=v=null,x=null,B=r,H=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Re&K)===K:(sr&K)===K){var P=B.revertLane;if(P===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===da&&(H=!0);else if((sr&P)===P){B=B.next,P===da&&(H=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},x===null?(w=x=K,v=f):x=x.next=K,ve.lanes|=P,Pr|=P;K=B.action,xs&&i(f,K),f=B.hasEagerState?B.eagerState:i(f,K)}else P={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},x===null?(w=x=P,v=f):x=x.next=P,ve.lanes|=K,Pr|=K;B=B.next}while(B!==null&&B!==r);if(x===null?v=f:x.next=w,!nn(f,n.memoizedState)&&(at=!0,H&&(i=pa,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=x,o.lastRenderedState=f}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function Mc(n){var r=tt(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;
vendor: 7,043 bytes, line 9
9var o=i.dispatch,h=i.pending,f=r.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do f=n(f,v.action),v=v.next;while(v!==h);nn(f,r.memoizedState)||(at=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,o]}function vp(n,r,i){var o=ve,h=tt(),f=Oe;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!nn((Be||h).memoizedState,i);if(v&&(h.memoizedState=i,at=!0),h=h.queue,Uc(wp.bind(null,o,h,n),[n]),h.getSnapshot!==r||v||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,_a(9,{destroy:void 0},_p.bind(null,o,h,i,r),null),Ie===null)throw Error(a(349));f||(sr&127)!==0||bp(o,r,i)}return i}function bp(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=ve.updateQueue,r===null?(r=Jo(),ve.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function _p(n,r,i,o){r.value=i,r.getSnapshot=o,Sp(r)&&Ep(n)}function wp(n,r,i){return i(function(){Sp(r)&&Ep(n)})}function Sp(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!nn(n,i)}catch{return!0}}function Ep(n){var r=bs(n,2);r!==null&&Qt(r,n,2)}function Dc(n){var r=Mt();if(typeof n=="function"){var i=n;if(n=i(),xs){Rn(!0);try{i()}finally{Rn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:n},r}function Tp(n,r,i,o){return n.baseState=i,jc(n,Be,typeof o=="function"?o:ar)}function x_(n,r,i,o,h){if(tl(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};L.T!==null?i(!0):f.isTransition=!1,o(f),i=r.pending,i===null?(f.next=r.pending=f,Rp(r,f)):(f.next=i.next,r.pending=i.next=f)}}function Rp(n,r){var i=r.action,o=r.payload,h=n.state;if(r.isTransition){var f=L.T,v={};L.T=v;try{var w=i(h,o),x=L.S;x!==null&&x(v,w),Ap(n,r,w)}catch(B){Nc(n,r,B)}finally{f!==null&&v.types!==null&&(f.types=v.types),L.T=f}}else try{f=i(h,o),Ap(n,r,f)}catch(B){Nc(n,r,B)}}function Ap(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Op(n,r,o)},function(o){return Nc(n,r,o)}):Op(n,r,i)}function Op(n,r,i){r.status="fulfilled",r.value=i,xp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,Rp(n,i)))}function Nc(n,r,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=i,xp(r),r=r.next;while(r!==o)}n.action=null}function xp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Cp(n,r){return r}function kp(n,r){if(Oe){var i=Ie.formState;if(i!==null){e:{var o=ve;if(Oe){if(Ke){t:{for(var h=Ke,f=_n;h.nodeType!==8;){if(!f){h=null;break t}if(h=Sn(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){Ke=Sn(h.nextSibling),o=h.data==="F!";break e}}Cr(o)}o=!1}o&&(r=i[0])}}return i=Mt(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cp,lastRenderedState:r},i.queue=o,i=Qp.bind(null,ve,o),o.dispatch=i,o=Dc(!1),f=Ic.bind(null,ve,!1,o.queue),o=Mt(),h={state:r,dispatch:null,action:n,pending:null},o.queue=h,i=x_.bind(null,ve,h,f,i),h.dispatch=i,o.memoizedState=n,[r,i,!1]}function jp(n){var r=tt();return Mp(r,Be,n)}function Mp(n,r,i){if(r=jc(n,r,Cp)[0],n=Zo(ar)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=bi(r)}catch(v){throw v===ma?qo:v}else o=r;r=tt();var h=r.queue,f=h.dispatch;return i!==r.memoizedState&&(ve.flags|=2048,_a(9,{destroy:void 0},C_.bind(null,h,i),null)),[o,f,n]}function C_(n,r){n.action=r}function Dp(n){var r=tt(),i=Be;if(i!==null)return Mp(r,i,n);tt(),r=r.memoizedState,i=tt();var o=i.queue.dispatch;return i.memoizedState=n,[r,o,!1]}function _a(n,r,i,o){return n={tag:n,create:i,deps:o,inst:r,next:null},r=ve.updateQueue,r===null&&(r=Jo(),ve.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,r.lastEffect=n),n}function Np(){return tt().memoizedState}function Wo(n,r,i,o){var h=Mt();ve.flags|=n,h.memoizedState=_a(1|r,{destroy:void 0},i,o===void 0?null:o)}function el(n,r,i,o){var h=tt();o=o===void 0?null:o;var f=h.memoizedState.inst;Be!==null&&o!==null&&Rc(o,Be.memoizedState.deps)?h.memoizedState=_a(r,f,i,o):(ve.flags|=n,h.memoizedState=_a(1|r,f,i,o))}function Up(n,r){Wo(8390656,8,n,r)}function Uc(n,r){el(2048,8,n,r)}function k_(n){ve.flags|=4;var r=ve.updateQueue;if(r===null)r=Jo(),ve.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function Lp(n){var r=tt().memoizedState;return k_({ref:r,nextImpl:n}),function(){if((De&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Bp(n,r){return el(4,2,n,r)}function Pp(n,r){return el(4,4,n,r)}function zp(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Ip(n,r,i){i=i!=null?i.concat([n]):null,el(4,4,zp.bind(null,r,n),i)}function Lc(){}function Hp(n,r){var i=tt();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&Rc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function qp(n,r){var i=tt();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&Rc(r,o[1]))return o[0];if(o=n(),xs){Rn(!0);try{n()}finally{Rn(!1)}}return i.memoizedState=[o,r],o}function Bc(n,r,i){return i===void 0||(sr&1073741824)!==0&&(Re&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=$m(),ve.lanes|=n,Pr|=n,i)}function $p(n,r,i,o){return nn(i,r)?i:ya.current!==null?(n=Bc(n,i,o),nn(n,r)||(at=!0),n):(sr&42)===0||(sr&1073741824)!==0&&(Re&261930)===0?(at=!0,n.memoizedState=i):(n=$m(),ve.lanes|=n,Pr|=n,r)}function Kp(n,r,i,o,h){var f=F.p;F.p=f!==0&&8>f?f:8;var v=L.T,w={};L.T=w,Ic(n,!1,r,i);try{var x=h(),B=L.S;if(B!==null&&B(w,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=R_(x,o);_i(n,r,H,un(n))}else _i(n,r,o,un(n))}catch(K){_i(n,r,{then:function(){},status:"rejected",reason:K},un())}finally{F.p=f,v!==null&&w.types!==null&&(v.types=w.types),L.T=v}}function j_(){}function Pc(n,r,i,o){if(n.tag!==5)throw Error(a(476));var h=Gp(n).queue;Kp(n,h,r,se,i===null?j_:function(){return Vp(n),i(o)})}function Gp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:se},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Vp(n){var r=Gp(n);r.next===null&&(r=n.alternate.memoizedState),_i(n,r.next.queue,{},un())}function zc(){return Et(Bi)}function Yp(){return tt().memoizedState}function Fp(){return tt().memoizedState}function M_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=un();n=Mr(i);var o=Dr(r,n,i);o!==null&&(Qt(o,r,i),mi(o,r,i)),r={cache:pc()},n.payload=r;return}r=r.return}}function D_(n,r,i){var o=un();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null}
vendor: 11,583 bytes, line 9
9,tl(n)?Jp(r,i):(i=rc(n,r,i,o),i!==null&&(Qt(i,n,o),Xp(i,r,o)))}function Qp(n,r,i){var o=un();_i(n,r,i,o)}function _i(n,r,i,o){var h={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(tl(n))Jp(r,h);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,w=f(v,i);if(h.hasEagerState=!0,h.eagerState=w,nn(w,v))return Uo(n,r,h,0),Ie===null&&No(),!1}catch{}if(i=rc(n,r,h,o),i!==null)return Qt(i,n,o),Xp(i,r,o),!0}return!1}function Ic(n,r,i,o){if(o={lane:2,revertLane:vh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tl(n)){if(r)throw Error(a(479))}else r=rc(n,i,o,2),r!==null&&Qt(r,n,2)}function tl(n){var r=n.alternate;return n===ve||r!==null&&r===ve}function Jp(n,r){va=Fo=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Xp(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Ht(n,i)}}var wi={readContext:Et,use:Xo,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};wi.useEffectEvent=Xe;var Zp={readContext:Et,use:Xo,useCallback:function(n,r){return Mt().memoizedState=[n,r===void 0?null:r],n},useContext:Et,useEffect:Up,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,Wo(4194308,4,zp.bind(null,r,n),i)},useLayoutEffect:function(n,r){return Wo(4194308,4,n,r)},useInsertionEffect:function(n,r){Wo(4,2,n,r)},useMemo:function(n,r){var i=Mt();r=r===void 0?null:r;var o=n();if(xs){Rn(!0);try{n()}finally{Rn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=Mt();if(i!==void 0){var h=i(r);if(xs){Rn(!0);try{i(r)}finally{Rn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=D_.bind(null,ve,n),[o.memoizedState,n]},useRef:function(n){var r=Mt();return n={current:n},r.memoizedState=n},useState:function(n){n=Dc(n);var r=n.queue,i=Qp.bind(null,ve,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:Lc,useDeferredValue:function(n,r){var i=Mt();return Bc(i,n,r)},useTransition:function(){var n=Dc(!1);return n=Kp.bind(null,ve,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=ve,h=Mt();if(Oe){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ie===null)throw Error(a(349));(Re&127)!==0||bp(o,r,i)}h.memoizedState=i;var f={value:i,getSnapshot:r};return h.queue=f,Up(wp.bind(null,o,f,n),[n]),o.flags|=2048,_a(9,{destroy:void 0},_p.bind(null,o,f,i,r),null),i},useId:function(){var n=Mt(),r=Ie.identifierPrefix;if(Oe){var i=zn,o=Pn;i=(o&~(1<<32-At(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Qo++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=A_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:zc,useFormState:kp,useActionState:kp,useOptimistic:function(n){var r=Mt();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Ic.bind(null,ve,!0,i),i.dispatch=r,[n,r]},useMemoCache:kc,useCacheRefresh:function(){return Mt().memoizedState=M_.bind(null,ve)},useEffectEvent:function(n){var r=Mt(),i={impl:n};return r.memoizedState=i,function(){if((De&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Hc={readContext:Et,use:Xo,useCallback:Hp,useContext:Et,useEffect:Uc,useImperativeHandle:Ip,useInsertionEffect:Bp,useLayoutEffect:Pp,useMemo:qp,useReducer:Zo,useRef:Np,useState:function(){return Zo(ar)},useDebugValue:Lc,useDeferredValue:function(n,r){var i=tt();return $p(i,Be.memoizedState,n,r)},useTransition:function(){var n=Zo(ar)[0],r=tt().memoizedState;return[typeof n=="boolean"?n:bi(n),r]},useSyncExternalStore:vp,useId:Yp,useHostTransitionStatus:zc,useFormState:jp,useActionState:jp,useOptimistic:function(n,r){var i=tt();return Tp(i,Be,n,r)},useMemoCache:kc,useCacheRefresh:Fp};Hc.useEffectEvent=Lp;var Wp={readContext:Et,use:Xo,useCallback:Hp,useContext:Et,useEffect:Uc,useImperativeHandle:Ip,useInsertionEffect:Bp,useLayoutEffect:Pp,useMemo:qp,useReducer:Mc,useRef:Np,useState:function(){return Mc(ar)},useDebugValue:Lc,useDeferredValue:function(n,r){var i=tt();return Be===null?Bc(i,n,r):$p(i,Be.memoizedState,n,r)},useTransition:function(){var n=Mc(ar)[0],r=tt().memoizedState;return[typeof n=="boolean"?n:bi(n),r]},useSyncExternalStore:vp,useId:Yp,useHostTransitionStatus:zc,useFormState:Dp,useActionState:Dp,useOptimistic:function(n,r){var i=tt();return Be!==null?Tp(i,Be,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:kc,useCacheRefresh:Fp};Wp.useEffectEvent=Lp;function qc(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:g({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var $c={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=un(),h=Mr(o);h.payload=r,i!=null&&(h.callback=i),r=Dr(n,h,o),r!==null&&(Qt(r,n,o),mi(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=un(),h=Mr(o);h.tag=1,h.payload=r,i!=null&&(h.callback=i),r=Dr(n,h,o),r!==null&&(Qt(r,n,o),mi(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=un(),o=Mr(i);o.tag=2,r!=null&&(o.callback=r),r=Dr(n,o,i),r!==null&&(Qt(r,n,i),mi(r,n,i))}};function em(n,r,i,o,h,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!oi(i,o)||!oi(h,f):!0}function tm(n,r,i,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,o),r.state!==n&&$c.enqueueReplaceState(r,r.state,null)}function Cs(n,r){var i=r;if("ref"in r){i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}if(n=n.defaultProps){i===r&&(i=g({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function nm(n){Do(n)}function rm(n){console.error(n)}function sm(n){Do(n)}function nl(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function am(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Kc(n,r,i){return i=Mr(i),i.tag=3,i.payload={element:null},i.callback=function(){nl(n,r)},i}function im(n){return n=Mr(n),n.tag=3,n}function om(n,r,i,o){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;n.payload=function(){return h(f)},n.callback=function(){am(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){am(r,i,o),typeof h!="function"&&(zr===null?zr=new Set([this]):zr.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function N_(n,r,i,o,h){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&fa(r,i,h,!0),i=sn.current,i!==null){switch(i.tag){case 31:case 13:return wn===null?pl():i.alternate===null&&Ze===0&&(Ze=3),i.flags&=-257,i.flags|=65536,i.lanes=h,o===$o?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),mh(n,o,h)),!1;case 22:return i.flags|=65536,o===$o?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([o]):i.add(o)),mh(n,o,h)),!1}throw Error(a(435,i.tag))}return mh(n,o,h),pl(),!1}if(Oe)return r=sn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==uc&&(n=Error(a(422),{cause:o}),ci(yn(n,i)))):(o!==uc&&(r=Error(a(423),{cause:o}),ci(yn(r,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=yn(o,i),h=Kc(n.stateNode,o,h),_c(n,h),Ze!==4&&(Ze=2)),!1;var f=Error(a(520),{cause:o});if(f=yn(f,i),Ci===null?Ci=[f]:Ci.push(f),Ze!==4&&(Ze=2),r===null)return!0;o=yn(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=Kc(i.stateNode,o,n),_c(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(zr===null||!zr.has(f))))return i.flags|=65536,h&=-h,i.lanes|=h,h=im(h),om(h,n,i,o),_c(i,h),!1}i=i.return}while(i!==null);return!1}var Gc=Error(a(461)),at=!1;function Tt(n,r,i,o){r.child=n===null?hp(r,null,i,o):Os(r,n.child,i,o)}function lm(n,r,i,o,h){i=i.render;var f=r.ref;if("ref"in o){var v={};for(var w in o)w!=="ref"&&(v[w]=o[w])}else v=o;return Es(r),o=Ac(n,r,i,v,f,h),w=Oc(),n!==null&&!at?(xc(n,r,h),ir(n,r,h)):(Oe&&w&&oc(r),r.flags|=1,Tt(n,r,o,h),r.child)}function um(n,r,i,o,h){if(n===null){var f=i.type;return typeof f=="function"&&!sc(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,cm(n,r,f,o,h)):(n=Bo(i.type,null,o,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!Wc(n,h)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:oi,i(v,o)&&n.ref===r.ref)return ir(n,r,h)}return r.flags|=1,n=er(f,o),n.ref=r.ref,n.return=r,r.child=n}function cm(n,r,i,o,h){if(n!==null){var f=n.memoizedProps;if(oi(f,o)&&n.ref===r.ref)if(at=!1,r.pendingProps=o=f,Wc(n,h))(n.flags&131072)!==0&&(at=!0);else return r.lanes=n.lanes,ir(n,r,h)}return Vc(n,r,i,o,h)}function hm(n,r,i,o){var h=o.children,f=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(o=r.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return fm(n,r,f,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ho(r,f!==null?f.cachePool:null),f!==null?pp(r,f):Sc(),mp(r);else return o=r.lanes=536870912,fm(n,r,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(Ho(r,f.cachePool),pp(r,f),Ur(),r.memoizedState=null):(n!==null&&Ho(r,null),Sc(),Ur());return Tt(n,r,h,i),r.child}function Si(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function fm(n,r,i,o,h){var f=gc();return f=f===null?null:{parent:rt._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&Ho(r,null),Sc(),mp(r),n!==null&&fa(n,r,o,!0),r.childLanes=h,null}function rl(n,r){return r=al({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function dm(n,r,i){return Os(r,n.child,null,i),n=rl(r,r.pendingProps),n.flags|=2,an(r),r.memoizedState=null,n}function U_(n,r,i){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Oe){if(o.mode==="hidden")return n=rl(r,o),r.lanes=536870912,Si(null,n);if(Tc(r),(n=Ke)?(n=Rg(n,_n),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Or!==null?{id:Pn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Jd(n),i.return=r,r.child=i,St=r,Ke=null)):n=null,n===null)throw Cr(r);return r.lanes=536870912,null}return rl(r,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(Tc(r),h)if(r.flags&256)r.flags&=-257,r=dm(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(at||fa(n,r,i,!1),h=(i&n.childLanes)!==0,at||h){if(o=Ie,o!==null&&(v=qt(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,bs(n,v),Qt(o,n,v),Gc;pl(),r=dm(n,r,i)}
vendor: 7,232 bytes, line 9
9else n=f.treeContext,Ke=Sn(v.nextSibling),St=r,Oe=!0,xr=null,_n=!1,n!==null&&Wd(r,n),r=rl(r,o),r.flags|=4096;return r}return n=er(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function sl(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Vc(n,r,i,o,h){return Es(r),i=Ac(n,r,i,o,void 0,h),o=Oc(),n!==null&&!at?(xc(n,r,h),ir(n,r,h)):(Oe&&o&&oc(r),r.flags|=1,Tt(n,r,i,h),r.child)}function pm(n,r,i,o,h,f){return Es(r),r.updateQueue=null,i=yp(r,o,i,h),gp(n),o=Oc(),n!==null&&!at?(xc(n,r,f),ir(n,r,f)):(Oe&&o&&oc(r),r.flags|=1,Tt(n,r,i,f),r.child)}function mm(n,r,i,o,h){if(Es(r),r.stateNode===null){var f=la,v=i.contextType;typeof v=="object"&&v!==null&&(f=Et(v)),f=new i(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=$c,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},vc(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?Et(v):la,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(qc(r,i,v,o),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&$c.enqueueReplaceState(f,f.state,null),yi(r,o,f,h),gi(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){f=r.stateNode;var w=r.memoizedProps,x=Cs(i,w);f.props=x;var B=f.context,H=i.contextType;v=la,typeof H=="object"&&H!==null&&(v=Et(H));var K=i.getDerivedStateFromProps;H=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||B!==v)&&tm(r,f,o,v),jr=!1;var P=r.memoizedState;f.state=P,yi(r,o,f,h),gi(),B=r.memoizedState,w||P!==B||jr?(typeof K=="function"&&(qc(r,i,K,o),B=r.memoizedState),(x=jr||em(r,i,x,o,P,B,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=B),f.props=o,f.state=B,f.context=v,o=x):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,bc(n,r),v=r.memoizedProps,H=Cs(i,v),f.props=H,K=r.pendingProps,P=f.context,B=i.contextType,x=la,typeof B=="object"&&B!==null&&(x=Et(B)),w=i.getDerivedStateFromProps,(B=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==K||P!==x)&&tm(r,f,o,x),jr=!1,P=r.memoizedState,f.state=P,yi(r,o,f,h),gi();var z=r.memoizedState;v!==K||P!==z||jr||n!==null&&n.dependencies!==null&&zo(n.dependencies)?(typeof w=="function"&&(qc(r,i,w,o),z=r.memoizedState),(H=jr||em(r,i,H,o,P,z,x)||n!==null&&n.dependencies!==null&&zo(n.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,z,x),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,z,x)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=z),f.props=o,f.state=z,f.context=x,o=H):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=1024),o=!1)}return f=o,sl(n,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&o?(r.child=Os(r,n.child,null,h),r.child=Os(r,null,i,h)):Tt(n,r,i,h),r.memoizedState=f.state,n=r.child):n=ir(n,r,h),n}function gm(n,r,i,o){return ws(),r.flags|=256,Tt(n,r,i,o),r.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fc(n){return{baseLanes:n,cachePool:ap()}}function Qc(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=ln),n}function ym(n,r,i){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(et.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Oe){if(h?Nr(r):Ur(),(n=Ke)?(n=Rg(n,_n),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Or!==null?{id:Pn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Jd(n),i.return=r,r.child=i,St=r,Ke=null)):n=null,n===null)throw Cr(r);return jh(n)?r.lanes=32:r.lanes=536870912,null}var w=o.children;return o=o.fallback,h?(Ur(),h=r.mode,w=al({mode:"hidden",children:w},h),o=_s(o,h,i,null),w.return=r,o.return=r,w.sibling=o,r.child=w,o=r.child,o.memoizedState=Fc(i),o.childLanes=Qc(n,v,i),r.memoizedState=Yc,Si(null,o)):(Nr(r),Jc(r,w))}var x=n.memoizedState;if(x!==null&&(w=x.dehydrated,w!==null)){if(f)r.flags&256?(Nr(r),r.flags&=-257,r=Xc(n,r,i)):r.memoizedState!==null?(Ur(),r.child=n.child,r.flags|=128,r=null):(Ur(),w=o.fallback,h=r.mode,o=al({mode:"visible",children:o.children},h),w=_s(w,h,i,null),w.flags|=2,o.return=r,w.return=r,o.sibling=w,r.child=o,Os(r,n.child,null,i),o=r.child,o.memoizedState=Fc(i),o.childLanes=Qc(n,v,i),r.memoizedState=Yc,r=Si(null,o));else if(Nr(r),jh(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var B=v.dgst;v=B,o=Error(a(419)),o.stack="",o.digest=v,ci({value:o,source:null,stack:null}),r=Xc(n,r,i)}else if(at||fa(n,r,i,!1),v=(i&n.childLanes)!==0,at||v){if(v=Ie,v!==null&&(o=qt(v,i),o!==0&&o!==x.retryLane))throw x.retryLane=o,bs(n,o),Qt(v,n,o),Gc;kh(w)||pl(),r=Xc(n,r,i)}else kh(w)?(r.flags|=192,r.child=n.child,r=null):(n=x.treeContext,Ke=Sn(w.nextSibling),St=r,Oe=!0,xr=null,_n=!1,n!==null&&Wd(r,n),r=Jc(r,o.children),r.flags|=4096);return r}return h?(Ur(),w=o.fallback,h=r.mode,x=n.child,B=x.sibling,o=er(x,{mode:"hidden",children:o.children}),o.subtreeFlags=x.subtreeFlags&65011712,B!==null?w=er(B,w):(w=_s(w,h,i,null),w.flags|=2),w.return=r,o.return=r,o.sibling=w,r.child=o,Si(null,o),o=r.child,w=n.child.memoizedState,w===null?w=Fc(i):(h=w.cachePool,h!==null?(x=rt._currentValue,h=h.parent!==x?{parent:x,pool:x}:h):h=ap(),w={baseLanes:w.baseLanes|i,cachePool:h}),o.memoizedState=w,o.childLanes=Qc(n,v,i),r.memoizedState=Yc,Si(n.child,o)):(Nr(r),i=n.child,n=i.sibling,i=er(i,{mode:"visible",children:o.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}
vendor: 4,479 bytes, line 9
9function Jc(n,r){return r=al({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function al(n,r){return n=rn(22,n,null,r),n.lanes=0,n}function Xc(n,r,i){return Os(r,n.child,null,i),n=Jc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function vm(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),fc(n.return,r,i)}function Zc(n,r,i,o,h,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=h,v.treeForkCount=f)}function bm(n,r,i){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=et.current,w=(v&2)!==0;if(w?(v=v&1|2,r.flags|=128):v&=1,G(et,v),Tt(n,r,o,i),o=Oe?ui:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&vm(n,i,r);else if(n.tag===19)vm(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(i=r.child,h=null;i!==null;)n=i.alternate,n!==null&&Yo(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=r.child,r.child=null):(h=i.sibling,i.sibling=null),Zc(r,!1,h,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&Yo(n)===null){r.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}Zc(r,!0,i,null,f,o);break;case"together":Zc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function ir(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),Pr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(fa(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=er(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=er(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function Wc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&zo(n)))}function L_(n,r,i){switch(r.tag){case 3:de(r,r.stateNode.containerInfo),kr(r,rt,n.memoizedState.cache),ws();break;case 27:case 5:Bt(r);break;case 4:de(r,r.stateNode.containerInfo);break;case 10:kr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Tc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(Nr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?ym(n,r,i):(Nr(r),n=ir(n,r,i),n!==null?n.sibling:null);Nr(r);break;case 19:var h=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(fa(n,r,i,!1),o=(i&r.childLanes)!==0),h){if(o)return bm(n,r,i);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),G(et,et.current),o)break;return null;case 22:return r.lanes=0,hm(n,r,i,r.pendingProps);case 24:kr(r,rt,n.memoizedState.cache)}return ir(n,r,i)}function _m(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)at=!0;else{if(!Wc(n,i)&&(r.flags&128)===0)return at=!1,L_(n,r,i);at=(n.flags&131072)!==0}else at=!1,Oe&&(r.flags&1048576)!==0&&Zd(r,ui,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Rs(r.elementType),r.type=n,typeof n=="function")sc(n)?(o=Cs(n,o),r.tag=1,r=mm(null,r,n,o,i)):(r.tag=0,r=Vc(null,r,n,o,i));else{if(n!=null){var h=n.$$typeof;if(h===N){r.tag=11,r=lm(null,r,n,o,i);break e}else if(h===I){r.tag=14,r=um(null,r,n,o,i);break e}}throw r=qe(n)||n,Error(a(306,r,""))}}return r;case 0:return Vc(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,h=Cs(o,r.pendingProps),mm(n,r,o,h,i);case 3:e:{if(de(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,bc(n,r),yi(r,o,null,i);var v=r.memoizedState;if(o=v.cache,kr(r,rt,o),o!==f.cache&&dc(r,[rt],i,!0),gi(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=gm(n,r,o,i);break e}else if(o!==h){h=yn(Error(a(424)),r),ci(h),r=gm(n,r,o,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ke=Sn(n.firstChild),St=r,Oe=!0,xr=null,_n=!0,i=hp(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ws(),o===h){r=ir(n,r,i);break e}Tt(n,r,o,i)}r=r.child}return r;case 26:return sl(n,r),n===null?(i=jg(r.type,null,r.pendingProps,null))?r.memoizedState=i:Oe||(i=r.type,n=r.pen
vendor: 4,917 bytes, line 9
9dingProps,o=wl(ce.current).createElement(i),o[wt]=r,o[$t]=n,Rt(o,i,n),mt(o),r.stateNode=o):r.memoizedState=jg(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Bt(r),n===null&&Oe&&(o=r.stateNode=xg(r.type,r.pendingProps,ce.current),St=r,_n=!0,h=Ke,$r(r.type)?(Mh=h,Ke=Sn(o.firstChild)):Ke=h),Tt(n,r,r.pendingProps.children,i),sl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Oe&&((h=o=Ke)&&(o=fw(o,r.type,r.pendingProps,_n),o!==null?(r.stateNode=o,St=r,Ke=Sn(o.firstChild),_n=!1,h=!0):h=!1),h||Cr(r)),Bt(r),h=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,Oh(h,f)?o=null:v!==null&&Oh(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=Ac(n,r,O_,null,null,i),Bi._currentValue=h),sl(n,r),Tt(n,r,o,i),r.child;case 6:return n===null&&Oe&&((n=i=Ke)&&(i=dw(i,r.pendingProps,_n),i!==null?(r.stateNode=i,St=r,Ke=null,n=!0):n=!1),n||Cr(r)),null;case 13:return ym(n,r,i);case 4:return de(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Os(r,null,o,i):Tt(n,r,o,i),r.child;case 11:return lm(n,r,r.type,r.pendingProps,i);case 7:return Tt(n,r,r.pendingProps,i),r.child;case 8:return Tt(n,r,r.pendingProps.children,i),r.child;case 12:return Tt(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,kr(r,r.type,o.value),Tt(n,r,o.children,i),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Es(r),h=Et(h),o=o(h),r.flags|=1,Tt(n,r,o,i),r.child;case 14:return um(n,r,r.type,r.pendingProps,i);case 15:return cm(n,r,r.type,r.pendingProps,i);case 19:return bm(n,r,i);case 31:return U_(n,r,i);case 22:return hm(n,r,i,r.pendingProps);case 24:return Es(r),o=Et(rt),n===null?(h=gc(),h===null&&(h=Ie,f=pc(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=i),h=f),r.memoizedState={parent:o,cache:h},vc(r),kr(r,rt,h)):((n.lanes&i)!==0&&(bc(n,r),yi(r,null,null,i),gi()),h=n.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),kr(r,rt,o)):(o=f.cache,kr(r,rt,o),o!==h.cache&&dc(r,[rt],i,!0))),Tt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function or(n){n.flags|=4}function eh(n,r,i,o,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Ym())n.flags|=8192;else throw As=$o,yc}else n.flags&=-16777217}function wm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Lg(r))if(Ym())n.flags|=8192;else throw As=$o,yc}function il(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ot():536870912,n.lanes|=r,Ta|=r)}function Ei(n,r){if(!Oe)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function Ge(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function B_(n,r,i){var o=r.pendingProps;switch(lc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(r),null;case 1:return Ge(r),null;case 3:return i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),rr(rt),xe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ha(r)?or(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,cc())),Ge(r),null;case 26:var h=r.type,f=r.memoizedState;return n===null?(or(r),f!==null?(Ge(r),wm(r,f)):(Ge(r),eh(r,h,null,o,i))):f?f!==n.memoizedState?(or(r),Ge(r),wm(r,f)):(Ge(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&or(r),Ge(r),eh(r,h,n,o,i)),null;case 27:if(Pt(r),i=ce.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&or(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ge(r),null}n=J.current,ha(r)?ep(r):(n=xg(h,o,i),r.stateNode=n,or(r))}return Ge(r),null;case 5:if(Pt(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&or(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ge(r),null}if(f=J.current,ha(r))ep(r);else{var v=wl(ce.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}f[wt]=r,f[$t]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=f;e:switch(Rt(f,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&or(r)}}return Ge(r),eh(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&or(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=ce.current,ha(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,h=St,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}n[wt]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||yg(n.nodeValue,i)),n||Cr(r,!0)}else n=wl(n).createTextNode(o),n[wt]=r,r.stateNode=n}return Ge(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=ha(r),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[wt]=r}else ws(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ge(r),n=!1}else i=cc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(an(r),r):(an(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Ge(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=ha(r),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[wt]=r}else ws(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ge(r),h=!1}else h=cc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(an(r),r):(an(r),null)}return an(r),(r.flags&128)!==0?(r.lanes=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),il(r,r.updateQueue),Ge(r),null);case 4:return xe(),n===null&&Sh(r.stateNode.containerInfo),Ge(r),null;case 10:return rr(r.type),Ge(r),null;case 19:if(q(et),o=r.memoizedState,o===null)return Ge(r),null;if(h=(r.flags&128)!==0,f=o.rendering,f===null)if(h)Ei(o,!1);else{if(Ze!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=Yo(n),f!==null){for(r.flags|=128,Ei(o,!1),n=f.updateQueue,r.updateQueue=n,il(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)Qd(i,n),i=i.sibling;return G(et,et.current&1|2),Oe&&tr(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&dt()>hl&&(r.flags|=128,h=!0,Ei(o,!1),r.lanes=4194304)}else{if(!h)if(n=Yo(f),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,il(r,n),Ei(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Oe)return Ge(r),null}else 2*dt()-o.renderingStartTime>hl&&i!==536870912&&(r.flags|=128,h=!0,Ei(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(n=o.last,n!==null?n.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=dt(),n.sibling=null,i=et.current,G(et,h?i&1|2:i&1),Oe&&tr(r,o.treeForkCount),n):(Ge(r),null);case 22:case 23:return an(r),Ec(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(i&536870912)!==0&&(r.flags&128)===0&&(Ge(r),r.subtreeFlags&6&&(r.flags|=8192)):Ge(r),i=r.updateQueue,i!==null&&il(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048),n!==null&&q(Ts),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),rr(rt),Ge(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function P_(n,r){switch(lc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return rr(rt),xe(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Pt(r),null;case 31:if(r.memoizedState!==null){if(an(r),r.alternate===null)throw Error(a(340));ws()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(an(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));ws()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return q(et),null;case 4:return xe(),null;case 10:return rr(r.type),null;case 22:case 23:return an(r),Ec(),n!==null&&q(Ts),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return rr(rt),null;case 25:return null;default:return null}}function Sm(n,r){switch(lc(r),r.tag){case 3:rr(rt),xe();break;case 26:case 27:case 5:Pt(r);break;case 4:xe();break;case 31:r.memoizedState!==null&&an(r);break;case 13:an(r);break;case 19:q(et);break;case 10:rr(r.type);break;case 22:case 23:an(r),Ec(),n!==null&&q(Ts);break;case 24:rr(rt)}}function Ti(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var h=o.next;i=h;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==h)}}catch(w){Ue(r,r.return,w)}}function Lr(n,r,i){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&n)===n){var v=o.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,h=r;var x=i,B=w;try{B()}catch(H){Ue(h,x,H)}}}o=o.next}while(o!==f)}}catch(H){Ue(r,r.return,H)}}function Em(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{dp(r,i)}catch(o){Ue(n,n.return,o)}}}function Tm(n,r,i){i.props=Cs(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,839 bytes, line 9
9try{i.componentWillUnmount()}catch(o){Ue(n,r,o)}}function Ri(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(h){Ue(n,r,h)}}function In(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(h){Ue(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){Ue(n,r,h)}else i.current=null}function Rm(n){var r=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(h){Ue(n,n.return,h)}}function th(n,r,i){try{var o=n.stateNode;iw(o,n.type,i,r),o[$t]=r}catch(h){Ue(n,n.return,h)}}function Am(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&$r(n.type)||n.tag===4}function nh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Am(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&&$r(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 rh(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Zn));else if(o!==4&&(o===27&&$r(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(rh(n,r,i),n=n.sibling;n!==null;)rh(n,r,i),n=n.sibling}function ol(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(o!==4&&(o===27&&$r(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(ol(n,r,i),n=n.sibling;n!==null;)ol(n,r,i),n=n.sibling}function Om(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Rt(r,o,i),r[wt]=n,r[$t]=i}catch(f){Ue(n,n.return,f)}}var lr=!1,it=!1,sh=!1,xm=typeof WeakSet=="function"?WeakSet:Set,gt=null;function z_(n,r){if(n=n.containerInfo,Rh=xl,n=Id(n),Xu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,w=-1,x=-1,B=0,H=0,K=n,P=null;t:for(;;){for(var z;K!==i||h!==0&&K.nodeType!==3||(w=v+h),K!==f||o!==0&&K.nodeType!==3||(x=v+o),K.nodeType===3&&(v+=K.nodeValue.length),(z=K.firstChild)!==null;)P=K,K=z;for(;;){if(K===n)break t;if(P===i&&++B===h&&(w=v),P===f&&++H===o&&(x=v),(z=K.nextSibling)!==null)break;K=P,P=K.parentNode}K=z}i=w===-1||x===-1?null:{start:w,end:x}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ah={focusedElem:n,selectionRange:i},xl=!1,gt=r;gt!==null;)if(r=gt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,gt=n;else for(;gt!==null;){switch(r=gt,f=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,h=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ne=Cs(i.type,h);n=o.getSnapshotBeforeUpdate(ne,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(he){Ue(i,i.return,he)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)Ch(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ch(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,gt=n;break}gt=r.return}}function Cm(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:cr(n,i),o&4&&Ti(5,i);break;case 1:if(cr(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){Ue(i,i.return,v)}else{var h=Cs(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ue(i,i.return,v)}}o&64&&Em(i),o&512&&Ri(i,i.return);break;case 3:if(cr(n,i),o&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{dp(n,r)}catch(v){Ue(i,i.return,v)}}break;case 27:r===null&&o&4&&Om(i);case 26:case 5:cr(n,i),r===null&&o&4&&Rm(i),o&512&&Ri(i,i.return);break;case 12:cr(n,i);break;case 31:cr(n,i),o&4&&Mm(n,i);break;case 13:cr(n,i),o&4&&Dm(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=F_.bind(null,i),pw(n,i))));break;case 22:if(o=i.memoizedState!==null||lr,!o){r=r!==null&&r.memoizedState!==null||it,h=lr;var f=it;lr=o,(it=r)&&!f?hr(n,i,(i.subtreeFlags&8772)!==0):cr(n,i),lr=h,it=f}break;case 30:break;default:cr(n,i)}}function km(n){var r=n.alternate;r!==null&&(n.alternate=null,km(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Nu(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 Ye=null,Gt=!1;function ur(n,r,i){for(i=i.child;i!==null;)jm(n,r,i),i=i.sibling}function jm(n,r,i){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(fs,i)}catch{}switch(i.tag){case 26:it||In(i,r),ur(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:it||In(i,r);var o=Ye,h=Gt;$r(i.type)&&(Ye=i.stateNode,Gt=!1),ur(n,r,i),Ni(i.stateNode),Ye=o,Gt=h;break;case 5:it||In(i,r);case 6:if(o=Ye,h=Gt,Ye=null,ur(n,r,i),Ye=o,Gt=h,Ye!==null)if(Gt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(i.stateNode)}catch(f){Ue(i,r,f)}else try{Ye.removeChild(i.stateNode)}catch(f){Ue(i,r,f)}break;case 18:Ye!==null&&(Gt?(n=Ye,Eg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Ma(n)):Eg(Ye,i.stateNode));break;case 4:o=Ye,h=Gt,Ye=i.stateNode.containerInfo,Gt=!0,ur(n,r,i),Ye=o,Gt=h;break;case 0:case 11:case 14:case 15:Lr(2,i,r),it||Lr(4,i,r),ur(n,r,i);break;case 1:it||(In(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Tm(i,r,o)),ur(n,r,i);break;case 21:ur(n,r,i);break;case 22:it=(o=it)||i.memoizedState!==null,ur(n,r,i),it=o;break;default:ur(n,r,i)}}function Mm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ma(n)}catch(i){Ue(r,r.return,i)}}}function Dm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ma(n)}catch(i){Ue(r,r.return,i)}}function I_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new xm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new xm),r;default:throw Error(a(435,n.tag))}}function ll(n,r){var i=I_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var h=Q_.bind(null,n,o);o.then(h,h)}})}function Vt(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var h=i[o],f=n,v=r,w=v;e:for(;w!==null;){switch(w.tag){case 27:if($r(w.type)){Ye=w.stateNode,Gt=!1;break e}break;case 5:Ye=w.stateNode,Gt=!1;break e;case 3:case 4:Ye=w.stateNode.containerInfo,Gt=!0;break e}w=w.return}if(Ye===null)throw Error(a(160));jm(f,v,h),Ye=null,Gt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Nm(r,n),r=r.sibling}var xn=null;function Nm(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Vt(r,n),Yt(n),o&4&&(Lr(3,n,n.return),Ti(3,n),Lr(5,n,n.return));break;case 1:Vt(r,n),Yt(n),o&512&&(it||i===null||In(i,i.return)),o&64&&lr&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var h=xn;if(Vt(r,n),Yt(n),o&512&&(it||i===null||In(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Za]||f[wt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),Rt(f,o,i),f[wt]=n,mt(f),o=f;break e;case"link":var v=Ng("link","href",h).get(o+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(f=v[w],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break t}}f=h.createElement(o),Rt(f,o,i),h.head.appendChild(f);break;case"meta":if(v=Ng("meta","content",h).get(o+(i.content||""))){for(w=0;w<v.length;w++)if(f=v[w],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break t}}f=h.createElement(o),Rt(f,o,i),h.head.appendChild(f);break;default:throw Error(a(468,o))}f[wt]=n,mt(f),o=f}n.stateNode=o}else Ug(h,n.type,n.stateNode);else n.stateNode=Dg(h,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?Ug(h,n.type,n.stateNode):Dg(h,o,n.memoizedProps)):o===null&&n.stateNode!==null&&th(n,n.memoizedProps,i.memoizedProps)}break;case 27:Vt(r,n),Yt(n),o&512&&(it||i===null||In(i,i.return)),i!==null&&o&4&&th(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Vt(r,n),Yt(n),o&512&&(it||i===null||In(i,i.return)),n.flags&32){h=n.stateNode;try{ta(h,"")}catch(ne){Ue(n,n.return,ne)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,th(n,h,i!==null?i.memoizedProps:h)),o&1024&&(sh=!0);break;case 6:if(Vt(r,n),Yt(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(ne){Ue(n,n.return,ne)}}break;case 3:if(Tl=null,h=xn,xn=Sl(r.containerInfo),Vt(r,n),xn=h,Yt(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Ma(r.containerInfo)}catch(ne){Ue(n,n.return,ne)}sh&&(sh=!1,Um(n));break;case 4:o=xn,xn=Sl(n.stateNode.containerInfo),Vt(r,n),Yt(n),xn=o;break;case 12:Vt(r,n),Yt(n);break;case 31:Vt(r,n),Yt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 13:Vt(r,n),Yt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(cl=dt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 22:h=n.memoizedState!==null;var x=i!==null&&i.memoizedState!==null,B=lr,H=it;if(lr=B||h,it=H||x,Vt(r,n),it=H,lr=B,Yt(n),o&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(i===null||x||lr||it||ks(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){x=i=r;try{if(f=x.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=x.stateNode;var K=x.memoizedProps.style,P=K!=null&&K.hasOwnProperty("display")?K.display:null;w.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(ne){Ue(x,x.return,ne)}}}else if(r.tag===6){if(i===null){x=r;try{x.stateNode.nodeValue=h?"":x.memoizedProps}catch(ne){Ue(x,x.return,ne)}}}else if(r.tag===18){if(i===null){x=r;try{var z=x.stateNode;h?Tg(z,!0):Tg(x.stateNode,!1)}catch(ne){Ue(x,x.return,ne)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,ll(n,i))));break;case 19:Vt(r,n),Yt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 30:break;case 21:break;default:Vt(r,n),Yt(n)}}function Yt(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(Am(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,f=nh(n);ol(n,f,h);break;case 5:var v=i.stateNode;i.flags&32&&(ta(v,""),i.flags&=-33);var w=nh(n);ol(n,w,v);break;case 3:case 4:var x=i.stateNode.containerInfo,B=nh(n);rh(n,B,x);break;default:throw Error(a(161))}}catch(H){Ue(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Um(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Um(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function cr(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Cm(n,r.alternate,r),r=r.sibling}function ks(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Lr(4,r,r.return),ks(r);break;case 1:In(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&Tm(r,r.return,i),ks(r);break;case 27:Ni(r.stateNode);case 26:case 5:In(r,r.return),ks(r);break;case 22:r.memoizedState===null&&ks(r);break;case 30:ks(r);break;default:ks(r)}n=n.sibling}}function hr(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:hr(h,f,i),Ti(4,f);break;case 1:if(hr(h,f,i),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(B){Ue(o,o.return,B)}if(o=f,h=o.updateQueue,h!==null){var w=o.stateNode;try{var x=h.shared.hiddenCallbacks;if(x!==null)for(h.shared.hiddenCallbacks=null,h=0;h<x.length;h++)fp(x[h],w)}catch(B){Ue(o,o.return,B)}}i&&v&64&&Em(f),Ri(f,f.return);break;case 27:Om(f);case 26:case 5:hr(h,f,i),i&&o===null&&v&4&&Rm(f),Ri(f,f.return);break;case 12:hr(h,f,i);break;case 31:hr(h,f,i),i&&v&4&&Mm(h,f);break;case 13:hr(h,f,i),i&&v&4&&Dm(h,f);break;case 22:f.memoizedState===null&&hr(h,f,i),Ri(f,f.return);break;case 30:break;default:hr(h,f,i)}r=r.sibling}}function ah(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&hi(i))}function ih(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&hi(n))}function Cn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Lm(n,r,i,o),r=r.sibling}function Lm(n,r,i,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Cn(n,r,i,o),h&2048&&Ti(9,r);break;case 1:Cn(n,r,i,o);break;case 3:Cn(n,r,i,o),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&hi(n)));break;case 12:if(h&2048){Cn(n,r,i,o),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,w=f.onPostCommit;typeof w=="function"&&w(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(x){Ue(r,r.return,x)}}else Cn(n,r,i,o);break;case 31:Cn(n,r,i,o);break;case 13:Cn(n,r,i,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?Cn(n,r,i,o):Ai(n,r):f._visibility&2?Cn(n,r,i,o):(f._visibility|=2,wa(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&ah(v,r);break;case 24:Cn(n,r,i,o),h&2048&&ih(r.alternate,r);break;default:Cn(n,r,i,o)}}function wa(n,r,i,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,w=i,x=o,B=v.flags;switch(v.tag){case 0:case 11:case 15:wa(f,v,w,x,h),Ti(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?wa(f,v,w,x,h):Ai(f,v):(H._visibility|=2,wa(f,v,w,x,h)),h&&B&2048&&ah(v.alternate,v);break;case 24:wa(f,v,w,x,h),h&&B&2048&&ih(v.alternate,v);break;default:wa(f,v,w,x,h)}r=r.sibling}}function Ai(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,h=o.flags;switch(o.tag){case 22:Ai(i,o),h&2048&&ah(o.alternate,o);break;case 24:Ai(i,o),h&2048&&ih(o.alternate,o);break;default:Ai(i,o)}r=r.sibling}}var Oi=8192;function Sa(n,r,i){if(n.subtreeFlags&Oi)for(n=n.child;n!==null;)Bm(n,r,i),n=n.sibling}function Bm(n,r,i){switch(n.tag){case 26:Sa(n,r,i),n.flags&Oi&&n.memoizedState!==null&&Aw(i,xn,n.memoizedState,n.memoizedProps);break;case 5:Sa(n,r,i);break;case 3:case 4:var o=xn;xn=Sl(n.stateNode.containerInfo),Sa(n,r,i),xn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=Oi,Oi=16777216,Sa(n,r,i),Oi=o):Sa(n,r,i));break;default:Sa(n,r,i)}}function Pm(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 xi(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];gt=o,Im(o,n)}Pm(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)zm(n),n=n.sibling}function zm(n){switch(n.tag){case 0:case 11:case 15:xi(n),n.flags&2048&&Lr(9,n,n.return);break;case 3:xi(n);break;case 12:xi(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,ul(n)):xi(n);break;default:xi(n)}}function ul(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];gt=o,Im(o,n)}Pm(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Lr(8,r,r.return),ul(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,ul(r));break;default:ul(r)}n=n.sibling}}function Im(n,r){for(;gt!==null;){var i=gt;switch(i.tag){case 0:case 11:case 15:Lr(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:hi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,gt=o;else e:for(i=n;gt!==null;){o=gt;var h=o.sibling,f=o.return;if(km(o),o===i){gt=null;break e}if(h!==null){h.return=f,gt=h;break e}gt=f}}}var H_={getCacheForType:function(n){var r=Et(rt),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return Et(rt).controller.signal}},q_=typeof WeakMap=="function"?WeakMap:Map,De=0,Ie=null,Ee=null,Re=0,Ne=0,on=null,Br=!1,Ea=!1,oh=!1,fr=0,Ze=0,Pr=0,js=0,lh=0,ln=0,Ta=0,Ci=null,Ft=null,uh=!1,cl=0,Hm=0,hl=1/0,fl=null,zr=null,ut=0,Ir=null,Ra=null,dr=0,ch=0,hh=null,qm=null,ki=0,fh=null;function un(){return(De&2)!==0&&Re!==0?Re&-Re:L.T!==null?vh():Mu()}function $m(){if(ln===0)if((Re&536870912)===0||Oe){var n=Ys;Ys<<=1,(Ys&3932160)===0&&(Ys=262144),ln=n}else ln=536870912;return n=sn.current,n!==null&&(n.flags|=32),ln}function Qt(n,r,i){(n===Ie&&(Ne===2||Ne===9)||n.cancelPendingCommit!==null)&&(Aa(n,0),Hr(n,Re,ln,!1)),Qe(n,i),((De&2)===0||n!==Ie)&&(n===Ie&&((De&2)===0&&(js|=i),Ze
vendor: 15,539 bytes, line 9
9===4&&Hr(n,Re,ln,!1)),Hn(n))}function Km(n,r,i){if((De&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Ve(n,r),h=o?G_(n,r):ph(n,r,!0),f=o;do{if(h===0){Ea&&!o&&Hr(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!$_(i)){h=ph(n,r,!1),f=!1;continue}if(h===2){if(f=r,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var w=n;h=Ci;var x=w.current.memoizedState.isDehydrated;if(x&&(Aa(w,v).flags|=256),v=ph(w,v,!1),v!==2){if(oh&&!x){w.errorRecoveryDisabledLanes|=f,js|=f,h=4;break e}f=Ft,Ft=h,f!==null&&(Ft===null?Ft=f:Ft.push.apply(Ft,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Aa(n,0),Hr(n,r,0,!0);break}e:{switch(o=n,f=h,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Hr(o,r,ln,!Br);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=cl+300-dt(),10<h)){if(Hr(o,r,ln,!Br),pe(o,0,!0)!==0)break e;dr=r,o.timeoutHandle=wg(Gm.bind(null,o,i,Ft,fl,uh,r,ln,js,Ta,Br,f,"Throttled",-0,0),h);break e}Gm(o,i,Ft,fl,uh,r,ln,js,Ta,Br,f,null,-0,0)}}break}while(!0);Hn(n)}function Gm(n,r,i,o,h,f,v,w,x,B,H,K,P,z){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Bm(r,f,K);var ne=(f&62914560)===f?cl-dt():(f&4194048)===f?Hm-dt():0;if(ne=Ow(K,ne),ne!==null){dr=f,n.cancelPendingCommit=ne(Wm.bind(null,n,r,f,i,o,h,v,w,x,H,K,null,P,z)),Hr(n,f,v,!B);return}}Wm(n,r,f,i,o,h,v,w,x)}function $_(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var h=i[o],f=h.getSnapshot;h=h.value;try{if(!nn(f(),h))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Hr(n,r,i,o){r&=~lh,r&=~js,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var h=r;0<h;){var f=31-At(h),v=1<<f;o[f]=-1,h&=~v}i!==0&&ps(n,i,r)}function dl(){return(De&6)===0?(ji(0),!1):!0}function dh(){if(Ee!==null){if(Ne===0)var n=Ee.return;else n=Ee,nr=Ss=null,Cc(n),ga=null,di=0,n=Ee;for(;n!==null;)Sm(n.alternate,n),n=n.return;Ee=null}}function Aa(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,uw(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),dr=0,dh(),Ie=n,Ee=i=er(n.current,null),Re=r,Ne=0,on=null,Br=!1,Ea=Ve(n,r),oh=!1,Ta=ln=lh=js=Pr=Ze=0,Ft=Ci=null,uh=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var h=31-At(o),f=1<<h;r|=n[h],o&=~f}return fr=r,No(),i}function Vm(n,r){ve=null,L.H=wi,r===ma||r===qo?(r=lp(),Ne=3):r===yc?(r=lp(),Ne=4):Ne=r===Gc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,on=r,Ee===null&&(Ze=1,nl(n,yn(r,n.current)))}function Ym(){var n=sn.current;return n===null?!0:(Re&4194048)===Re?wn===null:(Re&62914560)===Re||(Re&536870912)!==0?n===wn:!1}function Fm(){var n=L.H;return L.H=wi,n===null?wi:n}function Qm(){var n=L.A;return L.A=H_,n}function pl(){Ze=4,Br||(Re&4194048)!==Re&&sn.current!==null||(Ea=!0),(Pr&134217727)===0&&(js&134217727)===0||Ie===null||Hr(Ie,Re,ln,!1)}function ph(n,r,i){var o=De;De|=2;var h=Fm(),f=Qm();(Ie!==n||Re!==r)&&(fl=null,Aa(n,r)),r=!1;var v=Ze;e:do try{if(Ne!==0&&Ee!==null){var w=Ee,x=on;switch(Ne){case 8:dh(),v=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(r=!0);var B=Ne;if(Ne=0,on=null,Oa(n,w,x,B),i&&Ea){v=0;break e}break;default:B=Ne,Ne=0,on=null,Oa(n,w,x,B)}}K_(),v=Ze;break}catch(H){Vm(n,H)}while(!0);return r&&n.shellSuspendCounter++,nr=Ss=null,De=o,L.H=h,L.A=f,Ee===null&&(Ie=null,Re=0,No()),v}function K_(){for(;Ee!==null;)Jm(Ee)}function G_(n,r){var i=De;De|=2;var o=Fm(),h=Qm();Ie!==n||Re!==r?(fl=null,hl=dt()+500,Aa(n,r)):Ea=Ve(n,r);e:do try{if(Ne!==0&&Ee!==null){r=Ee;var f=on;t:switch(Ne){case 1:Ne=0,on=null,Oa(n,r,f,1);break;case 2:case 9:if(ip(f)){Ne=0,on=null,Xm(r);break}r=function(){Ne!==2&&Ne!==9||Ie!==n||(Ne=7),Hn(n)},f.then(r,r);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:ip(f)?(Ne=0,on=null,Xm(r)):(Ne=0,on=null,Oa(n,r,f,7));break;case 5:var v=null;switch(Ee.tag){case 26:v=Ee.memoizedState;case 5:case 27:var w=Ee;if(v?Lg(v):w.stateNode.complete){Ne=0,on=null;var x=w.sibling;if(x!==null)Ee=x;else{var B=w.return;B!==null?(Ee=B,ml(B)):Ee=null}break t}}Ne=0,on=null,Oa(n,r,f,5);break;case 6:Ne=0,on=null,Oa(n,r,f,6);break;case 8:dh(),Ze=6;break e;default:throw Error(a(462))}}V_();break}catch(H){Vm(n,H)}while(!0);return nr=Ss=null,L.H=o,L.A=h,De=i,Ee!==null?0:(Ie=null,Re=0,No(),Ze)}function V_(){for(;Ee!==null&&!ft();)Jm(Ee)}function Jm(n){var r=_m(n.alternate,n,fr);n.memoizedProps=n.pendingProps,r===null?ml(n):Ee=r}function Xm(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=pm(i,r,r.pendingProps,r.type,void 0,Re);break;case 11:r=pm(i,r,r.pendingProps,r.type.render,r.ref,Re);break;case 5:Cc(r);default:Sm(i,r),r=Ee=Qd(r,fr),r=_m(i,r,fr)}n.memoizedProps=n.pendingProps,r===null?ml(n):Ee=r}function Oa(n,r,i,o){nr=Ss=null,Cc(r),ga=null,di=0;var h=r.return;try{if(N_(n,h,r,i,Re)){Ze=1,nl(n,yn(i,n.current)),Ee=null;return}}catch(f){if(h!==null)throw Ee=h,f;Ze=1,nl(n,yn(i,n.current)),Ee=null;return}r.flags&32768?(Oe||o===1?n=!0:Ea||(Re&536870912)!==0?n=!1:(Br=n=!0,(o===2||o===9||o===3||o===6)&&(o=sn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Zm(r,n)):ml(r)}function ml(n){var r=n;do{if((r.flags&32768)!==0){Zm(r,Br);return}n=r.return;var i=B_(r.alternate,r,fr);if(i!==null){Ee=i;return}if(r=r.sibling,r!==null){Ee=r;return}Ee=r=n}while(r!==null);Ze===0&&(Ze=5)}function Zm(n,r){do{var i=P_(n.alternate,n);if(i!==null){i.flags&=32767,Ee=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){Ee=n;return}Ee=n=i}while(n!==null);Ze=6,Ee=null}function Wm(n,r,i,o,h,f,v,w,x){n.cancelPendingCommit=null;do gl();while(ut!==0);if((De&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=nc,It(n,i,f,v,w,x),n===Ie&&(Ee=Ie=null,Re=0),Ra=r,Ir=n,dr=i,ch=f,hh=h,qm=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,J_(Qn,function(){return sg(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=L.T,L.T=null,h=F.p,F.p=2,v=De,De|=4;try{z_(n,r,i)}finally{De=v,F.p=h,L.T=o}}ut=1,eg(),tg(),ng()}}function eg(){if(ut===1){ut=0;var n=Ir,r=Ra,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var o=F.p;F.p=2;var h=De;De|=4;try{Nm(r,n);var f=Ah,v=Id(n.containerInfo),w=f.focusedElem,x=f.selectionRange;if(v!==w&&w&&w.ownerDocument&&zd(w.ownerDocument.documentElement,w)){if(x!==null&&Xu(w)){var B=x.start,H=x.end;if(H===void 0&&(H=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(H,w.value.length);else{var K=w.ownerDocument||document,P=K&&K.defaultView||window;if(P.getSelection){var z=P.getSelection(),ne=w.textContent.length,he=Math.min(x.start,ne),ze=x.end===void 0?he:Math.min(x.end,ne);!z.extend&&he>ze&&(v=ze,ze=he,he=v);var D=Pd(w,he),k=Pd(w,ze);if(D&&k&&(z.rangeCount!==1||z.anchorNode!==D.node||z.anchorOffset!==D.offset||z.focusNode!==k.node||z.focusOffset!==k.offset)){var U=K.createRange();U.setStart(D.node,D.offset),z.removeAllRanges(),he>ze?(z.addRange(U),z.extend(k.node,k.offset)):(U.setEnd(k.node,k.offset),z.addRange(U))}}}}for(K=[],z=w;z=z.parentNode;)z.nodeType===1&&K.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<K.length;w++){var $=K[w];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}xl=!!Rh,Ah=Rh=null}finally{De=h,F.p=o,L.T=i}}n.current=r,ut=2}}function tg(){if(ut===2){ut=0;var n=Ir,r=Ra,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var o=F.p;F.p=2;var h=De;De|=4;try{Cm(n,r.alternate,r)}finally{De=h,F.p=o,L.T=i}}ut=3}}function ng(){if(ut===4||ut===3){ut=0,Un();var n=Ir,r=Ra,i=dr,o=qm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ut=5:(ut=0,Ra=Ir=null,rg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(zr=null),An(i),r=r.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(fs,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=L.T,h=F.p,F.p=2,L.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var w=o[v];f(w.value,{componentStack:w.stack})}}finally{L.T=r,F.p=h}}(dr&3)!==0&&gl(),Hn(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===fh?ki++:(ki=0,fh=n):ki=0,ji(0)}}function rg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,hi(r)))}function gl(){return eg(),tg(),ng(),sg()}function sg(){if(ut!==5)return!1;var n=Ir,r=ch;ch=0;var i=An(dr),o=L.T,h=F.p;try{F.p=32>i?32:i,L.T=null,i=hh,hh=null;var f=Ir,v=dr;if(ut=0,Ra=Ir=null,dr=0,(De&6)!==0)throw Error(a(331));var w=De;if(De|=4,zm(f.current),Lm(f,f.current,v,i),De=w,ji(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(fs,f)}catch{}return!0}finally{F.p=h,L.T=o,rg(n,r)}}function ag(n,r,i){r=yn(i,r),r=Kc(n.stateNode,r,2),n=Dr(n,r,2),n!==null&&(Qe(n,2),Hn(n))}function Ue(n,r,i){if(n.tag===3)ag(n,n,i);else for(;r!==null;){if(r.tag===3){ag(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(zr===null||!zr.has(o))){n=yn(i,n),i=im(2),o=Dr(r,i,2),o!==null&&(om(i,o,r,n),Qe(o,2),Hn(o));break}}r=r.return}}function mh(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new q_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(i)||(oh=!0,h.add(i),n=Y_.bind(null,n,r,i),r.then(n,n))}function Y_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ie===n&&(Re&i)===i&&(Ze===4||Ze===3&&(Re&62914560)===Re&&300>dt()-cl?(De&2)===0&&Aa(n,0):lh|=i,Ta===Re&&(Ta=0)),Hn(n)}function ig(n,r){r===0&&(r=Ot()),n=bs(n,r),n!==null&&(Qe(n,r),Hn(n))}function F_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),ig(n,i)}function Q_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),ig(n,i)}function J_(n,r){return tn(n,r)}var yl=null,xa=null,gh=!1,vl=!1,yh=!1,qr=0;function Hn(n){n!==xa&&n.next===null&&(xa===null?yl=xa=n:xa=xa.next=n),vl=!0,gh||(gh=!0,Z_())}function ji(n,r){if(!yh&&vl){yh=!0;do for(var i=!1,o=yl;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,w=o.pingedLanes;f=(1<<31-At(42|n)+1)-1,f&=h&~(v&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,cg(o,f))}else f=Re,f=pe(o,o===Ie?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ve(o,f)||(i=!0,cg(o,f));o=o.next}while(i);yh=!1}}function X_(){og()}function og(){vl=gh=!1;var n=0;qr!==0&&lw()&&(n=qr);for(var r=dt(),i=null,o=yl;o!==null;){var h=o.next,f=lg(o,r);f===0?(o.next=null,i===null?yl=h:i.next=h,h===null&&(xa=i)):(i=o,(n!==0||(f&3)!==0)&&(vl=!0)),o=h}ut!==0&&ut!==5||ji(n),qr!==0&&(qr=0)}function lg(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-At(f),w=1<<v,x=h[v];x===-1?((w&i)===0||(w&o)!==0)&&(h[v]=pt(w,r)):x<=r&&(n.expiredLanes|=w),f&=~w}if(r=Ie,i=Re,i=pe(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(Ne===2||Ne===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&hs(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ve(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&hs(o),An(i)){case 2:case 8:i=dn;break;case 32:i=Qn;break;case 268435456:i=Jn;break;default:i=Qn}return o=ug.bind(null,n),i=tn(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&hs(o),n.callbackPriority=2,n.callbackNode=null,2}function ug(n,r){if(ut!==0&&ut!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(gl()&&n.callbackNode!==i)return null;var o=Re;return o=pe(n,n===Ie?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Km(n,o,r),lg(n,dt()),n.callbackNode!=null&&n.callbackNode===i?ug.bind(null,n):null)}function cg(n,r){if(gl())return null;Km(n,r,!0)}function Z_(){cw(function(){(De&6)!==0?tn(Je,X_):og()})}function vh(){if(qr===0){var n=da;n===0&&(n=Vs,Vs<<=1,(Vs&261888)===0&&(Vs=256)),qr=n}return qr}function hg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ao(""+n)}function fg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function W_(n,r,i,o,h){if(r==="submit"&&i&&i.stateNode===h){var f=hg((h[$t]||null).action),v=o.submitter;v&&(r=(r=v[$t]||null)?hg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var w=new ko("action","action",null,o,h);n.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(qr!==0){var x=v?fg(h,v):new FormData(h);Pc(i,{pending:!0,data:x,method:h.method,action:f},null,x)}}else typeof f=="function"&&(w.preventDefault(),x=v?fg(h,v):new FormData(h),Pc(i,{pending:!0,data:x,method:h.method,action:f},f,x))},currentTarget:h}]})}}for(var bh=0;bh<tc.length;bh++){var _h=tc[bh],ew=_h.toLowerCase(),tw=_h[0].toUpperCase()+_h.slice(1);On(ew,"on"+tw)}On($d,"onAnimationEnd"),On(Kd,"onAnimationIteration"),On(Gd,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(y_,"onTransitionRun"),On(v_,"onTransitionStart"),On(b_,"onTransitionCancel"),On(Vd,"onTransitionEnd"),Ws("onMouseEnter",["mouseout","mouseover"]),Ws("onMouseLeave",["mouseout","mouseover"]),Ws("onPointerEnter",["pointerout","pointerover"]),Ws("onPointerLeave",["pointerout","pointerover"]),ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ms("onBeforeInput",["compositionend","keypress","textInput","paste"]),ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mi="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(" "),nw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mi));function dg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var w=o[v],x=w.instance,B=w.currentTarget;if(w=w.listener,x!==f&&h.isPropagationStopped())break e;f=w,h.currentTarget=B;try{f(h)}catch(H){Do(H)}h.currentTarget=null,f=x}else for(v=0;v<o.length;v++){if(w=o[v],x=w.instance,B=w.currentTarget,w=w.listener,x!==f&&h.isPropagationStopped())break e;f=w,h.currentTarget=B;try{f(h)}catch(H){Do(H)}h.currentTarget=null,f=x}}}}function Te(n,r){var i=r[Du];i===void 0&&(i=r[Du]=new Set);var o=n+"__bubble";
vendor: 3,500 bytes, line 9
9i.has(o)||(pg(r,n,2,!1),i.add(o))}function wh(n,r,i){var o=0;r&&(o|=4),pg(i,n,o,r)}var bl="_reactListening"+Math.random().toString(36).slice(2);function Sh(n){if(!n[bl]){n[bl]=!0,od.forEach(function(i){i!=="selectionchange"&&(nw.has(i)||wh(i,!1,n),wh(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[bl]||(r[bl]=!0,wh("selectionchange",!1,r))}}function pg(n,r,i,o){switch($g(r)){case 2:var h=kw;break;case 8:h=jw;break;default:h=Bh}i=h.bind(null,r,i,n),h=void 0,!qu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?n.addEventListener(r,i,{capture:!0,passive:h}):n.addEventListener(r,i,!0):h!==void 0?n.addEventListener(r,i,{passive:h}):n.addEventListener(r,i,!1)}function Eh(n,r,i,o,h){var f=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var w=o.stateNode.containerInfo;if(w===h)break;if(v===4)for(v=o.return;v!==null;){var x=v.tag;if((x===3||x===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;w!==null;){if(v=Js(w),v===null)return;if(x=v.tag,x===5||x===6||x===26||x===27){o=f=v;continue e}w=w.parentNode}}o=o.return}bd(function(){var B=f,H=Iu(i),K=[];e:{var P=Yd.get(n);if(P!==void 0){var z=ko,ne=n;switch(n){case"keypress":if(xo(i)===0)break e;case"keydown":case"keyup":z=Qb;break;case"focusin":ne="focus",z=Vu;break;case"focusout":ne="blur",z=Vu;break;case"beforeblur":case"afterblur":z=Vu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Bb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Zb;break;case $d:case Kd:case Gd:z=Ib;break;case Vd:z=e_;break;case"scroll":case"scrollend":z=Ub;break;case"wheel":z=n_;break;case"copy":case"cut":case"paste":z=qb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Td;break;case"toggle":case"beforetoggle":z=s_}var he=(r&4)!==0,ze=!he&&(n==="scroll"||n==="scrollend"),D=he?P!==null?P+"Capture":null:P;he=[];for(var k=B,U;k!==null;){var $=k;if(U=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||U===null||D===null||($=ei(k,D),$!=null&&he.push(Di(k,$,U))),ze)break;k=k.return}0<he.length&&(P=new z(P,ne,null,i,H),K.push({event:P,listeners:he}))}}if((r&7)===0){e:{if(P=n==="mouseover"||n==="pointerover",z=n==="mouseout"||n==="pointerout",P&&i!==zu&&(ne=i.relatedTarget||i.fromElement)&&(Js(ne)||ne[Qs]))break e;if((z||P)&&(P=H.window===H?H:(P=H.ownerDocument)?P.defaultView||P.parentWindow:window,z?(ne=i.relatedTarget||i.toElement,z=B,ne=ne?Js(ne):null,ne!==null&&(ze=u(ne),he=ne.tag,ne!==ze||he!==5&&he!==27&&he!==6)&&(ne=null)):(z=null,ne=B),z!==ne)){if(he=Sd,$="onMouseLeave",D="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(he=Td,$="onPointerLeave",D="onPointerEnter",k="pointer"),ze=z==null?P:Wa(z),U=ne==null?P:Wa(ne),P=new he($,k+"leave",z,i,H),P.target=ze,P.relatedTarget=U,$=null,Js(H)===B&&(he=new he(D,k+"enter",ne,i,H),he.target=U,he.relatedTarget=ze,$=he),ze=$,z&&ne)t:{for(he=rw,D=z,k=ne,U=0,$=D;$;$=he($))U++;$=0;for(var ue=k;ue;ue=he(ue))$++;for(;0<U-$;)D=he(D),U--;for(;0<$-U;)k=he(k),$--;for(;U--;){if(D===k||k!==null&&D===k.alternate){he=D;break t}D=he(D),k=he(k)}he=null}else he=null;z!==null&&mg(K,P,z,he,!1),ne!==null&&ze!==null&&mg(K,ze,ne,he,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(P=B?Wa(B):window,z=P.nodeName&&P.nodeName.toLowerCase(),z==="select"||z==="input"&&P.type==="file")var Ce=Md;else if(kd(P))if(Dd)Ce=p_;else{Ce=f_;var oe=h_}else z=P.nodeName,!z||z.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?B&&Pu(B.elementType)&&(Ce=Md):Ce=d_;if(Ce&&(Ce=Ce(n,B))){jd(K,Ce,i,H);break e}oe&&oe(n,P,B),n==="focusout"&&B&&P.type==="number"&&B.memoizedProps.value!=null&&Bu(P,"number",P.value)}switch(oe=B?Wa(B):window,n){case"focusin":(kd(oe)||oe.contentEditable==="true")&&(aa=oe,Zu=B,li=null);break;case"focusout":li=Zu=aa=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,Hd(K,i,H);break;case"selectionchange":if(g_)break;case"keydown":case"keyup":Hd(K,i,H)}var be;if(Fu)e:{switch(n){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else sa?xd(n,i)&&(Ae="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Ae="onCompositionStart");Ae&&(Rd&&i.locale!=="ko"&&(sa||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&sa&&(be=_d()):(Ar=H,$u="value"in Ar?Ar.value:Ar.textContent,sa=!0)),oe=_l(B,Ae),0<oe.length&&(Ae=new Ed(Ae,n,null,i,H),K.push({event:Ae,listeners:oe}),be?Ae.data=be:(be=Cd(i),be!==null&&(Ae.data=be)))),(be=i_?o_(n,i):l_(n,i))&&(Ae=_l(B,"onBeforeInput"),0<Ae.length&&(oe=new Ed("onBeforeInput","beforeinput",null,i,H),K.push({event:oe,listeners:Ae}),oe.data=be)),W_(K,n,B,i,H)}dg(K,r)})}function Di(n,r,i){return{instance:n,listener:r,currentTarget:i}}function _l(n,r){for(var i=r+"Capture",o=[];n!==null;){var h=n,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=ei(n,i),h!=null&&o.unshift(Di(n,h,f)),h=ei(n,r),h!=null&&o.push(Di(n,h,f))),n.tag===3)return o;n=n.return}return[]}function rw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function mg(n,r,i,o,h){for(var f=r._reactName,v=[];i!==null&&i!==o;){var w=i,x=w.alternate,B=w.stateNode;if(w=w.tag,x!==null&&x===o)break;w!==5&&w!==26&&w!==27||B===null||(x=B,h?(B=ei(i,f),B!=null&&v.unshift(Di(i,B,x))):h||(B=ei(i,f),B!=null&&v.push(Di(i,B,x)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var sw=/\r\n?/g,aw=/\u0000|\uFFFD/g;function gg(n){return(typeof n=="string"?n:""+n).replace(sw,` 10`).replace(aw,"")}function yg(n,r){return r=gg(r),gg(n)===r}function Pe(n,r,i,o,h,f){switch(i){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||ta(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&ta(n,""+o);break;case"className":To(n,"class",o);break;case"tabIndex":To(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":To(n,i,o);break;case"style":yd(n,o,f);break;case"data":if(r!=="object"){To(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Ao(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(r!=="input"&&Pe(n,r,"name",h.name,h,null),Pe(n,r,"formEncType",h.formEncType,h,null),Pe(n,r,"formMethod",h.formMethod,h,null),Pe(n,r,"formTarget",h.formTarget,h,null)):(Pe(n,r,"encType",h.encType,h,null),Pe(n,r,"method",h.method,h,null),Pe(n,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Ao(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=Zn);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(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}i=Ao(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""+o):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":o===!0?n.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,o):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(i,o):n.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(i):n.setAttribute(i,o);break;case"popover":Te("beforetoggle",n),Te("toggle",n),Eo(n,"popover",o);break;case"xlinkActuate":Xn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Eo(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Db.get(i)||i,Eo(n,i,o))}}function Th(n,r,i,o,h,f){switch(i){case"style":yd(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof o=="string"?ta(n,o):(typeof o=="number"||typeof o=="bigint")&&ta(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=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ld.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),r=i.slice(2,h?i.length-7:void 0),f=n[$t]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,h);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Eo(n,i,o)}}}function Rt(n,r,i){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,h=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Pe(n,r,f,v,i,null)}}h&&Pe(n,r,"srcSet",i.srcSet,i,null),o&&Pe(n,r,"src",i.src,i,null);return;case"input":Te("invalid",n);var w=f=v=h=null,x=null,B=null;for(o in i)if(i.hasOwnProperty(o)){var H=i[o];if(H!=null)switch(o){case"name":h=H;break;case"type":v=H;break;case"checked":x=H;break;case"defaultChecked":B=H;break;case"value":f=H;break;case"defaultValue":w=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:Pe(n,r,o,H,i,null)}}dd(n,f,w,x,B,v,h,!1);return;case"select":Te("invalid",n),o=v=f=null;for(h in i)if(i.hasOwnProperty(h)&&(w=i[h],w!=null))switch(h){case"value":f=w;break;case"defaultValue":v=w;break;case"multiple":o=w;default:Pe(n,r,h,w,i,null)}r=f,i=v,n.multiple=!!o,r!=null?ea(n,!!o,r,!1):i!=null&&ea(n,!!o,i,!0);return;case"textarea":Te("invalid",n),f=h=o=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":o=w;break;case"defaultValue":h=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:Pe(n,r,v,w,i,null)}md(n,o,h,f);return;case"option":for(x in i)i.hasOwnProperty(x)&&(o=i[x],o!=null)&&(x==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(n,r,x,o,i,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<Mi.length;o++)Te(Mi[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(B in i)if(i.hasOwnProperty(B)&&(o=i[B],o!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Pe(n,r,B,o,i,null)}return;default:if(Pu(r)){for(H in i)i.hasOwnProperty(H)&&(o=i[H],o!==void 0&&Th(n,r,H,o,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(o=i[w],o!=null&&Pe(n,r,w,o,i,null))}function iw(n,r,i,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,f=null,v=null,w=null,x=null,B=null,H=null;for(z in i){var K=i[z];if(i.hasOwnProperty(z)&&K!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":x=K;default:o.hasOwnProperty(z)||Pe(n,r,z,null,o,K)}}for(var P in o){var z=o[P];if(K=i[P],o.hasOwnProperty(P)&&(z!=null||K!=null))switch(P){case"type":f=z;break;case"name":h=z;break;case"checked":B=z;break;case"defaultChecked":H=z;break;case"value":v=z;break;case"defaultValue":w=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:z!==K&&Pe(n,r,P,z,o,K)}}Lu(n,v,w,x,B,H,f,h);return;case"select":z=v=w=P=null;for(f in i)if(x=i[f],i.hasOwnProperty(f)&&x!=null)switch(f){case"value":break;case"multiple":z=x;default:o.hasOwnProperty(f)||Pe(n,r,f,null,o,x)}for(h in o)if(f=o[h],x=i[h],o.hasOwnProperty(h)&&(f!=null||x!=null))switch(h){case"value":P=f;break;case"defaultValue":w=f;break;case"multiple":v=f;default:f!==x&&Pe(n,r,h,f,o,x)}r=w,i=v,o=z,P!=null?ea(n,!!i,P,!1):!!o!=!!i&&(r!=null?ea(n,!!i,r,!0):ea(n,!!i,i?[]:"",!1));return;case"textarea":z=P=null;for(w in i)if(h=i[w],i.hasOwnProperty(w)&&h!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Pe(n,r,w,null,o,h)}for(v in o)if(h=o[v],f=i[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":P=h;break;case"defaultValue":z=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==f&&Pe(n,r,v,h,o,f)}pd(n,P,z);return;case"option":for(var ne in i)P=i[ne],i.hasOwnProperty(ne)&&P!=null&&!o.hasOwnProperty(ne)&&(ne==="selected"?n.selected=!1:Pe(n,r,ne,null,o,P));for(x in o)P=o[x],z=i[x],o.hasOwnProperty(x)&&P!==z&&(P!=null||z!=null)&&(x==="selected"?n.selected=P&&typeof P!="function"&&typeof P!="symbol":Pe(n,r,x,P,o,z));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 he in i)P=i[he],i.hasOwnProperty(he)&&P!=null&&!o.hasOwnProperty(he)&&Pe(n,r,he,null,o,P);for(B in o)if(P=o[B],z=i[B],o.hasOwnProperty(B)&&P!==z&&(P!=null||z!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,r));break;default:Pe(n,r,B,P,o,z)}return;default:if(Pu(r)){for(var ze in i)P=i[ze],i.hasOwnProperty(ze)&&P!==void 0&&!o.hasOwnProperty(ze)&&Th(n,r,ze,void 0,o,P);for(H in o)P=o[H],z=i[H],!o.hasOwnProperty(H)||P===z||P===void 0&&z===void 0||Th(n,r,H,P,o,z);return}}for(var D in i)P=i[D],i.hasOwnProperty(D)&&P!=null&&!o.hasOwnProperty(D)&&Pe(n,r,D,null,o,P);
vendor: 9,726 bytes, line 10
10for(K in o)P=o[K],z=i[K],!o.hasOwnProperty(K)||P===z||P==null&&z==null||Pe(n,r,K,P,o,z)}function vg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ow(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var h=i[o],f=h.transferSize,v=h.initiatorType,w=h.duration;if(f&&w&&vg(v)){for(v=0,w=h.responseEnd,o+=1;o<i.length;o++){var x=i[o],B=x.startTime;if(B>w)break;var H=x.transferSize,K=x.initiatorType;H&&vg(K)&&(x=x.responseEnd,v+=H*(x<w?1:(w-B)/(x-B)))}if(--o,r+=8*(f+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Rh=null,Ah=null;function wl(n){return n.nodeType===9?n:n.ownerDocument}function bg(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 _g(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 Oh(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 xh=null;function lw(){var n=window.event;return n&&n.type==="popstate"?n===xh?!1:(xh=n,!0):(xh=null,!1)}var wg=typeof setTimeout=="function"?setTimeout:void 0,uw=typeof clearTimeout=="function"?clearTimeout:void 0,Sg=typeof Promise=="function"?Promise:void 0,cw=typeof queueMicrotask=="function"?queueMicrotask:typeof Sg<"u"?function(n){return Sg.resolve(null).then(n).catch(hw)}:wg;function hw(n){setTimeout(function(){throw n})}function $r(n){return n==="head"}function Eg(n,r){var i=r,o=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(h),Ma(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Ni(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Ni(i);for(var f=i.firstChild;f;){var v=f.nextSibling,w=f.nodeName;f[Za]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&Ni(n.ownerDocument.body);i=h}while(i);Ma(r)}function Tg(n,r){var i=n;n=0;do{var o=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function Ch(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Ch(i),Nu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function fw(n,r,i,o){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Za])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=Sn(n.nextSibling),n===null)break}return null}function dw(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Sn(n.nextSibling),n===null))return null;return n}function Rg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Sn(n.nextSibling),n===null))return null;return n}function kh(n){return n.data==="$?"||n.data==="$~"}function jh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function pw(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var o=function(){r(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function Sn(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 Mh=null;function Ag(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return Sn(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function Og(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function xg(n,r,i){switch(r=wl(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Ni(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Nu(n)}var En=new Map,Cg=new Set;function Sl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var pr=F.d;F.d={f:mw,r:gw,D:yw,C:vw,L:bw,m:_w,X:Sw,S:ww,M:Ew};function mw(){var n=pr.f(),r=dl();return n||r}function gw(n){var r=Xs(n);r!==null&&r.tag===5&&r.type==="form"?Vp(r):pr.r(n)}var Ca=typeof document>"u"?null:document;function kg(n,r,i){var o=Ca;if(o&&typeof r=="string"&&r){var h=mn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),Cg.has(h)||(Cg.add(h),n={rel:n,crossOrigin:i,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),Rt(r,"link",n),mt(r),o.head.appendChild(r)))}}function yw(n){pr.D(n),kg("dns-prefetch",n,null)}function vw(n,r){pr.C(n,r),kg("preconnect",n,r)}function bw(n,r,i){pr.L(n,r,i);var o=Ca;if(o&&n&&r){var h='link[rel="preload"][as="'+mn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+mn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+mn(i.imageSizes)+'"]')):h+='[href="'+mn(n)+'"]';var f=h;switch(r){case"style":f=ka(n);break;case"script":f=ja(n)}En.has(f)||(n=g({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),En.set(f,n),o.querySelector(h)!==null||r==="style"&&o.querySelector(Ui(f))||r==="script"&&o.querySelector(Li(f))||(r=o.createElement("link"),Rt(r,"link",n),mt(r),o.head.appendChild(r)))}}function _w(n,r){pr.m(n,r);var i=Ca;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+mn(o)+'"][href="'+mn(n)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=ja(n)}if(!En.has(f)&&(n=g({rel:"modulepreload",href:n},r),En.set(f,n),i.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Li(f)))return}o=i.createElement("link"),Rt(o,"link",n),mt(o),i.head.appendChild(o)}}}function ww(n,r,i){pr.S(n,r,i);var o=Ca;if(o&&n){var h=Zs(o).hoistableStyles,f=ka(n);r=r||"default";var v=h.get(f);if(!v){var w={loading:0,preload:null};if(v=o.querySelector(Ui(f)))w.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},i),(i=En.get(f))&&Dh(n,i);var x=v=o.createElement("link");mt(x),Rt(x,"link",n),x._p=new Promise(function(B,H){x.onload=B,x.onerror=H}),x.addEventListener("load",function(){w.loading|=1}),x.addEventListener("error",function(){w.loading|=2}),w.loading|=4,El(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:w},h.set(f,v)}}}function Sw(n,r){pr.X(n,r);var i=Ca;if(i&&n){var o=Zs(i).hoistableScripts,h=ja(n),f=o.get(h);f||(f=i.querySelector(Li(h)),f||(n=g({src:n,async:!0},r),(r=En.get(h))&&Nh(n,r),f=i.createElement("script"),mt(f),Rt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function Ew(n,r){pr.M(n,r);var i=Ca;if(i&&n){var o=Zs(i).hoistableScripts,h=ja(n),f=o.get(h);f||(f=i.querySelector(Li(h)),f||(n=g({src:n,async:!0,type:"module"},r),(r=En.get(h))&&Nh(n,r),f=i.createElement("script"),mt(f),Rt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function jg(n,r,i,o){var h=(h=ce.current)?Sl(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=ka(i.href),i=Zs(h).hoistableStyles,o=i.get(r),o||(o={type:"style",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=ka(i.href);var f=Zs(h).hoistableStyles,v=f.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}}
vendor: 4,212 bytes, line 10
10,f.set(n,v),(f=h.querySelector(Ui(n)))&&!f._p&&(v.instance=f,v.state.loading=5),En.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},En.set(n,i),f||Tw(h,n,i,v.state))),r&&o===null)throw Error(a(528,""));return v}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ja(i),i=Zs(h).hoistableScripts,o=i.get(r),o||(o={type:"script",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function ka(n){return'href="'+mn(n)+'"'}function Ui(n){return'link[rel="stylesheet"]['+n+"]"}function Mg(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function Tw(n,r,i,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),Rt(r,"link",i),mt(r),n.head.appendChild(r))}function ja(n){return'[src="'+mn(n)+'"]'}function Li(n){return"script[async]"+n}function Dg(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+mn(i.href)+'"]');if(o)return r.instance=o,mt(o),o;var h=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),mt(o),Rt(o,"style",h),El(o,i.precedence,n),r.instance=o;case"stylesheet":h=ka(i.href);var f=n.querySelector(Ui(h));if(f)return r.state.loading|=4,r.instance=f,mt(f),f;o=Mg(i),(h=En.get(h))&&Dh(o,h),f=(n.ownerDocument||n).createElement("link"),mt(f);var v=f;return v._p=new Promise(function(w,x){v.onload=w,v.onerror=x}),Rt(f,"link",o),r.state.loading|=4,El(f,i.precedence,n),r.instance=f;case"script":return f=ja(i.src),(h=n.querySelector(Li(f)))?(r.instance=h,mt(h),h):(o=i,(h=En.get(f))&&(o=g({},i),Nh(o,h)),n=n.ownerDocument||n,h=n.createElement("script"),mt(h),Rt(h,"link",o),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,El(o,i.precedence,n));return r.instance}function El(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var w=o[v];if(w.dataset.precedence===r)f=w;else if(f!==h)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Dh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Nh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Tl=null;function Ng(n,r,i){if(Tl===null){var o=new Map,h=Tl=new Map;h.set(i,o)}else h=Tl,o=h.get(i),o||(o=new Map,h.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var f=i[h];if(!(f[Za]||f[wt]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var w=o.get(v);w?w.push(f):o.set(v,[f])}}return o}function Ug(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function Rw(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Lg(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Aw(n,r,i,o){if(i.type==="stylesheet"&&(typeof o.media!="str
10ing"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var h=ka(o.href),f=r.querySelector(Ui(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Rl.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,mt(f);return}f=r.ownerDocument||r,o=Mg(o),(h=En.get(h))&&Dh(o,h),f=f.createElement("link"),mt(f);var v=f;v._p=new Promise(function(w,x){v.onload=w,v.onerror=x}),Rt(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Rl.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var Uh=0;function Ow(n,r){return n.stylesheets&&n.count===0&&Ol(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&Ol(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&Uh===0&&(Uh=62500*ow());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ol(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>Uh?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function Rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ol(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Al=null;function Ol(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Al=new Map,r.forEach(xw,n),Al=null,Rl.call(n))}function xw(n,r){if(!(r.state.loading&4)){var i=Al.get(n);if(i)var o=i.get(null);else{i=new Map,Al.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,h),i.set(v,h),this.count++,o=Rl.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var Bi={$$typeof:j,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Cw(n,r,i,o,h,f,v,w,x){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Tr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tr(0),this.hiddenUpdates=Tr(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Bg(n,r,i,o,h,f,v,w,x,B,H,K){return n=new Cw(n,r,i,v,x,B,H,K,w),r=1,f===!0&&(r|=24),f=rn(3,null,null,r),n.current=f,f.stateNode=n,r=pc(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:r},vc(f),n}function Pg(n){return n?(n=la,n):la}function zg(n,r,i,o,h,f){h=Pg(h),o.context===null?o.context=h:o.pendingContext=h,o=Mr(r),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Dr(n,o,r),i!==null&&(Qt(i,n,r),mi(i,n,r))}function Ig(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function Lh(n,r){Ig(n,r),(n=n.alternate)&&Ig(n,r)}function Hg(n){if(n.tag===13||n.tag===31){var r=bs(n,67108864);r!==null&&Qt(r,n,67108864),Lh(n,67108864)}}function qg(n){if(n.tag===13||n.tag===31){var r=un();r=Fs(r);var i=bs(n,r);i!==null&&Qt(i,n,r),Lh(n,r)}}var xl=!0;function kw(n,r,i,o){var h=L.T;L.T=null;var f=F.p;try{F.p=2,Bh(n,r,i,o)}finally{F.p=f,L.T=h}}function jw(n,r,i,o){var h=L.T;L.T=null;var f=F.p;try{F.p=8,Bh(n,r,i,o)}finally{F.p=f,L.T=h}}function Bh(n,r,i,o){if(xl){var h=Ph(o);if(h===null)Eh(n,r,o,Cl,i),Kg(n,o);else if(Dw(h,n,r,i,o))o.stopPropagation();else if(Kg(n,o),r&4&&-1<Mw.indexOf(n)){for(;h!==null;){var f=Xs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Bn(f.pendingLanes);if(v!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var x=1<<31-At(v);w.entanglements[1]|=x,v&=~x}Hn(f),(De&6)===0&&(hl=dt()+500,ji(0))}}break;case 31:case 13:w=bs(f,2),w!==null&&Qt(w,f,2),dl(),Lh(f,2)}if(f=Ph(o),f===null&&Eh(n,r,o,Cl,i),f===h)break;h=f}h!==null&&o.stopPropagation()}else Eh(n,r,o,null,i)}}function Ph(n){return n=Iu(n),zh(n)}var Cl=null;function zh(n){if(Cl=null,n=Js(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=c(r),n!==null)return n;n=null}else if(i===31){if(n=d(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Cl=n,null}function $g(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 6,256 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(Le()){case Je:return 2;case dn:return 8;case Qn:case Ja:return 32;case Jn:return 268435456;default:return 32}default:return 32}}var Ih=!1,Kr=null,Gr=null,Vr=null,Pi=new Map,zi=new Map,Yr=[],Mw="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 Kg(n,r){switch(n){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Vr=null;break;case"pointerover":case"pointerout":Pi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(r.pointerId)}}function Ii(n,r,i,o,h,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=Xs(r),r!==null&&Hg(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function Dw(n,r,i,o,h){switch(r){case"focusin":return Kr=Ii(Kr,n,r,i,o,h),!0;case"dragenter":return Gr=Ii(Gr,n,r,i,o,h),!0;case"mouseover":return Vr=Ii(Vr,n,r,i,o,h),!0;case"pointerover":var f=h.pointerId;return Pi.set(f,Ii(Pi.get(f)||null,n,r,i,o,h)),!0;case"gotpointercapture":return f=h.pointerId,zi.set(f,Ii(zi.get(f)||null,n,r,i,o,h)),!0}return!1}function Gg(n){var r=Js(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){n.blockedOn=r,ad(n.priority,function(){qg(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,ad(n.priority,function(){qg(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function kl(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=Ph(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);zu=o,i.target.dispatchEvent(o),zu=null}else return r=Xs(i),r!==null&&Hg(r),n.blockedOn=i,!1;r.shift()}return!0}function Vg(n,r,i){kl(n)&&i.delete(r)}function Nw(){Ih=!1,Kr!==null&&kl(Kr)&&(Kr=null),Gr!==null&&kl(Gr)&&(Gr=null),Vr!==null&&kl(Vr)&&(Vr=null),Pi.forEach(Vg),zi.forEach(Vg)}function jl(n,r){n.blockedOn===r&&(n.blockedOn=null,Ih||(Ih=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Nw)))}var Ml=null;function Yg(n){Ml!==n&&(Ml=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ml===n&&(Ml=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],h=n[r+2];if(typeof o!="function"){if(zh(o||i)===null)continue;break}var f=Xs(i);f!==null&&(n.splice(r,3),r-=3,Pc(f,{pending:!0,data:h,method:i.method,action:o},o,h))}}))}function Ma(n){function r(x){return jl(x,n)}Kr!==null&&jl(Kr,n),Gr!==null&&jl(Gr,n),Vr!==null&&jl(Vr,n),Pi.forEach(r),zi.forEach(r);for(var i=0;i<Yr.length;i++){var o=Yr[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Yr.length&&(i=Yr[0],i.blockedOn===null);)Gg(i),i.blockedOn===null&&Yr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var h=i[o],f=i[o+1],v=h[$t]||null;if(typeof f=="function")v||Yg(i);else if(v){var w=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[$t]||null)w=v.formAction;else if(zh(h)!==null)continue}else w=v.action;typeof w=="function"?i[o+1]=w:(i.splice(o,3),o-=3),Yg(i)}}}function Fg(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function Hh(n){this._internalRoot=n}Dl.prototype.render=Hh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=un();zg(i,o,n,r,null,null)},Dl.prototype.unmount=Hh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;zg(n.current,2,null,n,null,null),dl(),r[Qs]=null}};function Dl(n){this._internalRoot=n}Dl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Mu();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Yr.length&&r!==0&&r<Yr[i].priority;i++);Yr.splice(i,0,n),i===0&&Gg(n)}};var Qg=e.version;if(Qg!=="19.2.5")throw Error(a(527,Qg,"19.2.5"));F.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var Uw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nl.isDisabled&&Nl.supportsFiber)try{fs=Nl.inject(Uw),jt=Nl}catch{}}return qi.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",h=nm,f=rm,v=sm;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Bg(n,1,!1,null,null,i,o,null,h,f,v,Fg),n[Qs]=r.current,Sh(n),new Hh(r)},qi.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,h="",f=nm,v=rm,w=sm,x=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(x=i.formState)),r=Bg(n,1,!0,r,i??null,o,h,x,f,v,w,Fg),r.context=Pg(null),i=r.current,o=un(),o=Fs(o),h=Mr(o),h.callback=null,Dr(i,h,o),i=o,r.current.lanes=i,Qe(r,i),Hn(r),n[Qs]=r.current,Sh(n),new Dl(r)},qi.version="19.2.5",qi}var ay;function Gw(){if(ay)return Kh.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(),Kh.exports=Kw(),Kh.exports}var Vw=Gw(),Yw="__TSS_CONTEXT",yf=Symbol.for("TSS_SERVER_FUNCTION"),A2=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),Fw="application/x-tss-framed",mr={JSON:0,CHUNK:1,END:2,ERROR:3},Qw=/;\s*v=(\d+)/;function Jw(t){const e=t.match(Qw);return e?parseInt(e[1],10):void 0}function Xw(t){const e=Jw(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var zv=()=>window.__TSS_START_OPTIONS__,Iv=!1;function ro(t){return t[t.length-1]}function Zw(t){return typeof t=="function"}function es(t,e){return Zw(t)?t(e):t}var Ww=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,eS=()=>Object.create(null),Ms=(t,e)=>Ls(t,e,eS);function Ls(t,e,s=()=>({}),a=0){if(t===e)return t;if(a>500)return e;const l=e,u=uy(t)&&uy(l);if(!u&&!(Fa(t)&&Fa(l)))return l;const c=u?t:oy(t);if(!c)return l;const d=u?l:oy(l);if(!d)return l;const p=c.length,m=d.length,y=u?new Array(m):s();let g=0;for(let b=0;b<m;b++){const _=u?b:d[b],S=t[_],O=l[_];if(S===O){y[_]=S,(u?b<p:Ww.call(t,_))&&g++;continue}if(S===null||O===null||typeof S!="object"||typeof O!="object"){y[_]=O;continue}const E=Ls(S,O,s,a+1);y[_]=E,E===S&&g++}return p===m&&g===p?t:y}function oy(t){const e=Object.getOwnPropertyNames(t);for(const l of e)if(!iy.call(t,l))return!1;const s=Object.getOwnPropertySymbols(t);if(s.length===0)return e;const a=e;for(const l of s){if(!iy.call(t,l))return!1;a.push(l)}return a}function Fa(t){if(!ly(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const s=e.prototype;return!(!ly(s)||!s.hasOwnProperty("isPrototypeOf"))}function ly(t){return Object.prototype.toString.call(t)==="[object Object]"}function uy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Zt(t,e,s){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0,l=t.length;a<l;a++)if(!Zt(t[a],e[a],s))return!1;return!0}if(Fa(t)&&Fa(e)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const c in e)if((!a||e[c]!==void 0)&&!Zt(t[c],e[c],s))return!1;return!0}let l=0;if(!a)l=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&l++;let u=0;for(const c in e)if((!a||e[c]!==void 0)&&(u++,u>l||!Zt(t[c],e[c],s)))return!1;return l===u}return!1}function $s(t){let e,s;const a=new Promise((l,u)=>{e=l,s=u});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,e(l),t?.(l)},a.reject=l=>{a.status="rejected",s(l)},a}function tS(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function so(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function nS(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function cy(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return nS(e)}var rS=["http:","https:","mailto:","tel:"];function nu(t,e){if(!t)return!1;try{const s=new URL(t);return!e.has(s.protocol)}catch{return!1}}var sS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},aS=/[&><\u2028\u2029]/g;function iS(t){return t.replace(aS,e=>sS[e])}function $i(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let s=0,a="",l;for(;(l=e.exec(t))!==null;)a+=cy(t.slice(s,l.index))+l[0],s=e.lastIndex;a=a+cy(s?t.slice(s):t);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function oS(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function lS(t,e){if(t===e)return!0;
10if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}function en(){throw new Error("Invariant failed")}function ao(t){const e=new Map;let s,a;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a)):(u.next.prev=void 0,s=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=e.get(u);if(c)return l(c),c.value},set(u,c){if(e.size>=t&&s){const p=s;e.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const d=e.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,s||(s=p),e.set(u,p)}},clear(){e.clear(),s=void 0,a=void 0}}}var ts=4,Hv=5;function uS(t){const e=t.indexOf("{");if(e===-1)return null;const s=t.indexOf("}",e);return s===-1||e+1>=t.length?null:[e,s]}function qf(t,e,s=new Uint16Array(6)){const a=t.indexOf("/",e),l=a===-1?t.length:a,u=t.substring(e,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=e,s[2]=e,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=t.length;return s[0]=2,s[1]=e,s[2]=e,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=e,s[2]=e+1,s[3]=l,s[4]=l,s[5]=l,s;const c=uS(u);if(c){const[d,p]=c,m=u.charCodeAt(d+1);if(m===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const y=d+3,g=p;if(y<g)return s[0]=3,s[1]=e+d,s[2]=e+y,s[3]=e+g,s[4]=e+p+1,s[5]=l,s}}else if(m===36){const y=d+1,g=d+2;return g===p?(s[0]=2,s[1]=e+d,s[2]=e+y,s[3]=e+g,s[4]=e+p+1,s[5]=t.length,s):(s[0]=1,s[1]=e+d,s[2]=e+g,s[3]=e+p,s[4]=e+p+1,s[5]=l,s)}}return s[0]=0,s[1]=e,s[2]=e,s[3]=l,s[4]=l,s[5]=l,s}function vu(t,e,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,m=p.length,y=s.options?.caseSensitive??t,g=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<m;){const _=qf(p,d,e);let S;const O=d,E=_[5];switch(d=E+1,u++,_[0]){case 0:{const A=p.substring(_[2],_[3]);if(y){const M=l.static?.get(A);if(M)S=M;else{l.static??=new Map;const j=Bs(s.fullPath??s.from);j.parent=l,j.depth=u,S=j,l.static.set(A,j)}}else{const M=A.toLowerCase(),j=l.staticInsensitive?.get(M);if(j)S=j;else{l.staticInsensitive??=new Map;const N=Bs(s.fullPath??s.from);N.parent=l,N.depth=u,S=N,l.staticInsensitive.set(M,N)}}break}case 1:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=!g&&l.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===N&&I.suffix===X);if(V)S=V;else{const I=Qh(1,s.fullPath??s.from,j,N,X);S=I,I.depth=u,I.parent=l,l.dynamic??=[],l.dynamic.push(I)}break}case 3:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=!g&&l.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===N&&I.suffix===X);if(V)S=V;else{const I=Qh(3,s.fullPath??s.from,j,N,X);S=I,I.parent=l,I.depth=u,l.optional??=[],l.optional.push(I)}break}case 2:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=Qh(2,s.fullPath??s.from,j,N,X);S=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=S}if(g&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=Bs(s.fullPath??s.from);_.kind=Hv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=Bs(s.fullPath??s.from);_.kind=ts,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=g,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)vu(t,e,p,d,l,u,c)}function Fh(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Jr(t){if(t.pathless)for(const e of t.pathless)Jr(e);if(t.static)for(const e of t.static.values())Jr(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())Jr(e);if(t.dynamic?.length){t.dynamic.sort(Fh);for(const e of t.dynamic)Jr(e)}if(t.optional?.length){t.optional.sort(Fh);for(const e of t.optional)Jr(e)}if(t.wildcard?.length){t.wildcard.sort(Fh);for(const e of t.wildcard)Jr(e)}}function Bs(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Qh(t,e,s,a,l){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:a,suffix:l}}function cS(t,e){const s=Bs("/"),a=new Uint16Array(6);for(const l of t)vu(!1,a,l,1,s,0);Jr(s),e.masksTree=s,e.flatCache=ao(1e3)}function hS(t,e){t||="/";const s=e.flatCache.get(t);if(s)return s;const a=$f(t,e.masksTree);return e.flatCache.set(t,a),a}function fS(t,e,s,a,l){t||="/",a||="/";const u=e?`case\0${t}`:t;let c=l.singleCache.get(u);return c||(c=Bs("/"),vu(e,new Uint16Array(6),{from:t},1,c,0),l.singleCache.set(u,c)),$f(a,c,s)}function dS(t,e,s=!1){const a=s?t:`nofuzz\0${t}`,l=e.matchCache.get(a);if(l!==void 0)return l;t||="/";let u;
10try{u=$f(t,e.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=gS(u.route)),e.matchCache.set(a,u),u}function pS(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function mS(t,e=!1,s){const a=Bs(t.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return vu(e,l,t,1,a,0,p=>{if(s?.(p,d),p.id in u&&en(),u[p.id]=p,d!==0&&p.path){const m=pS(p.fullPath);(!c[m]||p.fullPath.endsWith("/"))&&(c[m]=p)}d++}),Jr(a),{processedTree:{segmentTree:a,singleCache:ao(1e3),matchCache:ao(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function $f(t,e,s=!1){const a=t.split("/"),l=vS(t,a,e,s);if(!l)return null;const[u]=qv(t,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function qv(t,e,s){const a=yS(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,m=s.extract?.segment??0;for(;d<a.length;c++,d++,p++,m++){const y=a[d];if(y.kind===ts)break;if(y.kind===Hv){m--,c--,p--;continue}const g=e[c],b=p;if(g&&(p+=g.length),y.kind===1){l??=s.node.fullPath.split("/");const _=l[m],S=y.prefix?.length??0;if(_.charCodeAt(S)===123){const O=y.suffix?.length??0,E=_.substring(S+2,_.length-O-1),A=g.substring(S,g.length-O);u[E]=decodeURIComponent(A)}else{const O=_.substring(1);u[O]=decodeURIComponent(g)}}else if(y.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[m],S=y.prefix?.length??0,O=y.suffix?.length??0,E=_.substring(S+3,_.length-O-1),A=y.suffix||y.prefix?g.substring(S,g.length-O):g;A&&(u[E]=decodeURIComponent(A))}else if(y.kind===2){const _=y,S=t.substring(b+(_.prefix?.length??0),t.length-(_.suffix?.length??0)),O=decodeURIComponent(S);u["*"]=O,u._splat=O;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:m}]}function gS(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function yS(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function vS(t,e,s,a){if(t==="/"&&s.index)return{node:s.index,skipped:0};const l=!ro(e),u=l&&t!=="/",c=e.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;d.length;){const y=d.pop(),{node:g,index:b,skipped:_,depth:S,statics:O,dynamics:E,optionals:A}=y;let{extract:M,rawParams:j,parsedParams:N}=y;if(g.kind===2&&g.route&&!Ll(m,y))continue;if(g.skipOnParamError){if(!hy(t,e,y))continue;j=y.rawParams,M=y.extract,N=y.parsedParams}a&&g.route&&g.kind!==ts&&Ll(p,y)&&(p=y);const X=b===c;if(X&&(g.route&&(!u||g.kind===ts||g.kind===2)&&Ll(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const V=X?void 0:e[b];let I;if(X&&g.index){const Y={node:g.index,index:b,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N};let W=!0;if(g.index.skipOnParamError&&(hy(t,e,Y)||(W=!1)),W){if(!E&&!A&&!_&&bS(O,c))return Y;Ll(m,Y)&&(m=Y)}}if(g.wildcard)for(let Y=g.wildcard.length-1;Y>=0;Y--){const W=g.wildcard[Y],{prefix:le,suffix:ie}=W;if(!(le&&(X||!(W.caseSensitive?V:I??=V.toLowerCase()).startsWith(le)))){if(ie){if(X)continue;const ge=e.slice(b).join("/").slice(-ie.length);if((W.caseSensitive?ge:ge.toLowerCase())!==ie)continue}d.push({node:W,index:c,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}}if(g.optional){const Y=_|1<<S,W=S+1;for(let le=g.optional.length-1;le>=0;le--){const ie=g.optional[le];d.push({node:ie,index:b,skipped:Y,depth:W,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X)for(let le=g.optional.length-1;le>=0;le--){const ie=g.optional[le],{prefix:ge,suffix:_e}=ie;if(ge||_e){const qe=ie.caseSensitive?V:I??=V.toLowerCase();if(ge&&!qe.startsWith(ge)||_e&&!qe.endsWith(_e))continue}d.push({node:ie,index:b+1,skipped:_,depth:W,statics:O,dynamics:E,optionals:A+Ul(c,b),extract:M,rawParams:j,parsedParams:N})}}if(!X&&g.dynamic&&V)for(let Y=g.dynamic.length-1;Y>=0;Y--){const W=g.dynamic[Y],{prefix:le,suffix:ie}=W;if(le||ie){const ge=W.caseSensitive?V:I??=V.toLowerCase();if(le&&!ge.startsWith(le)||ie&&!ge.endsWith(ie))continue}d.push({node:W,index:b+1,skipped:_,depth:S+1,statics:O,dynamics:E+Ul(c,b),optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X&&g.staticInsensitive){const Y=g.staticInsensitive.get(I??=V.toLowerCase());Y&&d.push({node:Y,index:b+1,skipped:_,depth:S+1,statics:O+Ul(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X&&g.static){const Y=g.static.get(V);Y&&d.push({node:Y,index:b+1,skipped:_,depth:S+1,statics:O+Ul(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(g.pathless){const Y=S+1;for(let W=g.pathless.length-1;W>=0;W--){const le=g.pathless[W];d.push({node:le,index:b,skipped:_,depth:Y,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}}}if(m)return m;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=e[b].length;const g=y===t.length?"/":t.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Ul(t,e){return 2**(t-e-1)}function bS(t,e){return t===2**(e-1)-1}function hy(t,e,s){try{const[a,l]=qv(t,e,s);s.rawParams=a,s.extract=l;const u=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function Ll(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===ts)>(t.node.kind===ts)||e.node.kind===ts==(t.node.kind===ts)&&e.depth>t.depth))):!0}function Jl(t){return Kf(t.filter(e=>e!==void 0).join("/"))}function Kf(t){return t.replace(/\/{2,}/g,"/")}function $v(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function rs(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function Kv(t){return rs($v(t))}function ru(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function _S(t,e,s){return ru(t,s)===ru(e,s)}function wS({base:t,to:e,trailingSlash:s="never",cache:a}){const l=e.startsWith("/"),u=!l&&e===".";let c;if(a){c=l?e:u?t:t+"\0"+e;const g=a.get(c);if(g)return g}let d;if(u)d=t.split("/");else if(l)d=e.split("/");else{for(d=t.split("/");d.length>1&&ro(d)==="";)d.pop();const g=e.split("/");for(let b=0,_=g.length;b<_;b++){const S=g[b];S===""?b?b===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(ro(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,m="";for(let g=0;g<d.length;g++){g>0&&(m+="/");const b=d[g];if(!b)continue;p=qf(b,0,p);const _=p[0];if(_===0){m+=b;continue}const S=p[5],O=b.substring(0,p[1]),E=b.substring(p[4],S),A=b.substring(p[2],p[3]);_===1?m+=O||E?`${O}{$${A}}${E}`:`$${A}`:_===2?m+=O||E?`${O}{$}${E}`:"$":m+=`${O}{-$${A}}${E}`}
10m=Kf(m);const y=m||"/";return c&&a&&a.set(c,y),y}function SS(t){const e=new Map(t.map(l=>[encodeURIComponent(l),l])),s=Array.from(e.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return l=>l.replace(a,u=>e.get(u)??u)}function Jh(t,e,s){const a=e[t];return typeof a!="string"?a:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>dy(l,s)).join("/"):dy(a,s)}function fy({path:t,params:e,decoder:s,...a}){let l=!1;const u=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!t.includes("$"))return{interpolatedPath:t,usedParams:u,isMissingParams:l};const c=t.length;let d=0,p,m="";for(;d<c;){const y=d;p=qf(t,y,p);const g=p[5];if(d=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+t.substring(y,g);continue}if(b===2){const _=e._splat;u._splat=_,u["*"]=_;const S=t.substring(y,p[1]),O=t.substring(p[4],g);if(!_){l=!0,(S||O)&&(m+="/"+S+O);continue}const E=Jh("_splat",e,s);m+="/"+S+E+O;continue}if(b===1){const _=t.substring(p[2],p[3]);!l&&!(_ in e)&&(l=!0),u[_]=e[_];const S=t.substring(y,p[1]),O=t.substring(p[4],g),E=Jh(_,e,s)??"undefined";m+="/"+S+E+O;continue}if(b===3){const _=t.substring(p[2],p[3]),S=e[_];if(S==null)continue;u[_]=S;const O=t.substring(y,p[1]),E=t.substring(p[4],g),A=Jh(_,e,s)??"";m+="/"+O+A+E;continue}}return t.endsWith("/")&&(m+="/"),{usedParams:u,interpolatedPath:m||"/",isMissingParams:l}}function dy(t,e){const s=encodeURIComponent(t);return e?.(s)??s}function vt(t){return t?.isNotFound===!0}function ES(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var TS="tsr-scroll-restoration-v1_3";function RS(){const t=ES();if(!t)return null;let e={};try{const a=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");Fa(a)&&(e=a)}catch{}return{get state(){return e},set:a=>{e=es(a,e)||e},persist:()=>{try{t.setItem(TS,JSON.stringify(e))}catch{}}}}var py=RS(),AS=t=>t.state.__TSR_key||t.href;function OS(t){const e=[];let s;for(;s=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,t)+1})`),t=s;return`${e.reverse().join(" > ")}`.toLowerCase()}var Bl=!1,Ki="window",my="data-scroll-restoration-id";function xS(t,e){if(!py)return;const s=py;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!s)return;t.isScrollRestorationSetup=!0,Bl=!1;const a=t.options.getScrollRestorationKey||AS,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(Bl||!t.isScrollRestoring))if(d.target===document||d.target===window)l.set(Ki,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>{if(!t.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[m,y]of l){let g;if(m===Ki)g=Ki;else if(m.isConnected){const b=m.getAttribute(my);g=b?`[${my}="${b}"]`:OS(m)}g&&(p[g]=y)}};document.addEventListener("scroll",u,!0),t.subscribe("onBeforeLoad",d=>{c(d.fromLocation?a(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(a(t.stores.resolvedLocation.get()??t.stores.location.get())),s.persist()}),t.subscribe("onRendered",d=>{const p=a(d.toLocation),m=t.options.scrollRestorationBehavior,y=t.options.scrollToTopSelectors;if(l.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){Bl=!0;try{const g=t.isScrollRestoring?s.state[p]:void 0;let b=!1;if(g)for(const _ in g){const S=g[_];if(!Fa(S))continue;const{scrollX:O,scrollY:E}=S;if(!(!Number.isFinite(O)||!Number.isFinite(E))){if(_===Ki)window.scrollTo({top:E,left:O,behavior:m}),b=!0;else if(_){let A;try{A=document.querySelector(_)}catch{continue}A&&(A.scrollLeft=O,A.scrollTop=E,b=!0)}}}if(!b){const _=t.history.location.hash.slice(1);if(_){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const O=document.getElementById(_);O&&O.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:m};if(window.scrollTo(S),y)for(const O of y){if(O===Ki)continue;const E=typeof O=="function"?O():document.querySelector(O);E&&E.scrollTo(S)}}}}finally{Bl=!1}t.isScrollRestoring&&s.set(g=>(g[p]||={},g))}})}function Gv(t,e=String){const s=new URLSearchParams;for(const a in t){const l=t[a];l!==void 0&&s.set(a,e(l))}return s.toString()}function Xh(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function CS(t){const e=new URLSearchParams(t),s=Object.create(null);for(const[a,l]of e.entries()){const u=s[a];u==null?s[a]=Xh(l):Array.isArray(u)?u.push(Xh(l)):s[a]=[u,Xh(l)]}return s}var kS=MS(JSON.parse),jS=DS(JSON.stringify,JSON.parse);function MS(t){return e=>{e[0]==="?"&&(e=e.substring(1));const s=CS(e);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=t(l)}catch{}}return s}}function DS(t,e){const s=typeof e=="function";function a(l){if(typeof l=="object"&&l!==null)try{return t(l)}catch{}else if(s&&typeof l=="string")try{return e(l),t(l)}catch{}return l}return l=>{const u=Gv(l,a);return u?`?${u}
10`:""}}var Hs="__root__";function Gf(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:e});if(s.options=t,t.throw)throw s;return s}function Wt(t){return t instanceof Response&&!!t.options}function NS(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return Gf(t)}function US(t){return{input:({url:e})=>{for(const s of t)e=vf(s,e);return e},output:({url:e})=>{for(let s=t.length-1;s>=0;s--)e=Vv(t[s],e);return e}}}function LS(t){const e=Kv(t.basepath),s=`/${e}`,a=`${s}/`,l=t.caseSensitive?s:s.toLowerCase(),u=t.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const d=t.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Jl(["/",e,c.pathname]),c)}}function vf(t,e){const s=t?.input?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function Vv(t,e){const s=t?.output?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function BS(t,e){const{createMutableStore:s,createReadonlyStore:a,batch:l,init:u}=e,c=new Map,d=new Map,p=new Map,m=s(t.status),y=s(t.loadedAt),g=s(t.isLoading),b=s(t.isTransitioning),_=s(t.location),S=s(t.resolvedLocation),O=s(t.statusCode),E=s(t.redirect),A=s([]),M=s([]),j=s([]),N=a(()=>Zh(c,A.get())),X=a(()=>Zh(d,M.get())),V=a(()=>Zh(p,j.get())),I=a(()=>A.get()[0]),Y=a(()=>A.get().some(F=>c.get(F)?.get().status==="pending")),W=a(()=>({locationHref:_.get().href,resolvedLocationHref:S.get()?.href,status:m.get()})),le=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:N.get(),location:_.get(),resolvedLocation:S.get(),statusCode:O.get(),redirect:E.get()})),ie=ao(64);function ge(F){let se=ie.get(F);return se||(se=a(()=>{const Se=A.get();for(const ye of Se){const C=c.get(ye);if(C&&C.routeId===F)return C.get()}}),ie.set(F,se)),se}const _e={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:_,resolvedLocation:S,statusCode:O,redirect:E,matchesId:A,pendingIds:M,cachedIds:j,matches:N,pendingMatches:X,cachedMatches:V,firstId:I,hasPending:Y,matchRouteDeps:W,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:le,getRouteMatchStore:ge,setMatches:qe,setPending:Me,setCached:L};qe(t.matches),u?.(_e);function qe(F){Wh(F,c,A,s,l)}function Me(F){Wh(F,d,M,s,l)}function L(F){Wh(F,p,j,s,l)}return _e}function Zh(t,e){const s=[];for(const a of e){const l=t.get(a);l&&s.push(l.get())}return s}function Wh(t,e,s,a,l){const u=t.map(d=>d.id),c=new Set(u);l(()=>{for(const d of e.keys())c.has(d)||e.delete(d);for(const d of t){const p=e.get(d.id);if(!p){const m=a(d);m.routeId=d.routeId,e.set(d.id,m);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}lS(s.get(),u)||s.set(u)})}var bf=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},PS=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),bu=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),qs=(t,e,s=!0)=>{const a={...t.router.options.context??{}},l=s?e:e-1;for(let u=0;u<=l;u++){const c=t.matches[u];if(!c)continue;const d=t.router.getMatch(c.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},gy=(t,e)=>{if(!t.matches.length)return;const s=e.routeId,a=t.matches.findIndex(c=>c.routeId===t.router.routeTree.id),l=a>=0?a:0;let u=s?t.matches.findIndex(c=>c.routeId===s):t.firstBadMatchIndex??t.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const d=t.matches[c];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},ns=(t,e,s)=>{if(!(!Wt(s)&&!vt(s)))throw Wt(s)&&s.redirectHandled&&!s.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=s,t.updateMatch(e.id,a=>({...a,status:Wt(s)?"redirected":vt(s)?"notFound":a.status==="pending"?"success":a.status,context:qs(t,e.index),isFetching:!1,error:s})),vt(s)&&!s.routeId&&(s.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Wt(s)&&(t.rendered=!0,s.options._fromLocation=t.location,s.redirectHandled=!0,s=t.router.resolveRedirect(s))),s},Yv=(t,e)=>{const s=t.router.getMatch(e);return!!(!s||s._nonReactive.dehydrated)},yy=(t,e,s)=>{const a=qs(t,s);t.updateMatch(e,l=>({...l,context:a}))},Gi=(t,e,s,a)=>{const{id:l,routeId:u}=t.matches[e],c=t.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=a,t.firstBadMatchIndex??=e,ns(t,t.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,ns(t,t.router.getMatch(l),s)}t.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Wt(s)&&!vt(s)&&(t.serialError??=s)},Fv=(t,e,s,a)=>
10{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!bu(t,e)&&(s.options.loader||s.options.beforeLoad||Jv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??t.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{bf(t)},l);a._nonReactive.pendingTimeout=u}},zS=(t,e,s)=>{const a=t.router.getMatch(e);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Fv(t,e,s,a);const l=()=>{const u=t.router.getMatch(e);u.preload&&(u.status==="redirected"||u.status==="notFound")&&ns(t,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},IS=(t,e,s,a)=>{const l=t.router.getMatch(e);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=$s(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&Gi(t,s,c,"PARSE_PARAMS"),d&&Gi(t,s,d,"VALIDATE_SEARCH"),Fv(t,e,a,l);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,t.updateMatch(e,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:p})))},g=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,N=>({...N,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{y(),g()});return}l._nonReactive.beforeLoadPromise=$s();const b={...qs(t,s,!1),...l.__routeContext},{search:_,params:S,cause:O}=l,E=bu(t,e),A={search:_,abortController:p,params:S,preload:E,context:b,location:t.location,navigate:N=>t.router.navigate({...N,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":O,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},M=N=>{if(N===void 0){t.router.batch(()=>{y(),g()});return}(Wt(N)||vt(N))&&(y(),Gi(t,s,N,"BEFORE_LOAD")),t.router.batch(()=>{y(),t.updateMatch(e,X=>({...X,__beforeLoadContext:N})),g()})};let j;try{if(j=a.options.beforeLoad(A),so(j))return y(),j.catch(N=>{Gi(t,s,N,"BEFORE_LOAD")}).then(M)}catch(N){y(),Gi(t,s,N,"BEFORE_LOAD")}M(j)},HS=(t,e)=>{const{id:s,routeId:a}=t.matches[e],l=t.router.looseRoutesById[a],u=()=>d(),c=()=>IS(t,s,e,l),d=()=>{if(Yv(t,s))return;const p=zS(t,s,l);return so(p)?p.then(c):c()};return u()},qS=(t,e,s)=>{const a=t.router.getMatch(e);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:t.router.options.ssr,matches:t.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},Qv=(t,e,s,a,l)=>{const u=e[a-1],{params:c,loaderDeps:d,abortController:p,cause:m}=t.router.getMatch(s),y=qs(t,a),g=bu(t,s);return{params:c,deps:d,preload:!!g,parentMatchPromise:u,abortController:p,context:y,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),cause:g?"preload":m,route:l,...t.router.options.additionalContext}},vy=async(t,e,s,a,l)=>{try{const u=t.router.getMatch(s);try{(!(Iv??t.router.isServer)||u.ssr===!0)&&io(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(Qv(t,e,s,a,l)),m=!!d&&so(p);if((m||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&t.updateMatch(s,g=>({...g,isFetching:"loader"})),d){const g=m?await p:p;ns(t,t.router.getMatch(s),g),g!==void 0&&t.updateMatch(s,b=>({...b,loaderData:g}))}l._lazyPromise&&await l._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,t.updateMatch(s,g=>({...g,error:void 0,context:qs(t,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}t.updateMatch(s,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:qs(t,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,vt(c)&&await l.options.notFoundComponent?.preload?.(),ns(t,t.router.getMatch(s),c);try{l.options.onError?.(c)}catch(m){d=m,ns(t,t.router.getMatch(s),m)}!Wt(d)&&!vt(d)&&await io(l,["errorComponent"]),t.updateMatch(s,m=>
10({...m,error:d,context:qs(t,a),status:"error",isFetching:!1}))}}catch(u){const c=t.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),ns(t,c,u)}},$S=async(t,e,s)=>{async function a(_,S,O,E,A){const M=Date.now()-S.updatedAt,j=_?A.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??t.router.options.defaultStaleTime??0,N=A.options.shouldReload,X=typeof N=="function"?N(Qv(t,e,l,s,A)):N,{status:V,invalid:I}=E,Y=M>=j&&(!!t.forceStaleReload||E.cause==="enter"||O!==void 0&&O!==E.id);c=V==="success"&&(I||(X??Y)),_&&A.options.preload===!1||(c&&!t.sync&&y?(d=!0,(async()=>{try{await vy(t,e,l,s,A);const W=t.router.getMatch(l);W._nonReactive.loaderPromise?.resolve(),W._nonReactive.loadPromise?.resolve(),W._nonReactive.loaderPromise=void 0,W._nonReactive.loadPromise=void 0}catch(W){Wt(W)&&await t.router.navigate(W.options)}})()):V!=="success"||c?await vy(t,e,l,s,A):yy(t,l,s))}const{id:l,routeId:u}=t.matches[s];let c=!1,d=!1;const p=t.router.looseRoutesById[u],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Yv(t,l)){if(!t.router.getMatch(l))return t.matches[s];yy(t,l,s)}else{const _=t.router.getMatch(l),S=t.router.stores.matchesId.get()[s],O=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===u?S:t.router.stores.matches.get().find(A=>A.routeId===u)?.id,E=bu(t,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!t.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const A=t.router.getMatch(l),M=A._nonReactive.error||A.error;M&&ns(t,A,M),A.status==="pending"&&await a(E,_,O,A,p)}else{const A=E&&!t.router.stores.matchStores.has(l),M=t.router.getMatch(l);M._nonReactive.loaderPromise=$s(),A!==M.preload&&t.updateMatch(l,j=>({...j,preload:A})),await a(E,_,O,M,p)}}const g=t.router.getMatch(l);d||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,d||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=d?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(t.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),t.router.getMatch(l)):g};async function by(t){const e=t,s=[];PS(e.router)&&bf(e);let a;for(let b=0;b<e.matches.length;b++){try{const _=HS(e,b);so(_)&&await _}catch(_){if(Wt(_))throw _;if(vt(_))a=_;else if(!e.preload)throw _;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const l=e.firstBadMatchIndex??e.matches.length,u=a&&!e.preload?gy(e,a):void 0,c=a&&e.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push($S(e,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const S=_.reason;if(Wt(S))throw S;vt(S)?d??=S:p??=S}if(p!==void 0)throw p}const m=d??(a&&!e.preload?a:void 0);let y=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!m&&a&&e.preload)return e.matches;if(m){const b=gy(e,m);b===void 0&&en();const _=e.matches[b],S=e.router.looseRoutesById[_.routeId],O=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&O&&(S.options.notFoundComponent=O),m.routeId=_.routeId;const E=_.routeId===e.router.routeTree.id;e.updateMatch(_.id,A=>({...A,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await io(S,["notFoundComponent"])}else if(!e.preload){const b=e.matches[0];b.globalNotFound||e.router.getMatch(b.id)?.globalNotFound&&e.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const b=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await io(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:S}=e.matches[b],O=e.router.looseRoutesById[S];try{const E=qS(e,_,O);if(E){const A=await E;e.updateMatch(_,M=>({...M,...A}))}}catch(E){console.error(`Error executing head for route ${S}:`,E)}}const g=bf(e);if(so(g)&&await g,m)throw m;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function _y(t,e){const s=e.map(a=>
10t.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function io(t,e=Xl){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(a=>{const{id:l,...u}=a.options;Object.assign(t.options,u),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const s=()=>t._componentsLoaded?void 0:e===Xl?(()=>{if(t._componentsPromise===void 0){const a=_y(t,Xl);a?t._componentsPromise=a.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():_y(t,e);return t._lazyPromise?t._lazyPromise.then(s):s()}function Jv(t){for(const e of Xl)if(t.options[e]?.preload)return!0;return!1}var Xl=["component","errorComponent","pendingComponent","notFoundComponent"],ss="__TSR_index",wy="popstate",Sy="beforeunload";function KS(t){let e=t.getLocation();const s=new Set,a=c=>{e=t.getLocation(),s.forEach(d=>d({location:e,action:c}))},l=c=>{t.notifyOnIndexChange??!0?a(c):e=t.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){c();return}const m=t.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=su(p.path,p.state);if(await g.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const m=e.state[ss];d=Ey(m+1,d),u({task:()=>{t.pushState(c,d),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const m=e.state[ss];d=Ey(m,d),u({task:()=>{t.replaceState(c,d),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{t.go(c),l({type:"GO",index:c})},navigateOpts:d,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[ss]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(m=>m!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:a}}function Ey(t,e){e||(e={});const s=Vf();return{...e,key:s,__TSR_key:s,[ss]:t}}function GS(t){const e=typeof document<"u"?window:void 0,s=e.history.pushState,a=e.history.replaceState;let l=[];const u=()=>l,c=Y=>l=Y,d=(Y=>Y),p=(()=>su(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const Y=Vf();e.history.replaceState({[ss]:0,key:Y,__TSR_key:Y},"")}let m=p(),y,g=!1,b=!1,_=!1,S=!1;const O=()=>m;let E,A;const M=()=>{E&&(I._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),I._ignoreSubscribers=!1,E=void 0,A=void 0,y=void 0)},j=(Y,W,le)=>{const ie=d(W);A||(y=m),m=su(W,le),E={href:ie,state:le,isPush:E?.isPush||Y==="push"},A||(A=Promise.resolve().then(()=>M()))},N=Y=>{m=p(),I.notify({type:Y})},X=async()=>{if(b){b=!1;return}const Y=p(),W=Y.state[ss]-m.state[ss],le=W===1,ie=W===-1,ge=!le&&!ie||g;g=!1;const _e=ge?"GO":ie?"BACK":"FORWARD",qe=ge?{type:"GO",index:W}:{type:ie?"BACK":"FORWARD"};if(_)_=!1;else{const Me=u();if(typeof document<"u"&&Me.length){for(const L of Me)if(await L.blockerFn({currentLocation:m,nextLocation:Y,action:_e})){b=!0,e.history.go(1),I.notify(qe);return}}}m=p(),I.notify(qe)},V=Y=>{if(S){S=!1;return}let W=!1;const le=u();if(typeof document<"u"&&le.length)for(const ie of le){const ge=ie.enableBeforeUnload??!0;if(ge===!0){W=!0;break}if(typeof ge=="function"&&ge()===!0){W=!0;break}}if(W)return Y.preventDefault(),Y.returnValue=""},I=KS({getLocation:O,getLength:()=>e.history.length,pushState:(Y,W)=>j("push",Y,W),replaceState:(Y,W)=>j("replace",Y,W),back:Y=>(Y&&(_=!0),S=!0,e.history.back()),forward:Y=>{Y&&(_=!0),S=!0,e.history.forward()},go:Y=>{g=!0,e.history.go(Y)},createHref:Y=>d(Y),flush:M,destroy:()=>{e.history.pushState=s,e.history.replaceState=a,e.removeEventListener(Sy,V,{capture:!0}),e.removeEventListener(wy,X)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(Sy,V,{capture:!0}),e.addEventListener(wy,X),e.history.pushState=function(...Y){const W=s.apply(e.history,Y);return I._ignoreSubscribers||N("PUSH"),W},e.history.replaceState=function(...Y){const W=a.apply(e.history,Y);return I._ignoreSubscribers||N("REPLACE"),W},I}function VS(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function su(t,e){const s=VS(t),a=s.indexOf("#"),l=s.indexOf("?"),u=Vf();return{href:s,pathname:s.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:s.length),hash:a>-1?s.substring(a):"",search:l>-1?s.slice(l,a===-1?void 0:a):"",state:e||{[ss]:0,key:u,__TSR_key:u}}}function Vf(){return(Math.random()+1).toString(36).substring(7)}function YS(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function Ka(t,e){const s=e,a=t;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var FS=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{const a=this.options,l=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=SS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=GS()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=ao(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=BS(JS(this.latestLocation),y),xS(this)}let d=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(u||l!==p||c!==m){this.basepath=p;const y=[],g=Kv(p);g&&g!=="/"&&y.push(LS({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:US(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=mS(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&cS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const l={eventType:s,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
10{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),M=this.options.stringifySearch(A);return{href:p+M+y,publicHref:p+M+y,pathname:$i(p).path,external:!1,searchStr:M,search:Ms(a?.search,A),hash:$i(y.slice(1)).path,state:Ls(a?.state,b)}}const _=new URL(g,this.origin),S=vf(this.rewrite,_),O=this.options.parseSearch(S.search),E=this.options.stringifySearch(O);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:g,pathname:$i(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:E,search:Ms(a?.search,O),hash:$i(S.hash.slice(1)).path,state:Ls(a?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===this.tempLocationKey)){const p=l(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(s,a)=>wS({base:s,to:Kf(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},l):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>XS({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,m=this.resolvePathWithBase(p,"."),y=d.search,g=Object.assign(Object.create(null),d.params),b=u.to?this.resolvePathWithBase(m,`${u.to}`):this.resolvePathWithBase(m,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?g:Object.assign(g,es(u.params,g)),S=this.getMatchedRoutes(b);let O=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(O=[...O,this.options.notFoundRoute]),Object.keys(_).length>0)for(const le of O){const ie=le.options.params?.stringify??le.options.stringifyParams;if(ie)try{Object.assign(_,ie(_))}catch{}}const E=s.leaveParams?b:$i(fy({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(s._includeValidateSearch&&this.options.search?.strict){const le={};O.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(le,Zl(ie.options.validateSearch,{...le,...A}))}catch{}}),A=le}A=ZS({search:A,dest:u,destRoutes:O,_includeValidateSearch:s._includeValidateSearch}),A=Ms(y,A);const M=this.options.stringifySearch(A),j=u.hash===!0?c.hash:u.hash?es(u.hash,c.hash):void 0,N=j?`#${j}`:"";let X=u.state===!0?c.state:u.state?es(u.state,c.state):{};X=Ls(c.state,X);const V=`${E}${M}${N}`;let I,Y,W=!1;if(this.rewrite){const le=new URL(V,this.origin),ie=Vv(this.rewrite,le);I=le.href.replace(le.origin,""),ie.origin!==this.origin?(Y=ie.href,W=!0):Y=ie.pathname+ie.search+ie.hash}else I=oS(V),Y=I;return{publicHref:Y,href:I,pathname:E,search:A,searchStr:M,state:X,hash:j??"",external:W,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=a(u);let p=c?a(c):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=hS(d.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,..._}=y.route,S=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,es(b,m));c={from:s.from,..._,params:S},p=a(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const m=Zt(l.state,this.latestLocation.state);return p.forEach(y=>{delete l.state[y]}),m},c=rs(this.latestLocation.href)===rs(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=$s(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=l;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:a,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>
10{if(d){const g=this.history.location.state.__TSR_index,b=su(d,{__TSR_index:s?g:g+1}),_=new URL(b.pathname,this.origin);p.to=vf(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:u,replace:s,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:a,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(s!==void 0||!l){const m=this.buildLocation({to:s,...c});l=l??m.publicHref,u=u??m.publicHref}const p=!d&&u?u:l;if(nu(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(l=>!s.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(a)})},this.load=async s=>{let a,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=Ka(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await by({router:this,sync:s?.sync,forceStaleReload:c.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,_=null,S=null;this.batch(()=>{const O=this.stores.pendingMatches.get(),E=O.length,A=this.stores.matches.get();g=E?A.filter(N=>!this.stores.pendingMatchStores.has(N.id)):null;const M=new Set;for(const N of this.stores.pendingMatchStores.values())N.routeId&&M.add(N.routeId);const j=new Set;for(const N of this.stores.matchStores.values())N.routeId&&j.add(N.routeId);b=E?A.filter(N=>!M.has(N.routeId)):null,_=E?O.filter(N=>!j.has(N.routeId)):null,S=E?O.filter(N=>j.has(N.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(O),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]),this.clearExpiredCache())});for(const[O,E]of[[b,"onLeave"],[_,"onEnter"],[S,"onStay"]])if(O)for(const A of O)this.looseRoutesById[A.routeId].options[E]?.(A)})})}})}catch(m){Wt(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):vt(m)&&(l=m);const y=a?a.status:l?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(Ka(u,c)):a.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(a);return}const u=this.stores.matchStores.get(s);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=a(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==s)):c.set(d)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const a=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&nu(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=io,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await by({router:this,matches:l,location:a,preload:!0,updateMatch:(p,m)=>{u.has(p)?l=l.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),l}catch(p){if(Wt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});vt(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=fS(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!Zt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?Zt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??jS,parseSearch:t.parseSearch??kS,protocolAllowlist:t.protocolAllowlist??rS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:s}){this.routesById=t,this.routesByPath=e,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const s=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParam
10s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(a?a.path!=="/"&&l["**"]:rs(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?eE(this.options.notFoundMode,c):void 0,m=new Array(c.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<c.length;g++){const b=c[g],_=m[g-1];let S,O,E;{const _e=_?.search??t.search,qe=_?._strictSearch??void 0;try{const Me=Zl(b.options.validateSearch,{..._e})??void 0;S={..._e,...Me},O={...qe,...Me},E=void 0}catch(Me){let L=Me;if(Me instanceof au||(L=new au(Me.message,{cause:Me})),e?.throwOnError)throw L;S=_e,O={},E=L}}const A=b.options.loaderDeps?.({search:S})??"",M=A?JSON.stringify(A):"",{interpolatedPath:j,usedParams:N}=fy({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),X=b.id+j+M,V=this.getMatch(X),I=y.get(b.id),Y=V?._strictParams??N;let W;if(!V)try{Ty(b,N,u,Y)}catch(_e){if(vt(_e)||Wt(_e)?W=_e:W=new QS(_e.message,{cause:_e}),e?.throwOnError)throw W}Object.assign(l,Y);const le=I?"stay":"enter";let ie;if(V)ie={...V,cause:le,params:I?.params??l,_strictParams:Y,search:Ms(I?I.search:V.search,S),_strictSearch:O};else{const _e=b.options.loader||b.options.beforeLoad||b.lazyFn||Jv(b)?"pending":"success";ie={id:X,ssr:b.options.ssr,index:g,routeId:b.id,params:I?.params??l,_strictParams:Y,pathname:j,updatedAt:Date.now(),search:I?Ms(I.search,S):S,_strictSearch:O,searchError:void 0,status:_e,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:$s()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:I?Ls(I.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}e?.preload||(ie.globalNotFound=p===b.id),ie.searchError=E;const ge=this.getParentContext(_);ie.context={...ge,...ie.__routeContext,...ie.__beforeLoadContext},m[g]=ie}for(let g=0;g<m.length;g++){const b=m[g],_=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),O=y.get(b.routeId);if(b.params=O?Ms(O.params,l):l,!S){const E=m[g-1],A=this.getParentContext(E);if(_.options.context){const M={deps:b.loaderDeps,params:b.params,context:A??{},location:t,navigate:j=>this.navigate({...j,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:_.id};b.__routeContext=_.options.context(M)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:s,parsedParams:a}=this.getMatchedRoutes(t.pathname),l=ro(e),u={...t.search};for(const y of e)try{Object.assign(u,Zl(y.options.validateSearch,u))}catch{}const c=ro(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===t.pathname;let m;if(p)m=d.params;else{const y=Object.assign(Object.create(null),s);for(const g of e)try{Ty(g,s,a??{},y)}catch{}m=y}return{matchedRoutes:e,fullPath:l.fullPath,search:u,params:m}}},au=class extends Error{},QS=class extends Error{};function JS(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Zl(t,e){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(e);if(s instanceof Promise)throw new au("Async validation not supported");if(s.issues)throw new au(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function XS({pathname:t,routesById:e,processedTree:s}){const a=Object.create(null),l=rs(t);let u,c;const d=dS(l,s,!0);return d&&(u=d.route,Object.assign(a,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[e.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function ZS({search:t,dest:e,destRoutes:s,_includeValidateSearch:a}){return WS(s)(t,e,a??!1)}function WS(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of t){if("search"in l.options)l.options.search?.middlewares&&e.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,g)=>g(y),c));const m=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,g)=>g(y),m):m};e.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!e._includeValidateSearch)return p;try{return{...p,...Zl(l.options.validateSearch,p)??void 0}}catch{return p}};e.middlewares.push(u)}}const s=({search:l})=>{const u=e.dest;return u.search?u.search===!0?l:es(u.search,l):{}};e.middlewares.push(s);const a=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:m=>a(l+1,m,c)})};return function(u,c,d){return e.dest=c,e._includeValidateSearch=d,a(0,u,e.middlewares)}}function eE(t,e){if(t!=="root")for(let s=e.length-1;s>=0;s--){const a=e[s];if(a.children)return a.id}return Hs}function Ty(t,e,s,a){const l=t.options.params?.parse??t.options.parseParams;if(l)if(t.options.skipRouteOnParseError)for(const u in e)u in s&&(a[u]=s[u]);else{const u=l(a);Object.assign(a,u)}}var Gn=Symbol.for("TSR_DEFERRED_PROMISE");function tE(t,e){const s=t;return s[Gn]||(s[Gn]={status:"pending"},s.then(a=>{s[Gn].status="success",s[Gn].data=a}).catch(a=>{s[Gn].status="error",s[Gn].error={data:YS(a),__isServerError:!0}})),s}var nE="Error preloading route! âï¸";function Ry(t,e){if(t)return typeof t=="string"?t:t[e]}function rE(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function sE(t){if(t.tag!=="link")return;const e=t.attrs?.rel,s=t.attrs?.href;if(typeof s=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return s}function aE(t,e){const s=sE(e);return!!s&&t?.inlineCss?.styles[s]!==void 0}var Xv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Hs:this.parentRoute||en();let l=a?Hs:s?.path;l&&l!=="/"&&(l=$v(l));const u=s?.id||l;let c=a?Hs:Jl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Jl(["/",c]));const d=c==="__root__"?"/":Jl([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=rs(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Gf({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.")}},iE=class extends Xv{constructor(t){super(t)}};function oE(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),s=e.state.__hashScrollIntoViewOptions??!0;if(s&&e.hash!==""){const a=document.getElementById(e.hash);a&&a.scrollIntoView(s)}}}var lE=(t=>(t[t.AggregateError=1]="AggregateError",t[t.ArrowFunction=2]="ArrowFunction",t[t.ErrorPrototypeStack=4]="ErrorPrototypeStack",t[t.ObjectAssign=8]="ObjectAssign",t[t.BigIntTypedArray=16]="BigIntTypedArray",t[t.RegExp=32]="RegExp",t))(lE||{}),_r=Symbol.asyncIterator,Zv=Symbol.hasInstance,Ga=Symbol.isConcatSpreadable,wr=Symbol.iterator,Wv=Symbol.match,e0=Symbol.matchAll,t0=Symbol.replace,n0=Symbol.search,r0=Symbol.species,s0=Symbol.split,a0=Symbol.toPrimitive,Va=Symbol.toStringTag,i0=Symbol.unscopables,o0={[_r]:0,[Zv]:1,[Ga]:2,[wr]:3,[Wv]:4,[e0]:5,[t0]:6,[n0]:7,[r0]:8,[s0]:9,[a0]:10,[Va]:11,[i0]:12},uE={0:_r,1:Zv,2:Ga,3:wr,4:Wv,5:e0,6:t0,7:n0,8:r0,9:s0,10:a0,11:Va,12:i0},R=void 0,cE={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},hE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},fE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function je(t,e,s,a,l,u,c,d,p,m,y,g){return{t,i:e,s,c:a,m:l,p:u,e:c,a:d,f:p,b:m,o:y,l:g}}function as(t){return je(2,R,t,R,R,R,R,R,R,R,R,R)}var l0=as(2),u0=as(3),dE=as(1),pE=as(0),mE=as(4),gE=as(5),yE=as(6),vE=as(7);function bE(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function is(t){let e="",s=0,a;for(let l=0,u=t.length;l<u;l++)a=bE(t[l]),a&&(e+=t.slice(s,l)+a,s=l+1);return s===0?e=t:e+=t.slice(s),e}function _E(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function os(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,_E)}var Pl="__SEROVAL_REFS__",c0=new Map,qa=new Map;function h0(t){return c0.has(t)}function wE(t){return qa.has(t)}function SE(t){if(h0(t))return c0.get(t);throw new WE(t)}function EE(t){if(wE(t))return qa.get(t);throw new eT(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,Pl,{value:qa,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Pl,{value:qa,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Pl,{value:qa,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Pl,{value:qa,configurable:!0,writable:!1,enumerable:!1});function Yf(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 TE(t){let e=hE[Yf(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function f0(t,e){let s=TE(t),a=Object.getOwnPropertyNames(t);for(let l=0,u=a.length,c;
12l<u;l++)c=a[l],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(s=s||{},s[c]=t[c]):(s=s||{},s[c]=t[c]));return s}function d0(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function RE(t){switch(t){case Number.POSITIVE_INFINITY:return gE;case Number.NEGATIVE_INFINITY:return yE}return t!==t?vE:Object.is(t,-0)?mE:je(0,R,t,R,R,R,R,R,R,R,R,R)}function p0(t){return je(1,R,is(t),R,R,R,R,R,R,R,R,R)}function AE(t){return je(3,R,""+t,R,R,R,R,R,R,R,R,R)}function OE(t){return je(4,t,R,R,R,R,R,R,R,R,R,R)}function xE(t,e){let s=e.valueOf();return je(5,t,s!==s?"":e.toISOString(),R,R,R,R,R,R,R,R,R)}function CE(t,e){return je(6,t,R,is(e.source),e.flags,R,R,R,R,R,R,R)}function kE(t,e){return je(17,t,o0[e],R,R,R,R,R,R,R,R,R)}function jE(t,e){return je(18,t,is(SE(e)),R,R,R,R,R,R,R,R,R)}function ME(t,e,s){return je(25,t,s,is(e),R,R,R,R,R,R,R,R)}function DE(t,e,s){return je(9,t,R,R,R,R,R,s,R,R,d0(e),R)}function NE(t,e){return je(21,t,R,R,R,R,R,R,e,R,R,R)}function UE(t,e,s){return je(15,t,R,e.constructor.name,R,R,R,R,s,e.byteOffset,R,e.length)}function LE(t,e,s){return je(16,t,R,e.constructor.name,R,R,R,R,s,e.byteOffset,R,e.byteLength)}function BE(t,e,s){return je(20,t,R,R,R,R,R,R,s,e.byteOffset,R,e.byteLength)}function PE(t,e,s){return je(13,t,Yf(e),R,is(e.message),s,R,R,R,R,R,R)}function zE(t,e,s){return je(14,t,Yf(e),R,is(e.message),s,R,R,R,R,R,R)}function IE(t,e){return je(7,t,R,R,R,R,R,e,R,R,R,R)}function HE(t,e){return je(28,R,R,R,R,R,R,[t,e],R,R,R,R)}function qE(t,e){return je(30,R,R,R,R,R,R,[t,e],R,R,R,R)}function $E(t,e,s){return je(31,t,R,R,R,R,R,s,e,R,R,R)}function KE(t,e){return je(32,t,R,R,R,R,R,R,e,R,R,R)}function GE(t,e){return je(33,t,R,R,R,R,R,R,e,R,R,R)}function VE(t,e){return je(34,t,R,R,R,R,R,R,e,R,R,R)}function YE(t,e,s,a){return je(35,t,s,R,R,R,R,e,R,R,R,a)}var FE={parsing:1,serialization:2,deserialization:3};function QE(t){return`Seroval Error (step: ${FE[t]})`}var JE=(t,e)=>QE(t),m0=class extends Error{constructor(t,e){super(JE(t)),this.cause=e}},Ay=class extends m0{constructor(t){super("parsing",t)}},XE=class extends m0{constructor(t){super("deserialization",t)}};function Sr(t){return`Seroval Error (specific: ${t})`}var _u=class extends Error{constructor(e){super(Sr(1)),this.value=e}},g0=class extends Error{constructor(e){super(Sr(2))}},ZE=class extends Error{constructor(t){super(Sr(3))}},bo=class extends Error{constructor(t){super(Sr(4))}},WE=class extends Error{constructor(t){super(Sr(5)),this.value=t}},eT=class extends Error{constructor(t){super(Sr(6))}},tT=class extends Error{constructor(t){super(Sr(7))}},ls=class extends Error{constructor(t){super(Sr(8))}},nT=class extends Error{constructor(e){super(Sr(9))}},rT=class{constructor(t,e){this.value=t,this.replacement=e}},wu=()=>{let t={p:0,s:0,f:0};return t.p=new Promise((e,s)=>{t.s=e,t.f=s}),t},sT=(t,e)=>{t.s(e),t.p.s=1,t.p.v=e},aT=(t,e)=>{t.f(e),t.p.s=2,t.p.v=e};wu.toString();sT.toString();aT.toString();var iT=()=>{let t=[],e=[],s=!0,a=!1,l=0,u=(p,m,y)=>{for(y=0;y<l;y++)e[y]&&e[y][m](p)},c=(p,m,y,g)=>{for(m=0,y=t.length;m<y;m++)g=t[m],!s&&m===y-1?p[a?"return":"throw"](g):p.next(g)},d=(p,m)=>(s&&(m=l++,e[m]=p),c(p),()=>{s&&(e[m]=e[l],e[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(t.push(p),u(p,"next"))},throw:p=>{s&&(t.push(p),u(p,"throw"),s=!1,a=!1,e.length=0)},return:p=>{s&&(t.push(p),u(p,"return"),s=!1,a=!0,e.length=0)}}},oT=t=>e=>()=>{let s=0,a={[t]:()=>a,next:()=>{if(s>e.d)return{done:!0,value:void 0};let l=s++,u=e.v[l];if(l===e.t)throw u;return{done:l===e.d,value:u}}};return a},lT=(t,e)=>s=>()=>{let a=0,l=-1,u=!1,c=[],d=[],p=(y=0,g=d.length)=>{for(;y<g;y++)d[y].s({done:!0,value:void 0})};s.on({next:y=>{let g=d.shift();g&&g.s({done:!1,value:y}),c.push(y)},throw:y=>{let g=d.shift();g&&g.f(y),p(),l=c.length,u=!0,c.push(y)},return:y=>{let g=d.shift();g&&g.s({done:!0,value:y}),p(),l=c.length,c.push(y)}});let m={[t]:()=>m,next:()=>{if(l===-1){let b=a++;if(b>=c.length){let _=e();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};let y=a++,g=c[y];if(y!==l)return{done:!1,value:g};if(u)throw g;return{done:!0,value:g}}};return m},y0=t=>{let e=atob(t),s=e.length,a=new Uint8Array(s);for(let l=0;l<s;l++)a[l]=e.charCodeAt(l);return a.buffer};y0.toString();
12function uT(t){return"__SEROVAL_SEQUENCE__"in t}function v0(t,e,s){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:s}}function cT(t){let e=[],s=-1,a=-1,l=t[wr]();for(;;)try{let u=l.next();if(e.push(u.value),u.done){a=e.length-1;break}}catch(u){s=e.length,e.push(u)}return v0(e,s,a)}var hT=oT(wr);function fT(t){return hT(t)}var dT={},pT={},mT={0:{},1:{},2:{},3:{},4:{},5:{}};function Su(t){return"__SEROVAL_STREAM__"in t}function Ks(){return iT()}function gT(t){let e=Ks(),s=t[_r]();async function a(){try{let l=await s.next();l.done?e.return(l.value):(e.next(l.value),await a())}catch(l){e.throw(l)}}return a().catch(()=>{}),e}var yT=lT(_r,wu);function vT(t){return yT(t)}async function bT(t){try{return[1,await t]}catch(e){return[0,e]}}function _T(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:63^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Wl(t,e){t.marked.add(e)}function wT(t,e){let s=t.refs.size;return t.refs.set(e,s),s}function Eu(t,e){let s=t.refs.get(e);return s!=null?(Wl(t,s),{type:1,value:OE(s)}):{type:0,value:wT(t,e)}}function Ff(t,e){let s=Eu(t,e);return s.type===1?s:h0(e)?{type:2,value:jE(s.value,e)}:s}function Ps(t,e){let s=Ff(t,e);if(s.type!==0)return s.value;if(e in o0)return kE(s.value,e);throw new _u(e)}function Tu(t,e){let s=Eu(t,mT[e]);return s.type===1?s.value:je(26,s.value,e,R,R,R,R,R,R,R,R,R)}function ST(t){let e=Eu(t,dT);return e.type===1?e.value:je(27,e.value,R,R,R,R,R,R,Ps(t,wr),R,R,R)}function ET(t){let e=Eu(t,pT);return e.type===1?e.value:je(29,e.value,R,R,R,R,R,[Tu(t,1),Ps(t,_r)],R,R,R,R)}function TT(t,e,s,a){return je(s?11:10,t,R,R,R,a,R,R,R,R,d0(e),R)}function RT(t,e,s,a){return je(8,e,R,R,R,R,{k:s,v:a},R,Tu(t,0),R,R,R)}function AT(t,e,s){let a=new Uint8Array(s),l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return je(19,e,is(btoa(l)),R,R,R,R,R,Tu(t,5),R,R,R)}function OT(t,e){return{base:_T(t,e),child:void 0}}var xT=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return ct(this._p,this.depth,t)}};async function CT(t,e,s){let a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await ct(t,e,s[l]):a[l]=0;return a}async function kT(t,e,s,a){return DE(s,a,await CT(t,e,a))}async function Qf(t,e,s){let a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(is(a[c][0])),u.push(await ct(t,e,a[c][1]));return wr in s&&(l.push(Ps(t.base,wr)),u.push(HE(ST(t.base),await ct(t,e,cT(s))))),_r in s&&(l.push(Ps(t.base,_r)),u.push(qE(ET(t.base),await ct(t,e,gT(s))))),Va in s&&(l.push(Ps(t.base,Va)),u.push(p0(s[Va]))),Ga in s&&(l.push(Ps(t.base,Ga)),u.push(s[Ga]?l0:u0)),{k:l,v:u}}async function ef(t,e,s,a,l){return TT(s,a,l,await Qf(t,e,a))}async function jT(t,e,s,a){return NE(s,await ct(t,e,a.valueOf()))}async function MT(t,e,s,a){return UE(s,a,await ct(t,e,a.buffer))}async function DT(t,e,s,a){return LE(s,a,await ct(t,e,a.buffer))}async function NT(t,e,s,a){return BE(s,a,await ct(t,e,a.buffer))}async function Oy(t,e,s,a){let l=f0(a,t.base.features);return PE(s,a,l?await Qf(t,e,l):R)}async function UT(t,e,s,a){let l=f0(a,t.base.features);return zE(s,a,l?await Qf(t,e,l):R)}async function LT(t,e,s,a){let l=[],u=[];for(let[c,d]of a.entries())l.push(await ct(t,e,c)),u.push(await ct(t,e,d));return RT(t.base,s,l,u)}async function BT(t,e,s,a){let l=[];for(let u of a.keys())l.push(await ct(t,e,u));return IE(s,l)}async function b0(t,e,s,a){let l=t.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(a))return ME(s,d.tag,await d.parse.async(a,new xT(t,e),{id:s}))}return R}async function PT(t,e,s,a){let[l,u]=await bT(a);return je(12,s,l,R,R,R,R,R,await ct(t,e,u),R,R,R)}function zT(t,e,s,a,l){let u=[],c=s.on({next:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push(KE(e,p))},p=>{l(p),c()})},throw:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push(GE(e,p)),a(u),c()},p=>{l(p),c()})},return:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push(VE(e,p)),a(u),c()},p=>{l(p),c()})}})}async function IT(t,e,s,a){return $E(s,Tu(t.base,4),await new Promise(zT.bind(t,e,s,a)))}async function HT(t,e,s,a){let l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await ct(t,e,a.v[u]);return YE(s,l,a.t,a.d)}async function qT(t,e,s,a){if(Array.isArray(a))return kT(t,e,s,a);if(Su(a))return IT(t,e,s,a);if(uT(a))return HT(t,e,s,a);let l=a.constructor;if(l===rT)return ct(t,e,a.replacement);let u=await b0(t,e,s,a);if(u)return u;switch(l){case Object:return ef(t,e,s,a,!1);case R:return ef(t,e,s,a,!0);case Date:return xE(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Oy(t,e,s,a);case Number:case Boolean:case String:case BigInt:return jT(t,e,s,a);case ArrayBuffer:return AT(t.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return MT(t,e,s,a);case DataView:return NT(t,e,s,a);case Map:return LT(t,e,s,a);case Set:return BT(t,e,s,a)}
12if(l===Promise||a instanceof Promise)return PT(t,e,s,a);let c=t.base.features;if(c&32&&l===RegExp)return CE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return DT(t,e,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return UT(t,e,s,a);if(a instanceof Error)return Oy(t,e,s,a);if(wr in a||_r in a)return ef(t,e,s,a,!!l);throw new _u(a)}async function $T(t,e,s){let a=Ff(t.base,s);if(a.type!==0)return a.value;let l=await b0(t,e,a.value,s);if(l)return l;throw new _u(s)}async function ct(t,e,s){switch(typeof s){case"boolean":return s?l0:u0;case"undefined":return dE;case"string":return p0(s);case"number":return RE(s);case"bigint":return AE(s);case"object":{if(s){let a=Ff(t.base,s);return a.type===0?await qT(t,e+1,a.value,s):a.value}return pE}case"symbol":return Ps(t.base,s);case"function":return $T(t,e,s);default:throw new _u(s)}}async function KT(t,e){try{return await ct(t,0,e)}catch(s){throw s instanceof Ay?s:new Ay(s)}}var GT=(t=>(t[t.Vanilla=1]="Vanilla",t[t.Cross=2]="Cross",t))(GT||{});function _0(t,e){for(let s=0,a=e.length;s<a;s++){let l=e[s];t.has(l)||(t.add(l),l.extends&&_0(t,l.extends))}}function w0(t){if(t){let e=new Set;return _0(e,t),[...e]}}function VT(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 tT(t)}}var YT=1e6,FT=1e4,QT=2e4;function S0(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}}var JT=1e3;function XT(t,e){var s;return{mode:t,plugins:e.plugins,refs:e.refs||new Map,features:(s=e.features)!=null?s:63^(e.disabledFeatures||0),depthLimit:e.depthLimit||JT}}function ZT(t){return{mode:2,base:XT(2,t),child:R}}var WT=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return He(this._p,this.depth,t)}};function E0(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new ls({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function eR(t,e,s){return E0(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,s),s}function tR(t,e,s){return E0(t.base,e),t.base.refs.set(e,s),s}function ht(t,e,s){return t.mode===1?eR(t,e,s):tR(t,e,s)}function _f(t,e,s){if(Object.hasOwn(e,s))return e[s];throw new ls(t)}function nR(t,e){return ht(t,e.i,EE(os(e.s)))}function rR(t,e,s){let a=s.a,l=a.length,u=ht(t,s.i,new Array(l));for(let c=0,d;c<l;c++)d=a[c],d&&(u[c]=He(t,e,d));return S0(u,s.o),u}function sR(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function aR(t){switch(t){case _r:case Ga:case Va:case wr:return!0;default:return!1}}function xy(t,e,s){sR(e)?t[e]=s:Object.defineProperty(t,e,{value:s,configurable:!0,enumerable:!0,writable:!0})}function iR(t,e,s,a,l){if(typeof a=="string")xy(s,os(a),He(t,e,l));else{let u=He(t,e,a);switch(typeof u){case"string":xy(s,u,He(t,e,l));break;case"symbol":aR(u)&&(s[u]=He(t,e,l));break;default:throw new ls(a)}}}function T0(t,e,s,a){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)iR(t,e,a,l[u],c[u]);return a}function oR(t,e,s){let a=ht(t,s.i,s.t===10?{}:Object.create(null));return T0(t,e,s.p,a),S0(a,s.o),a}function lR(t,e){return ht(t,e.i,new Date(e.s))}function uR(t,e){if(t.base.features&32){let s=os(e.c);if(s.length>QT)throw new ls(e);return ht(t,e.i,new RegExp(s,e.m))}throw new g0(e)}function cR(t,e,s){let a=ht(t,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)a.add(He(t,e,u[l]));return a}function hR(t,e,s){let a=ht(t,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)a.set(He(t,e,u[l]),He(t,e,c[l]));return a}function fR(t,e){if(e.s.length>YT)throw new ls(e);return ht(t,e.i,y0(os(e.s)))}function dR(t,e,s){var a;let l=VT(s.c),u=He(t,e,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>u.byteLength)throw new ls(s);return ht(t,s.i,new l(u,c,s.l))}function pR(t,e,s){var a;let l=He(t,e,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>l.byteLength)throw new ls(s);return ht(t,s.i,new DataView(l,u,s.l))}function R0(t,e,s,a){if(s.p){let l=T0(t,e,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function mR(t,e,s){let a=ht(t,s.i,new AggregateError([],os(s.m)));return R0(t,e,s,a)}function gR(t,e,s){let a=_f(s,fE,s.s),l=ht(t,s.i,new a(os(s.m)));return R0(t,e,s,l)}function yR(t,e,s){let a=wu(),l=ht(t,s.i,a.p),u=He(t,e,s.f);return s.s?a.s(u):a.f(u),l}function vR(t,e,s){return ht(t,s.i,Object(He(t,e,s.f)))}function bR(t,e,s){let a=t.base.plugins;if(a){let l=os(s.c);for(let u=0,c=a.length;u<c;u++){let d=a[u];if(d.tag===l)return ht(t,s.i,d.deserialize(s.s,new WT(t,e),{id:s.i}))}}throw new ZE(s.c)}function _R(t,e){return ht(t,e.i,ht(t,e.s,wu()).p)}function wR(t,e,s){let a=t.base.refs.get(s.i);if(a)return a.s(He(t,e,s.a[1])),R;throw new bo("Promise")}function SR(t,e,s){let a=t.base.refs.get(s.i);if(a)return a.f(He(t,e,s.a[1])),R;throw new bo("Promise")}function ER(t,e,s){He(t,e,s.a[0]);let a=He(t,e,s.a[1]);return fT(a)}function TR(t,e,s){He(t,e,s.a[0]);let a=He(t,e,s.a[1]);return vT(a)}function RR(t,e,s){let a=ht(t,s.i,Ks()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)He(t,e,l[c]);return a}function AR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.next(He(t,e,s.f)),R;throw new bo("Stream")}function OR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.throw(He(t,e,s.f)),R;throw new bo("Stream")}function xR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.return(He(t,e,s.f)),R;throw new bo("Stream")}function CR(t,e,s){return He(t,e,s.f),R}function kR(t,e,s){return He(t,e,s.a[1]),R}function jR(t,e,s){let a=ht(t,s.i,v0([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)a.v[l]=He(t,e,s.a[l]);return a}function He(t,e,s){if(e>t.base.depthLimit)throw new nT(t.base.depthLimit);switch(e+=1,s.t){case 2:return _f(s,cE,s.s);case 0:return Number(s.s);case 1:return os(String(s.s));case 3:if(String(s.s).length>FT)throw new ls(s);return BigInt(s.s);case 4:return t.base.refs.get(s.i);case 18:return nR(t,s);case 9:return rR(t,e,s);case 10:case 11:return oR(t,e,s);case 5:return lR(t,s);case 6:return uR(t,s);case 7:return cR(t,e,s);case 8:return hR(t,e,s);case 19:return fR(t,s);case 16:case 15:return dR(t,e,s);case 20:return pR(t,e,s);case 14:return mR(t,e,s);case 13:return gR(t,e,s);case 12:return yR(t,e,s);case 17:return _f(s,uE,s.s);case 21:return vR(t,e,s);case 25:return bR(t,e,s);case 22:return _R(t,s);case 23:return wR(t,e,s);case 24:return SR(t,e,s);case 28:return ER(t,e,s);case 30:return TR(t,e,s);case 31:return RR(t,e,s);case 32:return AR(t,e,s);case 33:return OR(t,e,s);case 34:return xR(t,e,s);case 27:return CR(t,e,s);case 29:return kR(t,e,s);case 35:return jR(t,e,s);default:throw new g0(s)}}function MR(t,e){try{return He(t,0,e)}catch(s){throw new XE(s)}}var DR=()=>T;DR.toString();function Cy(t,e){let s=w0(e.plugins),a=ZT({plugins:s,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit});return MR(a,t)}async function NR(t,e={}){let s=w0(e.plugins),a=OT(1,{plugins:s,disabledFeatures:e.disabledFeatures});return{t:await KT(a,t),f:a.base.features,m:Array.from(a.base.marked)}}function UR(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,s,a){return{v:s.parse(t.toSerializable(e))}},async async(e,s,a){return{v:await s.parse(t.toSerializable(e))}},stream(e,s,a){return{v:s.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,s,a){return t.fromSerializable(s.deserialize(e.v))}}}var LR=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}},iu=globalThis.Buffer,A0=!!iu&&typeof iu.from=="function";function O0(t){if(t.length===0)return"";if(A0)return iu.from(t).toString("base64");const e=32768,s=[];for(let a=0;a<t.length;a+=e){const l=t.subarray(a,a+e);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function x0(t){if(t.length===0)return new Uint8Array(0);if(A0){const a=iu.from(t,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const e=atob(t),s=new Uint8Array(e.length);for(let a=0;a<e.length;a++)s[a]=e.charCodeAt(a);return s}var Vi=Object.create(null),Yi=Object.create(null),BR=t=>new ReadableStream({start(e){t.on({next(s){try{e.enqueue(x0(s))}catch{}},throw(s){e.error(s)},return(){try{e.close()}catch{}}})}}),PR=new TextEncoder,zR=t=>new ReadableStream({start(e){t.on({next(s){try{typeof s=="string"?e.enqueue(PR.encode(s)):e.enqueue(x0(s.$b64))}catch{}},throw(s){e.error(s)},return(){try{e.close()}catch{}}})}}),IR="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",HR="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function ky(t){const e=Ks(),s=t.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){e.return(void 0);break}e.next(O0(l))}}catch(a){e.throw(a)}finally{s.releaseLock()}})(),e}function jy(t){const e=Ks(),s=t.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=a.decode();c.length>0&&e.next(c)}catch{}e.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&e.next(c)}catch{e.next({$b64:O0(u)})}}}catch(l){e.throw(l)}finally{s.releaseLock()}})(),e}var qR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===Vi},parse:{sync(t,e,s){return{}},async async(t,e,s){return{}},stream(t,e,s){return{}}},serialize(t,e,s){return IR},deserialize(t,e,s){return Vi}},{tag:"tss/RawStreamFactoryText",test(t){return t===Yi},parse:{sync(t,e,s){return{}},async async(t,e,s){return{}},stream(t,e,s){return{}}},serialize(t,e,s){return HR},deserialize(t,e,s){return Yi}}],test(t){return t instanceof LR},parse:{sync(t,e,s){const a=t.hint==="text"?Yi:Vi;return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(Ks())}},async async(t,e,s){const a=t.hint==="text"?Yi:Vi,l=t.hint==="text"?jy(t.stream):ky(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(a),stream:await e.parse(l)}},stream(t,e,s){const a=t.hint==="text"?Yi:Vi,l=t.hint==="text"?jy(t.stream):ky(t.stream);return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(l)}}},serialize(t,e,s){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,s){const a=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?zR(a):BR(a)}};function $R(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,s,a){return t(typeof s?.deserialize=="function"?s.deserialize(e.streamId):e.streamId)}}}var KR={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))}},Xr={},C0=t=>new ReadableStream({start:e=>{t.on({next:s=>{try{e.enqueue(s)}catch{}},throw:s=>{e.error(s)},return:()=>{try{e.close()}catch{}}})}}),GR={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Xr},parse:{sync(){return Xr},async async(){return await Promise.resolve(Xr)},stream(){return Xr}},serialize(){return C0.toString()},deserialize(){return Xr}};function My(t){let e=Ks(),s=t.getReader();async function a(){try{let l=await s.read();l.done?e.return(l.value):(e.next(l.value),await a())}catch(l){e.throw(l)}}return a().catch(()=>{}),e}var VR={tag:"seroval/plugins/web/ReadableStream",extends:[GR],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(Xr),stream:e.parse(Ks())}},async async(t,e){return{factory:await e.parse(Xr),stream:await e.parse(My(t))}},stream(t,e){return{factory:e.parse(Xr),stream:e.parse(My(t))}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){let s=e.deserialize(t.stream);return C0(s)}},YR=VR,FR=[KR,qR,YR];function QR(){return[...zv()?.serializationAdapters?.map(UR)??[],...FR]}var Dy=new TextDecoder,JR=new Uint8Array(0),Ny=16*1024*1024,Uy=32*1024*1024,Ly=1024,By=1e5;function XR(t){const e=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(g){d=g},cancel(){l=!0;try{u?.cancel()}catch{}e.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),s.clear(),a.clear()}});function m(g){const b=s.get(g);if(b)return b;if(a.has(g))return new ReadableStream({start(S){S.close()}});if(s.size>
12=Ly)throw new Error(`Too many raw streams in framed response (max ${Ly})`);const _=new ReadableStream({start(S){e.set(g,S)},cancel(){a.add(g),e.delete(g),s.delete(g)}});return s.set(g,_),_}function y(g){return m(g),e.get(g)}return(async()=>{const g=t.getReader();u=g;const b=[];let _=0;function S(){if(_<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const A=new Uint8Array(9);let M=0,j=9;for(let N=0;N<b.length&&j>0;N++){const X=b[N],V=Math.min(X.length,j);A.set(X.subarray(0,V),M),M+=V,j-=V}return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0}}function O(E){if(E===0)return JR;const A=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const N=b[0];if(!N)break;const X=Math.min(N.length,j);A.set(N.subarray(0,X),M),M+=X,j-=X,X===N.length?b.shift():b[0]=N.subarray(X)}return _-=E,A}try{for(;;){const{done:E,value:A}=await g.read();if(l||E)break;if(A){if(_+A.length>Uy)throw new Error(`Framed response buffer exceeded ${Uy} bytes`);for(b.push(A),_+=A.length;;){const M=S();if(!M)break;const{type:j,streamId:N,length:X}=M;if(j!==mr.JSON&&j!==mr.CHUNK&&j!==mr.END&&j!==mr.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===mr.JSON){if(N!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(N===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(X>Ny)throw new Error(`Frame payload too large: ${X} bytes (max ${Ny})`);const V=9+X;if(_<V)break;if(++c>By)throw new Error(`Too many frames in framed response (max ${By})`);O(9);const I=O(X);switch(j){case mr.JSON:try{d.enqueue(Dy.decode(I))}catch{}break;case mr.CHUNK:{const Y=y(N);Y&&Y.enqueue(I);break}case mr.END:{const Y=y(N);if(a.add(N),Y){try{Y.close()}catch{}e.delete(N)}break}case mr.ERROR:{const Y=y(N);if(a.add(N),Y){const W=Dy.decode(I);Y.error(new Error(W)),e.delete(N)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}e.forEach(E=>{try{E.close()}catch{}}),e.clear()}catch(E){try{d.error(E)}catch{}e.forEach(A=>{try{A.error(E)}catch{}}),e.clear()}finally{try{g.releaseLock()}catch{}u=null}})(),{getOrCreateStream:m,jsonChunks:p}}var oo=null;async function wf(t){t.length>0&&await Promise.allSettled(t)}var ZR=Object.prototype.hasOwnProperty;function k0(t){for(const e in t)if(ZR.call(t,e))return!0;return!1}async function WR(t,e,s){oo||(oo=QR());const a=e[0],l=a.fetch??s,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${Fw}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await j0(a);if(p!==void 0){const m=Gv({payload:p});t.includes("?")?t+=`&${m}`:t+=`?${m}`}}let d;if(a.method==="POST"){const p=await e1(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await t1(async()=>l(t,{method:a.method,headers:c,signal:a.signal,body:d}))}async function j0(t){let e=!1;const s={};if(t.data!==void 0&&(e=!0,s.data=t.data),t.context&&k0(t.context)&&(e=!0,s.context=t.context),e)return M0(s)}async function M0(t){return JSON.stringify(await Promise.resolve(NR(t,{plugins:oo})))}async function e1(t){if(t.data instanceof FormData){let s;return t.context&&k0(t.context)&&(s=await M0(t.context)),s!==void 0&&t.data.set(Yw,s),{body:t.data}}const e=await j0(t);if(e)return{body:e,contentType:"application/json"}}async function t1(t){let e;try{e=await t()}catch(a){if(a instanceof Response)e=a;else throw console.log(a),a}if(e.headers.get("x-tss-raw")==="true")return e;const s=e.headers.get("content-type");if(s||en(),e.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(Xw(s),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=XR(e.body),c=[$R(l),...oo||[]],d=new Map;a=await n1({jsonStream:u,onMessage:p=>Cy(p,{refs:d,plugins:c}),onError(p,m){console.error(p,m)}})}else if(s.includes("application/json")){const l=await e.json(),u=[];a=Cy(l,{plugins:oo}),await wf(u)}if(a||en(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await e.json(),l=NS(a);if(l)throw l;if(vt(a))throw a;return a}if(!e.ok)throw new Error(await e.text());return e}async function n1({jsonStream:t,onMessage:e,onError:s}){const a=t.getReader(),{value:l,done:u}=await a.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;
12if(g)try{const _=[];try{e(JSON.parse(g))}finally{}await wf(_)}catch(_){s?.(`Invalid JSON: ${g}`,_)}}}catch(g){d||s?.("Stream processing error:",g)}})();let m;const y=[];try{m=e(c)}catch(g){throw d=!0,a.cancel().catch(()=>{}),g}return await wf(y),Promise.resolve(m).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function r1(t){const e="/_serverFn/"+t;return Object.assign((...l)=>{const u=zv()?.serverFns?.fetch;return WR(e,l,u??fetch)},{url:e,serverFnMeta:{id:t},[yf]:!0})}var s1={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(yf in t)?!1:!!t[yf],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>r1(t)};function Py(t){return t.replaceAll("\0","/").replaceAll("�","/")}function a1(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function i1(t){window.$_TSR||en();const e=t.options.serializationAdapters;if(e?.length){const E=new Map;e.forEach(A=>{E.set(A.key,A.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(A=>A())}window.$_TSR.initialized=!0,window.$_TSR.router||en();const s=window.$_TSR.router;s.matches.forEach(E=>{E.i=Py(E.i)}),s.lastMatchId&&(s.lastMatchId=Py(s.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:u}=s;t.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:c};const d=t.matchRoutes(t.stores.location.get()),p=Promise.all(d.map(E=>t.loadRouteChunk(t.looseRoutesById[E.routeId])));function m(E){const A=t.looseRoutesById[E.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(A){const M=$s();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),t.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},A)}}function y(E){const A=t.looseRoutesById[E.routeId];A&&(A.options.ssr=E.ssr)}let g;d.forEach(E=>{const A=s.matches.find(M=>M.i===E.id);if(!A){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}a1(E,A),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),t.stores.setMatches(d),await t.options.hydrate?.(l);const b=t.stores.matches.get(),_=t.stores.location.get();await Promise.all(b.map(async E=>{try{const A=t.looseRoutesById[E.routeId],M=b[E.index-1]?.context??t.options.context;if(A.options.context){const V={deps:E.loaderDeps,params:E.params,context:M??{},location:_,navigate:I=>t.navigate({...I,_fromLocation:_}),buildLocation:t.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:A.id};E.__routeContext=A.options.context(V)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:t.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},N=await A.options.head?.(j),X=await A.options.scripts?.(j);E.meta=N?.meta,E.links=N?.links,E.headScripts=N?.scripts,E.styles=N?.styles,E.scripts=X}catch(A){if(vt(A))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,A);else throw E.error=A,console.error(`Error during hydration for route ${E.routeId}:`,A),A}}));const S=d[d.length-1].id!==u;if(!d.some(E=>E.ssr===!1)&&!S)return d.forEach(E=>{E._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),p;const O=Promise.resolve().then(()=>t.load()).catch(E=>{console.error("Error during router hydration:",E)});if(S){const E=d[1];E||en(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=O,O.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(E.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var ou=ae.use,Ji=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function tf(t){const e=ae.useRef({value:t,prev:null}),s=e.current.value;return t!==s&&(e.current={value:t,prev:s}),e.current.prev}function o1(t,e,s={},a={}){ae.useEffect(()=>{if(!t.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{e(u)},s);return l.observe(t.current),()=>{l.disconnect()}},[e,s,a.disabled,t])}function l1(t){const e=ae.useRef(null);return ae.useImperativeHandle(t,()=>e.current,[]),e}function u1({promise:t}){if(ou)return ou(t);const e=tE(t);if(e[Gn].status==="pending")throw e;if(e[Gn].status==="error")throw e[Gn].error;return e[Gn].data}function c1(t){const e=Q.jsx(h1,{...t});
12return t.fallback?Q.jsx(ae.Suspense,{fallback:t.fallback,children:e}):e}function h1(t){const e=u1(t);return t.children(e)}function Jf(t){const e=t.errorComponent??Xf;return Q.jsx(f1,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:s,reset:a})=>s?ae.createElement(e,{error:s,reset:a}):t.children})}var f1=class extends ae.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const s=t.getResetKey();return e.error&&e.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Xf({error:t}){const[e,s]=ae.useState(!1);return Q.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Q.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Q.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:e?"Hide Error":"Show Error"})]}),Q.jsx("div",{style:{height:".25rem"}}),e?Q.jsx("div",{children:Q.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?Q.jsx("code",{children:t.message}):null})}):null]})}function d1({children:t,fallback:e=null}){return Zf()?Q.jsx(Z.Fragment,{children:t}):Q.jsx(Z.Fragment,{children:e})}function Zf(){return Z.useSyncExternalStore(p1,()=>!0,()=>!1)}function p1(){return()=>{}}var D0=ae.createContext(null);function bt(t){return ae.useContext(D0)}var Ru=ae.createContext(void 0),m1=ae.createContext(void 0),Fe=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(Fe||{});function g1({update:t,notify:e,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===m){_.version=g,y.depsTail=_;return}const S=m.subsTail;if(S!==void 0&&S.version===g&&S.sub===y)return;const O=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=O),b!==void 0?b.nextDep=O:y.deps=O,S!==void 0?S.nextSub=O:m.subs=O}function l(m,y=m.sub){const g=m.dep,b=m.prevDep,_=m.nextDep,S=m.nextSub,O=m.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=O:g.subsTail=O,O!==void 0?O.nextSub=S:(g.subs=S)===void 0&&s(g),_}function u(m){let y=m.nextSub,g;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(m,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 O=(m=S).nextSub;O!==void 0&&(g={value:y,prev:g},y=O);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function c(m,y){let g,b=0,_=!1;e:do{const S=m.dep,O=S.flags;if(y.flags&16)_=!0;else if((O&17)===17){if(t(S)){const E=S.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((O&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=S.deps,y=S,++b;continue}if(!_){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=y.subs,A=E.nextSub!==void 0;if(A?(m=g.value,g=g.prev):m=E,_){if(t(y)){A&&d(E),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return _}while(!0)}function d(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&e(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function y1(t,e,s){const a=typeof t=="object",l=a?t:void 0;return{next:(a?t.next:t)?.bind(l),error:(a?t.error:e)?.bind(l),complete:(a?t.complete:s)?.bind(l)}}const Sf=[];let eu=0;const{link:zy,unlink:v1,propagate:b1,checkDirty:N0,shallowPropagate:Iy}=g1({update(t){return t._update()},notify(t){Sf[Ef++]=t,t.flags&=~Fe.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=Fe.Mutable|Fe.Dirty,lu(t))}});let zl=0,Ef=0,$n,Tf=0;function U0(t){try{++Tf,t()}finally{--Tf||L0()}}function lu(t){const e=t.depsTail;let s=e!==void 0?e.nextDep:t.deps;for(;s!==void 0;)s=v1(s,t)}function L0(){if(!(Tf>0)){for(;zl<Ef;){const t=Sf[zl];Sf[zl++]=void 0,t.notify()}zl=0,Ef=0}}function Hy(t,e){const s=typeof t=="function",a=t,l={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Fe.None:Fe.Mutable,get(){return $n!==void 0&&zy(l,$n,eu),l._snapshot},subscribe(u){const c=y1(u),d={current:!1},p=_1(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=$n,d=e?.compare??Object.is;if(s)$n=l,++eu,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=Fe.Mutable|Fe.RecursedCheck);try{const p=l._snapshot,m=typeof u=="function"?u(p):u===void 0&&s?a(p):u;return p===void 0||!d(p,m)?(l._snapshot=m,!0):!1}finally{$n=c,s&&(l.flags&=~Fe.RecursedCheck),lu(l)}}};return s?(l.flags=Fe.Mutable|Fe.Dirty,l.get=function(){const u=l.flags;if(u&Fe.Dirty||u&Fe.Pending&&N0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&Iy(c)}}else u&Fe.Pending&&(l.flags=u&~Fe.Pending);return $n!==void 0&&zy(l,$n,eu),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(b1(c),Iy(c),L0())}},l}function _1(t){const e=()=>{const a=$n;$n=s,++eu,s.depsTail=void 0,s.flags=Fe.Watching|Fe.RecursedCheck;try{return t()}finally{$n=a,s.flags&=~Fe.RecursedCheck,lu(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Fe.Watching|Fe.RecursedCheck,notify(){const a=this.flags;a&Fe.Dirty||a&Fe.Pending&&N0(this.deps,this)?e():this.flags=Fe.Watching},stop(){this.flags=Fe.None,this.depsTail=void 0,lu(this)}};return e(),s}var nf={exports:{}},rf={},sf={exports:{}},af={};var qy;function w1(){if(qy)return af;qy=1;var t=vo();function e(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var s=typeof Object.is=="function"?Object.is:e,a=t.useState,l=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(g,b){var _=b(),S=a({inst:{value:_,getSnapshot:b}}),O=S[0].inst,E=S[1];return u(function(){O.value=_,O.getSnapshot=b,p(O)&&E({inst:O})},[g,_,b]),l(function(){return p(O)&&E({inst:O}),g(function(){p(O)&&E({inst:O})})},[g]),c(_),_}function p(g){var b=g.getSnapshot;g=g.value;try{var _=b();return!s(g,_)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return af.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,af}var $y;function S1(){return $y||($y=1,sf.exports=w1()),sf.exports}var Ky;function E1(){if(Ky)return rf;Ky=1;var t=vo(),e=S1();function s(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:s,l=e.useSyncExternalStore,u=t.useRef,c=t.useEffect,d=t.useMemo,p=t.useDebugValue;return rf.useSyncExternalStoreWithSelector=function(m,y,g,b,_){var S=u(null);if(S.current===null){var O={hasValue:!1,value:null};S.current=O}else O=S.current;S=d(function(){function A(V){if(!M){if(M=!0,j=V,V=b(V),_!==void 0&&O.hasValue){var I=O.value;if(_(I,V))return N=I}return N=V}if(I=N,a(j,V))return I;var Y=b(V);return _!==void 0&&_(I,Y)?(j=V,I):(j=V,N=Y)}var M=!1,j,N,X=g===void 0?null:g;return[function(){return A(y())},X===null?void 0:function(){return A(X())}]},[y,g,b,_]);var E=l(m,S[0],S[1]);return c(function(){O.hasValue=!0,O.value=E},[E]),p(E),E},rf}var Gy;function T1(){return Gy||(Gy=1,nf.exports=E1()),nf.exports}var R1=T1();function A1(t,e){return t===e}function lt(t,e,s=A1){const a=ae.useCallback(c=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(c);return d},[t]),l=ae.useCallback(()=>t?.get(),[t]);return R1.useSyncExternalStoreWithSelector(a,l,l,e,s)}var O1={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Gs(t){const e=bt(),s=ae.useContext(t.from?m1:Ru),a=t.from??s,l=a?t.from?e.stores.getRouteMatchStore(a):e.stores.matchStores.get(a):void 0,u=ae.useRef(void 0);return lt(l??O1,c=>{if((t.shouldThrow??!0)&&!c&&en(),c===void 0)return;const d=t.select?t.select(c):c;if(t.structuralSharing??e.options.defaultStructuralSharing){const p=Ls(u.current,d);return u.current=p,p}return d})}function B0(t){return Gs({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function P0(t){const{select:e,...s}=t;return Gs({...s,select:a=>e?e(a.loaderDeps):a.loaderDeps})}function z0(t){return Gs({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const s=t.strict===!1?e.params:e._strictParams;return t.select?t.select(s):s}})}function I0(t){return Gs({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function H0(t){const e=bt();return ae.useCallback(s=>e.navigate({...s,from:s.from??t?.from}),[t?.from,e])}function q0(t){return Gs({...t,select:e=>t.select?t.select(e.context):e.context})}var $0=Pv();const x1=Bv($0);function C1(t,e){const s=bt(),a=l1(e),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:_,resetScroll:S,viewTransition:O,children:E,target:A,disabled:M,style:j,className:N,onClick:X,onBlur:V,onFocus:I,onMouseEnter:Y,onMouseLeave:W,onTouchStart:le,ignoreBlocker:ie,params:ge,search:_e,hash:qe,state:Me,mask:L,reloadDocument:F,unsafeRelative:se,from:Se,_fromLocation:ye,...C}=t,q=Zf(),G=ae.useMemo(()=>t,[s,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=lt(s.stores.location,Le=>Le,(Le,Je)=>Le.href===Je.href),ee=ae.useMemo(()=>{const Le={_fromLocation:J,...G};return s.buildLocation(Le)},[s,J,G]),ce=ee.maskedLocation?ee.maskedLocation.publicHref:ee.publicHref,we=ee.maskedLocation?ee.maskedLocation.external:ee.external,de=ae.useMemo(()=>U1(ce,we,s.history,M),[M,we,ce,s.history]),xe=ae.useMemo(()=>
12{if(de?.external)return nu(de.href,s.protocolAllowlist)?void 0:de.href;if(!L1(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),nu(d,s.protocolAllowlist)?void 0:d}catch{}},[d,de,s.protocolAllowlist]),Bt=ae.useMemo(()=>{if(xe)return!1;if(c?.exact){if(!_S(J.pathname,ee.pathname,s.basepath))return!1}else{const Le=ru(J.pathname,s.basepath),Je=ru(ee.pathname,s.basepath);if(!(Le.startsWith(Je)&&(Le.length===Je.length||Le[Je.length]==="/")))return!1}return(c?.includeSearch??!0)&&!Zt(J.search,ee.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?q&&J.hash===ee.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,J,xe,q,ee.hash,ee.pathname,ee.search,s.basepath]),Pt=Bt?es(l,{})??k1:of,kt=Bt?of:es(u,{})??of,us=[N,Pt.className,kt.className].filter(Boolean).join(" "),zt=(j||Pt.style||kt.style)&&{...j,...Pt.style,...kt.style},[cs,Fn]=ae.useState(!1),Nn=ae.useRef(!1),fn=t.reloadDocument||xe?!1:p??s.options.defaultPreload,_t=m??s.options.defaultPreloadDelay??0,tn=ae.useCallback(()=>{s.preloadRoute({...G,_builtLocation:ee}).catch(Le=>{console.warn(Le),console.warn(nE)})},[s,G,ee]);o1(a,ae.useCallback(Le=>{Le?.isIntersecting&&tn()},[tn]),N1,{disabled:!!M||fn!=="viewport"}),ae.useEffect(()=>{Nn.current||!M&&fn==="render"&&(tn(),Nn.current=!0)},[M,tn,fn]);const hs=Le=>{const Je=Le.currentTarget.getAttribute("target"),dn=A!==void 0?A:Je;if(!M&&!B1(Le)&&!Le.defaultPrevented&&(!dn||dn==="_self")&&Le.button===0){Le.preventDefault(),$0.flushSync(()=>{Fn(!0)});const Qn=s.subscribe("onResolved",()=>{Qn(),Fn(!1)});s.navigate({...G,replace:b,resetScroll:S,hashScrollIntoView:g,startTransition:_,viewTransition:O,ignoreBlocker:ie})}};if(xe)return{...C,ref:a,href:xe,...E&&{children:E},...A&&{target:A},...M&&{disabled:M},...j&&{style:j},...N&&{className:N},...X&&{onClick:X},...V&&{onBlur:V},...I&&{onFocus:I},...Y&&{onMouseEnter:Y},...W&&{onMouseLeave:W},...le&&{onTouchStart:le}};const ft=Le=>{if(M||fn!=="intent")return;if(!_t){tn();return}const Je=Le.currentTarget;if(Fi.has(Je))return;const dn=setTimeout(()=>{Fi.delete(Je),tn()},_t);Fi.set(Je,dn)},Un=Le=>{M||fn!=="intent"||tn()},dt=Le=>{if(M||!fn||!_t)return;const Je=Le.currentTarget,dn=Fi.get(Je);dn&&(clearTimeout(dn),Fi.delete(Je))};return{...C,...Pt,...kt,href:de?.href,ref:a,onClick:Da([X,hs]),onBlur:Da([V,dt]),onFocus:Da([I,ft]),onMouseEnter:Da([Y,ft]),onMouseLeave:Da([W,dt]),onTouchStart:Da([le,Un]),disabled:!!M,target:A,...zt&&{style:zt},...us&&{className:us},...M&&j1,...Bt&&M1,...q&&cs&&D1}}var of={},k1={className:"active"},j1={role:"link","aria-disabled":!0},M1={"data-status":"active","aria-current":"page"},D1={"data-transitioning":"transitioning"},Fi=new WeakMap,N1={rootMargin:"100px"},Da=t=>e=>{for(const s of t)if(s){if(e.defaultPrevented)return;s(e)}};function U1(t,e,s,a){if(!a)return e?{href:t,external:!0}:{href:s.createHref(t)||"/",external:!1}}function L1(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Wf=ae.forwardRef((t,e)=>{const{_asChild:s,...a}=t,{type:l,...u}=C1(a,e),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return ae.createElement("a",p,c)}return ae.createElement(s,u,c)});function B1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var P1=class extends Xv{constructor(e){super(e),this.useMatch=s=>Gs({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>q0({...s,from:this.id}),this.useSearch=s=>I0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>z0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>P0({...s,from:this.id}),this.useLoaderData=s=>B0({...s,from:this.id}),this.useNavigate=()=>H0({from:this.fullPath}),this.Link=Z.forwardRef((s,a)=>Q.jsx(Wf,{ref:a,from:this.fullPath,...s}))}};function z1(t){return new P1(t)}function I1(){return t=>q1(t)}var H1=class extends iE{constructor(t){super(t),this.useMatch=e=>Gs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>q0({...e,from:this.id}),this.useSearch=e=>I0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>z0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>P0({...e,from:this.id}),this.useLoaderData=e=>B0({...e,from:this.id}),this.useNavigate=()=>H0({from:this.fullPath}),this.Link=Z.forwardRef((e,s)=>Q.jsx(Wf,{ref:s,from:this.fullPath,...e}))}};function q1(t){return new H1(t)}function Nt(t){return new $1(t,{silent:!0}).createRoute}var $1=class{constructor(t,e){this.path=t,this.createRoute=s=>{const a=z1(s);return a.isRoot=!1,a},this.silent=e?.silent}};function Ut(t,e){let s,a,l,u;const c=()=>(s||(s=t().then(p=>{s=void 0,a=p[e]}).catch(p=>{if(l=p,tS(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),u=!0)}})),s),d=function(m){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(ou)ou(c());else throw c();return ae.createElement(a,m)};return d.preload=c,d}function K1(t){const e=bt(),s=`not-found-${lt(e.stores.location,a=>a.pathname)}-${lt(e.stores.status,a=>a)}`;return Q.jsx(Jf,{getResetKey:()=>s,onCatch:(a,l)=>
12{if(vt(a))t.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(vt(a))return t.fallback?.(a);throw a},children:t.children})}function G1(){return Q.jsx("p",{children:"Not Found"})}function Pa(t){return Q.jsx(Q.Fragment,{children:t.children})}function K0(t,e,s){return e.options.notFoundComponent?Q.jsx(e.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?Q.jsx(t.options.defaultNotFoundComponent,{...s}):Q.jsx(G1,{})}function V1(t){return null}function Y1(){return V1(bt()),null}var G0=ae.memo(function({matchId:e}){const s=bt(),a=s.stores.matchStores.get(e);a||en();const l=lt(s.stores.loadedAt,c=>c),u=lt(a,c=>c);return Q.jsx(F1,{router:s,matchId:e,resetKey:l,matchState:ae.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function F1({router:t,matchId:e,resetKey:s,matchState:a}){const l=t.routesById[a.routeId],u=l.options.pendingComponent??t.options.defaultPendingComponent,c=u?Q.jsx(u,{}):null,d=l.options.errorComponent??t.options.defaultErrorComponent,p=l.options.onCatch??t.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??t.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?ae.Suspense:Pa,b=d?Jf:Pa,_=m?K1:Pa;return Q.jsxs(l.isRoot?l.options.shellComponent??Pa:Pa,{children:[Q.jsx(Ru.Provider,{value:e,children:Q.jsx(g,{fallback:c,children:Q.jsx(b,{getResetKey:()=>s,errorComponent:d||Xf,onCatch:(S,O)=>{if(vt(S))throw S.routeId??=a.routeId,S;p?.(S,O)},children:Q.jsx(_,{fallback:S=>{if(S.routeId??=a.routeId,!m||S.routeId&&S.routeId!==a.routeId||!S.routeId&&
12!l.isRoot)throw S;return ae.createElement(m,S)},children:y||a._displayPending?Q.jsx(d1,{fallback:c,children:Q.jsx(Vy,{matchId:e})}):Q.jsx(Vy,{matchId:e})})})})}),a.parentRouteId===Hs?Q.jsxs(Q.Fragment,{children:[Q.jsx(Q1,{resetKey:s}),t.options.scrollRestoration&&Iv?Q.jsx(Y1,{}):null]}):null]})}function Q1({resetKey:t}){const e=bt(),s=ae.useRef(void 0);return Ji(()=>{const a=e.latestLocation.href;(s.current===void 0||s.current!==a)&&(e.emit({type:"onRendered",...Ka(e.stores.location.get(),e.stores.resolvedLocation.get())}),s.current=a)},[e.latestLocation.state.__TSR_key,t,e]),null}var Vy=ae.memo(function({matchId:e}){const s=bt(),a=(y,g)=>s.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],l=s.stores.matchStores.get(e);l||en();const u=lt(l,y=>y),c=u.routeId,d=s.routesById[c],p=ae.useMemo(()=>{const y=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),m=ae.useMemo(()=>{const y=d.options.component??s.options.defaultComponent;return y?Q.jsx(y,{},p):Q.jsx(V0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const y=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const g=s.getMatch(u.id);if(g&&!g._nonReactive.minPendingPromise){const b=$s();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(u,"loadPromise")}if(u.status==="notFound")return vt(u.error)||en(),K0(s,d,u.error);if(u.status==="redirected")throw Wt(u.error)||en(),a(u,"loadPromise");if(u.status==="error")throw u.error;return m}),V0=ae.memo(function(){const e=bt(),s=ae.useContext(Ru);let a,l=!1,u;{const m=s?e.stores.matchStores.get(s):void 0;[a,l]=lt(m,y=>[y?.routeId,y?.globalNotFound??!1]),u=lt(e.stores.matchesId,y=>y[y.findIndex(g=>g===s)+1])}const c=a?e.routesById[a]:void 0,d=e.options.defaultPendingComponent?Q.jsx(e.options.defaultPendingComponent,{}):null;if(l)return c||en(),K0(e,c,void 0);if(!u)return null;const p=Q.jsx(G0,{matchId:u});return a===Hs?Q.jsx(ae.Suspense,{fallback:d,children:p}):p});function J1(){const t=bt(),e=ae.useRef({router:t,mounted:!1}),[s,a]=ae.useState(!1),l=lt(t.stores.isLoading,g=>g),u=lt(t.stores.hasPending,g=>g),c=tf(l),d=l||s||u,p=tf(d),m=l||u,y=tf(m);return t.startTransition=g=>{a(!0),ae.startTransition(()=>{g(),a(!1)})},ae.useEffect(()=>{const g=t.history.subscribe(t.load),b=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return rs(t.latestLocation.publicHref)!==rs(b.publicHref)&&t.commitLocation({...b,replace:!0}),()=>{g()}},[t,t.history]),Ji(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(b){console.error(b)}})()},[t]),Ji(()=>{c&&!l&&t.emit({type:"onLoad",...Ka(t.stores.location.get(),t.stores.resolvedLocation.get())})},[c,t,l]),Ji(()=>{y&&!m&&t.emit({type:"onBeforeRouteMount",...Ka(t.stores.location.get(),t.stores.resolvedLocation.get())})},[m,y,t]),Ji(()=>{if(p&&!d){const g=Ka(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),U0(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),g.hrefChanged&&oE(t)}},[d,p,t]),null}function X1(){const t=bt(),e=t.routesById[Hs].options.pendingComponent??t.options.defaultPendingComponent,s=e?Q.jsx(e,{}):null,a=Q.jsxs(typeof document<"u"&&t.ssr?Pa:ae.Suspense,{fallback:s,children:[Q.jsx(J1,{}),Q.jsx(Z1,{})]});return t.options.InnerWrap?Q.jsx(t.options.InnerWrap,{children:a}):a}function Z1(){const t=bt(),e=lt(t.stores.firstId,l=>l),s=lt(t.stores.loadedAt,l=>l),a=e?Q.jsx(G0,{matchId:e}):null;return Q.jsx(Ru.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?a:Q.jsx(Jf,{getResetKey:()=>s,errorComponent:Xf,onCatch:void 0,children:a})})}var W1=t=>({createMutableStore:Hy,createReadonlyStore:Hy,batch:U0}),eA=t=>new tA(t),tA=class extends FS{constructor(t){super(t,W1)}};function nA({router:t,children:e,...s}){Object.keys(s).length>0&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const a=Q.jsx(D0.Provider,{value:t,children:e});return t.options.Wrap?Q.jsx(t.options.Wrap,{children:a}):a}function rA({router:t,...e}){return Q.jsx(nA,{router:t,...e,children:Q.jsx(X1,{})})}function Y0(t){const{attrs:e,children:s,nonce:a}=t;switch(t.tag){case"title":return Q.jsx("title",{...e,suppressHydrationWarning:!0,children:s});case"meta":return Q.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return Q.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return t.inlineCss,Q.jsx("style",{...e,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return Q.jsx(sA,{attrs:e,children:s});default:return null}}function sA({attrs:t,children:e}){bt();const s=Zf(),a=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(ae.useEffect(()=>{if(!a){if(t?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(t.src,c).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,d]of Object.entries(t))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof e=="string"){const l=typeof t?.type=="string"?t.type:"text/javascript",u=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",m=d.getAttribute("nonce")??void 0;return d.textContent===e&&p===l&&m===u}))return;const c=document.createElement("script");
12if(c.textContent=e,t)for(const[d,p]of Object.entries(t))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[t,e,a]),a&&typeof e=="string")return Q.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!s){if(t?.src)return Q.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return Q.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var aA=t=>{const e=bt(),s=e.options.ssr?.nonce,a=lt(e.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),Zt),l=ae.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let S=_.length-1;S>=0;S--){const O=_[S];if(O)if(O.title)g||(g={tag:"title",children:O.title});else if("script:ld+json"in O)try{const E=JSON.stringify(O["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:iS(E)})}catch{}else{const E=O.name??O.property;if(E){if(y[E])continue;y[E]=!0}m.push({tag:"meta",attrs:{...O,nonce:s}})}}}return g&&m.push(g),s&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),m.reverse(),m},[a,s]),u=lt(e.stores.matches,m=>{const y=m.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),g=e.ssr?.manifest,b=m.map(_=>g?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?aE(g,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:Ry(t,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},Zt),c=lt(e.stores.matches,m=>{const y=[];return m.map(g=>e.looseRoutesById[g.routeId]).forEach(g=>e.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const _=rE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Ry(t,"modulepreload")??_.crossOrigin,nonce:s}})})),y},Zt),d=lt(e.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:s},children:y})),Zt),p=lt(e.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:s},children:y})),Zt);return iA([...l,...c,...u,...d,...p],m=>JSON.stringify(m))};function iA(t,e){const s=new Set;return t.filter(a=>{const l=e(a);return s.has(l)?!1:(s.add(l),!0)})}function oA(t){const e=aA(t.assetCrossOrigin),s=bt().options.ssr?.nonce;return Q.jsx(Q.Fragment,{children:e.map(a=>ae.createElement(Y0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var lA=()=>{const t=bt(),e=t.options.ssr?.nonce,s=u=>{const c=[],d=t.ssr?.manifest;return d?(u.map(p=>t.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{c.push({tag:"script",attrs:{...m.attrs,nonce:e},children:m.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:e},children:c})),l=lt(t.stores.matches,s,Zt);return uA(t,lt(t.stores.matches,a,Zt),l)};function uA(t,e,s){let a;t.serverSsr&&(a=t.serverSsr.takeBufferedScripts());const l=[...e,...s];return a&&l.unshift(a),Q.jsx(Q.Fragment,{children:l.map((u,c)=>ae.createElement(Y0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var zs=(t,e)=>{const s={type:"request",...e||t};return{options:s,middleware:a=>zs({},Object.assign(s,{middleware:a})),inputValidator:a=>zs({},Object.assign(s,{inputValidator:a})),client:a=>zs({},Object.assign(s,{client:a})),server:a=>zs({},Object.assign(s,{server:a}))}};function F0(t,e){for(let s=0,a=e.length;s<a;s++){const l=e[s];t.has(l)||(t.add(l),l.extends&&F0(t,l.extends))}}var cA=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const s=new Set;F0(s,e.serializationAdapters),e.serializationAdapters=Array.from(s)}return e},createMiddleware:zs});function Au(t,e){var s={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(s[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)e.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(s[a[l]]=t[a[l]]);return s}function hA(t,e,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}
12return new(s||(s=Promise))(function(u,c){function d(y){try{m(a.next(y))}catch(g){c(g)}}function p(y){try{m(a.throw(y))}catch(g){c(g)}}function m(y){y.done?u(y.value):l(y.value).then(d,p)}m((a=a.apply(t,e||[])).next())})}const fA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class ed extends Error{constructor(e,s="FunctionsError",a){super(e),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class dA extends ed{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Yy extends ed{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Fy extends ed{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Rf;(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"})(Rf||(Rf={}));class pA{constructor(e,{headers:s={},customFetch:a,region:l=Rf.Any}={}){this.url=e,this.headers=s,this.region=l,this.fetch=fA(a)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return hA(this,arguments,void 0,function*(s,a={}){var l;let u,c;try{const{headers:d,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:_}=a;_||(_=this.region);const S=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let O;m&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",O=m):typeof m=="string"?(b["Content-Type"]="text/plain",O=m):typeof FormData<"u"&&m instanceof FormData?O=m:(b["Content-Type"]="application/json",O=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?O=JSON.stringify(m):O=m;let E=y;g&&(c=new AbortController,u=setTimeout(()=>c.abort(),g),y?(E=c.signal,y.addEventListener("abort",()=>c.abort())):E=c.signal);const A=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:O,signal:E}).catch(X=>{throw new dA(X)}),M=A.headers.get("x-relay-error");if(M&&M==="true")throw new Yy(A);if(!A.ok)throw new Fy(A);let j=((l=A.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),N;return j==="application/json"?N=yield A.json():j==="application/octet-stream"||j==="application/pdf"?N=yield A.blob():j==="text/event-stream"?N=A:j==="multipart/form-data"?N=yield A.formData():N=yield A.text(),{data:N,error:null,response:A}}catch(d){return{data:null,error:d,response:d instanceof Fy||d instanceof Yy?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const Q0=3,Qy=t=>Math.min(1e3*2**t,3e4),mA=[520,503],J0=["GET","HEAD","OPTIONS"];var Jy=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
12de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Xy(t,e){return new Promise(s=>{if(e?.aborted){s();return}const a=setTimeout(()=>{e?.removeEventListener("abort",l),s()},t);function l(){clearTimeout(a),s()}e?.addEventListener("abort",l)})}function gA(t,e,s,a){return!(!a||s>=Q0||!J0.includes(t)||!mA.includes(e))}var yA=class{constructor(t){var e,s,a,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=(s=t.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=t.shouldStripNulls)!==null&&a!==void 0?a:!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 s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let u=(async()=>{let c=0;for(;;){const m={};s.headers.forEach((g,b)=>{m[b]=g}),c>0&&(m["X-Retry-Count"]=String(c));let y;try{y=await a(s.url.toString(),{method:s.method,headers:m,body:JSON.stringify(s.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!J0.includes(s.method))throw g;if(s.retryEnabled&&c<Q0){const b=Qy(c);c++,await Xy(b,s.signal);continue}throw g}if(gA(s.method,y.status,c,s.retryEnabled)){var d,p;const g=(d=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:Qy(c);await y.text(),c++,await Xy(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",m="",y="";const g=c?.cause;if(g){var b,_,S,O;const M=(b=g?.message)!==null&&b!==void 0?b:"",j=(_=g?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(O=g?.name)!==null&&O!==void 0?O:"Error"}: ${M}`,j&&(p+=` (${j})`),g?.stack&&(p+=` 15${g.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const A=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${A} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(m+=`. Your request URL is ${A} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;
15let s=null,a=null,l=null,u=t.status,c=t.statusText;if(t.ok){var d,p;if(e.method!=="HEAD"){var m;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")a=b;else if(e.headers.get("Accept")&&(!((m=e.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,e.shouldThrowOnError)throw new Jy({message:b,details:"",hint:"",code:""})}}const y=(d=e.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),g=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(l=parseInt(g[1])),e.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await t.text();try{s=JSON.parse(y),Array.isArray(s)&&t.status===404&&(a=[],s=null,u=200,c="OK")}catch{t.status===404&&y===""?(u=204,c="No Content"):s={message:y}}if(s&&e.shouldThrowOnError)throw new Jy(s)}return{success:s===null,error:s,data:a,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},vA=class extends yA{throwOnError(){return super.throwOnError()}select(t){let e=!1;const s=(t??"*").split("").map(a=>/\s/.test(a)&&!e?"":(a==='"'&&(e=!e),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:s=e}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${t}`),this}range(t,e,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${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:s=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[t?"analyze":null,e?"verbose":null,s?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Zy=new RegExp("[,()]");var za=class extends vA{throwOnError(){return super.throwOnError()}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 s=Array.from(new Set(e)).map(a=>
15typeof a=="string"&&Zy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`in.(${s})`),this}notIn(t,e){const s=Array.from(new Set(e)).map(a=>typeof a=="string"&&Zy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`not.in.(${s})`),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:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(t,`${l}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,s])=>s!==void 0).forEach(([e,s])=>{this.url.searchParams.append(e,`eq.${s}`)}),this}not(t,e,s){return this.url.searchParams.append(t,`not.${e}.${s}`),this}or(t,{foreignTable:e,referencedTable:s=e}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${t})`),this}filter(t,e,s){return this.url.searchParams.append(t,`${e}.${s}`),this}},bA=class{constructor(t,{headers:e={},schema:s,fetch:a,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=s,this.fetch=a,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:s=!1,count:a}=e??{},l=s?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(m=>/\s/.test(m)&&!u?"":(m==='"'&&(u=!u),m)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new za({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:s=!0}={}){var a;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),s||c.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(d.length>0){const p=[...new Set(d)].map(m=>`"${m}"`);u.searchParams.set("columns",p.join(","))}}return new za({method:l,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),e!==void 0&&d.searchParams.set("on_conflict",e),a&&p.append("Prefer",`count=${a}`),l||p.append("Prefer","missing=default"),Array.isArray(t)){const m=t.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);d.searchParams.set("columns",y.join(","))}}return new za({method:c,url:d,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 s;const a="PATCH",{url:l,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new za({method:a,url:l,headers:u,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const s="DELETE",{url:a,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new za({method:s,url:a,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function lo(t){"@babel/helpers - typeof";return lo=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},lo(t)}function _A(t,e){if(lo(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(lo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wA(t){var e=_A(t,"string");return lo(e)=="symbol"?e:e+""}function SA(t,e,s){return(e=wA(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Wy(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function Il(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};
15e%2?Wy(Object(s),!0).forEach(function(a){SA(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Wy(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}var EA=class X0{constructor(e,{headers:s={},schema:a,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=e,this.headers=new Headers(s),this.schemaName=a,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(m,y);const S=()=>{clearTimeout(b),g.abort()};return _.addEventListener("abort",S,{once:!0}),p(m,Il(Il({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(m,Il(Il({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new bA(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 X0(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,s={},{head:a=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${e}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=a&&Object.values(s).some(y);g?(d="POST",m=s):a||l?(d=a?"HEAD":"GET",Object.entries(s).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(d="POST",m=s);const b=new Headers(this.headers);return g?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new za({method:d,url:p,headers:b,schema:this.schemaName,body:m,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class TA{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((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,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let s=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(s+=` 18 19Suggested solution: ${e.workaround}`),new Error(s)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const RA="2.108.1",AA=`realtime-js/${RA}`,OA="1.0.0",Z0="2.0.0",xA=Z0,CA=1e4,kA=100,Zr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},W0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Af={connecting:"connecting",closing:"closing",closed:"closed"};class jA{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,s){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(e));let a=[e.join_ref,e.ref,e.topic,e.event,e.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(e){var s;return this._isArrayBuffer((s=e.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var s,a;const l=(a=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(e){var s,a;const l=(a=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,s,a){var l,u;
19const c=e.topic,d=(l=e.ref)!==null&&l!==void 0?l:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",m=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+m.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),O=0;S.setUint8(O++,this.KINDS.userBroadcastPush),S.setUint8(O++,p.length),S.setUint8(O++,d.length),S.setUint8(O++,c.length),S.setUint8(O++,m.length),S.setUint8(O++,g.length),S.setUint8(O++,s),Array.from(p,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(d,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(c,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(m,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(g,A=>S.setUint8(O++,A.charCodeAt(0)));var E=new Uint8Array(_.byteLength+a.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(a),_.byteLength),E.buffer}decode(e,s){if(this._isArrayBuffer(e)){let a=this._binaryDecode(e);return s(a)}if(typeof e=="string"){const a=JSON.parse(e),[l,u,c,d,p]=a;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(e){const s=new DataView(e),a=s.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,s,l)}_decodeUserBroadcast(e,s,a){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const m=a.decode(e.slice(p,p+l));p=p+l;const y=a.decode(e.slice(p,p+u));p=p+u;const g=a.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var s;return e instanceof ArrayBuffer||((s=e?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(e,s){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([a])=>s.includes(a)))}}var $e;(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"})($e||($e={}));const ev=(t,e,s={})=>{var a;const l=(a=s.skipTypes)!==null&&a!==void 0?a:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=MA(c,t,e,l),u),{}):{}},MA=(t,e,s,a)=>{const l=e.find(d=>d.name===t),u=l?.type,c=s[t];return u&&!a.includes(u)?eb(u,c):Of(c)},eb=(t,e)=>{if(t.charAt(0)==="_"){const s=t.slice(1,t.length);return LA(e,s)}switch(t){case $e.bool:return DA(e);case $e.float4:case $e.float8:case $e.int2:case $e.int4:case $e.int8:case $e.numeric:case $e.oid:return NA(e);case $e.json:case $e.jsonb:return UA(e);case $e.timestamp:return BA(e);case $e.abstime:case $e.date:case $e.daterange:case $e.int4range:case $e.int8range:case $e.money:case $e.reltime:case $e.text:case $e.time:case $e.timestamptz:case $e.timetz:case $e.tsrange:case $e.tstzrange:return Of(e);default:return Of(e)}},Of=t=>t,DA=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},NA=t=>
vendor: 9,009 bytes, line 19
19{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},UA=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},LA=(t,e)=>{if(typeof t!="string")return t;const s=t.length-1,a=t[s];if(t[0]==="{"&&a==="}"){let u;const c=t.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>eb(e,d))}return t},BA=t=>typeof t=="string"?t.replace(" ","T"):t,tb=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 eo=t=>typeof t=="function"?t:function(){return t},PA=typeof self<"u"?self:null,Ia=typeof window<"u"?window:null,Kn=PA||Ia||globalThis,zA="2.0.0",IA=1e4,HA=1e3,Vn={connecting:0,open:1,closing:2,closed:3},Jt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},vr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},xf={longpoll:"longpoll",websocket:"websocket"},qA={complete:4},Cf="base64url.bearer.phx.",Hl=class{constructor(t,e,s,a){this.channel=t,this.event=e,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,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:s}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.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})}},nb=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))}},$A=class{constructor(t,e,s){this.state=Jt.closed,this.topic=t,this.params=eo(e||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Hl(this,vr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new nb(()=>{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=Jt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Jt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Jt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Jt.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 Hl(this,vr.leave,eo({}),this.timeout).send(),this.state=Jt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(vr.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}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=Jt.closed,this.bindings=[]}onClose(t){this.on(vr.close,t)}onError(t){return this.on(vr.error,e=>t(e))}on(t,e){let s=this.bindingRef++;return this.bindings.push({event:t,ref:s,callback:e}),s}off(t,e){this.bindings=this.bindings.filter(s=>!(s.event===t&&(typeof e>"u"||e===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,s=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 a=new Hl(this,t,function(){return e},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Jt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(vr.close,"leave")},s=new Hl(this,vr.leave,eo({}),t);return s.receive("ok",()=>e()).receive("timeout",()=>e()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(t,e,s){return e}filterBindings(t,e,s){return!0}isMember(t,e,s,a){return this.topic!==t?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Jt.joining,this.joinPush.resend(t))}trigger(t,e,s,a){let l=this.onMessage(t,e,s,a);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,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,a||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===Jt.closed}isErrored(){return this.state===Jt.errored}isJoined(){return this.state===Jt.joined}isJoining(){return this.state===Jt.joining}isLeaving(){return this.state===Jt.leaving}},uu=class{static request(t,e,s,a,l,u,c){if(Kn.XDomainRequest){let d=new Kn.XDomainRequest;return this.xdomainRequest(d,t,e,a,l,u,c)}else if(Kn.XMLHttpRequest){let d=new Kn.XMLHttpRequest;return this.xhrRequest(d,t,e,s,a,l,u,c)}else{if(Kn.fetch&&Kn.AbortController)return this.fetchRequest(t,e,s,a,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,s,a,l,u,c){let d={method:t,headers:s,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),Kn.fetch(e,d).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>c&&c(m)).catch(m=>{m.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(t,e,s,a,l,u,c){return t.timeout=l,t.open(e,s),t.onload=()=>{let d=this.parseJSON(t.responseText);c&&c(d)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(a),t}static xhrRequest(t,e,s,a,l,u,c,d){t.open(e,s,!0),t.timeout=u;for(let[p,m]of Object.entries(a))t.setRequestHeader(p,m);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===qA.complete&&d){let p=this.parseJSON(t.responseText);d(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 s=[];for(var a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let l=e?`${e}[${a}]`:a,u=t[a];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let s=t.match(/\?/)?"&":"?";return`${t}${s}${this.serialize(e)}`}},KA=t=>{let e="",s=new Uint8Array(t),a=s.byteLength;for(let l=0;l<a;l++)e+=String.fromCharCode(s[l]);return btoa(e)},Na=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Cf)&&(this.authToken=atob(e[1].slice(Cf.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 19
19,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Vn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+xf.websocket),"$1/"+xf.longpoll)}endpointURL(){return uu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,s){this.close(t,e,s),this.readyState=Vn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Vn.open||this.readyState===Vn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:s,token:a,messages:l}=e;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Vn.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(t){typeof t!="string"&&(t=KA(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 20`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,s){for(let l of this.reqs)l.abort();this.readyState=Vn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(t,e,s,a,l){let u,c=()=>{this.reqs.delete(u),a()};u=uu.request(t,this.endpointURL(),e,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},GA=class Xi{constructor(e,s={}){let a=s.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(a.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Xi.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Xi.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Xi.syncDiff(this.state,l,u,c),d())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Xi.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,s,a,l){let u=this.clone(e),c={},d={};return this.map(u,(p,m)=>{s[p]||(d[p]=m)}),this.map(s,(p,m)=>{let y=u[p];if(y){let g=m.metas.map(O=>O.phx_ref),b=y.metas.map(O=>O.phx_ref),_=m.metas.filter(O=>b.indexOf(O.phx_ref)<0),S=y.metas.filter(O=>g.indexOf(O.phx_ref)<0);_.length>0&&(c[p]=m,c[p].metas=_),S.length>0&&(d[p]=this.clone(y),d[p].metas=S)}else c[p]=m}),this.syncDiff(u,{joins:c,leaves:d},a,l)}static syncDiff(e,s,a,l){let{joins:u,leaves:c}=this.clone(s);return a||(a=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let m=e[d];if(e[d]=this.clone(p),m){let y=e[d].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[d].metas.unshift(...g)}a(d,m,p)}),this.map(c,(d,p)=>{let m=e[d];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),l(d,m,p),m.metas.length===0&&delete e[d]}),e}static list(e,s){return s||(s=function(a,l){return l}),this.map(e,(a,l)=>s(a,l))}static map(e,s){return Object.getOwnPropertyNames(e).map(a=>s(a,e[a]))}static clone(e){return JSON.parse(JSON.stringify(e))}},ql={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 s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(s))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[s,a,l,u,c]=JSON.parse(t);return e({join_ref:s,ref:a,topic:l,event:u,payload:c})}},binaryEncode(t){let{join_ref:e,ref:s,event:a,topic:l,payload:u}=t,c=this.META_LENGTH+e.length+s.length+l.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,e.length),p.setUint8(m++,s.length),p.setUint8(m++,l.length),p.setUint8(m++,a.length),Array.from(e,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(s,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(l,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(d.byteLength+u.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(u),d.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),s=e.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(t,e,a);case this.KINDS.reply:return this.decodeReply(t,e,a);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,a)}},decodePush(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(t.slice(c,c+a));c=c+a;let p=s.decode(t.slice(c,c+l));c=c+l;let m=s.decode(t.slice(c,c+u));c=c+u;let y=t.slice(c,t.byteLength);return{join_ref:d,ref:null,topic:p,event:m,payload:y}},decodeReply(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(t.slice(d,d+a));d=d+a;let m=s.decode(t.slice(d,d+l));d=d+l;let y=s.decode(t.slice(d,d+u));d=d+u;let g=s.decode(t.slice(d,d+c));d=d+c;let b=t.slice(d,t.byteLength),_={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:vr.reply,payload:_}},decodeBroadcast(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(t.slice(u,u+a));u=u+a;let d=s.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:d,payload:p}}},VA=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||IA,this.transport=e.transport||Kn.WebSocket||Na,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=Kn&&Kn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=ql.encode.bind(ql),this.defaultDecoder=ql.decode.bind(ql),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!==Na?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Ia&&Ia.addEventListener&&(Ia.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Ia.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),Ia.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=eo(e.params||{}),this.endPoint=`${t}/${xf.websocket}`,this.vsn=e.vsn||zA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new nb(()=>{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 Na}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
vendor: 4,337 bytes, line 20
20close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=uu.appendParams(uu.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,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,s)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=eo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Na?this.connectWithFallback(Na,this.longPollFallbackMs):this.transportConnect())}log(t,e,s){this.logger&&this.logger(t,e,s)}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(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let a=this.onMessage(l=>{l.ref===e&&(this.off([a]),t(Date.now()-s))});return!0}transportName(t){return t===Na?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Cf}${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 s=!1,a=!0,l,u,c=this.transportName(t),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),a=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,e),u=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,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(),HA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,s){if(!this.conn)return t&&t();const a=this.conn;this.waitForBufferDone(a,()=>{e?a.close(e,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,785 bytes, line 20
20,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,s=1){if(s===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,s+1)},150*s)}waitForSocketClosed(t,e,s=1){if(s===5||t.readyState===Vn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,s+1)},150*s)}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,s=this.establishedConnections;this.triggerStateCallbacks("error",t,e,s),(e===this.transport||s>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(vr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Vn.connecting:return"connecting";case Vn.open:return"open";case Vn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(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(([s])=>t.indexOf(s)===-1)}channel(t,e={}){let s=new $A(t,e,this);return this.channels.push(s),s}push(t){if(this.hasLogger()){let{topic:e,event:s,payload:a,ref:l,join_ref:u}=t;this.log("push",`${e} ${s} (${u}, ${l})`,a)}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:s,event:a,payload:l,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${a} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,a,l,c)&&p.trigger(a,l,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([s,a])=>{try{a(...e)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(s){this.log("error",`error triggering ${t} callbacks`,s)}}leaveOpenTopic(t){let e=this.channels.find(s=>s.topic===t&&(s.isJoined()||s.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class to{constructor(e,s){const a=FA(s);this.presence=new GA(e.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=to.onJoinPayload(l,u,c);e.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=to.onLeavePayload(l,u,c);e.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return to.transformState(this.presence.state)}static transformState(e){return e=YA(e),Object.getOwnPropertyNames(e).reduce((s,a)=>{const l=e[a];return s[a]=tu(l),s},{})}static onJoinPayload(e,s,a){const l=tv(s),u=tu(a);return{event:"join",key:e,currentPresences:l,newPresences:u}}static onLeavePayload(e,s,a){const l=tv(s),u=tu(a);return{event:"leave",key:e,currentPresences:l,leftPresences:u}}}function tu(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function YA(t){return JSON.parse(JSON.stringify(t))}function FA(t){return t?.events&&{events:t.events}}function tv(t){return t?.metas?tu(t):[]}var nv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(nv||(nv={}));class QA{get state(){return this.presenceAdapter.state}constructor(e,s){this.channel=e,this.presenceAdapter=new to(this.channel.channelAdapter,s
20)}}function JA(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const s=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${s}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class XA{constructor(e,s,a){const l=ZA(a);this.channel=e.getSocket().channel(s,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,s){return this.channel.on(e,s)}off(e,s){this.channel.off(e,s)}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,s,a){let l;try{l=this.channel.push(e,s,a)}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>kA){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 s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),e)}canPush(){return this.socket.isConnected()&&this.state===Zr.joined}isJoined(){return this.state===Zr.joined}isJoining(){return this.state===Zr.joining}isClosed(){return this.state===Zr.closed}isLeaving(){return this.state===Zr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function ZA(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var rv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(rv||(rv={}));var $a;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})($a||($a={}));var br;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(br||(br={}));class no{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,s={config:{}},a){var l,u;if(this.topic=e,this.params=s,this.socket=a,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new XA(this.socket.socketAdapter,e,this.params),this.presence=new QA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=tb(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,s=this.timeout){var a,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,m=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[$a.PRESENCE]&&this.bindings[$a.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,g={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(br.CHANNEL_ERROR,JA(_))}),this._onClose(()=>e?.(br.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(br.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Zr.errored;const S=Object.values(_).join(", ")||"error";e?.(br.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(br.TIMED_OUT)})}return this}_updatePostgresBindings(e,s){var a;const l=this.bindings.postgres_changes,u=(a=l?.length)!==null&&a!==void 0?a:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:m,schema:y,table:g,filter:b}}=p,_=e&&e[d];if(_&&_.event===m&&no.isFilterValueEqual(_.schema,y)&&no.isFilterValueEqual(_.table,g)&&no.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Zr.errored,s?.(br.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Zr.errored&&s&&s(br.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,s={}){return await this.send({type:"presence",event:"track",payload:e},s.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,s,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===$a.PRESENCE||e===$a.POSTGRES_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,s,a)}async httpSend(e,s,a={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&d.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?s:JSON.stringify(s)},m=await this._fetchWithTimeout(d.toString(),p,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(m.status===202)return{success:!0};let y=m.statusText;try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(e,s={}){var a,l;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a:this.timeout);return await((l=m.body)===null||l===void 0?void 0:l.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,d,p;const m=this.channelAdapter.push(e.type,e,s.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),m.receive("ok",()=>u("ok")),m.receive("error",()=>u("error")),m.receive("timeout",()=>u("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,s,a){const l=new AbortController,u=setTimeout(()=>l.abort(),a),c=await this.socket.fetch(e,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(e,s,a){const l=e.toLocaleLowerCase(),u=this.channelAdapter.on(e,a),c={type:l,filter:s,callback:a,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,s,a)=>{var l,u,c,d,p,m,y;const g=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,a))return!1;const b=(l=this.bindings[g])===null||l===void 0?void 0:l.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((y=s?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(e,s){const{close:a,error:l,leave:u,join:c}=W0;return s&&[a,l,u,c].includes(e)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,s,a)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:m}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(l))}return s})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in e.bindings)for(const a of e.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(e,s){return(e??void 0)===(s??void 0)}_getPayloadRecords(e){const s={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(s.new=ev(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(s.old=ev(e.columns,e.old_record)),s}}class WA{constructor(e,s){this.socket=new VA(e,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(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,s,a,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{e(),u("ok")},s,a)})}push(e){this.socket.push(e)}log(e,s,a){this.socket.log(e,s,a)}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()==Af.connecting}isDisconnecting(){return this.socket.connectionState()==Af.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const sv={HEARTBEAT_INTERVAL:25e3},eO=[1e3,2e3,5e3,1e4],tO=1e4;function nO(){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 s;return(s=Array.from(t.keys())[e])!==null&&s!==void 0?s:null},removeItem(e){t.delete(e)},setItem(e,s){t.set(e,String(s))}}}function rO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return nO()}const sO=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class aO{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,s){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new jA,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((a=s?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new WA(e,l),this.httpEndpoint=tb(e),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const s=e.message;throw s.includes("Node.js")?new Error(`${s} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,s)}getChannels(){return this.channels}async removeChannel(e){const s=await e.unsubscribe();return s==="ok"&&e.teardown(),s}async removeAllChannels(){const e=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),s=await Promise.all(e);return await this.disconnect(),s}log(e,s,a){this.socketAdapter.log(e,s,a)}connectionState(){return this.socketAdapter.connectionState()||Af.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,s={config:{}}){const a=`realtime:${e}`,l=this.getChannels().find(u=>u.topic===a);if(l)return l;{const u=new no(`realtime:${e}`,s,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(s=>s.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let s,a=!1;if(e)s=e,a=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:AA};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(W0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${e}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(s,a)=>{s=="sent"&&this._setAuthSafely(),e&&e(s,a)}}_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=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let s;if(e)s=e;else{const a=new Blob([sO],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(e){var s,a,l,u,c,d,p,m,y,g,b,_;this.worker=(s=e?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=e?.accessToken)!==null&&a!==void 0?a:null;const S={};S.timeout=(l=e?.timeout)!==null&&l!==void 0?l:CA,S.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:sv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=e?.heartbeatIntervalMs)!==null&&d!==void 0?d:sv.HEARTBEAT_INTERVAL),S.transport=(p=e?.transport)!==null&&p!==void 0?p:TA.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(m=e?.sessionStorage)!==null&&m!==void 0?m:rO(),S.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>eO[M-1]||tO);let O,E;const A=(g=e?.vsn)!==null&&g!==void 0?g:xA;switch(A){case OA:O=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case Z0:O=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=A,S.encode=(b=e?.encode)!==null&&b!==void 0?b:O,S.decode=(_=e?.decode)!==null&&_!==void 0?_:E,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()}}
38var uo=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 iO(t,e,s){const a=new URL(e,t);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&a.searchParams.set(l,u);return a.toString()}async function oO(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 lO(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:l,body:u,headers:c}){const d=iO(t.baseUrl,a,l),p=await oO(t.auth),m=await e(d,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const _=g?b:void 0,S=_?.error;throw new uo(S?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:m.status,headers:m.headers,data:b}}}}function $l(t){return t.join("�")}var uO=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:$l(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(t,e){const s={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${$l(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${$l(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${$l(t.namespace)}`}),!0}catch(e){if(e instanceof uo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(s){if(s instanceof uo&&s.status===409)return;throw s}}};function Ua(t){return t.join("�")}var cO=class{constructor(t,e="",s){this.client=t,this.prefix=e,this.accessDelegation=s}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables`,body:e,headers:s})).data.metadata}async updateTable(t,e){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ua(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/${Ua(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/${Ua(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(s){if(s instanceof uo&&s.status===404)return!1;throw s}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(s){if(s instanceof uo&&s.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw s}}},hO=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const s=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=lO({baseUrl:s,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new uO(this.client,e),this.tableOps=new cO(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
38async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function co(t){"@babel/helpers - typeof";return co=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},co(t)}function fO(t,e){if(co(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(co(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dO(t){var e=fO(t,"string");return co(e)=="symbol"?e:e+""}function pO(t,e,s){return(e=dO(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function av(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function fe(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?av(Object(s),!0).forEach(function(a){pO(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):av(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}var Ou=class extends Error{constructor(t,e="storage",s,a){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function xu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var kf=class extends Ou{constructor(t,e,s,a="storage"){super(t,a,e,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=s}toJSON(){return fe({},super.toJSON())}},rb=class extends Ou{constructor(t,e,s="storage"){super(t,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function cu(t,e,s){const a=fe({},t),l=e.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===l&&delete a[u];return a[l]=s,a}function mO(t){const e={};for(const[s,a]of Object.entries(t))e[s.toLowerCase()]=a;return e}const gO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),yO=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)},jf=t=>{if(Array.isArray(t))return t.map(s=>jf(s));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([s,a])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[l]=jf(a)}),e},vO=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),iv=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 s=e.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(t)},bO=async(t,e,s,a)=>{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 d=c?.statusCode||c?.code||u+"";e(new kf(iv(c),u,d,a))}).catch(()=>{const c=u+"";e(new kf(l.statusText||`HTTP ${u} error`,u,c,a))})}else e(new rb(iv(t),t,a))},_O=(t,e,s,a)=>{const l={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!a)return fe(fe({},l),s);if(yO(a)){var u;const c=e?.headers||{};let d;for(const[p,m]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=m);l.headers=cu(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return e?.duplex&&(l.duplex=e.duplex),fe(fe({},l),s)};async function Qi(t,e,s,a,l,u,c){return new Promise((d,p)=>{t(s,_O(e,a,l,u)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(c==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>d(m)).catch(m=>bO(m,p,a,c))})}
38function sb(t="storage"){return{get:async(e,s,a,l)=>Qi(e,"GET",s,a,l,void 0,t),post:async(e,s,a,l,u)=>Qi(e,"POST",s,l,u,a,t),put:async(e,s,a,l,u)=>Qi(e,"PUT",s,l,u,a,t),head:async(e,s,a,l)=>Qi(e,"HEAD",s,fe(fe({},a),{},{noResolveJson:!0}),l,void 0,t),remove:async(e,s,a,l,u)=>Qi(e,"DELETE",s,l,u,a,t)}}const wO=sb("storage"),{get:ho,post:jn,put:Mf,head:SO,remove:td}=wO,cn=sb("vectors");var Qa=class{constructor(t,e={},s,a="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=mO(e),this.fetch=gO(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=cu(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(xu(s))return{data:null,error:s};throw s}}};let ab;ab=Symbol.toStringTag;var EO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[ab]="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(xu(e))return{data:null,error:e};throw e}}};let ib;ib=Symbol.toStringTag;var TO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[ib]="BlobDownloadBuilder",this.promise=null}asStream(){return new EO(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(xu(e))return{data:null,error:e};throw e}}};const RO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ov={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var AO=class extends Qa{constructor(t,e={},s,a){super(t,e,a,"storage"),this.bucketId=s}async uploadOrUpdate(t,e,s,a){var l=this;return l.handleOperation(async()=>{let u;const c=fe(fe({},ov),a);let d=fe(fe({},l.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=cu(d,b,_);const m=l._removeEmptyFolders(e),y=l._getFinalPath(m),g=await(t=="PUT"?Mf:jn)(l.fetch,`${l.url}/object/${y}`,u,fe({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(t,e,s){return this.uploadOrUpdate("POST",t,e,s)}async uploadToSignedUrl(t,e,s,a){var l=this;const u=l._removeEmptyFolders(t),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",e),l.handleOperation(async()=>{let p;const m=fe(fe({},ov),a);let y=fe(fe({},l.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",l.encodeMetadata(g)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(g))):(p=s,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))y=cu(y,b,_);return{path:u,fullPath:(await Mf(l.fetch,d.toString(),p,fe({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(t);const l=fe({},s.headers);e?.upsert&&(l["x-upsert"]="true");const u=await jn(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new Ou("No token returned by API");return{signedUrl:c.toString(),path:t,token:d}})}async update(t,e,s){return this.uploadOrUpdate("PUT",t,e,s)}async move(t,e,s){var a=this;return a.handleOperation(async()=>await jn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(t,e,s){var a=this;return a.handleOperation(async()=>({path:(await jn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(t,e,s){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(t);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await jn(a.fetch,`${a.url}/object/sign/${l}
38`,fe({expiresIn:e},u?{transform:s.transform}:{}),{headers:a.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,e,s){var a=this;return a.handleOperation(async()=>{const l=await jn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:e,paths:t},{headers:a.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(d=>fe(fe({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,s){const a=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),d=()=>ho(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new TO(d,this.shouldThrowOnError)}async info(t){var e=this;const s=e._getFinalPath(t);return e.handleOperation(async()=>jf(await ho(e.fetch,`${e.url}/object/info/${s}`,{headers:e.headers})))}async exists(t){var e=this;const s=e._getFinalPath(t);try{return await SO(e.fetch,`${e.url}/object/${s}`,{headers:e.headers}),{data:!0,error:null}}catch(l){if(e.shouldThrowOnError)throw l;if(xu(l)){var a;const u=l instanceof kf?l.status:l instanceof rb?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,e){const s=this._getFinalPath(t),a=new URLSearchParams;e?.download&&a.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(a,e.transform),e?.cacheNonce!=null&&a.set("cacheNonce",String(e.cacheNonce));const l=a.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/${s}`)+(l?`?${l}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await td(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,s){var a=this;return a.handleOperation(async()=>{const l=fe(fe(fe({},RO),e),{},{prefix:t||""});return await jn(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},s)})}async listV2(t,e){var s=this;return s.handleOperation(async()=>{const a=fe({},t);return await jn(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const OO="2.108.1",_o={"X-Client-Info":`storage-js/${OO}`};var xO=class extends Qa{constructor(t,e={},s,a){const l=new URL(t);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=fe(fe({},_o),e);super(u,c,s,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=e.listBucketOptionsToQueryString(t);return await ho(e.fetch,`${e.url}/bucket${s}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ho(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var s=this;return s.handleOperation(async()=>await jn(s.fetch,`${s.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:s.headers}))}async updateBucket(t,e){var s=this;return s.handleOperation(async()=>await Mf(s.fetch,`${s.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await jn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await td(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():""}},CO=class extends Qa{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},_o),e);super(a,l,s,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await jn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=new URLSearchParams;t?.limit!==void 0&&s.set("limit",t.limit.toString()),t?.offset!==void 0&&s.set("offset",t.offset.toString()),t?.sortColumn&&s.set("sortColumn",t.sortColumn),t?.sortOrder&&s.set("sortOrder",t.sortOrder),t?.search&&s.set("search",t.search);const a=s.toString(),l=a?`${e.url}/bucket?${a}`:`${e.url}/bucket`;return await ho(e.fetch,l,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await td(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!vO(t))throw new Ou("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new hO({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},kO=class extends Qa{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},_o),{},{"Content-Type":"application/json"},e);super(a,l,s,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var s=this;return s.handleOperation(async()=>await cn.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var s=this;return s.handleOperation(async()=>await cn.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers})||{})}},jO=class extends Qa{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},_o),{},{"Content-Type":"application/json"},e);super(a,l,s,"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 cn.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await cn.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");
38if(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 cn.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await cn.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 cn.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},MO=class extends Qa{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},_o),{},{"Content-Type":"application/json"},e);super(a,l,s,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await cn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},DO=class extends MO{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new NO(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,s=this;return e().call(s,t)}async getBucket(t){var e=()=>super.getBucket,s=this;return e().call(s,t)}async listBuckets(t={}){var e=()=>super.listBuckets,s=this;return e().call(s,t)}async deleteBucket(t){var e=()=>super.deleteBucket,s=this;return e().call(s,t)}},NO=class extends kO{constructor(t,e,s,a){super(t,e,a),this.vectorBucketName=s}async createIndex(t){var e=()=>super.createIndex,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,s=this;return e().call(s,s.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,s=this;return e().call(s,s.vectorBucketName,t)}index(t){return new UO(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},UO=class extends jO{constructor(t,e,s,a,l){super(t,e,l),this.vectorBucketName=s,this.indexName=a}async putVectors(t){var e=()=>super.putVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(t){var e=()=>super.getVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},LO=class extends xO{constructor(t,e={},s,a){super(t,e,s,a)}from(t){return new AO(this.url,this.headers,t,this.fetch)}get vectors(){return new DO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new CO(this.url+"/iceberg",this.headers,this.fetch)}};const ob="2.108.1",Qr=30*1e3,Zi=3,lf=Zi*Qr,BO="http://localhost:9999",PO="supabase.auth.token",zO={"X-Client-Info":`gotrue-js/${ob}`},Df="X-Supabase-Api-Version",lb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},IO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,HO=600*1e3;class fo extends Error{constructor(e,s,a){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class qO extends fo{constructor(e,s,a){super(e,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function $O(t){return te(t)&&t.name==="AuthApiError"}class Dn extends fo{constructor(e,s){super(e),this.name="AuthUnknownError",this.originalError=s}}class Yn extends fo{constructor(e,s,a,l){super(e,a,l),this.name=s,this.status=a}}class yt extends Yn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Kl(t){return te(t)&&t.name==="AuthSessionMissingError"}class La extends Yn{constructor(){super("Auth session or user missing","AuthInvalidToken
38ResponseError",500,void 0)}}class Gl extends Yn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Vl extends Yn{constructor(e,s=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function KO(t){return te(t)&&t.name==="AuthImplicitGrantRedirectError"}class lv extends Yn{constructor(e,s=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class GO extends Yn{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 Nf extends Yn{constructor(e,s){super(e,"AuthRetryableFetchError",s,void 0)}}function uf(t){return te(t)&&t.name==="AuthRetryableFetchError"}class uv extends Yn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function VO(t){return te(t)&&t.name==="AuthRefreshDiscardedError"}class cv extends Yn{constructor(e,s,a){super(e,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class hu extends Yn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),hv=` 39\r=`.split(""),YO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<hv.length;e+=1)t[hv[e].charCodeAt(0)]=-2;for(let e=0;e<fu.length;e+=1)t[fu[e].charCodeAt(0)]=e;return t})();function fv(t,e,s){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;s(fu[a]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;s(fu[a]),e.queuedBits-=6}}function ub(t,e,s){const a=YO[t];if(a>-1)for(e.queue=e.queue<<6|a,e.queuedBits+=6;e.queuedBits>=8;)s(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function dv(t){const e=[],s=c=>{e.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{JO(c,a,s)};for(let c=0;c<t.length;c+=1)ub(t.charCodeAt(c),l,u);return e.join("")}function FO(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 QO(t,e){for(let s=0;s<t.length;s+=1){let a=t.charCodeAt(s);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(t.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}FO(a,e)}}function JO(t,e,s){if(e.utf8seq===0){if(t<=127){s(t);return}for(let a=1;a<6;a+=1)if((t>>7-a&1)===0){e.utf8seq=a;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&&s(e.codepoint)}}function Ya(t){const e=[],s={queue:0,queuedBits:0},a=l=>{e.push(l)};for(let l=0;l<t.length;l+=1)ub(t.charCodeAt(l),s,a);return new Uint8Array(e)}function XO(t){const e=[];return QO(t,s=>e.push(s)),new Uint8Array(e)}function Is(t){const e=[],s={queue:0,queuedBits:0},a=l=>{e.push(l)};return t.forEach(l=>fv(l,s,a)),fv(null,s,a),e.join("")}function ZO(t){return Math.round(Date.now()/1e3)+t}function WO(){return Symbol("auth-callback")}const Ct=()=>typeof window<"u"&&typeof document<"u",Ds={tested:!1,writable:!1},cb=()=>{if(!Ct())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ds.tested)return Ds.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Ds.tested=!0,Ds.writable=!0}catch{Ds.tested=!0,Ds.writable=!1}return Ds.writable};function ex(t){const e={},s=new URL(t);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEac
39h((l,u)=>{e[u]=l})}catch{}return s.searchParams.forEach((a,l)=>{e[l]=a}),e}const hb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),tx=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ha=async(t,e,s)=>{await t.setItem(e,JSON.stringify(s))},gr=async(t,e)=>{const s=await t.getItem(e);if(!s)return null;try{return JSON.parse(s)}catch{return null}},nt=async(t,e)=>{await t.removeItem(e)};class Cu{constructor(){this.promise=new Cu.promiseConstructor((e,s)=>{this.resolve=e,this.reject=s})}}Cu.promiseConstructor=Promise;function Yl(t){const e=t.split(".");if(e.length!==3)throw new hu("Invalid JWT structure");for(let a=0;a<e.length;a++)if(!IO.test(e[a]))throw new hu("JWT not in base64url format");return{header:JSON.parse(dv(e[0])),payload:JSON.parse(dv(e[1])),signature:Ya(e[2]),raw:{header:e[0],payload:e[1]}}}async function nx(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function rx(t,e){return new Promise((a,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!e(u,null,c)){a(c);return}}catch(c){if(!e(u,c)){l(c);return}}})()})}function sx(t){return("0"+t.toString(16)).substr(-2)}function ax(){const e=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(e),Array.from(e,sx).join("")}async function ix(t){const s=new TextEncoder().encode(t),a=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(a);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function ox(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 s=await ix(t);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ns(t,e,s=!1){const a=ax();let l=a;s&&(l+="/recovery"),await Ha(t,`${e}-code-verifier`,l);const u=await ox(a);return[u,a===u?"plain":"s256"]}const lx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ux(t){const e=t.headers.get(Df);if(!e||!e.match(lx))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function cx(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 hx(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 fx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function yr(t){if(!fx.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function kn(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 cf(){const t={};return new Proxy(t,{get:(e,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function dx(t,e){return new Proxy(t,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
39if(typeof a=="symbol"){const u=a.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,a,l)}return!e.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(s,a,l)}})}function pv(t){return JSON.parse(JSON.stringify(t))}const Us=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)},px=[502,503,504,520,521,522,523,524,530];async function mv(t){var e;if(!tx(t))throw new Nf(Us(t),0);if(px.includes(t.status))throw new Nf(Us(t),t.status);let s;try{s=await t.json()}catch(u){throw new Dn(Us(u),u)}let a;const l=ux(t);if(l&&l.getTime()>=lb["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new cv(Us(s),t.status,((e=s.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(a==="session_not_found")throw new yt}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new cv(Us(s),t.status,s.weak_password.reasons);throw new qO(Us(s),t.status||500,a)}const mx=(t,e,s,a)=>{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(a),Object.assign(Object.assign({},l),s))};async function re(t,e,s,a){var l;const u=Object.assign({},a?.headers);u[Df]||(u[Df]=lb["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await gx(t,e,s+d,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function gx(t,e,s,a,l,u){const c=mx(e,a,l,u);let d;try{d=await t(s,Object.assign({},c))}catch(p){throw console.error(p),new Nf(Us(p),0)}if(d.ok||await mv(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await mv(p)}}function Tn(t){var e;let s=null;bx(t)&&(s=Object.assign({},t),t.expires_at||(s.expires_at=ZO(t.expires_in)));const a=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:s,user:a},error:null}}function gv(t){const e=Tn(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((s,a)=>s&&typeof a=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Wr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function yx(t){return{data:t,error:null}}function vx(t){const{action_link:e,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=t,c=Au(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function yv(t){return t}function bx(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const hf=["global","local","others"];class _x{constructor({url:e="",headers:s={},fetch:a,experimental:l}){this.url=e,this.headers=s,this.fetch=hb(a),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,s=hf[0]){if(hf.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${hf.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(a){if(te(a))return{data:null,error:a};throw a}}async inviteUserByEmail(e,s={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Wr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async generateLink(e){try{const{options:s}=e,a=Au(e,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:vx,redirectTo:s?.redirectTo})}catch(s){if(te(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(e){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Wr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async listUsers(e){var s,a,l,u,c,d,p;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:yv});if(y.error)throw y.error;const g=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=O}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{users:[]},error:m};throw m}}async getUserById(e){yr(e);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Wr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async updateUserById(e,s){yr(e);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:s,headers:this.headers,xform:Wr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async deleteUser(e,s=!1){yr(e);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:s},xform:Wr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async _listFactors(e){yr(e.userId);try{const{data:s,error:a}=await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:a}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _deleteFactor(e){yr(e.userId),yr(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(s){if(te(s))return{data:null,error:s};throw s}}async _listOAuthClients(e){var s,a,l,u,c,d,p;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:yv});if(y.error)throw y.error;const g=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=O}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(e){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getOAuthClient(e){try{return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateOAuthClient(e,s){try{return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(e){try{return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(e){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _listCustomProviders(e){try{const s={};return e?.type&&(s.type=e.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(te(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(e){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getCustomProvider(e){try{return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateCustomProvider(e,s){try{return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(e){try{return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminListPasskeys(e){kn(this.experimental),yr(e.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(e){kn(this.experimental),yr(e.userId),yr(e.passkeyId);
39try{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(s){if(te(s))return{data:null,error:s};throw s}}}function vv(t={}){return{getItem:e=>t[e]||null,setItem:(e,s)=>{t[e]=s},removeItem:e=>{delete t[e]}}}globalThis&&cb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class wx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function Sx(){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 fb(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function Ex(t){return parseInt(t,16)}function Tx(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,a=>a.toString(16).padStart(2,"0")).join("")}function Rx(t){var e;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:m,scheme:y,uri:g,version:b}=t;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!g)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(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=fb(t.address),S=y?`${y}://${a}`:a,O=t.statement?`${t.statement} 41`:"",E=`${S} wants you to sign in with your Ethereum account: 42${_} 43 44${O}`;let A=`URI: ${g} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(A+=` 49Expiration Time: ${l.toISOString()}`),d&&(A+=` 50Not Before: ${d.toISOString()}`),p&&(A+=` 51Request ID: ${p}`),m){let M=` 52Resources:`;for(const j of m){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);M+=` 53- ${j}`}A+=M}return`${E} 54${A}`}class ot extends Error{constructor({message:e,code:s,cause:a,name:l}){var u;super(e,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=l??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class du extends ot{constructor(e,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:e}),this.name="WebAuthnUnknownError",this.originalError=s}}function Ax({error:t,options:e}){var s,a,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 ot({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new ot({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new ot({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 ot({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 ot({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new ot({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new ot({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new ot({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(db(c)){if(u.rp.id!==c)return new ot({message:`The RP ID "${u.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ot({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 ot({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 ot({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 ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Ox({error:t,options:e}){const{publicKey:s}=e;if(!s)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new ot({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new ot({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(db(a)){if(s.rpId!==a)return new ot({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new ot({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 ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class xx{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}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 Uf=new xx;function bv(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:s,excludeCredentials:a}=t,l=Au(t,["challenge","user","excludeCredentials"]),u=Ya(e).buffer,c=Object.assign(Object.assign({},s),{id:Ya(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];d.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:Ya(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return d}function _v(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:s}=t,a=Au(t,["challenge","allowCredentials"]),l=Ya(e).buffer,u=Object.assign(Object.assign({},a),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:Ya(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function wv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t;return{id:t.id,rawId:t.id,response:{attestationObject:Is(new Uint8Array(t.response.attestationObject)),clientDataJSON:Is(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Sv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t,a=t.getClientExtensionResults(),l=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Is(new Uint8Array(l.authenticatorData)),clientDataJSON:Is(new Uint8Array(l.clientDataJSON)),signature:Is(new Uint8Array(l.signature)),userHandle:l.userHandle?Is(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function db(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function pu(){var t,e;return!!(Ct()&&"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 pb(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new du("Browser returned unexpected credential type",e)}:{data:null,error:new du("Empty credential response",e)}}catch(e){return{data:null,error:Ax({error:e,options:t})}}}async function mb(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new du("Browser returned unexpected credential type",e)}:{data:null,error:new du("Empty credential response",e)}}catch(e){return{data:null,error:Ox({error:e,options:t})}}}const Cx={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},kx={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function mu(...t){const e=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of t)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(s(c))a[u]=c;else if(e(c)){const d=a[u];e(d)?a[u]=mu(d,c):a[u]=mu(c)}else a[u]=c}return a}function jx(t,e){return mu(Cx,t,e||{})}function Mx(t,e){return mu(kx,t,e||{})}class Dx{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:s,friendlyName:a,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:s});if(!d)return{data:null,error:p};const m=l??Uf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;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(d.webauthn.type){case"create":{const y=jx(d.webauthn.credential_options.publicKey,u?.create),{data:g,error:b}=await pb({publicKey:y,signal:m});return g?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=Mx(d.webauthn.credential_options.publicKey,u?.request),{data:g,error:b}=await mb(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(d){return te(d)?{data:null,error:d}:{data:null,error:new Dn("Unexpected error in challenge",d)}}}async _verify({challengeId:e,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:e,webauthn:a})}async _authenticate({factorId:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new fo("rpId is required for WebAuthn authentication")};try{if(!pu())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:e,webauthn:{rpId:s,rpOrigins:a},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new Dn("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new fo("rpId is required for WebAuthn registration")};try{if(!pu())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:e});if(!c)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.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:d};const{data:p,error:m}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new Dn("Unexpected error in register",c)}}}}Sx();const Nx={url:BO,storageKey:PO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:zO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ba={};class po{get jwks(){var e,s;return(s=(e=Ba[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(e){Ba[this.storageKey]=Object.assign(Object.assign({},Ba[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,s;return(s=(e=Ba[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Ba[this.storageKey]=Object.assign(Object.assign({},Ba[this.storageKey]),{cachedAt:e})}constructor(e){var s,a,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},Nx),e);if(this.storageKey=u.storageKey,this.instanceID=(s=po.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,po.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&Ct()){const c=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new _x({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=hb(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCu
54stomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Dx(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:cb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=vv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=vv(this.memoryStorage)),Ct()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ob}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let s={},a="none";if(Ct()&&(s=ex(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),Ct()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),KO(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:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return te(s)?this._returnResult({error:s}):this._returnResult({error:new Dn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var s,a,l;try{const u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=e?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=e?.options)===null||l===void 0?void 0:l.captchaToken}},xform:Tn}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const p=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(u){if(te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var s,a,l;try{let u;if("email"in e){const{email:y,password:g,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await Ns(this.storage,this.storageKey)),u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:Tn})}else if("phone"in e){const{phone:y,password:g,options:b}=e;u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Tn})}else throw new Gl("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await nt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const p=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(u){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let s;if("email"in e){const{email:u,password:c,options:d}=e;s=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:gv})}else if("phone"in e){const{phone:u,password:c,options:d}=e;s=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:gv})}else throw new Gl("You must provide either an email or phone number and a password");const{data:a,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const u=new La;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(e){var s,a,l,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.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.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:s}=e;switch(s){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(e){var s,a,l,u,c,d,p,m,y,g,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:O,wallet:E,statement:A,options:M}=e;let j;
54if(Ct())if(typeof E=="object")j=E;else{const W=window;if("ethereum"in W&&typeof W.ethereum=="object"&&"request"in W.ethereum&&typeof W.ethereum.request=="function")j=W.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const N=new URL((s=M?.url)!==null&&s!==void 0?s:window.location.href),X=await j.request({method:"eth_requestAccounts"}).then(W=>W).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!X||X.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=fb(X[0]);let I=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!I){const W=await j.request({method:"eth_chainId"});I=Ex(W)}const Y={domain:N.host,address:V,statement:A,uri:N.href,version:"1",chainId:I,nonce:(l=M?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=M?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=M?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=Rx(Y),S=await j.request({method:"personal_sign",params:[Tx(_),V]})}try{const{data:O,error:E}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Tn});if(E)throw E;if(!O||!O.session||!O.user){const A=new La;return this._returnResult({data:{user:null,session:null},error:A})}return O.session&&(await this._saveSession(O.session),await this._notifyAllSubscribers("SIGNED_IN",O.session)),this._returnResult({data:Object.assign({},O),error:E})}catch(O){if(te(O))return this._returnResult({data:{user:null,session:null},error:O});throw O}}async signInWithSolana(e){var s,a,l,u,c,d,p,m,y,g,b,_;let S,O;if("message"in e)S=e.message,O=e.signature;else{const{chain:E,wallet:A,statement:M,options:j}=e;let N;if(Ct())if(typeof A=="object")N=A;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))N=V.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=A}const X=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in N&&N.signIn){const V=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:X.host,uri:X.href}),M?{statement:M}:null));let I;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")I=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)I=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)S=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),O=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${X.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${X.href}`,`Issued At: ${(l=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((m=j?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((g=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...j.sign
54InWithSolana.resources.map(I=>`- ${I}`)]:[]].join(` 55`);const V=await N.signMessage(new TextEncoder().encode(S),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");O=V}}try{const{data:E,error:A}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Is(O)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:Tn});if(A)throw A;if(!E||!E.session||!E.user){const M=new La;return this._returnResult({data:{user:null,session:null},error:M})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:A})}catch(E){if(te(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(e){const s=await gr(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new GO;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:a},xform:Tn});if(await nt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new La;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:s,provider:a,token:l,access_token:u,nonce:c}=e,d=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:Tn}),{data:p,error:m}=d;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new La;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:m})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(e){var s,a,l,u,c;try{if("email"in e){const{email:d,options:p}=e;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Ns(this.storage,this.storageKey));const{error:g}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in e){const{phone:d,options:p}=e,{data:m,error:y}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new Gl("You must provide either an email or phone number.")}catch(d){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(e){var s,a;try{let l,u;"options"in e&&(l=(s=e.options)===null||s===void 0?void 0:s.redirectTo,u=(a=e.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:d}=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:Tn});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,m=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:m,session:p},error:null})}catch(l){if(te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(e){var s,a,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await Ns(this.storage,this.storageKey));const m=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:(a=(s=e.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a: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:d,code_challenge_method:p}),headers:this.headers,xform:yx});return!((u=m.data)===null||u===void 0)&&u.url&&Ct()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(d){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)throw a;if(!s)throw new yt;const{error:l}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(e){if(te(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const s=`${this.url}/resend`;if("email"in e){const{email:a,type:l,options:u}=e;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await Ns(this.storage,this.storageKey));const{error:p}=await re(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:u?.emailRedirectTo});return p&&await nt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in e){const{phone:a,type:l,options:u}=e,{data:c,error:d}=await re(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new Gl("You must provide either an email or phone number and a type")}catch(s){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,s){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await e(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const s=await gr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?e=s:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!e)return{data:{session:null},error:null};const a=e.expires_at?e.expires_at*1e3-Date.now()<lf:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",e.expires_at),!a){if(this.userStorage){const c=await gr(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=cf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=dx(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;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(e){try{return e?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Wr}):await this._useSession(async s=>{var a,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new yt}: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:Wr})})}catch(s){if(te(s))return Kl(s)&&(await this._removeSession(),await nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(e,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,s)):await this._updateUser(e,s)}async _updateUser(e,s={}){try{return await this._useSession(async a=>{const{data:l,error:u}=a;if(u)throw u;if(!l.session)throw new yt;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&e.email!=null&&([d,p]=await Ns(this.storage,this.storageKey));const{data:m,error:y}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Wr});if(y)throw y;return c.user=m.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(a){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new yt;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=Yl(e.access_token);if(c.exp&&(a=c.exp,l=a<=s),l){const{data:d,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(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:d.user,token_type:"bearer",expires_in:a-s,expires_at:a},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(te(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async s=>{var a;if(!e){const{data:c,error:d}=s;if(d)throw d;e=(a=c.session)!==null&&a!==void 0?a:void 0}if(!e?.refresh_token)throw new yt;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(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(e,s){var a;try{if(!Ct())throw new Vl("No browser detected.");
55if(e.error||e.error_description||e.error_code)throw new Vl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new lv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Vl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new lv("No code detected.");const{data:j,error:N}=await this._exchangeCodeForSession(e.code);if(N)throw N;const X=new URL(window.location.href);return X.searchParams.delete("code"),window.history.replaceState(window.history.state,"",X.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:m,token_type:y}=e;if(!c||!p||!d||!y)throw new Vl("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let _=g+b;m&&(_=parseInt(m));const S=_-g;S*1e3<=Qr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const O=_-b;g-O>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",O,_,g):g-O<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",O,_,g);const{data:E,error:A}=await this._getUser(c);if(A)throw A;const M={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:e.type},error:null})}catch(l){if(te(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||e.error_description||e.error_code)}async _isPKCECallback(e){const s=await gr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&s)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:l,error:u}=s;if(u&&!Kl(u))return this._returnResult({error:u});const c=(a=l.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:d}=await this.admin.signOut(c,e);if(d&&!($O(d)&&(d.status===404||d.status===401||d.status===403)||Kl(d)))return this._returnResult({error:d})}return e!=="others"&&(await this._removeSession(),await nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const s=WO(),a={id:s,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:a}}}async _emitInitialSession(e){return await this._useSession(async s=>{var a,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((a=this.stateChangeEmitters.get(e))===null||a===void 0?void 0:a.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),Kl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Ns(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(e=s.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var s;try{const{data:a,error:l}=await this._useSession(async u=>{var c,d,p,m,y;const{data:g,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:(d=e.options)===null||d===void 0?void 0:d.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=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return Ct()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:e.provider,url:a?.url},error:null})}catch(a){if(te(a))return this._returnResult({data:{provider:e.provider,url:null},error:a});throw a}}async linkIdentityIdToken(e){return await this._useSession(async s=>{var a;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:m,nonce:y}=e,g=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:Tn}),{data:b,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new La}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await nt(this.storage,`${this.storageKey}-code-verifier`),te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(e){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)throw c;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(l=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(e){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const a=Date.now();return await rx(async l=>(l>0&&await nx(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Tn})),(l,u)=>{const c=200*Math.pow(2,l);return u&&uf(u)&&Date.now()+c-a<Qr})}catch(a){if(this._debug(s,"error",a),te(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",s,"url",a),Ct()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:e,url:a},error:null}}async _recoverAndRefresh(){var e,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await gr(this.storage,this.storageKey);if(l&&this.userStorage){let c=await gr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await Ha(this.userStorage,this.storageKey+"-user",c)),l.user=(e=c?.user)!==null&&e!==void 0?e:cf()}else if(l&&!l.user&&!l.user){const c=await gr(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await nt(this.storage,this.storageKey+"-user"),await Ha(this.storage,this.storageKey,l)):l.user=cf()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<lf;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${lf}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(VO(c)?this._debug(a,"refresh discarded by commit guard",c):(this._debug(a,"refresh failed",c),uf(c)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession())))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(e){var s,a;if(!e)throw new yt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new Cu;const u=await gr(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(e);if(d)throw d;if(!c.session)throw new yt;const p=await gr(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new uv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==y){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await nt(this.storage,this.storageKey),this.userStorage&&await nt(this.userStorage,this.storageKey+"-user");const b={data:null,error:new uv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const g={data:c.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(u){if(this._debug(l,"error",u),te(u)){const c={data:null,error:u};return uf(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(e,s,a=!0){const l=`#_notifyAllSubscribers(${e})`;this._debug(l,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:e,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await nt(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},e),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await Ha(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=pv(l);await Ha(this.storage,this.storageKey,u)}else{const l=pv(s);await Ha(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await nt(this.storage,this.storageKey),await nt(this.storage,this.storageKey+"-code-verifier"),await nt(this.storage,this.storageKey+"-user"),this.userStorage&&await nt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ct()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Qr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-e)/Qr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Qr}ms, refresh threshold is ${Zi} ticks`),l<=Zi&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
55)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof wx)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-e)/Qr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Qr}ms, refresh threshold is ${Zi} ticks`),l<=Zi&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ct()||!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 s=`#_onVisibilityChanged(${e})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,s,a){const l=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await Ns(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);l.push(u.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${e}?${l.join("&")}`}async _unenroll(e){try{return await this._useSession(async s=>{var a;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await re(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(e){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:m}=await re(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(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(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _verify(e){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?wv(e.webauthn.credential_response):Sv(e.webauthn.credential_response)})}:{code:e.code}),{data:p,error:m}=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:m}))})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(e){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:p}=d;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:bv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:_v(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(e){const{data:s,error:a}=await this._challenge({factorId:e.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:e.factorId,challengeId:s.id,code:e.code})}async _listFactors(){var e;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=s?.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 s,a,l,u;if(e)try{const{payload:_}=Yl(e);let S=null;_.aal&&(S=_.aal);let O=S;const{data:{user:E},error:A}=await this.getUser(e);if(A)return this._returnResult({data:null,error:A});((a=(s=E?.factors)===null||s===void 0?void 0:s.filter(N=>N.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(O="aal2");const j=_.amr||[];return{data:{currentLevel:S,nextLevel:O,currentAuthenticationMethods:j},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Yl(c.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((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:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new yt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(e,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new yt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});
55return c.data&&c.data.redirect_url&&Ct()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(e,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new yt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Ct()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;return a?this._returnResult({data:null,error:a}):s?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new yt})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new yt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(e,s={keys:[]}){let a=s.keys.find(d=>d.kid===e);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(d=>d.kid===e),a&&this.jwks_cached_at+HO>l)return a;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,a=u.keys.find(d=>d.kid===e),!a)?null:a}async getClaims(e,s={}){try{let a=e;if(!a){const{data:_,error:S}
55=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});a=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=Yl(a);if(!s?.allowExpired)try{cx(u.exp)}catch(_){throw new hu(_ instanceof Error?_.message:"JWT validation failed")}const m=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!m){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=hx(l.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,c,XO(`${d}.${p}`)))throw new hu("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(e){var s,a,l;kn(this.experimental);try{if(!pu())return this._returnResult({data:null,error:new Dn("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=_v(u.options),p=(l=(a=e?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:Uf.createNewAbortSignal(),{data:m,error:y}=await mb({publicKey:d,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new Dn("WebAuthn ceremony failed",null)});const g=Sv(m);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:g})}catch(u){if(te(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var s,a;kn(this.experimental);try{if(!pu())return this._returnResult({data:null,error:new Dn("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=bv(l.options),d=(a=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:Uf.createNewAbortSignal(),{data:p,error:m}=await pb({publicKey:c,signal:d});if(m||!p)return this._returnResult({data:null,error:m??new Dn("WebAuthn ceremony failed",null)});const y=wv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(te(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){kn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new yt});const{data:l,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){kn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.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(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(e){var s;kn(this.experimental);try{const{data:a,error:l}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(e){kn(this.experimental);try{const{data:s,error:a}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Tn});return a?this._returnResult({data:null,error:a}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){kn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new yt});const{data:l,error:u}=await re(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){kn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:u,error:c}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(e){kn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{error:u}
55=await re(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}}po.nextInstanceID={};const Ux=po,Lx="2.108.1";let Wi="",gu;if(typeof Deno<"u"){var ff;Wi="deno",gu=(ff=Deno.version)===null||ff===void 0?void 0:ff.deno}else if(typeof document<"u")Wi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Wi="react-native";else{var df;Wi="node",gu=typeof process<"u"?(df=process.version)===null||df===void 0?void 0:df.replace(/^v/,""):void 0}const gb=[`runtime=${Wi}`];gu&&gb.push(`runtime-version=${gu}`);const Bx={"X-Client-Info":`supabase-js/${Lx}; ${gb.join("; ")}`},Px={headers:Bx},zx={schema:"public"},Ix={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Hx={},qx={enabled:!1,respectSamplingDecision:!0};function $x(t,e,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(y){try{m(a.next(y))}catch(g){c(g)}}function p(y){try{m(a.throw(y))}catch(g){c(g)}}function m(y){y.done?u(y.value):l(y.value).then(d,p)}m((a=a.apply(t,[])).next())})}let pf=null;const Kx="@opentelemetry/api";function Gx(){return pf===null&&(pf=import(Kx).catch(()=>null)),pf}function Vx(){return $x(this,void 0,void 0,function*(){try{const t=yield Gx();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const s=e.traceparent;return s?{traceparent:s,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function Yx(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[s,a,l,u]=e;if(s.length!==2||a.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(s)||!c.test(a)||!c.test(l)||!c.test(u)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:a,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function Fx(t,e){if(!t||!e||e.length===0)return!1;let s;if(t instanceof URL)s=t;else try{s=new URL(t)}catch{return!1}for(const a of e)try{if(typeof a=="string"){if(Qx(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function Qx(t,e){if(e===t)return!0;if(e.startsWith("*.")){const s=e.slice(2);if(t.endsWith(s)&&(t===s||t.endsWith("."+s)))return!0}return!1}function Jx(t){const e=[];try{const s=new URL(t);e.push(s.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function mo(t){"@babel/helpers - typeof";return mo=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},mo(t)}function Xx(t,e){if(mo(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(mo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zx(t){var e=Xx(t,"string");return mo(e)=="symbol"?e:e+""}function Wx(t,e,s){return(e=Zx(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ev(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function We(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?Ev(Object(s),!0).forEach(function(a){Wx(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Ev(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}const eC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),tC=()=>Headers,nC=(t,e,s,a,l)=>{const u=eC(a),c=tC(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,m=d?Jx(e):null;return async(y,g)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:t;let S=new c(g?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),m){const O=await rC(y,m,p);O&&(O.traceparent&&!S.has("traceparent")&&S.set("traceparent",O.traceparent),O.tracestate&&!S.has("tracestate")&&S.set("tracestate",O.tracestate),O.baggage&&!S.has("baggage")&&S.set("baggage",O.baggage))}return u(y,We(We({},g),{},{headers:S}))}};async function rC(t,e,s){if(!Fx(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const a=await Vx();if(!a||!a.traceparent)return null;if(s){const l=Yx(a.traceparent);if(l&&!l.isSampled)return null}return a}function Tv(t){return typeof t=="boolean"?{enabled:t}:t}function sC(t){return t.endsWith("/")?t:t+"/"}function aC(t,e){var s,a,l,u,c,d;const{db:p,auth:m,realtime:y,global:g}=t,{db:b,auth:_,realtime:S,global:O}=e,E=Tv(t.tracePropagation),A=Tv(e.tracePropagation),M={db:We(We({},b),p),auth:We(We({},_),m),realtime:We(We({},S),y),storage:{},global:We(We(We({},O),g),{},{headers:We(We({},(s=O?.headers)!==null&&s!==void 0?s:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=E?.enabled)!==null&&u!==void 0?u:A?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:A?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return t.accessToken?M.accessToken=t.accessToken:delete M.accessToken,M}function iC(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
55if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(sC(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var oC=class extends Ux{constructor(t){super(t)}},lC=class{constructor(t,e,s){var a,l;this.supabaseUrl=t,this.supabaseKey=e;const u=iC(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`,d={db:zx,realtime:Hx,auth:We(We({},Ix),{},{storageKey:c}),global:Px,tracePropagation:qx},p=aC(s??{},d);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=nC(e,t,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(We({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 EA(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 LO(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new pA(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={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,s)}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,s;if(t.accessToken)return await t.accessToken();const{data:a}=await t.auth.getSession();return(e=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:a,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},_,S){const O={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new oC({url:this.authUrl.href,headers:We(We({},O),_),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:m,experimental:y,fetch:S,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new aO(this.realtimeUrl.href,We(We({},t),{},{params:We(We({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,s){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const uC=(t,e,s)=>new lC(t,e,s);function cC(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const s=e.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}cC()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
55ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function hC(){return uC("https://ktbhwtyzobjkjjegzexv.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt0Ymh3dHl6b2Jqa2pqZWd6ZXh2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODExNDIxODMsImV4cCI6MjA5NjcxODE4M30.OLwnPrSZQ4U39E9rwjqN9EADQnNIXJXBmaXqk06kpI8",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let mf;const nd=new Proxy({},{get(t,e,s){return mf||(mf=hC()),Reflect.get(mf,e,s)}}),fC=zs({type:"function"}).client(async({next:t})=>{const{data:e}=await nd.auth.getSession(),s=e.session?.access_token;return t({headers:s?{Authorization:`Bearer ${s}`}:{}})}),dC=zs(),Rv=cA(()=>({functionMiddleware:[fC],requestMiddleware:[dC]}));var ku=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(){}},pC=class extends ku{#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"}},yb=new pC,mC={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},gC=class{#e=mC;#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)}},Lf=new gC;function yC(t){setTimeout(t,0)}var vC=typeof window>"u"||"Deno"in globalThis;function Mn(){}function bC(t,e){return typeof t=="function"?t(e):t}function _C(t){return typeof t=="number"&&t>=0&&t!==1/0}function wC(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Bf(t,e){return typeof t=="function"?t(e):t}function SC(t,e){return typeof t=="function"?t(e):t}function Av(t,e){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=t;if(c){if(a){if(e.queryHash!==rd(c,e.options))return!1}else if(!yo(e.queryKey,c))return!1}if(s!=="all"){const p=e.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||l&&l!==e.state.fetchStatus||u&&!u(e))}function Ov(t,e){const{exact:s,status:a,predicate:l,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(s){if(go(e.options.mutationKey)!==go(u))return!1}else if(!yo(e.options.mutationKey,u))return!1}return!(a&&e.state.status!==a||l&&!l(e))}function rd(t,e){return(e?.queryKeyHashFn||go)(t)}function go(t){return JSON.stringify(t,(e,s)=>Pf(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function yo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>yo(t[s],e[s])):!1}var EC=Object.prototype.hasOwnProperty;function vb(t,e,s=0){if(t===e)return t;if(s>500)return e;const a=xv(t)&&xv(e);if(!a&&!(Pf(t)&&Pf(e)))return e;const u=(a?t:Object.keys(t)).length,c=a?e:Object.keys(e),d=c.length,p=a?new Array(d):{};let m=0;for(let y=0;y<d;y++){const g=a?y:c[y],b=t[g],_=e[g];if(b===_){p[g]=b,(a?y<u:EC.call(t,g))&&m++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[g]=_;continue}const S=vb(b,_,s+1);p[g]=S,S===b&&m++}return u===d&&m===u?t:p}function j2(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function xv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Pf(t){if(!Cv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Cv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Cv(t){return Object.prototype.toString.call(t)==="[object Object]"}function TC(t){return new Promise(e=>{Lf.setTimeout(e,t)})}function RC(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?vb(t,e):e}function AC(t,e,s=0){const a=[...t,e];return s&&a.length>s?a.slice(1):a}function OC(t,e,s=0){const a=[e,...t];return s&&a.length>s?a.slice(0,-1):a}var sd=Symbol();function bb(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===sd?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function M2(t,e){return typeof t=="function"?t(...e):!!t}function xC(t,e,s){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=e(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),t}var _b=(()=>{let t=()=>vC;return{isServer(){return t()},setIsServer(e){t=e}}})();function CC(){let t,e;const s=new Promise((l,u)=>{t=l,e=u});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},s.reject=l=>{a({status:"rejected",reason:l}),e(l)},s}var kC=yC;function jC(){let t=[],e=0,s=d=>{d()},a=d=>{d()},l=kC;const u=d=>{e?t.push(d):l(()=>{s(d)})},c=()=>{const d=t;t=[],d.length&&l(()=>{a(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;e++;try{p=d()}finally{e--,e||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var Dt=jC(),MC=class extends ku{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}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))}
vendor: 20,025 bytes, line 55
55setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},yu=new MC;function DC(t){return Math.min(1e3*2**t,3e4)}function wb(t){return(t??"online")==="online"?yu.isOnline():!0}var zf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Sb(t){let e=!1,s=0,a;const l=CC(),u=()=>l.status!=="pending",c=O=>{if(!u()){const E=new zf(O);b(E),t.onCancel?.(E)}},d=()=>{e=!0},p=()=>{e=!1},m=()=>yb.isFocused()&&(t.networkMode==="always"||yu.isOnline())&&t.canRun(),y=()=>wb(t.networkMode)&&t.canRun(),g=O=>{u()||(a?.(),l.resolve(O))},b=O=>{u()||(a?.(),l.reject(O))},_=()=>new Promise(O=>{a=E=>{(u()||m())&&O(E)},t.onPause?.()}).then(()=>{a=void 0,u()||t.onContinue?.()}),S=()=>{if(u())return;let O;const E=s===0?t.initialPromise:void 0;try{O=E??t.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(g).catch(A=>{if(u())return;const M=t.retry??(_b.isServer()?0:3),j=t.retryDelay??DC,N=typeof j=="function"?j(s,A):j,X=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,A);if(e||!X){b(A);return}s++,t.onFail?.(s,A),TC(N).then(()=>m()?void 0:_()).then(()=>{e?b(A):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:y,start:()=>(y()?S():_().then(S),l)}}var Eb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_C(this.gcTime)&&(this.#e=Lf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_b.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Lf.clearTimeout(this.#e),this.#e=void 0)}},NC=class extends Eb{#e;#n;#t;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#t=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=jv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=jv(this.options);e.data!==void 0&&(this.setState(kv(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const s=RC(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(Mn).catch(Mn):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=>SC(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Bf(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:!wC(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#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.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.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.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},l=()=>{const d=bb(this.options,e),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(d,m,this):d(m)},c=(()=>{const d={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Sb({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof zf&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof zf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...UC(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...kv(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?a:void 0,a;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),Dt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function UC(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wb(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function kv(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jv(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,a=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function Mv(t){return{onFetch:(e,s)=>{const a=e.options,l=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=S=>{xC(S,()=>e.signal,()=>y=!0)},b=bb(e.options,e.fetchOptions),_=async(S,O,E)=>{if(y)return Promise.reject();if(O==null&&S.pages.length)return Promise.resolve(S);const M=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:O,direction:E?"backward":"forward",meta:e.options.meta};return g(V),V})(),j=await b(M),{maxPages:N}=e.options,X=E?OC:AC;return{pages:X(S.pages,j,N),pageParams:X(S.pageParams,O,N)}};if(l&&u.length){const S=l==="backward",O=S?LC:Dv,E={pages:u,pageParams:c},A=O(a,E);d=await _(E,A,S)}else{const S=t??u.length;do{const O=p===0?c[0]??a.initialPageParam:Dv(a,d);if(p>0&&O==null)break;d=await _(d,O),p++}while(p<S)}return d};e.options.persister?e.fetchFn=()=>e.options.persister?.(m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=m}}}function Dv(t,{pages:e,pageParams:s}){const a=e.length-1;return e.length>0?t.getNextPageParam(e[a],e,s[a],s):void 0}function LC(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var BC=class extends Eb{#e;#n;#t;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||PC(),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.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Sb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)e();else{this.#r({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,s);const c=await this.options.onMutate?.(t,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:t,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,s),await this.options.onSuccess?.(u,t,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,t,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Dt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function PC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zC=class extends ku{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,s){const a=new BC({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:s});return this.add(a),a}add(t){this.#e.add(t);const e=Fl(t);if(typeof e=="string"){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Fl(t);if(typeof e=="string"){const s=this.#n.get(e);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Fl(t);if(typeof e=="string"){const a=this.#n.get(e)?.find(l=>l.state.status==="pending");return!a||a===t}else return!0}runNext(t){const e=Fl(t);return typeof e=="string"?this.#n.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dt.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(s=>Ov(e,s))}findAll(t={}){return this.getAll().filter(e=>Ov(t,e))}notify(t){Dt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Dt.batch(()=>Promise.all(t.map(e=>e.continue().catch(Mn))))}};function Fl(t){return t.options.scope?.id}var IC=class extends ku{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,s){const a=e.queryKey,l=e.queryHash??rd(a,e);let u=this.get(l);return u||(u=new NC({client:t,queryKey:a,queryHash:l,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(a)}),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(){Dt.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(s=>Av(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>Av(t,s)):e}notify(t){Dt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},HC=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(t={}){this.#e=t.queryCache||new IC,this.#n=t.mutationCache||new zC,this.#t=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=yb.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=yu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=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),s=this.#e.build(this,e),a=s.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Bf(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>{const a=s.data;return[e,a]})}setQueryData(t,e,s){const a=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(a.queryHash)?.state.data,c=bC(e,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(t,e,s){return Dt.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Dt.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return Dt.batch(()=>(s.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},a=Dt.batch(()=>this.#e.findAll(t).map(l=>l.cancel(s)));return Promise.all(a).then(Mn).catch(Mn)}invalidateQueries(t,e={}){return Dt.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},a=Dt.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(Mn)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(Mn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(Bf(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mn).catch(Mn)}fetchInfiniteQuery(t){return t.behavior=Mv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mn).catch(Mn)}ensureInfiniteQueryData(t){return t.behavior=Mv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return yu.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.#s.set(go(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],s={};return e.forEach(a=>{yo(t,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(t,e){this.#r.set(go(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(a=>{yo(t,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=rd(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===sd&&(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()}},Tb=ae.createContext(void 0),D2=t=>{const e=ae.useContext(Tb);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},qC=({client:t,children:e})=>(ae.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Q.jsx(Tb.Provider,{value:t,children:e}));const $C="/assets/styles-VDp3BxG6.css";function KC(t,e={}){typeof window>"u"||window.__lovableEvents?.captureException?.(t,{source:"react_error_boundary",route:window.location.pathname,...e},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function GC(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}const VC=t=>{switch(t){case"success":return QC;case"info":return XC;case"warning":return JC;case"error":return ZC;default:return null}},YC=Array(12).fill(0),FC=({visible:t,className:e})=>Z.createElement("div",{className:["sonner-loading-wrapper",e].filter(
vendor: 6,020 bytes, line 55
55Boolean).join(" "),"data-visible":t},Z.createElement("div",{className:"sonner-spinner"},YC.map((s,a)=>Z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),QC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),JC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Z.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"})),XC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),ZC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),WC=Z.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"},Z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ek=()=>{const[t,e]=Z.useState(document.hidden);return Z.useEffect(()=>{const s=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),t};let If=1;class tk{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const s=this.subscribers.indexOf(e);this.subscribers.splice(s,1)}),this.publish=e=>{this.subscribers.forEach(s=>s(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var s;const{message:a,...l}=e,u=typeof e?.id=="number"||((s=e.id)==null?void 0:s.length)>0?e.id:If++,c=this.toasts.find(p=>p.id===u),d=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:a}),{...p,...e,id:u,dismissible:d,title:a}):p):this.addToast({title:a,...l,dismissible:d,id:u}),u},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:e,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),e),this.message=(e,s)=>this.create({...s,message:e}),this.error=(e,s)=>this.create({...s,message:e,type:"error"}),this.success=(e,s)=>this.create({...s,type:"success",message:e}),this.info=(e,s)=>this.create({...s,type:"info",message:e}),this.warning=(e,s)=>this.create({...s,type:"warning",message:e}),this.loading=(e,s)=>this.create({...s,type:"loading",message:e}),this.promise=(e,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:e,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const l=Promise.resolve(e instanceof Function?e():e);let u=a!==void 0,c;const d=l.then(async m=>{if(c=["resolve",m],Z.isValidElement(m))u=!1,this.create({id:a,type:"default",message:m});else if(rk(m)&&!m.ok){u=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${m.status}`):s.error,b=typeof s.description=="function"?await s.description(`HTTP error! status: ${m.status}`):s.description,S=typeof g=="object"&&!Z.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...S})}else if(m instanceof Error){u=!1;const g=typeof s.error=="function"?await s.error(m):s.error,b=typeof s.description=="function"?await s.description(m):s.description,S=typeof g=="object"&&!Z.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...S})}else if(s.success!==void 0){u=!1;const g=typeof s.success=="function"?await s.success(m):s.success,b=typeof s.description=="function"?await s.description(m):s.description,S=typeof g=="object"&&!Z.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,...S})}}).catch(async m=>{if(c=["reject",m],s.error!==void 0){u=!1;const y=typeof s.error=="function"?await s.error(m):s.error,g=typeof s.description=="function"?await s.description(m):s.description,_=typeof y=="object"&&!Z.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,..._})}}).finally(()=>{u&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),p=()=>new Promise((m,y)=>d.then(()=>c[0]==="reject"?y(c[1]):m(c[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(e,s)=>{const a=s?.id||If++;return this.create({jsx:e(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Xt=new tk,nk=(t,e)=>{const s=e?.id||If++;return Xt.addToast({title:t,...e,id:s}),s},rk=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",sk=nk,ak=()=>Xt.toasts,ik=()=>Xt.getActiveToasts(),N2=Object.assign(sk,{success:Xt.success,info:Xt.info,warning:Xt.warning,error:Xt.error,custom:Xt.custom,message:Xt.message,promise:Xt.promise,dismiss:Xt.dismiss,loading:Xt.loading},{getHistory:ak,getToasts:ik});GC
vendor: 4,787 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 55
55left: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
vendor: 1,090 bytes, line 55
55Ql(t){return t.label!==void 0}const ok=3,lk="24px",uk="16px",Nv=4e3,ck=356,hk=14,fk=45,dk=200;function qn(...t){return t.filter(Boolean).join(" ")}function pk(t){const[e,s]=t.split("-"),a=[];return e&&a.push(e),s&&a.push(s),a}const mk=t=>{var e,s,a,l,u,c,d,p,m;const{invert:y,toast:g,unstyled:b,interacting:_,setHeights:S,visibleToasts:O,heights:E,index:A,toasts:M,expanded:j,removeToast:N,defaultRichColors:X,closeButton:V,style:I,cancelButtonStyle:Y,actionButtonStyle:W,className:le="",descriptionClassName:ie="",duration:ge,position:_e,gap:qe,expandByDefault:Me,classNames:L,icons:F,closeButtonAriaLabel:se="Close toast"}=t,[Se,ye]=Z.useState(null),[C,q]=Z.useState(null),[G,J]=Z.useState(!1),[ee,ce]=Z.useState(!1),[we,de]=Z.useState(!1),[xe,Bt]=Z.useState(!1),[Pt,kt]=Z.useState(!1),[us,zt]=Z.useState(0),[cs,Fn]=Z.useState(0),Nn=Z.useRef(g.duration||ge||Nv),fn=Z.useRef(null),_t=Z.useRef(null),tn=A===0,hs=A+1<=O,ft=g.type,Un=g.dismissible!==!1,dt=g.className||"",Le=g.descriptionClassName||"",Je=Z.useMemo(()=>E.findIndex(pe=>pe.toastId===g.id)||0,[E,g.id]),dn=Z.useMemo(()=>{var pe;
vendor: 6,934 bytes, line 55
55return(pe=g.closeButton)!=null?pe:V},[g.closeButton,V]),Qn=Z.useMemo(()=>g.duration||ge||Nv,[g.duration,ge]),Ja=Z.useRef(0),Jn=Z.useRef(0),So=Z.useRef(0),Er=Z.useRef(null),[fs,jt]=_e.split("-"),Rn=Z.useMemo(()=>E.reduce((pe,Ve,pt)=>pt>=Je?pe:pe+Ve.height,0),[E,Je]),At=ek(),ju=g.invert||y,Xa=ft==="loading";Jn.current=Z.useMemo(()=>Je*qe+Rn,[Je,Rn]),Z.useEffect(()=>{Nn.current=Qn},[Qn]),Z.useEffect(()=>{J(!0)},[]),Z.useEffect(()=>{const pe=_t.current;if(pe){const Ve=pe.getBoundingClientRect().height;return Fn(Ve),S(pt=>[{toastId:g.id,height:Ve,position:g.position},...pt]),()=>S(pt=>pt.filter(Ot=>Ot.toastId!==g.id))}},[S,g.id]),Z.useLayoutEffect(()=>{if(!G)return;const pe=_t.current,Ve=pe.style.height;pe.style.height="auto";const pt=pe.getBoundingClientRect().height;pe.style.height=Ve,Fn(pt),S(Ot=>Ot.find(Qe=>Qe.toastId===g.id)?Ot.map(Qe=>Qe.toastId===g.id?{...Qe,height:pt}:Qe):[{toastId:g.id,height:pt,position:g.position},...Ot])},[G,g.title,g.description,S,g.id,g.jsx,g.action,g.cancel]);const Ln=Z.useCallback(()=>{ce(!0),zt(Jn.current),S(pe=>pe.filter(Ve=>Ve.toastId!==g.id)),setTimeout(()=>{N(g)},dk)},[g,N,S,Jn]);Z.useEffect(()=>{if(g.promise&&ft==="loading"||g.duration===1/0||g.type==="loading")return;let pe;return j||_||At?(()=>{if(So.current<Ja.current){const Ot=new Date().getTime()-Ja.current;Nn.current=Nn.current-Ot}So.current=new Date().getTime()})():Nn.current!==1/0&&(Ja.current=new Date().getTime(),pe=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Ln()},Nn.current)),()=>clearTimeout(pe)},[j,_,g,ft,At,Ln]),Z.useEffect(()=>{g.delete&&(Ln(),g.onDismiss==null||g.onDismiss.call(g,g))},[Ln,g.delete]);function Vs(){var pe;if(F?.loading){var Ve;return Z.createElement("div",{className:qn(L?.loader,g==null||(Ve=g.classNames)==null?void 0:Ve.loader,"sonner-loader"),"data-visible":ft==="loading"},F.loading)}return Z.createElement(FC,{className:qn(L?.loader,g==null||(pe=g.classNames)==null?void 0:pe.loader),visible:ft==="loading"})}const Ys=g.icon||F?.[ft]||VC(ft);var ds,Bn;return Z.createElement("li",{tabIndex:0,ref:_t,className:qn(le,dt,L?.toast,g==null||(e=g.classNames)==null?void 0:e.toast,L?.default,L?.[ft],g==null||(s=g.classNames)==null?void 0:s[ft]),"data-sonner-toast":"","data-rich-colors":(ds=g.richColors)!=null?ds:X,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Pt,"data-removed":ee,"data-visible":hs,"data-y-position":fs,"data-x-position":jt,"data-index":A,"data-front":tn,"data-swiping":we,"data-dismissible":Un,"data-type":ft,"data-invert":ju,"data-swipe-out":xe,"data-swipe-direction":C,"data-expanded":!!(j||Me&&G),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":M.length-A,"--offset":`${ee?us:Jn.current}px`,"--initial-height":Me?"auto":`${cs}px`,...I,...g.style},onDragEnd:()=>{de(!1),ye(null),Er.current=null},onPointerDown:pe=>{pe.button!==2&&(Xa||!Un||(fn.current=new Date,zt(Jn.current),pe.target.setPointerCapture(pe.pointerId),pe.target.tagName!=="BUTTON"&&(de(!0),Er.current={x:pe.clientX,y:pe.clientY})))},onPointerUp:()=>{var pe,Ve,pt;if(xe||!Un)return;Er.current=null;const Ot=Number(((pe=_t.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Tr=Number(((Ve=_t.current)==null?void 0:Ve.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qe=new Date().getTime()-((pt=fn.current)==null?void 0:pt.getTime()),It=Se==="x"?Ot:Tr,ps=Math.abs(It)/Qe;if(Math.abs(It)>=fk||ps>.11){zt(Jn.current),g.onDismiss==null||g.onDismiss.call(g,g),q(Se==="x"?Ot>0?"right":"left":Tr>0?"down":"up"),Ln(),Bt(!0);return}else{var Ht,qt;(Ht=_t.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(qt=_t.current)==null||qt.style.setProperty("--swipe-amount-y","0px")}kt(!1),de(!1),ye(null)},onPointerMove:pe=>{var Ve,pt,Ot;if(!Er.current||!Un||((Ve=window.getSelection())==null?void 0:Ve.toString().length)>0)return;const Qe=pe.clientY-Er.current.y,It=pe.clientX-Er.current.x;var ps;const Ht=(ps=t.swipeDirections)!=null?ps:pk(_e);!Se&&(Math.abs(It)>1||Math.abs(Qe)>1)&&ye(Math.abs(It)>Math.abs(Qe)?"x":"y");let qt={x:0,y:0};const Fs=An=>1/(1.5+Math.abs(An)/20);if(Se==="y"){if(Ht.includes("top")||Ht.includes("bottom"))if(Ht.includes("top")&&Qe<0||Ht.includes("bottom")&&Qe>0)qt.y=Qe;else{const An=Qe*Fs(Qe);qt.y=Math.abs(An)<Math.abs(Qe)?An:Qe}}else if(Se==="x"&&(Ht.includes("left")||Ht.includes("right")))if(Ht.includes("left")&&It<0||Ht.includes("right")&&It>0)qt.x=It;else{const An=It*Fs(It);qt.x=Math.abs(An)<Math.abs(It)?An:It}(Math.abs(qt.x)>0||Math.abs(qt.y)>0)&&kt(!0),(pt=_t.current)==null||pt.style.setProperty("--swipe-amount-x",`${qt.x}px`),(Ot=_t.current)==null||Ot.style.setProperty("--swipe-amount-y",`${qt.y}px`)}},dn&&!g.jsx&&ft!=="loading"?Z.createElement("button",{"aria-label":se,"data-disabled":Xa,"data-close-button":!0,onClick:Xa||!Un?()=>{}:()=>{Ln(),g.onDismiss==null||g.onDismiss.call(g,g)},className:qn(L?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Bn=F?.close)!=null?Bn:WC):null,(ft||g.icon||g.promise)&&g.icon!==null&&(F?.[ft]!==null||g.icon)?Z.createElement("div",{"data-icon":"",className:qn(L?.icon,g==null||(l=g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Vs():null,g.type!=="loading"?Ys:null):null,Z.createElement("div",{"data-content":"",className:qn(L?.content,g==null||(u=g.classNames)==null?void 0:u.content)},Z.createElement("div",{"data-title":"",className:qn(L?.title,g==null||(c=g.classNames)==null?void 0:c.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?Z.createElement("div",{"data-description":"",className:qn(ie,Le,L?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),Z.isValidElement(g.cancel)?g.cancel:g.cancel&&Ql(g.cancel)?Z.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||Y,onClick:pe=>{Ql(g.cancel)&&Un&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,pe),Ln())},className:qn(L?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,Z.isValidElement(g.action)?g.action:g.action&&Ql(g.action)?Z.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||W,onClick:pe=>{Ql(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,pe),!pe.defaultPrevented&&Ln())},className:qn(L?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function Uv(){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 gk(t,e){const s={};return[t,e].forEach((a,l)=>{const u=l===1,c=u?"--mobile-offset":"--offset",d=u?uk:lk;function p(m){["top","right","bottom","left"].forEach(y=>{s[`${c}-${y}`]=typeof m=="number"?`${m}px`:m})}
55typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?s[`${c}-${m}`]=d:s[`${c}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(d)}),s}const yk=Z.forwardRef(function(e,s){const{id:a,invert:l,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:_,duration:S,style:O,visibleToasts:E=ok,toastOptions:A,dir:M=Uv(),gap:j=hk,icons:N,containerAriaLabel:X="Notifications"}=e,[V,I]=Z.useState([]),Y=Z.useMemo(()=>a?V.filter(G=>G.toasterId===a):V.filter(G=>!G.toasterId),[V,a]),W=Z.useMemo(()=>Array.from(new Set([u].concat(Y.filter(G=>G.position).map(G=>G.position)))),[Y,u]),[le,ie]=Z.useState([]),[ge,_e]=Z.useState(!1),[qe,Me]=Z.useState(!1),[L,F]=Z.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),se=Z.useRef(null),Se=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=Z.useRef(null),C=Z.useRef(!1),q=Z.useCallback(G=>{I(J=>{var ee;return(ee=J.find(ce=>ce.id===G.id))!=null&&ee.delete||Xt.dismiss(G.id),J.filter(({id:ce})=>ce!==G.id)})},[]);return Z.useEffect(()=>Xt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{I(J=>J.map(ee=>ee.id===G.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{x1.flushSync(()=>{I(J=>{const ee=J.findIndex(ce=>ce.id===G.id);return ee!==-1?[...J.slice(0,ee),{...J[ee],...G},...J.slice(ee+1)]:[G,...J]})})})}),[V]),Z.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 G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:J})=>{F(J?"dark":"light")})}catch{G.addListener(({matches:ee})=>{try{F(ee?"dark":"light")}catch(ce){console.error(ce)}})}},[b]),Z.useEffect(()=>{V.length<=1&&_e(!1)},[V]),Z.useEffect(()=>{const G=J=>{var ee;if(c.every(de=>J[de]||J.code===de)){var we;_e(!0),(we=se.current)==null||we.focus()}J.code==="Escape"&&(document.activeElement===se.current||(ee=se.current)!=null&&ee.contains(document.activeElement))&&_e(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[c]),Z.useEffect(()=>{if(se.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,C.current=!1)}},[se.current]),Z.createElement("section",{ref:s,"aria-label":`${X} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((G,J)=>{var ee;const[ce,we]=G.split("-");return Y.length?Z.createElement("ol",{key:G,dir:M==="auto"?Uv():M,tabIndex:-1,ref:se,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":ce,"data-x-position":we,style:{"--front-toast-height":`${((ee=le[0])==null?void 0:ee.height)||0}px`,"--width":`${ck}px`,"--gap":`${j}px`,...O,...gk(y,g)},onBlur:de=>{C.current&&!de.currentTarget.contains(de.relatedTarget)&&(C.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||C.current||(C.current=!0,ye.current=de.relatedTarget)},onMouseEnter:()=>_e(!0),onMouseMove:()=>_e(!0),onMouseLeave:()=>{qe||_e(!1)},onDragEnd:()=>_e(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||Me(!0)},onPointerUp:()=>Me(!1)},Y.filter(de=>!de.position&&J===0||de.position===G).map((de,xe)=>{var Bt,Pt;return Z.createElement(mk,{key:de.id,icons:N,index:xe,toast:de,defaultRichColors:_,duration:(Bt=A?.duration)!=null?Bt:S,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:l,visibleToasts:E,closeButton:(Pt=A?.closeButton)!=null?Pt:p,interacting:qe,position:G,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:q,toasts:Y.filter(kt=>kt.position==de.position),heights:le.filter(kt=>kt.position==de.position),setHeights:ie,expandByDefault:d,gap:j,expanded:ge,swipeDirections:e.swipeDirections})})):null}))}),vk=({...t})=>Q.jsx(yk,{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}),Hf="bmk_ref",bk=30,Rb=/^[A-Za-z0-9_-]{2,40}$/;function _k(){if(!(typeof window>"u"))try{const t=new URLSearchParams(window.location.search),e=t.get("ref")??t.get("aff");if(!e)return;const s=e.trim();if(!Rb.test(s))return;const a={code:s,ts:Date.now()};window.localStorage.setItem(Hf,JSON.stringify(a))}catch{}}function U2(){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(Hf);if(!t)return;const e=JSON.parse(t);if(!e?.code||!Rb.test(e.code))return;if((Date.now()-e.ts)/864e5>bk){window.localStorage.removeItem(Hf);return}return e.code}catch{return}}function wk(){return Q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Q.jsxs("div",{className:"max-w-md text-center",children:[Q.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Q.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Q.jsx("div",{className:"mt-6",children:Q.jsx(Wf,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function Sk({error:t,reset:e}){console.error(t);const s=bt();return ae.useEffect(()=>{KC(t,{boundary:"tanstack_root_error_component"})},[t]),Q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Q.jsxs("div",{className:"max-w-md text-center",children:[Q.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),Q.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Q.jsx("button",{onClick:()=>{s.invalidate(),e()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),Q.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const hn=I1()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Battle Mech Knights â Action Platform Shooter Set in 3024"},{name:"description",content:"Battle Mech Knights: a gritty sci-fi action platform shooter set in 3024 across 63 levels. Buy the game, grab the Game + Book bundle, or read the Kindle companion."},{name:"author",content:"Nano Light Games"},{property:"og:title",content:"Battle Mech Knights â Action Platform Shooter Set in 3024"}
55,{property:"og:description",content:"Reclaim a dead Earth as a bio-mechanical nano-bot knight. 63 levels of action-platform-shooter combat. Game, bundle, and Kindle companion available now."},{property:"og:type",content:"website"},{property:"og:image",content:"https://us.chat-img.sintra.ai/7511a66f-d4a9-4e8e-ba2a-b4dbcdc42661/7c24e377-033c-4173-9401-5afd83c4d50d/BattleTechKnights_Cover.jpg"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:site",content:"@nano_labs"},{name:"twitter:image",content:"https://us.chat-img.sintra.ai/7511a66f-d4a9-4e8e-ba2a-b4dbcdc42661/7c24e377-033c-4173-9401-5afd83c4d50d/BattleTechKnights_Cover.jpg"},{name:"twitter:title",content:"Battle Mech Knights â Action Platform Shooter Set in 3024"},{name:"description",content:"Battle Mech Knights is a high-energy sciâfi universe where armored champions, elite pilots, and rival factions collide in cinematic mech combat."},{property:"og:description",content:"Battle Mech Knights is a high-energy sciâfi universe where armored champions, elite pilots, and rival factions collide in cinematic mech combat."},{name:"twitter:description",content:"Battle Mech Knights is a high-energy sciâfi universe where armored champions, elite pilots, and rival factions collide in cinematic mech combat."}],links:[{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=Oswald:wght@400;500;600;700&family=Black+Ops+One&family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap"},{rel:"stylesheet",href:$C}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"VideoGame",name:"Battle Mech Knights",genre:["Action","Platformer","Shooter"],gamePlatform:["PC","Mac","Linux","Xbox"],publisher:{"@type":"Organization",name:"Nano Light Games"},description:"A gritty sci-fi action platform shooter set in 3024 across 63 levels."})}]}),shellComponent:Ek,component:Tk,notFoundComponent:wk,errorComponent:Sk});function Ek({children:t}){return Q.jsxs("html",{lang:"en",children:[Q.jsx("head",{children:Q.jsx(oA,{})}),Q.jsxs("body",{children:[t,Q.jsx(lA,{})]})]})}function Tk(){const{queryClient:t}=hn.useRouteContext(),e=bt();return ae.useEffect(()=>{_k();const{data:s}=nd.auth.onAuthStateChange(a=>{a!=="SIGNED_IN"&&a!=="SIGNED_OUT"&&a!=="USER_UPDATED"||(e.invalidate(),a!=="SIGNED_OUT"&&t.invalidateQueries())});return()=>s.subscription.unsubscribe()},[e,t]),Q.jsxs(qC,{client:t,children:[Q.jsx(V0,{}),Q.jsx(vk,{position:"top-center",theme:"dark"})]})}const Rk="modulepreload",Ak=function(t){return"/"+t},Lv={},Lt=function(e,s,a){let l=Promise.resolve();if(s&&s.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(m=>{if(m=Ak(m),m in Lv)return;Lv[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Rk,y||(b.as="script"),b.crossOrigin="",b.href=m,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return e().catch(u)})},Ok=()=>Lt(()=>import("./unsubscribe-0t2OMEvx.js"),[]),xk=Nt("/unsubscribe")({validateSearch:t=>({token:typeof t.token=="string"?t.token:""}),component:Ut(Ok,"component")}),Ck=()=>Lt(()=>import("./support-GpoV_X7f.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),kk=Nt("/support")({head:()=>({meta:[{title:"Support â Battle Mech Knights Help Center"},{name:"description",content:"Get help with Battle Mech Knights: payments, login, downloads, and troubleshooting. C
55ontact support and we'll get you back in the fight."},{property:"og:title",content:"Support â Battle Mech Knights"},{property:"og:description",content:"Help with payments, login, and downloads. Contact the Battle Mech Knights support team."},{property:"og:url",content:"/support"}],links:[{rel:"canonical",href:"/support"}]}),component:Ut(Ck,"component")}),jk=()=>Lt(()=>import("./gamer-hub-ShP_V6ir.js"),__vite__mapDeps([9,1,2,3,4,10,11,12,13,14])),Mk=Nt("/gamer-hub")({head:()=>({meta:[{title:"Gamer Hub â Battle Mech Knights"},{name:"description",content:"Your Battle Mech Knights command center: downloads, orders, account settings, the affiliate hub, community, and support â all in one launcher-style dashboard."},{property:"og:title",content:"Gamer Hub â Battle Mech Knights"},{property:"og:description",content:"Launcher-style portal for downloads, orders, community, and more. Log in to unlock."},{property:"og:url",content:"/gamer-hub"}],links:[{rel:"canonical",href:"/gamer-hub"}]}),component:Ut(jk,"component")}),Dk=()=>Lt(()=>import("./contact-DeiThOo-.js"),__vite__mapDeps([15,1,2,3,4,6,7,8])),Nk=Nt("/contact")({head:()=>({meta:[{title:"Contact â Battle Mech Knights"},{name:"description",content:"Get in touch with the Battle Mech Knights team. Email [email protected] or reach us on Facebook, X, and LinkedIn."},{property:"og:title",content:"Contact â Battle Mech Knights"},{property:"og:description",content:"Reach the Battle Mech Knights team by email or on social."},{property:"og:url",content:"/contact"}],links:[{rel:"canonical",href:"/contact"}]}),component:Ut(Dk,"component")}),Uk=()=>Lt(()=>import("./community-CyV7qgXf.js"),__vite__mapDeps([16,1,2,3,4,13,17,18])),Lk=Nt("/community")({head:()=>({meta:[{title:"Community â Battle Mech Knights Forum, Discord & More"},{name:"description",content:"Join the Battle Mech Knights community. Enter the forum, jump into Discord, and connect on Facebook to talk strategy, lore, and updates."},{property:"og:title",content:"Community â Battle Mech Knights"},{property:"og:description",content:"Forum, Discord, and Facebook â the home base for Battle Mech Knights players."},{property:"og:url",content:"/community"}],links:[{rel:"canonical",href:"/community"}]}),component:Ut(Uk,"component")}),Bk=()=>Lt(()=>import("./buy-Ft76xtMs.js"),__vite__mapDeps([19,1,2,3,4,20,21,7,14,22,23,5,18,11])),Pk=Nt("/buy")({head:()=>({meta:[{title:"Buy Battle Mech Knights â Game, Bundle & Book"},{name:"description",content:"Choose your loadout: buy the Battle Mech Knights game, grab the Game + Book bundle, or read the Kindle companion. Secure checkout via Stripe and PayPal."},{property:"og:title",content:"Buy Battle Mech Knights â Game, Bundle & Book"},{property:"og:description",content:"Start with the game, go all-in with the bundle, or expand the story with the book. Downloads unlock after purchase + login."},{property:"og:url",content:"/buy"}],links:[{rel:"canonical",href:"/buy"}]}),component:Ut(Bk,"component")}),zk=()=>Lt(()=>import("./book-hWMbD3MQ.js"),__vite__mapDeps([24,1,2,3,21,7,25,26,23,14])),Ik=Nt("/book")({head:()=>({meta:[{title:"Battle Tech Knights: A Future Journal of Captain Logs â The Book"},{name:"description",content:"Read Battle Tech Knights by Dr Myers â nine interconnected captain's-log episodes that expand the Battle Mech Knights universe. Buy the digital edition with secure checkout and download instantly."},{property:"og:title",content:"Battle Tech Knights â A Future Journal of Captain Logs"},{property:"og:description",content:"Nine interconnected episodes of canon side-story adventures told through captain's logs. Buy the digital edition and download instantly."},{property:"og:url",content:"/book"},{property:"og:image",content:"https://us.chat-img.sintra.ai/7511a66f-d4a9-4e8e-ba2a-b4dbcdc42661/7c24e377-033c-4173-9401-5afd83c4d50d/BattleTechKnights_Cover.jpg"}],links:[{rel:"canonical",href:"/book"}]}),component:Ut(zk,"component")}),Hk=()=>Lt(()=>import("./auth-B_6OFlyc.js"),__vite__mapDeps([27,3,7,8,28])),qk=Nt("/auth")({validateSearch:t=>({redirect:typeof t.redirect=="string"?t.redirect:void 0}),head:()=>({meta:[{title:"Sign In â Battle Mech Knights"},{name:"description",content:"Sign in or create your Battle Mech Knights account to access your games and downloads."},{name:"robots",content:"noindex"}
55]}),component:Ut(Hk,"component")}),$k=()=>Lt(()=>import("./affiliates-D6FXrALR.js"),__vite__mapDeps([29,1,2,3,4,5,30,23,22])),Kk=Nt("/affiliates")({head:()=>({meta:[{title:"Affiliate Program â Earn up to 50% with Battle Mech Knights"},{name:"description",content:"Earn 50% commission on game sales and 10% on book sales sharing Battle Mech Knights. Promote the game, bundle, and book with your own referral link."},{property:"og:title",content:"Affiliate Program â Earn up to 50% with Battle Mech Knights"},{property:"og:description",content:"Earn 50% on game sales and 10% on book sales. Simple three-step program."},{property:"og:url",content:"/affiliates"}],links:[{rel:"canonical",href:"/affiliates"}]}),component:Ut($k,"component")}),Gk=()=>Lt(()=>import("./route-Cb2LpdO0.js"),[]),Vk=Nt("/_authenticated")({beforeLoad:async({location:t})=>{const{data:e,error:s}=await nd.auth.getUser();if(s||!e.user)throw Gf({to:"/auth",search:{redirect:t.href}});return{user:e.user}},component:Ut(Gk,"component")}),Yk=()=>Lt(()=>import("./index-DFXVLz1J.js"),__vite__mapDeps([31,2,3,14,22,30,23,17,20,21,7,32,26,33,10,34,12,13])),Fk=Nt("/")({head:()=>({meta:[{title:"Battle Mech Knights â Action Platform Shooter Set in 3024"},{name:"description",content:"Reclaim a dead Earth as a bio-mechanical nano-bot knight. 63 levels of action-platform-shooter combat. Buy the game, get the Game + Book bundle, or read the Kindle companion."},{property:"og:title",content:"Battle Mech Knights â Action Platform Shooter Set in 3024"},{property:"og:description",content:"A gritty sci-fi action platform shooter set in 3024. Game, bundle, and Kindle companion from Nano Light Games."},{property:"og:url",content:"/"}],links:[{rel:"canonical",href:"/"}]}),component:Ut(Yk,"component")}),Qk=()=>Lt(()=>import("./order-complete-BIHCgCAD.js"),__vite__mapDeps([35,3,36,37,38,28,33])),Jk=Nt("/_authenticated/order-complete")({validateSearch:t=>({session_id:typeof t.session_id=="string"?t.session_id:void 0}),head:()=>({meta:[{title:"Order Complete â Battle Mech Knights"},{name:"robots",content:"noindex"}]}),component:Ut(Qk,"component")}),Xk=()=>Lt(()=>import("./checkout-FYf3X0FT.js"),__vite__mapDeps([39,38,36,37,3,25])),Zk=Nt("/_authenticated/checkout")({validateSearch:t=>({price:typeof t.price=="string"?t.price:void 0}),head:()=>({meta:[{title:"Checkout â Battle Mech Knights"},{name:"robots",content:"noindex"}]}),component:Ut(Xk,"component")}),Wk=()=>Lt(()=>import("./admin-DgK8-wYb.js"),__vite__mapDeps([40,41,37,3,25,23,28,30,32])),e2=Nt("/_authenticated/admin")({head:()=>({meta:[{title:"Admin Dashboard â Battle Mech Knights"},{name:"robots",content:"noindex"}]}),component:Ut(Wk,"component")}),t2=()=>Lt(()=>import("./account-RnjrQ5X1.js"),__vite__mapDeps([42,41,37,3,36,34,28,30,10,23])),n2=Nt("/_authenticated/account")({head:()=>({meta:[{title:"My Library â Battle Mech Knights"},{name:"robots",content:"noindex"}]}),component:Ut(t2,"component")}),r2=xk.update({id:"/unsubscribe",path:"/unsubscribe",getParentRoute:()=>hn}),s2=kk.update({id:"/support",path:"/support",getParentRoute:()=>hn}),a2=Mk.update({id:"/gamer-hub",path:"/gamer-hub",getParentRoute:()=>hn}),i2=Nk.update({id:"/contact",path:"/contact",getParentRoute:()=>hn}),o2=Lk.update({id:"/community",path:"/community",getParentRoute:()=>hn}),l2=Pk.update({id:"/buy",path:"/buy",getParentRoute:()=>hn}),u2=Ik.update({id:"/book",path:"/book",getParentRoute:()=>hn}),c2=qk.update({id:"/auth",path:"/auth",getParentRoute:()=>hn}),h2=Kk.update({id:"/affiliates",path:"/affiliates",getParentRoute:()=>hn}),wo=Vk.update({id:"/_authenticated",getParentRoute:()=>hn}),f2=Fk.update({id:"/",path:"/",getParentRoute:()=>hn}),d2=Jk.update({id:"/order-complete",path:"/order-complete",getParentRoute:()=>wo}),p2=Zk.update({id:"/checkout",path:"/checkout",getParentRoute:()=>wo}),m2=e2.update({id:"/admin",path:"/admin",getParentRoute:()=>wo}),g2=n2.update({id:"/account",path:"/account",getParentRoute:()=>wo}),y2={AuthenticatedAccountRoute:g2,AuthenticatedAdminRoute:m2,AuthenticatedCheckoutRoute:p2,AuthenticatedOrderCompleteRoute:d2},v2=wo._addFileChildren(y2),b2={IndexRoute:f2,AuthenticatedRouteRoute:v2,AffiliatesRoute:h2,AuthRoute:c2,BookRoute:u2,BuyRoute:l2,CommunityRoute:o2,ContactRoute:i2,GamerHubRoute:a2,SupportRoute:s2,UnsubscribeRoute:r2},_2=hn._addFileChildren(b2),w2=()=>{const t=new HC;return eA({routeTree:_2,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function S2(){const t=await w2();let e;if(Rv){const s=await Rv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,e=s.serializationAdapters,t.options.defaultSsr=s.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(s1),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await i1(t),t}async function E2(){const t=await S2();return window.$_TSR?.h(),t}var gf;function T2(){return gf||(gf=E2()),Q.jsx(c1,{promise:gf,children:t=>Q.jsx(rA,{router:t})})}ae.startTransition(()=>{Vw.hydrateRoot(document,Q.jsx(ae.StrictMode,{children:Q.jsx(T2,{})}))});export{UC as A,RC as B,Dt as C,M2 as D,NS as E,zv as F,zs as G,Wf as L,V0 as O,qk as R,ku as S,A2 as T,H0 as a,Z as b,R2 as c,Jk as d,U2 as e,Zk as f,Bv as g,bt as h,Wt as i,Q as
55j,D2 as k,r1 as l,SC as m,j2 as n,Bf as o,CC as p,Mn as q,ae as r,nd as s,N2 as t,I0 as u,_b as v,_C as w,wC as x,Lf as y,yb 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.