vendor: 5,995 bytes, lines 1-18
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AdminShell-CeQmJoPo.js","assets/educationCatalog-pqwMnMBs.js","assets/phoneFormatting-bIoASOCT.js","assets/laborAssignmentControls-PBEP3hIy.js","assets/MonitorDashboard-B2IzPnJQ.js","assets/CoordinatorPanel-BMsRMtOY.js","assets/laborCostReference-CzuQcRj4.js","assets/pricingEngine-DmHUGCKM.js","assets/siblingDetection-CHQmQ9BJ.js","assets/addressFormatting-eDBQ4TmV.js","assets/leadProvisionalFamily-DVBYHIU0.js","assets/TeacherAvailabilityEditor-CzOirxAn.js","assets/candidateAvailability-DgcALE0v.js","assets/homeTutoringProposal-BrGXMNR5.js","assets/familyAgreement-Bm5j7ljB.js","assets/familyReceiptPolicy-egdKJ3_6.js","assets/AdminCalendar-BLnx26_2.js","assets/classRoster-DcgYT_RM.js","assets/protectedStorage-l8nXRU0Q.js","assets/holidayCalendar-CjdTLo_H.js","assets/teacherMonthlyForecast-DGTfyxMK.js","assets/emailApi-BQfIvn0G.js","assets/academicTracking-DV-rV9tC.js","assets/PublicEnrollment-CwxP1wyr.js","assets/PrivacyPolicy-B2143qp5.js","assets/CompactPrivacyNotice-Dx4_VTkN.js","assets/PublicTeacherForm-hCaow4wW.js","assets/emailHtml-CNLY3Q4b.js","assets/localCandidatePreview-soJiaFs0.js","assets/FamilyPortalRouter-CXOB0vQt.js","assets/ContractModal-D4DUQDZS.js","assets/AcademyRulesContent-CQsXNIN7.js","assets/studentProfileSummary-D5cIUZpH.js","assets/LeadMagnetWidget-DgZA-6k9.js","assets/CandidateDashboard-Bd--pNwI.js","assets/PublicFamilyUpdateForm-0NLV4GRy.js","assets/PublicFamilyAgreement-CP1uOzNQ.js","assets/PublicLeadFamilyForm-B_Idf2a3.js","assets/familyProfileUpdate-DFe0h-LS.js","assets/PublicWalkInLeadForm-BgJaDS8m.js"])))=>i.map(i=>d[i]); 2(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function s(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(c){if(c.ep)return;c.ep=!0;const f=s(c);fetch(c.href,f)}})();function Dm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var _o={exports:{}},rl={};/** 3 * @license React 4 * react-jsx-runtime.production.js 5 * 6 * Copyright (c) Meta Platforms, Inc. and affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Zd;function bv(){if(Zd)return rl;Zd=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(r,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:l,type:r,key:d,ref:c!==void 0?c:null,props:f}}return rl.Fragment=n,rl.jsx=s,rl.jsxs=s,rl}var Id;function _v(){return Id||(Id=1,_o.exports=bv()),_o.exports}var B=_v(),wo={exports:{}},ae={};/** 11 * @license React 12 * react.production.js 13 * 14 * Copyright (c) Meta Platforms, Inc. and affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var Pd;function wv(){if(Pd)return ae;Pd=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),A=Symbol.iterator;function T(w){return w===null||typeof w!="object"?null:(w=A&&w[A]||w["@@iterator"],typeof w=="function"?w:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,q={};function H(w,M,V){this.props=w,this.context=M,this.refs=q,this.updater=V||U}H.prototype.isReactComponent={},H.prototype.setState=function(w,M){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,M,"setState")},H.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function $(){}$.prototype=H.prototype;function z(w,M,V){this.props=w,this.context=M,this.refs=q,this.updater=V||U}var Y=z.prototype=new $;Y.constructor=z,L(Y,H.prototype),Y.isPureReactComponent=!0;var ne=Array.isArray;function Q(){}var Z={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function xe(w,M,V){var X=V.ref;return{$$typeof:l,type:w,key:M,ref:X!==void 0?X:null,props:V}}function it(w,M){return xe(w.type,M,w.props)}function Ct(w){return typeof w=="object"&&w!==null&&w.$$typeof===l}function de(w){var M={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(V){return M[V]})}var Ce=/\/+/g;function Ht(w,M){return typeof w=="object"&&w!==null&&w.key!=null?de(""+w.key):M.toString(36)}function lt(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(Q,Q):(w.status="pending",w.then(function(M){w.status==="pending"&&(w.status="fulfilled",w.value=M)},function(M){w.status==="pending"&&(w.status="rejected",w.reason=M)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function D(w,M,V,X,ie){var re=typeof w;(re==="undefined"||re==="boolean")&&(w=null);var pe=!1;if(w===null)pe=!0;else switch(re){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(w.$$typeof){case l:case n:pe=!0;break;case b:return pe=w._init,D(pe(w._payload),M,V,X,ie)}}
vendor: 17,494 bytes, lines 18-42
18if(pe)return ie=ie(w),pe=X===""?"."+Ht(w,0):X,ne(ie)?(V="",pe!=null&&(V=pe.replace(Ce,"$&/")+"/"),D(ie,M,V,"",function(mi){return mi})):ie!=null&&(Ct(ie)&&(ie=it(ie,V+(ie.key==null||w&&w.key===ie.key?"":(""+ie.key).replace(Ce,"$&/")+"/")+pe)),M.push(ie)),1;pe=0;var rt=X===""?".":X+":";if(ne(w))for(var Me=0;Me<w.length;Me++)X=w[Me],re=rt+Ht(X,Me),pe+=D(X,M,V,re,ie);else if(Me=T(w),typeof Me=="function")for(w=Me.call(w),Me=0;!(X=w.next()).done;)X=X.value,re=rt+Ht(X,Me++),pe+=D(X,M,V,re,ie);else if(re==="object"){if(typeof w.then=="function")return D(lt(w),M,V,X,ie);throw M=String(w),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return pe}function G(w,M,V){if(w==null)return w;var X=[],ie=0;return D(w,X,"","",function(re){return M.call(V,re,ie++)}),X}function te(w){if(w._status===-1){var M=w._result;M=M(),M.then(function(V){(w._status===0||w._status===-1)&&(w._status=1,w._result=V)},function(V){(w._status===0||w._status===-1)&&(w._status=2,w._result=V)}),w._status===-1&&(w._status=0,w._result=M)}if(w._status===1)return w._result.default;throw w._result}var we=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},Ae={map:G,forEach:function(w,M,V){G(w,function(){M.apply(this,arguments)},V)},count:function(w){var M=0;return G(w,function(){M++}),M},toArray:function(w){return G(w,function(M){return M})||[]},only:function(w){if(!Ct(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return ae.Activity=S,ae.Children=Ae,ae.Component=H,ae.Fragment=s,ae.Profiler=c,ae.PureComponent=z,ae.StrictMode=r,ae.Suspense=v,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ae.__COMPILER_RUNTIME={__proto__:null,c:function(w){return Z.H.useMemoCache(w)}},ae.cache=function(w){return function(){return w.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(w,M,V){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var X=L({},w.props),ie=w.key;if(M!=null)for(re in M.key!==void 0&&(ie=""+M.key),M)!ge.call(M,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&M.ref===void 0||(X[re]=M[re]);var re=arguments.length-2;if(re===1)X.children=V;else if(1<re){for(var pe=Array(re),rt=0;rt<re;rt++)pe[rt]=arguments[rt+2];X.children=pe}return xe(w.type,ie,X)},ae.createContext=function(w){return w={$$typeof:d,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},ae.createElement=function(w,M,V){var X,ie={},re=null;if(M!=null)for(X in M.key!==void 0&&(re=""+M.key),M)ge.call(M,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(ie[X]=M[X]);var pe=arguments.length-2;if(pe===1)ie.children=V;else if(1<pe){for(var rt=Array(pe),Me=0;Me<pe;Me++)rt[Me]=arguments[Me+2];ie.children=rt}if(w&&w.defaultProps)for(X in pe=w.defaultProps,pe)ie[X]===void 0&&(ie[X]=pe[X]);return xe(w,re,ie)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(w){return{$$typeof:m,render:w}},ae.isValidElement=Ct,ae.lazy=function(w){return{$$typeof:b,_payload:{_status:-1,_result:w},_init:te}},ae.memo=function(w,M){return{$$typeof:g,type:w,compare:M===void 0?null:M}},ae.startTransition=function(w){var M=Z.T,V={};Z.T=V;try{var X=w(),ie=Z.S;ie!==null&&ie(V,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(Q,we)}catch(re){we(re)}finally{M!==null&&V.types!==null&&(M.types=V.types),Z.T=M}},ae.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ae.use=function(w){return Z.H.use(w)},ae.useActionState=function(w,M,V){return Z.H.useActionState(w,M,V)},ae.useCallback=function(w,M){return Z.H.useCallback(w,M)},ae.useContext=function(w){return Z.H.useContext(w)},ae.useDebugValue=function(){},ae.useDeferredValue=function(w,M){return Z.H.useDeferredValue(w,M)},ae.useEffect=function(w,M){return Z.H.useEffect(w,M)},ae.useEffectEvent=function(w){return Z.H.useEffectEvent(w)},ae.useId=function(){return Z.H.useId()},ae.useImperativeHandle=function(w,M,V){return Z.H.useImperativeHandle(w,M,V)},ae.useInsertionEffect=function(w,M){return Z.H.useInsertionEffect(w,M)},ae.useLayoutEffect=function(w,M){return Z.H.useLayoutEffect(w,M)},ae.useMemo=function(w,M){return Z.H.useMemo(w,M)},ae.useOptimistic=function(w,M){return Z.H.useOptimistic(w,M)},ae.useReducer=function(w,M,V){return Z.H.useReducer(w,M,V)},ae.useRef=function(w){return Z.H.useRef(w)},ae.useState=function(w){return Z.H.useState(w)},ae.useSyncExternalStore=function(w,M,V){return Z.H.useSyncExternalStore(w,M,V)},ae.useTransition=function(){return Z.H.useTransition()},ae.version="19.2.4",ae}var Wd;function Yo(){return Wd||(Wd=1,wo.exports=wv()),wo.exports}var Xe=Yo();const nt=Dm(Xe);var So={exports:{}},ul={},Eo={exports:{}},To={};/** 19 * @license React 20 * scheduler.production.js 21 * 22 * Copyright (c) Meta Platforms, Inc. and affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */var Fd;function Sv(){return Fd||(Fd=1,(function(l){function n(D,G){var te=D.length;D.push(G);e:for(;0<te;){var we=te-1>>>1,Ae=D[we];if(0<c(Ae,G))D[we]=G,D[te]=Ae,te=we;else break e}}function s(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var G=D[0],te=D.pop();if(te!==G){D[0]=te;e:for(var we=0,Ae=D.length,w=Ae>>>1;we<w;){var M=2*(we+1)-1,V=D[M],X=M+1,ie=D[X];if(0>c(V,te))X<Ae&&0>c(ie,V)?(D[we]=ie,D[X]=te,we=X):(D[we]=V,D[M]=te,we=M);else if(X<Ae&&0>c(ie,te))D[we]=ie,D[X]=te,we=X;else break e}}return G}function c(D,G){var te=D.sortIndex-G.sortIndex;return te!==0?te:D.id-G.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();l.unstable_now=function(){return d.now()-m}}var v=[],g=[],b=1,S=null,A=3,T=!1,U=!1,L=!1,q=!1,H=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function Y(D){for(var G=s(g);G!==null;){if(G.callback===null)r(g);else if(G.startTime<=D)r(g),G.sortIndex=G.expirationTime,n(v,G);else break;G=s(g)}}function ne(D){if(L=!1,Y(D),!U)if(s(v)!==null)U=!0,Q||(Q=!0,de());else{var G=s(g);G!==null&<(ne,G.startTime-D)}}var Q=!1,Z=-1,ge=5,xe=-1;function it(){return q?!0:!(l.unstable_now()-xe<ge)}function Ct(){if(q=!1,Q){var D=l.unstable_now();xe=D;var G=!0;try{e:{U=!1,L&&(L=!1,$(Z),Z=-1),T=!0;var te=A;try{t:{for(Y(D),S=s(v);S!==null&&!(S.expirationTime>D&&it());){var we=S.callback;if(typeof we=="function"){S.callback=null,A=S.priorityLevel;var Ae=we(S.expirationTime<=D);if(D=l.unstable_now(),typeof Ae=="function"){S.callback=Ae,Y(D),G=!0;break t}S===s(v)&&r(v),Y(D)}else r(v);S=s(v)}if(S!==null)G=!0;else{var w=s(g);w!==null&<(ne,w.startTime-D),G=!1}}break e}finally{S=null,A=te,T=!1}G=void 0}}finally{G?de():Q=!1}}}var de;if(typeof z=="function")de=function(){z(Ct)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Ht=Ce.port2;Ce.port1.onmessage=Ct,de=function(){Ht.postMessage(null)}}else de=function(){H(Ct,0)};function lt(D,G){Z=H(function(){D(l.unstable_now())},G)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(D){D.callback=null},l.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<D?Math.floor(1e3/D):5},l.unstable_getCurrentPriorityLevel=function(){return A},l.unstable_next=function(D){switch(A){case 1:case 2:case 3:var G=3;break;default:G=A}var te=A;A=G;try{return D()}finally{A=te}},l.unstable_requestPaint=function(){q=!0},l.unstable_runWithPriority=function(D,G){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var te=A;A=D;try{return G()}finally{A=te}},l.unstable_scheduleCallback=function(D,G,te){var we=l.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?we+te:we):te=we,D){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=te+Ae,D={id:b++,callback:G,priorityLevel:D,startTime:te,expirationTime:Ae,sortIndex:-1},te>we?(D.sortIndex=te,n(g,D),s(v)===null&&D===s(g)&&(L?($(Z),Z=-1):L=!0,lt(ne,te-we))):(D.sortIndex=Ae,n(v,D),U||T||(U=!0,Q||(Q=!0,de()))),D},l.unstable_shouldYield=it,l.unstable_wrapCallback=function(D){var G=A;return function(){var te=A;A=G;try{return D.apply(this,arguments)}finally{A=te}}}})(To)),To}var em;function Ev(){return em||(em=1,Eo.exports=Sv()),Eo.exports}var Ao={exports:{}},st={};/** 27 * @license React 28 * react-dom.production.js 29 * 30 * Copyright (c) Meta Platforms, Inc. and affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var tm;function Tv(){if(tm)return st;tm=1;var l=Yo();function n(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(v,g,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:S==null?null:""+S,children:v,containerInfo:g,implementation:b}}var d=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return st.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,st.createPortal=function(v,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return f(v,g,null,b)},st.flushSync=function(v){var g=d.T,b=r.p;try{if(d.T=null,r.p=2,v)return v()}finally{d.T=g,r.p=b,r.d.f()}},st.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(v,g))},st.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},st.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var b=g.as,S=m(b,g.crossOrigin),A=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:A,fetchPriority:T}):b==="script"&&r.d.X(v,{crossOrigin:S,integrity:A,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},st.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);r.d.M(v,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(v)},st.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,S=m(b,g.crossOrigin);r.d.L(v,b,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},st.preloadModule=function(v,g){if(typeof v=="string")if(g){var b=m(g.as,g.crossOrigin);r.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(v)},st.requestFormReset=function(v){r.d.r(v)},st.unstable_batchedUpdates=function(v,g){return v(g)},st.useFormState=function(v,g,b){return d.H.useFormState(v,g,b)},st.useFormStatus=function(){return d.H.useHostTransitionStatus()},st.version="19.2.4",st}var am;function Av(){if(am)return Ao.exports;am=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),Ao.exports=Tv(),Ao.exports}/** 35 * @license React 36 * react-dom-client.production.js 37 * 38 * Copyright (c) Meta Platforms, Inc. and affiliates. 39 * 40 * This source code is licensed under the MIT license found in the 41 * LICENSE file in the root directory of this source tree. 42 */var nm;function Ov(){if(nm)return ul;nm=1;var l=Ev(),n=Yo(),s=Av();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(f(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,i=t;;){var u=a.return;if(u===null)break;var o=u.alternate;if(o===null){if(i=u.return,i!==null){a=i;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===a)return v(u),e;if(o===i)return v(u),t;o=o.sibling}throw Error(r(188))}if(a.return!==i.return)a=u,i=o;else{for(var h=!1,y=u.child;y;){if(y===a){h=!0,a=u,i=o;break}if(y===i){h=!0,i=u,a=o;break}y=y.sibling}if(!h){for(y=o.child;y;){if(y===a){h=!0,a=o,i=u;break}if(y===i){h=!0,i=o,a=u;break}y=y.sibling}if(!h)throw Error(r(189))}}if(a.alternate!==i)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,A=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),z=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),it=Symbol.for("react.memo_cache_sentinel"),Ct=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=Ct&&e[Ct]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Symbol.for("react.client.reference");function Ht(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case L:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case ne:return"Suspense";case Q:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case z:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Ht(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return Ht(e(t))}catch{}}return null}var lt=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},we=[],Ae=-1;function w(e){return{current:e}}function M(e){0>Ae||(e.current=we[Ae],we[Ae]=null,Ae--)}function V(e,t){Ae++,we[Ae]=e.current,e.current=t}var X=w(null),ie=w(null),re=w(null),pe=w(null);function rt(e,t){switch(V(re,t),V(ie,e),V(X,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pd(t),e=bd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(X),V(X,e)}function Me(){M(X),M(ie),M(re)}function mi(e){e.memoizedState!==null&&V(pe,e);var t=X.current,a=bd(t,e.type);t!==a&&(V(ie,e),V(X,a))}function wl(e){ie.current===e&&(M(X),M(ie)),pe.current===e&&(M(pe),nl._
vendor: 10,813 bytes, lines 42-49
42currentValue=te)}var tr,Xo;function Ka(e){if(tr===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);tr=t&&t[1]||"",Xo=-1<a.stack.indexOf(` 43 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 44`+tr+e+Xo}var ar=!1;function nr(e,t){if(!e||ar)return"";ar=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){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(C){var x=C}Reflect.construct(e,[],k)}else{try{k.call()}catch(C){x=C}e.call(k.prototype)}}else{try{throw Error()}catch(C){x=C}(k=e())&&typeof k.catch=="function"&&k.catch(function(){})}}catch(C){if(C&&x&&typeof C.stack=="string")return[C.stack,x.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),h=o[0],y=o[1];if(h&&y){var p=h.split(` 45`),R=y.split(` 46`);for(u=i=0;i<p.length&&!p[i].includes("DetermineComponentFrameRoot");)i++;for(;u<R.length&&!R[u].includes("DetermineComponentFrameRoot");)u++;if(i===p.length||u===R.length)for(i=p.length-1,u=R.length-1;1<=i&&0<=u&&p[i]!==R[u];)u--;for(;1<=i&&0<=u;i--,u--)if(p[i]!==R[u]){if(i!==1||u!==1)do if(i--,u--,0>u||p[i]!==R[u]){var j=` 47`+p[i].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=i&&0<=u);break}}}finally{ar=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ka(a):""}function Im(e,t){switch(e.tag){case 26:case 27:case 5:return Ka(e.type);case 16:return Ka("Lazy");case 13:return e.child!==t&&t!==null?Ka("Suspense Fallback"):Ka("Suspense");case 19:return Ka("SuspenseList");case 0:case 15:return nr(e.type,!1);case 11:return nr(e.type.render,!1);case 1:return nr(e.type,!0);case 31:return Ka("Activity");default:return""}}function Jo(e){try{var t="",a=null;do t+=Im(e,a),a=e,e=e.return;while(e);return t}catch(i){return` 48Error generating stack: `+i.message+` 49`+i.stack}}var ir=Object.prototype.hasOwnProperty,lr=l.unstable_scheduleCallback,sr=l.unstable_cancelCallback,Pm=l.unstable_shouldYield,Wm=l.unstable_requestPaint,gt=l.unstable_now,Fm=l.unstable_getCurrentPriorityLevel,Zo=l.unstable_ImmediatePriority,Io=l.unstable_UserBlockingPriority,Sl=l.unstable_NormalPriority,ey=l.unstable_LowPriority,Po=l.unstable_IdlePriority,ty=l.log,ay=l.unstable_setDisableYieldValue,yi=null,vt=null;function pa(e){if(typeof ty=="function"&&ay(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(yi,e)}catch{}}var pt=Math.clz32?Math.clz32:ly,ny=Math.log,iy=Math.LN2;function ly(e){return e>>>=0,e===0?32:31-(ny(e)/iy|0)|0}var El=256,Tl=262144,Al=4194304;function Qa(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ol(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var u=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var y=i&134217727;return y!==0?(i=y&~o,i!==0?u=Qa(i):(h&=y,h!==0?u=Qa(h):a||(a=y&~e,a!==0&&(u=Qa(a))))):(y=i&~o,y!==0?u=Qa(y):h!==0?u=Qa(h):a||(a=i&~e,a!==0&&(u=Qa(a)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:u}function gi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function sy(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Wo(){var e=Al;return Al<<=1,(Al&62914560)===0&&(Al=4194304),e}function rr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function vi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ry(e,t,a,i,u,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,p=e.expirationTimes,R=e.hiddenUpdates;for(a=h&~a;0<a;){var j=31-pt(a),k=1<<j;y[j]=0,p[j]=-1;var x=R[j];if(x!==null)for(R[j]=null,j=0;j<x.length;j++){var C=x[j];C!==null&&(C.lane&=-536870913)}a&=~k}i!==0&&Fo(e,i,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function Fo(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-pt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function ec(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-pt(a),u=1<<i;u&t|e[i]&t&&(e[i]|=t),a&=~u}}function tc(e,t){var a=t&-t;return a=(a&42)!==0?1:ur(a),(a&(e.suspendedLanes|t))!==0?0:a}function ur(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function or(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ac(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Gd(e.type))}function nc(e,t){var a=G.p;try{return G.p=e,t()}finally{G.p=a}}var ba=Math.random().toString(36).slice(2),Ie="__reactFiber$"+ba,ot="__reactProps$"+ba,pn="__reactContainer$"+ba,cr="__reactEvents$"+ba,uy="__reactListeners$"+ba,oy="__reactHandles$"+ba,ic="__reactResources$"+ba,pi="__reactMarker$"+ba;function fr(e){delete e[Ie],delete e[ot],delete e[cr],delete e[uy],delete e[oy]}function bn(e){var t=e[Ie];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pn]||a[Ie]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Od(e);e!==null;){if(a=e[Ie])return a;e=Od(e)}return t}e=a,a=e.parentNode}return null}function _n(e){if(e=e[Ie]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function wn(e){var t=e[ic];return t||(t=e[ic]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[pi]=!0}var lc=new Set,sc={};function Xa(e,t){Sn(e,t),Sn(e+"Capture",t)}function Sn(e,t){for(sc[e]=t,e=0;e<t.length;e++)lc.add(t[e])}var cy=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]*$"),rc={},uc={};function fy(e){return ir.call(uc,e)?!0:ir.call(rc,e)?!1:cy.test(e)?uc[e]=!0:(rc[e]=!0,!1)}function Rl(e,t,a){if(fy(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function xl(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Wt(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hy(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hr(e){if(!e._valueTracker){var t=oc(e)?"checked":"value";e._valueTracker=hy(e,t,""+e[t])}}function cc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=oc(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function Cl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dy=/[\n"\\]/g;function Ut(e){return e.replace(dy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function dr(e,t,a,i,u,o,h,y){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?mr(e,h,jt(t)):a!=null?mr(e,h,jt(a)):i!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+jt(y):e.removeAttribute("name")}function fc(e,t,a,i,u,o,h,y){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){hr(e);return}a=a!=null?""+jt(a):"",t=t!=null?""+jt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=y?e.checked:!!i,e.defaultChecked=!!i,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),hr(e)}function mr(e,t,a){t==="number"&&Cl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}
vendor: 4,967 bytes, line 49
49function En(e,t,a,i){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&i&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function hc(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function dc(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(r(92));if(lt(i)){if(1<i.length)throw Error(r(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),hr(e)}function Tn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var my=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 mc(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||my.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function yc(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&a[u]!==i&&mc(e,u,i)}else for(var o in t)t.hasOwnProperty(o)&&mc(e,o,t[o])}function yr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 yy=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
49-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"]]),gy=/^[\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 jl(e){return gy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ft(){}var gr=null;function vr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var An=null,On=null;function gc(e){var t=_n(e);if(t&&(e=t.stateNode)){var a=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(dr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ut(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var u=i[ot]||null;if(!u)throw Error(r(90));dr(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&cc(i)}break e;case"textarea":hc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&En(e,!!a.multiple,t,!1)}}}var pr=!1;function vc(e,t,a){if(pr)return e(t,a);pr=!0;try{var i=e(t);return i}finally{if(pr=!1,(An!==null||On!==null)&&(vs(),An&&(t=An,e=On,On=An=null,gc(t),e)))for(t=0;t<e.length;t++)gc(e[t])}}function _i(e,t){var a=e.stateNode;if(a===null)return null;var i=a[ot]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),br=!1;if(ea)try{var wi={};Object.defineProperty(wi,"passive",{get:function(){br=!0}}),window.addEventListener("test",wi,wi),window.removeEventListener("test",wi,wi)}catch{br=!1}var _a=null,_r=null,Ul=null;function pc(){if(Ul)return Ul;var e,t=_r,a=t.length,i,u="value"in _a?_a.value:_a.textContent,o=u.length;for(e=0;e<a&&t[e]===u[e];e++);var h=a-e;for(i=1;i<=h&&t[a-i]===u[o-i];i++);return Ul=u.slice(e,1<i?1-i:void 0)}function Dl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nl(){return!0}function bc(){return!1}function ct(e){function t(a,i,u,o,h){this._reactName=a,this._targetInst=u,this.type=i,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(o):o[y]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Nl:bc,this.isPropagationStopped=bc,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Nl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Nl)},persist:function(){},isPersistent:Nl}),t}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zl=ct(Ja),Si=S({},Ja,{view:0,detail:0}),vy=ct(Si),wr,Sr,Ei,kl=S({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ei&&(Ei&&e.type==="mousemove"?(wr=e.screenX-Ei.screenX,Sr=e.screenY-Ei.screenY):Sr=wr=0,Ei=e),wr)},movementY:function(e){return"movementY"in e?e.movementY:Sr}}),_c=ct(kl),py=S({},kl,{dataTransfer:0}),by=ct(py),_y=S({},Si,{relatedTarget:0}),Er=ct(_y),wy=S({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),Sy=ct(wy),Ey=S({},Ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ty=ct(Ey),Ay=S({},Ja,{data:0}),wc=ct(Ay),Oy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ry={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"},xy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xy[e])?!!t[e]:!1}function Tr(){return Cy}var jy=S({},Si,{key:function(e){if(e.key){var t=Oy[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,186 bytes, line 49
49return e.type==="keypress"?(e=Dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ry[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tr,charCode:function(e){return e.type==="keypress"?Dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uy=ct(jy),Dy=S({},kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sc=ct(Dy),Ny=S({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tr}),zy=ct(Ny),ky=S({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),My=ct(ky),Ly=S({},kl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),By=ct(Ly),qy=S({},Ja,{newState:0,oldState:0}),Hy=ct(qy),$y=[9,13,27,32],Ar=ea&&"CompositionEvent"in window,Ti=null;ea&&"documentMode"in document&&(Ti=document.documentMode);var Gy=ea&&"TextEvent"in window&&!Ti,Ec=ea&&(!Ar||Ti&&8<Ti&&11>=Ti),Tc=" ",Ac=!1;function Oc(e,t){switch(e){case"keyup":return $y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rn=!1;function Vy(e,t){switch(e){case"compositionend":return Rc(t);case"keypress":return t.which!==32?null:(Ac=!0,Tc);case"textInput":return e=t.data,e===Tc&&Ac?null:e;default:return null}}function Yy(e,t){if(Rn)return e==="compositionend"||!Ar&&Oc(e,t)?(e=pc(),Ul=_r=_a=null,Rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ec&&t.locale!=="ko"?null:t.data;default:return null}}var Ky={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 xc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ky[e.type]:t==="textarea"}function Cc(e,t,a,i){An?On?On.push(i):On=[i]:An=i,t=Ts(t,"onChange"),0<t.length&&(a=new zl("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Ai=null,Oi=null;function Qy(e){hd(e,0)}function Ml(e){var t=bi(e);if(cc(t))return e}function jc(e,t){if(e==="change")return t}var Uc=!1;if(ea){var Or;if(ea){var Rr="oninput"in document;if(!Rr){var Dc=document.createElement("div");Dc.setAttribute("oninput","return;"),Rr=typeof Dc.oninput=="function"}Or=Rr}else Or=!1;Uc=Or&&(!document.documentMode||9<document.documentMode)}function Nc(){Ai&&(Ai.detachEvent("onpropertychange",zc),Oi=Ai=null)}function zc(e){if(e.propertyName==="value"&&Ml(Oi)){var t=[];Cc(t,Oi,e,vr(e)),vc(Qy,t)}}function Xy(e,t,a){e==="focusin"?(Nc(),Ai=t,Oi=a,Ai.attachEvent("onpropertychange",zc)):e==="focusout"&&Nc()}function Jy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ml(Oi)}function Zy(e,t){if(e==="click")return Ml(t)}function Iy(e,t){if(e==="input"||e==="change")return Ml(t)}function Py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:Py;function Ri(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var u=a[i];if(!ir.call(t,u)||!bt(e[u],t[u]))return!1}return!0}function kc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var a=kc(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=kc(a)}}function Lc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cl(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Cl(e.document)}return t}function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Wy=ea&&"documentMode"in document&&11>=document.documentMode,xn=null,Cr=null,xi=null,jr=!1;function qc(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jr||xn==null||xn!==Cl(i)||(i=xn,"selectionStart"in i&&xr(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 20,631 bytes, line 49
49sNode:i.focusNode,focusOffset:i.focusOffset}),xi&&Ri(xi,i)||(xi=i,i=Ts(Cr,"onSelect"),0<i.length&&(t=new zl("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=xn)))}function Za(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Cn={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},Ur={},Hc={};ea&&(Hc=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);function Ia(e){if(Ur[e])return Ur[e];if(!Cn[e])return e;var t=Cn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Hc)return Ur[e]=t[a];return e}var $c=Ia("animationend"),Gc=Ia("animationiteration"),Vc=Ia("animationstart"),Fy=Ia("transitionrun"),eg=Ia("transitionstart"),tg=Ia("transitioncancel"),Yc=Ia("transitionend"),Kc=new Map,Dr="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(" ");Dr.push("scrollEnd");function $t(e,t){Kc.set(e,t),Xa(t,[e])}var Ll=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dt=[],jn=0,Nr=0;function Bl(){for(var e=jn,t=Nr=jn=0;t<e;){var a=Dt[t];Dt[t++]=null;var i=Dt[t];Dt[t++]=null;var u=Dt[t];Dt[t++]=null;var o=Dt[t];if(Dt[t++]=null,i!==null&&u!==null){var h=i.pending;h===null?u.next=u:(u.next=h.next,h.next=u),i.pending=u}o!==0&&Qc(a,u,o)}}function ql(e,t,a,i){Dt[jn++]=e,Dt[jn++]=t,Dt[jn++]=a,Dt[jn++]=i,Nr|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function zr(e,t,a,i){return ql(e,t,a,i),Hl(e)}function Pa(e,t){return ql(e,null,null,t),Hl(e)}function Qc(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var u=!1,o=e.return;o!==null;)o.childLanes|=a,i=o.alternate,i!==null&&(i.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(u=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,u&&t!==null&&(u=31-pt(a),e=o.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=a|536870912),o):null}function Hl(e){if(50<Ii)throw Ii=0,Vu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Un={};function ag(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,a,i){return new ag(e,t,a,i)}function kr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var a=e.alternate;return a===null?(a=_t(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Xc(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $l(e,t,a,i,u,o){var h=0;if(i=e,typeof e=="function")kr(e)&&(h=1);else if(typeof e=="string")h=rv(e,a,X.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=_t(31,a,t,u),e.elementType=xe,e.lanes=o,e;case L:return Wa(a.children,u,o,t);case q:h=8,u|=24;break;case H:return e=_t(12,a,t,u|2),e.elementType=H,e.lanes=o,e;case ne:return e=_t(13,a,t,u),e.elementType=ne,e.lanes=o,e;case Q:return e=_t(19,a,t,u),e.elementType=Q,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:h=10;break e;case $:h=9;break e;case Y:h=11;break e;case Z:h=14;break e;case ge:h=16,i=null;break e}h=29,a=Error(r(130,e===null?"null":typeof e,"")),i=null}return t=_t(h,a,t,u),t.elementType=e,t.type=i,t.lanes=o,t}function Wa(e,t,a,i){return e=_t(7,e,i,t),e.lanes=a,e}function Mr(e,t,a){return e=_t(6,e,null,t),e.lanes=a,e}function Jc(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function Lr(e,t,a){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zc=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var a=Zc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Jo(t)},Zc.set(e,t),t)}return{value:e,source:t,stack:Jo(t)}}var Dn=[],Nn=0,Gl=null,Ci=0,zt=[],kt=0,wa=null,Xt=1,Jt="";function aa(e,t){Dn[Nn++]=Ci,Dn[Nn++]=Gl,Gl=e,Ci=t}function Ic(e,t,a){zt[kt++]=Xt,zt[kt++]=Jt,zt[kt++]=wa,wa=e;var i=Xt;e=Jt;var u=32-pt(i)-1;i&=~(1<<u),a+=1;var o=32-pt(t)+u;if(30<o){var h=u-u%5;o=(i&(1<<h)-1).toString(32),i>>=h,u-=h,Xt=1<<32-pt(t)+u|a<<u|i,Jt=o+e}else Xt=1<<o|a<<u|i,Jt=e}function Br(e){e.return!==null&&(aa(e,1),Ic(e,1,0))}function qr(e){for(;e===Gl;)Gl=Dn[--Nn],Dn[Nn]=null,Ci=Dn[--Nn],Dn[Nn]=null;for(;e===wa;)wa=zt[--kt],zt[kt]=null,Jt=zt[--kt],zt[kt]=null,Xt=zt[--kt],zt[kt]=null}function Pc(e,t){zt[kt++]=Xt,zt[kt++]=Jt,zt[kt++]=wa,Xt=t.id,Jt=t.overflow,wa=e}var Pe=null,je=null,he=!1,Sa=null,Mt=!1,Hr=Error(r(519));function Ea(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(Nt(t,e)),Hr}function Wc(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Ie]=e,t[ot]=i,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<Wi.length;a++)oe(Wi[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),fc(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),dc(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||gd(t.textContent,a)?(i.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),i.onScroll!=null&&oe("scroll",t),i.onScrollEnd!=null&&oe("scrollend",t),i.onClick!=null&&(t.onclick=Ft),t=!0):t=!1,t||Ea(e,!0)}function Fc(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Mt=!1;return;case 27:case 3:Mt=!0;return;default:Pe=Pe.return}}function zn(e){if(e!==Pe)return!1;if(!he)return Fc(e),he=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||io(e.type,e.memoizedProps)),a=!a),a&&je&&Ea(e),Fc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));je=Ad(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));je=Ad(e)}else t===27?(t=je,La(e.type)?(e=oo,oo=null,je=e):je=t):je=Pe?Bt(e.stateNode.nextSibling):null;return!0}function Fa(){je=Pe=null,he=!1}function $r(){var e=Sa;return e!==null&&(mt===null?mt=e:mt.push.apply(mt,e),Sa=null),e}function ji(e){Sa===null?Sa=[e]:Sa.push(e)}var Gr=w(null),en=null,na=null;function Ta(e,t,a){V(Gr,t._currentValue),t._currentValue=a}function ia(e){e._currentValue=Gr.current,M(Gr)}function Vr(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Yr(e,t,a,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var h=u.child;o=o.firstContext;e:for(;o!==null;){var y=o;o=u;for(var p=0;p<t.length;p++)if(y.context===t[p]){o.lanes|=a,y=o.alternate,y!==null&&(y.lanes|=a),Vr(o.return,a,e),i||(h=null);break e}o=y.next}}else if(u.tag===18){if(h=u.return,h===null)throw Error(r(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),Vr(h,a,e),h=null}else h=u.child;if(h!==null)h.return=u;else for(h=u;h!==null;){if(h===e){h=null;break}if(u=h.sibling,u!==null){u.return=h.return,h=u;break}h=h.return}u=h}}function kn(e,t,a,i){e=null;for(var u=t,o=!1;u!==null;){if(!o){if((u.flags&524288)!==0)o=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var h=u.alternate;if(h===null)throw Error(r(387));if(h=h.memoizedProps,h!==null){var y=u.type;bt(u.pendingProps.value,h.value)||(e!==null?e.push(y):e=[y])}}else if(u===pe.current){if(h=u.alternate,h===null)throw Error(r(387));h.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(nl):e=[nl])}u=u.return}e!==null&&Yr(t,e,a,i),t.flags|=262144}function Vl(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tn(e){en=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return ef(en,e)}function Yl(e,t){return en===null&&tn(e),ef(e,t)}function ef(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},na===null){if(e===null)throw Error(r(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return a}var ng=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ig=l.unstable_scheduleCallback,lg=l.unstable_NormalPriority,qe={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kr(){return{controller:new ng,data:new Map,refCount:0}}function Ui(e){e.refCount--,e.refCount===0&&ig(lg,function(){e.controller.abort()})}var Di=null,Qr=0,Mn=0,Ln=null;function sg(e,t){if(Di===null){var a=Di=[];Qr=0,Mn=Zu(),Ln={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Qr++,t.then(tf,tf),t}function tf(){if(--Qr===0&&Di!==null){Ln!==null&&(Ln.status="fulfilled");var e=Di;Di=null,Mn=0,Ln=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),i}var af=D.S;D.S=function(e,t){Hh=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sg(e,t),af!==null&&af(e,t)};var an=w(null);function Xr(){var e=an.current;return e!==null?e:Oe.pooledCache}function Kl(e,t){t===null?V(an,an.current):V(an,t.pool)}function nf(){var e=Xr();return e===null?null:{parent:qe._currentValue,pool:e}}var Bn=Error(r(460)),Jr=Error(r(474)),Ql=Error(r(542)),Xl={then:function(){}};function lf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function sf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ft,Ft),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e;default:if(typeof t.status=="string")t.then(Ft,Ft);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e}throw ln=t,Bn}}function nn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ln=a,Bn):a}}var ln=null;function rf(){if(ln===null)throw Error(r(459));var e=ln;return ln=null,e}function uf(e){if(e===Bn||e===Ql)throw Error(r(483))}var qn=null,Ni=0;function Jl(e){var t=Ni;return Ni+=1,qn===null&&(qn=[]),sf(qn,e,t)}function zi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zl(e,t){throw t.$$typeof===A?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function of(e){function t(E,_){if(e){var O=E.deletions;O===null?(E.deletions=[_],E.flags|=16):O.push(_)}}function a(E,_){if(!e)return null;for(;_!==null;)t(E,_),_=_.sibling;return null}function i(E){for(var _=new Map;E!==null;)E.key!==null?_.set(E.key,E):_.set(E.index,E),E=E.sibling;return _}function u(E,_){return E=ta(E,_),E.index=0,E.sibling=null,E}function o(E,_,O){return E.index=O,e?(O=E.alternate,O!==null?(O=O.index,O<_?(E.flags|=67108866,_):O):(E.flags|=67108866,_)):(E.flags|=1048576,_)}function h(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function y(E,_,O,N){return _===null||_.tag!==6?(_=Mr(O,E.mode,N),_.return=E,_):(_=u(_,O),_.return=E,_)}function p(E,_,O,N){var P=O.type;return P===L?j(E,_,O.props.children,N,O.key):_!==null&&(_.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ge&&nn(P)===_.type)?(_=u(_,O.props),zi(_,O),_.return=E,_):(_=$l(O.type,O.key,O.props,null,E.mode,N),zi(_,O),_.return=E,_)}function R(E,_,O,N){return _===null||_.tag!==4||_.stateNode.containerInfo!==O.containerInfo||_.stateNode.implementation!==O.implementation?(_=Lr(O,E.mode,N),_.return=E,_):(_=u(_,O.children||[]),_.return=E,_)}function j(E,_,O,N,P){return _===null||_.tag!==7?(_=Wa(O,E.mode,N,P),_.return=E,_):(_=u(_,O),_.return=E,_)}function k(E,_,O){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Mr(""+_,E.mode,O),_.return=E,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case T:return O=$l(_.type,_.key,_.props,null,E.mode,O),zi(O,_),O.return=E,O;case U:return _=Lr(_,E.mode,O),_.return=E,_;case ge:return _=nn(_),k(E,_,O)}if(lt(_)||de(_))return _=Wa(_,E.mode,O,null),_.return=E,_;if(typeof _.then=="function")return k(E,Jl(_),O);if(_.$$typeof===z)return k(E,Yl(E,_),O);Zl(E,_)}return null}function x(E,_,O,N){var P=_!==null?_.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return P!==null?null:y(E,_,""+O,N);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return O.key===P?p(E,_,O,N):null;case U:return O.key===P?R(E,_,O,N):null;case ge:return O=nn(O),x(E,_,O,N)}if(lt(O)||de(O))return P!==null?null:j(E,_,O,N,null);if(typeof O.then=="function")return x(E,_,Jl(O),N);if(O.$$typeof===z)return x(E,_,Yl(E,O),N);Zl(E,O)}return null}function C(E,_,O,N,P){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return E=E.get(O)||null,y(_,E,""+N,P);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case T:return E=E.get(N.key===null?O:N.key)||null,p(_,E,N,P);case U:return E=E.get(N.key===null?O:N.key)||null,R(_,E,N,P);case ge:return N=nn(N),C(E,_,O,N,P)}if(lt(N)||de(N))return E=E.get(O)||null,j(_,E,N,P,null);if(typeof N.then=="function")return C(E,_,O,Jl(N),P);if(N.$$typeof===z)return C(E,_,O,Yl(_,N),P);Zl(_,N)}return null}function K(E,_,O,N){for(var P=null,me=null,J=_,se=_=0,fe=null;J!==null&&se<O.length;se++){J.index>se?(fe=J,J=null):fe=J.sibling;var ye=x(E,J,O[se],N);if(ye===null){J===null&&(J=fe);break}e&&J&&ye.alternate===null&&t(E,J),_=o(ye,_,se),me===null?P=ye:me.sibling=ye,me=ye,J=fe}if(se===O.length)return a(E,J),he&&aa(E,se),P;if(J===null){for(;se<O.length;se++)J=k(E,O[se],N),J!==null&&(_=o(J,_,se),me===null?P=J:me.sibling=J,me=J);return he&&aa(E,se),P}for(J=i(J);se<O.length;se++)fe=C(J,E,se,O[se],N),fe!==null&&(e&&fe.alternate!==null&&J.delete(fe.key===null?se:fe.key),_=o(fe,_,se),me===null?P=fe:me.sibling=fe,me=fe);return e&&J.forEach(function(Ga){return t(E,Ga)}),he&&aa(E,se),P}function W(E,_,O,N){if(O==null)throw Error(r(151));for(var P=null,me=null,J=_,se=_=0,fe=null,ye=O.next();J!==null&&!ye.done;se++,ye=O.next()){J.index>se?(fe=J,J=null):fe=J.sibling;var Ga=x(E,J,ye.value,N);if(Ga===null){J===null&&(J=fe);break}e&&J&&Ga.alternate===null&&t(E,J),_=o(Ga,_,se),me===null?P=Ga:me.sibling=Ga,me=Ga,J=fe}if(ye.done)return a(E,J),he&&aa(E,se),P;if(J===null){for(;!ye.done;se++,ye=O.next())ye=k(E,ye.value,N),ye!==null&&(_=o(ye,_,se),me===null?P=ye:me.sibling=ye,me=ye);return he&&aa(E,se),P}for(J=i(J);!ye.done;se++,ye=O.next())ye=C(J,E,se,ye.value,N),ye!==null&&(e&&ye.alternate!==null&&J.delete(ye.key===null?se:ye.key),_=o(ye,_,se),me===null?P=ye:me.sibling=ye,me=ye);return e&&J.forEach(function(pv){return t(E,pv)}),he&&aa(E,se),P}function Te(E,_,O,N){if(typeof O=="object"&&O!==null&&O.type===L&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case T:e:{for(var P=O.key;_!==null;){if(_.key===P){if(P=O.type,P===L){if(_.tag===7){a(E,_.sibling),N=u(_,O.props.children),N.return=E,E=N;break e}}else if(_.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ge&&nn(P)===_.type){a(E,_.sibling),N=u(_,O.props),zi(N,O),N.return=E,E=N;break e}a(E,_);break}else t(E,_);_=_.sibling}O.type===L?(N=Wa(O.props.children,E.mode,N,O.key),N.return=E,E=N):(N=$l(O.type,O.key,O.props,null,E.mode,N),zi(N,O),N.return=E,E=N)}return h(E);case U:e:{for(P=O.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===O.containerInfo&&_.stateNode.implementation===O.implementation){a(E,_.sibling),N=u(_,O.children||[]),N.return=E,E=N;break e}else{a(E,_);break}else t(E,_);_=_.sibling}N=Lr(O,E.mode,N),N.return=E,E=N}return h(E);case ge:return O=nn(O),Te(E,_,O,N)}if(lt(O))return K(E,_,O,N);if(de(O)){if(P=de(O),typeof P!="function")throw Error(r(150));return O=P.call(O),W(E,_,O,N)}if(typeof O.then=="function")return Te(E,_,Jl(O),N);if(O.$$typeof===z)return Te(E,_,Yl(E,O),N);Zl(E,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,_!==null&&_.tag===6?(a(E,_.sibling),N=u(_,O),N.return=E,E=N):(a(E,_),N=Mr(O,E.mode,N),N.return=E,E=N),h(E)):a(E,_)}return function(E,_,O,N){try{Ni=0;var P=Te(E,_,O,N);return qn=null,P}catch(J){if(J===Bn||J===Ql)throw J;var me=_t(29,J,null,E.mode);return me.lanes=N,me.return=E,me}finally{}}}var sn=of(!0),cf=of(!1),Aa=!1;function Zr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ir(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ve&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=Hl(e),Qc(e,null,a),t}return ql(e,i,t,a),Hl(e)}function ki(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,ec(e,a)}}function Pr(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var u=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?u=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?u=o=t:o=o.next=t}else u=o=t;a={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Wr=!1;function Mi(){if(Wr){var e=Ln;
vendor: 2,637 bytes, line 49
49if(e!==null)throw e}}function Li(e,t,a,i){Wr=!1;var u=e.updateQueue;Aa=!1;var o=u.firstBaseUpdate,h=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var p=y,R=p.next;p.next=null,h===null?o=R:h.next=R,h=p;var j=e.alternate;j!==null&&(j=j.updateQueue,y=j.lastBaseUpdate,y!==h&&(y===null?j.firstBaseUpdate=R:y.next=R,j.lastBaseUpdate=p))}if(o!==null){var k=u.baseState;h=0,j=R=p=null,y=o;do{var x=y.lane&-536870913,C=x!==y.lane;if(C?(ce&x)===x:(i&x)===x){x!==0&&x===Mn&&(Wr=!0),j!==null&&(j=j.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var K=e,W=y;x=t;var Te=a;switch(W.tag){case 1:if(K=W.payload,typeof K=="function"){k=K.call(Te,k,x);break e}k=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=W.payload,x=typeof K=="function"?K.call(Te,k,x):K,x==null)break e;k=S({},k,x);break e;case 2:Aa=!0}}x=y.callback,x!==null&&(e.flags|=64,C&&(e.flags|=8192),C=u.callbacks,C===null?u.callbacks=[x]:C.push(x))}else C={lane:x,tag:y.tag,payload:y.payload,callback:y.callback,next:null},j===null?(R=j=C,p=k):j=j.next=C,h|=x;if(y=y.next,y===null){if(y=u.shared.pending,y===null)break;C=y,y=C.next,C.next=null,u.lastBaseUpdate=C,u.shared.pending=null}}while(!0);j===null&&(p=k),u.baseState=p,u.firstBaseUpdate=R,u.lastBaseUpdate=j,o===null&&(u.shared.lanes=0),Da|=h,e.lanes=h,e.memoizedState=k}}function ff(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function hf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ff(a[e],t)}var Hn=w(null),Il=w(0);function df(e,t){e=da,V(Il,e),V(Hn,t),da=e|t.baseLanes}function Fr(){V(Il,da),V(Hn,Hn.current)}function eu(){da=Il.current,M(Hn),M(Il)}var wt=w(null),Lt=null;function xa(e){var t=e.alternate;V(Le,Le.current&1),V(wt,e),Lt===null&&(t===null||Hn.current!==null||t.memoizedState!==null)&&(Lt=e)}function tu(e){V(Le,Le.current),V(wt,e),Lt===null&&(Lt=e)}function mf(e){e.tag===22?(V(Le,Le.current),V(wt,e),Lt===null&&(Lt=e)):Ca()}function Ca(){V(Le,Le.current),V(wt,wt.current)}function St(e){M(wt),Lt===e&&(Lt=null),M(Le)}var Le=w(0);function Pl(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ro(a)||uo(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}
vendor: 16,307 bytes, line 49
49var la=0,le=null,Se=null,He=null,Wl=!1,$n=!1,rn=!1,Fl=0,Bi=0,Gn=null,ug=0;function Ne(){throw Error(r(321))}function au(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!bt(e[a],t[a]))return!1;return!0}function nu(e,t,a,i,u,o){return la=o,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Pf:pu,rn=!1,o=a(i,u),rn=!1,$n&&(o=gf(t,a,i,u)),yf(e),o}function yf(e){D.H=$i;var t=Se!==null&&Se.next!==null;if(la=0,He=Se=le=null,Wl=!1,Bi=0,Gn=null,t)throw Error(r(300));e===null||$e||(e=e.dependencies,e!==null&&Vl(e)&&($e=!0))}function gf(e,t,a,i){le=e;var u=0;do{if($n&&(Gn=null),Bi=0,$n=!1,25<=u)throw Error(r(301));if(u+=1,He=Se=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Wf,o=t(a,i)}while($n);return o}function og(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?qi(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(le.flags|=1024),t}function iu(){var e=Fl!==0;return Fl=0,e}function lu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function su(e){if(Wl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wl=!1}la=0,He=Se=le=null,$n=!1,Bi=Fl=0,Gn=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?le.memoizedState=He=e:He=He.next=e,He}function Be(){if(Se===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=He===null?le.memoizedState:He.next;if(t!==null)He=t,Se=e;else{if(e===null)throw le.alternate===null?Error(r(467)):Error(r(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},He===null?le.memoizedState=He=e:He=He.next=e}return He}function es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qi(e){var t=Bi;return Bi+=1,Gn===null&&(Gn=[]),e=sf(Gn,e,t),t=le,(He===null?t.memoizedState:He.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Pf:pu),e}function ts(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qi(e);if(e.$$typeof===z)return We(e)}throw Error(r(438,String(e)))}function ru(e){var t=null,a=le.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=le.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=es(),le.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=it;return t.index++,a}function sa(e,t){return typeof t=="function"?t(e):t}function as(e){var t=Be();return uu(t,Se,e)}function uu(e,t,a){var i=e.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=a;var u=e.baseQueue,o=i.pending;if(o!==null){if(u!==null){var h=u.next;u.next=o.next,o.next=h}t.baseQueue=u=o,i.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var y=h=null,p=null,R=t,j=!1;do{var k=R.lane&-536870913;if(k!==R.lane?(ce&k)===k:(la&k)===k){var x=R.revertLane;if(x===0)p!==null&&(p=p.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),k===Mn&&(j=!0);else if((la&x)===x){R=R.next,x===Mn&&(j=!0);continue}else k={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},p===null?(y=p=k,h=o):p=p.next=k,le.lanes|=x,Da|=x;k=R.action,rn&&a(o,k),o=R.hasEagerState?R.eagerState:a(o,k)}else x={lane:k,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},p===null?(y=p=x,h=o):p=p.next=x,le.lanes|=k,Da|=k;R=R.next}while(R!==null&&R!==t);if(p===null?h=o:p.next=y,!bt(o,e.memoizedState)&&($e=!0,j&&(a=Ln,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=p,i.lastRenderedState=o}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function ou(e){var t=Be(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var i=a.dispatch,u=a.pending,o=t.memoizedState;if(u!==null){a.pending=null;var h=u=u.next;do o=e(o,h.action),h=h.next;while(h!==u);bt(o,t.memoizedState)||($e=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,i]}function vf(e,t,a){var i=le,u=Be(),o=he;if(o){if(a===void 0)throw Error(r(407));a=a()}else a=t();var h=!bt((Se||u).memoizedState,a);if(h&&(u.memoizedState=a,$e=!0),u=u.queue,hu(_f.bind(null,i,u,e),[e]),u.getSnapshot!==t||h||He!==null&&He.memoizedState.tag&1){if(i.flags|=2048,Vn(9,{destroy:void 0},bf.bind(null,i,u,a,t),null),Oe===null)throw Error(r(349));o||(la&127)!==0||pf(i,t,a)}return a}function pf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=le.updateQueue,t===null?(t=es(),le.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function bf(e,t,a,i){t.value=a,t.getSnapshot=i,wf(t)&&Sf(e)}function _f(e,t,a){return a(function(){wf(t)&&Sf(e)})}function wf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!bt(e,a)}catch{return!0}}function Sf(e){var t=Pa(e,2);t!==null&&yt(t,e,2)}function cu(e){var t=ut();if(typeof e=="function"){var a=e;if(e=a(),rn){pa(!0);try{a()}finally{pa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function Ef(e,t,a,i){return e.baseState=a,uu(e,Se,typeof i=="function"?i:sa)}function cg(e,t,a,i,u){if(ls(e))throw Error(r(485));if(e=t.action,e!==null){var o={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};D.T!==null?a(!0):o.isTransition=!1,i(o),a=t.pending,a===null?(o.next=t.pending=o,Tf(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Tf(e,t){var a=t.action,i=t.payload,u=e.state;if(t.isTransition){var o=D.T,h={};D.T=h;try{var y=a(u,i),p=D.S;p!==null&&p(h,y),Af(e,t,y)}catch(R){fu(e,t,R)}finally{o!==null&&h.types!==null&&(o.types=h.types),D.T=o}}else try{o=a(u,i),Af(e,t,o)}catch(R){fu(e,t,R)}}function Af(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Of(e,t,i)},function(i){return fu(e,t,i)}):Of(e,t,a)}function Of(e,t,a){t.status="fulfilled",t.value=a,Rf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tf(e,a)))}function fu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Rf(t),t=t.next;while(t!==i)}e.action=null}function Rf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xf(e,t){return t}function Cf(e,t){if(he){var a=Oe.formState;if(a!==null){e:{var i=le;if(he){if(je){t:{for(var u=je,o=Mt;u.nodeType!==8;){if(!o){u=null;break t}if(u=Bt(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){je=Bt(u.nextSibling),i=u.data==="F!";break e}}Ea(i)}i=!1}i&&(t=a[0])}}return a=ut(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xf,lastRenderedState:t},a.queue=i,a=Jf.bind(null,le,i),i.dispatch=a,i=cu(!1),o=vu.bind(null,le,!1,i.queue),i=ut(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,a=cg.bind(null,le,u,o,a),u.dispatch=a,i.memoizedState=e,[t,a,!1]}function jf(e){var t=Be();return Uf(t,Se,e)}function Uf(e,t,a){if(t=uu(e,t,xf)[0],e=as(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=qi(t)}catch(h){throw h===Bn?Ql:h}else i=t;t=Be();var u=t.queue,o=u.dispatch;return a!==t.memoizedState&&(le.flags|=2048,Vn(9,{destroy:void 0},fg.bind(null,u,a),null)),[i,o,e]}function fg(e,t){e.action=t}function Df(e){var t=Be(),a=Se;if(a!==null)return Uf(t,a,e);Be(),t=t.memoizedState,a=Be();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Vn(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=le.updateQueue,t===null&&(t=es(),le.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Nf(){return Be().memoizedState}function ns(e,t,a,i){var u=ut();le.flags|=e,u.memoizedState=Vn(1|t,{destroy:void 0},a,i===void 0?null:i)}function is(e,t,a,i){var u=Be();i=i===void 0?null:i;var o=u.memoizedState.inst;Se!==null&&i!==null&&au(i,Se.memoizedState.deps)?u.memoizedState=Vn(t,o,a,i):(le.flags|=e,u.memoizedState=Vn(1|t,o,a,i))}function zf(e,t){ns(8390656,8,e,t)}function hu(e,t){is(2048,8,e,t)}function hg(e){le.flags|=4;var t=le.updateQueue;if(t===null)t=es(),le.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function kf(e){var t=Be().memoizedState;return hg({ref:t,nextImpl:e}),function(){if((ve&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Mf(e,t){return is(4,2,e,t)}function Lf(e,t){return is(4,4,e,t)}function Bf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qf(e,t,a){a=a!=null?a.concat([e]):null,is(4,4,Bf.bind(null,t,e),a)}function du(){}function Hf(e,t){var a=Be();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&au(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function $f(e,t){var a=Be();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&au(t,i[1]))return i[0];if(i=e(),rn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[i,t],i}function mu(e,t,a){return a===void 0||(la&1073741824)!==0&&(ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Gh(),le.lanes|=e,Da|=e,a)}function Gf(e,t,a,i){return bt(a,t)?a:Hn.current!==null?(e=mu(e,a,i),bt(e,t)||($e=!0),e):(la&42)===0||(la&1073741824)!==0&&(ce&261930)===0?($e=!0,e.memoizedState=a):(e=Gh(),le.lanes|=e,Da|=e,t)}function Vf(e,t,a,i,u){var o=G.p;G.p=o!==0&&8>o?o:8;var h=D.T,y={};D.T=y,vu(e,!1,t,a);try{var p=u(),R=D.S;if(R!==null&&R(y,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var j=rg(p,i);Hi(e,t,j,At(e))}else Hi(e,t,i,At(e))}catch(k){Hi(e,t,{then:function(){},status:"rejected",reason:k},At())}finally{G.p=o,h!==null&&y.types!==null&&(h.types=y.types),D.T=h}}function dg(){}function yu(e,t,a,i){if(e.tag!==5)throw Error(r(476));var u=Yf(e).queue;Vf(e,u,t,te,a===null?dg:function(){return Kf(e),a(i)})}function Yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:te},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kf(e){var t=Yf(e);t.next===null&&(t=e.alternate.memoizedState),Hi(e,t.next.queue,{},At())}function gu(){return We(nl)}function Qf(){return Be().memoizedState}function Xf(){return Be().memoizedState}function mg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=At();e=Oa(a);var i=Ra(t,e,a);i!==null&&(yt(i,t,a),ki(i,t,a)),t={cache:Kr()},e.payload=t;return}t=t.return}}function yg(e,t,a){var i=At();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ls(e)?Zf(t,a):(a=zr(e,t,a,i),a!==null&&(yt(a,e,i),If(a,t,i)))}function Jf(e,t,a){var i=At();Hi(e,t,a,i)}function Hi(e,t,a,i){var u={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ls(e))Zf(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,y=o(h,a);if(u.hasEagerState=!0,u.eagerState=y,bt(y,h))return ql(e,t,u,0),Oe===null&&Bl(),!1}catch{}finally{}if(a=zr(e,t,u,i),a!==null)return yt(a,e,i),If(a,t,i),!0}return!1}function vu(e,t,a,i){if(i={lane:2,revertLane:Zu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(r(479))}else t=zr(e,a,i,2),t!==null&&yt(t,e,2)}function ls(e){var t=e.alternate;return e===le||t!==null&&t===le}function Zf(e,t){$n=Wl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function If(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,ec(e,a)}}var $i={readContext:We,use:ts,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useLayoutEffect:Ne,useInsertionEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useSyncExternalStore:Ne,useId:Ne,useHostTransitionStatus:Ne,useFormState:Ne,useActionState:Ne,useOptimistic:Ne,useMemoCache:Ne,useCacheRefresh:Ne};$i.useEffectEvent=Ne;var Pf={readContext:We,use:ts,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:zf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ns(4194308,4,Bf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var a=ut();t=t===void 0?null:t;var i=e();if(rn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=ut();if(a!==void 0){var u=a(t);if(rn){pa(!0);try{a(t)}finally{pa(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=yg.bind(null,le,e),[i.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=cu(e);var t=e.queue,a=Jf.bind(null,le,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:du,useDeferredValue:function(e,t){var a=ut();return mu(a,e,t)},useTransition:function(){var e=cu(!1);return e=Vf.bind(null,le,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=le,u=ut();if(he){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Oe===null)throw Error(r(349));(ce&127)!==0||pf(i,t,a)}u.memoizedState=a;var o={value:a,getSnapshot:t};return u.queue=o,zf(_f.bind(null,i,o,e),[e]),i.flags|=2048,Vn(9,{destroy:void 0},bf.bind(null,i,o,a,t),null),a},useId:function(){var e=ut(),t=Oe.identifierPrefix;if(he){var a=Jt,i=Xt;a=(i&~(1<<32-pt(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Fl++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=ug++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gu,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=vu.bind(null,le,!0,a),a.dispatch=t,[e,t]},useMemoCache:ru,useCacheRefresh:function(){return ut().memoizedState=mg.bind(null,le)},useEffectEvent:function(e){var t=ut(),a={impl:e};return t.memoizedState=a,function(){if((ve&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},pu={readContext:We,use:ts,useCallback:Hf,useContext:We,useEffect:hu,useImperativeHandle:qf,useInsertionEffect:Mf,useLayoutEffect:Lf,useMemo:$f,useReducer:as,useRef:Nf,useState:function(){return as(sa)},useDebugValue:du,useDeferredValue:function(e,t){var a=Be();return Gf(a,Se.memoizedState,e,t)},useTransition:function(){var e=as(sa)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:qi(e),t]},useSyncExternalStore:vf,useId:Qf,useHostTransitionStatus:gu,useFormState:jf,useActionState:jf,useOptimistic:function(e,t){var a=Be();return Ef(a,Se,e,t)},useMemoCache:ru,useCacheRefresh:Xf};pu.useEffectEvent=kf;var Wf={readContext:We,use:ts,useCallback:Hf,useContext:We,useEffect:hu,useImperativeHandle:qf,useInsertionEffect:Mf,useLayoutEffect:Lf,useMemo:$f,useReducer:ou,useRef:Nf,useState:function(){return ou(sa)},useDebugValue:du,useDeferredValue:function(e,t){var a=Be();return Se===null?mu(a,e,t):Gf(a,Se.memoizedState,e,t)},useTransition:function(){var e=ou(sa)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:qi(e),t]},useSyncExternalStore:vf,useId:Qf,useHostTransitionStatus:gu,useFormState:Df,useActionState:Df,useOptimistic:function(e,t){var a=Be();return Se!==null?Ef(a,Se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ru,useCacheRefresh:Xf};Wf.useEffectEvent=kf;function bu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:S({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var _u={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=At(),u=Oa(i);u.payload=t,a!=null&&(u.callback=a),t=Ra(e,u,i),t!==null&&(yt(t,e,i),ki(t,e,
vendor: 14,874 bytes, line 49
49i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=At(),u=Oa(i);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Ra(e,u,i),t!==null&&(yt(t,e,i),ki(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=At(),i=Oa(a);i.tag=2,t!=null&&(i.callback=t),t=Ra(e,i,a),t!==null&&(yt(t,e,a),ki(t,e,a))}};function Ff(e,t,a,i,u,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,h):t.prototype&&t.prototype.isPureReactComponent?!Ri(a,i)||!Ri(u,o):!0}function eh(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&_u.enqueueReplaceState(t,t.state,null)}function un(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=S({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function th(e){Ll(e)}function ah(e){console.error(e)}function nh(e){Ll(e)}function ss(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function ih(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function wu(e,t,a){return a=Oa(a),a.tag=3,a.payload={element:null},a.callback=function(){ss(e,t)},a}function lh(e){return e=Oa(e),e.tag=3,e}function sh(e,t,a,i){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var o=i.value;e.payload=function(){return u(o)},e.callback=function(){ih(t,a,i)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){ih(t,a,i),typeof u!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var y=i.stack;this.componentDidCatch(i.value,{componentStack:y!==null?y:""})})}function gg(e,t,a,i,u){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&kn(t,a,u,!0),a=wt.current,a!==null){switch(a.tag){case 31:case 13:return Lt===null?ps():a.alternate===null&&ze===0&&(ze=3),a.flags&=-257,a.flags|=65536,a.lanes=u,i===Xl?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Qu(e,i,u)),!1;case 22:return a.flags|=65536,i===Xl?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Qu(e,i,u)),!1}throw Error(r(435,a.tag))}return Qu(e,i,u),ps(),!1}if(he)return t=wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==Hr&&(e=Error(r(422),{cause:i}),ji(Nt(e,a)))):(i!==Hr&&(t=Error(r(423),{cause:i}),ji(Nt(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=Nt(i,a),u=wu(e.stateNode,i,u),Pr(e,u),ze!==4&&(ze=2)),!1;var o=Error(r(520),{cause:i});if(o=Nt(o,a),Zi===null?Zi=[o]:Zi.push(o),ze!==4&&(ze=2),t===null)return!0;i=Nt(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=wu(a.stateNode,i,e),Pr(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Na===null||!Na.has(o))))return a.flags|=65536,u&=-u,a.lanes|=u,u=lh(u),sh(u,e,a,i),Pr(a,u),!1}a=a.return}while(a!==null);return!1}var Su=Error(r(461)),$e=!1;function Fe(e,t,a,i){t.child=e===null?cf(t,null,a,i):sn(t,e.child,a,i)}function rh(e,t,a,i,u){a=a.render;var o=t.ref;if("ref"in i){var h={};for(var y in i)y!=="ref"&&(h[y]=i[y])}else h=i;return tn(t),i=nu(e,t,a,h,o,u),y=iu(),e!==null&&!$e?(lu(e,t,u),ra(e,t,u)):(he&&y&&Br(t),t.flags|=1,Fe(e,t,i,u),t.child)}function uh(e,t,a,i,u){if(e===null){var o=a.type;return typeof o=="function"&&!kr(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,oh(e,t,o,i,u)):(e=$l(a.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!ju(e,u)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Ri,a(h,i)&&e.ref===t.ref)return ra(e,t,u)}return t.flags|=1,e=ta(o,i),e.ref=t.ref,e.return=t,t.child=e}function oh(e,t,a,i,u){if(e!==null){var o=e.memoizedProps;if(Ri(o,i)&&e.ref===t.ref)if($e=!1,t.pendingProps=i=o,ju(e,u))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,ra(e,t,u)}return Eu(e,t,a,i,u)}function ch(e,t,a,i){var u=i.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(i=t.child=e.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;i=u&~o}else i=0,t.child=null;return fh(e,t,o,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Kl(t,o!==null?o.cachePool:null),o!==null?df(t,o):Fr(),mf(t);else return i=t.lanes=536870912,fh(e,t,o!==null?o.baseLanes|a:a,a,i)}else o!==null?(Kl(t,o.cachePool),df(t,o),Ca(),t.memoizedState=null):(e!==null&&Kl(t,null),Fr(),Ca());return Fe(e,t,u,a),t.child}function Gi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fh(e,t,a,i,u){var o=Xr();return o=o===null?null:{parent:qe._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Kl(t,null),Fr(),mf(t),e!==null&&kn(e,t,i,!0),t.childLanes=u,null}function rs(e,t){return t=os({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hh(e,t,a){return sn(t,e.child,null,a),e=rs(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function vg(e,t,a){var i=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(he){if(i.mode==="hidden")return e=rs(t,i),t.lanes=536870912,Gi(null,e);if(tu(t),(e=je)?(e=Td(e,Mt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wa!==null?{id:Xt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Jc(e),a.return=t,t.child=a,Pe=t,je=null)):e=null,e===null)throw Ea(t);return t.lanes=536870912,null}return rs(t,i)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(tu(t),u)if(t.flags&256)t.flags&=-257,t=hh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if($e||kn(e,t,a,!1),u=(a&e.childLanes)!==0,$e||u){if(i=Oe,i!==null&&(h=tc(i,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,Pa(e,h),yt(i,e,h),Su;ps(),t=hh(e,t,a)}else e=o.treeContext,je=Bt(h.nextSibling),Pe=t,he=!0,Sa=null,Mt=!1,e!==null&&Pc(t,e),t=rs(t,i),t.flags|=4096;return t}return e=ta(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function us(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Eu(e,t,a,i,u){return tn(t),a=nu(e,t,a,i,void 0,u),i=iu(),e!==null&&!$e?(lu(e,t,u),ra(e,t,u)):(he&&i&&Br(t),t.flags|=1,Fe(e,t,a,u),t.child)}function dh(e,t,a,i,u,o){return tn(t),t.updateQueue=null,a=gf(t,i,a,u),yf(e),i=iu(),e!==null&&!$e?(lu(e,t,o),ra(e,t,o)):(he&&i&&Br(t),t.flags|=1,Fe(e,t,a,o),t.child)}function mh(e,t,a,i,u){if(tn(t),t.stateNode===null){var o=Un,h=a.contextType;typeof h=="object"&&h!==null&&(o=We(h)),o=new a(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=_u,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},Zr(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?We(h):Un,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(bu(t,a,h,i),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&_u.enqueueReplaceState(o,o.state,null),Li(t,i,o,u),Mi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var y=t.memoizedProps,p=un(a,y);o.props=p;var R=o.context,j=a.contextType;h=Un,typeof j=="object"&&j!==null&&(h=We(j));var k=a.getDerivedStateFromProps;j=typeof k=="function"||typeof o.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,j||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(y||R!==h)&&eh(t,o,i,h),Aa=!1;var x=t.memoizedState;o.state=x,Li(t,i,o,u),Mi(),R=t.memoizedState,y||x!==R||Aa?(typeof k=="function"&&(bu(t,a,k,i),R=t.memoizedState),(p=Aa||Ff(t,a,p,i,x,R,h))?(j||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=R),o.props=i,o.state=R,o.context=h,i=p):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,Ir(e,t),h=t.memoizedProps,j=un(a,h),o.props=j,k=t.pendingProps,x=o.context,R=a.contextType,p=Un,typeof R=="object"&&R!==null&&(p=We(R)),y=a.getDerivedStateFromProps,(R=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==k||x!==p)&&eh(t,o,i,p),Aa=!1,x=t.memoizedState,o.state=x,Li(t,i,o,u),Mi();var C=t.memoizedState;h!==k||x!==C||Aa||e!==null&&e.dependencies!==null&&Vl(e.dependencies)?(typeof y=="function"&&(bu(t,a,y,i),C=t.memoizedState),(j=Aa||Ff(t,a,j,i,x,C,p)||e!==null&&e.dependencies!==null&&Vl(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,C,p),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,C,p)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=C),o.props=i,o.state=C,o.context=p,i=j):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,us(e,t),i=(t.flags&128)!==0,o||i?(o=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&i?(t.child=sn(t,e.child,null,u),t.child=sn(t,null,a,u)):Fe(e,t,a,u),t.memoizedState=o.state,e=t.child):e=ra(e,t,u),e}function yh(e,t,a,i){return Fa(),t.flags|=256,Fe(e,t,a,i),t.child}var Tu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Au(e){return{baseLanes:e,cachePool:nf()}}function Ou(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Tt),e}function gh(e,t,a){var i=t.pendingProps,u=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(Le.current&2)!==0),h&&(u=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(he){if(u?xa(t):Ca(),(e=je)?(e=Td(e,Mt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wa!==null?{id:Xt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Jc(e),a.return=t,t.child=a,Pe=t,je=null)):e=null,e===null)throw Ea(t);return uo(e)?t.lanes=32:t.lanes=536870912,null}var y=i.children;return i=i.fallback,u?(Ca(),u=t.mode,y=os({mode:"hidden",children:y},u),i=Wa(i,u,a,null),y.return=t,i.return=t,y.sibling=i,t.child=y,i=t.child,i.memoizedState=Au(a),i.childLanes=Ou(e,h,a),t.memoizedState=Tu,Gi(null,i)):(xa(t),Ru(t,y))}var p=e.memoizedState;if(p!==null&&(y=p.dehydrated,y!==null)){if(o)t.flags&256?(xa(t),t.flags&=-257,t=xu(e,t,a)):t.memoizedState!==null?(Ca(),t.child=e.child,t.flags|=128,t=null):(Ca(),y=i.fallback,u=t.mode,i=os({mode:"visible",children:i.children},u),y=Wa(y,u,a,null),y.flags|=2,i.return=t,y.return=t,i.sibling=y,t.child=i,sn(t,e.child,null,a),i=t.child,i.memoizedState=Au(a),i.childLanes=Ou(e,h,a),t.memoizedState=Tu,t=Gi(null,i));else if(xa(t),uo(y)){if(h=y.nextSibling&&y.nextSibling.dataset,h)var R=h.dgst;h=R,i=Error(r(419)),i.stack="",i.digest=h,ji({value:i,source:null,stack:null}),t=xu(e,t,a)}else if($e||kn(e,t,a,!1),h=(a&e.childLanes)!==0,$e||h){if(h=Oe,h!==null&&(i=tc(h,a),i!==0&&i!==p.retryLane))throw p.retryLane=i,Pa(e,i),yt(h,e,i),Su;ro(y)||ps(),t=xu(e,t,a)}else ro(y)?(t.flags|=192,t.child=e.child,t=null):(e=p.treeContext,je=Bt(y.nextSibling),Pe=t,he=!0,Sa=null,Mt=!1,e!==null&&Pc(t,e),t=Ru(t,i.children),t.flags|=4096);return t}return u?(Ca(),y=i.fallback,u=t.mode,p=e.child,R=p.sibling,i=ta(p,{mode:"hidden",children:i.children}),i.subtreeFlags=p.subtreeFlags&65011712,R!==null?y=ta(R,y):(y=Wa(y,u,a,null),y.flags|=2),y.return=t,i.return=t,i.sibling=y,t.child=i,Gi(null,i),i=t.child,y=e.child.memoizedState,y===null?y=Au(a):(u=y.cachePool,u!==null?(p=qe._currentValue,u=u.parent!==p?{parent:p,pool:p}:u):u=nf(),y={baseLanes:y.baseLanes|a,cachePool:u}),i.memoizedState=y,i.childLanes=Ou(e,h,a),t.memoizedState=Tu,Gi(e.child,i)):(xa(t),a=e.child,e=a.sibling,a=ta(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Ru(e,t){return t=os({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function os(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function xu(e,t,a){return sn(t,e.child,null,a),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vh(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Vr(e.return,t,a)}function Cu(e,t,a,i,u,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:u,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=a,h.tailMode=u,h.treeForkCount=o)}function ph(e,t,a){var i=t.pendingProps,u=i.revealOrder,o=i.tail;i=i.children;var h=Le.current,y=(h&2)!==0;if(y?(h=h&1|2,t.flags|=128):h&=1,V(Le,h),Fe(e,t,i,a),i=he?Ci:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vh(e,a,t);else if(e.tag===19)vh(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Pl(e)===null&&(u=a),a=a.sibling;
vendor: 5,068 bytes, line 49
49a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Cu(t,!1,u,a,o,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Pl(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Cu(t,!0,a,null,o,i);break;case"together":Cu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ra(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Da|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(kn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=ta(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ta(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ju(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vl(e)))}function pg(e,t,a){switch(t.tag){case 3:rt(t,t.stateNode.containerInfo),Ta(t,qe,e.memoizedState.cache),Fa();break;case 27:case 5:mi(t);break;case 4:rt(t,t.stateNode.containerInfo);break;case 10:Ta(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(xa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?gh(e,t,a):(xa(t),e=ra(e,t,a),e!==null?e.sibling:null);xa(t);break;case 19:var u=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(kn(e,t,a,!1),i=(a&t.childLanes)!==0),u){if(i)return ph(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),V(Le,Le.current),i)break;return null;case 22:return t.lanes=0,ch(e,t,a,t.pendingProps);case 24:Ta(t,qe,e.memoizedState.cache)}return ra(e,t,a)}function bh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!ju(e,a)&&(t.flags&128)===0)return $e=!1,pg(e,t,a);$e=(e.flags&131072)!==0}else $e=!1,he&&(t.flags&1048576)!==0&&Ic(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=nn(t.elementType),t.type=e,typeof e=="function")kr(e)?(i=un(e,i),t.tag=1,t=mh(null,t,e,i,a)):(t.tag=0,t=Eu(null,t,e,i,a));else{if(e!=null){var u=e.$$typeof;if(u===Y){t.tag=11,t=rh(null,t,e,i,a);break e}else if(u===Z){t.tag=14,t=uh(null,t,e,i,a);break e}}throw t=Ht(e)||e,Error(r(306,t,""))}}return t;case 0:return Eu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,u=un(i,t.pendingProps),mh(e,t,i,u,a);case 3:e:{if(rt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));i=t.pendingProps;var o=t.memoizedState;u=o.element,Ir(e,t),Li(t,i,null,a);var h=t.memoizedState;if(i=h.cache,Ta(t,qe,i),i!==o.cache&&Yr(t,[qe],a,!0),Mi(),i=h.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=yh(e,t,i,a);break e}else if(i!==u){u=Nt(Error(r(424)),t),ji(u),t=yh(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(je=Bt(e.firstChild),Pe=t,he=!0,Sa=null,Mt=!0,a=cf(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Fa(),i===u){t=ra(e,t,a);break e}Fe(e,t,i,a)}t=t.child}return t;case 26:return us(e,t),e===null?(a=jd(t.type,null,t.pendingProps,null))?t.memoizedState=a:he||(a=t.type,e=t.pendingProps,i=As(re.current).createElement(a),i[Ie]=t,i[ot]=e,et(i,a,e),Je(i),t.stateNode=i):t.memoizedState=jd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mi(t),e===null&&he&&(i=t.stateNode=Rd(t.type,t.pendingProps,re.current),Pe=t,Mt=!0,u=je,La(t.type)?(oo=u,je=Bt(i.firstChild)):je=u),Fe(e,t,t.pendingProps.children,a),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&he&&((u=i=je)&&(i=Jg(i,t.type,t.pendingProps,Mt),i!==null?(t.stateNode=i,Pe=t,je=Bt(i.firstChild),Mt=!1,u=!0):u=!1),u||Ea(t)),mi(t),u=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,i=o.children,io(u,o)?i=null:h!==null&&io(u,h)&&(t.flags|=32),t.memoizedState!==null&&(u=nu(e,t,og,null,null,a),nl._currentValue=u),us(e,t),Fe(e,t,i,a),t.child;case 6:return e===null&&he&&((e=a=je)&&(a=Zg(a,t.pendingProps,Mt),a!==null?(t.stateNode=a,Pe=t,je=null,e=!0):e=!1),e||Ea(t)),null;case 13:return gh(e,t,a);case 4:return rt(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=sn(t,null,i,a):Fe(e,t,i,a),t.child;case 11:return rh(e,t,t.type,t.pendingProps,a);case 7:return Fe(e,t,t.pendingProps,a),t.child;case 8:return Fe(e,t,t.pendingProps.children,a),t.child;case 12:return Fe(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ta(t,t.type,i.value),Fe(e,t,i.children,a),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,tn(t),u=We(u),i=i(u),t.flags|=1,Fe(e,t,i,a),t.child;case 14:return uh(e,t,t.type,t.pendingProps,a);case 15:return oh(e,t,t.type,t.pendingProps,a);case 19:return ph(e,t,a);case 31:return vg(e,t,a);case 22:return ch(e,t,a,t.pendingProps);case 24:return tn(t),i=We(qe),e===null?(u=Xr(),u===null&&(u=Oe,o=Kr(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=a),u=o),t.memoizedState={parent:i,
vendor: 9,357 bytes, line 49
49cache:u},Zr(t),Ta(t,qe,u)):((e.lanes&a)!==0&&(Ir(e,t),Li(t,null,null,a),Mi()),u=e.memoizedState,o=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Ta(t,qe,i)):(i=o.cache,Ta(t,qe,i),i!==u.cache&&Yr(t,[qe],a,!0))),Fe(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ua(e){e.flags|=4}function Uu(e,t,a,i,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Qh())e.flags|=8192;else throw ln=Xl,Jr}else e.flags&=-16777217}function _h(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!kd(t))if(Qh())e.flags|=8192;else throw ln=Xl,Jr}function cs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wo():536870912,e.lanes|=t,Xn|=t)}function Vi(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function bg(e,t,a){var i=t.pendingProps;switch(qr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ia(qe),Me(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(zn(t)?ua(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$r())),Ue(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(ua(t),o!==null?(Ue(t),_h(t,o)):(Ue(t),Uu(t,u,null,i,a))):o?o!==e.memoizedState?(ua(t),Ue(t),_h(t,o)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ua(t),Ue(t),Uu(t,u,e,i,a)),null;case 27:if(wl(t),a=re.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ua(t);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ue(t),null}e=X.current,zn(t)?Wc(t):(e=Rd(u,i,a),t.stateNode=e,ua(t))}return Ue(t),null;case 5:if(wl(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ua(t);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ue(t),null}if(o=X.current,zn(t))Wc(t);else{var h=As(re.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof i.is=="string"?h.createElement("select",{is:i.is}):h.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?h.createElement(u,{is:i.is}):h.createElement(u)}}o[Ie]=t,o[ot]=i;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(et(o,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ua(t)}}return Ue(t),Uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ua(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,zn(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,u=Pe,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[Ie]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||gd(e.nodeValue,a)),e||Ea(t,!0)}else e=As(e).createTextNode(i),e[Ie]=t,t.stateNode=e}return Ue(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=zn(t),a!==null){if(e===null){if(!i)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ie]=t}else Fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else a=$r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ue(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=zn(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Ie]=t}else Fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),u=!1}else u=$r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==u&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),cs(t,t.updateQueue),Ue(t),null);case 4:return Me(),e===null&&Fu(t.stateNode.containerInfo),Ue(t),null;case 10:return ia(t.type),Ue(t),null;case 19:if(M(Le),i=t.memoizedState,i===null)return Ue(t),null;if(u=(t.flags&128)!==0,o=i.rendering,o===null)if(u)Vi(i,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Pl(e),o!==null){for(t.flags|=128,Vi(i,!1),e=o.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Xc(a,e),a=a.sibling;return V(Le,Le.current&1|2),he&&aa(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&>()>ys&&(t.flags|=128,u=!0,Vi(i,!1),t.lanes=4194304)}else{if(!u)if(e=Pl(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),Vi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!he)return Ue(t),null}else 2*gt()-i.renderingStartTime>ys&&a!==536870912&&(t.flags|=128,u=!0,Vi(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e!==null?e.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=gt(),e.sibling=null,a=Le.current,V(Le,u?a&1|2:a&1),he&&aa(t,i.treeForkCount),e):(Ue(t),null);case 22:case 23:return St(t),eu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),a=t.updateQueue,a!==null&&cs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&M(an),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ia(qe),Ue(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function _g(e,t){switch(qr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(qe),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return wl(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(Le),null;case 4:return Me(),null;case 10:return ia(t.type),null;case 22:case 23:return St(t),eu(),e!==null&&M(an),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(qe),null;case 25:return null;default:return null}}function wh(e,t){switch(qr(t),t.tag){case 3:ia(qe),Me();break;case 26:case 27:case 5:wl(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:M(Le);break;case 10:ia(t.type);break;case 22:case 23:St(t),eu(),e!==null&&M(an);break;case 24:ia(qe)}}function Yi(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){i=void 0;var o=a.create,h=a.inst;i=o(),h.destroy=i}a=a.next}while(a!==u)}}catch(y){_e(t,t.return,y)}}function ja(e,t,a){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var o=u.next;i=o;do{if((i.tag&e)===e){var h=i.inst,y=h.destroy;if(y!==void 0){h.destroy=void 0,u=t;var p=a,R=y;try{R()}catch(j){_e(u,p,j)}}}i=i.next}while(i!==o)}}catch(j){_e(t,t.return,j)}}function Sh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hf(t,a)}catch(i){_e(e,e.return,i)}}}function Eh(e,t,a){a.props=un(e.type,e.memoizedProps),a.state=e.memoizedState;
vendor: 17,964 bytes, line 49
49try{a.componentWillUnmount()}catch(i){_e(e,t,i)}}function Ki(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(u){_e(e,t,u)}}function Zt(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(u){_e(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){_e(e,t,u)}else a.current=null}function Th(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(u){_e(e,e.return,u)}}function Du(e,t,a){try{var i=e.stateNode;Gg(i,e.type,a,t),i[ot]=t}catch(u){_e(e,e.return,u)}}function Ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&La(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ah(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&La(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ft));else if(i!==4&&(i===27&&La(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(zu(e,t,a),e=e.sibling;e!==null;)zu(e,t,a),e=e.sibling}function fs(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&La(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(fs(e,t,a),e=e.sibling;e!==null;)fs(e,t,a),e=e.sibling}function Oh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);et(t,i,a),t[Ie]=e,t[ot]=a}catch(o){_e(e,e.return,o)}}var oa=!1,Ge=!1,ku=!1,Rh=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function wg(e,t){if(e=e.containerInfo,ao=Ds,e=Bc(e),xr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var u=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,y=-1,p=-1,R=0,j=0,k=e,x=null;t:for(;;){for(var C;k!==a||u!==0&&k.nodeType!==3||(y=h+u),k!==o||i!==0&&k.nodeType!==3||(p=h+i),k.nodeType===3&&(h+=k.nodeValue.length),(C=k.firstChild)!==null;)x=k,k=C;for(;;){if(k===e)break t;if(x===a&&++R===u&&(y=h),x===o&&++j===i&&(p=h),(C=k.nextSibling)!==null)break;k=x,x=k.parentNode}k=C}a=y===-1||p===-1?null:{start:y,end:p}}else a=null}a=a||{start:0,end:0}}else a=null;for(no={focusedElem:e,selectionRange:a},Ds=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,u=o.memoizedProps,o=o.memoizedState,i=a.stateNode;try{var K=un(a.type,u);e=i.getSnapshotBeforeUpdate(K,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(W){_e(a,a.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)so(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":so(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ze=e;break}Ze=t.return}}function xh(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:fa(e,a),i&4&&Yi(5,a);break;case 1:if(fa(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){_e(a,a.return,h)}else{var u=un(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){_e(a,a.return,h)}}i&64&&Sh(a),i&512&&Ki(a,a.return);break;case 3:if(fa(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hf(e,t)}catch(h){_e(a,a.return,h)}}break;case 27:t===null&&i&4&&Oh(a);case 26:case 5:fa(e,a),t===null&&i&4&&Th(a),i&512&&Ki(a,a.return);break;case 12:fa(e,a);break;case 31:fa(e,a),i&4&&Uh(e,a);break;case 13:fa(e,a),i&4&&Dh(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=jg.bind(null,a),Ig(e,a))));break;case 22:if(i=a.memoizedState!==null||oa,!i){t=t!==null&&t.memoizedState!==null||Ge,u=oa;var o=Ge;oa=i,(Ge=t)&&!o?ha(e,a,(a.subtreeFlags&8772)!==0):fa(e,a),oa=u,Ge=o}break;case 30:break;default:fa(e,a)}}function Ch(e){var t=e.alternate;t!==null&&(e.alternate=null,Ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var De=null,ft=!1;function ca(e,t,a){for(a=a.child;a!==null;)jh(e,t,a),a=a.sibling}function jh(e,t,a){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(yi,a)}catch{}switch(a.tag){case 26:Ge||Zt(a,t),ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ge||Zt(a,t);var i=De,u=ft;La(a.type)&&(De=a.stateNode,ft=!1),ca(e,t,a),el(a.stateNode),De=i,ft=u;break;case 5:Ge||Zt(a,t);case 6:if(i=De,u=ft,De=null,ca(e,t,a),De=i,ft=u,De!==null)if(ft)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(a.stateNode)}catch(o){_e(a,t,o)}else try{De.removeChild(a.stateNode)}catch(o){_e(a,t,o)}break;case 18:De!==null&&(ft?(e=De,Sd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ti(e)):Sd(De,a.stateNode));break;case 4:i=De,u=ft,De=a.stateNode.containerInfo,ft=!0,ca(e,t,a),De=i,ft=u;break;case 0:case 11:case 14:case 15:ja(2,a,t),Ge||ja(4,a,t),ca(e,t,a);break;case 1:Ge||(Zt(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Eh(a,t,i)),ca(e,t,a);break;case 21:ca(e,t,a);break;case 22:Ge=(i=Ge)||a.memoizedState!==null,ca(e,t,a),Ge=i;break;default:ca(e,t,a)}}function Uh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ti(e)}catch(a){_e(t,t.return,a)}}}function Dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ti(e)}catch(a){_e(t,t.return,a)}}function Sg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rh),t;default:throw Error(r(435,e.tag))}}function hs(e,t){var a=Sg(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var u=Ug.bind(null,e,i);i.then(u,u)}})}function ht(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var u=a[i],o=e,h=t,y=h;e:for(;y!==null;){switch(y.tag){case 27:if(La(y.type)){De=y.stateNode,ft=!1;break e}break;case 5:De=y.stateNode,ft=!1;break e;case 3:case 4:De=y.stateNode.containerInfo,ft=!0;break e}y=y.return}if(De===null)throw Error(r(160));jh(o,h,u),De=null,ft=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nh(t,e),t=t.sibling}var Gt=null;function Nh(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ht(t,e),dt(e),i&4&&(ja(3,e,e.return),Yi(3,e),ja(5,e,e.return));break;case 1:ht(t,e),dt(e),i&512&&(Ge||a===null||Zt(a,a.return)),i&64&&oa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var u=Gt;if(ht(t,e),dt(e),i&512&&(Ge||a===null||Zt(a,a.return)),i&4){var o=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":o=u.getElementsByTagName("title")[0],(!o||o[pi]||o[Ie]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=u.createElement(i),u.head.insertBefore(o,u.querySelector("head > title"))),et(o,i,a),o[Ie]=e,Je(o),i=o;break e;case"link":var h=Nd("link","href",u).get(i+(a.href||""));if(h){for(var y=0;y<h.length;y++)if(o=h[y],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(y,1);break t}}o=u.createElement(i),et(o,i,a),u.head.appendChild(o);break;case"meta":if(h=Nd("meta","content",u).get(i+(a.content||""))){for(y=0;y<h.length;y++)if(o=h[y],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(y,1);break t}}o=u.createElement(i),et(o,i,a),u.head.appendChild(o);break;default:throw Error(r(468,i))}o[Ie]=e,Je(o),i=o}e.stateNode=i}else zd(u,e.type,e.stateNode);else e.stateNode=Dd(u,i,e.memoizedProps);else o!==i?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,i===null?zd(u,e.type,e.stateNode):Dd(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Du(e,e.memoizedProps,a.memoizedProps)}break;case 27:ht(t,e),dt(e),i&512&&(Ge||a===null||Zt(a,a.return)),a!==null&&i&4&&Du(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ht(t,e),dt(e),i&512&&(Ge||a===null||Zt(a,a.return)),e.flags&32){u=e.stateNode;try{Tn(u,"")}catch(K){_e(e,e.return,K)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,Du(e,u,a!==null?a.memoizedProps:u)),i&1024&&(ku=!0);break;case 6:if(ht(t,e),dt(e),i&4){if(e.stateNode===null)throw Error(r(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(K){_e(e,e.return,K)}}break;case 3:if(xs=null,u=Gt,Gt=Os(t.containerInfo),ht(t,e),Gt=u,dt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{ti(t.containerInfo)}catch(K){_e(e,e.return,K)}ku&&(ku=!1,zh(e));break;case 4:i=Gt,Gt=Os(e.stateNode.containerInfo),ht(t,e),dt(e),Gt=i;break;case 12:ht(t,e),dt(e);break;case 31:ht(t,e),dt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hs(e,i)));break;case 13:ht(t,e),dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ms=gt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hs(e,i)));break;case 22:u=e.memoizedState!==null;var p=a!==null&&a.memoizedState!==null,R=oa,j=Ge;if(oa=R||u,Ge=j||p,ht(t,e),Ge=j,oa=R,dt(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||p||oa||Ge||on(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){p=a=t;try{if(o=p.stateNode,u)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{y=p.stateNode;var k=p.memoizedProps.style,x=k!=null&&k.hasOwnProperty("display")?k.display:null;y.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(K){_e(p,p.return,K)}}}else if(t.tag===6){if(a===null){p=t;try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(K){_e(p,p.return,K)}}}else if(t.tag===18){if(a===null){p=t;try{var C=p.stateNode;u?Ed(C,!0):Ed(p.stateNode,!1)}catch(K){_e(p,p.return,K)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,hs(e,a))));break;case 19:ht(t,e),dt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hs(e,i)));break;case 30:break;case 21:break;default:ht(t,e),dt(e)}}function dt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Ah(i)){a=i;break}i=i.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,o=Nu(e);fs(e,o,u);break;case 5:var h=a.stateNode;a.flags&32&&(Tn(h,""),a.flags&=-33);var y=Nu(e);fs(e,y,h);break;case 3:case 4:var p=a.stateNode.containerInfo,R=Nu(e);zu(e,R,p);break;default:throw Error(r(161))}}catch(j){_e(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xh(e,t.alternate,t),t=t.sibling}function on(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ja(4,t,t.return),on(t);break;case 1:Zt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Eh(t,t.return,a),on(t);break;case 27:el(t.stateNode);case 26:case 5:Zt(t,t.return),on(t);break;case 22:t.memoizedState===null&&on(t);break;case 30:on(t);break;default:on(t)}e=e.sibling}}function ha(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:ha(u,o,a),Yi(4,o);break;case 1:if(ha(u,o,a),i=o,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(R){_e(i,i.return,R)}if(i=o,u=i.updateQueue,u!==null){var y=i.stateNode;try{var p=u.shared.hiddenCallbacks;if(p!==null)for(u.shared.hiddenCallbacks=null,u=0;u<p.length;u++)ff(p[u],y)}catch(R){_e(i,i.return,R)}}a&&h&64&&Sh(o),Ki(o,o.return);break;case 27:Oh(o);case 26:case 5:ha(u,o,a),a&&i===null&&h&4&&Th(o),Ki(o,o.return);break;case 12:ha(u,o,a);break;case 31:ha(u,o,a),a&&h&4&&Uh(u,o);break;case 13:ha(u,o,a),a&&h&4&&Dh(u,o);break;case 22:o.memoizedState===null&&ha(u,o,a),Ki(o,o.return);break;case 30:break;default:ha(u,o,a)}t=t.sibling}}function Mu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ui(a))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ui(e))}function Vt(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kh(e,t,a,i),t=t.sibling}function kh(e,t,a,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Vt(e,t,a,i),u&2048&&Yi(9,t);break;case 1:Vt(e,t,a,i);break;case 3:Vt(e,t,a,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ui(e)));break;case 12:if(u&2048){Vt(e,t,a,i),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,y=o.onPostCommit;typeof y=="function"&&y(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(p){_e(t,t.return,p)}}else Vt(e,t,a,i);break;case 31:Vt(e,t,a,i);break;case 13:Vt(e,t,a,i);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Vt(e,t,a,i):Qi(e,t):o._visibility&2?Vt(e,t,a,i):(o._visibility|=2,Yn(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Mu(h,t);break;case 24:Vt(e,t,a,i),u&2048&&Lu(t.alternate,t);break;default:Vt(e,t,a,i)}}function Yn(e,t,a,i,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,y=a,p=i,R=h.flags;switch(h.tag){case 0:case 11:case 15:Yn(o,h,y,p,u),Yi(8,h);break;case 23:break;case 22:var j=h.stateNode;h.memoizedState!==null?j._visibility&2?Yn(o,h,y,p,u):Qi(o,h):(j._visibility|=2,Yn(o,h,y,p,u)),u&&R&2048&&Mu(h.alternate,h);break;case 24:Yn(o,h,y,p,u),u&&R&2048&&Lu(h.alternate,h);break;default:Yn(o,h,y,p,u)}t=t.sibling}}function Qi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,u=i.flags;switch(i.tag){case 22:Qi(a,i),u&2048&&Mu(i.alternate,i);break;case 24:Qi(a,i),u&2048&&Lu(i.alternate,i);break;default:Qi(a,i)}t=t.sibling}}var Xi=8192;function Kn(e,t,a){if(e.subtreeFlags&Xi)for(e=e.child;e!==null;)Mh(e,t,a),e=e.sibling}function Mh(e,t,a){switch(e.tag){case 26:Kn(e,t,a),e.flags&Xi&&e.memoizedState!==null&&uv(a,Gt,e.memoizedState,e.memoizedProps);break;case 5:Kn(e,t,a);break;case 3:case 4:var i=Gt;Gt=Os(e.stateNode.containerInfo),Kn(e,t,a),Gt=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Xi,Xi=16777216,Kn(e,t,a),Xi=i):Kn(e,t,a));break;default:Kn(e,t,a)}}function Lh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ze=i,qh(i,e)}Lh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bh(e),e=e.sibling}function Bh(e){switch(e.tag){case 0:case 11:case 15:Ji(e),e.flags&2048&&ja(9,e,e.return);break;case 3:Ji(e);break;case 12:Ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ds(e)):Ji(e);break;default:Ji(e)}}function ds(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ze=i,qh(i,e)}Lh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ja(8,t,t.return),ds(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ds(t));break;default:ds(t)}e=e.sibling}}function qh(e,t){for(;Ze!==null;){var a=Ze;switch(a.tag){case 0:case 11:case 15:ja(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ui(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,Ze=i;else e:for(a=e;Ze!==null;){i=Ze;var u=i.sibling,o=i.return;if(Ch(i),i===a){Ze=null;break e}
vendor: 18,726 bytes, line 49
49if(u!==null){u.return=o,Ze=u;break e}Ze=o}}}var Eg={getCacheForType:function(e){var t=We(qe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return We(qe).controller.signal}},Tg=typeof WeakMap=="function"?WeakMap:Map,ve=0,Oe=null,ue=null,ce=0,be=0,Et=null,Ua=!1,Qn=!1,Bu=!1,da=0,ze=0,Da=0,cn=0,qu=0,Tt=0,Xn=0,Zi=null,mt=null,Hu=!1,ms=0,Hh=0,ys=1/0,gs=null,Na=null,Ke=0,za=null,Jn=null,ma=0,$u=0,Gu=null,$h=null,Ii=0,Vu=null;function At(){return(ve&2)!==0&&ce!==0?ce&-ce:D.T!==null?Zu():ac()}function Gh(){if(Tt===0)if((ce&536870912)===0||he){var e=Tl;Tl<<=1,(Tl&3932160)===0&&(Tl=262144),Tt=e}else Tt=536870912;return e=wt.current,e!==null&&(e.flags|=32),Tt}function yt(e,t,a){(e===Oe&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(Zn(e,0),ka(e,ce,Tt,!1)),vi(e,a),((ve&2)===0||e!==Oe)&&(e===Oe&&((ve&2)===0&&(cn|=a),ze===4&&ka(e,ce,Tt,!1)),It(e))}function Vh(e,t,a){if((ve&6)!==0)throw Error(r(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||gi(e,t),u=i?Rg(e,t):Ku(e,t,!0),o=i;do{if(u===0){Qn&&!i&&ka(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!Ag(a)){u=Ku(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var y=e;u=Zi;var p=y.current.memoizedState.isDehydrated;if(p&&(Zn(y,h).flags|=256),h=Ku(y,h,!1),h!==2){if(Bu&&!p){y.errorRecoveryDisabledLanes|=o,cn|=o,u=4;break e}o=mt,mt=u,o!==null&&(mt===null?mt=o:mt.push.apply(mt,o))}u=h}if(o=!1,u!==2)continue}}if(u===1){Zn(e,0),ka(e,t,0,!0);break}e:{switch(i=e,o=u,o){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ka(i,t,Tt,!Ua);break e;case 2:mt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=ms+300-gt(),10<u)){if(ka(i,t,Tt,!Ua),Ol(i,0,!0)!==0)break e;ma=t,i.timeoutHandle=_d(Yh.bind(null,i,a,mt,gs,Hu,t,Tt,cn,Xn,Ua,o,"Throttled",-0,0),u);break e}Yh(i,a,mt,gs,Hu,t,Tt,cn,Xn,Ua,o,null,-0,0)}}break}while(!0);It(e)}function Yh(e,t,a,i,u,o,h,y,p,R,j,k,x,C){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ft},Mh(t,o,k);var K=(o&62914560)===o?ms-gt():(o&4194048)===o?Hh-gt():0;if(K=ov(k,K),K!==null){ma=o,e.cancelPendingCommit=K(Wh.bind(null,e,t,o,a,i,u,h,y,p,j,k,null,x,C)),ka(e,o,h,!R);return}}Wh(e,t,o,a,i,u,h,y,p)}function Ag(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var u=a[i],o=u.getSnapshot;u=u.value;try{if(!bt(o(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ka(e,t,a,i){t&=~qu,t&=~cn,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var o=31-pt(u),h=1<<o;i[o]=-1,u&=~h}a!==0&&Fo(e,a,t)}function vs(){return(ve&6)===0?(Pi(0),!1):!0}function Yu(){if(ue!==null){if(be===0)var e=ue.return;else e=ue,na=en=null,su(e),qn=null,Ni=0,e=ue;for(;e!==null;)wh(e.alternate,e),e=e.return;ue=null}}function Zn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Kg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ma=0,Yu(),Oe=e,ue=a=ta(e.current,null),ce=t,be=0,Et=null,Ua=!1,Qn=gi(e,t),Bu=!1,Xn=Tt=qu=cn=Da=ze=0,mt=Zi=null,Hu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-pt(i),o=1<<u;t|=e[u],i&=~o}return da=t,Bl(),a}function Kh(e,t){le=null,D.H=$i,t===Bn||t===Ql?(t=rf(),be=3):t===Jr?(t=rf(),be=4):be=t===Su?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Et=t,ue===null&&(ze=1,ss(e,Nt(t,e.current)))}function Qh(){var e=wt.current;return e===null?!0:(ce&4194048)===ce?Lt===null:(ce&62914560)===ce||(ce&536870912)!==0?e===Lt:!1}function Xh(){var e=D.H;return D.H=$i,e===null?$i:e}function Jh(){var e=D.A;return D.A=Eg,e}function ps(){ze=4,Ua||(ce&4194048)!==ce&&wt.current!==null||(Qn=!0),(Da&134217727)===0&&(cn&134217727)===0||Oe===null||ka(Oe,ce,Tt,!1)}function Ku(e,t,a){var i=ve;ve|=2;var u=Xh(),o=Jh();(Oe!==e||ce!==t)&&(gs=null,Zn(e,t)),t=!1;var h=ze;e:do try{if(be!==0&&ue!==null){var y=ue,p=Et;switch(be){case 8:Yu(),h=6;break e;case 3:case 2:case 9:case 6:wt.current===null&&(t=!0);var R=be;if(be=0,Et=null,In(e,y,p,R),a&&Qn){h=0;break e}break;default:R=be,be=0,Et=null,In(e,y,p,R)}}Og(),h=ze;break}catch(j){Kh(e,j)}while(!0);return t&&e.shellSuspendCounter++,na=en=null,ve=i,D.H=u,D.A=o,ue===null&&(Oe=null,ce=0,Bl()),h}function Og(){for(;ue!==null;)Zh(ue)}function Rg(e,t){var a=ve;ve|=2;var i=Xh(),u=Jh();Oe!==e||ce!==t?(gs=null,ys=gt()+500,Zn(e,t)):Qn=gi(e,t);e:do try{if(be!==0&&ue!==null){t=ue;var o=Et;t:switch(be){case 1:be=0,Et=null,In(e,t,o,1);break;case 2:case 9:if(lf(o)){be=0,Et=null,Ih(t);break}t=function(){be!==2&&be!==9||Oe!==e||(be=7),It(e)},o.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:lf(o)?(be=0,Et=null,Ih(t)):(be=0,Et=null,In(e,t,o,7));break;case 5:var h=null;switch(ue.tag){case 26:h=ue.memoizedState;case 5:case 27:var y=ue;if(h?kd(h):y.stateNode.complete){be=0,Et=null;var p=y.sibling;if(p!==null)ue=p;else{var R=y.return;R!==null?(ue=R,bs(R)):ue=null}break t}}be=0,Et=null,In(e,t,o,5);break;case 6:be=0,Et=null,In(e,t,o,6);break;case 8:Yu(),ze=6;break e;default:throw Error(r(462))}}xg();break}catch(j){Kh(e,j)}while(!0);return na=en=null,D.H=i,D.A=u,ve=a,ue!==null?0:(Oe=null,ce=0,Bl(),ze)}function xg(){for(;ue!==null&&!Pm();)Zh(ue)}function Zh(e){var t=bh(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?bs(e):ue=t}function Ih(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dh(a,t,t.pendingProps,t.type,void 0,ce);break;case 11:t=dh(a,t,t.pendingProps,t.type.render,t.ref,ce);break;case 5:su(t);default:wh(a,t),t=ue=Xc(t,da),t=bh(a,t,da)}e.memoizedProps=e.pendingProps,t===null?bs(e):ue=t}function In(e,t,a,i){na=en=null,su(t),qn=null,Ni=0;var u=t.return;try{if(gg(e,u,t,a,ce)){ze=1,ss(e,Nt(a,e.current)),ue=null;return}}catch(o){if(u!==null)throw ue=u,o;ze=1,ss(e,Nt(a,e.current)),ue=null;return}t.flags&32768?(he||i===1?e=!0:Qn||(ce&536870912)!==0?e=!1:(Ua=e=!0,(i===2||i===9||i===3||i===6)&&(i=wt.current,i!==null&&i.tag===13&&(i.flags|=16384))),Ph(t,e)):bs(t)}function bs(e){var t=e;do{if((t.flags&32768)!==0){Ph(t,Ua);return}e=t.return;var a=bg(t.alternate,t,da);if(a!==null){ue=a;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);ze===0&&(ze=5)}function Ph(e,t){do{var a=_g(e.alternate,e);if(a!==null){a.flags&=32767,ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=a}while(e!==null);ze=6,ue=null}function Wh(e,t,a,i,u,o,h,y,p){e.cancelPendingCommit=null;do _s();while(Ke!==0);if((ve&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(o=t.lanes|t.childLanes,o|=Nr,ry(e,a,o,h,y,p),e===Oe&&(ue=Oe=null,ce=0),Jn=t,za=e,ma=a,$u=o,Gu=u,$h=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dg(Sl,function(){return nd(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=D.T,D.T=null,u=G.p,G.p=2,h=ve,ve|=4;try{wg(e,t,a)}finally{ve=h,G.p=u,D.T=i}}Ke=1,Fh(),ed(),td()}}function Fh(){if(Ke===1){Ke=0;var e=za,t=Jn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var i=G.p;G.p=2;var u=ve;ve|=4;try{Nh(t,e);var o=no,h=Bc(e.containerInfo),y=o.focusedElem,p=o.selectionRange;if(h!==y&&y&&y.ownerDocument&&Lc(y.ownerDocument.documentElement,y)){if(p!==null&&xr(y)){var R=p.start,j=p.end;if(j===void 0&&(j=R),"selectionStart"in y)y.selectionStart=R,y.selectionEnd=Math.min(j,y.value.length);else{var k=y.ownerDocument||document,x=k&&k.defaultView||window;if(x.getSelection){var C=x.getSelection(),K=y.textContent.length,W=Math.min(p.start,K),Te=p.end===void 0?W:Math.min(p.end,K);!C.extend&&W>Te&&(h=Te,Te=W,W=h);var E=Mc(y,W),_=Mc(y,Te);if(E&&_&&(C.rangeCount!==1||C.anchorNode!==E.node||C.anchorOffset!==E.offset||C.focusNode!==_.node||C.focusOffset!==_.offset)){var O=k.createRange();O.setStart(E.node,E.offset),C.removeAllRanges(),W>Te?(C.addRange(O),C.extend(_.node,_.offset)):(O.setEnd(_.node,_.offset),C.addRange(O))}}}}for(k=[],C=y;C=C.parentNode;)C.nodeType===1&&k.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<k.length;y++){var N=k[y];N.element.scrollLeft=N.left,N.element.scrollTop=N.top}}Ds=!!ao,no=ao=null}finally{ve=u,G.p=i,D.T=a}}e.current=t,Ke=2}}function ed(){if(Ke===2){Ke=0;var e=za,t=Jn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var i=G.p;G.p=2;var u=ve;ve|=4;try{xh(e,t.alternate,t)}finally{ve=u,G.p=i,D.T=a}}Ke=3}}function td(){if(Ke===4||Ke===3){Ke=0,Wm();var e=za,t=Jn,a=ma,i=$h;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ke=5:(Ke=0,Jn=za=null,ad(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Na=null),or(a),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(yi,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=D.T,u=G.p,G.p=2,D.T=null;try{for(var o=e.onRecoverableError,h=0;h<i.length;h++){var y=i[h];o(y.value,{componentStack:y.stack})}}finally{D.T=t,G.p=u}}(ma&3)!==0&&_s(),It(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Vu?Ii++:(Ii=0,Vu=e):Ii=0,Pi(0)}}function ad(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ui(t)))}function _s(){return Fh(),ed(),td(),nd()}function nd(){if(Ke!==5)return!1;var e=za,t=$u;$u=0;var a=or(ma),i=D.T,u=G.p;try{G.p=32>a?32:a,D.T=null,a=Gu,Gu=null;var o=za,h=ma;if(Ke=0,Jn=za=null,ma=0,(ve&6)!==0)throw Error(r(331));var y=ve;if(ve|=4,Bh(o.current),kh(o,o.current,h,a),ve=y,Pi(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(yi,o)}catch{}return!0}finally{G.p=u,D.T=i,ad(e,t)}}function id(e,t,a){t=Nt(a,t),t=wu(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(vi(e,2),It(e))}function _e(e,t,a){if(e.tag===3)id(e,e,a);else for(;t!==null;){if(t.tag===3){id(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Na===null||!Na.has(i))){e=Nt(a,e),a=lh(2),i=Ra(t,a,2),i!==null&&(sh(a,i,t,e),vi(i,2),It(i));break}}t=t.return}}function Qu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Tg;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(a)||(Bu=!0,u.add(a),e=Cg.bind(null,e,t,a),t.then(e,e))}function Cg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Oe===e&&(ce&a)===a&&(ze===4||ze===3&&(ce&62914560)===ce&&300>gt()-ms?(ve&2)===0&&Zn(e,0):qu|=a,Xn===ce&&(Xn=0)),It(e)}function ld(e,t){t===0&&(t=Wo()),e=Pa(e,t),e!==null&&(vi(e,t),It(e))}function jg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ld(e,a)}function Ug(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(t),ld(e,a)}function Dg(e,t){return lr(e,t)}var ws=null,Pn=null,Xu=!1,Ss=!1,Ju=!1,Ma=0;function It(e){e!==Pn&&e.next===null&&(Pn===null?ws=Pn=e:Pn=Pn.next=e),Ss=!0,Xu||(Xu=!0,zg())}function Pi(e,t){if(!Ju&&Ss){Ju=!0;do for(var a=!1,i=ws;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var o=0;else{var h=i.suspendedLanes,y=i.pingedLanes;o=(1<<31-pt(42|e)+1)-1,o&=u&~(h&~y),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,od(i,o))}else o=ce,o=Ol(i,i===Oe?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||gi(i,o)||(a=!0,od(i,o));i=i.next}while(a);Ju=!1}}function Ng(){sd()}function sd(){Ss=Xu=!1;var e=0;Ma!==0&&Yg()&&(e=Ma);for(var t=gt(),a=null,i=ws;i!==null;){var u=i.next,o=rd(i,t);o===0?(i.next=null,a===null?ws=u:a.next=u,u===null&&(Pn=a)):(a=i,(e!==0||(o&3)!==0)&&(Ss=!0)),i=u}Ke!==0&&Ke!==5||Pi(e),Ma!==0&&(Ma=0)}function rd(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-pt(o),y=1<<h,p=u[h];p===-1?((y&a)===0||(y&i)!==0)&&(u[h]=sy(y,t)):p<=t&&(e.expiredLanes|=y),o&=~y}if(t=Oe,a=ce,a=Ol(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&sr(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||gi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&sr(i),or(a)){case 2:case 8:a=Io;break;case 32:a=Sl;break;case 268435456:a=Po;break;default:a=Sl}return i=ud.bind(null,e),a=lr(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&sr(i),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(Ke!==0&&Ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_s()&&e.callbackNode!==a)return null;var i=ce;return i=Ol(e,e===Oe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Vh(e,i,t),rd(e,gt()),e.callbackNode!=null&&e.callbackNode===a?ud.bind(null,e):null)}function od(e,t){if(_s())return null;Vh(e,t,!0)}function zg(){Qg(function(){(ve&6)!==0?lr(Zo,Ng):sd()})}function Zu(){if(Ma===0){var e=Mn;e===0&&(e=El,El<<=1,(El&261888)===0&&(El=256)),Ma=e}return Ma}function cd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:jl(""+e)}function fd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function kg(e,t,a,i,u){if(t==="submit"&&a&&a.stateNode===u){var o=cd((u[ot]||null).action),h=i.submitter;h&&(t=(t=h[ot]||null)?cd(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var y=new zl("action","action",null,i,u);e.push({event:y,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ma!==0){var p=h?fd(u,h):new FormData(u);yu(a,{pending:!0,data:p,method:u.method,action:o},null,p)}}else typeof o=="function"&&(y.preventDefault(),p=h?fd(u,h):new FormData(u),yu(a,{pending:!0,data:p,method:u.method,action:o},o,p))},currentTarget:u}]})}}for(var Iu=0;Iu<Dr.length;Iu++){var Pu=Dr[Iu],Mg=Pu.toLowerCase(),Lg=Pu[0].toUpperCase()+Pu.slice(1);$t(Mg,"on"+Lg)}$t($c,"onAnimationEnd"),$t(Gc,"onAnimationIteration"),$t(Vc,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(Fy,"onTransitionRun"),$t(eg,"onTransitionStart"),$t(tg,"onTransitionCancel"),$t(Yc,"onTransitionEnd"),Sn("onMouseEnter",["mouseout","mouseover"]),Sn("onMouseLeave",["mouseout","mouseover"]),Sn("onPointerEnter",["pointerout","pointerover"]),Sn("onPointerLeave",["pointerout","pointerover"]),Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="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(" "),Bg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wi));function hd(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],u=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var h=i.length-1;0<=h;h--){var y=i[h],p=y.instance,R=y.currentTarget;if(y=y.listener,p!==o&&u.isPropagationStopped())break e;o=y,u.currentTarget=R;try{o(u)}catch(j){Ll(j)}u.currentTarget=null,o=p}else for(h=0;h<i.length;h++){if(y=i[h],p=y.instance,R=y.currentTarget,y=y.listener,p!==o&&u.isPropagationStopped())break e;o=y,u.currentTarget=R;try{o(u)}catch(j){Ll(j)}u.currentTarget=null,o=p}}}}function oe(e,t){var a=t[cr];a===void 0&&(a=t[cr]=new Set);var i=e+"__bubble";a.has(i)||(dd(t,e,2,!1),a.add(i))}function Wu(e,t,a){var i=0;t&&(i|=4),dd(a,e,i,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function Fu(e){if(!e[Es]){e[Es]=!0,lc.forEach(function(a){a!=="selectionchange"&&(Bg.has(a)||Wu(a,!1,e),Wu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,Wu("selectionchange",!1,t))}}function dd(e,t,a,i){switch(Gd(t)){case 2:var u=hv;break;case 8:u=dv;break;default:u=yo}a=u.bind(null,t,a,e),u=void 0,!br||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function eo(e,t,a,i,u){var o=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var h=i.tag;if(h===3||h===4){var y=i.stateNode.containerInfo;if(y===u)break;if(h===4)for(h=i.return;h!==null;){var p=h.tag;if((p===3||p===4)&&h.stateNode.containerInfo===u)return;h=h.return}for(;y!==null;){if(h=bn(y),h===null)return;if(p=h.tag,p===5||p===6||p===26||p===27){i=o=h;continue e}y=y.parentNode}}i=i.return}vc(function(){var R=o,j=vr(a),k=[];e:{var x=Kc.get(e);if(x!==void 0){var C=zl,K=e;switch(e){case"keypress":if(Dl(a)===0)break e;case"keydown":case"keyup":C=Uy;break;case"focusin":K="focus",C=Er;break;case"focusout":K="blur",C=Er;break;case"beforeblur":case"afterblur":C=Er;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=_c;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=by;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=zy;break;case $c:case Gc:case Vc:C=Sy;break;case Yc:C=My;break;case"scroll":case"scrollend":C=vy;break;case"wheel":C=By;break;case"copy":case"cut":case"paste":C=Ty;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Sc;break;case"toggle":case"beforetoggle":C=Hy}var W=(t&4)!==0,Te=!W&&(e==="scroll"||e==="scrollend"),E=W?x!==null?x+"Capture":null:x;W=[];for(var _=R,O;_!==null;){var N=_;if(O=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||O===null||E===null||(N=_i(_,E),N!=null&&W.pu
vendor: 1,097 bytes, line 49
49sh(Fi(_,N,O))),Te)break;_=_.return}0<W.length&&(x=new C(x,K,null,a,j),k.push({event:x,listeners:W}))}}if((t&7)===0){e:{if(x=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",x&&a!==gr&&(K=a.relatedTarget||a.fromElement)&&(bn(K)||K[pn]))break e;if((C||x)&&(x=j.window===j?j:(x=j.ownerDocument)?x.defaultView||x.parentWindow:window,C?(K=a.relatedTarget||a.toElement,C=R,K=K?bn(K):null,K!==null&&(Te=f(K),W=K.tag,K!==Te||W!==5&&W!==27&&W!==6)&&(K=null)):(C=null,K=R),C!==K)){if(W=_c,N="onMouseLeave",E="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(W=Sc,N="onPointerLeave",E="onPointerEnter",_="pointer"),Te=C==null?x:bi(C),O=K==null?x:bi(K),x=new W(N,_+"leave",C,a,j),x.target=Te,x.relatedTarget=O,N=null,bn(j)===R&&(W=new W(E,_+"enter",K,a,j),W.target=O,W.relatedTarget=Te,N=W),Te=N,C&&K)t:{for(W=qg,E=C,_=K,O=0,N=E;N;N=W(N))O++;N=0;for(var P=_;P;P=W(P))N++;for(;0<O-N;)E=W(E),O--;for(;0<N-O;)_=W(_),N--;for(;O--;){if(E===_||_!==null&&E===_.alternate){W=E;break t}E=W(E),_=W(_)}W=null}else W=null;C!==null&&md(k,x,C,W,!1),K!==null&&Te!==null&&md(k,Te,K,W,!0)}}
vendor: 16,085 bytes, lines 49-50
49e:{if(x=R?bi(R):window,C=x.nodeName&&x.nodeName.toLowerCase(),C==="select"||C==="input"&&x.type==="file")var me=jc;else if(xc(x))if(Uc)me=Iy;else{me=Jy;var J=Xy}else C=x.nodeName,!C||C.toLowerCase()!=="input"||x.type!=="checkbox"&&x.type!=="radio"?R&&yr(R.elementType)&&(me=jc):me=Zy;if(me&&(me=me(e,R))){Cc(k,me,a,j);break e}J&&J(e,x,R),e==="focusout"&&R&&x.type==="number"&&R.memoizedProps.value!=null&&mr(x,"number",x.value)}switch(J=R?bi(R):window,e){case"focusin":(xc(J)||J.contentEditable==="true")&&(xn=J,Cr=R,xi=null);break;case"focusout":xi=Cr=xn=null;break;case"mousedown":jr=!0;break;case"contextmenu":case"mouseup":case"dragend":jr=!1,qc(k,a,j);break;case"selectionchange":if(Wy)break;case"keydown":case"keyup":qc(k,a,j)}var se;if(Ar)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else Rn?Oc(e,a)&&(fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(fe="onCompositionStart");fe&&(Ec&&a.locale!=="ko"&&(Rn||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&Rn&&(se=pc()):(_a=j,_r="value"in _a?_a.value:_a.textContent,Rn=!0)),J=Ts(R,fe),0<J.length&&(fe=new wc(fe,e,null,a,j),k.push({event:fe,listeners:J}),se?fe.data=se:(se=Rc(a),se!==null&&(fe.data=se)))),(se=Gy?Vy(e,a):Yy(e,a))&&(fe=Ts(R,"onBeforeInput"),0<fe.length&&(J=new wc("onBeforeInput","beforeinput",null,a,j),k.push({event:J,listeners:fe}),J.data=se)),kg(k,e,R,a,j)}hd(k,t)})}function Fi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ts(e,t){for(var a=t+"Capture",i=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=_i(e,a),u!=null&&i.unshift(Fi(e,u,o)),u=_i(e,t),u!=null&&i.push(Fi(e,u,o))),e.tag===3)return i;e=e.return}return[]}function qg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function md(e,t,a,i,u){for(var o=t._reactName,h=[];a!==null&&a!==i;){var y=a,p=y.alternate,R=y.stateNode;if(y=y.tag,p!==null&&p===i)break;y!==5&&y!==26&&y!==27||R===null||(p=R,u?(R=_i(a,o),R!=null&&h.unshift(Fi(a,R,p))):u||(R=_i(a,o),R!=null&&h.push(Fi(a,R,p)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Hg=/\r\n?/g,$g=/\u0000|\uFFFD/g;function yd(e){return(typeof e=="string"?e:""+e).replace(Hg,` 50`).replace($g,"")}function gd(e,t){return t=yd(t),yd(e)===t}function Ee(e,t,a,i,u,o){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Tn(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Tn(e,""+i);break;case"className":xl(e,"class",i);break;case"tabIndex":xl(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":xl(e,a,i);break;case"style":yc(e,i,o);break;case"data":if(t!=="object"){xl(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=jl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ee(e,t,"name",u.name,u,null),Ee(e,t,"formEncType",u.formEncType,u,null),Ee(e,t,"formMethod",u.formMethod,u,null),Ee(e,t,"formTarget",u.formTarget,u,null)):(Ee(e,t,"encType",u.encType,u,null),Ee(e,t,"method",u.method,u,null),Ee(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=jl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Ft);break;case"onScroll":i!=null&&oe("scroll",e);break;case"onScrollEnd":i!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=jl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":oe("beforetoggle",e),oe("toggle",e),Rl(e,"popover",i);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Rl(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=yy.get(a)||a,Rl(e,a,i))}}function to(e,t,a,i,u,o){switch(a){case"style":yc(e,i,o);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Tn(e,i):(typeof i=="number"||typeof i=="bigint")&&Tn(e,""+i);break;case"onScroll":i!=null&&oe("scroll",e);break;case"onScrollEnd":i!=null&&oe("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Ft);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),o=e[ot]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,u),typeof i=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,u);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Rl(e,a,i)}}}function et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var i=!1,u=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ee(e,t,o,h,a,null)}}u&&Ee(e,t,"srcSet",a.srcSet,a,null),i&&Ee(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var y=o=h=u=null,p=null,R=null;for(i in a)if(a.hasOwnProperty(i)){var j=a[i];if(j!=null)switch(i){case"name":u=j;break;case"type":h=j;break;case"checked":p=j;break;case"defaultChecked":R=j;break;case"value":o=j;break;case"defaultValue":y=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(137,t));break;default:Ee(e,t,i,j,a,null)}}fc(e,o,y,p,R,h,u,!1);return;case"select":oe("invalid",e),i=h=o=null;for(u in a)if(a.hasOwnProperty(u)&&(y=a[u],y!=null))switch(u){case"value":o=y;break;case"defaultValue":h=y;break;case"multiple":i=y;default:Ee(e,t,u,y,a,null)}t=o,a=h,e.multiple=!!i,t!=null?En(e,!!i,t,!1):a!=null&&En(e,!!i,a,!0);return;case"textarea":oe("invalid",e),o=u=i=null;for(h in a)if(a.hasOwnProperty(h)&&(y=a[h],y!=null))switch(h){case"value":i=y;break;case"defaultValue":u=y;break;case"children":o=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Ee(e,t,h,y,a,null)}dc(e,i,u,o);return;case"option":for(p in a)if(a.hasOwnProperty(p)&&(i=a[p],i!=null))switch(p){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ee(e,t,p,i,a,null)}return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(i=0;i<Wi.length;i++)oe(Wi[i],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in a)if(a.hasOwnProperty(R)&&(i=a[R],i!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ee(e,t,R,i,a,null)}return;default:if(yr(t)){for(j in a)a.hasOwnProperty(j)&&(i=a[j],i!==void 0&&to(e,t,j,i,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(i=a[y],i!=null&&Ee(e,t,y,i,a,null))}function Gg(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,o=null,h=null,y=null,p=null,R=null,j=null;for(C in a){var k=a[C];if(a.hasOwnProperty(C)&&k!=null)switch(C){case"checked":break;case"value":break;case"defaultValue":p=k;default:i.hasOwnProperty(C)||Ee(e,t,C,null,i,k)}}for(var x in i){var C=i[x];if(k=a[x],i.hasOwnProperty(x)&&(C!=null||k!=null))switch(x){case"type":o=C;break;case"name":u=C;break;case"checked":R=C;break;case"defaultChecked":j=C;break;case"value":h=C;break;case"defaultValue":y=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(137,t));break;default:C!==k&&Ee(e,t,x,C,i,k)}}dr(e,h,y,p,R,j,o,u);return;case"select":C=h=y=x=null;for(o in a)if(p=a[o],a.hasOwnProperty(o)&&p!=null)switch(o){case"value":break;case"multiple":C=p;default:i.hasOwnProperty(o)||Ee(e,t,o,null,i,p)}for(u in i)if(o=i[u],p=a[u],i.hasOwnProperty(u)&&(o!=null||p!=null))switch(u){case"value":x=o;break;case"defaultValue":y=o;break;case"multiple":h=o;default:o!==p&&Ee(e,t,u,o,i,p)}t=y,a=h,i=C,x!=null?En(e,!!a,x,!1):!!i!=!!a&&(t!=null?En(e,!!a,t,!0):En(e,!!a,a?[]:"",!1));return;case"textarea":C=x=null;for(y in a)if(u=a[y],a.hasOwnProperty(y)&&u!=null&&!i.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ee(e,t,y,null,i,u)}for(h in i)if(u=i[h],o=a[h],i.hasOwnProperty(h)&&(u!=null||o!=null))switch(h){case"value":x=u;break;case"defaultValue":C=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==o&&Ee(e,t,h,u,i,o)}hc(e,x,C);return;case"option":for(var K in a)if(x=a[K],a.hasOwnProperty(K)&&x!=null&&!i.hasOwnProperty(K))switch(K){case"selected":e.selected=!1;break;default:Ee(e,t,K,null,i,x)}for(p in i)if(x=i[p],C=a[p],i.hasOwnProperty(p)&&x!==C&&(x!=null||C!=null))switch(p){case"selected":e.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:Ee(e,t,p,x,i,C)}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 W in a)x=a[W],a.hasOwnProperty(W)&&x!=null&&!i.hasOwnProperty(W)&&Ee(e,t,W,null,i,x);for(R in i)if(x=i[R],C=a[R],i.hasOwnProperty(R)&&x!==C&&(x!=null||C!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(137,t));break;default:Ee(e,t,R,x,i,C)}return;default:if(yr(t)){for(var Te in a)x=a[Te],a.hasOwnProperty(Te)&&x!==void 0&&!i.hasOwnProperty(Te)&&to(e,t,Te,void 0,i,x);for(j in i)x=i[j],C=a[j],!i.hasOwnProperty(j)||x===C||x===void 0&&C===void 0||to(e,t,j,x,i,C);return}}for(var E in a)x=a[E],a.hasOwnProperty(E)&&x!=null&&!i.hasOwnProperty(E)&&Ee(e,t,E,null,i,x);for(k in i)x=i[k],C=a[k],!i.hasOwnProperty(k)||x===C||x==null&&C==null||Ee(e,t,k,x,i,C)}function vd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var u=a[i],o=u.transferSize,h=u.initiatorType,y=u.duration;if(o&&y&&vd(h)){for(h=0,y=u.responseEnd,i+=1;i<a.length;i++){var p=a[i],R=p.startTime;if(R>y)break;var j=p.transferSize,k=p.initiatorType;j&&vd(k)&&(p=p.responseEnd,h+=j*(p<y?1:(y-R)/(p-R)))}if(--i,t+=8*(o+h)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ao=null,no=null;function As(e){return e.nodeType===9?e:e.ownerDocument}function pd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function io(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lo=null;function Yg(){var e=window.event;return e&&e.type==="popstate"?e===lo?!1:(lo=e,!0):(lo=null,!1)}var _d=typeof setTimeout=="function"?setTimeout:void 0,Kg=typeof clearTimeout=="function"?clearTimeout:void 0,wd=typeof Promise=="function"?Promise:void 0,Qg=typeof queueMicrotask=="function"?queueMicrotask:typeof wd<"u"?function(e){return wd.resolve(null).then(e).catch(Xg)}:_d;function Xg(e){setTimeout(function(){throw e})}function La(e){return e==="head"}function Sd(e,t){var a=t,i=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(u),ti(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")el(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,el(a);for(var o=a.firstChild;o;){var h=o.nextSibling,y=o.nodeName;o[pi]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&el(e.ownerDocument.body);a=u}while(a);ti(t)}function Ed(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function so(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":so(a),fr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Jg(e,t,a,i){for(;
vendor: 14,836 bytes, line 50
50e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[pi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Bt(e.nextSibling),e===null)break}return null}function Zg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Bt(e.nextSibling),e===null))return null;return e}function Td(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bt(e.nextSibling),e===null))return null;return e}function ro(e){return e.data==="$?"||e.data==="$~"}function uo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ig(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Bt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var oo=null;function Ad(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Bt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Od(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Rd(e,t,a){switch(t=As(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function el(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fr(e)}var qt=new Map,xd=new Set;function Os(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=G.d;G.d={f:Pg,r:Wg,D:Fg,C:ev,L:tv,m:av,X:iv,S:nv,M:lv};function Pg(){var e=ya.f(),t=vs();return e||t}function Wg(e){var t=_n(e);t!==null&&t.tag===5&&t.type==="form"?Kf(t):ya.r(e)}var Wn=typeof document>"u"?null:document;function Cd(e,t,a){var i=Wn;if(i&&typeof t=="string"&&t){var u=Ut(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),xd.has(u)||(xd.add(u),e={rel:e,crossOrigin:a,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),et(t,"link",e),Je(t),i.head.appendChild(t)))}}function Fg(e){ya.D(e),Cd("dns-prefetch",e,null)}function ev(e,t){ya.C(e,t),Cd("preconnect",e,t)}function tv(e,t,a){ya.L(e,t,a);var i=Wn;if(i&&e&&t){var u='link[rel="preload"][as="'+Ut(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Ut(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Ut(a.imageSizes)+'"]')):u+='[href="'+Ut(e)+'"]';var o=u;switch(t){case"style":o=Fn(e);break;case"script":o=ei(e)}qt.has(o)||(e=S({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),qt.set(o,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(tl(o))||t==="script"&&i.querySelector(al(o))||(t=i.createElement("link"),et(t,"link",e),Je(t),i.head.appendChild(t)))}}function av(e,t){ya.m(e,t);var a=Wn;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Ut(i)+'"][href="'+Ut(e)+'"]',o=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ei(e)}if(!qt.has(o)&&(e=S({rel:"modulepreload",href:e},t),qt.set(o,e),a.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(al(o)))return}i=a.createElement("link"),et(i,"link",e),Je(i),a.head.appendChild(i)}}}function nv(e,t,a){ya.S(e,t,a);var i=Wn;if(i&&e){var u=wn(i).hoistableStyles,o=Fn(e);t=t||"default";var h=u.get(o);if(!h){var y={loading:0,preload:null};if(h=i.querySelector(tl(o)))y.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},a),(a=qt.get(o))&&co(e,a);var p=h=i.createElement("link");Je(p),et(p,"link",e),p._p=new Promise(function(R,j){p.onload=R,p.onerror=j}),p.addEventListener("load",function(){y.loading|=1}),p.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Rs(h,t,i)}h={type:"stylesheet",instance:h,count:1,state:y},u.set(o,h)}}}function iv(e,t){ya.X(e,t);var a=Wn;if(a&&e){var i=wn(a).hoistableScripts,u=ei(e),o=i.get(u);o||(o=a.querySelector(al(u)),o||(e=S({src:e,async:!0},t),(t=qt.get(u))&&fo(e,t),o=a.createElement("script"),Je(o),et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(u,o))}}function lv(e,t){ya.M(e,t);var a=Wn;if(a&&e){var i=wn(a).hoistableScripts,u=ei(e),o=i.get(u);o||(o=a.querySelector(al(u)),o||(e=S({src:e,async:!0,type:"module"},t),(t=qt.get(u))&&fo(e,t),o=a.createElement("script"),Je(o),et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(u,o))}}function jd(e,t,a,i){var u=(u=re.current)?Os(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Fn(a.href),a=wn(u).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Fn(a.href);var o=wn(u).hoistableStyles,h=o.get(e);if(h||(u=u.ownerDocument||u,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=u.querySelector(tl(e)))&&!o._p&&(h.instance=o,h.state.loading=5),qt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},qt.set(e,a),o||sv(u,e,a,h.state))),t&&i===null)throw Error(r(528,""));return h}if(t&&i!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ei(a),a=wn(u).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Fn(e){return'href="'+Ut(e)+'"'}function tl(e){return'link[rel="stylesheet"]['+e+"]"}function Ud(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function sv(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),et(t,"link",a),Je(t),e.head.appendChild(t))}function ei(e){return'[src="'+Ut(e)+'"]'}function al(e){return"script[async]"+e}function Dd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Ut(a.href)+'"]');if(i)return t.instance=i,Je(i),i;var u=S({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Je(i),et(i,"style",u),Rs(i,a.precedence,e),t.instance=i;case"stylesheet":u=Fn(a.href);var o=e.querySelector(tl(u));if(o)return t.state.loading|=4,t.instance=o,Je(o),o;i=Ud(a),(u=qt.get(u))&&co(i,u),o=(e.ownerDocument||e).createElement("link"),Je(o);var h=o;return h._p=new Promise(function(y,p){h.onload=y,h.onerror=p}),et(o,"link",i),t.state.loading|=4,Rs(o,a.precedence,e),t.instance=o;case"script":return o=ei(a.src),(u=e.querySelector(al(o)))?(t.instance=u,Je(u),u):(i=a,(u=qt.get(o))&&(i=S({},a),fo(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),Je(u),et(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Rs(i,a.precedence,e));return t.instance}function Rs(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,o=u,h=0;h<i.length;h++){var y=i[h];if(y.dataset.precedence===t)o=y;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xs=null;function Nd(e,t,a){if(xs===null){var i=new Map,u=xs=new Map;u.set(a,i)}else u=xs,i=u.get(a),i||(i=new Map,u.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var o=a[u];if(!(o[pi]||o[Ie]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var y=i.get(h);y?y.push(o):i.set(h,[o])}}return i}function zd(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function rv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function kd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uv(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Fn(i.href),o=t.querySelector(tl(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Je(o);return}o=t.ownerDocument||t,i=Ud(i),(u=qt.get(u))&&co(i,u),o=o.createElement("link"),Je(o);var h=o;h._p=new Promise(function(y,p){h.onload=y,h.onerror=p}),et(o,"link",i),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Cs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ho=0;function ov(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&ho===0&&(ho=62500*Vg());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>ho?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function Cs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var js=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,js=new Map,t.forEach(cv,e),js=null,Cs.call(e))}function cv(e,t){if(!(t.state.loading&4)){var a=js.get(e);if(a)var i=a.get(null);else{a=new Map,js.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var h=u[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),i=h)}i&&a.set(null,i)}u=t.instance,h=u.getAttribute("data-precedence"),o=a.get(h)||i,o===i&&a.set(null,u),a.set(h,u),this.count++,i=Cs.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),o?o.parentNode.insertBefore(u,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var nl={$$typeof:z,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function fv(e,t,a,i,u,o,h,y,p){this.tag=1,this.containerInfo=e,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=rr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rr(0),this.hiddenUpdates=rr(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.incompleteTransitions=new Map}function Md(e,t,a,i,u,o,h,y,p,R,j,k){return e=new fv(e,t,a,h,p,R,j,k,y),t=1,o===!0&&(t|=24),o=_t(3,null,null,t),e.current=o,o.stateNode=e,t=Kr(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:a,cache:t},Zr(o),e}function Ld(e){return e?(e=Un,e):Un}function Bd(e,t,a,i,u,o){u=Ld(u),i.context===null?i.context=u:i.pendingContext=u,i=Oa(t),i.payload={element:a},o=o===void 0?null:o,o!==null&&(i.callback=o),a=Ra(e,i,t),a!==null&&(yt(a,e,t),ki(a,e,t))}function qd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function mo(e,t){qd(e,t),(e=e.alternate)&&qd(e,t)}function Hd(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&yt(t,e,67108864),mo(e,67108864)}}function $d(e){if(e.tag===13||e.tag===31){var t=At();t=ur(t);var a=Pa(e,t);a!==null&&yt(a,e,t),mo(e,t)}}var Ds=!0;function hv(e,t,a,i){var u=D.T;D.T=null;var o=G.p;try{G.p=2,yo(e,t,a,i)}finally{G.p=o,D.T=u}}function dv(e,t,a,i){var u=D.T;D.T=null;var o=G.p;try{G.p=8,yo(e,t,a,i)}finally{G.p=o,D.T=u}}
vendor: 4,264 bytes, line 50
50function yo(e,t,a,i){if(Ds){var u=go(i);if(u===null)eo(e,t,i,Ns,a),Vd(e,i);else if(yv(u,e,t,a,i))i.stopPropagation();else if(Vd(e,i),t&4&&-1<mv.indexOf(e)){for(;u!==null;){var o=_n(u);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=Qa(o.pendingLanes);if(h!==0){var y=o;for(y.pendingLanes|=2,y.entangledLanes|=2;h;){var p=1<<31-pt(h);y.entanglements[1]|=p,h&=~p}It(o),(ve&6)===0&&(ys=gt()+500,Pi(0))}}break;case 31:case 13:y=Pa(o,2),y!==null&&yt(y,o,2),vs(),mo(o,2)}if(o=go(i),o===null&&eo(e,t,i,Ns,a),o===u)break;u=o}u!==null&&i.stopPropagation()}else eo(e,t,i,null,a)}}function go(e){return e=vr(e),vo(e)}var Ns=null;function vo(e){if(Ns=null,e=bn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ns=e,null}function Gd(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Fm()){case Zo:return 2;case Io:return 8;case Sl:case ey:return 32;case Po:return 268435456;default:return 32}default:return 32}}var po=!1,Ba=null,qa=null,Ha=null,il=new Map,ll=new Map,$a=[],mv="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 Vd(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":qa=null;break;case"mouseover":case"mouseout":Ha=null;break;case"pointerover":case"pointerout":il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(t.pointerId)}}function sl(e,t,a,i,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:o,targetContainers:[u]},t!==null&&(t=_n(t),t!==null&&Hd(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function yv(e,t,a,i,u){switch(t){case"focusin":return Ba=sl(Ba,e,t,a,i,u),!0;case"dragenter":return qa=sl(qa,e,t,a,i,u),!0;case"mouseover":return Ha=sl(Ha,e,t,a,i,u),!0;case"pointerover":var o=u.pointerId;return il.set(o,sl(il.get(o)||null,e,t,a,i,u)),!0;case"gotpointercapture":return o=u.pointerId,ll.set(o,sl(ll.get(o)||null,e,t,a,i,u)),!0}return!1}function Yd(e){var t=bn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,nc(e.priority,function(){$d(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,nc(e.priority,function(){$d(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=go(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);gr=i,a.target.dispatchEvent(i),gr=null}else return t=_n(a),t!==null&&Hd(t),e.blockedOn=a,!1;t.shift()}return!0}function Kd(e,t,a){zs(e)&&a.delete(t)}
vendor: 4,868 bytes, line 50
50function gv(){po=!1,Ba!==null&&zs(Ba)&&(Ba=null),qa!==null&&zs(qa)&&(qa=null),Ha!==null&&zs(Ha)&&(Ha=null),il.forEach(Kd),ll.forEach(Kd)}function ks(e,t){e.blockedOn===t&&(e.blockedOn=null,po||(po=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,gv)))}var Ms=null;function Qd(e){Ms!==e&&(Ms=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ms===e&&(Ms=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(vo(i||a)===null)continue;break}var o=_n(a);o!==null&&(e.splice(t,3),t-=3,yu(o,{pending:!0,data:u,method:a.method,action:i},i,u))}}))}function ti(e){function t(p){return ks(p,e)}Ba!==null&&ks(Ba,e),qa!==null&&ks(qa,e),Ha!==null&&ks(Ha,e),il.forEach(t),ll.forEach(t);for(var a=0;a<$a.length;a++){var i=$a[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<$a.length&&(a=$a[0],a.blockedOn===null);)Yd(a),a.blockedOn===null&&$a.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var u=a[i],o=a[i+1],h=u[ot]||null;if(typeof o=="function")h||Qd(a);else if(h){var y=null;if(o&&o.hasAttribute("formAction")){if(u=o,h=o[ot]||null)y=h.formAction;else if(vo(u)!==null)continue}else y=h.action;typeof y=="function"?a[i+1]=y:(a.splice(i,3),i-=3),Qd(a)}}}function Xd(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return u=h})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function bo(e){this._internalRoot=e}Ls.prototype.render=bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,i=At();Bd(a,i,e,t,null,null)},Ls.prototype.unmount=bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bd(e.current,2,null,e,null,null),vs(),t[pn]=null}};function Ls(e){this._internalRoot=e}Ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=ac();e={blockedOn:null,target:e,priority:t};for(var a=0;a<$a.length&&t!==0&&t<$a[a].priority;a++);$a.splice(a,0,e),a===0&&Yd(e)}};var Jd=n.version;if(Jd!=="19.2.4")throw Error(r(527,Jd,"19.2.4"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var vv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bs.isDisabled&&Bs.supportsFiber)try{yi=Bs.inject(vv),vt=Bs}catch{}}return ul.createRoot=function(e,t){if(!c(e))throw Error(r(299));var a=!1,i="",u=th,o=ah,h=nh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Md(e,1,!1,null,null,a,i,null,u,o,h,Xd),e[pn]=t.current,Fu(e),new bo(t)},ul.hydrateRoot=function(e,t,a){if(!c(e))throw Error(r(299));var i=!1,u="",o=th,h=ah,y=nh,p=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError),a.formState!==void 0&&(p=a.formState)),t=Md(e,1,!0,t,a??null,i,u,p,o,h,y,Xd),t.context=Ld(null),a=t.current,i=At(),i=ur(i),u=Oa(i),u.callback=null,Ra(a,u,i),a=i,t.current.lanes=a,vi(t,a),It(t),e[pn]=t.current,Fu(e),new Ls(t)},ul.version="19.2.4",ul}var im;function Rv(){if(im)return So.exports;im=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),So.exports=Ov(),So.exports}var xv=Rv();const Cv=Dm(xv),jv="modulepreload",Uv=function(l){return"/"+l},lm={},xt=function(n,s,r){let c=Promise.resolve();if(s&&s.length>0){let d=function(g){return Promise.all(g.map(b=>Promise.resolve(b).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};document.getElementsByTagName("link");
50const m=document.querySelector("meta[property=csp-nonce]"),v=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));c=d(s.map(g=>{if(g=Uv(g),g in lm)return;lm[g]=!0;const b=g.endsWith(".css"),S=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${S}`))return;const A=document.createElement("link");if(A.rel=b?"stylesheet":jv,b||(A.as="script"),A.crossOrigin="",A.href=g,v&&A.setAttribute("nonce",v),document.head.appendChild(A),b)return new Promise((T,U)=>{A.addEventListener("load",T),A.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${g}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return c.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return n().catch(f)})};function Ps(l,n){var s={};for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&n.indexOf(r)<0&&(s[r]=l[r]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(l);c<r.length;c++)n.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(l,r[c])&&(s[r[c]]=l[r[c]]);return s}function Dv(l,n,s,r){function c(f){return f instanceof s?f:new s(function(d){d(f)})}return new(s||(s=Promise))(function(f,d){function m(b){try{g(r.next(b))}catch(S){d(S)}}function v(b){try{g(r.throw(b))}catch(S){d(S)}}function g(b){b.done?f(b.value):c(b.value).then(m,v)}g((r=r.apply(l,n||[])).next())})}const Nv=l=>l?(...n)=>l(...n):(...n)=>fetch(...n);class Ko extends Error{constructor(n,s="FunctionsError",r){super(n),this.name=s,this.context=r}}class zv extends Ko{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class sm extends Ko{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class rm extends Ko{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var zo;(function(l){l.Any="any",l.ApNortheast1="ap-northeast-1",l.ApNortheast2="ap-northeast-2",l.ApSouth1="ap-south-1",l.ApSoutheast1="ap-southeast-1",l.ApSoutheast2="ap-southeast-2",l.CaCentral1="ca-central-1",l.EuCentral1="eu-central-1",l.EuWest1="eu-west-1",l.EuWest2="eu-west-2",l.EuWest3="eu-west-3",l.SaEast1="sa-east-1",l.UsEast1="us-east-1",l.UsWest1="us-west-1",l.UsWest2="us-west-2"})(zo||(zo={}));class kv{constructor(n,{headers:s={},customFetch:r,region:c=zo.Any}={}){this.url=n,this.headers=s,this.region=c,this.fetch=Nv(r)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return Dv(this,arguments,void 0,function*(s,r={}){var c;let f,d;try{const{headers:m,method:v,body:g,signal:b,timeout:S}=r;let A={},{region:T}=r;T||(T=this.region);const U=new URL(`${this.url}/${s}`);T&&T!=="any"&&(A["x-region"]=T,U.searchParams.set("forceFunctionRegion",T));let L;g&&(m&&!Object.prototype.hasOwnProperty.call(m,"Content-Type")||!m)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(A["Content-Type"]="application/octet-stream",L=g):typeof g=="string"?(A["Content-Type"]="text/plain",L=g):typeof FormData<"u"&&g instanceof FormData?L=g:(A["Content-Type"]="application/json",L=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?L=JSON.stringify(g):L=g;let q=b;S&&(d=new AbortController,f=setTimeout(()=>d.abort(),S),b?(q=d.signal,b.addEventListener("abort",()=>d.abort())):q=d.signal);const H=yield this.fetch(U.toString(),{method:v||"POST",headers:Object.assign(Object.assign(Object.assign({},A),this.headers),m),body:L,signal:q}).catch(ne=>{throw new zv(ne)}),$=H.headers.get("x-relay-error");if($&&$==="true")throw new sm(H);if(!H.ok)throw new rm(H);let z=((c=H.headers.get("Content-Type"))!==null&&c!==void 0?c:"text/plain").split(";")[0].trim(),Y;return z==="application/json"?Y=yield H.json():z==="application/octet-stream"||z==="application/pdf"?Y=yield H.blob():z==="text/event-stream"?Y=H:z==="multipart/form-data"?Y=yield H.formData():Y=yield H.text(),{data:Y,error:null,response:H}}catch(m){return{data:null,error:m,response:m instanceof rm||m instanceof sm?m.context:void 0}}finally{f&&clearTimeout(f)}})}}
50var Mv=class extends Error{constructor(l){super(l.message),this.name="PostgrestError",this.details=l.details,this.hint=l.hint,this.code=l.code}},Lv=class{constructor(l){var n,s,r;this.shouldThrowOnError=!1,this.method=l.method,this.url=l.url,this.headers=new Headers(l.headers),this.schema=l.schema,this.body=l.body,this.shouldThrowOnError=(n=l.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=l.signal,this.isMaybeSingle=(s=l.isMaybeSingle)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(r=l.urlLengthLimit)!==null&&r!==void 0?r:8e3,l.fetch?this.fetch=l.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(l,n){return this.headers=new Headers(this.headers),this.headers.set(l,n),this}then(l,n){var s=this;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");const r=this.fetch;let c=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async f=>{let d=null,m=null,v=null,g=f.status,b=f.statusText;if(f.ok){var S,A;if(s.method!=="HEAD"){var T;const H=await f.text();H===""||(s.headers.get("Accept")==="text/csv"||s.headers.get("Accept")&&(!((T=s.headers.get("Accept"))===null||T===void 0)&&T.includes("application/vnd.pgrst.plan+text"))?m=H:m=JSON.parse(H))}const L=(S=s.headers.get("Prefer"))===null||S===void 0?void 0:S.match(/count=(exact|planned|estimated)/),q=(A=f.headers.get("content-range"))===null||A===void 0?void 0:A.split("/");L&&q&&q.length>1&&(v=parseInt(q[1])),s.isMaybeSingle&&s.method==="GET"&&Array.isArray(m)&&(m.length>1?(d={code:"PGRST116",details:`Results contain ${m.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},m=null,v=null,g=406,b="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{var U;const L=await f.text();try{d=JSON.parse(L),Array.isArray(d)&&f.status===404&&(m=[],d=null,g=200,b="OK")}catch{f.status===404&&L===""?(g=204,b="No Content"):d={message:L}}if(d&&s.isMaybeSingle&&(!(d==null||(U=d.details)===null||U===void 0)&&U.includes("0 rows"))&&(d=null,g=200,b="OK"),d&&s.shouldThrowOnError)throw new Mv(d)}return{error:d,data:m,count:v,status:g,statusText:b}});return this.shouldThrowOnError||(c=c.catch(f=>{var d;let m="",v="",g="";const b=f==null?void 0:f.cause;if(b){var S,A,T,U;const H=(S=b==null?void 0:b.message)!==null&&S!==void 0?S:"",$=(A=b==null?void 0:b.code)!==null&&A!==void 0?A:"";m=`${(T=f==null?void 0:f.name)!==null&&T!==void 0?T:"FetchError"}: ${f==null?void 0:f.message}`,m+=` 51 52Caused by: ${(U=b==null?void 0:b.name)!==null&&U!==void 0?U:"Error"}: ${H}`,$&&(m+=` (${$})`),b!=null&&b.stack&&(m+=` 53${b.stack}`)}else{var L;m=(L=f==null?void 0:f.stack)!==null&&L!==void 0?L:""}const q=this.url.toString().length;return(f==null?void 0:f.name)==="AbortError"||(f==null?void 0:f.code)==="ABORT_ERR"?(g="",v="Request was aborted (timeout or manual cancellation)",q>this.urlLengthLimit&&(v+=`. Note: Your request URL is ${q} 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.`)):((b==null?void 0:b.name)==="HeadersOverflowError"||(b==null?void 0:b.code)==="UND_ERR_HEADERS_OVERFLOW")&&(g="",v="HTTP headers exceeded server limits (typically 16KB)",q>this.urlLengthLimit&&(v+=`. Your request URL is ${q} 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.`)),{error:{message:`${(d=f==null?void 0:f.name)!==null&&d!==void 0?d:"FetchError"}: ${f==null?void 0:f.message}`,details:m,hint:v,code:g},data:null,count:null,status:0,statusText:""}})),c.then(l,n)}returns(){return this}overrideTypes(){return this}},Bv=class extends Lv{select(l){let n=!1;const s=(l??"*").split("").map(r=>/\s/.test(r)&&!n?"":(r==='"'&&(n=!n),r)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(l,{ascending:n=!0,nullsFirst:s,foreignTable:r,referencedTable:c=r}={}){const f=c?`${c}.order`:"order",d=this.url.searchParams.get(f);return this.url.searchParams.set(f,`${d?`${d},`:""}${l}.${n?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(l,{foreignTable:n,referencedTable:s=n}={}){const r=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(r,`${l}`),this}range(l,n,{foreignTable:s,referencedTable:r=s}={}){const c=typeof r>"u"?"offset":`${r}.offset`,f=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(c,`${l}`),this.url.searchParams.set(f,`${n-l+1}`),this}abortSignal(l){return this.signal=l,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
53explain({analyze:l=!1,verbose:n=!1,settings:s=!1,buffers:r=!1,wal:c=!1,format:f="text"}={}){var d;const m=[l?"analyze":null,n?"verbose":null,s?"settings":null,r?"buffers":null,c?"wal":null].filter(Boolean).join("|"),v=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${f}; for="${v}"; options=${m};`),f==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(l){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${l}`),this}};const um=new RegExp("[,()]");var ui=class extends Bv{eq(l,n){return this.url.searchParams.append(l,`eq.${n}`),this}neq(l,n){return this.url.searchParams.append(l,`neq.${n}`),this}gt(l,n){return this.url.searchParams.append(l,`gt.${n}`),this}gte(l,n){return this.url.searchParams.append(l,`gte.${n}`),this}lt(l,n){return this.url.searchParams.append(l,`lt.${n}`),this}lte(l,n){return this.url.searchParams.append(l,`lte.${n}`),this}like(l,n){return this.url.searchParams.append(l,`like.${n}`),this}likeAllOf(l,n){return this.url.searchParams.append(l,`like(all).{${n.join(",")}}`),this}likeAnyOf(l,n){return this.url.searchParams.append(l,`like(any).{${n.join(",")}}`),this}ilike(l,n){return this.url.searchParams.append(l,`ilike.${n}`),this}ilikeAllOf(l,n){return this.url.searchParams.append(l,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(l,n){return this.url.searchParams.append(l,`ilike(any).{${n.join(",")}}`),this}regexMatch(l,n){return this.url.searchParams.append(l,`match.${n}`),this}regexIMatch(l,n){return this.url.searchParams.append(l,`imatch.${n}`),this}is(l,n){return this.url.searchParams.append(l,`is.${n}`),this}isDistinct(l,n){return this.url.searchParams.append(l,`isdistinct.${n}`),this}in(l,n){const s=Array.from(new Set(n)).map(r=>typeof r=="string"&&um.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(l,`in.(${s})`),this}notIn(l,n){const s=Array.from(new Set(n)).map(r=>typeof r=="string"&&um.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(l,`not.in.(${s})`),this}contains(l,n){return typeof n=="string"?this.url.searchParams.append(l,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(l,`cs.{${n.join(",")}}`):this.url.searchParams.append(l,`cs.${JSON.stringify(n)}`),this}containedBy(l,n){return typeof n=="string"?this.url.searchParams.append(l,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(l,`cd.{${n.join(",")}}`):this.url.searchParams.append(l,`cd.${JSON.stringify(n)}`),this}rangeGt(l,n){return this.url.searchParams.append(l,`sr.${n}`),this}rangeGte(l,n){return this.url.searchParams.append(l,`nxl.${n}`),this}rangeLt(l,n){return this.url.searchParams.append(l,`sl.${n}`),this}rangeLte(l,n){return this.url.searchParams.append(l,`nxr.${n}`),this}rangeAdjacent(l,n){return this.url.searchParams.append(l,`adj.${n}`),this}overlaps(l,n){return typeof n=="string"?this.url.searchParams.append(l,`ov.${n}`):this.url.searchParams.append(l,`ov.{${n.join(",")}}`),this}textSearch(l,n,{config:s,type:r}={}){let c="";r==="plain"?c="pl":r==="phrase"?c="ph":r==="websearch"&&(c="w");const f=s===void 0?"":`(${s})`;return this.url.searchParams.append(l,`${c}fts${f}.${n}`),this}match(l){return Object.entries(l).forEach(([n,s])=>{this.url.searchParams.append(n,`eq.${s}`)}),this}not(l,n,s){return this.url.searchParams.append(l,`not.${n}.${s}`),this}or(l,{foreignTable:n,referencedTable:s=n}={}){const r=s?`${s}.or`:"or";return this.url.searchParams.append(r,`(${l})`),this}filter(l,n,s){return this.url.searchParams.append(l,`${n}.${s}`),this}},qv=class{constructor(l,{headers:n={},schema:s,fetch:r,urlLengthLimit:c=8e3}){this.url=l,this.headers=new Headers(n),this.schema=s,this.fetch=r,this.urlLengthLimit=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(l,n){const{head:s=!1,count:r}=n??{},c=s?"HEAD":"GET";let f=!1;const d=(l??"*").split("").map(g=>/\s/.test(g)&&!f?"":(g==='"'&&(f=!f),g)).join(""),{url:m,headers:v}=this.cloneRequestState();return m.searchParams.set("select",d),r&&v.append("Prefer",`count=${r}`),new ui({method:c,url:m,headers:v,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(l,{count:n,defaultToNull:s=!0}={}){var r;const c="POST",{url:f,headers:d}=this.cloneRequestState();if(n&&d.append("Prefer",`count=${n}`),s||d.append("Prefer","missing=default"),Array.isArray(l)){const m=l.reduce((v,g)=>v.concat(Object.keys(g)),[]);if(m.length>0){const v=[...new Set(m)].map(g=>`"${g}"`);f.searchParams.set("columns",v.join(","))}}return new ui({method:c,url:f,headers:d,schema:this.schema,body:l,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(l,{onConflict:n,ignoreDuplicates:s=!1,count:r,defaultToNull:c=!0}={}){var f;const d="POST",{url:m,headers:v}=this.cloneRequestState();if(v.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),n!==void 0&&m.searchParams.set("on_conflict",n),r&&v.append("Prefer",`count=${r}`),c||v.append("Prefer","missing=default"),Array.isArray(l)){const g=l.reduce((b,S)=>b.concat(Object.keys(S)),[]);if(g.length>0){const b=[...new Set(g)].map(S=>`"${S}"`);m.searchParams.set("columns",b.join(","))}}return new ui({method:d,url:m,headers:v,schema:this.schema,body:l,fetch:(f=this.fetch)!==null&&f!==void 0?f:fetch,urlLengthLimit:this.urlLengthLimit})}update(l,{count:n}={}){var s;const r="PATCH",{url:c,headers:f}=this.cloneRequestState();return n&&f.append("Prefer",`count=${n}
53`),new ui({method:r,url:c,headers:f,schema:this.schema,body:l,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:l}={}){var n;const s="DELETE",{url:r,headers:c}=this.cloneRequestState();return l&&c.append("Prefer",`count=${l}`),new ui({method:s,url:r,headers:c,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}};function dl(l){"@babel/helpers - typeof";return dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dl(l)}function Hv(l,n){if(dl(l)!="object"||!l)return l;var s=l[Symbol.toPrimitive];if(s!==void 0){var r=s.call(l,n);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(l)}function $v(l){var n=Hv(l,"string");return dl(n)=="symbol"?n:n+""}function Gv(l,n,s){return(n=$v(n))in l?Object.defineProperty(l,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[n]=s,l}function om(l,n){var s=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);n&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),s.push.apply(s,r)}return s}function qs(l){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?om(Object(s),!0).forEach(function(r){Gv(l,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(s)):om(Object(s)).forEach(function(r){Object.defineProperty(l,r,Object.getOwnPropertyDescriptor(s,r))})}return l}var Vv=class Nm{constructor(n,{headers:s={},schema:r,fetch:c,timeout:f,urlLengthLimit:d=8e3}={}){this.url=n,this.headers=new Headers(s),this.schemaName=r,this.urlLengthLimit=d;const m=c??globalThis.fetch;f!==void 0&&f>0?this.fetch=(v,g)=>{const b=new AbortController,S=setTimeout(()=>b.abort(),f),A=g==null?void 0:g.signal;if(A){if(A.aborted)return clearTimeout(S),m(v,g);const T=()=>{clearTimeout(S),b.abort()};return A.addEventListener("abort",T,{once:!0}),m(v,qs(qs({},g),{},{signal:b.signal})).finally(()=>{clearTimeout(S),A.removeEventListener("abort",T)})}return m(v,qs(qs({},g),{},{signal:b.signal})).finally(()=>clearTimeout(S))}:this.fetch=m}from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new qv(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(n){return new Nm(this.url,{headers:this.headers,schema:n,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(n,s={},{head:r=!1,get:c=!1,count:f}={}){var d;let m;const v=new URL(`${this.url}/rpc/${n}`);let g;const b=T=>T!==null&&typeof T=="object"&&(!Array.isArray(T)||T.some(b)),S=r&&Object.values(s).some(b);S?(m="POST",g=s):r||c?(m=r?"HEAD":"GET",Object.entries(s).filter(([T,U])=>U!==void 0).map(([T,U])=>[T,Array.isArray(U)?`{${U.join(",")}}`:`${U}`]).forEach(([T,U])=>{v.searchParams.append(T,U)})):(m="POST",g=s);const A=new Headers(this.headers);return S?A.set("Prefer",f?`count=${f},return=minimal`:"return=minimal"):f&&A.set("Prefer",`count=${f}`),new ui({method:m,url:v,headers:A,schema:this.schemaName,body:g,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch,urlLengthLimit:this.urlLengthLimit})}};class Yv{constructor(){}static detectEnvironment(){var n;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.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 s=globalThis.process;if(s){const r=s.versions;if(r&&r.node){const c=r.node,f=parseInt(c.replace(/^v/,"").split(".")[0]);return f>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${f} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${f} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 54import ws from "ws" 55new 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 n=this.detectEnvironment();if(n.constructor)return n.constructor;let s=n.error||"WebSocket not supported in this environment.";throw n.workaround&&(s+=` 56 57Suggested solution: ${n.workaround}`),new Error(s)}static createWebSocket(n,s){const r=this.getWebSocketConstructor();return new r(n,s)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const Kv="2.95.3",Qv=`realtime-js/${Kv}`,Xv="1.0.0",zm="2.0.0",cm=zm,ko=1e4,Jv=1e3,Zv=100;var Va;(function(l){l[l.connecting=0]="connecting",l[l.open=1]="open",l[l.closing=2]="closing",l[l.closed=3]="closed"})(Va||(Va={}));var Qe;(function(l){l.closed="closed",l.errored="errored",l.joined="joined",l.joining="joining",l.leaving="leaving"})(Qe||(Qe={}));var Qt;(function(l){l.close="phx_close",l.error="phx_error",l.join="phx_join",l.reply="phx_reply",l.leave="phx_leave",l.access_token="access_token"})(Qt||(Qt={}));var Mo;(function(l){l.websocket="websocket"})(Mo||(Mo={}));var yn;(function(l){l.Connecting="connecting",l.Open="open",l.Closing="closing",l.Closed="closed"})(yn||(yn={}));class Iv{constructor(n){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=n??[]}
57encode(n,s){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(n));let r=[n.join_ref,n.ref,n.topic,n.event,n.payload];return s(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(n){var s;return this._isArrayBuffer((s=n.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var s,r;const c=(r=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,c)}_encodeJsonUserBroadcastPush(n){var s,r;const c=(r=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&r!==void 0?r:{},d=new TextEncoder().encode(JSON.stringify(c)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,d)}_encodeUserBroadcastPush(n,s,r){var c,f;const d=n.topic,m=(c=n.ref)!==null&&c!==void 0?c:"",v=(f=n.join_ref)!==null&&f!==void 0?f:"",g=n.payload.event,b=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},S=Object.keys(b).length===0?"":JSON.stringify(b);if(v.length>255)throw new Error(`joinRef length ${v.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`ref length ${m.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`topic length ${d.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(S.length>255)throw new Error(`metadata length ${S.length} exceeds maximum of 255`);const A=this.USER_BROADCAST_PUSH_META_LENGTH+v.length+m.length+d.length+g.length+S.length,T=new ArrayBuffer(this.HEADER_LENGTH+A);let U=new DataView(T),L=0;U.setUint8(L++,this.KINDS.userBroadcastPush),U.setUint8(L++,v.length),U.setUint8(L++,m.length),U.setUint8(L++,d.length),U.setUint8(L++,g.length),U.setUint8(L++,S.length),U.setUint8(L++,s),Array.from(v,H=>U.setUint8(L++,H.charCodeAt(0))),Array.from(m,H=>U.setUint8(L++,H.charCodeAt(0))),Array.from(d,H=>U.setUint8(L++,H.charCodeAt(0))),Array.from(g,H=>U.setUint8(L++,H.charCodeAt(0))),Array.from(S,H=>U.setUint8(L++,H.charCodeAt(0)));var q=new Uint8Array(T.byteLength+r.byteLength);return q.set(new Uint8Array(T),0),q.set(new Uint8Array(r),T.byteLength),q.buffer}decode(n,s){if(this._isArrayBuffer(n)){let r=this._binaryDecode(n);return s(r)}if(typeof n=="string"){const r=JSON.parse(n),[c,f,d,m,v]=r;return s({join_ref:c,ref:f,topic:d,event:m,payload:v})}return s({})}_binaryDecode(n){const s=new DataView(n),r=s.getUint8(0),c=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(n,s,c)}}_decodeUserBroadcast(n,s,r){const c=s.getUint8(1),f=s.getUint8(2),d=s.getUint8(3),m=s.getUint8(4);let v=this.HEADER_LENGTH+4;const g=r.decode(n.slice(v,v+c));v=v+c;const b=r.decode(n.slice(v,v+f));v=v+f;const S=r.decode(n.slice(v,v+d));v=v+d;const A=n.slice(v,n.byteLength),T=m===this.JSON_ENCODING?JSON.parse(r.decode(A)):A,U={type:this.BROADCAST_EVENT,event:b,payload:T};return d>0&&(U.meta=JSON.parse(S)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:U}}_isArrayBuffer(n){var s;return n instanceof ArrayBuffer||((s=n==null?void 0:n.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(n,s){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([r])=>s.includes(r)))}}class km{constructor(n,s){this.callback=n,this.timerCalc=s,this.timer=void 0,this.tries=0,this.callback=n,this.timerCalc=s}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Re;(function(l){l.abstime="abstime",l.bool="bool",l.date="date",l.daterange="daterange",l.float4="float4",l.float8="float8",l.int2="int2",l.int4="int4",l.int4range="int4range",l.int8="int8",l.int8range="int8range",l.json="json",l.jsonb="jsonb",l.money="money",l.numeric="numeric",l.oid="oid",l.reltime="reltime",l.text="text",l.time="time",l.timestamp="timestamp",l.timestamptz="timestamptz",l.timetz="timetz",l.tsrange="tsrange",l.tstzrange="tstzrange"})(Re||(Re={}));const fm=(l,n,s={})=>{var r;const c=(r=s.skipTypes)!==null&&r!==void 0?r:[];return n?Object.keys(n).reduce((f,d)=>(f[d]=Pv(d,l,n,c),f),{}):{}},Pv=(l,n,s,r)=>{const c=n.find(m=>m.name===l),f=c==null?void 0:c.type,d=s[l];return f&&!r.includes(f)?Mm(f,d):Lo(d)},Mm=(l,n)=>{if(l.charAt(0)==="_"){const s=l.slice(1,l.length);return tp(n,s)}switch(l){case Re.bool:return Wv(n);case Re.float4:case Re.float8:case Re.int2:case Re.int4:case Re.int8:case Re.numeric:case Re.oid:return Fv(n);case Re.json:case Re.jsonb:return ep(n);case Re.timestamp:return ap(n);case Re.abstime:case Re.date:case Re.daterange:case Re.int4range:case Re.int8range:case Re.money:case Re.reltime:case Re.text:case Re.time:case Re.timestamptz:case Re.timetz:case Re.tsrange:case Re.tstzrange:return Lo(n);default:return Lo(n)}},Lo=l=>l,Wv=l=>{switch(l){case"t":return!0;case"f":return!1;default:return l}},Fv=l=>{if(typeof l=="string"){const n=parseFloat(l);
57if(!Number.isNaN(n))return n}return l},ep=l=>{if(typeof l=="string")try{return JSON.parse(l)}catch{return l}return l},tp=(l,n)=>{if(typeof l!="string")return l;const s=l.length-1,r=l[s];if(l[0]==="{"&&r==="}"){let f;const d=l.slice(1,s);try{f=JSON.parse("["+d+"]")}catch{f=d?d.split(","):[]}return f.map(m=>Mm(n,m))}return l},ap=l=>typeof l=="string"?l.replace(" ","T"):l,Lm=l=>{const n=new URL(l);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};class Oo{constructor(n,s,r={},c=ko){this.channel=n,this.event=s,this.payload=r,this.timeout=c,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(n){this.timeout=n,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(n){this.payload=Object.assign(Object.assign({},this.payload),n)}receive(n,s){var r;return this._hasReceived(n)&&s((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:n,callback:s}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const n=s=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=s,this._matchReceive(s)};this.channel._on(this.refEvent,{},n),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(n,s){this.refEvent&&this.channel._trigger(this.refEvent,{status:n,response:s})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:n,response:s}){this.recHooks.filter(r=>r.status===n).forEach(r=>r.callback(s))}_hasReceived(n){return this.receivedResp&&this.receivedResp.status===n}}var hm;(function(l){l.SYNC="sync",l.JOIN="join",l.LEAVE="leave"})(hm||(hm={}));class fl{constructor(n,s){this.channel=n,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(s==null?void 0:s.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},c=>{const{onJoin:f,onLeave:d,onSync:m}=this.caller;this.joinRef=this.channel._joinRef(),this.state=fl.syncState(this.state,c,f,d),this.pendingDiffs.forEach(v=>{this.state=fl.syncDiff(this.state,v,f,d)}),this.pendingDiffs=[],m()}),this.channel._on(r.diff,{},c=>{const{onJoin:f,onLeave:d,onSync:m}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(c):(this.state=fl.syncDiff(this.state,c,f,d),m())}),this.onJoin((c,f,d)=>{this.channel._trigger("presence",{event:"join",key:c,currentPresences:f,newPresences:d})}),this.onLeave((c,f,d)=>{this.channel._trigger("presence",{event:"leave",key:c,currentPresences:f,leftPresences:d})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(n,s,r,c){const f=this.cloneDeep(n),d=this.transformState(s),m={},v={};return this.map(f,(g,b)=>{d[g]||(v[g]=b)}),this.map(d,(g,b)=>{const S=f[g];if(S){const A=b.map(q=>q.presence_ref),T=S.map(q=>q.presence_ref),U=b.filter(q=>T.indexOf(q.presence_ref)<0),L=S.filter(q=>A.indexOf(q.presence_ref)<0);U.length>0&&(m[g]=U),L.length>0&&(v[g]=L)}else m[g]=b}),this.syncDiff(f,{joins:m,leaves:v},r,c)}static syncDiff(n,s,r,c){const{joins:f,leaves:d}={joins:this.transformState(s.joins),leaves:this.transformState(s.leaves)};return r||(r=()=>{}),c||(c=()=>{}),this.map(f,(m,v)=>{var g;const b=(g=n[m])!==null&&g!==void 0?g:[];if(n[m]=this.cloneDeep(v),b.length>0){const S=n[m].map(T=>T.presence_ref),A=b.filter(T=>S.indexOf(T.presence_ref)<0);n[m].unshift(...A)}r(m,b,v)}),this.map(d,(m,v)=>{let g=n[m];if(!g)return;const b=v.map(S=>S.presence_ref);g=g.filter(S=>b.indexOf(S.presence_ref)<0),n[m]=g,c(m,g,v),g.length===0&&delete n[m]}),n}static map(n,s){return Object.getOwnPropertyNames(n).map(r=>s(r,n[r]))}static transformState(n){return n=this.cloneDeep(n),Object.getOwnPropertyNames(n).reduce((s,r)=>{const c=n[r];return"metas"in c?s[r]=c.metas.map(f=>(f.presence_ref=f.phx_ref,delete f.phx_ref,delete f.phx_ref_prev,f)):s[r]=c,s},{})}static cloneDeep(n){return JSON.parse(JSON.stringify(n))}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var dm;(function(l){l.ALL="*",l.INSERT="INSERT",l.UPDATE="UPDATE",l.DELETE="DELETE"})(dm||(dm={}));var hl;(function(l){l.BROADCAST="broadcast",l.PRESENCE="presence",l.POSTGRES_CHANGES="postgres_changes",l.SYSTEM="system"})(hl||(hl={}));var ga;(function(l){l.SUBSCRIBED="SUBSCRIBED",l.TIMED_OUT="TIMED_OUT",l.CLOSED="CLOSED",l.CHANNEL_ERROR="CHANNEL_ERROR"})(ga||(ga={}));class fi{constructor(n,s={config:{}},r){var c,f;if(this.topic=n,this.params=s,this.socket=r,this.bindings={},this.state=Qe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.timeout=this.socket.timeout,this.joinPush=new Oo(this,Qt.join,this.params,this.timeout),this.rejoinTimer=new km(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Qe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(d=>d.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Qe.closed,this.socket._remove(this)}),this._onError(d=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,d),this.state=Qe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Qe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",d=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,d),this.state=Qe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Qt.reply,{},(d,m)=>{this._trigger(this._replyEventName(m),d)}),this.presence=new fl(this),this.broadcastEndpointURL=Lm(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((f=(c=this.params.config)===null||c===void 0?void 0:c.broadcast)===null||f===void 0)&&f.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(n,s=this.timeout){var r,c,f;if(this.socket.isConnected()||this.socket.connect(),this.state==Qe.closed){const{config:{broadcast:d,presence:m,private:v}}=this.params,g=(c=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(T=>T.filter))!==null&&c!==void 0?c:[],b=!!this.bindings[hl.PRESENCE]&&this.bindings[hl.PRESENCE].length>0||((f=this.params.config.presence)===null||f===void 0?void 0:f.enabled)===!0,S={},A={broadcast:d,presence:Object.assign(Object.assign({},m),{enabled:b}),postgres_changes:g,private:v};this.socket.accessTokenValue&&(S.access_token=this.socket.accessTokenValue),this._onError(T=>n==null?void 0:n(ga.CHANNEL_ERROR,T)),this._onClose(()=>n==null?void 0:n(ga.CLOSED)),this.updateJoinPayload(Object.assign({config:A},S)),this.joinedOnce=!0,this._rejoin(s),this.joinPush.receive("ok",async({postgres_changes:T})=>{var U;if(this.socket._isManualToken()||this.socket.setAuth(),T===void 0){n==null||n(ga.SUBSCRIBED);return}else{const L=this.bindings.postgres_changes,q=(U=L==null?void 0:L.length)!==null&&U!==void 0?U:0,H=[];for(let $=0;$<q;$++){const z=L[$],{filter:{event:Y,schema:ne,table:Q,filter:Z}}=z,ge=T&&T[$];if(ge&&ge.event===Y&&fi.isFilterValueEqual(ge.schema,ne)&&fi.isFilterValueEqual(ge.table,Q)&&fi.isFilterValueEqual(ge.filter,Z))H.push(Object.assign(Object.assign({},z),{id:ge.id}));else{this.unsubscribe(),this.state=Qe.errored,n==null||n(ga.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=H,n&&n(ga.SUBSCRIBED);return}}).receive("error",T=>{this.state=Qe.errored,n==null||n(ga.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(T).join(", ")||"error")))}).receive("timeout",()=>{n==null||n(ga.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(n,s={}){return await this.send({type:"presence",event:"track",payload:n},s.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,s,r){return this.state===Qe.joined&&n===hl.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(n,s,r)}async httpSend(n,s,r={}){var c;if(s==null)return Promise.reject("Payload is required for httpSend()");const f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:s,private:this.private}]})},m=await this._fetchWithTimeout(this.broadcastEndpointURL,d,(c=r.timeout)!==null&&c!==void 0?c:this.timeout);if(m.status===202)return{success:!0};let v=m.statusText;
57try{const g=await m.json();v=g.error||g.message||v}catch{}return Promise.reject(new Error(v))}async send(n,s={}){var r,c;if(!this._canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:f,payload:d}=n,m={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(m.Authorization=`Bearer ${this.socket.accessTokenValue}`);const v={method:"POST",headers:m,body:JSON.stringify({messages:[{topic:this.subTopic,event:f,payload:d,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,v,(r=s.timeout)!==null&&r!==void 0?r:this.timeout);return await((c=g.body)===null||c===void 0?void 0:c.cancel()),g.ok?"ok":"error"}catch(g){return g.name==="AbortError"?"timed out":"error"}}else return new Promise(f=>{var d,m,v;const g=this._push(n.type,n,s.timeout||this.timeout);n.type==="broadcast"&&!(!((v=(m=(d=this.params)===null||d===void 0?void 0:d.config)===null||m===void 0?void 0:m.broadcast)===null||v===void 0)&&v.ack)&&f("ok"),g.receive("ok",()=>f("ok")),g.receive("error",()=>f("error")),g.receive("timeout",()=>f("timed out"))})}updateJoinPayload(n){this.joinPush.updatePayload(n)}unsubscribe(n=this.timeout){this.state=Qe.leaving;const s=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Qt.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(c=>{r=new Oo(this,Qt.leave,{},n),r.receive("ok",()=>{s(),c("ok")}).receive("timeout",()=>{s(),c("timed out")}).receive("error",()=>{c("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(n=>n.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Qe.closed,this.bindings={}}async _fetchWithTimeout(n,s,r){const c=new AbortController,f=setTimeout(()=>c.abort(),r),d=await this.socket.fetch(n,Object.assign(Object.assign({},s),{signal:c.signal}));return clearTimeout(f),d}_push(n,s,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${n}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let c=new Oo(this,n,s,r);return this._canPush()?c.send():this._addToPushBuffer(c),c}_addToPushBuffer(n){if(n.startTimeout(),this.pushBuffer.push(n),this.pushBuffer.length>Zv){const s=this.pushBuffer.shift();s&&(s.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${s.event}`,s.payload))}}_onMessage(n,s,r){return s}_isMember(n){return this.topic===n}_joinRef(){return this.joinPush.ref}_trigger(n,s,r){var c,f;const d=n.toLocaleLowerCase(),{close:m,error:v,leave:g,join:b}=Qt;if(r&&[m,v,g,b].indexOf(d)>=0&&r!==this._joinRef())return;let A=this._onMessage(d,s,r);if(s&&!A)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(d)?(c=this.bindings.postgres_changes)===null||c===void 0||c.filter(T=>{var U,L,q;return((U=T.filter)===null||U===void 0?void 0:U.event)==="*"||((q=(L=T.filter)===null||L===void 0?void 0:L.event)===null||q===void 0?void 0:q.toLocaleLowerCase())===d}).map(T=>T.callback(A,r)):(f=this.bindings[d])===null||f===void 0||f.filter(T=>{var U,L,q,H,$,z;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in T){const Y=T.id,ne=(U=T.filter)===null||U===void 0?void 0:U.event;return Y&&((L=s.ids)===null||L===void 0?void 0:L.includes(Y))&&(ne==="*"||(ne==null?void 0:ne.toLocaleLowerCase())===((q=s.data)===null||q===void 0?void 0:q.type.toLocaleLowerCase()))}else{const Y=($=(H=T==null?void 0:T.filter)===null||H===void 0?void 0:H.event)===null||$===void 0?void 0:$.toLocaleLowerCase();return Y==="*"||Y===((z=s==null?void 0:s.event)===null||z===void 0?void 0:z.toLocaleLowerCase())}else return T.type.toLocaleLowerCase()===d}).map(T=>{if(typeof A=="object"&&"ids"in A){const U=A.data,{schema:L,table:q,commit_timestamp:H,type:$,errors:z}=U;A=Object.assign(Object.assign({},{schema:L,table:q,commit_timestamp:H,eventType:$,new:{},old:{},errors:z}),this._getPayloadRecords(U))}T.callback(A,r)})}_isClosed(){return this.state===Qe.closed}_isJoined(){return this.state===Qe.joined}_isJoining(){return this.state===Qe.joining}_isLeaving(){return this.state===Qe.leaving}_replyEventName(n){return`chan_reply_${n}`}_on(n,s,r){const c=n.toLocaleLowerCase(),f={type:c,filter:s,callback:r};return this.bindings[c]?this.bindings[c].push(f):this.bindings[c]=[f],this}_off(n,s){const r=n.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(c=>{var f;return!(((f=c.type)===null||f===void 0?void 0:f.toLocaleLowerCase())===r&&fi.isEqual(c.filter,s))})),this}
57static isEqual(n,s){if(Object.keys(n).length!==Object.keys(s).length)return!1;for(const r in n)if(n[r]!==s[r])return!1;return!0}static isFilterValueEqual(n,s){return(n??void 0)===(s??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(n){this._on(Qt.close,{},n)}_onError(n){this._on(Qt.error,{},s=>n(s))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(n=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Qe.joining,this.joinPush.resend(n))}_getPayloadRecords(n){const s={new:{},old:{}};return(n.type==="INSERT"||n.type==="UPDATE")&&(s.new=fm(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(s.old=fm(n.columns,n.old_record)),s}}const Ro=()=>{},Hs={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},np=[1e3,2e3,5e3,1e4],ip=1e4,lp=` 58 addEventListener("message", (e) => { 59 if (e.data.event === "start") { 60 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 61 } 62 });`;class sp{constructor(n,s){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=ko,this.transport=null,this.heartbeatIntervalMs=Hs.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ro,this.ref=0,this.reconnectTimer=null,this.vsn=cm,this.logger=Ro,this.conn=null,this.sendBuffer=[],this.serializer=new Iv,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=c=>c?(...f)=>c(...f):(...f)=>fetch(...f),!(!((r=s==null?void 0:s.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey,this.endPoint=`${n}/${Mo.websocket}`,this.httpEndpoint=Lm(n),this._initializeOptions(s),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(s==null?void 0:s.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=Yv.createWebSocket(this.endpointURL())}catch(n){this._setConnectionState("disconnected");const s=n.message;throw s.includes("Node.js")?new Error(`${s} 63 64To use Realtime in Node.js, you need to provide a WebSocket implementation: 65 66Option 1: Use Node.js 22+ which has native WebSocket support 67Option 2: Install and provide the "ws" package: 68 69 npm install ws 70 71 import ws from "ws" 72 const client = new RealtimeClient(url, { 73 ...options, 74 transport: ws 75 })`):new Error(`WebSocket not available: ${s}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(n,s){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(n?this.conn.close(n,s??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(n){const s=await n.unsubscribe();return s==="ok"&&this._remove(n),this.channels.length===0&&this.disconnect(),s}async removeAllChannels(){const n=await Promise.all(this.channels.map(s=>s.unsubscribe()));return this.channels=[],this.disconnect(),n}log(n,s,r){this.logger(n,s,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Va.connecting:return yn.Connecting;case Va.open:return yn.Open;case Va.closing:return yn.Closing;default:return yn.Closed}}isConnected(){return this.connectionState()===yn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
75channel(n,s={config:{}}){const r=`realtime:${n}`,c=this.getChannels().find(f=>f.topic===r);if(c)return c;{const f=new fi(`realtime:${n}`,s,this);return this.channels.push(f),f}}push(n){const{topic:s,event:r,payload:c,ref:f}=n,d=()=>{this.encode(n,m=>{var v;(v=this.conn)===null||v===void 0||v.send(m)})};this.log("push",`${s} ${r} (${f})`,c),this.isConnected()?d():this.sendBuffer.push(d)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var n;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(s){this.log("error","error in heartbeat callback",s)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(s){this.log("error","error in heartbeat callback",s)}this._wasManualDisconnect=!1,(n=this.conn)===null||n===void 0||n.close(Jv,"heartbeat timeout"),setTimeout(()=>{var s;this.isConnected()||(s=this.reconnectTimer)===null||s===void 0||s.scheduleTimeout()},Hs.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(s){this.log("error","error in heartbeat callback",s)}this._setAuthSafely("heartbeat")}onHeartbeat(n){this.heartbeatCallback=n}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(n=>n()),this.sendBuffer=[])}_makeRef(){let n=this.ref+1;return n===this.ref?this.ref=0:this.ref=n,this.ref.toString()}_leaveOpenTopic(n){let s=this.channels.find(r=>r.topic===n&&(r._isJoined()||r._isJoining()));s&&(this.log("transport",`leaving duplicate topic "${n}"`),s.unsubscribe())}_remove(n){this.channels=this.channels.filter(s=>s.topic!==n.topic)}_onConnMessage(n){this.decode(n.data,s=>{if(s.topic==="phoenix"&&s.event==="phx_reply"&&s.ref&&s.ref===this.pendingHeartbeatRef){const g=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(s.payload.status==="ok"?"ok":"error",g)}catch(b){this.log("error","error in heartbeat callback",b)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:c,payload:f,ref:d}=s,m=d?`(${d})`:"",v=f.status||"";this.log("receive",`${v} ${r} ${c} ${m}`.trim(),f),this.channels.filter(g=>g._isMember(r)).forEach(g=>g._trigger(c,f,d)),this._triggerStateCallbacks("message",s)})}_clearTimer(n){var s;n==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):n==="reconnect"&&((s=this.reconnectTimer)===null||s===void 0||s.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=n=>this._onConnError(n),this.conn.onmessage=n=>this._onConnMessage(n),this.conn.onclose=n=>this._onConnClose(n),this.conn.readyState===Va.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Va.open||this.conn.readyState===Va.connecting)try{this.conn.close()}catch(n){this.log("error","Error closing connection",n)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(n=>n.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(s=>{this.log("error","error waiting for auth on connect",s),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker()},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)}_onConnClose(n){var s;this._setConnectionState("disconnected"),this.log("transport","close",n),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(s=this.reconnectTimer)===null||s===void 0||s.scheduleTimeout(),this._triggerStateCallbacks("close",n)}_onConnError(n){this._setConnectionState("disconnected"),this.log("transport",`${n}`),this._triggerChanError(),this._triggerStateCallbacks("error",n);try{this.heartbeatCallback("error")}catch(s){this.log("error","error in heartbeat callback",s)}}
75_triggerChanError(){this.channels.forEach(n=>n._trigger(Qt.error))}_appendParams(n,s){if(Object.keys(s).length===0)return n;const r=n.match(/\?/)?"&":"?",c=new URLSearchParams(s);return`${n}${r}${c}`}_workerObjectUrl(n){let s;if(n)s=n;else{const r=new Blob([lp],{type:"application/javascript"});s=URL.createObjectURL(r)}return s}_setConnectionState(n,s=!1){this._connectionState=n,n==="connecting"?this._wasManualDisconnect=!1:n==="disconnecting"&&(this._wasManualDisconnect=s)}async _performAuth(n=null){let s,r=!1;if(n)s=n,r=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),s=this.accessTokenValue}else s=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(c=>{const f={access_token:s,version:Qv};s&&c.updateJoinPayload(f),c.joinedOnce&&c._isJoined()&&c._push(Qt.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${n}`,s)})}_triggerStateCallbacks(n,s){try{this.stateChangeCallbacks[n].forEach(r=>{try{r(s)}catch(c){this.log("error",`error in ${n} callback`,c)}})}catch(r){this.log("error",`error triggering ${n} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new km(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Hs.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(n){var s,r,c,f,d,m,v,g,b,S,A,T;switch(this.transport=(s=n==null?void 0:n.transport)!==null&&s!==void 0?s:null,this.timeout=(r=n==null?void 0:n.timeout)!==null&&r!==void 0?r:ko,this.heartbeatIntervalMs=(c=n==null?void 0:n.heartbeatIntervalMs)!==null&&c!==void 0?c:Hs.HEARTBEAT_INTERVAL,this.worker=(f=n==null?void 0:n.worker)!==null&&f!==void 0?f:!1,this.accessToken=(d=n==null?void 0:n.accessToken)!==null&&d!==void 0?d:null,this.heartbeatCallback=(m=n==null?void 0:n.heartbeatCallback)!==null&&m!==void 0?m:Ro,this.vsn=(v=n==null?void 0:n.vsn)!==null&&v!==void 0?v:cm,n!=null&&n.params&&(this.params=n.params),n!=null&&n.logger&&(this.logger=n.logger),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(g=n==null?void 0:n.reconnectAfterMs)!==null&&g!==void 0?g:(U=>np[U-1]||ip),this.vsn){case Xv:this.encode=(b=n==null?void 0:n.encode)!==null&&b!==void 0?b:((U,L)=>L(JSON.stringify(U))),this.decode=(S=n==null?void 0:n.decode)!==null&&S!==void 0?S:((U,L)=>L(JSON.parse(U)));break;case zm:this.encode=(A=n==null?void 0:n.encode)!==null&&A!==void 0?A:this.serializer.encode.bind(this.serializer),this.decode=(T=n==null?void 0:n.decode)!==null&&T!==void 0?T:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=n==null?void 0:n.workerUrl}}}var ml=class extends Error{constructor(l,n){var s;super(l),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&((s=n.icebergType)==null?void 0:s.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function rp(l,n,s){const r=new URL(n,l);if(s)for(const[c,f]of Object.entries(s))f!==void 0&&r.searchParams.set(c,f);return r.toString()}async function up(l){return!l||l.type==="none"?{}:l.type==="bearer"?{Authorization:`Bearer ${l.token}`}:l.type==="header"?{[l.name]:l.value}:l.type==="custom"?await l.getHeaders():{}}function op(l){const n=l.fetchImpl??globalThis.fetch;return{async request({method:s,path:r,query:c,body:f,headers:d}){const m=rp(l.baseUrl,r,c),v=await up(l.auth),g=await n(m,{method:s,headers:{...f?{"Content-Type":"application/json"}:{},...v,...d},body:f?JSON.stringify(f):void 0}),b=await g.text(),S=(g.headers.get("content-type")||"").includes("application/json"),A=S&&b?JSON.parse(b):b;if(!g.ok){const T=S?A:void 0,U=T==null?void 0:T.error;throw new ml((U==null?void 0:U.message)??`Request failed with status ${g.status}`,{status:g.status,icebergType:U==null?void 0:U.type,icebergCode:U==null?void 0:U.code,details:T})}return{status:g.status,headers:g.headers,data:A}}}}function $s(l){return l.join("�")}var cp=class{constructor(l,n=""){this.client=l,this.prefix=n}async listNamespaces(l){const n=l?{parent:$s(l.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(l,n){const s={namespace:l.namespace,properties:n==null?void 0:n.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(l){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${$s(l.namespace)}`})}async loadNamespaceMetadata(l){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${$s(l.namespace)}`})).data.properties}}async namespaceExists(l){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${$s(l.namespace)}`}),!0}catch(n){if(n instanceof ml&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(l,n){try{return await this.createNamespace(l,n)}catch(s){if(s instanceof ml&&s.status===409)return;throw s}}};function ai(l){return l.join("�")}var fp=class{constructor(l,n="",s){this.client=l,this.prefix=n,this.accessDelegation=s}async listTables(l){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables`})).data.identifiers}async createTable(l,n){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables`,body:n,headers:s})).data.metadata}async updateTable(l,n){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables/${l.name}`,body:n});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(l,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables/${l.name}`,query:{purgeRequested:String((n==null?void 0:n.purge)??!1)}})}async loadTable(l){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables/${l.name}`,headers:n})).data.metadata}async tableExists(l){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ai(l.namespace)}/tables/${l.name}`,headers:n}),!0}catch(s){if(s instanceof ml&&s.status===404)return!1;throw s}}async createTableIfNotExists(l,n){try{return await this.createTable(l,n)}catch(s){if(s instanceof ml&&s.status===409)return await this.loadTable({namespace:l.namespace,name:n.name});throw s}}},hp=class{constructor(l){var r;let n="v1";l.catalogName&&(n+=`/${l.catalogName}`);const s=l.baseUrl.endsWith("/")?l.baseUrl:`${l.baseUrl}/`;this.client=op({baseUrl:s,auth:l.auth,fetchImpl:l.fetch}),this.accessDelegation=(r=l.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new cp(this.client,n),this.tableOps=new fp(this.client,n,this.accessDelegation)}async listNamespaces(l){return this.namespaceOps.listNamespaces(l)}async createNamespace(l,n){return this.namespaceOps.createNamespace(l,n)}async dropNamespace(l){await this.namespaceOps.dropNamespace(l)}async loadNamespaceMetadata(l){return this.namespaceOps.loadNamespaceMetadata(l)}async listTables(l){return this.tableOps.listTables(l)}
75async createTable(l,n){return this.tableOps.createTable(l,n)}async updateTable(l,n){return this.tableOps.updateTable(l,n)}async dropTable(l,n){await this.tableOps.dropTable(l,n)}async loadTable(l){return this.tableOps.loadTable(l)}async namespaceExists(l){return this.namespaceOps.namespaceExists(l)}async tableExists(l){return this.tableOps.tableExists(l)}async createNamespaceIfNotExists(l,n){return this.namespaceOps.createNamespaceIfNotExists(l,n)}async createTableIfNotExists(l,n){return this.tableOps.createTableIfNotExists(l,n)}},Ws=class extends Error{constructor(l,n="storage",s,r){super(l),this.__isStorageError=!0,this.namespace=n,this.name=n==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=r}};function Fs(l){return typeof l=="object"&&l!==null&&"__isStorageError"in l}var Gs=class extends Ws{constructor(l,n,s,r="storage"){super(l,r,n,s),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=n,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Bm=class extends Ws{constructor(l,n,s="storage"){super(l,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=n}};const dp=l=>l?(...n)=>l(...n):(...n)=>fetch(...n),mp=l=>{if(typeof l!="object"||l===null)return!1;const n=Object.getPrototypeOf(l);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in l)&&!(Symbol.iterator in l)},Bo=l=>{if(Array.isArray(l))return l.map(s=>Bo(s));if(typeof l=="function"||l!==Object(l))return l;const n={};return Object.entries(l).forEach(([s,r])=>{const c=s.replace(/([-_][a-z])/gi,f=>f.toUpperCase().replace(/[-_]/g,""));n[c]=Bo(r)}),n},yp=l=>!l||typeof l!="string"||l.length===0||l.length>100||l.trim()!==l||l.includes("/")||l.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(l);function yl(l){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yl(l)}function gp(l,n){if(yl(l)!="object"||!l)return l;var s=l[Symbol.toPrimitive];if(s!==void 0){var r=s.call(l,n);if(yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(l)}function vp(l){var n=gp(l,"string");return yl(n)=="symbol"?n:n+""}function pp(l,n,s){return(n=vp(n))in l?Object.defineProperty(l,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[n]=s,l}function mm(l,n){var s=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);n&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),s.push.apply(s,r)}return s}function ee(l){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?mm(Object(s),!0).forEach(function(r){pp(l,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(s)):mm(Object(s)).forEach(function(r){Object.defineProperty(l,r,Object.getOwnPropertyDescriptor(s,r))})}return l}const ym=l=>{var n;return l.msg||l.message||l.error_description||(typeof l.error=="string"?l.error:(n=l.error)===null||n===void 0?void 0:n.message)||JSON.stringify(l)},bp=async(l,n,s,r)=>{if(l&&typeof l=="object"&&"status"in l&&"ok"in l&&typeof l.status=="number"&&!(s!=null&&s.noResolveJson)){const c=l,f=c.status||500;if(typeof c.json=="function")c.json().then(d=>{const m=(d==null?void 0:d.statusCode)||(d==null?void 0:d.code)||f+"";n(new Gs(ym(d),f,m,r))}).catch(()=>{if(r==="vectors"){const d=f+"";n(new Gs(c.statusText||`HTTP ${f} error`,f,d,r))}else{const d=f+"";n(new Gs(c.statusText||`HTTP ${f} error`,f,d,r))}});else{const d=f+"";n(new Gs(c.statusText||`HTTP ${f} error`,f,d,r))}}else n(new Bm(ym(l),l,r))},_p=(l,n,s,r)=>{const c={method:l,headers:(n==null?void 0:n.headers)||{}};return l==="GET"||l==="HEAD"||!r?ee(ee({},c),s):(mp(r)?(c.headers=ee({"Content-Type":"application/json"},n==null?void 0:n.headers),c.body=JSON.stringify(r)):c.body=r,n!=null&&n.duplex&&(c.duplex=n.duplex),ee(ee({},c),s))};async function ol(l,n,s,r,c,f,d){return new Promise((m,v)=>{l(s,_p(n,r,c,f)).then(g=>{if(!g.ok)throw g;if(r!=null&&r.noResolveJson)return g;if(d==="vectors"){const b=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!b||!b.includes("application/json"))return{}}return g.json()}).then(g=>m(g)).catch(g=>bp(g,v,r,d))})}function qm(l="storage"){return{get:async(n,s,r,c)=>ol(n,"GET",s,r,c,void 0,l),post:async(n,s,r,c,f)=>ol(n,"POST",s,c,f,r,l),put:async(n,s,r,c,f)=>ol(n,"PUT",s,c,f,r,l),head:async(n,s,r,c)=>ol(n,"HEAD",s,ee(ee({},r),{},{noResolveJson:!0}),c,void 0,l),remove:async(n,s,r,c,f)=>ol(n,"DELETE",s,c,f,r,l)}
75}const wp=qm("storage"),{get:gl,post:Kt,put:qo,head:Sp,remove:Qo}=wp,Rt=qm("vectors");var di=class{constructor(l,n={},s,r="storage"){this.shouldThrowOnError=!1,this.url=l,this.headers=n,this.fetch=dp(s),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(l){var n=this;try{return{data:await l(),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Fs(s))return{data:null,error:s};throw s}}},Ep=class{constructor(l,n){this.downloadFn=l,this.shouldThrowOnError=n}then(l,n){return this.execute().then(l,n)}async execute(){var l=this;try{return{data:(await l.downloadFn()).body,error:null}}catch(n){if(l.shouldThrowOnError)throw n;if(Fs(n))return{data:null,error:n};throw n}}};let Hm;Hm=Symbol.toStringTag;var Tp=class{constructor(l,n){this.downloadFn=l,this.shouldThrowOnError=n,this[Hm]="BlobDownloadBuilder",this.promise=null}asStream(){return new Ep(this.downloadFn,this.shouldThrowOnError)}then(l,n){return this.getPromise().then(l,n)}catch(l){return this.getPromise().catch(l)}finally(l){return this.getPromise().finally(l)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var l=this;try{return{data:await(await l.downloadFn()).blob(),error:null}}catch(n){if(l.shouldThrowOnError)throw n;if(Fs(n))return{data:null,error:n};throw n}}};const Ap={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},gm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Op=class extends di{constructor(l,n={},s,r){super(l,n,r,"storage"),this.bucketId=s}async uploadOrUpdate(l,n,s,r){var c=this;return c.handleOperation(async()=>{let f;const d=ee(ee({},gm),r);let m=ee(ee({},c.headers),l==="POST"&&{"x-upsert":String(d.upsert)});const v=d.metadata;typeof Blob<"u"&&s instanceof Blob?(f=new FormData,f.append("cacheControl",d.cacheControl),v&&f.append("metadata",c.encodeMetadata(v)),f.append("",s)):typeof FormData<"u"&&s instanceof FormData?(f=s,f.has("cacheControl")||f.append("cacheControl",d.cacheControl),v&&!f.has("metadata")&&f.append("metadata",c.encodeMetadata(v))):(f=s,m["cache-control"]=`max-age=${d.cacheControl}`,m["content-type"]=d.contentType,v&&(m["x-metadata"]=c.toBase64(c.encodeMetadata(v))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!d.duplex&&(d.duplex="half")),r!=null&&r.headers&&(m=ee(ee({},m),r.headers));const g=c._removeEmptyFolders(n),b=c._getFinalPath(g),S=await(l=="PUT"?qo:Kt)(c.fetch,`${c.url}/object/${b}`,f,ee({headers:m},d!=null&&d.duplex?{duplex:d.duplex}:{}));return{path:g,id:S.Id,fullPath:S.Key}})}async upload(l,n,s){return this.uploadOrUpdate("POST",l,n,s)}async uploadToSignedUrl(l,n,s,r){var c=this;const f=c._removeEmptyFolders(l),d=c._getFinalPath(f),m=new URL(c.url+`/object/upload/sign/${d}`);return m.searchParams.set("token",n),c.handleOperation(async()=>{let v;const g=ee({upsert:gm.upsert},r),b=ee(ee({},c.headers),{"x-upsert":String(g.upsert)});return typeof Blob<"u"&&s instanceof Blob?(v=new FormData,v.append("cacheControl",g.cacheControl),v.append("",s)):typeof FormData<"u"&&s instanceof FormData?(v=s,v.append("cacheControl",g.cacheControl)):(v=s,b["cache-control"]=`max-age=${g.cac
75heControl}`,b["content-type"]=g.contentType),{path:f,fullPath:(await qo(c.fetch,m.toString(),v,{headers:b})).Key}})}async createSignedUploadUrl(l,n){var s=this;return s.handleOperation(async()=>{let r=s._getFinalPath(l);const c=ee({},s.headers);n!=null&&n.upsert&&(c["x-upsert"]="true");const f=await Kt(s.fetch,`${s.url}/object/upload/sign/${r}`,{},{headers:c}),d=new URL(s.url+f.url),m=d.searchParams.get("token");if(!m)throw new Ws("No token returned by API");return{signedUrl:d.toString(),path:l,token:m}})}async update(l,n,s){return this.uploadOrUpdate("PUT",l,n,s)}async move(l,n,s){var r=this;return r.handleOperation(async()=>await Kt(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:l,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:r.headers}))}async copy(l,n,s){var r=this;return r.handleOperation(async()=>({path:(await Kt(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:l,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(l,n,s){var r=this;return r.handleOperation(async()=>{let c=r._getFinalPath(l),f=await Kt(r.fetch,`${r.url}/object/sign/${c}`,ee({expiresIn:n},s!=null&&s.transform?{transform:s.transform}:{}),{headers:r.headers});const d=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return{signedUrl:encodeURI(`${r.url}${f.signedURL}${d}`)}})}async createSignedUrls(l,n,s){var r=this;return r.handleOperation(async()=>{const c=await Kt(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:n,paths:l},{headers:r.headers}),f=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return c.map(d=>ee(ee({},d),{},{signedUrl:d.signedURL?encodeURI(`${r.url}${d.signedURL}${f}`):null}))})}download(l,n,s){const r=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",c=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),f=c?`?${c}`:"",d=this._getFinalPath(l),m=()=>gl(this.fetch,`${this.url}/${r}/${d}${f}`,{headers:this.headers,noResolveJson:!0},s);return new Tp(m,this.shouldThrowOnError)}async info(l){var n=this;const s=n._getFinalPath(l);return n.handleOperation(async()=>Bo(await gl(n.fetch,`${n.url}/object/info/${s}`,{headers:n.headers})))}async exists(l){var n=this;const s=n._getFinalPath(l);try{return await Sp(n.fetch,`${n.url}/object/${s}`,{headers:n.headers}),{data:!0,error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Fs(r)&&r instanceof Bm){const c=r.originalError;if([400,404].includes(c==null?void 0:c.status))return{data:!1,error:r}}throw r}}getPublicUrl(l,n){const s=this._getFinalPath(l),r=[],c=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";c!==""&&r.push(c);const f=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",d=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});d!==""&&r.push(d);let m=r.join("&");return m!==""&&(m=`?${m}`),{data:{publicUrl:encodeURI(`${this.url}/${f}/public/${s}${m}`)}}}async remove(l){var n=this;return n.handleOperation(async()=>await Qo(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:l},{headers:n.headers}))}async list(l,n,s){var r=this;return r.handleOperation(async()=>{const c=ee(ee(ee({},Ap),n),{},{prefix:l||""});return await Kt(r.fetch,`${r.url}/object/list/${r.bucketId}`,c,{headers:r.headers},s)})}async listV2(l,n){var s=this;return s.handleOperation(async()=>{const r=ee({},l);return await Kt(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,r,{headers:s.headers},n)})}encodeMetadata(l){return JSON.stringify(l)}toBase64(l){return typeof Buffer<"u"?Buffer.from(l).toString("base64"):btoa(l)}_getFinalPath(l){return`${this.bucketId}/${l.replace(/^\/+/,"")}`}_removeEmptyFolders(l){return l.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(l){const n=[];return l.width&&n.push(`width=${l.width}`),l.height&&n.push(`height=${l.height}`),l.resize&&n.push(`resize=${l.resize}`),l.format&&n.push(`format=${l.format}`),l.quality&&n.push(`quality=${l.quality}`),n.join("&")}};const Rp="2.95.3",_l={"X-Client-Info":`storage-js/${Rp}`};var xp=class extends di{constructor(l,n={},s,r){const c=new URL(l);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(c.hostname)&&!c.hostname.includes("storage.supabase.")&&(c.hostname=c.hostname.replace("supabase.","storage.supabase."));const f=c.href.replace(/\/$/,""),d=ee(ee({},_l),n);super(f,d,s,"storage")}async listBuckets(l){var n=this;return n.handleOperation(async()=>{const s=n.listBucketOptionsToQueryString(l);return await gl(n.fetch,`${n.url}/bucket${s}`,{headers:n.headers})})}async getBucket(l){var n=this;return n.handleOperation(async()=>await gl(n.fetch,`${n.url}/bucket/${l}`,{headers:n.headers}))}async createBucket(l,n={public:!1}){var s=this;return s.handleOperation(async()=>await Kt(s.fetch,`${s.url}/bucket`,{id:l,name:l,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async updateBucket(l,n){var s=this;return s.handleOperation(async()=>await qo(s.fetch,`${s.url}/bucket/${l}`,{id:l,name:l,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(l){var n=this;return n.handleOperation(async()=>await Kt(n.fetch,`${n.url}/bucket/${l}/empty`,{},{headers:n.headers}))}async deleteBucket(l){var n=this;return n.handleOperation(async()=>await Qo(n.fetch,`${n.url}/bucket/${l}`,{},{headers:n.headers}))}listBucketOptionsToQueryString(l){const n={};return l&&("limit"in l&&(n.limit=String(l.limit)),"offset"in l&&(n.offset=String(l.offset)),l.search&&(n.search=l.search),l.sortColumn&&(n.sortColumn=l.sortColumn),l.sortOrder&&(n.sortOrder=l.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},Cp=class extends di{constructor(l,n={},s){const r=l.replace(/\/$/,""),c=ee(ee({},_l),n);super(r,c,s,"storage")}async createBucket(l){var n=this;return n.handleOperation(async()=>await Kt(n.fetch,`${n.url}/bucket`,{name:l},{headers:n.headers}))}async listBuckets(l){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;(l==null?void 0:l.limit)!==void 0&&s.set("limit",l.limit.toString()),(l==null?void 0:l.offset)!==void 0&&s.set("offset",l.offset.toString()),l!=null&&l.sortColumn&&s.set("sortColumn",l.sortColumn),l!=null&&l.sortOrder&&s.set("sortOrder",l.sortOrder),l!=null&&l.search&&s.set("search",l.search);const r=s.toString(),c=r?`${n.url}/bucket?${r}`:`${n.url}/bucket`;return await gl(n.fetch,c,{headers:n.headers})})}async deleteBucket(l){var n=this;return n.handleOperation(async()=>await Qo(n.fetch,`${n.url}/bucket/${l}`,{},{headers:n.headers}))}from(l){var n=this;if(!yp(l))throw new Ws("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 hp({baseUrl:this.url,catalogName:l,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}
75),r=this.shouldThrowOnError;return new Proxy(s,{get(c,f){const d=c[f];return typeof d!="function"?d:async(...m)=>{try{return{data:await d.apply(c,m),error:null}}catch(v){if(r)throw v;return{data:null,error:v}}}}})}},jp=class extends di{constructor(l,n={},s){const r=l.replace(/\/$/,""),c=ee(ee({},_l),{},{"Content-Type":"application/json"},n);super(r,c,s,"vectors")}async createIndex(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/CreateIndex`,l,{headers:n.headers})||{})}async getIndex(l,n){var s=this;return s.handleOperation(async()=>await Rt.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:l,indexName:n},{headers:s.headers}))}async listIndexes(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/ListIndexes`,l,{headers:n.headers}))}async deleteIndex(l,n){var s=this;return s.handleOperation(async()=>await Rt.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:l,indexName:n},{headers:s.headers})||{})}},Up=class extends di{constructor(l,n={},s){const r=l.replace(/\/$/,""),c=ee(ee({},_l),{},{"Content-Type":"application/json"},n);super(r,c,s,"vectors")}async putVectors(l){var n=this;if(l.vectors.length<1||l.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/PutVectors`,l,{headers:n.headers})||{})}async getVectors(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/GetVectors`,l,{headers:n.headers}))}async listVectors(l){var n=this;if(l.segmentCount!==void 0){if(l.segmentCount<1||l.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(l.segmentIndex!==void 0&&(l.segmentIndex<0||l.segmentIndex>=l.segmentCount))throw new Error(`segmentIndex must be between 0 and ${l.segmentCount-1}`)}return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/ListVectors`,l,{headers:n.headers}))}async queryVectors(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/QueryVectors`,l,{headers:n.headers}))}async deleteVectors(l){var n=this;if(l.keys.length<1||l.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/DeleteVectors`,l,{headers:n.headers})||{})}},Dp=class extends di{constructor(l,n={},s){const r=l.replace(/\/$/,""),c=ee(ee({},_l),{},{"Content-Type":"application/json"},n);super(r,c,s,"vectors")}async createBucket(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:l},{headers:n.headers})||{})}async getBucket(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:l},{headers:n.headers}))}async listBuckets(l={}){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/ListVectorBuckets`,l,{headers:n.headers}))}async deleteBucket(l){var n=this;return n.handleOperation(async()=>await Rt.post(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:l},{headers:n.headers})||{})}},Np=class extends Dp{constructor(l,n={}){super(l,n.headers||{},n.fetch)}from(l){return new zp(this.url,this.headers,l,this.fetch)}async createBucket(l){var n=()=>super.createBucket,s=this;return n().call(s,l)}async getBucket(l){var n=()=>super.getBucket,s=this;return n().call(s,l)}async listBuckets(l={}){var n=()=>super.listBuckets,s=this;return n().call(s,l)}async deleteBucket(l){var n=()=>super.deleteBucket,s=this;return n().call(s,l)}},zp=class extends jp{constructor(l,n,s,r){super(l,n,r),this.vectorBucketName=s}async createIndex(l){var n=()=>super.createIndex,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(l={}){var n=()=>super.listIndexes,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(l){var n=()=>super.getIndex,s=this;return n().call(s,s.vectorBucketName,l)}async deleteIndex(l){var n=()=>super.deleteIndex,s=this;return n().call(s,s.vectorBucketName,l)}index(l){return new kp(this.url,this.headers,this.vectorBucketName,l,this.fetch)}},kp=class extends Up{constructor(l,n,s,r,c){super(l,n,c),this.vectorBucketName=s,this.indexName=r}async putVectors(l){var n=()=>super.putVectors,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(l){var n=()=>super.getVectors,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(l={}){var n=()=>super.listVectors,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(l){var n=()=>super.queryVectors,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(l){var n=()=>super.deleteVectors,s=this;return n().call(s,ee(ee({},l),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},Mp=class extends xp{constructor(l,n={},s,r){super(l,n,s,r)}from(l){return new Op(this.url,this.headers,l,this.fetch)}get vectors(){return new Np(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Cp(this.url+"/iceberg",this.headers,this.fetch)}};const $m="2.95.3",oi=30*1e3,Ho=3,xo=Ho*oi,Lp="http://localhost:9999",Bp="supabase.auth.token",qp={"X-Client-Info":`gotrue-js/${$m}`},$o="X-Supabase-Api-Version",Gm={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Hp=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,$p=600*1e3;
75class vl extends Error{constructor(n,s,r){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=r}}function I(l){return typeof l=="object"&&l!==null&&"__isAuthError"in l}class Gp extends vl{constructor(n,s,r){super(n,s,r),this.name="AuthApiError",this.status=s,this.code=r}}function Vp(l){return I(l)&&l.name==="AuthApiError"}class gn extends vl{constructor(n,s){super(n),this.name="AuthUnknownError",this.originalError=s}}class va extends vl{constructor(n,s,r,c){super(n,r,c),this.name=s,this.status=r}}class Ot extends va{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Co(l){return I(l)&&l.name==="AuthSessionMissingError"}class ni extends va{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Vs extends va{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class Ys extends va{constructor(n,s=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Yp(l){return I(l)&&l.name==="AuthImplicitGrantRedirectError"}class vm extends va{constructor(n,s=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Kp extends va{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 Go extends va{constructor(n,s){super(n,"AuthRetryableFetchError",s,void 0)}}function jo(l){return I(l)&&l.name==="AuthRetryableFetchError"}class pm extends va{constructor(n,s,r){super(n,"AuthWeakPasswordError",s,"weak_password"),this.reasons=r}}class Vo extends va{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Js="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),bm=` 76\r=`.split(""),Qp=(()=>{const l=new Array(128);for(let n=0;n<l.length;n+=1)l[n]=-1;for(let n=0;n<bm.length;n+=1)l[bm[n].charCodeAt(0)]=-2;for(let n=0;n<Js.length;n+=1)l[Js[n].charCodeAt(0)]=n;return l})();function _m(l,n,s){if(l!==null)for(n.queue=n.queue<<8|l,n.queuedBits+=8;n.queuedBits>=6;){const r=n.queue>>n.queuedBits-6&63;s(Js[r]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const r=n.queue>>n.queuedBits-6&63;s(Js[r]),n.queuedBits-=6}}function Vm(l,n,s){const r=Qp[l];if(r>-1)for(n.queue=n.queue<<6|r,n.queuedBits+=6;n.queuedBits>=8;)s(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(l)}"`)}}function wm(l){const n=[],s=d=>{n.push(String.fromCodePoint(d))},r={utf8seq:0,codepoint:0},c={queue:0,queuedBits:0},f=d=>{Zp(d,r,s)};for(let d=0;d<l.length;d+=1)Vm(l.charCodeAt(d),c,f);return n.join("")}function Xp(l,n){if(l<=127){n(l);return}else if(l<=2047){n(192|l>>6),n(128|l&63);return}else if(l<=65535){n(224|l>>12),n(128|l>>6&63),n(128|l&63);return}else if(l<=1114111){n(240|l>>18),n(128|l>>12&63),n(128|l>>6&63),n(128|l&63);return}throw new Error(`Unrecognized Unicode codepoint: ${l.toString(16)}`)}function Jp(l,n){for(let s=0;s<l.length;s+=1){let r=l.charCodeAt(s);if(r>55295&&r<=56319){const c=(r-55296)*1024&65535;r=(l.charCodeAt(s+1)-56320&65535|c)+65536,s+=1}Xp(r,n)}}function Zp(l,n,s){if(n.utf8seq===0){if(l<=127){s(l);return}for(let r=1;r<6;r+=1)if((l>>7-r&1)===0){n.utf8seq=r;break}if(n.utf8seq===2)n.codepoint=l&31;else if(n.utf8seq===3)n.codepoint=l&15;else if(n.utf8seq===4)n.codepoint=l&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(l<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|l&63,n.utf8seq-=1,n.utf8seq===0&&s(n.codepoint)}}function hi(l){const n=[],s={queue:0,queuedBits:0},r=c=>{n.push(c)};for(let c=0;c<l.length;c+=1)Vm(l.charCodeAt(c),s,r);return new Uint8Array(n)}function Ip(l){const n=[];return Jp(l,s=>n.push(s)),new Uint8Array(n)}function vn(l){const n=[],s={queue:0,queuedBits:0},r=c=>{n.push(c)};return l.forEach(c=>_m(c,s,r)),_m(null,s,r),n.join("")}function Pp(l){return Math.round(Date.now()/1e3)+l}function Wp(){return Symbol("auth-callback")}const at=()=>typeof window<"u"&&typeof document<"u",fn={tested:!1,writable:!1},Ym=()=>{if(!at())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(fn.tested)return fn.writable;const l=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(l,l),globalThis.localStorage.removeItem(l),fn.tested=!0,fn.writable=!0}catch{fn.tested=!0,fn.writable=!1}return fn.writable};function Fp(l){const n={},s=new URL(l);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEac
76h((c,f)=>{n[f]=c})}catch{}return s.searchParams.forEach((r,c)=>{n[c]=r}),n}const Km=l=>l?(...n)=>l(...n):(...n)=>fetch(...n),e0=l=>typeof l=="object"&&l!==null&&"status"in l&&"ok"in l&&"json"in l&&typeof l.json=="function",ci=async(l,n,s)=>{await l.setItem(n,JSON.stringify(s))},hn=async(l,n)=>{const s=await l.getItem(n);if(!s)return null;try{return JSON.parse(s)}catch{return s}},tt=async(l,n)=>{await l.removeItem(n)};class er{constructor(){this.promise=new er.promiseConstructor((n,s)=>{this.resolve=n,this.reject=s})}}er.promiseConstructor=Promise;function Ks(l){const n=l.split(".");if(n.length!==3)throw new Vo("Invalid JWT structure");for(let r=0;r<n.length;r++)if(!Hp.test(n[r]))throw new Vo("JWT not in base64url format");return{header:JSON.parse(wm(n[0])),payload:JSON.parse(wm(n[1])),signature:hi(n[2]),raw:{header:n[0],payload:n[1]}}}async function t0(l){return await new Promise(n=>{setTimeout(()=>n(null),l)})}function a0(l,n){return new Promise((r,c)=>{(async()=>{for(let f=0;f<1/0;f++)try{const d=await l(f);if(!n(f,null,d)){r(d);return}}catch(d){if(!n(f,d)){c(d);return}}})()})}function n0(l){return("0"+l.toString(16)).substr(-2)}function i0(){const n=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=s.length;let c="";for(let f=0;f<56;f++)c+=s.charAt(Math.floor(Math.random()*r));return c}return crypto.getRandomValues(n),Array.from(n,n0).join("")}async function l0(l){const s=new TextEncoder().encode(l),r=await crypto.subtle.digest("SHA-256",s),c=new Uint8Array(r);return Array.from(c).map(f=>String.fromCharCode(f)).join("")}async function s0(l){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."),l;const s=await l0(l);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ii(l,n,s=!1){const r=i0();let c=r;s&&(c+="/PASSWORD_RECOVERY"),await ci(l,`${n}-code-verifier`,c);const f=await s0(r);return[f,r===f?"plain":"s256"]}const r0=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function u0(l){const n=l.headers.get($o);if(!n||!n.match(r0))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function o0(l){if(!l)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(l<=n)throw new Error("JWT has expired")}function c0(l){switch(l){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 f0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function li(l){if(!f0.test(l))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Uo(){const l={};return new Proxy(l,{get:(n,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const r=s.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="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:(n,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:(n,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 h0(l,n){return new Proxy(l,{get:(s,r,c)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const f=r.toString();if(f==="Symbol(Symbol.toPrimitive)"||f==="Symbol(Symbol.toStringTag)"||f==="Symbol(util.inspect.custom)"||f==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,r,c)}return!n.value&&typeof r=="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."),n.value=!0),Reflect.get(s,r,c)}})}function Sm(l){return JSON.parse(JSON.stringify(l))}const mn=l=>l.msg||l.message||l.error_description||l.error||JSON.stringify(l),d0=[502,503,504];async function Em(l){var n;if(!e0(l))throw new Go(mn(l),0);if(d0.includes(l.status))throw new Go(mn(l),l.status);let s;try{s=await l.json()}catch(f){throw new gn(mn(f),f)}let r;const c=u0(l);if(c&&c.getTime()>=Gm["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?r=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(r=s.error_code),r){if(r==="weak_password")throw new pm(mn(s),l.status,((n=s.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(r==="session_not_found")throw new Ot}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((f,d)=>
76f&&typeof d=="string",!0))throw new pm(mn(s),l.status,s.weak_password.reasons);throw new Gp(mn(s),l.status||500,r)}const m0=(l,n,s,r)=>{const c={method:l,headers:(n==null?void 0:n.headers)||{}};return l==="GET"?c:(c.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n==null?void 0:n.headers),c.body=JSON.stringify(r),Object.assign(Object.assign({},c),s))};async function F(l,n,s,r){var c;const f=Object.assign({},r==null?void 0:r.headers);f[$o]||(f[$o]=Gm["2024-01-01"].name),r!=null&&r.jwt&&(f.Authorization=`Bearer ${r.jwt}`);const d=(c=r==null?void 0:r.query)!==null&&c!==void 0?c:{};r!=null&&r.redirectTo&&(d.redirect_to=r.redirectTo);const m=Object.keys(d).length?"?"+new URLSearchParams(d).toString():"",v=await y0(l,n,s+m,{headers:f,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(v):{data:Object.assign({},v),error:null}}async function y0(l,n,s,r,c,f){const d=m0(n,r,c,f);let m;try{m=await l(s,Object.assign({},d))}catch(v){throw console.error(v),new Go(mn(v),0)}if(m.ok||await Em(m),r!=null&&r.noResolveJson)return m;try{return await m.json()}catch(v){await Em(v)}}function Yt(l){var n;let s=null;p0(l)&&(s=Object.assign({},l),l.expires_at||(s.expires_at=Pp(l.expires_in)));const r=(n=l.user)!==null&&n!==void 0?n:l;return{data:{session:s,user:r},error:null}}function Tm(l){const n=Yt(l);return!n.error&&l.weak_password&&typeof l.weak_password=="object"&&Array.isArray(l.weak_password.reasons)&&l.weak_password.reasons.length&&l.weak_password.message&&typeof l.weak_password.message=="string"&&l.weak_password.reasons.reduce((s,r)=>s&&typeof r=="string",!0)&&(n.data.weak_password=l.weak_password),n}function Ya(l){var n;return{data:{user:(n=l.user)!==null&&n!==void 0?n:l},error:null}}function g0(l){return{data:l,error:null}}function v0(l){const{action_link:n,email_otp:s,hashed_token:r,redirect_to:c,verification_type:f}=l,d=Ps(l,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),m={action_link:n,email_otp:s,hashed_token:r,redirect_to:c,verification_type:f},v=Object.assign({},d);return{data:{properties:m,user:v},error:null}}function Am(l){return l}function p0(l){return l.access_token&&l.refresh_token&&l.expires_in}const Do=["global","local","others"];class b0{constructor({url:n="",headers:s={},fetch:r}){this.url=n,this.headers=s,this.fetch=Km(r),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)}}async signOut(n,s=Do[0]){if(Do.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Do.join(", ")}`);try{return await F(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async inviteUserByEmail(n,s={}){try{return await F(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Ya})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async generateLink(n){try{const{options:s}=n,r=Ps(n,["options"]),c=Object.assign(Object.assign({},r),s);return"newEmail"in r&&(c.new_email=r==null?void 0:r.newEmail,delete c.newEmail),await F(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:c,headers:this.headers,xform:v0,redirectTo:s==null?void 0:s.redirectTo})}catch(s){if(I(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(n){try{return await F(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:Ya})}catch(s){if(I(s))return{data:{user:null},error:s};throw s}}async listUsers(n){var s,r,c,f,d,m,v;try{const g={nextPage:null,lastPage:0,total:0},b=await F(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:"",per_page:(f=(c=n==null?void 0:n.perPage)===null||c===void 0?void 0:c.toString())!==null&&f!==void 0?f:""},xform:Am});if(b.error)throw b.error;const S=await b.json(),A=(d=b.headers.get("x-total-count"))!==null&&d!==void 0?d:0,T=(v=(m=b.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&v!==void 0?v:[];return T.length>0&&(T.forEach(U=>{const L=parseInt(U.split(";")[0].split("=")[1].substring(0,1)),q=JSON.parse(U.split(";")[1].split("=")[1]);g[`${q}Page`]=L}),g.total=parseInt(A)),{data:Object.assign(Object.assign({},S),g),error:null}}catch(g){if(I(g))return{data:{users:[]},error:g};throw g}}async getUserById(n){li(n);try{return await F(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:Ya})}catch(s){if(I(s))return{data:{user:null},error:s};throw s}}async updateUserById(n,s){li(n);try{return await F(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:s,headers:this.headers,xform:Ya})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async deleteUser(n,s=!1){li(n);
76try{return await F(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:s},xform:Ya})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async _listFactors(n){li(n.userId);try{const{data:s,error:r}=await F(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:c=>({data:{factors:c},error:null})});return{data:s,error:r}}catch(s){if(I(s))return{data:null,error:s};throw s}}async _deleteFactor(n){li(n.userId),li(n.id);try{return{data:await F(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(s){if(I(s))return{data:null,error:s};throw s}}async _listOAuthClients(n){var s,r,c,f,d,m,v;try{const g={nextPage:null,lastPage:0,total:0},b=await F(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:"",per_page:(f=(c=n==null?void 0:n.perPage)===null||c===void 0?void 0:c.toString())!==null&&f!==void 0?f:""},xform:Am});if(b.error)throw b.error;const S=await b.json(),A=(d=b.headers.get("x-total-count"))!==null&&d!==void 0?d:0,T=(v=(m=b.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&v!==void 0?v:[];return T.length>0&&(T.forEach(U=>{const L=parseInt(U.split(";")[0].split("=")[1].substring(0,1)),q=JSON.parse(U.split(";")[1].split("=")[1]);g[`${q}Page`]=L}),g.total=parseInt(A)),{data:Object.assign(Object.assign({},S),g),error:null}}catch(g){if(I(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(n){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(I(s))return{data:null,error:s};throw s}}async _getOAuthClient(n){try{return await F(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(I(s))return{data:null,error:s};throw s}}async _updateOAuthClient(n,s){try{return await F(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:s,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(n){try{return await F(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(I(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(n){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(I(s))return{data:null,error:s};throw s}}}function Om(l={}){return{getItem:n=>l[n]||null,setItem:(n,s)=>{l[n]=s},removeItem:n=>{delete l[n]}}}const si={debug:!!(globalThis&&Ym()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Qm extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class _0 extends Qm{}async function w0(l,n,s){si.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",l,n);const r=new globalThis.AbortController;return n>0&&setTimeout(()=>{r.abort(),si.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",l)},n),await Promise.resolve().then(()=>globalThis.navigator.locks.request(l,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async c=>{if(c){si.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",l,c.name);try{return await s()}finally{si.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",l,c.name)}}else{if(n===0)throw si.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",l),new _0(`Acquiring an exclusive Navigator LockManager lock "${l}" immediately failed`);if(si.debug)try{const f=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(f,null," "))}catch(f){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",f)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await s()}}))}function S0(){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 Xm(l){if(!/^0x[a-fA-F0-9]{40}$/.test(l))throw new Error(`@supabase/auth-js: Address "${l}
76" is invalid.`);return l.toLowerCase()}function E0(l){return parseInt(l,16)}function T0(l){const n=new TextEncoder().encode(l);return"0x"+Array.from(n,r=>r.toString(16).padStart(2,"0")).join("")}function A0(l){var n;const{chainId:s,domain:r,expirationTime:c,issuedAt:f=new Date,nonce:d,notBefore:m,requestId:v,resources:g,scheme:b,uri:S,version:A}=l;{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(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(d&&d.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${d}`);if(!S)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(A!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${A}`);if(!((n=l.statement)===null||n===void 0)&&n.includes(` 77`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${l.statement}`)}const T=Xm(l.address),U=b?`${b}://${r}`:r,L=l.statement?`${l.statement} 78`:"",q=`${U} wants you to sign in with your Ethereum account: 79${T} 80 81${L}`;let H=`URI: ${S} 82Version: ${A} 83Chain ID: ${s}${d?` 84Nonce: ${d}`:""} 85Issued At: ${f.toISOString()}`;if(c&&(H+=` 86Expiration Time: ${c.toISOString()}`),m&&(H+=` 87Not Before: ${m.toISOString()}`),v&&(H+=` 88Request ID: ${v}`),g){let $=` 89Resources:`;for(const z of g){if(!z||typeof z!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${z}`);$+=` 90- ${z}`}H+=$}return`${q} 91${H}`}class Ve extends Error{constructor({message:n,code:s,cause:r,name:c}){var f;super(n,{cause:r}),this.__isWebAuthnError=!0,this.name=(f=c??(r instanceof Error?r.name:void 0))!==null&&f!==void 0?f:"Unknown Error",this.code=s}}class Zs extends Ve{constructor(n,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:n}),this.name="WebAuthnUnknownError",this.originalError=s}}function O0({error:l,options:n}){var s,r,c;const{publicKey:f}=n;if(!f)throw Error("options was missing required publicKey property");if(l.name==="AbortError"){if(n.signal instanceof AbortSignal)return new Ve({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:l})}else if(l.name==="ConstraintError"){if(((s=f.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new Ve({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:l});if(n.mediation==="conditional"&&((r=f.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ve({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:l});if(((c=f.authenticatorSelection)===null||c===void 0?void 0:c.userVerification)==="required")return new Ve({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:l})}else{if(l.name==="InvalidStateError")return new Ve({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:l});if(l.name==="NotAllowedError")return new Ve({message:l.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l});if(l.name==="NotSupportedError")return f.pubKeyCredParams.filter(m=>m.type==="public-key").length===0?new Ve({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:l}):new Ve({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:l});if(l.name==="SecurityError"){const d=window.location.hostname;if(Jm(d)){if(f.rp.id!==d)return new Ve({message:`The RP ID "${f.rp.id}
91" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:l})}else return new Ve({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:l})}else if(l.name==="TypeError"){if(f.user.id.byteLength<1||f.user.id.byteLength>64)return new Ve({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:l})}else if(l.name==="UnknownError")return new Ve({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:l})}return new Ve({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l})}function R0({error:l,options:n}){const{publicKey:s}=n;if(!s)throw Error("options was missing required publicKey property");if(l.name==="AbortError"){if(n.signal instanceof AbortSignal)return new Ve({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:l})}else{if(l.name==="NotAllowedError")return new Ve({message:l.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l});if(l.name==="SecurityError"){const r=window.location.hostname;if(Jm(r)){if(s.rpId!==r)return new Ve({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:l})}else return new Ve({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:l})}else if(l.name==="UnknownError")return new Ve({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:l})}return new Ve({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l})}class x0{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const C0=new x0;function j0(l){if(!l)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(l);const{challenge:n,user:s,excludeCredentials:r}=l,c=Ps(l,["challenge","user","excludeCredentials"]),f=hi(n).buffer,d=Object.assign(Object.assign({},s),{id:hi(s.id).buffer}),m=Object.assign(Object.assign({},c),{challenge:f,user:d});if(r&&r.length>0){m.excludeCredentials=new Array(r.length);for(let v=0;v<r.length;v++){const g=r[v];m.excludeCredentials[v]=Object.assign(Object.assign({},g),{id:hi(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return m}function U0(l){if(!l)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(l);const{challenge:n,allowCredentials:s}=l,r=Ps(l,["challenge","allowCredentials"]),c=hi(n).buffer,f=Object.assign(Object.assign({},r),{challenge:c});if(s&&s.length>0){f.allowCredentials=new Array(s.length);for(let d=0;d<s.length;d++){const m=s[d];f.allowCredentials[d]=Object.assign(Object.assign({},m),{id:hi(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function D0(l){var n;if("toJSON"in l&&typeof l.toJSON=="function")return l.toJSON();const s=l;return{id:l.id,rawId:l.id,response:{attestationObject:vn(new Uint8Array(l.response.attestationObject)),clientDataJSON:vn(new Uint8Array(l.response.clientDataJSON))},type:"public-key",clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function N0(l){var n;if("toJSON"in l&&typeof l.toJSON=="function")return l.toJSON();const s=l,r=l.getClientExtensionResults(),c=l.response;return{id:l.id,rawId:l.id,response:{authenticatorData:vn(new Uint8Array(c.authenticatorData)),clientDataJSON:vn(new Uint8Array(c.clientDataJSON)),signature:vn(new Uint8Array(c.signature)),userHandle:c.userHandle?vn(new Uint8Array(c.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function Jm(l){return l==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(l)}function Rm(){var l,n;return!!(at()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((l=navigator==null?void 0:navigator.credentials)===null||l===void 0?void 0:l.create)=="function"&&typeof((n=navigator==null?void 0:navigator.credentials)===null||n===void 0?void 0:n.get)=="function")}async function z0(l){try{const n=await navigator.credentials.create(l);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new Zs("Browser returned unexpected credential type",n)}:{data:null,error:new Zs("Empty credential response",n)}}catch(n){return{data:null,error:O0({error:n,options:l})}}}async function k0(l){try{const n=await navigator.credentials.get(l);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new Zs("Browser returned unexpected credential type",n)}:{data:null,error:new Zs("Empty credential response",n)}}catch(n){return{data:null,error:R0({error:n,options:l})}}}const M0={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},L0={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Is(...l){const n=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),s=c=>c instanceof ArrayBuffer||ArrayBuffer.isView(c),r={};for(const c of l)if(c)for(const f in c){const d=c[f];if(d!==void 0)if(Array.isArray(d))r[f]=d;else if(s(d))r[f]=d;else if(n(d)){const m=r[f];n(m)?r[f]=Is(m,d):r[f]=Is(d)}else r[f]=d}return r}function B0(l,n){return Is(M0,l,n||{})}function q0(l,n){return Is(L0,l,n||{})}class H0{constructor(n){this.client=n,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(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:s,friendlyName:r,signal:c},f){var d;try{const{data:m,error:v}=await this.client.mfa.challenge({factorId:n,webauthn:s});if(!m)return{data:null,error:v};const g=c??C0.createNewAbortSignal();if(m.webauthn.type==="create"){const{user:b}=m.webauthn.credential_options.publicKey;if(!b.name){const S=r;if(S)b.name=`${b.id}:${S}`;else{const T=(await this.client.getUser()).data.user,U=((d=T==null?void 0:T.user_metadata)===null||d===void 0?void 0:d.name)||(T==null?void 0:T.email)||(T==null?void 0:T.id)||"User";b.name=`${b.id}:${U}`}}b.displayName||(b.displayName=b.name)}switch(m.webauthn.type){case"create":{const b=B0(m.webauthn.credential_options.publicKey,f==null?void 0:f.create),{data:S,error:A}=await z0({publicKey:b,signal:g});return S?{data:{factorId:n,challengeId:m.id,webauthn:{type:m.webauthn.type,credential_response:S}},error:null}:{data:null,error:A}}case"request":{const b=q0(m.webauthn.credential_options.publicKey,f==null?void 0:f.request),{data:S,error:A}=await k0(Object.assign(Object.assign({},m.webauthn.credential_options),{publicKey:b,signal:g}));return S?{data:{factorId:n,challengeId:m.id,webauthn:{type:m.webauthn.type,credential_response:S}},error:null}:{data:null,error:A}}}}catch(m){return I(m)?{data:null,error:m}:{data:null,error:new gn("Unexpected error in challenge",m)}}}async _verify({challengeId:n,factorId:s,webauthn:r}){return this.client.mfa.verify({factorId:s,challengeId:n,webauthn:r})}async _authenticate({factorId:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},f){if(!s)return{data:null,error:new vl("rpId is required for WebAuthn authentication")};try{if(!Rm())return{data:null,error:new gn("Browser does not support WebAuthn",null)};const{data:d,error:m}=await this.challenge({factorId:n,webauthn:{rpId:s,rpOrigins:r},signal:c},{request:f});if(!d)return{data:null,error:m};const{webauthn:v}=d;return this._verify({factorId:n,challengeId:d.challengeId,webauthn:{type:v.type,rpId:s,rpOrigins:r,credential_response:v.credential_response}})}catch(d){return I(d)?{data:null,error:d}:{data:null,error:new gn("Unexpected error in authenticate",d)}}}async _register({friendlyName:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},f){if(!s)return{data:null,error:new vl("rpId is required for WebAuthn registration")};try{if(!Rm())return{data:null,error:new gn("Browser does not support WebAuthn",null)};const{data:d,error:m}=await this._enroll({friendlyName:n});if(!d)return await this.client.mfa.listFactors().then(b=>{var S;return(S=b.data)===null||S===void 0?void 0:S.all.find(A=>A.factor_type==="webauthn"&&A.friendly_name===n&&A.status!=="unverified")}).then(b=>b?this.client.mfa.unenroll({factorId:b==null?void 0:b.id}):void 0),{data:null,error:m};const{data:v,error:g}=await this._challenge({factorId:d.id,friendlyName:d.friendly_name,webauthn:{rpId:s,rpOrigins:r},signal:c},{create:f});return v?this._verify({factorId:d.id,challengeId:v.challengeId,webauthn:{rpId:s,rpOrigins:r,type:v.webauthn.type,credential_response:v.webauthn.credential_response}}):{data:null,error:g}}catch(d){return I(d)?{data:null,error:d}:{data:null,error:new gn("Unexpected error in register",d)}}}}S0();const $0={url:Lp,storageKey:Bp,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:qp,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function xm(l,n,s){return await s()}const ri={};class pl{get jwks(){var n,s;return(s=(n=ri[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(n){ri[this.storageKey]=Object.assign(Object.assign({},ri[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,s;return(s=(n=ri[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){ri[this.storageKey]=Object.assign(Object.assign({},ri[this.storageKey]),{cachedAt:n})}constructor(n){var s,r,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const f=Object.assign(Object.assign({},$0),n);if(this.storageKey=f.storageKey,this.instanceID=(s=pl.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,pl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!f.debug,typeof f.debug=="function"&&(this.logger=f.debug),this.instanceID>0&&at()){const d=`${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(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=f.persistSession,this.autoRefreshToken=f.autoRefreshToken,this.admin=new b0({url:f.url,headers:f.headers,fetch:f.fetch}),this.url=f.url,this.headers=f.headers,this.fetch=Km(f.fetch),this.lock=f.lock||xm,this.detectSessionInUrl=f.detectSessionInUrl,this.flowType=f.flowType,this.hasCustomAuthorizationHeader=f.hasCustomAuthorizationHeader,this.throwOnError=f.throwOnError,this.lockAcquireTimeout=f.lockAcquireTimeout,f.lock?this.lock=f.lock:this.persistSession&&at()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=w0:this.lock=xm,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 H0(this)}
91,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.persistSession?(f.storage?this.storage=f.storage:Ym()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Om(this.memoryStorage)),f.userStorage&&(this.userStorage=f.userStorage)):(this.memoryStorage={},this.storage=Om(this.memoryStorage)),at()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(m){this._debug("#broadcastChannel","error",m)}})}this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${$m}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let s={},r="none";if(at()&&(s=Fp(window.location.href),this._isImplicitGrantCallback(s)?r="implicit":await this._isPKCECallback(s)&&(r="pkce")),at()&&this.detectSessionInUrl&&r!=="none"){const{data:c,error:f}=await this._getSessionFromURL(s,r);if(f){if(this._debug("#_initialize()","error detecting session from URL",f),Yp(f)){const v=(n=f.details)===null||n===void 0?void 0:n.code;if(v==="identity_already_exists"||v==="identity_not_found"||v==="single_identity_not_deletable")return{error:f}}return{error:f}}const{session:d,redirectType:m}=c;return this._debug("#_initialize()","detected session in URL",d,"redirect type",m),await this._saveSession(d),setTimeout(async()=>{m==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",d):await this._notifyAllSubscribers("SIGNED_IN",d)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return I(s)?this._returnResult({error:s}):this._returnResult({error:new gn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var s,r,c;try{const f=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(c=n==null?void 0:n.options)===null||c===void 0?void 0:c.captchaToken}},xform:Yt}),{data:d,error:m}=f;if(m||!d)return this._returnResult({data:{user:null,session:null},error:m});const v=d.session,g=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",v)),this._returnResult({data:{user:g,session:v},error:null})}catch(f){if(I(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async signUp(n){var s,r,c;try{let f;if("email"in n){const{email:b,password:S,options:A}=n;let T=null,U=null;this.flowType==="pkce"&&([T,U]=await ii(this.storage,this.storageKey)),f=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:A==null?void 0:A.emailRedirectTo,body:{email:b,password:S,data:(s=A==null?void 0:A.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:A==null?void 0:A.captchaToken},code_challenge:T,code_challenge_method:U},xform:Yt})}else if("phone"in n){const{phone:b,password:S,options:A}=n;f=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:b,password:S,data:(r=A==null?void 0:A.data)!==null&&r!==void 0?r:{},channel:(c=A==null?void 0:A.channel)!==null&&c!==void 0?c:"sms",gotrue_meta_security:{captcha_token:A==null?void 0:A.captchaToken}},xform:Yt})}else throw new Vs("You must provide either an email or phone number and a password");const{data:d,error:m}=f;if(m||!d)return await tt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:m});const v=d.session,g=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",v)),this._returnResult({data:{user:g,session:v},error:null})}catch(f){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async signInWithPassword(n){try{let s;if("email"in n){const{email:f,password:d,options:m}=n;
91s=await F(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:f,password:d,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:Tm})}else if("phone"in n){const{phone:f,password:d,options:m}=n;s=await F(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:f,password:d,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:Tm})}else throw new Vs("You must provide either an email or phone number and a password");const{data:r,error:c}=s;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!r||!r.session||!r.user){const f=new ni;return this._returnResult({data:{user:null,session:null},error:f})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:c})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(n){var s,r,c,f;return await this._handleProviderSignIn(n.provider,{redirectTo:(s=n.options)===null||s===void 0?void 0:s.redirectTo,scopes:(r=n.options)===null||r===void 0?void 0:r.scopes,queryParams:(c=n.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:(f=n.options)===null||f===void 0?void 0:f.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:s}=n;switch(s){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(n){var s,r,c,f,d,m,v,g,b,S,A;let T,U;if("message"in n)T=n.message,U=n.signature;else{const{chain:L,wallet:q,statement:H,options:$}=n;let z;if(at())if(typeof q=="object")z=q;else{const xe=window;if("ethereum"in xe&&typeof xe.ethereum=="object"&&"request"in xe.ethereum&&typeof xe.ethereum.request=="function")z=xe.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 q!="object"||!($!=null&&$.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");z=q}const Y=new URL((s=$==null?void 0:$.url)!==null&&s!==void 0?s:window.location.href),ne=await z.request({method:"eth_requestAccounts"}).then(xe=>xe).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!ne||ne.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const Q=Xm(ne[0]);let Z=(r=$==null?void 0:$.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!Z){const xe=await z.request({method:"eth_chainId"});Z=E0(xe)}const ge={domain:Y.host,address:Q,statement:H,uri:Y.href,version:"1",chainId:Z,nonce:(c=$==null?void 0:$.signInWithEthereum)===null||c===void 0?void 0:c.nonce,issuedAt:(d=(f=$==null?void 0:$.signInWithEthereum)===null||f===void 0?void 0:f.issuedAt)!==null&&d!==void 0?d:new Date,expirationTime:(m=$==null?void 0:$.signInWithEthereum)===null||m===void 0?void 0:m.expirationTime,notBefore:(v=$==null?void 0:$.signInWithEthereum)===null||v===void 0?void 0:v.notBefore,requestId:(g=$==null?void 0:$.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(b=$==null?void 0:$.signInWithEthereum)===null||b===void 0?void 0:b.resources};T=A0(ge),U=await z.request({method:"personal_sign",params:[T0(T),Q]})}try{const{data:L,error:q}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:T,signature:U},!((S=n.options)===null||S===void 0)&&S.captchaToken?{gotrue_meta_security:{captcha_token:(A=n.options)===null||A===void 0?void 0:A.captchaToken}}:null),xform:Yt});if(q)throw q;if(!L||!L.session||!L.user){const H=new ni;return this._returnResult({data:{user:null,session:null},error:H})}return L.session&&(await this._saveSession(L.session),await this._notifyAllSubscribers("SIGNED_IN",L.session)),this._returnResult({data:Object.assign({},L),error:q})}catch(L){if(I(L))return this._returnResult({data:{user:null,session:null},error:L});throw L}}async signInWithSolana(n){var s,r,c,f,d,m,v,g,b,S,A,T;let U,L;if("message"in n)U=n.message,L=n.signature;
91else{const{chain:q,wallet:H,statement:$,options:z}=n;let Y;if(at())if(typeof H=="object")Y=H;else{const Q=window;if("solana"in Q&&typeof Q.solana=="object"&&("signIn"in Q.solana&&typeof Q.solana.signIn=="function"||"signMessage"in Q.solana&&typeof Q.solana.signMessage=="function"))Y=Q.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 H!="object"||!(z!=null&&z.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");Y=H}const ne=new URL((s=z==null?void 0:z.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in Y&&Y.signIn){const Q=await Y.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},z==null?void 0:z.signInWithSolana),{version:"1",domain:ne.host,uri:ne.href}),$?{statement:$}:null));let Z;if(Array.isArray(Q)&&Q[0]&&typeof Q[0]=="object")Z=Q[0];else if(Q&&typeof Q=="object"&&"signedMessage"in Q&&"signature"in Q)Z=Q;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in Z&&"signature"in Z&&(typeof Z.signedMessage=="string"||Z.signedMessage instanceof Uint8Array)&&Z.signature instanceof Uint8Array)U=typeof Z.signedMessage=="string"?Z.signedMessage:new TextDecoder().decode(Z.signedMessage),L=Z.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in Y)||typeof Y.signMessage!="function"||!("publicKey"in Y)||typeof Y!="object"||!Y.publicKey||!("toBase58"in Y.publicKey)||typeof Y.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");U=[`${ne.host} wants you to sign in with your Solana account:`,Y.publicKey.toBase58(),...$?["",$,""]:[""],"Version: 1",`URI: ${ne.href}`,`Issued At: ${(c=(r=z==null?void 0:z.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&c!==void 0?c:new Date().toISOString()}`,...!((f=z==null?void 0:z.signInWithSolana)===null||f===void 0)&&f.notBefore?[`Not Before: ${z.signInWithSolana.notBefore}`]:[],...!((d=z==null?void 0:z.signInWithSolana)===null||d===void 0)&&d.expirationTime?[`Expiration Time: ${z.signInWithSolana.expirationTime}`]:[],...!((m=z==null?void 0:z.signInWithSolana)===null||m===void 0)&&m.chainId?[`Chain ID: ${z.signInWithSolana.chainId}`]:[],...!((v=z==null?void 0:z.signInWithSolana)===null||v===void 0)&&v.nonce?[`Nonce: ${z.signInWithSolana.nonce}`]:[],...!((g=z==null?void 0:z.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${z.signInWithSolana.requestId}`]:[],...!((S=(b=z==null?void 0:z.signInWithSolana)===null||b===void 0?void 0:b.resources)===null||S===void 0)&&S.length?["Resources",...z.signInWithSolana.resources.map(Z=>`- ${Z}`)]:[]].join(` 92`);const Q=await Y.signMessage(new TextEncoder().encode(U),"utf8");if(!Q||!(Q instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");L=Q}}try{const{data:q,error:H}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:U,signature:vn(L)},!((A=n.options)===null||A===void 0)&&A.captchaToken?{gotrue_meta_security:{captcha_token:(T=n.options)===null||T===void 0?void 0:T.captchaToken}}:null),xform:Yt});if(H)throw H;if(!q||!q.session||!q.user){const $=new ni;return this._returnResult({data:{user:null,session:null},error:$})}return q.session&&(await this._saveSession(q.session),await this._notifyAllSubscribers("SIGNED_IN",q.session)),this._returnResult({data:Object.assign({},q),error:H})}catch(q){if(I(q))return this._returnResult({data:{user:null,session:null},error:q});throw q}}async _exchangeCodeForSession(n){const s=await hn(this.storage,`${this.storageKey}-code-verifier`),[r,c]=(s??"").split("/");try{if(!r&&this.flowType==="pkce")throw new Kp;const{data:f,error:d}=await F(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:r},xform:Yt});if(await tt(this.storage,`${this.storageKey}-code-verifier`),d)throw d;if(!f||!f.session||!f.user){const m=new ni;return this._returnResult({data:{user:null,session:null,redirectType:null},error:m})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:Object.assign(Object.assign({},f),{redirectType:c??null}),error:d})}catch(f){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(f))return this._returnResult({data:{user:null,session:null,redirectType:null},error:f});throw f}}async signInWithIdToken(n){try{const{options:s,provider:r,token:c,access_token:f,nonce:d}=n,m=await F(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:c,access_token:f,nonce:d,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Yt}),{data:v,error:g}=m;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!v||!v.session||!v.user){const b=new ni;return this._returnResult({data:{user:null,session:null},error:b})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:v,error:g})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(n){var s,r,c,f,d;try{if("email"in n){const{email:m,options:v}=n;let g=null,b=null;this.flowType==="pkce"&&([g,b]=await ii(this.storage,this.storageKey));const{error:S}=await F(this.fetch,"POST",`${this.url}
92/otp`,{headers:this.headers,body:{email:m,data:(s=v==null?void 0:v.data)!==null&&s!==void 0?s:{},create_user:(r=v==null?void 0:v.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken},code_challenge:g,code_challenge_method:b},redirectTo:v==null?void 0:v.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:S})}if("phone"in n){const{phone:m,options:v}=n,{data:g,error:b}=await F(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:m,data:(c=v==null?void 0:v.data)!==null&&c!==void 0?c:{},create_user:(f=v==null?void 0:v.shouldCreateUser)!==null&&f!==void 0?f:!0,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken},channel:(d=v==null?void 0:v.channel)!==null&&d!==void 0?d:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g==null?void 0:g.message_id},error:b})}throw new Vs("You must provide either an email or phone number.")}catch(m){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async verifyOtp(n){var s,r;try{let c,f;"options"in n&&(c=(s=n.options)===null||s===void 0?void 0:s.redirectTo,f=(r=n.options)===null||r===void 0?void 0:r.captchaToken);const{data:d,error:m}=await F(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:f}}),redirectTo:c,xform:Yt});if(m)throw m;if(!d)throw new Error("An error occurred on token verification.");const v=d.session,g=d.user;return v!=null&&v.access_token&&(await this._saveSession(v),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",v)),this._returnResult({data:{user:g,session:v},error:null})}catch(c){if(I(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithSSO(n){var s,r,c,f,d;try{let m=null,v=null;this.flowType==="pkce"&&([m,v]=await ii(this.storage,this.storageKey));const g=await F(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(r=(s=n.options)===null||s===void 0?void 0:s.redirectTo)!==null&&r!==void 0?r:void 0}),!((c=n==null?void 0:n.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:m,code_challenge_method:v}),headers:this.headers,xform:g0});return!((f=g.data)===null||f===void 0)&&f.url&&at()&&!(!((d=n.options)===null||d===void 0)&&d.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(m){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(m))return this._returnResult({data:null,error:m});throw m}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:s},error:r}=n;if(r)throw r;if(!s)throw new Ot;const{error:c}=await F(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:c})})}catch(n){if(I(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const s=`${this.url}/resend`;if("email"in n){const{email:r,type:c,options:f}=n,{error:d}=await F(this.fetch,"POST",s,{headers:this.headers,body:{email:r,type:c,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},redirectTo:f==null?void 0:f.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}else if("phone"in n){const{phone:r,type:c,options:f}=n,{data:d,error:m}=await F(this.fetch,"POST",s,{headers:this.headers,body:{phone:r,type:c,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:m})}throw new Vs("You must provide either an email or phone number and a type")}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(n,s){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),c=(async()=>(await r,await s()))();return this.pendingInLock.push((async()=>{try{await c}catch{}})()),c}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=s();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const c=[...this.pendingInLock];await Promise.all(c),this.pendingInLock.splice(0,c.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await n(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let n=null;const s=await hn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?n=s:(this._debug("#getSession()","session from storage is not val
92id"),await this._removeSession())),!n)return{data:{session:null},error:null};const r=n.expires_at?n.expires_at*1e3-Date.now()<xo:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",n.expires_at),!r){if(this.userStorage){const d=await hn(this.userStorage,this.storageKey+"-user");d!=null&&d.user?n.user=d.user:n.user=Uo()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const d={value:this.suppressGetSessionWarning};n.user=h0(n.user,d),d.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:c,error:f}=await this._callRefreshToken(n.refresh_token);return f?this._returnResult({data:{session:null},error:f}):this._returnResult({data:{session:c},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(n){try{return n?await F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:Ya}):await this._useSession(async s=>{var r,c,f;const{data:d,error:m}=s;if(m)throw m;return!(!((r=d.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ot}:await F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(f=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&f!==void 0?f:void 0,xform:Ya})})}catch(s){if(I(s))return Co(s)&&(await this._removeSession(),await tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(n,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(n,s))}async _updateUser(n,s={}){try{return await this._useSession(async r=>{const{data:c,error:f}=r;if(f)throw f;if(!c.session)throw new Ot;const d=c.session;let m=null,v=null;this.flowType==="pkce"&&n.email!=null&&([m,v]=await ii(this.storage,this.storageKey));const{data:g,error:b}=await F(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s==null?void 0:s.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:m,code_challenge_method:v}),jwt:d.access_token,xform:Ya});if(b)throw b;return d.user=g.user,await this._saveSession(d),await this._notifyAllSubscribers("USER_UPDATED",d),this._returnResult({data:{user:d.user},error:null})})}catch(r){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new Ot;const s=Date.now()/1e3;let r=s,c=!0,f=null;const{payload:d}=Ks(n.access_token);if(d.exp&&(r=d.exp,c=r<=s),c){const{data:m,error:v}=await this._callRefreshToken(n.refresh_token);if(v)return this._returnResult({data:{user:null,session:null},error:v});if(!m)return{data:{user:null,session:null},error:null};f=m}else{const{data:m,error:v}=await this._getUser(n.access_token);if(v)return this._returnResult({data:{user:null,session:null},error:v});f={access_token:n.access_token,refresh_token:n.refresh_token,user:m.user,token_type:"bearer",expires_in:r-s,expires_at:r},await this._saveSession(f),await this._notifyAllSubscribers("SIGNED_IN",f)}return this._returnResult({data:{user:f.user,session:f},error:null})}catch(s){if(I(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async s=>{var r;if(!n){const{data:d,error:m}=s;if(m)throw m;n=(r=d.session)!==null&&r!==void 0?r:void 0}if(!(n!=null&&n.refresh_token))throw new Ot;const{data:c,error:f}=await this._callRefreshToken(n.refresh_token);return f?this._returnResult({data:{user:null,session:null},error:f}):c?this._returnResult({data:{user:c.user,session:c},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(n,s){try{if(!at())throw new Ys("No browser detected.");
92if(n.error||n.error_description||n.error_code)throw new Ys(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new vm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ys("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new vm("No code detected.");const{data:$,error:z}=await this._exchangeCodeForSession(n.code);if(z)throw z;const Y=new URL(window.location.href);return Y.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Y.toString()),{data:{session:$.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:c,access_token:f,refresh_token:d,expires_in:m,expires_at:v,token_type:g}=n;if(!f||!m||!d||!g)throw new Ys("No session defined in URL");const b=Math.round(Date.now()/1e3),S=parseInt(m);let A=b+S;v&&(A=parseInt(v));const T=A-b;T*1e3<=oi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${T}s, should have been closer to ${S}s`);const U=A-S;b-U>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",U,A,b):b-U<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",U,A,b);const{data:L,error:q}=await this._getUser(f);if(q)throw q;const H={provider_token:r,provider_refresh_token:c,access_token:f,expires_in:S,expires_at:A,refresh_token:d,token_type:g,user:L.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:H,redirectType:n.type},error:null})}catch(r){if(I(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const s=await hn(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&s)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async s=>{var r;const{data:c,error:f}=s;if(f&&!Co(f))return this._returnResult({error:f});const d=(r=c.session)===null||r===void 0?void 0:r.access_token;if(d){const{error:m}=await this.admin.signOut(d,n);if(m&&!(Vp(m)&&(m.status===404||m.status===401||m.status===403)||Co(m)))return this._returnResult({error:m})}return n!=="others"&&(await this._removeSession(),await tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const s=Wp(),r={id:s,callback:n,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,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:r}}}async _emitInitialSession(n){return await this._useSession(async s=>{var r,c;try{const{data:{session:f},error:d}=s;if(d)throw d;await((r=this.stateChangeEmitters.get(n))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",f)),this._debug("INITIAL_SESSION","callback id",n,"session",f)}catch(f){await((c=this.stateChangeEmitters.get(n))===null||c===void 0?void 0:c.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",f),console.error(f)}})}async resetPasswordForEmail(n,s={}){let r=null,c=null;this.flowType==="pkce"&&([r,c]=await ii(this.storage,this.storageKey,!0));try{return await F(this.fetch,"POST",`${this.url}/recover`,{body:{email:n,code_challenge:r,code_challenge_method:c,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(f){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(f))return this._returnResult({data:null,error:f});throw f}}async getUserIdentities(){var n;try{const{data:s,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(n=s.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var s;try{const{data:r,error:c}=await this._useSession(async f=>{var d,m,v,g,b;const{data:S,error:A}=f;if(A)throw A;const T=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(d=n.options)===null||d===void 0?void 0:d.redirectTo,scopes:(m=n.options)===null||m===void 0?void 0:m.scopes,queryParams:(v=n.options)===null||v===void 0?void 0:v.queryParams,skipBrowserRedirect:!0});return await F(this.fetch,"GET",T,{headers:this.headers,jwt:(b=(g=S.session)===null||g===void 0?void 0:g.access_token)!==null&&b!==void 0?b:void 0})});if(c)throw c;return at()&&!(!((s=n.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:n.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(I(r))return this._returnResult({data:{provider:n.provider,url:null},error:r});throw r}}async linkIdentityIdToken(n){return await this._useSession(async s=>{var r;try{const{error:c,data:{session:f}}=s;if(c)throw c;const{options:d,provider:m,token:v,access_token:g,nonce:b}=n,S=await F(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=f==null?void 0:f.access_token)!==null&&r!==void 0?r:void 0,body:{provider:m,id_token:v,access_token:g,nonce:b,link_identity:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Yt}),{data:A,error:T}=S;return T?this._returnResult({data:{user:null,session:null},error:T}):!A||!A.session||!A.user?this._returnResult({data:{user:null,session:null},error:new ni}):(A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("USER_UPDATED",A.session)),this._returnResult({data:A,error:T}))}catch(c){if(await tt(this.storage,`${this.storageKey}-code-verifier`),I(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}})}async unlinkIdentity(n){try{return await this._useSession(async s=>{var r,c;const{data:f,error:d}=s;
92if(d)throw d;return await F(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(c=(r=f.session)===null||r===void 0?void 0:r.access_token)!==null&&c!==void 0?c:void 0})})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(n){const s=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(s,"begin");try{const r=Date.now();return await a0(async c=>(c>0&&await t0(200*Math.pow(2,c-1)),this._debug(s,"refreshing attempt",c),await F(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:Yt})),(c,f)=>{const d=200*Math.pow(2,c);return f&&jo(f)&&Date.now()+d-r<oi})}catch(r){if(this._debug(s,"error",r),I(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(s,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,s){const r=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",s,"url",r),at()&&!s.skipBrowserRedirect&&window.location.assign(r),{data:{provider:n,url:r},error:null}}async _recoverAndRefresh(){var n,s;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const c=await hn(this.storage,this.storageKey);if(c&&this.userStorage){let d=await hn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!d&&(d={user:c.user},await ci(this.userStorage,this.storageKey+"-user",d)),c.user=(n=d==null?void 0:d.user)!==null&&n!==void 0?n:Uo()}else if(c&&!c.user&&!c.user){const d=await hn(this.storage,this.storageKey+"-user");d&&(d!=null&&d.user)?(c.user=d.user,await tt(this.storage,this.storageKey+"-user"),await ci(this.storage,this.storageKey,c)):c.user=Uo()}if(this._debug(r,"session from storage",c),!this._isValidSession(c)){this._debug(r,"session is not valid"),c!==null&&await this._removeSession();return}const f=((s=c.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<xo;if(this._debug(r,`session has${f?"":" not"} expired with margin of ${xo}s`),f){if(this.autoRefreshToken&&c.refresh_token){const{error:d}=await this._callRefreshToken(c.refresh_token);d&&(console.error(d),jo(d)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",d),await this._removeSession()))}}else if(c.user&&c.user.__isUserNotAvailableProxy===!0)try{const{data:d,error:m}=await this._getUser(c.access_token);!m&&(d!=null&&d.user)?(c.user=d.user,await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(d){console.error("Error getting user data:",d),this._debug(r,"error getting user data, skipping SIGNED_IN notification",d)}else await this._notifyAllSubscribers("SIGNED_IN",c)}catch(c){this._debug(r,"error",c),console.error(c);return}finally{this._debug(r,"end")}}async _callRefreshToken(n){var s,r;if(!n)throw new Ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const c=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(c,"begin");try{this.refreshingDeferred=new er;const{data:f,error:d}=await this._refreshAccessToken(n);if(d)throw d;if(!f.session)throw new Ot;await this._saveSession(f.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",f.session);const m={data:f.session,error:null};return this.refreshingDeferred.resolve(m),m}catch(f){if(this._debug(c,"error",f),I(f)){const d={data:null,error:f};return jo(f)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(d),d}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(f),f}finally{this.refreshingDeferred=null,this._debug(c,"end")}}async _notifyAllSubscribers(n,s,r=!0){const c=`#_notifyAllSubscribers(${n})`;this._debug(c,"begin",s,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:n,session:s});const f=[],d=Array.from(this.stateChangeEmitters.values()).map(async m=>{try{await m.callback(n,s)}catch(v){f.push(v)}});if(await Promise.all(d),f.length>0){for(let m=0;m<f.length;m+=1)console.error(f[m]);throw f[0]}}finally{this._debug(c,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await tt(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},n),r=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&s.user&&await ci(this.userStorage,this.storageKey+"-user",{user:s.user});const c=Object.assign({},s);delete c.user;const f=Sm(c);await ci(this.storage,this.storageKey,f)}else{const c=Sm(s);await ci(this.storage,this.storageKey,c)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await tt(this.storage,this.storageKey),await tt(this.storage,this.storageKey+"-code-verifier"),await tt(this.storage,this.storageKey+"-user"),this.userStorage&&await tt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&at()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",n)}
92catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),oi);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n);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 n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(n);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 _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const n=Date.now();try{return await this._useSession(async s=>{const{data:{session:r}}=s;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const c=Math.floor((r.expires_at*1e3-n)/oi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${c} ticks, a tick lasts ${oi}ms, refresh threshold is ${Ho} ticks`),c<=Ho&&await this._callRefreshToken(r.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n.isAcquireTimeout||n instanceof Qm)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!at()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(n){this._debug("#visibilityChangedCallback","error",n)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const s=`#_onVisibilityChanged(${n})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,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()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(n,s,r){const c=[`provider=${encodeURIComponent(s)}`];if(r!=null&&r.redirectTo&&c.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&c.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[f,d]=await ii(this.storage,this.storageKey),m=new URLSearchParams({code_challenge:`${encodeURIComponent(f)}`,code_challenge_method:`${encodeURIComponent(d)}`});c.push(m.toString())}if(r!=null&&r.queryParams){const f=new URLSearchParams(r.queryParams);c.push(f.toString())}return r!=null&&r.skipBrowserRedirect&&c.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${n}?${c.join("&")}`}async _unenroll(n){try{return await this._useSession(async s=>{var r;const{data:c,error:f}=s;return f?this._returnResult({data:null,error:f}):await F(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(r=c==null?void 0:c.session)===null||r===void 0?void 0:r.access_token})})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(n){try{return await this._useSession(async s=>{var r,c;const{data:f,error:d}=s;if(d)return this._returnResult({data:null,error:d});const m=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:v,error:g}=await F(this.fetch,"POST",`${this.url}/factors`,{body:m,headers:this.headers,jwt:(r=f==null?void 0:f.session)===null||r===void 0?void 0:r.access_token});return g?this._returnResult({data:null,error:g}):(n.factorType==="totp"&&v.type==="totp"&&(!((c=v==null?void 0:v.totp)===null||c===void 0)&&c.qr_code)&&(v.totp.qr_code=`data:image/svg+xml;utf-8,${v.totp.qr_code}`),this._returnResult({data:v,error:null}))})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _verify(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var r;const{data:c,error:f}=s;if(f)return this._returnResult({data:null,error:f});const d=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?D0(n.webauthn.credential_response):N0(n.webauthn.credential_response)})}:{code:n.code}),{data:m,error:v}=await F(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:d,headers:this.headers,jwt:(r=c==null?void 0:c.session)===null||r===void 0?void 0:r.access_token});return v?this._returnResult({data:null,error:v}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+m.expires_in},m)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",m),this._returnResult({data:m,error:v}))})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var r;const{data:c,error:f}=s;if(f)return this._returnResult({data:null,error:f});const d=await F(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(r=c==null?void 0:c.session)===null||r===void 0?void 0:r.access_token});if(d.error)return d;const{data:m}=d;if(m.type!=="webauthn")return{data:m,error:null};switch(m.webauthn.type){case"create":return{data:Object.assign(Object.assign({},m),{webauthn:Object.assign(Object.assign({},m.webauthn),{credential_options:Object.assign(Object.assign({},m.webauthn.credential_options),{publicKey:j0(m.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},m),{webauthn:Object.assign(Object.assign({},m.webauthn),{credential_options:Object.assign(Object.assign({},m.webauthn.credential_options),{publicKey:U0(m.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(n){const{data:s,error:r}=await this._challenge({factorId:n.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:n.factorId,challengeId:s.id,code:n.code})}async _listFactors(){var n;const{data:{user:s},error:r}=await this.getUser();if(r)return{data:null,error:r};const c={all:[],phone:[],totp:[],webauthn:[]};for(const f of(n=s==null?void 0:s.factors)!==null&&n!==void 0?n:[])c.all.push(f),f.status==="verified"&&c[f.factor_type].push(f);return{data:c,error:null}}async _getAuthenticatorAssuranceLevel(n){var s,r,c,f;if(n)try{const{payload:T}=Ks(n);let U=null;T.aal&&(U=T.aal);let L=U;const{data:{user:q},error:H}=await this.getUser(n);if(H)return this._returnResult({data:null,error:H});((r=(s=q==null?void 0:q.factors)===null||s===void 0?void 0:s.filter(Y=>Y.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(L="aal2");const z=T.amr||[];return{data:{currentLevel:U,nextLevel:L,currentAuthenticationMethods:z},error:null}}catch(T){if(I(T))return this._returnResult({data:null,error:T});throw T}const{data:{session:d},error:m}
92=await this.getSession();if(m)return this._returnResult({data:null,error:m});if(!d)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:v}=Ks(d.access_token);let g=null;v.aal&&(g=v.aal);let b=g;((f=(c=d.user.factors)===null||c===void 0?void 0:c.filter(T=>T.status==="verified"))!==null&&f!==void 0?f:[]).length>0&&(b="aal2");const A=v.amr||[];return{data:{currentLevel:g,nextLevel:b,currentAuthenticationMethods:A},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async s=>{const{data:{session:r},error:c}=s;return c?this._returnResult({data:null,error:c}):r?await F(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:r.access_token,xform:f=>({data:f,error:null})}):this._returnResult({data:null,error:new Ot})})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(n,s){try{return await this._useSession(async r=>{const{data:{session:c},error:f}=r;if(f)return this._returnResult({data:null,error:f});if(!c)return this._returnResult({data:null,error:new Ot});const d=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"approve"},xform:m=>({data:m,error:null})});return d.data&&d.data.redirect_url&&at()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(d.data.redirect_url),d})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(n,s){try{return await this._useSession(async r=>{const{data:{session:c},error:f}=r;if(f)return this._returnResult({data:null,error:f});if(!c)return this._returnResult({data:null,error:new Ot});const d=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"deny"},xform:m=>({data:m,error:null})});return d.data&&d.data.redirect_url&&at()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(d.data.redirect_url),d})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:s},error:r}=n;return r?this._returnResult({data:null,error:r}):s?await F(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new Ot})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async s=>{const{data:{session:r},error:c}=s;return c?this._returnResult({data:null,error:c}):r?(await F(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ot})})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(n,s={keys:[]}){let r=s.keys.find(m=>m.kid===n);if(r)return r;const c=Date.now();if(r=this.jwks.keys.find(m=>m.kid===n),r&&this.jwks_cached_at+$p>c)return r;const{data:f,error:d}=await F(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(d)throw d;return!f.keys||f.keys.length===0||(this.jwks=f,this.jwks_cached_at=c,r=f.keys.find(m=>m.kid===n),!r)?null:r}async getClaims(n,s={}){try{let r=n;if(!r){const{data:T,error:U}
92=await this.getSession();if(U||!T.session)return this._returnResult({data:null,error:U});r=T.session.access_token}const{header:c,payload:f,signature:d,raw:{header:m,payload:v}}=Ks(r);s!=null&&s.allowExpired||o0(f.exp);const g=!c.alg||c.alg.startsWith("HS")||!c.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(c.kid,s!=null&&s.keys?{keys:s.keys}:s==null?void 0:s.jwks);if(!g){const{error:T}=await this.getUser(r);if(T)throw T;return{data:{claims:f,header:c,signature:d},error:null}}const b=c0(c.alg),S=await crypto.subtle.importKey("jwk",g,b,!0,["verify"]);if(!await crypto.subtle.verify(b,S,d,Ip(`${m}.${v}`)))throw new Vo("Invalid JWT signature");return{data:{claims:f,header:c,signature:d},error:null}}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}}pl.nextInstanceID={};const G0=pl,V0="2.95.3";let cl="";typeof Deno<"u"?cl="deno":typeof document<"u"?cl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?cl="react-native":cl="node";const Y0={"X-Client-Info":`supabase-js-${cl}/${V0}`},K0={headers:Y0},Q0={schema:"public"},X0={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},J0={};function bl(l){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bl(l)}function Z0(l,n){if(bl(l)!="object"||!l)return l;var s=l[Symbol.toPrimitive];if(s!==void 0){var r=s.call(l,n);if(bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(l)}function I0(l){var n=Z0(l,"string");return bl(n)=="symbol"?n:n+""}function P0(l,n,s){return(n=I0(n))in l?Object.defineProperty(l,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[n]=s,l}function Cm(l,n){var s=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);n&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),s.push.apply(s,r)}return s}function ke(l){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Cm(Object(s),!0).forEach(function(r){P0(l,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(s)):Cm(Object(s)).forEach(function(r){Object.defineProperty(l,r,Object.getOwnPropertyDescriptor(s,r))})}return l}const W0=l=>l?(...n)=>l(...n):(...n)=>fetch(...n),F0=()=>Headers,eb=(l,n,s)=>{const r=W0(s),c=F0();return async(f,d)=>{var m;const v=(m=await n())!==null&&m!==void 0?m:l;let g=new c(d==null?void 0:d.headers);return g.has("apikey")||g.set("apikey",l),g.has("Authorization")||g.set("Authorization",`Bearer ${v}`),r(f,ke(ke({},d),{},{headers:g}))}};function tb(l){return l.endsWith("/")?l:l+"/"}function ab(l,n){var s,r;const{db:c,auth:f,realtime:d,global:m}=l,{db:v,auth:g,realtime:b,global:S}=n,A={db:ke(ke({},v),c),auth:ke(ke({},g),f),realtime:ke(ke({},b),d),storage:{},global:ke(ke(ke({},S),m),{},{headers:ke(ke({},(s=S==null?void 0:S.headers)!==null&&s!==void 0?s:{}),(r=m==null?void 0:m.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return l.accessToken?A.accessToken=l.accessToken:delete A.accessToken,A}function nb(l){const n=l==null?void 0:l.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(tb(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var ib=class extends G0{constructor(l){super(l)}},lb=class{constructor(l,n,s){var r,c;this.supabaseUrl=l,this.supabaseKey=n;const f=nb(l);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",f),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",f),this.storageUrl=new URL("storage/v1",f),this.functionsUrl=new URL("functions/v1",f);const d=`sb-${f.hostname.split(".")[0]}-auth-token`,m={db:Q0,realtime:J0,auth:ke(ke({},X0),{},{storageKey:d}),global:K0},v=ab(s??{},m);if(this.storageKey=(r=v.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(c=v.global.headers)!==null&&c!==void 0?c:{},v.accessToken)this.accessToken=v.accessToken,this.auth=new Proxy({},{get:(b,S)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(S)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=v.auth)!==null&&g!==void 0?g:{},this.headers,v.global.fetch)}this.fetch=eb(n,this._getAccessToken.bind(this),v.global.fetch),this.realtime=this._initRealtimeClient(ke({headers:this.headers,accessToken:this._getAccessToken.bind(this)},v.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(b=>this.realtime.setAuth(b)).catch(b=>console.warn("Failed to set initial Realtime auth token:",b)),this.rest=new Vv(new URL("rest/v1",f).href,{headers:this.headers,schema:v.db.schema,fetch:this.fetch,timeout:v.db.timeout,urlLengthLimit:v.db.urlLengthLimit}),this.storage=new Mp(this.storageUrl.href,this.headers,this.fetch,s==null?void 0:s.storage),v.accessToken||this._listenForAuthEvents()}get functions(){return new kv(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(l){return this.rest.from(l)}schema(l){return this.rest.schema(l)}rpc(l,n={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(l,n,s)}channel(l,n={config:{}}){return this.realtime.channel(l,n)}getChannels(){return this.realtime.getChannels()}removeChannel(l){return this.realtime.removeChannel(l)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var l=this,n,s;if(l.accessToken)return await l.accessToken();const{data:r}=await l.auth.getSession();return(n=(s=r.session)===null||s===void 0?void 0:s.access_token)!==null&&n!==void 0?n:l.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:l,persistSession:n,detectSessionInUrl:s,storage:r,userStorage:c,storageKey:f,flowType:d,lock:m,debug:v,throwOnError:g},b,S){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ib({url:this.authUrl.href,headers:ke(ke({},A),b),storageKey:f,autoRefreshToken:l,persistSession:n,detectSessionInUrl:s,storage:r,userStorage:c,flowType:d,lock:m,debug:v,throwOnError:g,fetch:S,hasCustomAuthorizationHeader:Object.keys(this.headers).some(T=>T.toLowerCase()==="authorization")})}_initRealtimeClient(l){return new sp(this.realtimeUrl.href,ke(ke({},l),{},{params:ke(ke({},{apikey:this.supabaseKey}),l==null?void 0:l.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((l,n)=>{this._handleTokenChanged(l,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(l,n,s){(l==="TOKEN_REFRESHED"||l==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):l==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const sb=(l,n,s)=>new lb(l,n,s);function rb(){if(typeof window<"u")return!1;const l=globalThis.process;if(!l)return!1;const n=l.version;if(n==null)return!1;const s=n.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}rb()&&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
92ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ub="https://uklpcgdzkfuzespgwkkp.supabase.co",ob="sb_publishable_y2Wncz2EXhB-sH5lPMma9Q_v-4wAf5Y",Ye=sb(ub,ob),Pt="https://app.profe-en-casa.com",xb={candidateApplication:`${Pt}/empleo?source=anuncio_candidatos`,candidateWhatsApp:`${Pt}/empleo?source=whatsapp`,candidateWeb:`${Pt}/empleo?source=web`,familyInquiry:`${Pt}/familia-interesada?source=consulta_familia`,academyDoor:`${Pt}/puerta-academia?source=puerta_academia`,internalVisit:`${Pt}/registrar-visita?source=qr_profesor`,homeSignatureSheet:`${Pt}/documentos/parte-mensual-clases-domicilio.pdf`,login:Pt},dn=l=>{const n=(l||"").toLowerCase();return navigator.onLine?n.includes("failed to fetch")||n.includes("network")||n.includes("fetch")?"Ahora mismo no podemos conectar con el servicio de acceso. Tus datos siguen guardados; inténtalo de nuevo en unos minutos o avisa a administración.":n.includes("invalid login credentials")?"El correo o la contraseña no coinciden. Revisa los datos o solicita un enlace para crear una contraseña nueva.":n.includes("email not confirmed")?"Este correo todavÃa no está confirmado. Revisa tu bandeja de entrada o contacta con administración.":n.includes("otp_expired")||n.includes("expired")||n.includes("session missing")||n.includes("invalid jwt")?"El enlace de acceso ha caducado o ya se ha utilizado. Solicita uno nuevo desde «¿Has olvidado tu contraseña?».":n.includes("rate limit")||n.includes("too many")?"Se han realizado varios intentos seguidos. Espera unos minutos antes de volver a probar.":"No hemos podido completar el acceso. Inténtalo de nuevo y, si continúa, contacta con administración.":"No hay conexión a Internet. Comprueba la conexión y vuelve a intentarlo."},No=({passwordRecoveryMode:l=!1,onPasswordRecovered:n,initialErrorMessage:s=null})=>{const[r,c]=Xe.useState(!1),[f,d]=Xe.useState(""),[m,v]=Xe.useState(""),[g,b]=Xe.useState(""),[S,A]=Xe.useState("familias"),[T,U]=Xe.useState(!1),[L,q]=Xe.useState(!1),[H,$]=Xe.useState(!1),[z,Y]=Xe.useState(!1),[ne,Q]=Xe.useState(s?{type:"error",message:s}:null),Z=()=>m.length<6?(Q({type:"error",message:"La contraseña debe tener al menos 6 caracteres."}),!1):m!==g?(Q({type:"error",message:"Las contraseñas no coinciden. RevÃsalas antes de continuar."}),!1):!0,ge=async de=>{if(de.preventDefault(),Q(null),!!Z()){c(!0);try{const{error:Ce}=await Ye.auth.updateUser({password:m});if(Ce){Q({type:"error",message:dn(Ce.message)});return}Q({type:"success",message:"Contraseña actualizada correctamente. Ya puedes iniciar sesión con ella."}),v(""),b(""),await Ye.auth.signOut(),window.history.replaceState({},document.title,"/"),window.setTimeout(()=>n==null?void 0:n(),900)}catch(Ce){Q({type:"error",message:dn(Ce instanceof Error?Ce.message:"")})}finally{c(!1)}}},xe=async de=>{if(l){await ge(de);return}de.preventDefault(),Q(null),c(!0);try{if(z){if(!Z())return;const{data:{session:Ht}}=await Ye.auth.getSession();Ht&&await Ye.auth.signOut();const{data:lt,error:D}=await Ye.auth.signUp({email:f.trim().toLowerCase(),password:m,options:{emailRedirectTo:Pt}});if(D){Q({type:"error",message:dn(D.message)});return}if(lt.session){Q({type:"success",message:"Cuenta creada y confirmada. Estamos abriendo tu panel."}),v(""),b("");return}if(lt.user&&Array.isArray(lt.user.identities)&<.user.identities.length===0){Q({type:"info",message:"Este correo ya tiene una cuenta. Inicia sesión con tu contraseña o pulsa «¿Has olvidado tu contraseña?» para crear una nueva."}),Y(!1),v(""),b("");return}await Ye.auth.signOut(),Q({type:"success",message:"Cuenta creada. Te hemos enviado un correo para confirmar la dirección. Abre ese enlace y después inicia sesión con tu contraseña. Revisa también la carpeta de correo no deseado."}),Y(!1),v(""),b("");return}const{error:Ce}=await Ye.auth.signInWithPassword({email:f.trim().toLowerCase(),password:m});Ce&&Q({type:"error",message:dn(Ce.message)})}catch(Ce){Q({type:"error",message:dn(Ce instanceof Error?Ce.message:"")})}finally{c(!1)}},it=async()=>{const de=f.trim().toLowerCase();if(Q(null),!de){Q({type:"error",message:"Escribe primero tu correo electrónico para enviarte el enlace."});return}$(!0);try{const{error:Ce}=await Ye.auth.resetPasswordForEmail(de,{redirectTo:`${Pt}/?recovery=1`});if(Ce){Q({type:"error",message:dn(Ce.message)});return}Q({type:"success",message:"Enlace enviado. Revisa la bandeja de entrada y también la carpeta de correo no deseado."})}catch(Ce){Q({type:"error",message:dn(Ce instanceof Error?Ce.message:"")}
92)}finally{$(!1)}},Ct=(ne==null?void 0:ne.type)==="success"?"border-emerald-200 bg-emerald-50 text-emerald-800":(ne==null?void 0:ne.type)==="info"?"border-blue-200 bg-blue-50 text-blue-800":"border-red-200 bg-red-50 text-red-700";return B.jsxs(B.Fragment,{children:[B.jsx("style",{children:` 93 *::-webkit-scrollbar { display: none !important; width: 0 !important; } 94 * { -ms-overflow-style: none !important; scrollbar-width: none !important; } 95 body { overflow: hidden !important; } 96 `}),B.jsxs("div",{className:"flex flex-col h-full w-full bg-[#F5F7FA] relative",children:[B.jsxs("div",{className:"bg-[#1c74e9] px-10 pt-12 pb-16 text-center text-white relative shrink-0 rounded-b-[40px] shadow-lg z-10",children:[B.jsx("div",{className:"w-24 h-24 bg-white p-1 rounded-full flex items-center justify-center mx-auto shadow-xl overflow-hidden mb-4",children:B.jsx("img",{src:"/logo-profe-cuadrado.jpg",alt:"Logo Profe a 3",className:"w-full h-full object-cover rounded-full"})}),B.jsx("h1",{className:"text-3xl font-black italic mb-1 tracking-tighter",children:"Profe en Casa"}),B.jsx("p",{className:"text-blue-100 text-[10px] font-black uppercase tracking-[3px] opacity-90",children:"Portal Educativo"})]}),B.jsxs("form",{onSubmit:xe,className:"px-8 pb-8 flex-1 flex flex-col -mt-8 relative z-20 overflow-y-auto",children:[!l&&B.jsxs("div",{className:"grid grid-cols-2 gap-2 bg-white p-1.5 rounded-full border border-gray-100 shadow-md mb-8",children:[B.jsxs("button",{type:"button",onClick:()=>A("familias"),className:`flex items-center justify-center gap-2 py-3 rounded-full text-xs font-black uppercase tracking-widest transition-all ${S==="familias"?"bg-[#f97316] text-white shadow-md":"text-gray-400 hover:text-gray-600 hover:bg-gray-50"}`,children:[B.jsx("span",{"aria-hidden":"true",children:"FAM"})," Familias"]}),B.jsxs("button",{type:"button",onClick:()=>A("equipo"),className:`flex items-center justify-center gap-2 py-3 rounded-full text-xs font-black uppercase tracking-widest transition-all ${S==="equipo"?"bg-[#1c74e9] text-white shadow-md":"text-gray-400 hover:text-gray-600 hover:bg-gray-50"}`,children:[B.jsx("span",{"aria-hidden":"true",children:"PRO"})," Equipo"]})]}),B.jsxs("div",{className:`space-y-4 flex-1 bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 ${l?"mt-8":""}`,children:[B.jsx("p",{className:`text-[10px] font-black uppercase tracking-widest text-center ${S==="equipo"?"text-[#1c74e9]":"text-[#f97316]"}`,children:l?"Crear contraseña nueva":z?"Crear nueva cuenta":`Acceso ${S==="equipo"?"Equipo Docente":"Familia"}`}),l&&B.jsx("p",{className:"text-sm text-gray-600 font-medium leading-relaxed text-center",children:"Escribe la contraseña nueva dos veces para proteger tu acceso."}),ne&&B.jsx("div",{role:ne.type==="error"?"alert":"status",className:`rounded-2xl border p-4 text-xs font-bold leading-relaxed ${Ct}`,children:ne.message}),!l&&B.jsxs("div",{className:"space-y-2",children:[B.jsx("label",{htmlFor:"login-email",className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-2",children:"Correo electrónico"}),B.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",placeholder:S==="equipo"?"ej: [email protected]":"ej: [email protected]",value:f,onChange:de=>d(de.target.value),className:"w-full bg-gray-50 border-2 border-transparent p-4 rounded-2xl text-sm outline-none focus:border-[#1c74e9] transition-all text-gray-800 font-medium"})]}),B.jsxs("div",{className:"space-y-2",children:[B.jsx("label",{htmlFor:"login-password",className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-2",children:l?"Contraseña nueva":"Contraseña"}),B.jsxs("div",{className:"relative",children:[B.jsx("input",{id:"login-password",type:T?"text":"password",required:!0,autoComplete:l||z?"new-password":"current-password",placeholder:z||l?"Elige una contraseña":"â¢â¢â¢â¢â¢â¢â¢â¢",value:m,onChange:de=>v(de.target.value),className:"w-full bg-gray-50 border-2 border-transparent p-4 pr-12 rounded-2xl text-sm outline-none focus:border-[#1c74e9] transition-all text-gray-800 font-medium"}),B.jsx("button",{type:"button",onClick:()=>U(de=>!de),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[10px] font-black uppercase text-gray-400 hover:text-gray-700 transition-colors focus:outline-none","aria-label":T?"Ocultar contraseña":"Mostrar c
96ontraseña",children:T?"Ocultar":"Ver"})]}),(z||l)&&B.jsxs("div",{className:"pt-2",children:[B.jsx("label",{htmlFor:"login-confirm-password",className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-2",children:"Repetir contraseña"}),B.jsxs("div",{className:"relative mt-2",children:[B.jsx("input",{id:"login-confirm-password",type:L?"text":"password",required:!0,autoComplete:"new-password",placeholder:"Vuelve a escribirla",value:g,onChange:de=>b(de.target.value),className:"w-full bg-gray-50 border-2 border-transparent p-4 pr-12 rounded-2xl text-sm outline-none focus:border-[#1c74e9] transition-all text-gray-800 font-medium"}),B.jsx("button",{type:"button",onClick:()=>q(de=>!de),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[10px] font-black uppercase text-gray-400 hover:text-gray-700 transition-colors focus:outline-none","aria-label":L?"Ocultar confirmación":"Mostrar confirmación",children:L?"Ocultar":"Ver"})]})]}),!z&&!l&&B.jsx("div",{className:"text-right pt-1",children:B.jsx("button",{type:"button",onClick:it,disabled:H,className:`text-[10px] font-bold transition-colors disabled:opacity-50 ${S==="equipo"?"text-blue-500 hover:text-[#1c74e9]":"text-orange-500 hover:text-[#f97316]"}`,children:H?"Enviando enlace...":"¿Has olvidado tu contraseña?"})})]}),B.jsx("button",{disabled:r||H,className:`w-full text-white p-5 rounded-2xl font-black uppercase text-xs tracking-widest shadow-xl active:scale-95 transition-all disabled:opacity-50 mt-2 ${S==="equipo"?"bg-[#1c74e9] shadow-blue-500/30":"bg-[#f97316] shadow-orange-500/30"}`,children:r?"Procesando...":l?"Guardar contraseña nueva":z?"Crear mi cuenta":"Iniciar sesión"}),!l&&B.jsx("div",{className:"text-center pt-4 border-t border-gray-100 mt-4",children:B.jsx("button",{type:"button",onClick:()=>{Y(de=>!de),v(""),b(""),Q(null)},className:`text-[11px] font-black uppercase tracking-widest transition-colors ${S==="equipo"?"text-gray-500 hover:text-[#1c74e9]":"text-gray-500 hover:text-orange-500"}`,children:z?"¿Ya tienes cuenta? Inicia sesión aquÃ":"¿Es tu primera vez? Crea tu cuenta"})})]}),B.jsx("p",{className:"text-[9px] text-gray-400 text-center italic mt-6 pb-2",children:"Al acceder, aceptas las condiciones de uso y la polÃtica de privacidad de Profe en Casa."})]})]})]})},cb=!1;class fb extends nt.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,s){console.error("Error no recuperado en Profe en Casa:",n,s)}render(){return this.state.hasError?B.jsx("div",{className:"min-h-screen w-screen bg-[#101922] flex items-center justify-center p-6 font-sans",children:B.jsxs("div",{className:"w-full max-w-sm rounded-[32px] border border-blue-100 bg-white p-7 text-center shadow-2xl",children:[B.jsx("div",{className:"mx-auto mb-5 flex h-14 w-14 items-center justify-center rounded-2xl bg-blue-50 text-2xl",children:"ð ï¸"}),B.jsx("p",{className:"mb-2 text-[10px] font-black uppercase tracking-widest text-[#0C6FAE]",children:"Incidencia temporal"}),B.jsx("h1",{className:"text-2xl font-black text-slate-900",children:"No hemos podido abrir esta pantalla"}),B.jsx("p",{className:"mt-3 text-sm font-bold leading-relaxed text-slate-500",children:"Tus datos no se han borrado. Recarga la aplicación para intentarlo de nuevo."}),B.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"mt-6 w-full rounded-2xl bg-[#16A0EB] px-5 py-4 text-[11px] font-black uppercase tracking-widest text-white shadow-lg shadow-blue-500/20 active:scale-95",children:"Recargar aplicación"})]})}):this.props.children}}const hb=nt.lazy(()=>xt(()=>import("./AdminShell-CeQmJoPo.js").then(l=>l.A),__vite__mapDeps([0,1,2,3]))),jm=nt.lazy(()=>xt(()=>import("./MonitorDashboard-B2IzPnJQ.js"),__vite__mapDeps([4,5,6,7,1,8,9,3,10,2,11,12,13,14,15,16,17,18,19,20,21,22])).then(l=>({default:l.MonitorDashboard}))),db=nt.lazy(()=>xt(()=>import("./PublicEnrollment-CwxP1wyr.js"),__vite__mapDeps([23,21,24,1,2,25])).then(l=>({default:l.PublicEnrollment}))),mb=nt.lazy(()=>xt(()=>import("./PublicTeacherForm-hCaow4wW.js"),__vite__mapDeps([26,21,27,24,1,12,2,28,25])).then(l=>({default:l.PublicTeacherForm}))),Qs=nt.lazy(()=>xt(()=>import("./FamilyPortalRouter-CXOB0vQt.js"),__vite__mapDeps([29,15,30,31,14,7,1,32,22])).then(l=>({default:l.FamilyPortalRouter}))),yb=nt.lazy(()=>xt(()=>import("./LeadMagnetWidget-DgZA-6k9.js"),__vite__mapDeps([33,21,1,2,24,25])).then(l=>({default:l.LeadMagnetWidget}))),gb=nt.lazy(()=>xt(()=>import("./PublicLinks-GCUXZy4B.js"),[]).then(l=>({default:l.PublicLinks}))),Xs=nt.lazy(()=>xt(()=>import("./CandidateDashboard-Bd--pNwI.js"),__vite__mapDeps([34,12,28,2])).then(l=>({default:l.CandidateDashboard}))),vb=nt.lazy(()=>xt(()=>import("./PrivacyPolicy-B2143qp5.js").then(l=>l.b),[]).then(l=>({default:l.PrivacyPolicy}))),pb=nt.lazy(()=>xt(()=>
96import("./PublicFamilyUpdateForm-0NLV4GRy.js"),__vite__mapDeps([35,21,24,2,25,32,1])).then(l=>({default:l.PublicFamilyUpdateForm}))),bb=nt.lazy(()=>xt(()=>import("./PublicFamilyAgreement-CP1uOzNQ.js"),__vite__mapDeps([36,14,7,1,15,31,30])).then(l=>({default:l.PublicFamilyAgreement}))),_b=nt.lazy(()=>xt(()=>import("./PublicLeadFamilyForm-B_Idf2a3.js"),__vite__mapDeps([37,21,24,38,1,2,25])).then(l=>({default:l.PublicLeadFamilyForm}))),wb=nt.lazy(()=>xt(()=>import("./PublicWalkInLeadForm-BgJaDS8m.js"),__vite__mapDeps([39,1,2,24,25])).then(l=>({default:l.PublicWalkInLeadForm}))),Um=()=>B.jsx("div",{className:"min-h-full w-full bg-[#F5F7FA] flex items-center justify-center p-8",children:B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-10 h-10 border-4 border-[#16A0EB] border-t-transparent rounded-full animate-spin mx-auto"}),B.jsx("p",{className:"mt-4 text-[10px] font-black uppercase tracking-widest text-[#0C6FAE]",children:"Abriendo Profe en Casa"})]})}),Sb=l=>l?!!(l.can_validate_classes||l.can_use_bitacora||l.can_view_team||l.can_view_students||l.can_assign_students||l.can_manage_calendar):!1,Eb=({teacherName:l,message:n})=>{const s=async()=>{await Ye.auth.signOut(),window.location.href="/"};return B.jsx("div",{className:"min-h-full bg-[#F5F7FA] flex items-center justify-center p-8",children:B.jsxs("div",{className:"bg-white rounded-[32px] border border-blue-100 shadow-xl p-8 text-center max-w-sm",children:[B.jsx("div",{className:"w-16 h-16 rounded-2xl bg-blue-50 border border-blue-100 flex items-center justify-center mx-auto mb-5 text-3xl",children:"ð ï¸"}),B.jsx("p",{className:"text-[#1c74e9] text-[10px] font-black uppercase tracking-widest mb-2",children:"Acceso temporalmente en pausa"}),B.jsx("h1",{className:"text-2xl font-black text-gray-900 leading-tight mb-3",children:"Estamos revisando tu area"}),B.jsxs("p",{className:"text-gray-500 text-sm font-bold leading-relaxed",children:["Hola",l?` ${l.split(" ")[0]}`:"",", tu acceso a la app esta temporalmente en revision administrativa.",n?` ${n}`:" Si necesitas entrar para algo urgente, escribe a coordinacion y lo revisamos contigo."]}),B.jsx("button",{onClick:s,className:"mt-6 w-full bg-[#1c74e9] text-white font-black uppercase text-[10px] tracking-widest py-4 rounded-2xl shadow-lg shadow-blue-500/20 active:scale-95 transition-transform",children:"Entendido"})]})})},Tb=()=>{const l=new URLSearchParams(window.location.search),n=new URLSearchParams(window.location.hash.replace(/^#/,"")),s=l.get("error_code")||n.get("error_code")||"",r=l.get("error")||n.get("error")||"";return!s&&!r?null:s==="otp_expired"?"El enlace ha caducado o ya se ha utilizado. Solicita uno nuevo desde «¿Has olvidado tu contraseña?».":"No hemos podido validar este enlace de acceso. Solicita uno nuevo o contacta con administración."},Ab=()=>{const[l,n]=Xe.useState(null),[s,r]=Xe.useState(!0),[c,f]=Xe.useState(null),[d,m]=Xe.useState(null),[v,g]=Xe.useState(!1),[b]=Xe.useState(Tb);Xe.useEffect(()=>{Ye.auth.getSession().then(({data:{session:z}})=>{n(z),z&&new URLSearchParams(window.location.search).get("recovery")==="1"&&g(!0),z||r(!1)});const{data:{subscription:$}}=Ye.auth.onAuthStateChange((z,Y)=>{z==="PASSWORD_RECOVERY"&&g(!0),n(Y),Y||r(!1)});return()=>$.unsubscribe()},[]),Xe.useEffect(()=>{(async()=>{var Y;if(!l){m(null),r(!1);return}const z=(Y=l.user.email)==null?void 0:Y.trim();if(!z){await Ye.auth.signOut(),f(null),r(!1);return}if(z==="[email protected]"){f("admin"),r(!1);return}try{m(null);const{data:ne,error:Q}=await Ye.rpc("get_current_app_access");if(!Q&&ne){const it=ne;if(it.access_paused){m({name:it.name,message:it.message||null}),f(null),r(!1);return}if(it.role){f(it.role),r(!1);return}alert("Tu cuenta no tiene ningún rol asignado. Contacta con administración."),await Ye.auth.signOut(),f(null),r(!1);return}Q&&console.warn("La resolucion segura de rol aun no esta disponible; se usa el acceso transitorio.");const[{data:Z},{data:ge},{data:xe}]=await Promise.all([Ye.from("students").select("name").or(`email.ilike.${z},parent_email.ilike.${z}`).limit(1).maybeSingle(),Ye.from("teachers").select("id, name, access_paused, access_pause_message").ilike("email",z).limit(1).maybeSingle(),Ye.from("candidates").select("id, status").ilike("email",z).limit(1).maybeSingle()]);if(ge){if(ge.access_paused){m({name:ge.name,message:ge.access_pause_message||null}),f(null),r(!1);return}const{data:it}=await Ye.from("coordinator_permissions").select("*").eq("coordinator_id",ge.id).maybeSingle();f(Sb(it)?"coordinator":"monitor"),r(!1);return}if(Z){f("family"),r(!1);return}if(xe&&xe.status!=="Descartado"){f("candidate"),r(!1);return}console.warn(`Intruso bloqueado: El correo ${z} no está asignado a ningún rol.`),alert("Tu cuenta no tiene ningún rol asignado. Contacta con administración."),await Ye.auth.signOut(),f(null),r(!1)}catch(ne){console.error("Error crÃtico verificando roles:",ne),await Ye.auth.signOut(),r(!1)}})()},[l]);const S=window.location.pathname,A=S.length>1?S.replace(/\/+$/,""):S,T=(...$)=>$.includes(A),U=["localhost","127.0.0.1"].includes(window.location.hostname),L=T("/test-nivel"),q=T("/links"),H=()=>
96{if(T("/test-nivel"))return B.jsx(yb,{});if(T("/links"))return B.jsx(gb,{onNavigateToLogin:()=>window.location.href="/"});if(T("/enrollment","/matricula"))return B.jsx(db,{});if(T("/empleo"))return B.jsx(mb,{});if(T("/privacidad"))return B.jsx(vb,{});if(T("/actualizar-familia"))return B.jsx(pb,{});if(T("/acuerdo-familia"))return B.jsx(bb,{});if(T("/activar-familia"))return B.jsx(_b,{});if(T("/registrar-visita","/familia-interesada","/lead","/puerta-academia","/contacto-academia"))return B.jsx(wb,{});if(v)return B.jsx(No,{passwordRecoveryMode:!0,onPasswordRecovered:()=>g(!1)});if(s)return B.jsx("div",{className:"min-h-screen bg-[#F5F7FA] flex items-center justify-center w-full h-full",children:B.jsx("div",{className:"w-10 h-10 border-4 border-[#1c74e9] border-t-transparent rounded-full animate-spin"})});if(!l)return B.jsx(No,{initialErrorMessage:b});if(d)return B.jsx(Eb,{teacherName:d.name,message:d.message});const $=new URLSearchParams(window.location.search),z=$.get("preview"),Y=$.get("portal");if(z&&Y==="family"&&c==="admin")return B.jsx(Qs,{previewStudentEmail:z,onBackToAdmin:()=>window.opener?window.close():window.location.href="/"});if(z&&Y==="candidate"&&c==="admin")return B.jsx(Xs,{previewEmail:z,onBackToAdmin:()=>window.opener?window.close():window.location.href="/"});if(T("/family")){if(z&&c==="admin")return B.jsx(Qs,{previewStudentEmail:z,onBackToAdmin:()=>window.opener?window.close():window.location.href="/"});if(c==="family")return B.jsx(Qs,{})}if(T("/candidate")){if(z&&c==="admin")return B.jsx(Xs,{previewEmail:z,onBackToAdmin:()=>window.opener?window.close():window.location.href="/"});if(c==="candidate")return B.jsx(Xs,{})}return c==="admin"?B.jsx(hb,{}):c==="coordinator"?B.jsx(jm,{}):c==="family"?B.jsx(Qs,{}):c==="monitor"?B.jsx(jm,{}):c==="candidate"?B.jsx(Xs,{}):B.jsx(No,{})};return B.jsxs(B.Fragment,{children:[(L||q)&&B.jsx("div",{className:"min-h-screen w-screen font-sans",children:B.jsx("div",{className:"w-full h-full min-h-screen overflow-x-hidden overflow-y-auto",children:B.jsx(nt.Suspense,{fallback:B.jsx(Um,{}),children:H()})})}),!L&&!q&&B.jsxs(B.Fragment,{children:[B.jsx("style",{children:` 97 *::-webkit-scrollbar { display: none !important; width: 0 !important; } 98 * { -ms-overflow-style: none !important; scrollbar-width: none !important; } 99 html, body { overflow: hidden !important; background-color: #101922 !important; margin: 0; padding: 0; height: 100%; width: 100%; } 100 `}),B.jsxs("div",{className:"h-screen w-screen bg-[#101922] flex justify-center items-center p-0 sm:p-4 font-sans selection:bg-blue-200",children:[l&&c==="admin"&&B.jsx("div",{className:`pointer-events-none fixed right-3 top-3 z-[100] rounded-full border px-3 py-1.5 text-[9px] font-black uppercase tracking-[0.18em] shadow-lg ${U?"border-amber-300 bg-amber-100 text-amber-900":"border-emerald-300 bg-emerald-100 text-emerald-900"}`,children:U?"Local · Pruebas":"Producción"}),B.jsx("div",{className:"w-full max-w-[430px] bg-[#F5F7FA] h-full sm:h-[850px] sm:max-h-[90vh] sm:rounded-[40px] shadow-2xl relative overflow-x-hidden overflow-y-auto flex flex-col border-x border-gray-800/20",style:{transform:"translateZ(0)"},children:B.jsx(nt.Suspense,{fallback:B.jsx(Um,{}),children:H()})})]})]})]})},Ob=()=>B.jsx(fb,{children:B.jsx(Ab,{})}),Zm=document.getElementById("root");if(!Zm)throw new Error("Could not find root element to mount to");const Rb=Cv.createRoot(Zm);Rb.render(B.jsx(nt.StrictMode,{children:B.jsx(Ob,{})}));export{cb as F,xb as P,nt as R,xt as _,Pt as a,B as j,Xe as r,Ye as s};
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.