PageSourceSearch

https://clutch-app.co/assets/index-BVYkz6QZ.js

js clutch-app.co collected 2026-10-06 13:16:03 UTC 418,639 bytes, 188 lines download raw bytes

vendor: 6,076 bytes, line 1
1(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function r(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function s(c){if(c.ep)return;c.ep=!0;const h=r(c);fetch(c.href,h)}})();function og(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var ko={exports:{}},yl={};var Sm;function Ey(){if(Sm)return yl;Sm=1;var l=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(s,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var m in c)m!=="key"&&(h[m]=c[m])}else h=c;return c=h.ref,{$$typeof:l,type:s,key:f,ref:c!==void 0?c:null,props:h}}return yl.Fragment=a,yl.jsx=r,yl.jsxs=r,yl}var Em;function Ty(){return Em||(Em=1,ko.exports=Ey()),ko.exports}var y=Ty(),Do={exports:{}},ie={};var Tm;function xy(){if(Tm)return ie;Tm=1;var l=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),O=Symbol.iterator;function N(w){return w===null||typeof w!="object"?null:(w=O&&w[O]||w["@@iterator"],typeof w=="function"?w:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,$={};function V(w,M,G){this.props=w,this.context=M,this.refs=$,this.updater=G||D}V.prototype.isReactComponent={},V.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")},V.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function K(){}K.prototype=V.prototype;function H(w,M,G){this.props=w,this.context=M,this.refs=$,this.updater=G||D}var W=H.prototype=new K;W.constructor=H,B(W,V.prototype),W.isPureReactComponent=!0;var _e=Array.isArray;function le(){}var I={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function Be(w,M,G){var J=G.ref;return{$$typeof:l,type:w,key:M,ref:J!==void 0?J:null,props:G}}function En(w,M){return Be(w.type,M,w.props)}function _t(w){return typeof w=="object"&&w!==null&&w.$$typeof===l}function ut(w){var M={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(G){return M[G]})}var kt=/\/+/g;function Kt(w,M){return typeof w=="object"&&w!==null&&w.key!=null?ut(""+w.key):M.toString(36)}function L(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(le,le):(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 j(w,M,G,J,re){var ce=typeof w;(ce==="undefined"||ce==="boolean")&&(w=null);var Se=!1;if(w===null)Se=!0;else switch(ce){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(w.$$typeof){case l:case a:Se=!0;break;case S:return Se=w._init,j(Se(w._payload),M,G,J,re)}}if(Se)return re=re(w),Se=J===""?"."+Kt(w,0):J,_e(re)?(G="",Se!=null&&(G=Se.replace(kt,"$&/")+"/"),j(re,M,G,"",function(xi){return xi})):re!=null&&(_t(re)&&(re=En(re,G+(re.key==null||w&&w.key===re.key?"":(""+re.key).replace(kt,"$&/")+"/")+Se)),M.push(re)),1;Se=0;var ct=J===""?".":J+":";if(_e(w))for(var Ge=0;Ge<w.length;Ge++)J=w[Ge],ce=ct+Kt(J,Ge),Se+=j(J,M,G,ce,re);else if(Ge=N(w),typeof Ge=="function")for(w=Ge.call(w),Ge=0;!(J=w.next()).done;)J=J.value,ce=ct+Kt(J,Ge++),Se+=j(J,M,G,ce,re);else if(ce==="object"){if(typeof w.then=="function")return j(L(w),M,G,J,re);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 Se}function q(w,M,G){if(w==null)return w;var J=[],re=0;return j(w,J,"","",function(ce){return M.call(G,ce,re++)}),J}function Y(w){if(w._status===-1){var M=w._result;M=M(),M.then(function(G){(w._status===0||w._status===-1)&&(w._status=1,w._result=G)},function(G){(w._status===0||w._status===-1)&&(w._status=2,w._result=G)}),w._status===-1&&(w._status=0,w._result=M)}if(w._status===1)return w._result.default;throw w._result}var oe=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)},pe={map:q,forEach:function(w,M,G){q(w,function(){M.apply(this,arguments)},G)},count:function(w){var M=0;return q(w,function(){M++}),M},toArray:function(w){return q(w,function(M){return M})||[]},only:function(w){if(!_t(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return ie.Activity=T,ie.Children=pe,ie.Component=V,ie.Fragment=r,ie.Profiler=c,ie.PureComponent=H,ie.StrictMode=s,ie.Suspense=g,ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ie.__
vendor: 15,331 bytes, lines 1-3
1COMPILER_RUNTIME={__proto__:null,c:function(w){return I.H.useMemoCache(w)}},ie.cache=function(w){return function(){return w.apply(null,arguments)}},ie.cacheSignal=function(){return null},ie.cloneElement=function(w,M,G){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var J=B({},w.props),re=w.key;if(M!=null)for(ce in M.key!==void 0&&(re=""+M.key),M)!ne.call(M,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&M.ref===void 0||(J[ce]=M[ce]);var ce=arguments.length-2;if(ce===1)J.children=G;else if(1<ce){for(var Se=Array(ce),ct=0;ct<ce;ct++)Se[ct]=arguments[ct+2];J.children=Se}return Be(w.type,re,J)},ie.createContext=function(w){return w={$$typeof:f,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:h,_context:w},w},ie.createElement=function(w,M,G){var J,re={},ce=null;if(M!=null)for(J in M.key!==void 0&&(ce=""+M.key),M)ne.call(M,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(re[J]=M[J]);var Se=arguments.length-2;if(Se===1)re.children=G;else if(1<Se){for(var ct=Array(Se),Ge=0;Ge<Se;Ge++)ct[Ge]=arguments[Ge+2];re.children=ct}if(w&&w.defaultProps)for(J in Se=w.defaultProps,Se)re[J]===void 0&&(re[J]=Se[J]);return Be(w,ce,re)},ie.createRef=function(){return{current:null}},ie.forwardRef=function(w){return{$$typeof:m,render:w}},ie.isValidElement=_t,ie.lazy=function(w){return{$$typeof:S,_payload:{_status:-1,_result:w},_init:Y}},ie.memo=function(w,M){return{$$typeof:v,type:w,compare:M===void 0?null:M}},ie.startTransition=function(w){var M=I.T,G={};I.T=G;try{var J=w(),re=I.S;re!==null&&re(G,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(le,oe)}catch(ce){oe(ce)}finally{M!==null&&G.types!==null&&(M.types=G.types),I.T=M}},ie.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ie.use=function(w){return I.H.use(w)},ie.useActionState=function(w,M,G){return I.H.useActionState(w,M,G)},ie.useCallback=function(w,M){return I.H.useCallback(w,M)},ie.useContext=function(w){return I.H.useContext(w)},ie.useDebugValue=function(){},ie.useDeferredValue=function(w,M){return I.H.useDeferredValue(w,M)},ie.useEffect=function(w,M){return I.H.useEffect(w,M)},ie.useEffectEvent=function(w){return I.H.useEffectEvent(w)},ie.useId=function(){return I.H.useId()},ie.useImperativeHandle=function(w,M,G){return I.H.useImperativeHandle(w,M,G)},ie.useInsertionEffect=function(w,M){return I.H.useInsertionEffect(w,M)},ie.useLayoutEffect=function(w,M){return I.H.useLayoutEffect(w,M)},ie.useMemo=function(w,M){return I.H.useMemo(w,M)},ie.useOptimistic=function(w,M){return I.H.useOptimistic(w,M)},ie.useReducer=function(w,M,G){return I.H.useReducer(w,M,G)},ie.useRef=function(w){return I.H.useRef(w)},ie.useState=function(w){return I.H.useState(w)},ie.useSyncExternalStore=function(w,M,G){return I.H.useSyncExternalStore(w,M,G)},ie.useTransition=function(){return I.H.useTransition()},ie.version="19.2.3",ie}var xm;function cc(){return xm||(xm=1,Do.exports=xy()),Do.exports}var Wr=cc();const xe=og(Wr);var zo={exports:{}},bl={},Mo={exports:{}},Lo={};var Am;function Ay(){return Am||(Am=1,(function(l){function a(j,q){var Y=j.length;j.push(q);e:for(;0<Y;){var oe=Y-1>>>1,pe=j[oe];if(0<c(pe,q))j[oe]=q,j[Y]=pe,Y=oe;else break e}}function r(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var q=j[0],Y=j.pop();if(Y!==q){j[0]=Y;e:for(var oe=0,pe=j.length,w=pe>>>1;oe<w;){var M=2*(oe+1)-1,G=j[M],J=M+1,re=j[J];if(0>c(G,Y))J<pe&&0>c(re,G)?(j[oe]=re,j[J]=Y,oe=J):(j[oe]=G,j[M]=Y,oe=M);else if(J<pe&&0>c(re,Y))j[oe]=re,j[J]=Y,oe=J;else break e}}return q}function c(j,q){var Y=j.sortIndex-q.sortIndex;return Y!==0?Y:j.id-q.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();l.unstable_now=function(){return f.now()-m}}var g=[],v=[],S=1,T=null,O=3,N=!1,D=!1,B=!1,$=!1,V=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function W(j){for(var q=r(v);q!==null;){if(q.callback===null)s(v);else if(q.startTime<=j)s(v),q.sortIndex=q.expirationTime,a(g,q);else break;q=r(v)}}function _e(j){if(B=!1,W(j),!D)if(r(g)!==null)D=!0,le||(le=!0,ut());else{var q=r(v);q!==null&&L(_e,q.startTime-j)}}var le=!1,I=-1,ne=5,Be=-1;function En(){return $?!0:!(l.unstable_now()-Be<ne)}function _t(){if($=!1,le){var j=l.unstable_now();Be=j;var q=!0;try{e:{D=!1,B&&(B=!1,K(I),I=-1),N=!0;var Y=O;try{t:{for(W(j),T=r(g);T!==null&&!(T.expirationTime>j&&En());){var oe=T.callback;if(typeof oe=="function"){T.callback=null,O=T.priorityLevel;var pe=oe(T.expirationTime<=j);if(j=l.unstable_now(),typeof pe=="function"){T.callback=pe,W(j),q=!0;break t}T===r(g)&&s(g),W(j)}else s(g);T=r(g)}if(T!==null)q=!0;else{var w=r(v);w!==null&&L(_e,w.startTime-j),q=!1}}break e}finally{T=null,O=Y,N=!1}q=void 0}}finally{q?ut():le=!1}}}var ut;if(typeof H=="function")ut=function(){H(_t)};else if(typeof MessageChannel<"u"){var kt=new MessageChannel,Kt=kt.port2;kt.port1.onmessage=_t,ut=function(){Kt.postMessage(null)}}else ut=function(){V(_t,0)};function L(j,q){I=V(function(){j(l.unstable_now())},q)}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(j){j.callback=null},l.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<j?Math.floor(1e3/j):5},l.unstable_getCurrentPriorityLevel=function(){return O},l.unstable_next=function(j){switch(O){case 1:case 2:case 3:var q=3;break;default:q=O}var Y=O;O=q;try{return j()}finally{O=Y}},l.unstable_requestPaint=function(){$=!0},l.unstable_runWithPriority=function(j,q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var Y=O;O=j;try{return q()}finally{O=Y}},l.unstable_scheduleCallback=function(j,q,Y){var oe=l.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?oe+Y:oe):Y=oe,j){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=Y+pe,j={id:S++,callback:q,priorityLevel:j,startTime:Y,expirationTime:pe,sortIndex:-1},Y>oe?(j.sortIndex=Y,a(v,j),r(g)===null&&j===r(v)&&(B?(K(I),I=-1):B=!0,L(_e,Y-oe))):(j.sortIndex=pe,a(g,j),D||N||(D=!0,le||(le=!0,ut()))),j},l.unstable_shouldYield=En,l.unstable_wrapCallback=function(j){var q=O;return function(){var Y=O;O=q;try{return j.apply(this,arguments)}finally{O=Y}}}})(Lo)),Lo}var Om;function Oy(){return Om||(Om=1,Mo.exports=Ay()),Mo.exports}var Bo={exports:{}},ot={};var Rm;function Ry(){if(Rm)return ot;Rm=1;var l=cc();function a(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function h(g,v,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:T==null?null:""+T,children:g,containerInfo:v,implementation:S}}var f=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ot.createPortal=function(g,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(a(299));return h(g,v,null,S)},ot.flushSync=function(g){var v=f.T,S=s.p;try{if(f.T=null,s.p=2,g)return g()}finally{f.T=v,s.p=S,s.d.f()}},ot.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,s.d.C(g,v))},ot.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},ot.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var S=v.as,T=m(S,v.crossOrigin),O=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?s.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:T,integrity:O,fetchPriority:N}):S==="script"&&s.d.X(g,{crossOrigin:T,integrity:O,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ot.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=m(v.as,v.crossOrigin);s.d.M(g,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&s.d.M(g)},ot.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,T=m(S,v.crossOrigin);s.d.L(g,S,{crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},ot.preloadModule=function(g,v){if(typeof g=="string")if(v){var S=m(v.as,v.crossOrigin);s.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else s.d.m(g)},ot.requestFormReset=function(g){s.d.r(g)},ot.unstable_batchedUpdates=function(g,v){return g(v)},ot.useFormState=function(g,v,S){return f.H.useFormState(g,v,S)},ot.useFormStatus=function(){return f.H.useHostTransitionStatus()},ot.version="19.2.3",ot}var jm;function jy(){if(jm)return Bo.exports;jm=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(a){console.error(a)}}return l(),Bo.exports=Ry(),Bo.exports}var Cm;function Cy(){if(Cm)return bl;Cm=1;var l=Oy(),a=cc(),r=jy();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function f(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 g(e){if(h(e)!==e)throw Error(s(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,i=t;;){var u=n.return;if(u===null)break;var o=u.alternate;if(o===null){if(i=u.return,i!==null){n=i;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===n)return g(u),e;if(o===i)return g(u),t;o=o.sibling}throw Error(s(188))}if(n.return!==i.return)n=u,i=o;else{for(var d=!1,p=u.child;p;){if(p===n){d=!0,n=u,i=o;break}if(p===i){d=!0,i=u,n=o;break}p=p.sibling}if(!d){for(p=o.child;p;){if(p===n){d=!0,n=o,i=u;break}if(p===i){d=!0,i=o,n=u;break}p=p.sibling}if(!d)throw Error(s(189))}}if(n.alternate!==i)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,O=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),H=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),_e=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),Be=Symbol.for("react.activity"),En=Symbol.for("react.memo_cache_sentinel"),_t=Symbol.iterator;function ut(e){return e===null||typeof e!="object"?null:(e=_t&&e[_t]||e["@@iterator"],typeof e=="function"?e:null)}var kt=Symbol.for("react.client.reference");function Kt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case V:return"Profiler";case $:return"StrictMode";case _e:return"Suspense";case le:return"SuspenseList";case Be:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case H:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:Kt(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return Kt(e(t))}catch{}}return null}var L=Array.isArray,j=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},oe=[],pe=-1;function w(e){return{current:e}}function M(e){0>pe||(e.current=oe[pe],oe[pe]=null,pe--)}function G(e,t){pe++,oe[pe]=e.current,e.current=t}var J=w(null),re=w(null),ce=w(null),Se=w(null);function ct(e,t){switch(G(ce,t),G(re,e),G(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yf(t),e=Qf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(J),G(J,e)}function Ge(){M(J),M(re),M(ce)}function xi(e){e.memoizedState!==null&&G(Se,e);var t=J.current,n=Qf(t,e.type);t!==n&&(G(re,e),G(J,n))}function jl(e){re.current===e&&(M(J),M(re)),Se.current===e&&(M(Se),ml._currentValue=Y)}var ms,_c;function Fn(e){if(ms===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ms=t&&t[1]||"",_c=-1<n.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+ms+e+_c}var gs=!1;function ps(e,t){if(!e||gs)return"";gs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(C){var R=C}Reflect.construct(e,[],z)}else{try{z.call()}catch(C){R=C}e.call(z.prototype)}}else{try{throw Error()}catch(C){R=C}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}
vendor: 6,458 bytes, lines 3-8
3catch(C){if(C&&R&&typeof C.stack=="string")return[C.stack,R.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(),d=o[0],p=o[1];if(d&&p){var b=d.split(`
4`),A=p.split(`
5`);for(u=i=0;i<b.length&&!b[i].includes("DetermineComponentFrameRoot");)i++;for(;u<A.length&&!A[u].includes("DetermineComponentFrameRoot");)u++;if(i===b.length||u===A.length)for(i=b.length-1,u=A.length-1;1<=i&&0<=u&&b[i]!==A[u];)u--;for(;1<=i&&0<=u;i--,u--)if(b[i]!==A[u]){if(i!==1||u!==1)do if(i--,u--,0>u||b[i]!==A[u]){var U=`
6`+b[i].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=i&&0<=u);break}}}finally{gs=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Fn(n):""}function ep(e,t){switch(e.tag){case 26:case 27:case 5:return Fn(e.type);case 16:return Fn("Lazy");case 13:return e.child!==t&&t!==null?Fn("Suspense Fallback"):Fn("Suspense");case 19:return Fn("SuspenseList");case 0:case 15:return ps(e.type,!1);case 11:return ps(e.type.render,!1);case 1:return ps(e.type,!0);case 31:return Fn("Activity");default:return""}}function wc(e){try{var t="",n=null;do t+=ep(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
7Error generating stack: `+i.message+`
8`+i.stack}}var vs=Object.prototype.hasOwnProperty,ys=l.unstable_scheduleCallback,bs=l.unstable_cancelCallback,tp=l.unstable_shouldYield,np=l.unstable_requestPaint,wt=l.unstable_now,ap=l.unstable_getCurrentPriorityLevel,Sc=l.unstable_ImmediatePriority,Ec=l.unstable_UserBlockingPriority,Cl=l.unstable_NormalPriority,ip=l.unstable_LowPriority,Tc=l.unstable_IdlePriority,lp=l.log,rp=l.unstable_setDisableYieldValue,Ai=null,St=null;function Tn(e){if(typeof lp=="function"&&rp(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Ai,e)}catch{}}var Et=Math.clz32?Math.clz32:op,sp=Math.log,up=Math.LN2;function op(e){return e>>>=0,e===0?32:31-(sp(e)/up|0)|0}var Nl=256,Ul=262144,kl=4194304;function ea(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 Dl(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var u=0,o=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=i&134217727;return p!==0?(i=p&~o,i!==0?u=ea(i):(d&=p,d!==0?u=ea(d):n||(n=p&~e,n!==0&&(u=ea(n))))):(p=i&~o,p!==0?u=ea(p):d!==0?u=ea(d):n||(n=i&~e,n!==0&&(u=ea(n)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:u}function Oi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cp(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 xc(){var e=kl;return kl<<=1,(kl&62914560)===0&&(kl=4194304),e}function _s(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ri(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hp(e,t,n,i,u,o){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,b=e.expirationTimes,A=e.hiddenUpdates;for(n=d&~n;0<n;){var U=31-Et(n),z=1<<U;p[U]=0,b[U]=-1;var R=A[U];if(R!==null)for(A[U]=null,U=0;U<R.length;U++){var C=R[U];C!==null&&(C.lane&=-536870913)}n&=~z}i!==0&&Ac(e,i,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(d&~t))}function Ac(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Et(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function Oc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Et(n),u=1<<i;u&t|e[i]&t&&(e[i]|=t),n&=~u}}function Rc(e,t){var n=t&-t;return n=(n&42)!==0?1:ws(n),(n&(e.suspendedLanes|t))!==0?0:n}function ws(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 Ss(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jc(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:gm(e.type))}function Cc(e,t){var n=q.p;try{return q.p=e,t()}finally{q.p=n}}var xn=Math.random().toString(36).slice(2),et="__reactFiber$"+xn,dt="__reactProps$"+xn,Ra="__reactContainer$"+xn,Es="__reactEvents$"+xn,dp="__reactListeners$"+xn,fp="__reactHandles$"+xn,Nc="__reactResources$"+xn,ji="__reactMarker$"+xn;function Ts(e){delete e[et],delete e[dt],delete e[Es],delete e[dp],delete e[fp]}function ja(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ra]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ff(e);e!==null;){if(n=e[et])return n;e=Ff(e)}return t}e=n,n=e.parentNode}return null}function Ca(e){if(e=e[et]||e[Ra]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ci(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Na(e){var t=e[Nc];return t||(t=e[Nc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[ji]=!0}var Uc=new Set,kc={};function ta(e,t){Ua(e,t),Ua(e+"Capture",t)}function Ua(e,t){for(kc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var mp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
8037D\\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]*$"),Dc={},zc={};function gp(e){return vs.call(zc,e)?!0:vs.call(Dc,e)?!1:mp.test(e)?zc[e]=!0:(Dc[e]=!0,!1)}function zl(e,t,n){if(gp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function Ml(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function ln(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function Dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pp(e,t,n){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(d){n=""+d,o.call(this,d)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xs(e){if(!e._valueTracker){var t=Mc(e)?"checked":"value";e._valueTracker=pp(e,t,""+e[t])}}function Lc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Mc(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Ll(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 vp=/[\n"\\]/g;function zt(e){return e.replace(vp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function As(e,t,n,i,u,o,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Os(e,d,Dt(t)):n!=null?Os(e,d,Dt(n)):i!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Dt(p):e.removeAttribute("name")}function Bc(e,t,n,i,u,o,d,p){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){xs(e);return}n=n!=null?""+Dt(n):"",t=t!=null?""+Dt(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=p?e.checked:!!i,e.defaultChecked=!!i,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),xs(e)}function Os(e,t,n){t==="number"&&Ll(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ka(e,t,n,i){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&i&&(e[n].defaultSelected=!0)}else{for(n=""+Dt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function qc(e,t,n){if(t!=null&&(t=""+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Dt(n):""}function Hc(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(s(92));if(L(i)){if(1<i.length)throw Error(s(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=Dt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),xs(e)}function Da(e,t){if(t){var n=e.firstChild;
vendor: 4,140 bytes, line 8
8if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yp=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 $c(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||yp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Gc(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,n!=null){for(var i in n)!n.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)&&n[u]!==i&&$c(e,u,i)}else for(var o in t)t.hasOwnProperty(o)&&$c(e,o,t[o])}function Rs(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 bp=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
8-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"]]),_p=/^[\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 Bl(e){return _p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function rn(){}var js=null;function Cs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var za=null,Ma=null;function Vc(e){var t=Ca(e);if(t&&(e=t.stateNode)){var n=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(As(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var u=i[dt]||null;if(!u)throw Error(s(90));As(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&Lc(i)}break e;case"textarea":qc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ka(e,!!n.multiple,t,!1)}}}var Ns=!1;function Kc(e,t,n){if(Ns)return e(t,n);Ns=!0;try{var i=e(t);return i}finally{if(Ns=!1,(za!==null||Ma!==null)&&(xr(),za&&(t=za,e=Ma,Ma=za=null,Vc(t),e)))for(t=0;t<e.length;t++)Vc(e[t])}}function Ni(e,t){var n=e.stateNode;if(n===null)return null;var i=n[dt]||null;if(i===null)return null;n=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(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Us=!1;if(sn)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Us=!0}}),window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Us=!1}var An=null,ks=null,ql=null;function Yc(){if(ql)return ql;var e,t=ks,n=t.length,i,u="value"in An?An.value:An.textContent,o=u.length;for(e=0;e<n&&t[e]===u[e];e++);var d=n-e;for(i=1;i<=d&&t[n-i]===u[o-i];i++);return ql=u.slice(e,1<i?1-i:void 0)}function Hl(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 $l(){return!0}function Qc(){return!1}function ft(e){function t(n,i,u,o,d){this._reactName=n,this._targetInst=u,this.type=i,this.nativeEvent=o,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?$l:Qc,this.isPropagationStopped=Qc,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=$l)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$l)},persist:function(){},isPersistent:$l}),t}var na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gl=ft(na),ki=T({},na,{view:0,detail:0}),wp=ft(ki),Ds,zs,Di,Vl=T({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ls,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!==Di&&(Di&&e.type==="mousemove"?(Ds=e.screenX-Di.screenX,zs=e.screenY-Di.screenY):zs=Ds=0,Di=e),Ds)},movementY:function(e){return"movementY"in e?e.movementY:zs}}),Jc=ft(Vl),Sp=T({},Vl,{dataTransfer:0}),Ep=ft(Sp),Tp=T({},ki,{relatedTarget:0}),Ms=ft(Tp),xp=T({},na,{animationName:0,elapsedTime:0,pseudoElement:0}),Ap=ft(xp),Op=T({},na,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rp=ft(Op),jp=T({},na,{data:0}),Xc=ft(jp),Cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Np={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"},Up={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Up[e])?!!t[e]:!1}function Ls(){return kp}var Dp=T({},ki,{key:function(e){if(e.key){var t=Cp[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,186 bytes, line 8
8return e.type==="keypress"?(e=Hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ls,charCode:function(e){return e.type==="keypress"?Hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zp=ft(Dp),Mp=T({},Vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zc=ft(Mp),Lp=T({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ls}),Bp=ft(Lp),qp=T({},na,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hp=ft(qp),$p=T({},Vl,{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}),Gp=ft($p),Vp=T({},na,{newState:0,oldState:0}),Kp=ft(Vp),Yp=[9,13,27,32],Bs=sn&&"CompositionEvent"in window,zi=null;sn&&"documentMode"in document&&(zi=document.documentMode);var Qp=sn&&"TextEvent"in window&&!zi,Ic=sn&&(!Bs||zi&&8<zi&&11>=zi),Pc=" ",Wc=!1;function Fc(e,t){switch(e){case"keyup":return Yp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var La=!1;function Jp(e,t){switch(e){case"compositionend":return eh(t);case"keypress":return t.which!==32?null:(Wc=!0,Pc);case"textInput":return e=t.data,e===Pc&&Wc?null:e;default:return null}}function Xp(e,t){if(La)return e==="compositionend"||!Bs&&Fc(e,t)?(e=Yc(),ql=ks=An=null,La=!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 Ic&&t.locale!=="ko"?null:t.data;default:return null}}var Zp={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 th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zp[e.type]:t==="textarea"}function nh(e,t,n,i){za?Ma?Ma.push(i):Ma=[i]:za=i,t=Ur(t,"onChange"),0<t.length&&(n=new Gl("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Mi=null,Li=null;function Ip(e){qf(e,0)}function Kl(e){var t=Ci(e);if(Lc(t))return e}function ah(e,t){if(e==="change")return t}var ih=!1;if(sn){var qs;if(sn){var Hs="oninput"in document;if(!Hs){var lh=document.createElement("div");lh.setAttribute("oninput","return;"),Hs=typeof lh.oninput=="function"}qs=Hs}else qs=!1;ih=qs&&(!document.documentMode||9<document.documentMode)}function rh(){Mi&&(Mi.detachEvent("onpropertychange",sh),Li=Mi=null)}function sh(e){if(e.propertyName==="value"&&Kl(Li)){var t=[];nh(t,Li,e,Cs(e)),Kc(Ip,t)}}function Pp(e,t,n){e==="focusin"?(rh(),Mi=t,Li=n,Mi.attachEvent("onpropertychange",sh)):e==="focusout"&&rh()}function Wp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(Li)}function Fp(e,t){if(e==="click")return Kl(t)}function ev(e,t){if(e==="input"||e==="change")return Kl(t)}function tv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:tv;function Bi(e,t){if(Tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var u=n[i];if(!vs.call(t,u)||!Tt(e[u],t[u]))return!1}return!0}function uh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function oh(e,t){var n=uh(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uh(n)}}function ch(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ch(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ll(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ll(e.document)}return t}function $s(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 nv=sn&&"documentMode"in document&&11>=document.documentMode,Ba=null,Gs=null,qi=null,Vs=!1;function dh(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vs||Ba==null||Ba!==Ll(i)||(i=Ba,"selectionStart"in i&&$s(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: 15,338 bytes, line 8
8sNode:i.focusNode,focusOffset:i.focusOffset}),qi&&Bi(qi,i)||(qi=i,i=Ur(Gs,"onSelect"),0<i.length&&(t=new Gl("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=Ba)))}function aa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qa={animationend:aa("Animation","AnimationEnd"),animationiteration:aa("Animation","AnimationIteration"),animationstart:aa("Animation","AnimationStart"),transitionrun:aa("Transition","TransitionRun"),transitionstart:aa("Transition","TransitionStart"),transitioncancel:aa("Transition","TransitionCancel"),transitionend:aa("Transition","TransitionEnd")},Ks={},fh={};sn&&(fh=document.createElement("div").style,"AnimationEvent"in window||(delete qa.animationend.animation,delete qa.animationiteration.animation,delete qa.animationstart.animation),"TransitionEvent"in window||delete qa.transitionend.transition);function ia(e){if(Ks[e])return Ks[e];if(!qa[e])return e;var t=qa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fh)return Ks[e]=t[n];return e}var mh=ia("animationend"),gh=ia("animationiteration"),ph=ia("animationstart"),av=ia("transitionrun"),iv=ia("transitionstart"),lv=ia("transitioncancel"),vh=ia("transitionend"),yh=new Map,Ys="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(" ");Ys.push("scrollEnd");function Yt(e,t){yh.set(e,t),ta(t,[e])}var Yl=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)},Mt=[],Ha=0,Qs=0;function Ql(){for(var e=Ha,t=Qs=Ha=0;t<e;){var n=Mt[t];Mt[t++]=null;var i=Mt[t];Mt[t++]=null;var u=Mt[t];Mt[t++]=null;var o=Mt[t];if(Mt[t++]=null,i!==null&&u!==null){var d=i.pending;d===null?u.next=u:(u.next=d.next,d.next=u),i.pending=u}o!==0&&bh(n,u,o)}}function Jl(e,t,n,i){Mt[Ha++]=e,Mt[Ha++]=t,Mt[Ha++]=n,Mt[Ha++]=i,Qs|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Js(e,t,n,i){return Jl(e,t,n,i),Xl(e)}function la(e,t){return Jl(e,null,null,t),Xl(e)}function bh(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var u=!1,o=e.return;o!==null;)o.childLanes|=n,i=o.alternate,i!==null&&(i.childLanes|=n),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-Et(n),e=o.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=n|536870912),o):null}function Xl(e){if(50<sl)throw sl=0,no=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $a={};function rv(e,t,n,i){this.tag=e,this.key=n,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 xt(e,t,n,i){return new rv(e,t,n,i)}function Xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function un(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function _h(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zl(e,t,n,i,u,o){var d=0;if(i=e,typeof e=="function")Xs(e)&&(d=1);else if(typeof e=="string")d=hy(e,n,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Be:return e=xt(31,n,t,u),e.elementType=Be,e.lanes=o,e;case B:return ra(n.children,u,o,t);case $:d=8,u|=24;break;case V:return e=xt(12,n,t,u|2),e.elementType=V,e.lanes=o,e;case _e:return e=xt(13,n,t,u),e.elementType=_e,e.lanes=o,e;case le:return e=xt(19,n,t,u),e.elementType=le,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:d=10;break e;case K:d=9;break e;case W:d=11;break e;case I:d=14;break e;case ne:d=16,i=null;break e}d=29,n=Error(s(130,e===null?"null":typeof e,"")),i=null}return t=xt(d,n,t,u),t.elementType=e,t.type=i,t.lanes=o,t}function ra(e,t,n,i){return e=xt(7,e,i,t),e.lanes=n,e}function Zs(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function wh(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function Is(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sh=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var n=Sh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:wc(t)},Sh.set(e,t),t)}return{value:e,source:t,stack:wc(t)}}var Ga=[],Va=0,Il=null,Hi=0,Bt=[],qt=0,On=null,Wt=1,Ft="";function on(e,t){Ga[Va++]=Hi,Ga[Va++]=Il,Il=e,Hi=t}function Eh(e,t,n){Bt[qt++]=Wt,Bt[qt++]=Ft,Bt[qt++]=On,On=e;var i=Wt;e=Ft;var u=32-Et(i)-1;i&=~(1<<u),n+=1;var o=32-Et(t)+u;if(30<o){var d=u-u%5;o=(i&(1<<d)-1).toString(32),i>>=d,u-=d,Wt=1<<32-Et(t)+u|n<<u|i,Ft=o+e}else Wt=1<<o|n<<u|i,Ft=e}function Ps(e){e.return!==null&&(on(e,1),Eh(e,1,0))}function Ws(e){for(;e===Il;)Il=Ga[--Va],Ga[Va]=null,Hi=Ga[--Va],Ga[Va]=null;for(;e===On;)On=Bt[--qt],Bt[qt]=null,Ft=Bt[--qt],Bt[qt]=null,Wt=Bt[--qt],Bt[qt]=null}function Th(e,t){Bt[qt++]=Wt,Bt[qt++]=Ft,Bt[qt++]=On,Wt=t.id,Ft=t.overflow,On=e}var tt=null,De=null,ge=!1,Rn=null,Ht=!1,Fs=Error(s(519));function jn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $i(Lt(t,e)),Fs}function xh(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[et]=e,t[dt]=i,n){case"dialog":de("cancel",t),de("close",t);break;case"iframe":case"object":case"embed":de("load",t);break;case"video":case"audio":for(n=0;n<ol.length;n++)de(ol[n],t);break;case"source":de("error",t);break;case"img":case"image":case"link":de("error",t),de("load",t);break;case"details":de("toggle",t);break;case"input":de("invalid",t),Bc(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":de("invalid",t);break;case"textarea":de("invalid",t),Hc(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||Vf(t.textContent,n)?(i.popover!=null&&(de("beforetoggle",t),de("toggle",t)),i.onScroll!=null&&de("scroll",t),i.onScrollEnd!=null&&de("scrollend",t),i.onClick!=null&&(t.onclick=rn),t=!0):t=!1,t||jn(e,!0)}function Ah(e){for(tt=e.return;tt;)switch(tt.tag){case 5:case 31:case 13:Ht=!1;return;case 27:case 3:Ht=!0;return;default:tt=tt.return}}function Ka(e){if(e!==tt)return!1;if(!ge)return Ah(e),ge=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||yo(e.type,e.memoizedProps)),n=!n),n&&De&&jn(e),Ah(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));De=Wf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));De=Wf(e)}else t===27?(t=De,Vn(e.type)?(e=Eo,Eo=null,De=e):De=t):De=tt?Gt(e.stateNode.nextSibling):null;return!0}function sa(){De=tt=null,ge=!1}function eu(){var e=Rn;return e!==null&&(vt===null?vt=e:vt.push.apply(vt,e),Rn=null),e}function $i(e){Rn===null?Rn=[e]:Rn.push(e)}var tu=w(null),ua=null,cn=null;function Cn(e,t,n){G(tu,t._currentValue),t._currentValue=n}function hn(e){e._currentValue=tu.current,M(tu)}function nu(e,t,n){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===n)break;e=e.return}}function au(e,t,n,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var d=u.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=u;for(var b=0;b<t.length;b++)if(p.context===t[b]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),nu(o.return,n,e),i||(d=null);break e}o=p.next}}else if(u.tag===18){if(d=u.return,d===null)throw Error(s(341));d.lanes|=n,o=d.alternate,o!==null&&(o.lanes|=n),nu(d,n,e),d=null}else d=u.child;if(d!==null)d.return=u;else for(d=u;d!==null;){if(d===e){d=null;break}if(u=d.sibling,u!==null){u.return=d.return,d=u;break}d=d.return}u=d}}function Ya(e,t,n,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 d=u.alternate;if(d===null)throw Error(s(387));if(d=d.memoizedProps,d!==null){var p=u.type;Tt(u.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(u===Se.current){if(d=u.alternate,d===null)throw Error(s(387));d.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ml):e=[ml])}u=u.return}e!==null&&au(t,e,n,i),t.flags|=262144}function Pl(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){ua=e,cn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function nt(e){return Oh(ua,e)}function Wl(e,t){return ua===null&&oa(e),Oh(e,t)}function Oh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},cn===null){if(e===null)throw Error(s(308));cn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cn=cn.next=t;return n}var sv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},uv=l.unstable_scheduleCallback,ov=l.unstable_NormalPriority,Ye={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iu(){return{controller:new sv,data:new Map,refCount:0}}function Gi(e){e.refCount--,e.refCount===0&&uv(ov,function(){e.controller.abort()})}var Vi=null,lu=0,Qa=0,Ja=null;function cv(e,t){if(Vi===null){var n=Vi=[];lu=0,Qa=uo(),Ja={status:"pending",value:void 0,then:function(i){n.push(i)}}}return lu++,t.then(Rh,Rh),t}function Rh(){if(--lu===0&&Vi!==null){Ja!==null&&(Ja.status="fulfilled");var e=Vi;Vi=null,Qa=0,Ja=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hv(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),i}var jh=j.S;j.S=function(e,t){ff=wt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&cv(e,t),jh!==null&&jh(e,t)};var ca=w(null);function ru(){var e=ca.current;return e!==null?e:Ne.pooledCache}function Fl(e,t){t===null?G(ca,ca.current):G(ca,t.pool)}function Ch(){var e=ru();return e===null?null:{parent:Ye._currentValue,pool:e}}var Xa=Error(s(460)),su=Error(s(474)),er=Error(s(542)),tr={then:function(){}};function Nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uh(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(rn,rn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dh(e),e;default:if(typeof t.status=="string")t.then(rn,rn);else{if(e=Ne,e!==null&&100<e.shellSuspendCounter)throw Error(s(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,Dh(e),e}throw da=t,Xa}}function ha(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(da=n,Xa):n}}var da=null;function kh(){if(da===null)throw Error(s(459));var e=da;return da=null,e}function Dh(e){if(e===Xa||e===er)throw Error(s(483))}var Za=null,Ki=0;function nr(e){var t=Ki;return Ki+=1,Za===null&&(Za=[]),Uh(Za,e,t)}function Yi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ar(e,t){throw t.$$typeof===O?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zh(e){function t(E,_){if(e){var x=E.deletions;x===null?(E.deletions=[_],E.flags|=16):x.push(_)}}function n(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=un(E,_),E.index=0,E.sibling=null,E}function o(E,_,x){return E.index=x,e?(x=E.alternate,x!==null?(x=x.index,x<_?(E.flags|=67108866,_):x):(E.flags|=67108866,_)):(E.flags|=1048576,_)}function d(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function p(E,_,x,k){return _===null||_.tag!==6?(_=Zs(x,E.mode,k),_.return=E,_):(_=u(_,x),_.return=E,_)}function b(E,_,x,k){var P=x.type;return P===B?U(E,_,x.props.children,k,x.key):_!==null&&(_.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ne&&ha(P)===_.type)?(_=u(_,x.props),Yi(_,x),_.return=E,_):(_=Zl(x.type,x.key,x.props,null,E.mode,k),Yi(_,x),_.return=E,_)}function A(E,_,x,k){return _===null||_.tag!==4||_.stateNode.containerInfo!==x.containerInfo||_.stateNode.implementation!==x.implementation?(_=Is(x,E.mode,k),_.return=E,_):(_=u(_,x.children||[]),_.return=E,_)}function U(E,_,x,k,P){return _===null||_.tag!==7?(_=ra(x,E.mode,k,P),_.return=E,_):(_=u(_,x),_.return=E,_)}function z(E,_,x){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Zs(""+_,E.mode,x),_.return=E,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case N:return x=Zl(_.type,_.key,_.props,null,E.mode,x),Yi(x,_),x.return=E,x;case D:return _=Is(_,E.mode,x),_.return=E,_;case ne:return _=ha(_),z(E,_,x)}if(L(_)||ut(_))return _=ra(_,E.mode,x,null),_.return=E,_;if(typeof _.then=="function")return z(E,nr(_),x);if(_.$$typeof===H)return z(E,Wl(E,_),x);ar(E,_)}return null}function R(E,_,x,k){var P=_!==null?_.key:null;
vendor: 6,723 bytes, line 8
8if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return P!==null?null:p(E,_,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case N:return x.key===P?b(E,_,x,k):null;case D:return x.key===P?A(E,_,x,k):null;case ne:return x=ha(x),R(E,_,x,k)}if(L(x)||ut(x))return P!==null?null:U(E,_,x,k,null);if(typeof x.then=="function")return R(E,_,nr(x),k);if(x.$$typeof===H)return R(E,_,Wl(E,x),k);ar(E,x)}return null}function C(E,_,x,k,P){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return E=E.get(x)||null,p(_,E,""+k,P);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case N:return E=E.get(k.key===null?x:k.key)||null,b(_,E,k,P);case D:return E=E.get(k.key===null?x:k.key)||null,A(_,E,k,P);case ne:return k=ha(k),C(E,_,x,k,P)}if(L(k)||ut(k))return E=E.get(x)||null,U(_,E,k,P,null);if(typeof k.then=="function")return C(E,_,x,nr(k),P);if(k.$$typeof===H)return C(E,_,x,Wl(_,k),P);ar(_,k)}return null}function Q(E,_,x,k){for(var P=null,ye=null,X=_,ue=_=0,me=null;X!==null&&ue<x.length;ue++){X.index>ue?(me=X,X=null):me=X.sibling;var be=R(E,X,x[ue],k);if(be===null){X===null&&(X=me);break}e&&X&&be.alternate===null&&t(E,X),_=o(be,_,ue),ye===null?P=be:ye.sibling=be,ye=be,X=me}if(ue===x.length)return n(E,X),ge&&on(E,ue),P;if(X===null){for(;ue<x.length;ue++)X=z(E,x[ue],k),X!==null&&(_=o(X,_,ue),ye===null?P=X:ye.sibling=X,ye=X);return ge&&on(E,ue),P}for(X=i(X);ue<x.length;ue++)me=C(X,E,ue,x[ue],k),me!==null&&(e&&me.alternate!==null&&X.delete(me.key===null?ue:me.key),_=o(me,_,ue),ye===null?P=me:ye.sibling=me,ye=me);return e&&X.forEach(function(Xn){return t(E,Xn)}),ge&&on(E,ue),P}function F(E,_,x,k){if(x==null)throw Error(s(151));for(var P=null,ye=null,X=_,ue=_=0,me=null,be=x.next();X!==null&&!be.done;ue++,be=x.next()){X.index>ue?(me=X,X=null):me=X.sibling;var Xn=R(E,X,be.value,k);if(Xn===null){X===null&&(X=me);break}e&&X&&Xn.alternate===null&&t(E,X),_=o(Xn,_,ue),ye===null?P=Xn:ye.sibling=Xn,ye=Xn,X=me}if(be.done)return n(E,X),ge&&on(E,ue),P;if(X===null){for(;!be.done;ue++,be=x.next())be=z(E,be.value,k),be!==null&&(_=o(be,_,ue),ye===null?P=be:ye.sibling=be,ye=be);return ge&&on(E,ue),P}for(X=i(X);!be.done;ue++,be=x.next())be=C(X,E,ue,be.value,k),be!==null&&(e&&be.alternate!==null&&X.delete(be.key===null?ue:be.key),_=o(be,_,ue),ye===null?P=be:ye.sibling=be,ye=be);return e&&X.forEach(function(Sy){return t(E,Sy)}),ge&&on(E,ue),P}function Re(E,_,x,k){if(typeof x=="object"&&x!==null&&x.type===B&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case N:e:{for(var P=x.key;_!==null;){if(_.key===P){if(P=x.type,P===B){if(_.tag===7){n(E,_.sibling),k=u(_,x.props.children),k.return=E,E=k;break e}}else if(_.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ne&&ha(P)===_.type){n(E,_.sibling),k=u(_,x.props),Yi(k,x),k.return=E,E=k;break e}n(E,_);break}else t(E,_);_=_.sibling}x.type===B?(k=ra(x.props.children,E.mode,k,x.key),k.return=E,E=k):(k=Zl(x.type,x.key,x.props,null,E.mode,k),Yi(k,x),k.return=E,E=k)}return d(E);case D:e:{for(P=x.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===x.containerInfo&&_.stateNode.implementation===x.implementation){n(E,_.sibling),k=u(_,x.children||[]),k.return=E,E=k;break e}else{n(E,_);break}else t(E,_);_=_.sibling}k=Is(x,E.mode,k),k.return=E,E=k}return d(E);case ne:return x=ha(x),Re(E,_,x,k)}if(L(x))return Q(E,_,x,k);if(ut(x)){if(P=ut(x),typeof P!="function")throw Error(s(150));return x=P.call(x),F(E,_,x,k)}if(typeof x.then=="function")return Re(E,_,nr(x),k);if(x.$$typeof===H)return Re(E,_,Wl(E,x),k);ar(E,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,_!==null&&_.tag===6?(n(E,_.sibling),k=u(_,x),k.return=E,E=k):(n(E,_),k=Zs(x,E.mode,k),k.return=E,E=k),d(E)):n(E,_)}return function(E,_,x,k){try{Ki=0;var P=Re(E,_,x,k);return Za=null,P}catch(X){if(X===Xa||X===er)throw X;var ye=xt(29,X,null,E.mode);return ye.lanes=k,ye.return=E,ye}}}var fa=zh(!0),Mh=zh(!1),Nn=!1;function uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ou(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 Un(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kn(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(we&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=Xl(e),bh(e,null,n),t}return Jl(e,i,t,n),Xl(e)}function Qi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Oc(e,n)}}function cu(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var u=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?u=o=d:o=o.next=d,n=n.next}while(n!==null);o===null?u=o=t:o=o.next=t}else u=o=t;n={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var hu=!1;function Ji(){if(hu){var e=Ja;if(e!==null)throw e}}function Xi(e,t,n,i){hu=!1;var u=e.updateQueue;Nn=!1;var o=u.firstBaseUpdate,d=u.lastBaseUpdate,p=u.shared.pending;if(p!==null){u.shared.pending=null;var b=p,A=b.next;b.next=null,d===null?o=A:d.next=A,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,p=U.lastBaseUpdate,p!==d&&(p===null?U.firstBaseUpdate=A:p.next=A,U.lastBaseUpdate=b))}if(o!==null){var z=u.baseState;d=0,U=A=b=null,p=o;do{var R=p.lane&-536870913,C=R!==p.lane;if(C?(fe&R)===R:(i&R)===R){R!==0&&R===Qa&&(hu=!0),U!==null&&(U=U.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var Q=e,F=p;R=t;var Re=n;switch(F.tag){case 1:if(Q=F.payload,typeof Q=="function"){z=Q.call(Re,z,R);break e}z=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=F.payload,R=typeof Q=="function"?Q.call(Re,z,R):Q,R==null)break e;z=T({},z,R);break e;case 2:Nn=!0}}R=p.callback,R!==null&&(e.flags|=64,C&&(e.flags|=8192),C=u.callbacks,C===null?u.callbacks=[R]:C.push(R))}else C={lane:R,tag:p.tag,payload:p.payload,callback:p.callback,next:null},U===null?(A=U=C,b=z):U=U.next=C,d|=R;if(p=p.next,p===null){if(p=u.shared.pending,p===null)break;C=p,p=C.next,C.next=null,u.lastBaseUpdate=C,u.shared.pending=null}}while(!0);U===null&&(b=z),u.baseState=b,u.firstBaseUpdate=A,u.lastBaseUpdate=U,o===null&&(u.shared.lanes=0),Bn|=d,e.lanes=d,e.memoizedState=z}}function Lh(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Bh(e,t){var n=e.callbacks;
vendor: 4,310 bytes, line 8
8if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Lh(n[e],t)}var Ia=w(null),ir=w(0);function qh(e,t){e=_n,G(ir,e),G(Ia,t),_n=e|t.baseLanes}function du(){G(ir,_n),G(Ia,Ia.current)}function fu(){_n=ir.current,M(Ia),M(ir)}var At=w(null),$t=null;function Dn(e){var t=e.alternate;G(Ve,Ve.current&1),G(At,e),$t===null&&(t===null||Ia.current!==null||t.memoizedState!==null)&&($t=e)}function mu(e){G(Ve,Ve.current),G(At,e),$t===null&&($t=e)}function Hh(e){e.tag===22?(G(Ve,Ve.current),G(At,e),$t===null&&($t=e)):zn()}function zn(){G(Ve,Ve.current),G(At,At.current)}function Ot(e){M(At),$t===e&&($t=null),M(Ve)}var Ve=w(0);function lr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||wo(n)||So(n)))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}var dn=0,se=null,Ae=null,Qe=null,rr=!1,Pa=!1,ma=!1,sr=0,Zi=0,Wa=null,dv=0;function qe(){throw Error(s(321))}function gu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tt(e[n],t[n]))return!1;return!0}function pu(e,t,n,i,u,o){return dn=o,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Ed:Nu,ma=!1,o=n(i,u),ma=!1,Pa&&(o=Gh(t,n,i,u)),$h(e),o}function $h(e){j.H=Wi;var t=Ae!==null&&Ae.next!==null;if(dn=0,Qe=Ae=se=null,rr=!1,Zi=0,Wa=null,t)throw Error(s(300));e===null||Je||(e=e.dependencies,e!==null&&Pl(e)&&(Je=!0))}function Gh(e,t,n,i){se=e;var u=0;do{if(Pa&&(Wa=null),Zi=0,Pa=!1,25<=u)throw Error(s(301));if(u+=1,Qe=Ae=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Td,o=t(n,i)}while(Pa);return o}function fv(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(se.flags|=1024),t}function vu(){var e=sr!==0;return sr=0,e}function yu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bu(e){if(rr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rr=!1}dn=0,Qe=Ae=se=null,Pa=!1,Zi=sr=0,Wa=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?se.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Ke(){if(Ae===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Qe===null?se.memoizedState:Qe.next;if(t!==null)Qe=t,Ae=e;else{if(e===null)throw se.alternate===null?Error(s(467)):Error(s(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Qe===null?se.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Zi;return Zi+=1,Wa===null&&(Wa=[]),e=Uh(Wa,e,t),t=se,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Ed:Nu),e}function or(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===H)return nt(e)}throw Error(s(438,String(e)))}function _u(e){var t=null,n=se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=se.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}),n===null&&(n=ur(),se.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=En;return t.index++,n}function fn(e,t){return typeof t=="function"?t(e):t}function cr(e){var t=Ke();return wu(t,Ae,e)}function wu(e,t,n){var i=e.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var u=e.baseQueue,o=i.pending;if(o!==null){if(u!==null){var d=u.next;u.next=o.next,o.next=d}t.baseQueue=u=o,i.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var p=d=null,b=null,A=t,U=!1;do{var z=A.lane&-536870913;if(z!==A.lane?(fe&z)===z:(dn&z)===z){var R=A.revertLane;
vendor: 4,144 bytes, line 8
8if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),z===Qa&&(U=!0);else if((dn&R)===R){A=A.next,R===Qa&&(U=!0);continue}else z={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(p=b=z,d=o):b=b.next=z,se.lanes|=R,Bn|=R;z=A.action,ma&&n(o,z),o=A.hasEagerState?A.eagerState:n(o,z)}else R={lane:z,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(p=b=R,d=o):b=b.next=R,se.lanes|=z,Bn|=z;A=A.next}while(A!==null&&A!==t);if(b===null?d=o:b.next=p,!Tt(o,e.memoizedState)&&(Je=!0,U&&(n=Ja,n!==null)))throw n;e.memoizedState=o,e.baseState=d,e.baseQueue=b,i.lastRenderedState=o}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Su(e){var t=Ke(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var i=n.dispatch,u=n.pending,o=t.memoizedState;if(u!==null){n.pending=null;var d=u=u.next;do o=e(o,d.action),d=d.next;while(d!==u);Tt(o,t.memoizedState)||(Je=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Vh(e,t,n){var i=se,u=Ke(),o=ge;if(o){if(n===void 0)throw Error(s(407));n=n()}else n=t();var d=!Tt((Ae||u).memoizedState,n);if(d&&(u.memoizedState=n,Je=!0),u=u.queue,xu(Qh.bind(null,i,u,e),[e]),u.getSnapshot!==t||d||Qe!==null&&Qe.memoizedState.tag&1){if(i.flags|=2048,Fa(9,{destroy:void 0},Yh.bind(null,i,u,n,t),null),Ne===null)throw Error(s(349));o||(dn&127)!==0||Kh(i,t,n)}return n}function Kh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t=ur(),se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yh(e,t,n,i){t.value=n,t.getSnapshot=i,Jh(t)&&Xh(e)}function Qh(e,t,n){return n(function(){Jh(t)&&Xh(e)})}function Jh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function Xh(e){var t=la(e,2);t!==null&&yt(t,e,2)}function Eu(e){var t=ht();if(typeof e=="function"){var n=e;if(e=n(),ma){Tn(!0);try{n()}finally{Tn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fn,lastRenderedState:e},t}function Zh(e,t,n,i){return e.baseState=n,wu(e,Ae,typeof i=="function"?i:fn)}function mv(e,t,n,i,u){if(fr(e))throw Error(s(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(d){o.listeners.push(d)}};j.T!==null?n(!0):o.isTransition=!1,i(o),n=t.pending,n===null?(o.next=t.pending=o,Ih(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ih(e,t){var n=t.action,i=t.payload,u=e.state;if(t.isTransition){var o=j.T,d={};j.T=d;try{var p=n(u,i),b=j.S;b!==null&&b(d,p),Ph(e,t,p)}catch(A){Tu(e,t,A)}finally{o!==null&&d.types!==null&&(o.types=d.types),j.T=o}}else try{o=n(u,i),Ph(e,t,o)}catch(A){Tu(e,t,A)}}function Ph(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Wh(e,t,i)},function(i){return Tu(e,t,i)}):Wh(e,t,n)}function Wh(e,t,n){t.status="fulfilled",t.value=n,Fh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ih(e,n)))}function Tu(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,Fh(t),t=t.next;while(t!==i)}e.action=null}function Fh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ed(e,t){return t}function td(e,t){if(ge){var n=Ne.formState;if(n!==null){e:{var i=se;if(ge){if(De){t:{for(var u=De,o=Ht;u.nodeType!==8;){if(!o){u=null;break t}if(u=Gt(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){De=Gt(u.nextSibling),i=u.data==="F!";break e}}jn(i)}i=!1}i&&(t=n[0])}}return n=ht(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ed,lastRenderedState:t},n.queue=i,n=_d.bind(null,se,i),i.dispatch=n,i=Eu(!1),o=Cu.bind(null,se,!1,i.queue),i=ht(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,n=mv.bind(null,se,u,o,n),u.dispatch=n,i.memoizedState=e,[t,n,!1]}
vendor: 6,013 bytes, line 8
8function nd(e){var t=Ke();return ad(t,Ae,e)}function ad(e,t,n){if(t=wu(e,t,ed)[0],e=cr(fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ii(t)}catch(d){throw d===Xa?er:d}else i=t;t=Ke();var u=t.queue,o=u.dispatch;return n!==t.memoizedState&&(se.flags|=2048,Fa(9,{destroy:void 0},gv.bind(null,u,n),null)),[i,o,e]}function gv(e,t){e.action=t}function id(e){var t=Ke(),n=Ae;if(n!==null)return ad(t,n,e);Ke(),t=t.memoizedState,n=Ke();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Fa(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=se.updateQueue,t===null&&(t=ur(),se.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function ld(){return Ke().memoizedState}function hr(e,t,n,i){var u=ht();se.flags|=e,u.memoizedState=Fa(1|t,{destroy:void 0},n,i===void 0?null:i)}function dr(e,t,n,i){var u=Ke();i=i===void 0?null:i;var o=u.memoizedState.inst;Ae!==null&&i!==null&&gu(i,Ae.memoizedState.deps)?u.memoizedState=Fa(t,o,n,i):(se.flags|=e,u.memoizedState=Fa(1|t,o,n,i))}function rd(e,t){hr(8390656,8,e,t)}function xu(e,t){dr(2048,8,e,t)}function pv(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=ur(),se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function sd(e){var t=Ke().memoizedState;return pv({ref:t,nextImpl:e}),function(){if((we&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function ud(e,t){return dr(4,2,e,t)}function od(e,t){return dr(4,4,e,t)}function cd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hd(e,t,n){n=n!=null?n.concat([e]):null,dr(4,4,cd.bind(null,t,e),n)}function Au(){}function dd(e,t){var n=Ke();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&gu(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function fd(e,t){var n=Ke();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&gu(t,i[1]))return i[0];if(i=e(),ma){Tn(!0);try{e()}finally{Tn(!1)}}return n.memoizedState=[i,t],i}function Ou(e,t,n){return n===void 0||(dn&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=gf(),se.lanes|=e,Bn|=e,n)}function md(e,t,n,i){return Tt(n,t)?n:Ia.current!==null?(e=Ou(e,n,i),Tt(e,t)||(Je=!0),e):(dn&42)===0||(dn&1073741824)!==0&&(fe&261930)===0?(Je=!0,e.memoizedState=n):(e=gf(),se.lanes|=e,Bn|=e,t)}function gd(e,t,n,i,u){var o=q.p;q.p=o!==0&&8>o?o:8;var d=j.T,p={};j.T=p,Cu(e,!1,t,n);try{var b=u(),A=j.S;if(A!==null&&A(p,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=hv(b,i);Pi(e,t,U,Ct(e))}else Pi(e,t,i,Ct(e))}catch(z){Pi(e,t,{then:function(){},status:"rejected",reason:z},Ct())}finally{q.p=o,d!==null&&p.types!==null&&(d.types=p.types),j.T=d}}function vv(){}function Ru(e,t,n,i){if(e.tag!==5)throw Error(s(476));var u=pd(e).queue;gd(e,u,t,Y,n===null?vv:function(){return vd(e),n(i)})}function pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fn,lastRenderedState:Y},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vd(e){var t=pd(e);t.next===null&&(t=e.alternate.memoizedState),Pi(e,t.next.queue,{},Ct())}function ju(){return nt(ml)}function yd(){return Ke().memoizedState}function bd(){return Ke().memoizedState}function yv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ct();e=Un(n);var i=kn(t,e,n);i!==null&&(yt(i,t,n),Qi(i,t,n)),t={cache:iu()},e.payload=t;return}t=t.return}}function bv(e,t,n){var i=Ct();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fr(e)?wd(t,n):(n=Js(e,t,n,i),n!==null&&(yt(n,e,i),Sd(n,t,i)))}function _d(e,t,n){var i=Ct();Pi(e,t,n,i)}function Pi(e,t,n,i){var u={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fr(e))wd(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var d=t.lastRenderedState,p=o(d,n);if(u.hasEagerState=!0,u.eagerState=p,Tt(p,d))return Jl(e,t,u,0),Ne===null&&Ql(),!1}catch{}if(n=Js(e,t,u,i),n!==null)return yt(n,e,i),Sd(n,t,i),!0}return!1}function Cu(e,t,n,i){if(i={lane:2,revertLane:uo(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},fr(e)){if(t)throw Error(s(479))}else t=Js(e,n,i,2),t!==null&&yt(t,e,2)}function fr(e){var t=e.alternate;return e===se||t!==null&&t===se}function wd(e,t){Pa=rr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sd(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Oc(e,n)}}var Wi={readContext:nt,use:or,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Wi.useEffectEvent=qe;var Ed={readContext:nt,use:or,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:rd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,hr(4194308,4,cd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hr(4194308,4,e,t)},useInsertionEffect:function(e,t){hr(4,2,e,t)},useMemo:function(e,t){var n=ht();t=t===void 0?null:t;var i=e();if(ma){Tn(!0);try{e()}finally{Tn(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=ht();if(n!==void 0){var u=n(t);if(ma){Tn(!0);try{n(t)}finally{Tn(!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=bv.bind(null,se,e),[i.memoizedState,e]}
vendor: 2,614 bytes, line 8
8,useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=Eu(e);var t=e.queue,n=_d.bind(null,se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Au,useDeferredValue:function(e,t){var n=ht();return Ou(n,e,t)},useTransition:function(){var e=Eu(!1);return e=gd.bind(null,se,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=se,u=ht();if(ge){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Ne===null)throw Error(s(349));(fe&127)!==0||Kh(i,t,n)}u.memoizedState=n;var o={value:n,getSnapshot:t};return u.queue=o,rd(Qh.bind(null,i,o,e),[e]),i.flags|=2048,Fa(9,{destroy:void 0},Yh.bind(null,i,o,n,t),null),n},useId:function(){var e=ht(),t=Ne.identifierPrefix;if(ge){var n=Ft,i=Wt;n=(i&~(1<<32-Et(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=sr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=dv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ju,useFormState:td,useActionState:td,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Cu.bind(null,se,!0,n),n.dispatch=t,[e,t]},useMemoCache:_u,useCacheRefresh:function(){return ht().memoizedState=yv.bind(null,se)},useEffectEvent:function(e){var t=ht(),n={impl:e};return t.memoizedState=n,function(){if((we&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Nu={readContext:nt,use:or,useCallback:dd,useContext:nt,useEffect:xu,useImperativeHandle:hd,useInsertionEffect:ud,useLayoutEffect:od,useMemo:fd,useReducer:cr,useRef:ld,useState:function(){return cr(fn)},useDebugValue:Au,useDeferredValue:function(e,t){var n=Ke();return md(n,Ae.memoizedState,e,t)},useTransition:function(){var e=cr(fn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Vh,useId:yd,useHostTransitionStatus:ju,useFormState:nd,useActionState:nd,useOptimistic:function(e,t){var n=Ke();return Zh(n,Ae,e,t)},useMemoCache:_u,useCacheRefresh:bd};Nu.useEffectEvent=sd;var Td={readContext:nt,use:or,useCallback:dd,useContext:nt,useEffect:xu,useImperativeHandle:hd,useInsertionEffect:ud,useLayoutEffect:od,useMemo:fd,useReducer:Su,useRef:ld,useState:function(){return Su(fn)},useDebugValue:Au,useDeferredValue:function(e,t){var n=Ke();return Ae===null?Ou(n,e,t):md(n,Ae.memoizedState,e,t)},useTransition:function(){var e=Su(fn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Vh,useId:yd,useHostTransitionStatus:ju,useFormState:id,useActionState:id,useOptimistic:function(e,t){var n=Ke();
vendor: 5,887 bytes, line 8
8return Ae!==null?Zh(n,Ae,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:_u,useCacheRefresh:bd};Td.useEffectEvent=sd;function Uu(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ku={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Ct(),u=Un(i);u.payload=t,n!=null&&(u.callback=n),t=kn(e,u,i),t!==null&&(yt(t,e,i),Qi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Ct(),u=Un(i);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=kn(e,u,i),t!==null&&(yt(t,e,i),Qi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ct(),i=Un(n);i.tag=2,t!=null&&(i.callback=t),t=kn(e,i,n),t!==null&&(yt(t,e,n),Qi(t,e,n))}};function xd(e,t,n,i,u,o,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,d):t.prototype&&t.prototype.isPureReactComponent?!Bi(n,i)||!Bi(u,o):!0}function Ad(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&ku.enqueueReplaceState(t,t.state,null)}function ga(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=T({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Od(e){Yl(e)}function Rd(e){console.error(e)}function jd(e){Yl(e)}function mr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Cd(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Du(e,t,n){return n=Un(n),n.tag=3,n.payload={element:null},n.callback=function(){mr(e,t)},n}function Nd(e){return e=Un(e),e.tag=3,e}function Ud(e,t,n,i){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var o=i.value;e.payload=function(){return u(o)},e.callback=function(){Cd(t,n,i)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Cd(t,n,i),typeof u!="function"&&(qn===null?qn=new Set([this]):qn.add(this));var p=i.stack;this.componentDidCatch(i.value,{componentStack:p!==null?p:""})})}function _v(e,t,n,i,u){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Ya(t,n,u,!0),n=At.current,n!==null){switch(n.tag){case 31:case 13:return $t===null?Ar():n.alternate===null&&He===0&&(He=3),n.flags&=-257,n.flags|=65536,n.lanes=u,i===tr?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),lo(e,i,u)),!1;case 22:return n.flags|=65536,i===tr?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),lo(e,i,u)),!1}throw Error(s(435,n.tag))}return lo(e,i,u),Ar(),!1}if(ge)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==Fs&&(e=Error(s(422),{cause:i}),$i(Lt(e,n)))):(i!==Fs&&(t=Error(s(423),{cause:i}),$i(Lt(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=Lt(i,n),u=Du(e.stateNode,i,u),cu(e,u),He!==4&&(He=2)),!1;var o=Error(s(520),{cause:i});if(o=Lt(o,n),rl===null?rl=[o]:rl.push(o),He!==4&&(He=2),t===null)return!0;i=Lt(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=Du(n.stateNode,i,e),cu(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(qn===null||!qn.has(o))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Nd(u),Ud(u,e,n,i),cu(n,u),!1}n=n.return}while(n!==null);return!1}var zu=Error(s(461)),Je=!1;function at(e,t,n,i){t.child=e===null?Mh(t,null,n,i):fa(t,e.child,n,i)}function kd(e,t,n,i,u){n=n.render;var o=t.ref;if("ref"in i){var d={};for(var p in i)p!=="ref"&&(d[p]=i[p])}else d=i;return oa(t),i=pu(e,t,n,d,o,u),p=vu(),e!==null&&!Je?(yu(e,t,u),mn(e,t,u)):(ge&&p&&Ps(t),t.flags|=1,at(e,t,i,u),t.child)}function Dd(e,t,n,i,u){if(e===null){var o=n.type;return typeof o=="function"&&!Xs(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,zd(e,t,o,i,u)):(e=Zl(n.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Vu(e,u)){var d=o.memoizedProps;if(n=n.compare,n=n!==null?n:Bi,n(d,i)&&e.ref===t.ref)return mn(e,t,u)}return t.flags|=1,e=un(o,i),e.ref=t.ref,e.return=t,t.child=e}function zd(e,t,n,i,u){if(e!==null){var o=e.memoizedProps;if(Bi(o,i)&&e.ref===t.ref)if(Je=!1,t.pendingProps=i=o,Vu(e,u))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,mn(e,t,u)}return Mu(e,t,n,i,u)}function Md(e,t,n,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|n:n,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 Ld(e,t,o,n,i)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Fl(t,o!==null?o.cachePool:null),o!==null?qh(t,o):du(),Hh(t);else return i=t.lanes=536870912,Ld(e,t,o!==null?o.baseLanes|n:n,n,i)}else o!==null?(Fl(t,o.cachePool),qh(t,o),zn(),t.memoizedState=null):(e!==null&&Fl(t,null),du(),zn());return at(e,t,u,n),t.child}function Fi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ld(e,t,n,i,u){var o=ru();return o=o===null?null:{parent:Ye._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Fl(t,null),du(),Hh(t),e!==null&&Ya(e,t,i,!0),t.childLanes=u,null}function gr(e,t){return t=vr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}
vendor: 4,139 bytes, line 8
8function Bd(e,t,n){return fa(t,e.child,null,n),e=gr(t,t.pendingProps),e.flags|=2,Ot(t),t.memoizedState=null,e}function wv(e,t,n){var i=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(i.mode==="hidden")return e=gr(t,i),t.lanes=536870912,Fi(null,e);if(mu(t),(e=De)?(e=Pf(e,Ht),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Wt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},n=wh(e),n.return=t,t.child=n,tt=t,De=null)):e=null,e===null)throw jn(t);return t.lanes=536870912,null}return gr(t,i)}var o=e.memoizedState;if(o!==null){var d=o.dehydrated;if(mu(t),u)if(t.flags&256)t.flags&=-257,t=Bd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Je||Ya(e,t,n,!1),u=(n&e.childLanes)!==0,Je||u){if(i=Ne,i!==null&&(d=Rc(i,n),d!==0&&d!==o.retryLane))throw o.retryLane=d,la(e,d),yt(i,e,d),zu;Ar(),t=Bd(e,t,n)}else e=o.treeContext,De=Gt(d.nextSibling),tt=t,ge=!0,Rn=null,Ht=!1,e!==null&&Th(t,e),t=gr(t,i),t.flags|=4096;return t}return e=un(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Mu(e,t,n,i,u){return oa(t),n=pu(e,t,n,i,void 0,u),i=vu(),e!==null&&!Je?(yu(e,t,u),mn(e,t,u)):(ge&&i&&Ps(t),t.flags|=1,at(e,t,n,u),t.child)}function qd(e,t,n,i,u,o){return oa(t),t.updateQueue=null,n=Gh(t,i,n,u),$h(e),i=vu(),e!==null&&!Je?(yu(e,t,o),mn(e,t,o)):(ge&&i&&Ps(t),t.flags|=1,at(e,t,n,o),t.child)}function Hd(e,t,n,i,u){if(oa(t),t.stateNode===null){var o=$a,d=n.contextType;typeof d=="object"&&d!==null&&(o=nt(d)),o=new n(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ku,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},uu(t),d=n.contextType,o.context=typeof d=="object"&&d!==null?nt(d):$a,o.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Uu(t,n,d,i),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(d=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),d!==o.state&&ku.enqueueReplaceState(o,o.state,null),Xi(t,i,o,u),Ji(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,b=ga(n,p);o.props=b;var A=o.context,U=n.contextType;d=$a,typeof U=="object"&&U!==null&&(d=nt(U));var z=n.getDerivedStateFromProps;U=typeof z=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,U||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||A!==d)&&Ad(t,o,i,d),Nn=!1;var R=t.memoizedState;o.state=R,Xi(t,i,o,u),Ji(),A=t.memoizedState,p||R!==A||Nn?(typeof z=="function"&&(Uu(t,n,z,i),A=t.memoizedState),(b=Nn||xd(t,n,b,i,R,A,d))?(U||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=A),o.props=i,o.state=A,o.context=d,i=b):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,ou(e,t),d=t.memoizedProps,U=ga(n,d),o.props=U,z=t.pendingProps,R=o.context,A=n.contextType,b=$a,typeof A=="object"&&A!==null&&(b=nt(A)),p=n.getDerivedStateFromProps,(A=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(d!==z||R!==b)&&Ad(t,o,i,b),Nn=!1,R=t.memoizedState,o.state=R,Xi(t,i,o,u),Ji();
vendor: 5,257 bytes, line 8
8var C=t.memoizedState;d!==z||R!==C||Nn||e!==null&&e.dependencies!==null&&Pl(e.dependencies)?(typeof p=="function"&&(Uu(t,n,p,i),C=t.memoizedState),(U=Nn||xd(t,n,U,i,R,C,b)||e!==null&&e.dependencies!==null&&Pl(e.dependencies))?(A||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,C,b),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,C,b)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=C),o.props=i,o.state=C,o.context=b,i=U):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,pr(e,t),i=(t.flags&128)!==0,o||i?(o=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&i?(t.child=fa(t,e.child,null,u),t.child=fa(t,null,n,u)):at(e,t,n,u),t.memoizedState=o.state,e=t.child):e=mn(e,t,u),e}function $d(e,t,n,i){return sa(),t.flags|=256,at(e,t,n,i),t.child}var Lu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bu(e){return{baseLanes:e,cachePool:Ch()}}function qu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=jt),e}function Gd(e,t,n){var i=t.pendingProps,u=!1,o=(t.flags&128)!==0,d;if((d=o)||(d=e!==null&&e.memoizedState===null?!1:(Ve.current&2)!==0),d&&(u=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(u?Dn(t):zn(),(e=De)?(e=Pf(e,Ht),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Wt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},n=wh(e),n.return=t,t.child=n,tt=t,De=null)):e=null,e===null)throw jn(t);return So(e)?t.lanes=32:t.lanes=536870912,null}var p=i.children;return i=i.fallback,u?(zn(),u=t.mode,p=vr({mode:"hidden",children:p},u),i=ra(i,u,n,null),p.return=t,i.return=t,p.sibling=i,t.child=p,i=t.child,i.memoizedState=Bu(n),i.childLanes=qu(e,d,n),t.memoizedState=Lu,Fi(null,i)):(Dn(t),Hu(t,p))}var b=e.memoizedState;if(b!==null&&(p=b.dehydrated,p!==null)){if(o)t.flags&256?(Dn(t),t.flags&=-257,t=$u(e,t,n)):t.memoizedState!==null?(zn(),t.child=e.child,t.flags|=128,t=null):(zn(),p=i.fallback,u=t.mode,i=vr({mode:"visible",children:i.children},u),p=ra(p,u,n,null),p.flags|=2,i.return=t,p.return=t,i.sibling=p,t.child=i,fa(t,e.child,null,n),i=t.child,i.memoizedState=Bu(n),i.childLanes=qu(e,d,n),t.memoizedState=Lu,t=Fi(null,i));else if(Dn(t),So(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var A=d.dgst;d=A,i=Error(s(419)),i.stack="",i.digest=d,$i({value:i,source:null,stack:null}),t=$u(e,t,n)}else if(Je||Ya(e,t,n,!1),d=(n&e.childLanes)!==0,Je||d){if(d=Ne,d!==null&&(i=Rc(d,n),i!==0&&i!==b.retryLane))throw b.retryLane=i,la(e,i),yt(d,e,i),zu;wo(p)||Ar(),t=$u(e,t,n)}else wo(p)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,De=Gt(p.nextSibling),tt=t,ge=!0,Rn=null,Ht=!1,e!==null&&Th(t,e),t=Hu(t,i.children),t.flags|=4096);return t}return u?(zn(),p=i.fallback,u=t.mode,b=e.child,A=b.sibling,i=un(b,{mode:"hidden",children:i.children}),i.subtreeFlags=b.subtreeFlags&65011712,A!==null?p=un(A,p):(p=ra(p,u,n,null),p.flags|=2),p.return=t,i.return=t,i.sibling=p,t.child=i,Fi(null,i),i=t.child,p=e.child.memoizedState,p===null?p=Bu(n):(u=p.cachePool,u!==null?(b=Ye._currentValue,u=u.parent!==b?{parent:b,pool:b}:u):u=Ch(),p={baseLanes:p.baseLanes|n,cachePool:u}),i.memoizedState=p,i.childLanes=qu(e,d,n),t.memoizedState=Lu,Fi(e.child,i)):(Dn(t),n=e.child,e=n.sibling,n=un(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function Hu(e,t){return t=vr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vr(e,t){return e=xt(22,e,null,t),e.lanes=0,e}function $u(e,t,n){return fa(t,e.child,null,n),e=Hu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vd(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),nu(e.return,t,n)}function Gu(e,t,n,i,u,o){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:u,treeForkCount:o}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=n,d.tailMode=u,d.treeForkCount=o)}function Kd(e,t,n){var i=t.pendingProps,u=i.revealOrder,o=i.tail;i=i.children;var d=Ve.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,G(Ve,d),at(e,t,i,n),i=ge?Hi:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vd(e,n,t);else if(e.tag===19)Vd(e,n,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(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&lr(e)===null&&(u=n),n=n.sibling;
vendor: 5,043 bytes, line 8
8n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Gu(t,!1,u,n,o,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&lr(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Gu(t,!0,n,null,o,i);break;case"together":Gu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ya(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=un(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=un(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Vu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pl(e)))}function Sv(e,t,n){switch(t.tag){case 3:ct(t,t.stateNode.containerInfo),Cn(t,Ye,e.memoizedState.cache),sa();break;case 27:case 5:xi(t);break;case 4:ct(t,t.stateNode.containerInfo);break;case 10:Cn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Dn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Gd(e,t,n):(Dn(t),e=mn(e,t,n),e!==null?e.sibling:null);Dn(t);break;case 19:var u=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Ya(e,t,n,!1),i=(n&t.childLanes)!==0),u){if(i)return Kd(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),G(Ve,Ve.current),i)break;return null;case 22:return t.lanes=0,Md(e,t,n,t.pendingProps);case 24:Cn(t,Ye,e.memoizedState.cache)}return mn(e,t,n)}function Yd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!Vu(e,n)&&(t.flags&128)===0)return Je=!1,Sv(e,t,n);Je=(e.flags&131072)!==0}else Je=!1,ge&&(t.flags&1048576)!==0&&Eh(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=ha(t.elementType),t.type=e,typeof e=="function")Xs(e)?(i=ga(e,i),t.tag=1,t=Hd(null,t,e,i,n)):(t.tag=0,t=Mu(null,t,e,i,n));else{if(e!=null){var u=e.$$typeof;if(u===W){t.tag=11,t=kd(null,t,e,i,n);break e}else if(u===I){t.tag=14,t=Dd(null,t,e,i,n);break e}}throw t=Kt(e)||e,Error(s(306,t,""))}}return t;case 0:return Mu(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,u=ga(i,t.pendingProps),Hd(e,t,i,u,n);case 3:e:{if(ct(t,t.stateNode.containerInfo),e===null)throw Error(s(387));i=t.pendingProps;var o=t.memoizedState;u=o.element,ou(e,t),Xi(t,i,null,n);var d=t.memoizedState;if(i=d.cache,Cn(t,Ye,i),i!==o.cache&&au(t,[Ye],n,!0),Ji(),i=d.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=$d(e,t,i,n);break e}else if(i!==u){u=Lt(Error(s(424)),t),$i(u),t=$d(e,t,i,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,De=Gt(e.firstChild),tt=t,ge=!0,Rn=null,Ht=!0,n=Mh(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sa(),i===u){t=mn(e,t,n);break e}at(e,t,i,n)}t=t.child}return t;case 26:return pr(e,t),e===null?(n=am(t.type,null,t.pendingProps,null))?t.memoizedState=n:ge||(n=t.type,e=t.pendingProps,i=kr(ce.current).createElement(n),i[et]=t,i[dt]=e,it(i,n,e),We(i),t.stateNode=i):t.memoizedState=am(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xi(t),e===null&&ge&&(i=t.stateNode=em(t.type,t.pendingProps,ce.current),tt=t,Ht=!0,u=De,Vn(t.type)?(Eo=u,De=Gt(i.firstChild)):De=u),at(e,t,t.pendingProps.children,n),pr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((u=i=De)&&(i=Wv(i,t.type,t.pendingProps,Ht),i!==null?(t.stateNode=i,tt=t,De=Gt(i.firstChild),Ht=!1,u=!0):u=!1),u||jn(t)),xi(t),u=t.type,o=t.pendingProps,d=e!==null?e.memoizedProps:null,i=o.children,yo(u,o)?i=null:d!==null&&yo(u,d)&&(t.flags|=32),t.memoizedState!==null&&(u=pu(e,t,fv,null,null,n),ml._currentValue=u),pr(e,t),at(e,t,i,n),t.child;case 6:return e===null&&ge&&((e=n=De)&&(n=Fv(n,t.pendingProps,Ht),n!==null?(t.stateNode=n,tt=t,De=null,e=!0):e=!1),e||jn(t)),null;case 13:return Gd(e,t,n);case 4:return ct(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=fa(t,null,i,n):at(e,t,i,n),t.child;case 11:return kd(e,t,t.type,t.pendingProps,n);case 7:return at(e,t,t.pendingProps,n),t.child;case 8:return at(e,t,t.pendingProps.children,n),t.child;case 12:return at(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Cn(t,t.type,i.value),at(e,t,i.children,n),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,oa(t),u=nt(u),i=i(u),t.flags|=1,at(e,t,i,n),t.child;case 14:return Dd(e,t,t.type,t.pendingProps,n);case 15:return zd(e,t,t.type,t.pendingProps,n);case 19:return Kd(e,t,n);case 31:return wv(e,t,n);case 22:return Md(e,t,n,t.pendingProps);case 24:return oa(t),i=nt(Ye),e===null?(u=ru(),u===null&&(u=Ne,o=iu(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=n),u=o),t.memoizedState={parent:i,
vendor: 4,569 bytes, line 8
8cache:u},uu(t),Cn(t,Ye,u)):((e.lanes&n)!==0&&(ou(e,t),Xi(t,null,null,n),Ji()),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),Cn(t,Ye,i)):(i=o.cache,Cn(t,Ye,i),i!==u.cache&&au(t,[Ye],n,!0))),at(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function gn(e){e.flags|=4}function Ku(e,t,n,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(bf())e.flags|=8192;else throw da=tr,su}else e.flags&=-16777217}function Qd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!um(t))if(bf())e.flags|=8192;else throw da=tr,su}function yr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xc():536870912,e.lanes|=t,ai|=t)}function el(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var u=e.child;u!==null;)n|=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;)n|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ev(e,t,n){var i=t.pendingProps;switch(Ws(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),hn(Ye),Ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ka(t)?gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,eu())),ze(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(gn(t),o!==null?(ze(t),Qd(t,o)):(ze(t),Ku(t,u,null,i,n))):o?o!==e.memoizedState?(gn(t),ze(t),Qd(t,o)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&gn(t),ze(t),Ku(t,u,e,i,n)),null;case 27:if(jl(t),n=ce.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&gn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return ze(t),null}e=J.current,Ka(t)?xh(t):(e=em(u,i,n),t.stateNode=e,gn(t))}return ze(t),null;case 5:if(jl(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&gn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return ze(t),null}if(o=J.current,Ka(t))xh(t);else{var d=kr(ce.current);switch(o){case 1:o=d.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=d.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=d.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=d.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=d.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof i.is=="string"?d.createElement("select",{is:i.is}):d.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?d.createElement(u,{is:i.is}):d.createElement(u)}}o[et]=t,o[dt]=i;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=o;e:switch(it(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&&gn(t)}}return ze(t),Ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&gn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(e=ce.current,Ka(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,u=tt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Vf(e.nodeValue,n)),e||jn(t,!0)}else e=kr(e).createTextNode(i),e[et]=t,t.stateNode=e}return ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=Ka(t),n!==null){if(e===null){if(!i)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557)
vendor: 21,418 bytes, line 8
8);e[et]=t}else sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ot(t),t):(Ot(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ze(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ka(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[et]=t}else sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),u=!1}else u=eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Ot(t),t):(Ot(t),null)}return Ot(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(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)),n!==e&&n&&(t.child.flags|=8192),yr(t,t.updateQueue),ze(t),null);case 4:return Ge(),e===null&&fo(t.stateNode.containerInfo),ze(t),null;case 10:return hn(t.type),ze(t),null;case 19:if(M(Ve),i=t.memoizedState,i===null)return ze(t),null;if(u=(t.flags&128)!==0,o=i.rendering,o===null)if(u)el(i,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=lr(e),o!==null){for(t.flags|=128,el(i,!1),e=o.updateQueue,t.updateQueue=e,yr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_h(n,e),n=n.sibling;return G(Ve,Ve.current&1|2),ge&&on(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&wt()>Er&&(t.flags|=128,u=!0,el(i,!1),t.lanes=4194304)}else{if(!u)if(e=lr(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,yr(t,e),el(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ge)return ze(t),null}else 2*wt()-i.renderingStartTime>Er&&n!==536870912&&(t.flags|=128,u=!0,el(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=wt(),e.sibling=null,n=Ve.current,G(Ve,u?n&1|2:n&1),ge&&on(t,i.treeForkCount),e):(ze(t),null);case 22:case 23:return Ot(t),fu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),n=t.updateQueue,n!==null&&yr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&M(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),hn(Ye),ze(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Tv(e,t){switch(Ws(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hn(Ye),Ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return jl(t),null;case 31:if(t.memoizedState!==null){if(Ot(t),t.alternate===null)throw Error(s(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ot(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(Ve),null;case 4:return Ge(),null;case 10:return hn(t.type),null;case 22:case 23:return Ot(t),fu(),e!==null&&M(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hn(Ye),null;case 25:return null;default:return null}}function Jd(e,t){switch(Ws(t),t.tag){case 3:hn(Ye),Ge();break;case 26:case 27:case 5:jl(t);break;case 4:Ge();break;case 31:t.memoizedState!==null&&Ot(t);break;case 13:Ot(t);break;case 19:M(Ve);break;case 10:hn(t.type);break;case 22:case 23:Ot(t),fu(),e!==null&&M(ca);break;case 24:hn(Ye)}}function tl(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){i=void 0;var o=n.create,d=n.inst;i=o(),d.destroy=i}n=n.next}while(n!==u)}}catch(p){Te(t,t.return,p)}}function Mn(e,t,n){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 d=i.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,u=t;var b=n,A=p;try{A()}catch(U){Te(u,b,U)}}}i=i.next}while(i!==o)}}catch(U){Te(t,t.return,U)}}function Xd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Bh(t,n)}catch(i){Te(e,e.return,i)}}}function Zd(e,t,n){n.props=ga(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){Te(e,t,i)}}function nl(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(i):n.current=i}}catch(u){Te(e,t,u)}}function en(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(u){Te(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){Te(e,t,u)}else n.current=null}function Id(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(u){Te(e,e.return,u)}}function Yu(e,t,n){try{var i=e.stateNode;Qv(i,e.type,n,t),i[dt]=t}catch(u){Te(e,e.return,u)}}function Pd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vn(e.type)||e.tag===4}function Qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pd(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&&Vn(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 Ju(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(i!==4&&(i===27&&Vn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}function br(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Vn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(br(e,t,n),e=e.sibling;e!==null;)br(e,t,n),e=e.sibling}function Wd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);it(t,i,n),t[et]=e,t[dt]=n}catch(o){Te(e,e.return,o)}}var pn=!1,Xe=!1,Xu=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function xv(e,t){if(e=e.containerInfo,po=Hr,e=hh(e),$s(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var u=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var d=0,p=-1,b=-1,A=0,U=0,z=e,R=null;t:for(;;){for(var C;z!==n||u!==0&&z.nodeType!==3||(p=d+u),z!==o||i!==0&&z.nodeType!==3||(b=d+i),z.nodeType===3&&(d+=z.nodeValue.length),(C=z.firstChild)!==null;)R=z,z=C;for(;;){if(z===e)break t;if(R===n&&++A===u&&(p=d),R===o&&++U===i&&(b=d),(C=z.nextSibling)!==null)break;z=R,R=z.parentNode}z=C}n=p===-1||b===-1?null:{start:p,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(vo={focusedElem:e,selectionRange:n},Hr=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,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(n=0;n<e.length;n++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,u=o.memoizedProps,o=o.memoizedState,i=n.stateNode;try{var Q=ga(n.type,u);e=i.getSnapshotBeforeUpdate(Q,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(F){Te(n,n.return,F)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)_o(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_o(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Fe=e;break}Fe=t.return}}function ef(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:yn(e,n),i&4&&tl(5,n);break;case 1:if(yn(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){Te(n,n.return,d)}else{var u=ga(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Te(n,n.return,d)}}i&64&&Xd(n),i&512&&nl(n,n.return);break;case 3:if(yn(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Bh(e,t)}catch(d){Te(n,n.return,d)}}break;case 27:t===null&&i&4&&Wd(n);case 26:case 5:yn(e,n),t===null&&i&4&&Id(n),i&512&&nl(n,n.return);break;case 12:yn(e,n);break;case 31:yn(e,n),i&4&&af(e,n);break;case 13:yn(e,n),i&4&&lf(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Dv.bind(null,n),ey(e,n))));break;case 22:if(i=n.memoizedState!==null||pn,!i){t=t!==null&&t.memoizedState!==null||Xe,u=pn;var o=Xe;pn=i,(Xe=t)&&!o?bn(e,n,(n.subtreeFlags&8772)!==0):yn(e,n),pn=u,Xe=o}break;case 30:break;default:yn(e,n)}}function tf(e){var t=e.alternate;t!==null&&(e.alternate=null,tf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ts(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 Me=null,mt=!1;function vn(e,t,n){for(n=n.child;n!==null;)nf(e,t,n),n=n.sibling}function nf(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Ai,n)}catch{}switch(n.tag){case 26:Xe||en(n,t),vn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xe||en(n,t);var i=Me,u=mt;Vn(n.type)&&(Me=n.stateNode,mt=!1),vn(e,t,n),hl(n.stateNode),Me=i,mt=u;break;case 5:Xe||en(n,t);case 6:if(i=Me,u=mt,Me=null,vn(e,t,n),Me=i,mt=u,Me!==null)if(mt)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(n.stateNode)}catch(o){Te(n,t,o)}else try{Me.removeChild(n.stateNode)}catch(o){Te(n,t,o)}break;case 18:Me!==null&&(mt?(e=Me,Zf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),hi(e)):Zf(Me,n.stateNode));break;case 4:i=Me,u=mt,Me=n.stateNode.containerInfo,mt=!0,vn(e,t,n),Me=i,mt=u;break;case 0:case 11:case 14:case 15:Mn(2,n,t),Xe||Mn(4,n,t),vn(e,t,n);break;case 1:Xe||(en(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Zd(n,t,i)),vn(e,t,n);break;case 21:vn(e,t,n);break;case 22:Xe=(i=Xe)||n.memoizedState!==null,vn(e,t,n),Xe=i;break;default:vn(e,t,n)}}function af(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{hi(e)}catch(n){Te(t,t.return,n)}}}function lf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{hi(e)}catch(n){Te(t,t.return,n)}}function Av(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fd),t;default:throw Error(s(435,e.tag))}}function _r(e,t){var n=Av(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var u=zv.bind(null,e,i);i.then(u,u)}})}function gt(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var u=n[i],o=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Vn(p.type)){Me=p.stateNode,mt=!1;break e}break;case 5:Me=p.stateNode,mt=!1;break e;case 3:case 4:Me=p.stateNode.containerInfo,mt=!0;break e}p=p.return}if(Me===null)throw Error(s(160));nf(o,d,u),Me=null,mt=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rf(t,e),t=t.sibling}var Qt=null;function rf(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),pt(e),i&4&&(Mn(3,e,e.return),tl(3,e),Mn(5,e,e.return));break;case 1:gt(t,e),pt(e),i&512&&(Xe||n===null||en(n,n.return)),i&64&&pn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var u=Qt;if(gt(t,e),pt(e),i&512&&(Xe||n===null||en(n,n.return)),i&4){var o=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":o=u.getElementsByTagName("title")[0],(!o||o[ji]||o[et]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=u.createElement(i),u.head.insertBefore(o,u.querySelector("head > title"))),it(o,i,n),o[et]=e,We(o),i=o;break e;case"link":var d=rm("link","href",u).get(i+(n.href||""));if(d){for(var p=0;p<d.length;p++)if(o=d[p],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(p,1);break t}}o=u.createElement(i),it(o,i,n),u.head.appendChild(o);break;case"meta":if(d=rm("meta","content",u).get(i+(n.content||""))){for(p=0;p<d.length;p++)if(o=d[p],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(p,1);break t}}o=u.createElement(i),it(o,i,n),u.head.appendChild(o);break;default:throw Error(s(468,i))}o[et]=e,We(o),i=o}e.stateNode=i}else sm(u,e.type,e.stateNode);else e.stateNode=lm(u,i,e.memoizedProps);else o!==i?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,i===null?sm(u,e.type,e.stateNode):lm(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Yu(e,e.memoizedProps,n.memoizedProps)}break;case 27:gt(t,e),pt(e),i&512&&(Xe||n===null||en(n,n.return)),n!==null&&i&4&&Yu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gt(t,e),pt(e),i&512&&(Xe||n===null||en(n,n.return)),e.flags&32){u=e.stateNode;try{Da(u,"")}catch(Q){Te(e,e.return,Q)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,Yu(e,u,n!==null?n.memoizedProps:u)),i&1024&&(Xu=!0);break;case 6:if(gt(t,e),pt(e),i&4){if(e.stateNode===null)throw Error(s(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(Q){Te(e,e.return,Q)}}break;case 3:if(Mr=null,u=Qt,Qt=Dr(t.containerInfo),gt(t,e),Qt=u,pt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{hi(t.containerInfo)}catch(Q){Te(e,e.return,Q)}Xu&&(Xu=!1,sf(e));break;case 4:i=Qt,Qt=Dr(e.stateNode.containerInfo),gt(t,e),pt(e),Qt=i;break;case 12:gt(t,e),pt(e);break;case 31:gt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 13:gt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Sr=wt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 22:u=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,A=pn,U=Xe;if(pn=A||u,Xe=U||b,gt(t,e),Xe=U,pn=A,pt(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||b||pn||Xe||pa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(o=b.stateNode,u)d=o.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=b.stateNode;var z=b.memoizedProps.style,R=z!=null&&z.hasOwnProperty("display")?z.display:null;p.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(Q){Te(b,b.return,Q)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=u?"":b.memoizedProps}catch(Q){Te(b,b.return,Q)}}}else if(t.tag===18){if(n===null){b=t;try{var C=b.stateNode;u?If(C,!0):If(b.stateNode,!1)}catch(Q){Te(b,b.return,Q)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,_r(e,n))));break;case 19:gt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 30:break;case 21:break;default:gt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(Pd(i)){n=i;break}i=i.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var u=n.stateNode,o=Qu(e);br(e,o,u);break;case 5:var d=n.stateNode;n.flags&32&&(Da(d,""),n.flags&=-33);var p=Qu(e);br(e,p,d);break;case 3:case 4:var b=n.stateNode.containerInfo,A=Qu(e);Ju(e,A,b);break;default:throw Error(s(161))}}catch(U){Te(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ef(e,t.alternate,t),t=t.sibling}function pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Mn(4,t,t.return),pa(t);break;case 1:en(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Zd(t,t.return,n),pa(t);break;case 27:hl(t.stateNode);case 26:case 5:en(t,t.return),pa(t);break;case 22:t.memoizedState===null&&pa(t);break;case 30:pa(t);break;default:pa(t)}e=e.sibling}}function bn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,o=t,d=o.flags;switch(o.tag){case 0:case 11:case 15:bn(u,o,n),tl(4,o);break;case 1:if(bn(u,o,n),i=o,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(A){Te(i,i.return,A)}if(i=o,u=i.updateQueue,u!==null){var p=i.stateNode;try{var b=u.shared.hiddenCallbacks;if(b!==null)for(u.shared.hiddenCallbacks=null,u=0;u<b.length;u++)Lh(b[u],p)}catch(A){Te(i,i.return,A)}}n&&d&64&&Xd(o),nl(o,o.return);break;case 27:Wd(o);case 26:case 5:bn(u,o,n),n&&i===null&&d&4&&Id(o),nl(o,o.return);break;case 12:bn(u,o,n);break;case 31:bn(u,o,n),n&&d&4&&af(u,o);break;case 13:bn(u,o,n),n&&d&4&&lf(u,o);break;case 22:o.memoizedState===null&&bn(u,o,n),nl(o,o.return);break;case 30:break;default:bn(u,o,n)}t=t.sibling}}function Zu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Gi(n))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e))}function Jt(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)uf(e,t,n,i),t=t.sibling}function uf(e,t,n,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,n,i),u&2048&&tl(9,t);break;case 1:Jt(e,t,n,i);break;case 3:Jt(e,t,n,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e)));break;case 12:if(u&2048){Jt(e,t,n,i),e=t.stateNode;try{var o=t.memoizedProps,d=o.id,p=o.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Te(t,t.return,b)}}else Jt(e,t,n,i);break;case 31:Jt(e,t,n,i);break;case 13:Jt(e,t,n,i);break;case 23:break;case 22:o=t.stateNode,d=t.alternate,t.memoizedState!==null?o._visibility&2?Jt(e,t,n,i):al(e,t):o._visibility&2?Jt(e,t,n,i):(o._visibility|=2,ei(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Zu(d,t);break;case 24:Jt(e,t,n,i),u&2048&&Iu(t.alternate,t);break;default:Jt(e,t,n,i)}}function ei(e,t,n,i,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,d=t,p=n,b=i,A=d.flags;switch(d.tag){case 0:case 11:case 15:ei(o,d,p,b,u),tl(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?ei(o,d,p,b,u):al(o,d):(U._visibility|=2,ei(o,d,p,b,u)),u&&A&2048&&Zu(d.alternate,d);break;case 24:ei(o,d,p,b,u),u&&A&2048&&Iu(d.alternate,d);break;default:ei(o,d,p,b,u)}t=t.sibling}}function al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,u=i.flags;switch(i.tag){case 22:al(n,i),u&2048&&Zu(i.alternate,i);break;case 24:al(n,i),u&2048&&Iu(i.alternate,i);break;default:al(n,i)}t=t.sibling}}var il=8192;function ti(e,t,n){if(e.subtreeFlags&il)for(e=e.child;e!==null;)of(e,t,n),e=e.sibling}function of(e,t,n){switch(e.tag){case 26:ti(e,t,n),e.flags&il&&e.memoizedState!==null&&dy(n,Qt,e.memoizedState,e.memoizedProps);break;case 5:ti(e,t,n);break;case 3:case 4:var i=Qt;Qt=Dr(e.stateNode.containerInfo),ti(e,t,n),Qt=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=il,il=16777216,ti(e,t,n),il=i):ti(e,t,n));break;default:ti(e,t,n
vendor: 6,099 bytes, line 8
8)}}function cf(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 ll(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Fe=i,df(i,e)}cf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)hf(e),e=e.sibling}function hf(e){switch(e.tag){case 0:case 11:case 15:ll(e),e.flags&2048&&Mn(9,e,e.return);break;case 3:ll(e);break;case 12:ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wr(e)):ll(e);break;default:ll(e)}}function wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Fe=i,df(i,e)}cf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Mn(8,t,t.return),wr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,wr(t));break;default:wr(t)}e=e.sibling}}function df(e,t){for(;Fe!==null;){var n=Fe;switch(n.tag){case 0:case 11:case 15:Mn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Gi(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Fe=i;else e:for(n=e;Fe!==null;){i=Fe;var u=i.sibling,o=i.return;if(tf(i),i===n){Fe=null;break e}if(u!==null){u.return=o,Fe=u;break e}Fe=o}}}var Ov={getCacheForType:function(e){var t=nt(Ye),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return nt(Ye).controller.signal}},Rv=typeof WeakMap=="function"?WeakMap:Map,we=0,Ne=null,he=null,fe=0,Ee=0,Rt=null,Ln=!1,ni=!1,Pu=!1,_n=0,He=0,Bn=0,va=0,Wu=0,jt=0,ai=0,rl=null,vt=null,Fu=!1,Sr=0,ff=0,Er=1/0,Tr=null,qn=null,Ie=0,Hn=null,ii=null,wn=0,eo=0,to=null,mf=null,sl=0,no=null;function Ct(){return(we&2)!==0&&fe!==0?fe&-fe:j.T!==null?uo():jc()}function gf(){if(jt===0)if((fe&536870912)===0||ge){var e=Ul;Ul<<=1,(Ul&3932160)===0&&(Ul=262144),jt=e}else jt=536870912;return e=At.current,e!==null&&(e.flags|=32),jt}function yt(e,t,n){(e===Ne&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(li(e,0),$n(e,fe,jt,!1)),Ri(e,n),((we&2)===0||e!==Ne)&&(e===Ne&&((we&2)===0&&(va|=n),He===4&&$n(e,fe,jt,!1)),tn(e))}function pf(e,t,n){if((we&6)!==0)throw Error(s(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Oi(e,t),u=i?Nv(e,t):io(e,t,!0),o=i;do{if(u===0){ni&&!i&&$n(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!jv(n)){u=io(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;u=rl;var b=p.current.memoizedState.isDehydrated;if(b&&(li(p,d).flags|=256),d=io(p,d,!1),d!==2){if(Pu&&!b){p.errorRecoveryDisabledLanes|=o,va|=o,u=4;break e}o=vt,vt=u,o!==null&&(vt===null?vt=o:vt.push.apply(vt,o))}u=d}if(o=!1,u!==2)continue}}if(u===1){li(e,0),$n(e,t,0,!0);break}e:{switch(i=e,o=u,o){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:$n(i,t,jt,!Ln);break e;case 2:vt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(u=Sr+300-wt(),10<u)){if($n(i,t,jt,!Ln),Dl(i,0,!0)!==0)break e;wn=t,i.timeoutHandle=Jf(vf.bind(null,i,n,vt,Tr,Fu,t,jt,va,ai,Ln,o,"Throttled",-0,0),u);break e}vf(i,n,vt,Tr,Fu,t,jt,va,ai,Ln,o,null,-0,0)}}break}while(!0);tn(e)}function vf(e,t,n,i,u,o,d,p,b,A,U,z,R,C){if(e.timeoutHandle=-1,z=t.subtreeFlags,z&8192||(z&16785408)===16785408){z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rn},of(t,o,z);var Q=(o&62914560)===o?Sr-wt():(o&4194048)===o?ff-wt():0;if(Q=fy(z,Q),Q!==null){wn=o,e.cancelPendingCommit=Q(xf.bind(null,e,t,o,n,i,u,d,p,b,U,z,null,R,C)),$n(e,o,d,!A);return}}xf(e,t,o,n,i,u,d,p,b)}function jv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var u=n[i],o=u.getSnapshot;u=u.value;try{if(!Tt(o(),u))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 $n(e,t,n,i){t&=~Wu,t&=~va,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var o=31-Et(u),d=1<<o;i[o]=-1,u&=~d}n!==0&&Ac(e,n,t)}function xr(){return(we&6)===0?(ul(0),!1):!0}function ao(){if(he!==null){if(Ee===0)var e=he.return;else e=he,cn=ua=null,bu(e),Za=null,Ki=0,e=he;for(;e!==null;)Jd(e.alternate,e),e=e.return;he=null}}function li(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wn=0,ao(),Ne=e,he=n=un(e.current,null),fe=t,Ee=0,Rt=null,Ln=!1,ni=Oi(e,t),Pu=!1,ai=jt=Wu=va=Bn=He=0,vt=rl=null,Fu=!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-Et(i),o=1<<u;t|=e[u],i&=~o}return _n=t,Ql(),n}function yf(e,t){se=null,j.H=Wi,t===Xa||t===er?(t=kh(),Ee=3):t===su?(t=kh(),Ee=4):Ee=t===zu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Rt=t,he===null&&(He=1,mr(e,Lt(t,e.current)))}function bf(){var e=At.current;return e===null?!0:(fe&4194048)===fe?$t===null:(fe&62914560)===fe||(fe&536870912)!==0?e===$t:!1}function _f(){var e=j.H;return j.H=Wi,e===null?Wi:e}function wf(){var e=j.A;return j.A=Ov,e}function Ar(){He=4,Ln||(fe&4194048)!==fe&&At.current!==null||(ni=!0),(Bn&134217727)===0&&(va&134217727)===0||Ne===null||$n(Ne,fe,jt,!1)}function io(e,t,n){var i=we;we|=2;var u=_f(),o=wf();(Ne!==e||fe!==t)&&(Tr=null,li(e,t)),t=!1;var d=He;e:do try{if(Ee!==0&&he!==null){var p=he,b=Rt;switch(Ee){case 8:ao(),d=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var A=Ee;if(Ee=0,Rt=null,ri(e,p,b,A),n&&ni){d=0;break e}break;default:A=Ee,Ee=0,Rt=null,ri(e,p,b,A)}}Cv(),d=He;break}catch(U){yf(e,U)}while(!0);return t&&e.shellSuspendCounter++,cn=ua=null,we=i,j.H=u,j.A=o,he===null&&(Ne=null,fe=0,Ql()),d}function Cv(){for(;he!==null;)Sf(he)}function Nv(e,t){var n=we;we|=2;
vendor: 4,285 bytes, line 8
8var i=_f(),u=wf();Ne!==e||fe!==t?(Tr=null,Er=wt()+500,li(e,t)):ni=Oi(e,t);e:do try{if(Ee!==0&&he!==null){t=he;var o=Rt;t:switch(Ee){case 1:Ee=0,Rt=null,ri(e,t,o,1);break;case 2:case 9:if(Nh(o)){Ee=0,Rt=null,Ef(t);break}t=function(){Ee!==2&&Ee!==9||Ne!==e||(Ee=7),tn(e)},o.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Nh(o)?(Ee=0,Rt=null,Ef(t)):(Ee=0,Rt=null,ri(e,t,o,7));break;case 5:var d=null;switch(he.tag){case 26:d=he.memoizedState;case 5:case 27:var p=he;if(d?um(d):p.stateNode.complete){Ee=0,Rt=null;var b=p.sibling;if(b!==null)he=b;else{var A=p.return;A!==null?(he=A,Or(A)):he=null}break t}}Ee=0,Rt=null,ri(e,t,o,5);break;case 6:Ee=0,Rt=null,ri(e,t,o,6);break;case 8:ao(),He=6;break e;default:throw Error(s(462))}}Uv();break}catch(U){yf(e,U)}while(!0);return cn=ua=null,j.H=i,j.A=u,we=n,he!==null?0:(Ne=null,fe=0,Ql(),He)}function Uv(){for(;he!==null&&!tp();)Sf(he)}function Sf(e){var t=Yd(e.alternate,e,_n);e.memoizedProps=e.pendingProps,t===null?Or(e):he=t}function Ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qd(n,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=qd(n,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:bu(t);default:Jd(n,t),t=he=_h(t,_n),t=Yd(n,t,_n)}e.memoizedProps=e.pendingProps,t===null?Or(e):he=t}function ri(e,t,n,i){cn=ua=null,bu(t),Za=null,Ki=0;var u=t.return;try{if(_v(e,u,t,n,fe)){He=1,mr(e,Lt(n,e.current)),he=null;return}}catch(o){if(u!==null)throw he=u,o;He=1,mr(e,Lt(n,e.current)),he=null;return}t.flags&32768?(ge||i===1?e=!0:ni||(fe&536870912)!==0?e=!1:(Ln=e=!0,(i===2||i===9||i===3||i===6)&&(i=At.current,i!==null&&i.tag===13&&(i.flags|=16384))),Tf(t,e)):Or(t)}function Or(e){var t=e;do{if((t.flags&32768)!==0){Tf(t,Ln);return}e=t.return;var n=Ev(t.alternate,t,_n);if(n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);He===0&&(He=5)}function Tf(e,t){do{var n=Tv(e.alternate,e);if(n!==null){n.flags&=32767,he=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=n}while(e!==null);He=6,he=null}function xf(e,t,n,i,u,o,d,p,b){e.cancelPendingCommit=null;do Rr();while(Ie!==0);if((we&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(o=t.lanes|t.childLanes,o|=Qs,hp(e,n,o,d,p,b),e===Ne&&(he=Ne=null,fe=0),ii=t,Hn=e,wn=n,eo=o,to=u,mf=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Mv(Cl,function(){return Cf(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=j.T,j.T=null,u=q.p,q.p=2,d=we,we|=4;try{xv(e,t,n)}finally{we=d,q.p=u,j.T=i}}Ie=1,Af(),Of(),Rf()}}function Af(){if(Ie===1){Ie=0;var e=Hn,t=ii,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var i=q.p;q.p=2;var u=we;we|=4;try{rf(t,e);var o=vo,d=hh(e.containerInfo),p=o.focusedElem,b=o.selectionRange;if(d!==p&&p&&p.ownerDocument&&ch(p.ownerDocument.documentElement,p)){if(b!==null&&$s(p)){var A=b.start,U=b.end;if(U===void 0&&(U=A),"selectionStart"in p)p.selectionStart=A,p.selectionEnd=Math.min(U,p.value.length);else{var z=p.ownerDocument||document,R=z&&z.defaultView||window;if(R.getSelection){var C=R.getSelection(),Q=p.textContent.length,F=Math.min(b.start,Q),Re=b.end===void 0?F:Math.min(b.end,Q);!C.extend&&F>Re&&(d=Re,Re=F,F=d);var E=oh(p,F),_=oh(p,Re);if(E&&_&&(C.rangeCount!==1||C.anchorNode!==E.node||C.anchorOffset!==E.offset||C.focusNode!==_.node||C.focusOffset!==_.offset)){var x=z.createRange();x.setStart(E.node,E.offset),C.removeAllRanges(),F>Re?(C.addRange(x),C.extend(_.node,_.offset)):(x.setEnd(_.node,_.offset),C.addRange(x))}}}}for(z=[],C=p;C=C.parentNode;)C.nodeType===1&&z.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<z.length;p++){var k=z[p];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Hr=!!po,vo=po=null}finally{we=u,q.p=i,j.T=n}}e.current=t,Ie=2}}function Of(){if(Ie===2){Ie=0;var e=Hn,t=ii,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var i=q.p;q.p=2;var u=we;we|=4;try{ef(e,t.alternate,t)}finally{we=u,q.p=i,j.T=n}}Ie=3}}function Rf(){if(Ie===4||Ie===3){Ie=0,np();var e=Hn,t=ii,n=wn,i=mf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ie=5:(Ie=0,ii=Hn=null,jf(e,e.pen
vendor: 15,949 bytes, lines 8-9
8dingLanes));var u=e.pendingLanes;if(u===0&&(qn=null),Ss(n),t=t.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Ai,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=j.T,u=q.p,q.p=2,j.T=null;try{for(var o=e.onRecoverableError,d=0;d<i.length;d++){var p=i[d];o(p.value,{componentStack:p.stack})}}finally{j.T=t,q.p=u}}(wn&3)!==0&&Rr(),tn(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===no?sl++:(sl=0,no=e):sl=0,ul(0)}}function jf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gi(t)))}function Rr(){return Af(),Of(),Rf(),Cf()}function Cf(){if(Ie!==5)return!1;var e=Hn,t=eo;eo=0;var n=Ss(wn),i=j.T,u=q.p;try{q.p=32>n?32:n,j.T=null,n=to,to=null;var o=Hn,d=wn;if(Ie=0,ii=Hn=null,wn=0,(we&6)!==0)throw Error(s(331));var p=we;if(we|=4,hf(o.current),uf(o,o.current,d,n),we=p,ul(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Ai,o)}catch{}return!0}finally{q.p=u,j.T=i,jf(e,t)}}function Nf(e,t,n){t=Lt(n,t),t=Du(e.stateNode,t,2),e=kn(e,t,2),e!==null&&(Ri(e,2),tn(e))}function Te(e,t,n){if(e.tag===3)Nf(e,e,n);else for(;t!==null;){if(t.tag===3){Nf(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(qn===null||!qn.has(i))){e=Lt(n,e),n=Nd(2),i=kn(t,n,2),i!==null&&(Ud(n,i,t,e),Ri(i,2),tn(i));break}}t=t.return}}function lo(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Rv;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(n)||(Pu=!0,u.add(n),e=kv.bind(null,e,t,n),t.then(e,e))}function kv(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ne===e&&(fe&n)===n&&(He===4||He===3&&(fe&62914560)===fe&&300>wt()-Sr?(we&2)===0&&li(e,0):Wu|=n,ai===fe&&(ai=0)),tn(e)}function Uf(e,t){t===0&&(t=xc()),e=la(e,t),e!==null&&(Ri(e,t),tn(e))}function Dv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uf(e,n)}function zv(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(s(314))}i!==null&&i.delete(t),Uf(e,n)}function Mv(e,t){return ys(e,t)}var jr=null,si=null,ro=!1,Cr=!1,so=!1,Gn=0;function tn(e){e!==si&&e.next===null&&(si===null?jr=si=e:si=si.next=e),Cr=!0,ro||(ro=!0,Bv())}function ul(e,t){if(!so&&Cr){so=!0;do for(var n=!1,i=jr;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var o=0;else{var d=i.suspendedLanes,p=i.pingedLanes;o=(1<<31-Et(42|e)+1)-1,o&=u&~(d&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,Mf(i,o))}else o=fe,o=Dl(i,i===Ne?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||Oi(i,o)||(n=!0,Mf(i,o));i=i.next}while(n);so=!1}}function Lv(){kf()}function kf(){Cr=ro=!1;var e=0;Gn!==0&&Xv()&&(e=Gn);for(var t=wt(),n=null,i=jr;i!==null;){var u=i.next,o=Df(i,t);o===0?(i.next=null,n===null?jr=u:n.next=u,u===null&&(si=n)):(n=i,(e!==0||(o&3)!==0)&&(Cr=!0)),i=u}Ie!==0&&Ie!==5||ul(e),Gn!==0&&(Gn=0)}function Df(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var d=31-Et(o),p=1<<d,b=u[d];b===-1?((p&n)===0||(p&i)!==0)&&(u[d]=cp(p,t)):b<=t&&(e.expiredLanes|=p),o&=~p}if(t=Ne,n=fe,n=Dl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&bs(i),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Oi(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&bs(i),Ss(n)){case 2:case 8:n=Ec;break;case 32:n=Cl;break;case 268435456:n=Tc;break;default:n=Cl}return i=zf.bind(null,e),n=ys(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&bs(i),e.callbackPriority=2,e.callbackNode=null,2}function zf(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Rr()&&e.callbackNode!==n)return null;var i=fe;return i=Dl(e,e===Ne?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(pf(e,i,t),Df(e,wt()),e.callbackNode!=null&&e.callbackNode===n?zf.bind(null,e):null)}function Mf(e,t){if(Rr())return null;pf(e,t,!0)}function Bv(){Iv(function(){(we&6)!==0?ys(Sc,Lv):kf()})}function uo(){if(Gn===0){var e=Qa;e===0&&(e=Nl,Nl<<=1,(Nl&261888)===0&&(Nl=256)),Gn=e}return Gn}function Lf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bl(""+e)}function Bf(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function qv(e,t,n,i,u){if(t==="submit"&&n&&n.stateNode===u){var o=Lf((u[dt]||null).action),d=i.submitter;d&&(t=(t=d[dt]||null)?Lf(t.formAction):d.getAttribute("formAction"),t!==null&&(o=t,d=null));var p=new Gl("action","action",null,i,u);e.push({event:p,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Gn!==0){var b=d?Bf(u,d):new FormData(u);Ru(n,{pending:!0,data:b,method:u.method,action:o},null,b)}}else typeof o=="function"&&(p.preventDefault(),b=d?Bf(u,d):new FormData(u),Ru(n,{pending:!0,data:b,method:u.method,action:o},o,b))},currentTarget:u}]})}}for(var oo=0;oo<Ys.length;oo++){var co=Ys[oo],Hv=co.toLowerCase(),$v=co[0].toUpperCase()+co.slice(1);Yt(Hv,"on"+$v)}Yt(mh,"onAnimationEnd"),Yt(gh,"onAnimationIteration"),Yt(ph,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(av,"onTransitionRun"),Yt(iv,"onTransitionStart"),Yt(lv,"onTransitionCancel"),Yt(vh,"onTransitionEnd"),Ua("onMouseEnter",["mouseout","mouseover"]),Ua("onMouseLeave",["mouseout","mouseover"]),Ua("onPointerEnter",["pointerout","pointerover"]),Ua("onPointerLeave",["pointerout","pointerover"]),ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ol="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(" "),Gv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ol));function qf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],u=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var d=i.length-1;0<=d;d--){var p=i[d],b=p.instance,A=p.currentTarget;if(p=p.listener,b!==o&&u.isPropagationStopped())break e;o=p,u.currentTarget=A;try{o(u)}catch(U){Yl(U)}u.currentTarget=null,o=b}else for(d=0;d<i.length;d++){if(p=i[d],b=p.instance,A=p.currentTarget,p=p.listener,b!==o&&u.isPropagationStopped())break e;o=p,u.currentTarget=A;try{o(u)}catch(U){Yl(U)}u.currentTarget=null,o=b}}}}function de(e,t){var n=t[Es];n===void 0&&(n=t[Es]=new Set);var i=e+"__bubble";n.has(i)||(Hf(t,e,2,!1),n.add(i))}function ho(e,t,n){var i=0;t&&(i|=4),Hf(n,e,i,t)}var Nr="_reactListening"+Math.random().toString(36).slice(2);function fo(e){if(!e[Nr]){e[Nr]=!0,Uc.forEach(function(n){n!=="selectionchange"&&(Gv.has(n)||ho(n,!1,e),ho(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nr]||(t[Nr]=!0,ho("selectionchange",!1,t))}}function Hf(e,t,n,i){switch(gm(t)){case 2:var u=py;break;case 8:u=vy;break;default:u=Ro}n=u.bind(null,t,n,e),u=void 0,!Us||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function mo(e,t,n,i,u){var o=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var d=i.tag;if(d===3||d===4){var p=i.stateNode.containerInfo;if(p===u)break;if(d===4)for(d=i.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===u)return;d=d.return}for(;p!==null;){if(d=ja(p),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){i=o=d;continue e}p=p.parentNode}}i=i.return}Kc(function(){var A=o,U=Cs(n),z=[];e:{var R=yh.get(e);if(R!==void 0){var C=Gl,Q=e;switch(e){case"keypress":if(Hl(n)===0)break e;case"keydown":case"keyup":C=zp;break;case"focusin":Q="focus",C=Ms;break;case"focusout":Q="blur",C=Ms;break;case"beforeblur":case"afterblur":C=Ms;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=Ep;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=Bp;break;case mh:case gh:case ph:C=Ap;break;case vh:C=Hp;break;case"scroll":case"scrollend":C=wp;break;case"wheel":C=Gp;break;case"copy":case"cut":case"paste":C=Rp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Zc;break;case"toggle":case"beforetoggle":C=Kp}var F=(t&4)!==0,Re=!F&&(e==="scroll"||e==="scrollend"),E=F?R!==null?R+"Capture":null:R;F=[];for(var _=A,x;_!==null;){var k=_;if(x=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||x===null||E===null||(k=Ni(_,E),k!=null&&F.push(cl(_,k,x))),Re)break;_=_.return}0<F.length&&(R=new C(R,Q,null,n,U),z.push({event:R,listeners:F}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",R&&n!==js&&(Q=n.relatedTarget||n.fromElement)&&(ja(Q)||Q[Ra]))break e;if((C||R)&&(R=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,C?(Q=n.relatedTarget||n.toElement,C=A,Q=Q?ja(Q):null,Q!==null&&(Re=h(Q),F=Q.tag,Q!==Re||F!==5&&F!==27&&F!==6)&&(Q=null)):(C=null,Q=A),C!==Q)){if(F=Jc,k="onMouseLeave",E="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(F=Zc,k="onPointerLeave",E="onPointerEnter",_="pointer"),Re=C==null?R:Ci(C),x=Q==null?R:Ci(Q),R=new F(k,_+"leave",C,n,U),R.target=Re,R.relatedTarget=x,k=null,ja(U)===A&&(F=new F(E,_+"enter",Q,n,U),F.target=x,F.relatedTarget=Re,k=F),Re=k,C&&Q)t:{for(F=Vv,E=C,_=Q,x=0,k=E;k;k=F(k))x++;k=0;for(var P=_;P;P=F(P))k++;for(;0<x-k;)E=F(E),x--;for(;0<k-x;)_=F(_),k--;for(;x--;){if(E===_||_!==null&&E===_.alternate){F=E;break t}E=F(E),_=F(_)}F=null}else F=null;C!==null&&$f(z,R,C,F,!1),Q!==null&&Re!==null&&$f(z,Re,Q,F,!0)}}e:{if(R=A?Ci(A):window,C=R.nodeName&&R.nodeName.toLowerCase(),C==="select"||C==="input"&&R.type==="file")var ye=ah;else if(th(R))if(ih)ye=ev;else{ye=Wp;var X=Pp}else C=R.nodeName,!C||C.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?A&&Rs(A.elementType)&&(ye=ah):ye=Fp;if(ye&&(ye=ye(e,A))){nh(z,ye,n,U);break e}X&&X(e,R,A),e==="focusout"&&A&&R.type==="number"&&A.memoizedProps.value!=null&&Os(R,"number",R.value)}switch(X=A?Ci(A):window,e){case"focusin":(th(X)||X.contentEditable==="true")&&(Ba=X,Gs=A,qi=null);break;case"focusout":qi=Gs=Ba=null;break;case"mousedown":Vs=!0;break;case"contextmenu":case"mouseup":case"dragend":Vs=!1,dh(z,n,U);break;case"selectionchange":if(nv)break;case"keydown":case"keyup":dh(z,n,U)}var ue;if(Bs)e:{switch(e){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else La?Fc(e,n)&&(me="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(me="onCompositionStart");me&&(Ic&&n.locale!=="ko"&&(La||me!=="onCompositionStart"?me==="onCompositionEnd"&&La&&(ue=Yc()):(An=U,ks="value"in An?An.value:An.textContent,La=!0)),X=Ur(A,me),0<X.length&&(me=new Xc(me,e,null,n,U),z.push({event:me,listeners:X}),ue?me.data=ue:(ue=eh(n),ue!==null&&(me.data=ue)))),(ue=Qp?Jp(e,n):Xp(e,n))&&(me=Ur(A,"onBeforeInput"),0<me.length&&(X=new Xc("onBeforeInput","beforeinput",null,n,U),z.push({event:X,listeners:me}),X.data=ue)),qv(z,e,A,n,U)}qf(z,t)})}function cl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ur(e,t){for(var n=t+"Capture",i=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=Ni(e,n),u!=null&&i.unshift(cl(e,u,o)),u=Ni(e,t),u!=null&&i.push(cl(e,u,o))),e.tag===3)return i;e=e.return}return[]}function Vv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,i,u){for(var o=t._reactName,d=[];n!==null&&n!==i;){var p=n,b=p.alternate,A=p.stateNode;if(p=p.tag,b!==null&&b===i)break;p!==5&&p!==26&&p!==27||A===null||(b=A,u?(A=Ni(n,o),A!=null&&d.unshift(cl(n,A,b))):u||(A=Ni(n,o),A!=null&&d.push(cl(n,A,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Kv=/\r\n?/g,Yv=/\u0000|\uFFFD/g;function Gf(e){return(typeof e=="string"?e:""+e).replace(Kv,`
9`).replace(Yv,"")}function Vf(e,t){return t=Gf(t),Gf(e)===t}function Oe(e,t,n,i,u,o){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Da(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Da(e,""+i);break;case"className":Ml(e,"class",i);break;case"tabIndex":Ml(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ml(e,n,i);break;case"style":Gc(e,i,o);break;case"data":if(t!=="object"){Ml(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Bl(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"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"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",u.name,u,null),Oe(e,t,"formEncType",u.formEncType,u,null),Oe(e,t,"formMethod",u.formMethod,u,null),Oe(e,t,"formTarget",u.formTarget,u,null)):(Oe(e,t,"encType",u.encType,u,null),Oe(e,t,"method",u.method,u,null),Oe(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Bl(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=rn);break;case"onScroll":i!=null&&de("scroll",e);break;case"onScrollEnd":i!=null&&de("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(n=i.__html,n!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=n}}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}n=Bl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);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(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
9ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":de("beforetoggle",e),de("toggle",e),zl(e,"popover",i);break;case"xlinkActuate":ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ln(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ln(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ln(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ln(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":zl(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=bp.get(n)||n,zl(e,n,i))}}function go(e,t,n,i,u,o){switch(n){case"style":Gc(e,i,o);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(n=i.__html,n!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof i=="string"?Da(e,i):(typeof i=="number"||typeof i=="bigint")&&Da(e,""+i);break;case"onScroll":i!=null&&de("scroll",e);break;case"onScrollEnd":i!=null&&de("scrollend",e);break;case"onClick":i!=null&&(e.onclick=rn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kc.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),o=e[dt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,u),typeof i=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,u);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):zl(e,n,i)}}}function it(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":de("error",e),de("load",e);var i=!1,u=!1,o;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(d!=null)switch(o){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Oe(e,t,o,d,n,null)}}u&&Oe(e,t,"srcSet",n.srcSet,n,null),i&&Oe(e,t,"src",n.src,n,null);return;case"input":de("invalid",e);var p=o=d=u=null,b=null,A=null;for(i in n)if(n.hasOwnProperty(i)){var U=n[i];if(U!=null)switch(i){case"name":u=U;break;case"type":d=U;break;case"checked":b=U;break;case"defaultChecked":A=U;break;case"value":o=U;break;case"defaultValue":p=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Oe(e,t,i,U,n,null)}}Bc(e,o,p,b,A,d,u,!1);return;case"select":de("invalid",e),i=d=o=null;for(u in n)if(n.hasOwnProperty(u)&&(p=n[u],p!=null))switch(u){case"value":o=p;break;case"defaultValue":d=p;break;case"multiple":i=p;default:Oe(e,t,u,p,n,null)}t=o,n=d,e.multiple=!!i,t!=null?ka(e,!!i,t,!1):n!=null&&ka(e,!!i,n,!0);return;case"textarea":de("invalid",e),o=u=i=null;for(d in n)if(n.hasOwnProperty(d)&&(p=n[d],p!=null))switch(d){case"value":i=p;break;case"defaultValue":u=p;break;case"children":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:Oe(e,t,d,p,n,null)}Hc(e,i,u,o);return;case"option":for(b in n)n.hasOwnProperty(b)&&(i=n[b],i!=null)&&(b==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":Oe(e,t,b,i,n,null));return;case"dialog":de("beforetoggle",e),de("toggle",e),de("cancel",e),de("close",e);break;case"iframe":case"object":de("load",e);break;case"video":case"audio":for(i=0;i<ol.length;i++)de(ol[i],e);break;case"image":de("error",e),de("load",e);break;case"details":de("toggle",e);break;case"embed":case"source":case"link":de("error",e),de("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(A in n)if(n.hasOwnProperty(A)&&(i=n[A],i!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Oe(e,t,A,i,n,null)}return;default:if(Rs(t)){for(U in n)n.hasOwnProperty(U)&&(i=n[U],i!==void 0&&go(e,t,U,i,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(i=n[p],i!=null&&Oe(e,t,p,i,n,null))}function Qv(e,t,n,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,d=null,p=null,b=null,A=null,U=null;for(C in n){var z=n[C];if(n.hasOwnProperty(C)&&z!=null)switch(C){case"checked":break;case"value":break;case"defaultValue":b=z;default:i.hasOwnProperty(C)||Oe(e,t,C,null,i,z)}}for(var R in i){var C=i[R];if(z=n[R],i.hasOwnProperty(R)&&(C!=null||z!=null))switch(R){case"type":o=C;break;case"name":u=C;break;case"checked":A=C;break;case"defaultChecked":U=C;break;case"value":d=C;break;case"defaultValue":p=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(s(137,t));break;default:C!==z&&Oe(e,t,R,C,i,z)}}As(e,d,p,b,A,U,o,u);return;case"select":C=d=p=R=null;for(o in n)if(b=n[o],n.hasOwnProperty(o)&&b!=null)switch(o){case"value":break;case"multiple":C=b;default:i.hasOwnProperty(o)||Oe(e,t,o,null,i,b)}for(u in i)if(o=i[u],b=n[u],i.hasOwnProperty(u)&&(o!=null||b!=null))switch(u){case"value":R=o;break;case"defaultValue":p=o;break;case"multiple":d=o;default:o!==b&&Oe(e,t,u,o,i,b)}
vendor: 4,767 bytes, line 9
9t=p,n=d,i=C,R!=null?ka(e,!!n,R,!1):!!i!=!!n&&(t!=null?ka(e,!!n,t,!0):ka(e,!!n,n?[]:"",!1));return;case"textarea":C=R=null;for(p in n)if(u=n[p],n.hasOwnProperty(p)&&u!=null&&!i.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Oe(e,t,p,null,i,u)}for(d in i)if(u=i[d],o=n[d],i.hasOwnProperty(d)&&(u!=null||o!=null))switch(d){case"value":R=u;break;case"defaultValue":C=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==o&&Oe(e,t,d,u,i,o)}qc(e,R,C);return;case"option":for(var Q in n)R=n[Q],n.hasOwnProperty(Q)&&R!=null&&!i.hasOwnProperty(Q)&&(Q==="selected"?e.selected=!1:Oe(e,t,Q,null,i,R));for(b in i)R=i[b],C=n[b],i.hasOwnProperty(b)&&R!==C&&(R!=null||C!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Oe(e,t,b,R,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 F in n)R=n[F],n.hasOwnProperty(F)&&R!=null&&!i.hasOwnProperty(F)&&Oe(e,t,F,null,i,R);for(A in i)if(R=i[A],C=n[A],i.hasOwnProperty(A)&&R!==C&&(R!=null||C!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(s(137,t));break;default:Oe(e,t,A,R,i,C)}return;default:if(Rs(t)){for(var Re in n)R=n[Re],n.hasOwnProperty(Re)&&R!==void 0&&!i.hasOwnProperty(Re)&&go(e,t,Re,void 0,i,R);for(U in i)R=i[U],C=n[U],!i.hasOwnProperty(U)||R===C||R===void 0&&C===void 0||go(e,t,U,R,i,C);return}}for(var E in n)R=n[E],n.hasOwnProperty(E)&&R!=null&&!i.hasOwnProperty(E)&&Oe(e,t,E,null,i,R);for(z in i)R=i[z],C=n[z],!i.hasOwnProperty(z)||R===C||R==null&&C==null||Oe(e,t,z,R,i,C)}function Kf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var u=n[i],o=u.transferSize,d=u.initiatorType,p=u.duration;if(o&&p&&Kf(d)){for(d=0,p=u.responseEnd,i+=1;i<n.length;i++){var b=n[i],A=b.startTime;if(A>p)break;var U=b.transferSize,z=b.initiatorType;U&&Kf(z)&&(b=b.responseEnd,d+=U*(b<p?1:(p-A)/(b-A)))}if(--i,t+=8*(o+d)/(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 po=null,vo=null;function kr(e){return e.nodeType===9?e:e.ownerDocument}function Yf(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 Qf(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 yo(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 bo=null;function Xv(){var e=window.event;return e&&e.type==="popstate"?e===bo?!1:(bo=e,!0):(bo=null,!1)}var Jf=typeof setTimeout=="function"?setTimeout:void 0,Zv=typeof clearTimeout=="function"?clearTimeout:void 0,Xf=typeof Promise=="function"?Promise:void 0,Iv=typeof queueMicrotask=="function"?queueMicrotask:typeof Xf<"u"?function(e){return Xf.resolve(null).then(e).catch(Pv)}:Jf;function Pv(e){setTimeout(function(){throw e})}function Vn(e){return e==="head"}function Zf(e,t){var n=t,i=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(u),hi(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")hl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,hl(n);for(var o=n.firstChild;o;){var d=o.nextSibling,p=o.nodeName;o[ji]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=d}}else n==="body"&&hl(e.ownerDocument.body);n=u}while(n);hi(t)}function If(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function _o(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":_o(n),Ts(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Wv(e,t,n,i){for(;
vendor: 4,768 bytes, line 9
9e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ji])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=Gt(e.nextSibling),e===null)break}return null}function Fv(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Gt(e.nextSibling),e===null))return null;return e}function Pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gt(e.nextSibling),e===null))return null;return e}function wo(e){return e.data==="$?"||e.data==="$~"}function So(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ey(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Gt(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 Eo=null;function Wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Gt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function em(e,t,n){switch(t=kr(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function hl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ts(e)}var Vt=new Map,tm=new Set;function Dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sn=q.d;q.d={f:ty,r:ny,D:ay,C:iy,L:ly,m:ry,X:uy,S:sy,M:oy};function ty(){var e=Sn.f(),t=xr();return e||t}function ny(e){var t=Ca(e);t!==null&&t.tag===5&&t.type==="form"?vd(t):Sn.r(e)}var ui=typeof document>"u"?null:document;function nm(e,t,n){var i=ui;if(i&&typeof t=="string"&&t){var u=zt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),tm.has(u)||(tm.add(u),e={rel:e,crossOrigin:n,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),it(t,"link",e),We(t),i.head.appendChild(t)))}}function ay(e){Sn.D(e),nm("dns-prefetch",e,null)}function iy(e,t){Sn.C(e,t),nm("preconnect",e,t)}function ly(e,t,n){Sn.L(e,t,n);var i=ui;if(i&&e&&t){var u='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+zt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+zt(n.imageSizes)+'"]')):u+='[href="'+zt(e)+'"]';var o=u;switch(t){case"style":o=oi(e);break;case"script":o=ci(e)}Vt.has(o)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Vt.set(o,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(dl(o))||t==="script"&&i.querySelector(fl(o))||(t=i.createElement("link"),it(t,"link",e),We(t),i.head.appendChild(t)))}}function ry(e,t){Sn.m(e,t);var n=ui;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+zt(i)+'"][href="'+zt(e)+'"]',o=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ci(e)}if(!Vt.has(o)&&(e=T({rel:"modulepreload",href:e},t),Vt.set(o,e),n.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(fl(o)))return}i=n.createElement("link"),it(i,"link",e),We(i),n.head.appendChild(i)}}}
vendor: 6,020 bytes, line 9
9function sy(e,t,n){Sn.S(e,t,n);var i=ui;if(i&&e){var u=Na(i).hoistableStyles,o=oi(e);t=t||"default";var d=u.get(o);if(!d){var p={loading:0,preload:null};if(d=i.querySelector(dl(o)))p.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vt.get(o))&&To(e,n);var b=d=i.createElement("link");We(b),it(b,"link",e),b._p=new Promise(function(A,U){b.onload=A,b.onerror=U}),b.addEventListener("load",function(){p.loading|=1}),b.addEventListener("error",function(){p.loading|=2}),p.loading|=4,zr(d,t,i)}d={type:"stylesheet",instance:d,count:1,state:p},u.set(o,d)}}}function uy(e,t){Sn.X(e,t);var n=ui;if(n&&e){var i=Na(n).hoistableScripts,u=ci(e),o=i.get(u);o||(o=n.querySelector(fl(u)),o||(e=T({src:e,async:!0},t),(t=Vt.get(u))&&xo(e,t),o=n.createElement("script"),We(o),it(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(u,o))}}function oy(e,t){Sn.M(e,t);var n=ui;if(n&&e){var i=Na(n).hoistableScripts,u=ci(e),o=i.get(u);o||(o=n.querySelector(fl(u)),o||(e=T({src:e,async:!0,type:"module"},t),(t=Vt.get(u))&&xo(e,t),o=n.createElement("script"),We(o),it(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(u,o))}}function am(e,t,n,i){var u=(u=ce.current)?Dr(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=oi(n.href),n=Na(u).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=oi(n.href);var o=Na(u).hoistableStyles,d=o.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,d),(o=u.querySelector(dl(e)))&&!o._p&&(d.instance=o,d.state.loading=5),Vt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Vt.set(e,n),o||cy(u,e,n,d.state))),t&&i===null)throw Error(s(528,""));return d}if(t&&i!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ci(n),n=Na(u).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function oi(e){return'href="'+zt(e)+'"'}function dl(e){return'link[rel="stylesheet"]['+e+"]"}function im(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function cy(e,t,n,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}),it(t,"link",n),We(t),e.head.appendChild(t))}function ci(e){return'[src="'+zt(e)+'"]'}function fl(e){return"script[async]"+e}function lm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+zt(n.href)+'"]');if(i)return t.instance=i,We(i),i;var u=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),We(i),it(i,"style",u),zr(i,n.precedence,e),t.instance=i;case"stylesheet":u=oi(n.href);var o=e.querySelector(dl(u));if(o)return t.state.loading|=4,t.instance=o,We(o),o;i=im(n),(u=Vt.get(u))&&To(i,u),o=(e.ownerDocument||e).createElement("link"),We(o);var d=o;return d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),it(o,"link",i),t.state.loading|=4,zr(o,n.precedence,e),t.instance=o;case"script":return o=ci(n.src),(u=e.querySelector(fl(o)))?(t.instance=u,We(u),u):(i=n,(u=Vt.get(o))&&(i=T({},n),xo(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),We(u),it(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,zr(i,n.precedence,e));return t.instance}function zr(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,o=u,d=0;d<i.length;d++){var p=i[d];if(p.dataset.precedence===t)o=p;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function To(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mr=null;function rm(e,t,n){if(Mr===null){var i=new Map,u=Mr=new Map;u.set(n,i)}else u=Mr,i=u.get(n),i||(i=new Map,u.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var o=n[u];if(!(o[ji]||o[et]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var d=o.getAttribute(t)||"";d=e+d;var p=i.get(d);p?p.push(o):i.set(d,[o])}}return i}function sm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function hy(e,t,n){if(n===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 um(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dy(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="str
9ing"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=oi(i.href),o=t.querySelector(dl(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Lr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,We(o);return}o=t.ownerDocument||t,i=im(i),(u=Vt.get(u))&&To(i,u),o=o.createElement("link"),We(o);var d=o;d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),it(o,"link",i),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Lr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ao=0;function fy(e,t){return e.stylesheets&&e.count===0&&qr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&qr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Ao===0&&(Ao=62500*Jv());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Ao?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function Lr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Br=null;function qr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Br=new Map,t.forEach(my,e),Br=null,Lr.call(e))}function my(e,t){if(!(t.state.loading&4)){var n=Br.get(e);if(n)var i=n.get(null);else{n=new Map,Br.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var d=u[o];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),i=d)}i&&n.set(null,i)}u=t.instance,d=u.getAttribute("data-precedence"),o=n.get(d)||i,o===i&&n.set(null,u),n.set(d,u),this.count++,i=Lr.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 ml={$$typeof:H,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function gy(e,t,n,i,u,o,d,p,b){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=_s(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.hiddenUpdates=_s(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function om(e,t,n,i,u,o,d,p,b,A,U,z){return e=new gy(e,t,n,d,b,A,U,z,p),t=1,o===!0&&(t|=24),o=xt(3,null,null,t),e.current=o,o.stateNode=e,t=iu(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:n,cache:t},uu(o),e}function cm(e){return e?(e=$a,e):$a}function hm(e,t,n,i,u,o){u=cm(u),i.context===null?i.context=u:i.pendingContext=u,i=Un(t),i.payload={element:n},o=o===void 0?null:o,o!==null&&(i.callback=o),n=kn(e,i,t),n!==null&&(yt(n,e,t),Qi(n,e,t))}function dm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Oo(e,t){dm(e,t),(e=e.alternate)&&dm(e,t)}function fm(e){if(e.tag===13||e.tag===31){var t=la(e,67108864);t!==null&&yt(t,e,67108864),Oo(e,67108864)}}function mm(e){if(e.tag===13||e.tag===31){var t=Ct();t=ws(t);var n=la(e,t);n!==null&&yt(n,e,t),Oo(e,t)}}var Hr=!0;function py(e,t,n,i){var u=j.T;j.T=null;var o=q.p;try{q.p=2,Ro(e,t,n,i)}finally{q.p=o,j.T=u}}function vy(e,t,n,i){var u=j.T;j.T=null;var o=q.p;try{q.p=8,Ro(e,t,n,i)}finally{q.p=o,j.T=u}}function Ro(e,t,n,i){if(Hr){var u=jo(i);if(u===null)mo(e,t,i,$r,n),pm(e,i);else if(by(u,e,t,n,i))i.stopPropagation();else if(pm(e,i),t&4&&-1<yy.indexOf(e)){for(;u!==null;){var o=Ca(u);
vendor: 4,148 bytes, line 9
9if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var d=ea(o.pendingLanes);if(d!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var b=1<<31-Et(d);p.entanglements[1]|=b,d&=~b}tn(o),(we&6)===0&&(Er=wt()+500,ul(0))}}break;case 31:case 13:p=la(o,2),p!==null&&yt(p,o,2),xr(),Oo(o,2)}if(o=jo(i),o===null&&mo(e,t,i,$r,n),o===u)break;u=o}u!==null&&i.stopPropagation()}else mo(e,t,i,null,n)}}function jo(e){return e=Cs(e),Co(e)}var $r=null;function Co(e){if($r=null,e=ja(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=f(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $r=e,null}function gm(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(ap()){case Sc:return 2;case Ec:return 8;case Cl:case ip:return 32;case Tc:return 268435456;default:return 32}default:return 32}}var No=!1,Kn=null,Yn=null,Qn=null,gl=new Map,pl=new Map,Jn=[],yy="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 pm(e,t){switch(e){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":gl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(t.pointerId)}}function vl(e,t,n,i,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[u]},t!==null&&(t=Ca(t),t!==null&&fm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function by(e,t,n,i,u){switch(t){case"focusin":return Kn=vl(Kn,e,t,n,i,u),!0;case"dragenter":return Yn=vl(Yn,e,t,n,i,u),!0;case"mouseover":return Qn=vl(Qn,e,t,n,i,u),!0;case"pointerover":var o=u.pointerId;return gl.set(o,vl(gl.get(o)||null,e,t,n,i,u)),!0;case"gotpointercapture":return o=u.pointerId,pl.set(o,vl(pl.get(o)||null,e,t,n,i,u)),!0}return!1}function vm(e){var t=ja(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=f(n),t!==null){e.blockedOn=t,Cc(e.priority,function(){mm(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,Cc(e.priority,function(){mm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jo(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);js=i,n.target.dispatchEvent(i),js=null}else return t=Ca(n),t!==null&&fm(t),e.blockedOn=n,!1;t.shift()}return!0}function ym(e,t,n){Gr(e)&&n.delete(t)}function _y(){No=!1,Kn!==null&&Gr(Kn)&&(Kn=null),Yn!==null&&Gr(Yn)&&
vendor: 5,717 bytes, line 9
9(Yn=null),Qn!==null&&Gr(Qn)&&(Qn=null),gl.forEach(ym),pl.forEach(ym)}function Vr(e,t){e.blockedOn===t&&(e.blockedOn=null,No||(No=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,_y)))}var Kr=null;function bm(e){Kr!==e&&(Kr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Kr===e&&(Kr=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(Co(i||n)===null)continue;break}var o=Ca(n);o!==null&&(e.splice(t,3),t-=3,Ru(o,{pending:!0,data:u,method:n.method,action:i},i,u))}}))}function hi(e){function t(b){return Vr(b,e)}Kn!==null&&Vr(Kn,e),Yn!==null&&Vr(Yn,e),Qn!==null&&Vr(Qn,e),gl.forEach(t),pl.forEach(t);for(var n=0;n<Jn.length;n++){var i=Jn[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Jn.length&&(n=Jn[0],n.blockedOn===null);)vm(n),n.blockedOn===null&&Jn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var u=n[i],o=n[i+1],d=u[dt]||null;if(typeof o=="function")d||bm(n);else if(d){var p=null;if(o&&o.hasAttribute("formAction")){if(u=o,d=o[dt]||null)p=d.formAction;else if(Co(u)!==null)continue}else p=d.action;typeof p=="function"?n[i+1]=p:(n.splice(i,3),i-=3),bm(n)}}}function _m(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(d){return u=d})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),i||setTimeout(n,20)}function n(){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(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Uo(e){this._internalRoot=e}Yr.prototype.render=Uo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,i=Ct();hm(n,i,e,t,null,null)},Yr.prototype.unmount=Uo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hm(e.current,2,null,e,null,null),xr(),t[Ra]=null}};function Yr(e){this._internalRoot=e}Yr.prototype.unstable_scheduleHydration=function(e){if(e){var t=jc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jn.length&&t!==0&&t<Jn[n].priority;n++);Jn.splice(n,0,e),n===0&&vm(e)}};var wm=a.version;if(wm!=="19.2.3")throw Error(s(527,wm,"19.2.3"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var wy={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qr.isDisabled&&Qr.supportsFiber)try{Ai=Qr.inject(wy),St=Qr}catch{}}return bl.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,i="",u=Od,o=Rd,d=jd;return t!=null&&(t.unstable_strictMode===!0&&(n=!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&&(d=t.onRecoverableError)),t=om(e,1,!1,null,null,n,i,null,u,o,d,_m),e[Ra]=t.current,fo(e),new Uo(t)},bl.hydrateRoot=function(e,t,n){if(!c(e))throw Error(s(299));var i=!1,u="",o=Od,d=Rd,p=jd,b=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=om(e,1,!0,t,n??null,i,u,b,o,d,p,_m),t.context=cm(null),n=t.current,i=Ct(),i=ws(i),u=Un(i),u.callback=null,kn(n,u,i),n=i,t.current.lanes=n,Ri(t,n),tn(t),e[Ra]=t.current,fo(e),new Yr(t)},bl.version="19.2.3",bl}var Nm;function Ny(){if(Nm)return zo.exports;Nm=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(a){console.error(a)}}return l(),zo.exports=Cy(),zo.exports}var Uy=Ny();const ky=og(Uy),Dy="modulepreload",zy=function(l){return"/"+l},Um={},My=function(a,r,s){let c=Promise.resolve();if(r&&r.length>0){let g=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(T=>({status:"fulfilled",value:T}),T=>({status:"rejected",reason:T}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");c=g(r.map(v=>{if(v=zy(v),v in Um)return;Um[v]=!0;const S=v.endsWith(".css"),T=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${T}`))return;const O=document.createElement("link");if(O.rel=S?"stylesheet":Dy,S||(O.as="script"),O.crossOrigin="",O.href=v,m&&O.setAttribute("nonce",m),document.head.appendChild(O),S)return new Promise((N,D)=>{O.addEventListener("load",N),O.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${v}`)))})}))}function h(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&h(m.reason);return a().catch(h)})},km="clutch_device_id",Dm="clutch_device_id",cg="clutch_first_touch_attribution",hg="clutch_last_touch_attribution",
9Ly="clutch_attribution_event",zm="clutch_last_attribution_capture_key",Fr="https://clutch-app.co",dg=["device_id","utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","cl_ref","gclid","gbraid","wbraid","fbclid","ttclid","msclkid","ref","referral_code"],By=[{hosts:["reddit.com"],source:"reddit",medium:"community",campaign:"inferred_reddit"},{hosts:["discord.com"],source:"discord",medium:"community",campaign:"inferred_discord"},{hosts:["tiktok.com"],source:"tiktok",medium:"organic_social",campaign:"inferred_tiktok"},{hosts:["youtube.com","youtu.be"],source:"youtube",medium:"organic_video",campaign:"inferred_youtube"},{hosts:["instagram.com"],source:"instagram",medium:"organic_social",campaign:"inferred_instagram"},{hosts:["facebook.com","l.facebook.com"],source:"facebook",medium:"organic_social",campaign:"inferred_facebook"},{hosts:["google.com"],source:"google",medium:"organic_or_paid_unknown",campaign:"inferred_google"},{hosts:["bing.com"],source:"bing",medium:"organic_or_paid_unknown",campaign:"inferred_bing"}];function st(){return typeof window<"u"&&typeof document<"u"}function ke(l){if(typeof l!="string")return null;const a=l.trim();return a.length>0?a:null}function qy(){if(st()){const l=ke(window.CLUTCH_ATTRIBUTION_CAPTURE_URL);if(l)return l}return ke("https://clutch-link-resolver-production.up.railway.app/api/attribution/capture")}function Hy(l){if(!st())return null;const a=document.cookie?document.cookie.split(";"):[];for(const r of a){const[s,...c]=r.trim().split("=");if(s===l)return ke(decodeURIComponent(c.join("=")))}return null}function $y(l,a){if(!st())return;const r=window.location.protocol==="https:"?"; Secure":"",s=new Date(Date.now()+365*24*60*60*1e3).toUTCString();document.cookie=[`${l}=${encodeURIComponent(a)}`,"Path=/","SameSite=Lax",`Expires=${s}`,r].join("; ")}function Gy(l){if(!st())return null;try{return ke(window.localStorage.getItem(l))}catch{return null}}function Vy(l,a){if(st())try{window.localStorage.setItem(l,a)}catch{return}}function Ky(){return`clutch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Yy(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Ky()}function hc(l){const a=ke(l);if(a)try{return new URL(a,Fr)}catch{return new URL(Fr)}return st()?new URL(window.location.href):new URL(Fr)}function Qy(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??null}catch{return null}}function fg(l){if(!st())return null;try{const a=window.localStorage.getItem(l);return a?JSON.parse(a):null}catch{return null}}function Mm(l,a){if(st())try{window.localStorage.setItem(l,JSON.stringify(a))}catch{return}}function dc(l){return!!(l.utm_source||l.utm_medium||l.utm_campaign||l.utm_content||l.utm_term||l.utm_id||l.cl_ref||l.gclid||l.gbraid||l.wbraid||l.fbclid||l.ttclid||l.msclkid||l.ref||l.referral_code)}function Jy(l){const a=ke(l);if(!a)return null;try{const r=new URL(a).hostname.toLowerCase(),s=By.find(c=>c.hosts.some(h=>r===h||r.endsWith(`.${h}`)));return s?{utm_source:s.source,utm_medium:s.medium,utm_campaign:s.campaign}:null}catch{return null}}function Xy(l,a){return dc(l)?"tracked":a?"inferred":"unknown"}function mg(l){if(!l||typeof l!="object")return!1;const a=l;return typeof a.device_id=="string"&&a.device_id.length>0}function Zy(l){const r=hc(l).searchParams;return{utm_source:ke(r.get("utm_source")),utm_medium:ke(r.get("utm_medium")),utm_campaign:ke(r.get("utm_campaign")),utm_content:ke(r.get("utm_content")),utm_term:ke(r.get("utm_term")),utm_id:ke(r.get("utm_id")),cl_ref:ke(r.get("cl_ref")),gclid:ke(r.get("gclid")),gbraid:ke(r.get("gbraid")),wbraid:ke(r.get("wbraid")),fbclid:ke(r.get("fbclid")),ttclid:ke(r.get("ttclid")),msclkid:ke(r.get("msclkid")),ref:ke(r.get("ref")),referral_code:ke(r.get("referral_code"))}}function Iy(l,a){return`${Ly}:${l}:${a}`}function qo(l,a){if(!st())return!1;try{const r=Iy(l,a);return window.sessionStorage.getItem(r)==="1"?!1:(window.sessionStorage.setItem(r,"1"),!0)}catch{return!0}}function Lm(l,a){const r=l[a];return typeof r=="string"?r:r??null}function Py(l,a){return l?dg.some(r=>{const s=Lm(l,r),c=Lm(a,r);return s!==c}):!0}function Wy(l){return yg()??vg()??bg()}function gg(l){return(ke(l)??(st()?window.location.pathname:"/")).match(/^\/(?:hubs|lfg)\/([^/?#]+)/i)?.[1]??null}function pg(l){return(ke(l)??(st()?window.location.pathname:"/")).match(/^\/hubs\/([^/?#]+)/i)?.[1]??null}function Fy(l){return pg(l)?"hub_landing_view":"website_attribution_captured"}function e0(l){const a=pg(l.pathname);return{device_id:l.device_id,utm_source:l.utm_source,utm_medium:l.utm_medium,utm_campaign:l.utm_campaign,utm_c
9ontent:l.utm_content,utm_term:l.utm_term,utm_id:l.utm_id,cl_ref:l.cl_ref,gclid:l.gclid,gbraid:l.gbraid,wbraid:l.wbraid,fbclid:l.fbclid,ttclid:l.ttclid,msclkid:l.msclkid,ref:l.ref,referral_code:l.referral_code,referrer:l.referrer,landing_page:l.landing_page,pathname:l.pathname,timezone:l.timezone,user_agent:l.user_agent,attribution_confidence:l.attribution_confidence,event_name:Fy(l.pathname),hub_slug:a,hub_id:null}}function t0(l){return[l.device_id,l.landing_page,l.utm_campaign??"",l.utm_content??"",l.cl_ref??""].join("|")}function n0(l){if(!st())return!1;const a=t0(l);try{return window.sessionStorage.getItem(zm)===a?!1:(window.sessionStorage.setItem(zm,a),!0)}catch{return!0}}function Ho(l,a){!st()||typeof window.gtag!="function"||window.gtag("event",l,{device_id:a.device_id,utm_source:a.utm_source??void 0,utm_medium:a.utm_medium??void 0,utm_campaign:a.utm_campaign??void 0,utm_content:a.utm_content??void 0,utm_term:a.utm_term??void 0,utm_id:a.utm_id??void 0,cl_ref:a.cl_ref??void 0,ref:a.ref??void 0,referral_code:a.referral_code??void 0,landing_page:a.landing_page,pathname:a.pathname,hub_slug:gg(a.pathname)??void 0})}async function a0(l){const a=qy();if(!a)return{ok:!1};try{const r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});return r.ok?{ok:!0}:(r.status,{ok:!1})}catch{return{ok:!1}}}function i0(){const l=Hy(km),a=Gy(Dm),r=l??a??Yy();return $y(km,r),Vy(Dm,r),r}function vg(){const l=fg(cg);return mg(l)?l:null}function yg(){const l=fg(hg);return mg(l)?l:null}function bg(){const l=hc(),a=Zy(l.toString()),r=st()?ke(document.referrer):null,s=dc(a)?null:Jy(r);return{device_id:i0(),utm_source:a.utm_source??s?.utm_source??null,utm_medium:a.utm_medium??s?.utm_medium??null,utm_campaign:a.utm_campaign??s?.utm_campaign??null,utm_content:a.utm_content??null,utm_term:a.utm_term??null,utm_id:a.utm_id??null,cl_ref:a.cl_ref??null,gclid:a.gclid??null,gbraid:a.gbraid??null,wbraid:a.wbraid??null,fbclid:a.fbclid??null,ttclid:a.ttclid??null,msclkid:a.msclkid??null,ref:a.ref??null,referral_code:a.referral_code??null,referrer:r,landing_page:l.toString(),pathname:l.pathname,user_agent:typeof navigator>"u"?null:ke(navigator.userAgent),timezone:Qy(),captured_at:new Date().toISOString(),attribution_confidence:Xy(a,s)}}function l0(l={}){const a=bg(),r=vg(),s=yg(),c=r??a;r||Mm(cg,c);const f=!s||dc(a)||a.attribution_confidence==="inferred"||Py(s,a)?a:s;if(f&&Mm(hg,f),l.trackGa4!==!1){const m=`${a.pathname}${hc().search}`;qo("website_attribution_captured",m)&&Ho("website_attribution_captured",a),a.attribution_confidence!=="unknown"&&qo("campaign_landing_view",m)&&Ho("campaign_landing_view",a),gg(a.pathname)&&qo("hub_landing_view",m)&&Ho("hub_landing_view",a)}return{payload:a,firstTouch:c,lastTouch:f}}function r0(l){const a=Wy(),r=new URLSearchParams;return dg.forEach(s=>{const c=a[s];typeof c=="string"&&c.length>0&&r.set(s,c)}),r}function Oa(l,a){const r=ke(l);if(!r||/^(mailto:|tel:|sms:|javascript:)/i.test(r))return l;const s=/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(r),c=st()?window.location.origin:Fr,h=s?new URL(r):new URL(r,c);return r0().forEach((m,g)=>{h.searchParams.has(g)||h.searchParams.set(g,m)}),s?h.toString():`${h.pathname}${h.search}${h.hash}`}function s0(l=document){if(!st())return;const a=['a[href^="clutchapp://"]','a[href*="apps.apple.com"]','a[href*="play.google.com"]','a[href^="/download.html"]','a[href*="/download.html"]','a[data-clutch-attribution-link="true"]'].join(",");l.querySelectorAll(a).forEach(r=>{const s=r.getAttribute("href");if(!s)return;const c=Oa(s);c!==s&&r.setAttribute("href",c)})}function u0(l={}){const a=l0({trackGa4:l.trackGa4});l.decorateLinks!==!1&&st()&&s0(document);const r=e0(a.payload);return n0(r)&&a0(r),a}function Bm(){return xe.useEffect(()=>{u0()},[]),null}const qm={"dead-by-daylight":"dbd",dead_by_daylight:"dbd",warzone:"wz",valorant:"val",fortnite:"fn",minecraft:"mc",roblox:"rbx","rocket-league":"rl","gta-5":"gta5","marvel-rivals":"mr","counter-strike":"cs","counter-strike-2":"cs2","arc-raiders":"arc",plink:"plink"},o0=/^[a-z0-9][a-z0-9_-]{2,80}$/,ya=[{id:"influencer-ugc",label:"Influencer UGC",description:"Flat-fee creator video or post.",values:{utmSource:"influencer",utmMedium:"ugc",utmCampaign:"dbd_launch",placement:"creator_video",audie
9nce:"dead_by_daylight",channel:"tiktok",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight"}},{id:"discord-lfg",label:"Discord LFG server post",description:"Community Discord server LFG promotion.",values:{utmSource:"discord",utmMedium:"community",utmCampaign:"dbd_launch",placement:"lfg_server_post",audience:"dead_by_daylight",channel:"discord",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight"}},{id:"reddit-post",label:"Reddit post",description:"Subreddit organic/community test.",values:{utmSource:"reddit",utmMedium:"community",utmCampaign:"dbd_launch",placement:"subreddit_post",audience:"dead_by_daylight",channel:"reddit",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight"}},{id:"plink-groupchat",label:"Plink competitor groupchat",description:"Competitor community growth test.",values:{utmSource:"plink",utmMedium:"competitor_community",utmCampaign:"dbd_launch",placement:"groupchat",audience:"dead_by_daylight",channel:"plink",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight"}},{id:"affiliate-creator",label:"Affiliate creator, future-use",description:"Creator link with referral credit context.",values:{utmSource:"influencer",utmMedium:"affiliate",utmCampaign:"dbd_launch",placement:"creator_link",audience:"dead_by_daylight",channel:"creator",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight"}}],Hm={name:"",slug:"",sequence:"001",destinationType:"hub",hubSlug:"dead-by-daylight",destinationPath:"/hubs/dead-by-daylight",destinationUrl:"",utmSource:"",utmMedium:"",utmCampaign:"",utmContent:"",utmTerm:"",channel:"",placement:"",audience:"",creatorName:"",description:"",referralCode:"",experimentKey:"",startsAt:"",expiresAt:"",isActive:!0,metaText:"{}"};function ae(l){if(!l)return"";const a=l.trim();return a.length>0?a:""}function Pt(l){return l.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")}function c0(l){const a=l.replace(/\D/g,"");return a?a.slice(-3).padStart(3,"0"):"001"}function h0(l){const a=ae(l.hubSlug)||ae(l.audience).replace(/_/g,"-")||ae(l.destinationPath).replace(/^\/hubs\//,"");if(!a)return"campaign";if(qm[a])return qm[a];const r=a.split(/[-_]/).filter(Boolean);return r.length===1?r[0].slice(0,6):r.map(s=>s[0]).join("").slice(0,6)}function d0(l){return Pt(l.creatorName)||Pt(l.utmSource)||Pt(l.channel)||"source"}function f0(l){const a=Pt(l.placement);return a==="lfg-server-post"?"lfg":(a||Pt(l.utmContent)||Pt(l.utmCampaign)||"link").split("-").slice(0,2).join("-")}function fc(l){return l.destinationType==="hub"?`/hubs/${Pt(l.hubSlug)||"dead-by-daylight"}`:(l.destinationType==="path",ae(l.destinationPath)||"/")}function mc(l){return l.destinationType==="url"?ae(l.destinationUrl):""}function m0(l){return mc(l)||fc(l)}function g0(l,a){const r=/^https?:\/\//i.test(l),s=r?new URL(l):new URL(l,"https://clutch-app.co");return a.forEach((c,h)=>{s.searchParams.has(h)||s.searchParams.set(h,c)}),r?s.toString():`${s.pathname}${s.search}${s.hash}`}function gc(l){return l.replace(/'/g,"''")}function ve(l){const a=ae(l);return a?`'${gc(a)}'`:"null"}function $m(l){return l?"true":"false"}function Jr(l){const a=ae(l);return a?`'${gc(a)}'::timestamptz`:"null"}function _g(l){const a=ae(l);if(!a)return{value:{},error:null};try{const r=JSON.parse(a);return r&&typeof r=="object"&&!Array.isArray(r)?{value:r,error:null}:{value:{},error:"Meta JSON must be an object."}}catch{return{value:{},error:"Meta JSON must be valid JSON."}}}function p0(){return ae("https://clutch-link-resolver-production.up.railway.app/api/campaign-links/create")}function v0(){return ae("https://clutch-app.co")||"https://clutch-app.co"}function $o(l,a){const r={...l,...a.values};return r.destinationType==="hub"&&(r.destinationPath=`/hubs/${Pt(r.hubSlug)||"dead-by-daylight"}`),r}function Gm(l){const a=c0(l.sequence);
9return[h0(l),d0(l),f0(l),a].map(Pt).filter(Boolean).join("-").slice(0,81).replace(/^-+|-+$/g,"")}function y0(l){const a=ae(l.slug);return a?`${v0().replace(/\/$/,"")}/r/${a}`:""}function b0(l){const a=m0(l);if(!a)return"";const r=new URLSearchParams;return ae(l.referralCode)&&r.set("ref",ae(l.referralCode)),ae(l.utmSource)&&r.set("utm_source",ae(l.utmSource)),ae(l.utmMedium)&&r.set("utm_medium",ae(l.utmMedium)),ae(l.utmCampaign)&&r.set("utm_campaign",ae(l.utmCampaign)),ae(l.utmContent)&&r.set("utm_content",ae(l.utmContent)),ae(l.utmTerm)&&r.set("utm_term",ae(l.utmTerm)),ae(l.slug)&&r.set("cl_ref",ae(l.slug)),g0(a,r)}function wg(l){const a=_g(l.metaText).value;return{slug:ae(l.slug),name:ae(l.name),description:ae(l.description)||null,destination_path:fc(l),destination_url:mc(l)||null,hub_slug:l.destinationType==="hub"&&Pt(l.hubSlug)||null,utm_source:ae(l.utmSource),utm_medium:ae(l.utmMedium),utm_campaign:ae(l.utmCampaign),utm_content:ae(l.utmContent)||null,utm_term:ae(l.utmTerm)||null,referral_code:ae(l.referralCode)||null,channel:ae(l.channel)||null,placement:ae(l.placement)||null,audience:ae(l.audience)||null,creator_name:ae(l.creatorName)||null,experiment_key:ae(l.experimentKey)||null,is_active:l.isActive,starts_at:ae(l.startsAt)||null,expires_at:ae(l.expiresAt)||null,meta:a}}function _0(l){const a=[],r=ae(l.slug),s=ae(l.name),c=fc(l),h=mc(l),f=_g(l.metaText);return s||a.push("Link name is required."),r?o0.test(r)||a.push("Slug must match ^[a-z0-9][a-z0-9_-]{2,80}$."):a.push("Slug is required."),ae(l.utmSource)||a.push("utm_source is required."),ae(l.utmMedium)||a.push("utm_medium is required."),ae(l.utmCampaign)||a.push("utm_campaign is required."),c.startsWith("/")||a.push("destination_path must start with /."),l.destinationType==="url"&&!/^https?:\/\//i.test(h)&&a.push("destination_url must be an http(s) URL when Full URL is selected."),l.destinationType==="hub"&&!Pt(l.hubSlug)&&a.push("Hub slug is required for Hub destinations."),f.error&&a.push(f.error),a}function w0(l){const a=wg(l),r=JSON.stringify(a.meta),s=`'${gc(r)}'::jsonb`;return l.destinationType==="hub"&&a.hub_slug?`insert into public.campaign_links (
10  slug,
11  name,
12  description,
13  destination_path,
14  destination_url,
15  hub_id,
16  utm_source,
17  utm_medium,
18  utm_campaign,
19  utm_content,
20  utm_term,
21  referral_code,
22  channel,
23  placement,
24  audience,
25  creator_name,
26  experiment_key,
27  is_active,
28  starts_at,
29  expires_at,
30  meta
31)
32select
33  ${ve(a.slug)},
34  ${ve(a.name)},
35  ${ve(a.description??"")},
36  ${ve(a.destination_path)},
37  ${ve(a.destination_url??"")},
38  h.id,
39  ${ve(a.utm_source)},
40  ${ve(a.utm_medium)},
41  ${ve(a.utm_campaign)},
42  ${ve(a.utm_content??"")},
43  ${ve(a.utm_term??"")},
44  ${ve(a.referral_code??"")},
45  ${ve(a.channel??"")},
46  ${ve(a.placement??"")},
47  ${ve(a.audience??"")},
48  ${ve(a.creator_name??"")},
49  ${ve(a.experiment_key??"")},
50  ${$m(a.is_active)},
51  ${Jr(a.starts_at??"")},
52  ${Jr(a.expires_at??"")},
53  ${s}
54from public.hubs h
55where h.slug = ${ve(a.hub_slug)}
56on conflict (slug) do update
57set
58  name = excluded.name,
59  description = excluded.description,
60  destination_path = excluded.destination_path,
61  destination_url = excluded.destination_url,
62  hub_id = excluded.hub_id,
63  utm_source = excluded.utm_source,
64  utm_medium = excluded.utm_medium,
65  utm_campaign = excluded.utm_campaign,
66  utm_content = excluded.utm_content,
67  utm_term = excluded.utm_term,
68  referral_code = excluded.referral_code,
69  channel = excluded.channel,
70  placement = excluded.placement,
71  audience = excluded.audience,
72  creator_name = excluded.creator_name,
73  experiment_key = excluded.experiment_key,
74  is_active = excluded.is_active,
75  starts_at = excluded.starts_at,
76  expires_at = excluded.expires_at,
77  meta = excluded.meta,
78  updated_at = now();`:`insert into public.campaign_links (
79  slug,
80  name,
81  description,
82  destination_path,
83  destination_url,
84  hub_id,
85  utm_source,
86  utm_medium,
87  utm_campaign,
88  utm_content,
89  utm_term,
90  referral_code,
91  channel,
92  placement,
93  audience,
94  creator_name,
95  experiment_key,
96  is_active,
97  starts_at,
98  expires_at,
99  meta
100)
101values (
102  ${ve(a.slug)},
103  ${ve(a.name)},
104  ${ve(a.description??"")},
105  ${ve(a.destination_path)},
106  ${ve(a.destination_url??"")},
107  null,
108  ${ve(a.utm_source)},
109  ${ve(a.utm_medium)},
110  ${ve(a.utm_campaign)},
111  ${ve(a.utm_content??"")},
112  ${ve(a.utm_term??"")},
113  ${ve(a.referral_code??"")},
114  ${ve(a.channel??"")},
115  ${ve(a.placement??"")},
116  ${ve(a.audience??"")},
117  ${ve(a.creator_name??"")},
118  ${ve(a.experiment_key??"")},
119  ${$m(a.is_active)},
120  ${Jr(a.starts_at??"")},
121  ${Jr(a.expires_at??"")},
122  ${s}
123)
124on conflict (slug) do update
125set
126  name = excluded.name,
127  description = excluded.description,
128  destination_path = excluded.destination_path,
129  destination_url = excluded.destination_url,
130  hub_id = excluded.hub_id,
131  utm_source = excluded.utm_source,
132  utm_medium = excluded.utm_medium,
133  utm_campaign = excluded.utm_campaign,
134  utm_content = excluded.utm_content,
135  utm_term = excluded.utm_term,
136  referral_code = excluded.referral_code,
137  channel = excluded.channel,
138  placement = excluded.placement,
139  audience = excluded.audience,
140  creator_name = excluded.creator_name,
141  experiment_key = excluded.experiment_key,
142  is_active = excluded.is_active,
143  starts_at = excluded.starts_at,
144  expires_at = excluded.expires_at,
145  meta = excluded.meta,
146  updated_at = now();`}function cs(l,a){var r={};for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&a.indexOf(s)<0&&(r[s]=l[s]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(l);c<s.length;c++)a.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(l,s[c])&&(r[s[c]]=l[s[c]]);return r}function S0(l,a,r,s){function c(h){return h instanceof r?h:new r(function(f){f(h)})}return new(r||(r=Promise))(function(h,f){function m(S){try{v(s.next(S))}catch(T){f(T)}}function g(S){try{v(s.throw(S))}catch(T){f(T)}}function v(S){S.done?h(S.value):c(S.value).then(m,g)}v((s=s.apply(l,a||[])).next())})}const E0=l=>l?(...a)=>l(...a):(...a)=>fetch(...a);class hs extends Error{constructor(a,r="FunctionsError",s){super(a),this.name=r,this.context=s}}class Sg extends hs{constructor(a){super("Failed to send a request to the Edge Function","FunctionsFetchError",a)}}class Zo extends hs{constructor(a){super("Relay Error invoking the Edge Function","FunctionsRelayError",a)}}class Io extends hs{constructor(a){super("Edge Function returned a non-2xx status code","FunctionsHttpError",a)}}var ns;(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"})(ns||(ns={}));class T0{constructor(a,{headers:r={},customFetch:s,region:c=ns.Any}={}){this.url=a,this.headers=r,this.region=c,this.fetch=E0(s)}setAuth(a){this.headers.Authorization=`Bearer ${a}`}invoke(a){return S0(this,arguments,void 0,function*(r,s={}){var c;let h,f;try{const{headers:m,method:g,body:v,signal:S,timeout:T}=s;let O={},{region:N}=s;N||(N=this.region);const D=new URL(`${this.url}/${r}`);N&&N!=="any"&&(O["x-region"]=N,D.searchParams.set("forceFunctionRegion",N));let B;v&&(m&&!Object.prototype.hasOwnProperty.call(m,"Content-Type")||!m)?typeof Blob<"u"&&v instanceof Blob||v instanceof ArrayBuffer?(O["Content-Type"]="application/octet-stream",B=v):typeof v=="string"?(O["Content-Type"]="text/plain",B=v):typeof FormData<"u"&&v instanceof FormData?B=v:(O["Content-Type"]="application/json",B=JSON.stringify(v)):B=v;let $=S;T&&(f=new AbortController,h=setTimeout(()=>f.abort(),T),S?($=f.signal,S.addEventListener("abort",()=>f.abort())):$=f.signal);const V=yield this.fetch(D.toString(),{method:g||"POST",headers:Object.assign(Object.assign(Object.assign({},O),this.headers),m),body:B,signal:$}).catch(_e=>{throw new Sg(_e)}),K=V.headers.get("x-relay-error");if(K&&K==="true")throw new Zo(V);if(!V.ok)throw new Io(V);let H=((c=V.headers.get("Content-Type"))!==null&&c!==void 0?c:"text/plain").split(";")[0].trim(),W;return H==="application/json"?W=yield V.json():H==="application/octet-stream"||H==="application/pdf"?W=yield V.blob():H==="text/event-stream"?W=V:H==="multipart/form-data"?W=yield V.formData():W=yield V.text(),{data:W,error:null,response:V}}catch(m){return{data:null,error:m,response:m instanceof Io||m instanceof Zo?m.context:void 0}}finally{h&&clearTimeout(h)}})}}
146var Eg=class extends Error{constructor(l){super(l.message),this.name="PostgrestError",this.details=l.details,this.hint=l.hint,this.code=l.code}},x0=class{constructor(l){var a,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=(a=l.shouldThrowOnError)!==null&&a!==void 0?a:!1,this.signal=l.signal,this.isMaybeSingle=(r=l.isMaybeSingle)!==null&&r!==void 0?r:!1,l.fetch?this.fetch=l.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(l,a){return this.headers=new Headers(this.headers),this.headers.set(l,a),this}then(l,a){var r=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 s=this.fetch;let c=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async h=>{let f=null,m=null,g=null,v=h.status,S=h.statusText;if(h.ok){var T,O;if(r.method!=="HEAD"){var N;const V=await h.text();V===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((N=r.headers.get("Accept"))===null||N===void 0)&&N.includes("application/vnd.pgrst.plan+text"))?m=V:m=JSON.parse(V))}const B=(T=r.headers.get("Prefer"))===null||T===void 0?void 0:T.match(/count=(exact|planned|estimated)/),$=(O=h.headers.get("content-range"))===null||O===void 0?void 0:O.split("/");B&&$&&$.length>1&&(g=parseInt($[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(m)&&(m.length>1?(f={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,g=null,v=406,S="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{var D;const B=await h.text();try{f=JSON.parse(B),Array.isArray(f)&&h.status===404&&(m=[],f=null,v=200,S="OK")}catch{h.status===404&&B===""?(v=204,S="No Content"):f={message:B}}if(f&&r.isMaybeSingle&&(!(f==null||(D=f.details)===null||D===void 0)&&D.includes("0 rows"))&&(f=null,v=200,S="OK"),f&&r.shouldThrowOnError)throw new Eg(f)}return{error:f,data:m,count:g,status:v,statusText:S}});return this.shouldThrowOnError||(c=c.catch(h=>{var f;let m="";const g=h?.cause;if(g){var v,S,T,O;const D=(v=g?.message)!==null&&v!==void 0?v:"",B=(S=g?.code)!==null&&S!==void 0?S:"";m=`${(T=h?.name)!==null&&T!==void 0?T:"FetchError"}: ${h?.message}`,m+=`
147
148Caused by: ${(O=g?.name)!==null&&O!==void 0?O:"Error"}: ${D}`,B&&(m+=` (${B})`),g?.stack&&(m+=`
149${g.stack}`)}else{var N;m=(N=h?.stack)!==null&&N!==void 0?N:""}return{error:{message:`${(f=h?.name)!==null&&f!==void 0?f:"FetchError"}: ${h?.message}`,details:m,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),c.then(l,a)}returns(){return this}overrideTypes(){return this}},A0=class extends x0{select(l){let a=!1;const r=(l??"*").split("").map(s=>/\s/.test(s)&&!a?"":(s==='"'&&(a=!a),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(l,{ascending:a=!0,nullsFirst:r,foreignTable:s,referencedTable:c=s}={}){const h=c?`${c}.order`:"order",f=this.url.searchParams.get(h);return this.url.searchParams.set(h,`${f?`${f},`:""}${l}.${a?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(l,{foreignTable:a,referencedTable:r=a}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${l}`),this}range(l,a,{foreignTable:r,referencedTable:s=r}={}){const c=typeof s>"u"?"offset":`${s}.offset`,h=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(c,`${l}`),this.url.searchParams.set(h,`${a-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}
149explain({analyze:l=!1,verbose:a=!1,settings:r=!1,buffers:s=!1,wal:c=!1,format:h="text"}={}){var f;const m=[l?"analyze":null,a?"verbose":null,r?"settings":null,s?"buffers":null,c?"wal":null].filter(Boolean).join("|"),g=(f=this.headers.get("Accept"))!==null&&f!==void 0?f:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${h}; for="${g}"; options=${m};`),h==="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 Vm=new RegExp("[,()]");var vi=class extends A0{eq(l,a){return this.url.searchParams.append(l,`eq.${a}`),this}neq(l,a){return this.url.searchParams.append(l,`neq.${a}`),this}gt(l,a){return this.url.searchParams.append(l,`gt.${a}`),this}gte(l,a){return this.url.searchParams.append(l,`gte.${a}`),this}lt(l,a){return this.url.searchParams.append(l,`lt.${a}`),this}lte(l,a){return this.url.searchParams.append(l,`lte.${a}`),this}like(l,a){return this.url.searchParams.append(l,`like.${a}`),this}likeAllOf(l,a){return this.url.searchParams.append(l,`like(all).{${a.join(",")}}`),this}likeAnyOf(l,a){return this.url.searchParams.append(l,`like(any).{${a.join(",")}}`),this}ilike(l,a){return this.url.searchParams.append(l,`ilike.${a}`),this}ilikeAllOf(l,a){return this.url.searchParams.append(l,`ilike(all).{${a.join(",")}}`),this}ilikeAnyOf(l,a){return this.url.searchParams.append(l,`ilike(any).{${a.join(",")}}`),this}regexMatch(l,a){return this.url.searchParams.append(l,`match.${a}`),this}regexIMatch(l,a){return this.url.searchParams.append(l,`imatch.${a}`),this}is(l,a){return this.url.searchParams.append(l,`is.${a}`),this}isDistinct(l,a){return this.url.searchParams.append(l,`isdistinct.${a}`),this}in(l,a){const r=Array.from(new Set(a)).map(s=>typeof s=="string"&&Vm.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(l,`in.(${r})`),this}notIn(l,a){const r=Array.from(new Set(a)).map(s=>typeof s=="string"&&Vm.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(l,`not.in.(${r})`),this}contains(l,a){return typeof a=="string"?this.url.searchParams.append(l,`cs.${a}`):Array.isArray(a)?this.url.searchParams.append(l,`cs.{${a.join(",")}}`):this.url.searchParams.append(l,`cs.${JSON.stringify(a)}`),this}containedBy(l,a){return typeof a=="string"?this.url.searchParams.append(l,`cd.${a}`):Array.isArray(a)?this.url.searchParams.append(l,`cd.{${a.join(",")}}`):this.url.searchParams.append(l,`cd.${JSON.stringify(a)}`),this}rangeGt(l,a){return this.url.searchParams.append(l,`sr.${a}`),this}rangeGte(l,a){return this.url.searchParams.append(l,`nxl.${a}`),this}rangeLt(l,a){return this.url.searchParams.append(l,`sl.${a}`),this}rangeLte(l,a){return this.url.searchParams.append(l,`nxr.${a}`),this}rangeAdjacent(l,a){return this.url.searchParams.append(l,`adj.${a}`),this}overlaps(l,a){return typeof a=="string"?this.url.searchParams.append(l,`ov.${a}`):this.url.searchParams.append(l,`ov.{${a.join(",")}}`),this}textSearch(l,a,{config:r,type:s}={}){let c="";s==="plain"?c="pl":s==="phrase"?c="ph":s==="websearch"&&(c="w");const h=r===void 0?"":`(${r})`;return this.url.searchParams.append(l,`${c}fts${h}.${a}`),this}match(l){return Object.entries(l).forEach(([a,r])=>{this.url.searchParams.append(a,`eq.${r}`)}),this}not(l,a,r){return this.url.searchParams.append(l,`not.${a}.${r}`),this}or(l,{foreignTable:a,referencedTable:r=a}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${l})`),this}filter(l,a,r){return this.url.searchParams.append(l,`${a}.${r}`),this}},O0=class{constructor(l,{headers:a={},schema:r,fetch:s}){this.url=l,this.headers=new Headers(a),this.schema=r,this.fetch=s}select(l,a){const{head:r=!1,count:s}=a??{},c=r?"HEAD":"GET";let h=!1;const f=(l??"*").split("").map(m=>/\s/.test(m)&&!h?"":(m==='"'&&(h=!h),m)).join("");return this.url.searchParams.set("select",f),s&&this.headers.append("Prefer",`count=${s}`),new vi({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(l,{count:a,defaultToNull:r=!0}={}){var s;const c="POST";if(a&&this.headers.append("Prefer",`count=${a}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(l)){const h=l.reduce((f,m)=>f.concat(Object.keys(m)),[]);if(h.length>0){const f=[...new Set(h)].map(m=>`"${m}"`);this.url.searchParams.set("columns",f.join(","))}}return new vi({method:c,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(l,{onConflict:a,ignoreDuplicates:r=!1,count:s,defaultToNull:c=!0}={}){var h;const f="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),a!==void 0&&this.url.searchParams.set("on_conflict",a),s&&this.headers.append("Prefer",`count=${s}`),c||this.headers.append("Prefer","missing=default"),Array.isArray(l)){const m=l.reduce((g,v)=>g.concat(Object.keys(v)),[]);if(m.length>0){const g=[...new Set(m)].map(v=>`"${v}"`);this.url.searchParams.set("columns",g.join(","))}}return new vi({method:f,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(h=this.fetch)!==null&&h!==void 0?h:fetch})}update(l,{count:a}={}){var r;const s="PATCH";return a&&this.headers.append("Prefer",`count=${a}`),new vi({method:s,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:l}={}){var a;const r="DELETE";return l&&this.headers.append("Prefer",`count=${l}`),new vi({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}},R0=class Tg{constructor(a,{headers:r={},schema:s,fetch:c}={}){this.url=a,this.headers=new Headers(r),this.schemaName=s,this.fetch=c}from(a){if(!a||typeof a!="string"||a.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new O0(new URL(`${this.url}/${a}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(a){return new Tg(this.url,{headers:this.headers,schema:a,fetch:this.fetch})}rpc(a,r={},{head:s=!1,get:c=!1,count:h}={}){var f;let m;const g=new URL(`${this.url}/rpc/${a}`);let v;s||c?(m=s?"HEAD":"GET",Object.entries(r).filter(([T,O])=>O!==void 0).map(([T,O])=>[T,Array.isArray(O)?`{${O.join(",")}}`:`${O}
149`]).forEach(([T,O])=>{g.searchParams.append(T,O)})):(m="POST",v=r);const S=new Headers(this.headers);return h&&S.set("Prefer",`count=${h}`),new vi({method:m,url:g,headers:S,schema:this.schemaName,body:v,fetch:(f=this.fetch)!==null&&f!==void 0?f:fetch})}};class xg{constructor(){}static detectEnvironment(){var a;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"&&(!((a=navigator.userAgent)===null||a===void 0)&&a.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."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const s=r.node,c=parseInt(s.replace(/^v/,"").split(".")[0]);return c>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${c} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${c} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
150import ws from "ws"
151new 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 a=this.detectEnvironment();if(a.constructor)return a.constructor;let r=a.error||"WebSocket not supported in this environment.";throw a.workaround&&(r+=`
152
153Suggested solution: ${a.workaround}`),new Error(r)}static createWebSocket(a,r){const s=this.getWebSocketConstructor();return new s(a,r)}static isWebSocketSupported(){try{const a=this.detectEnvironment();return a.type==="native"||a.type==="ws"}catch{return!1}}}const j0="2.89.0",C0=`realtime-js/${j0}`,Ag="1.0.0",N0="2.0.0",Km=Ag,Po=1e4,U0=1e3,k0=100;var In;(function(l){l[l.connecting=0]="connecting",l[l.open=1]="open",l[l.closing=2]="closing",l[l.closed=3]="closed"})(In||(In={}));var Pe;(function(l){l.closed="closed",l.errored="errored",l.joined="joined",l.joining="joining",l.leaving="leaving"})(Pe||(Pe={}));var It;(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"})(It||(It={}));var Wo;(function(l){l.websocket="websocket"})(Wo||(Wo={}));var Ta;(function(l){l.Connecting="connecting",l.Open="open",l.Closing="closing",l.Closed="closed"})(Ta||(Ta={}));class D0{constructor(a){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=a??[]}encode(a,r){if(a.event===this.BROADCAST_EVENT&&!(a.payload instanceof ArrayBuffer)&&typeof a.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(a));let s=[a.join_ref,a.ref,a.topic,a.event,a.payload];return r(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(a){var r;return this._isArrayBuffer((r=a.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(a):this._encodeJsonUserBroadcastPush(a)}_encodeBinaryUserBroadcastPush(a){var r,s;const c=(s=(r=a.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(a,this.BINARY_ENCODING,c)}_encodeJsonUserBroadcastPush(a){var r,s;const c=(s=(r=a.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:{},f=new TextEncoder().encode(JSON.stringify(c)).buffer;return this._encodeUserBroadcastPush(a,this.JSON_ENCODING,f)}_encodeUserBroadcastPush(a,r,s){var c,h;const f=a.topic,m=(c=a.ref)!==null&&c!==void 0?c:"",g=(h=a.join_ref)!==null&&h!==void 0?h:"",v=a.payload.event,S=this.allowedMetadataKeys?this._pick(a.payload,this.allowedMetadataKeys):{},T=Object.keys(S).length===0?"":JSON.stringify(S);if(g.length>255)throw new Error(`joinRef length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`ref length ${m.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(v.length>255)throw new Error(`userEvent length ${v.length} exceeds maximum of 255`);if(T.length>255)throw new Error(`metadata length ${T.length} exceeds maximum of 255`);const O=this.USER_BROADCAST_PUSH_META_LENGTH+g.length+m.length+f.length+v.length+T.length,N=new ArrayBuffer(this.HEADER_LENGTH+O);let D=new DataView(N),B=0;D.setUint8(B++,this.KINDS.userBroadcastPush),D.setUint8(B++,g.length),D.setUint8(B++,m.length),D.setUint8(B++,f.length),D.setUint8(B++,v.length),D.setUint8(B++,T.length),D.setUint8(B++,r),Array.from(g,V=>
153D.setUint8(B++,V.charCodeAt(0))),Array.from(m,V=>D.setUint8(B++,V.charCodeAt(0))),Array.from(f,V=>D.setUint8(B++,V.charCodeAt(0))),Array.from(v,V=>D.setUint8(B++,V.charCodeAt(0))),Array.from(T,V=>D.setUint8(B++,V.charCodeAt(0)));var $=new Uint8Array(N.byteLength+s.byteLength);return $.set(new Uint8Array(N),0),$.set(new Uint8Array(s),N.byteLength),$.buffer}decode(a,r){if(this._isArrayBuffer(a)){let s=this._binaryDecode(a);return r(s)}if(typeof a=="string"){const s=JSON.parse(a),[c,h,f,m,g]=s;return r({join_ref:c,ref:h,topic:f,event:m,payload:g})}return r({})}_binaryDecode(a){const r=new DataView(a),s=r.getUint8(0),c=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(a,r,c)}_decodeUserBroadcast(a,r,s){const c=r.getUint8(1),h=r.getUint8(2),f=r.getUint8(3),m=r.getUint8(4);let g=this.HEADER_LENGTH+4;const v=s.decode(a.slice(g,g+c));g=g+c;const S=s.decode(a.slice(g,g+h));g=g+h;const T=s.decode(a.slice(g,g+f));g=g+f;const O=a.slice(g,a.byteLength),N=m===this.JSON_ENCODING?JSON.parse(s.decode(O)):O,D={type:this.BROADCAST_EVENT,event:S,payload:N};return f>0&&(D.meta=JSON.parse(T)),{join_ref:null,ref:null,topic:v,event:this.BROADCAST_EVENT,payload:D}}_isArrayBuffer(a){var r;return a instanceof ArrayBuffer||((r=a?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(a,r){return!a||typeof a!="object"?{}:Object.fromEntries(Object.entries(a).filter(([s])=>r.includes(s)))}}class Og{constructor(a,r){this.callback=a,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=a,this.timerCalc=r}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 Ue;(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"})(Ue||(Ue={}));const Ym=(l,a,r={})=>{var s;const c=(s=r.skipTypes)!==null&&s!==void 0?s:[];return a?Object.keys(a).reduce((h,f)=>(h[f]=z0(f,l,a,c),h),{}):{}},z0=(l,a,r,s)=>{const c=a.find(m=>m.name===l),h=c?.type,f=r[l];return h&&!s.includes(h)?Rg(h,f):Fo(f)},Rg=(l,a)=>{if(l.charAt(0)==="_"){const r=l.slice(1,l.length);return q0(a,r)}switch(l){case Ue.bool:return M0(a);case Ue.float4:case Ue.float8:case Ue.int2:case Ue.int4:case Ue.int8:case Ue.numeric:case Ue.oid:return L0(a);case Ue.json:case Ue.jsonb:return B0(a);case Ue.timestamp:return H0(a);case Ue.abstime:case Ue.date:case Ue.daterange:case Ue.int4range:case Ue.int8range:case Ue.money:case Ue.reltime:case Ue.text:case Ue.time:case Ue.timestamptz:case Ue.timetz:case Ue.tsrange:case Ue.tstzrange:return Fo(a);default:return Fo(a)}},Fo=l=>l,M0=l=>{switch(l){case"t":return!0;case"f":return!1;default:return l}},L0=l=>{if(typeof l=="string"){const a=parseFloat(l);if(!Number.isNaN(a))return a}return l},B0=l=>{if(typeof l=="string")try{return JSON.parse(l)}catch{return l}return l},q0=(l,a)=>{if(typeof l!="string")return l;const r=l.length-1,s=l[r];if(l[0]==="{"&&s==="}"){let h;const f=l.slice(1,r);try{h=JSON.parse("["+f+"]")}catch{h=f?f.split(","):[]}return h.map(m=>Rg(a,m))}return l},H0=l=>typeof l=="string"?l.replace(" ","T"):l,jg=l=>{const a=new URL(l);return a.protocol=a.protocol.replace(/^ws/i,"http"),a.pathname=a.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),a.pathname===""||a.pathname==="/"?a.pathname="/api/broadcast":a.pathname=a.pathname+"/api/broadcast",a.href};class Go{constructor(a,r,s={},c=Po){this.channel=a,this.event=r,this.payload=s,this.timeout=c,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(a){this.timeout=a,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,j
153oin_ref:this.channel._joinRef()}))}updatePayload(a){this.payload=Object.assign(Object.assign({},this.payload),a)}receive(a,r){var s;return this._hasReceived(a)&&r((s=this.receivedResp)===null||s===void 0?void 0:s.response),this.recHooks.push({status:a,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const a=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},a),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(a,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:a,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:a,response:r}){this.recHooks.filter(s=>s.status===a).forEach(s=>s.callback(r))}_hasReceived(a){return this.receivedResp&&this.receivedResp.status===a}}var ec;(function(l){l.SYNC="sync",l.JOIN="join",l.LEAVE="leave"})(ec||(ec={}));class _i{constructor(a,r){this.channel=a,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const s=r?.events||{state:"presence_state",diff:"presence_diff"};this.channel._on(s.state,{},c=>{const{onJoin:h,onLeave:f,onSync:m}=this.caller;this.joinRef=this.channel._joinRef(),this.state=_i.syncState(this.state,c,h,f),this.pendingDiffs.forEach(g=>{this.state=_i.syncDiff(this.state,g,h,f)}),this.pendingDiffs=[],m()}),this.channel._on(s.diff,{},c=>{const{onJoin:h,onLeave:f,onSync:m}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(c):(this.state=_i.syncDiff(this.state,c,h,f),m())}),this.onJoin((c,h,f)=>{this.channel._trigger("presence",{event:"join",key:c,currentPresences:h,newPresences:f})}),this.onLeave((c,h,f)=>{this.channel._trigger("presence",{event:"leave",key:c,currentPresences:h,leftPresences:f})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(a,r,s,c){const h=this.cloneDeep(a),f=this.transformState(r),m={},g={};return this.map(h,(v,S)=>{f[v]||(g[v]=S)}),this.map(f,(v,S)=>{const T=h[v];if(T){const O=S.map($=>$.presence_ref),N=T.map($=>$.presence_ref),D=S.filter($=>N.indexOf($.presence_ref)<0),B=T.filter($=>O.indexOf($.presence_ref)<0);D.length>0&&(m[v]=D),B.length>0&&(g[v]=B)}else m[v]=S}),this.syncDiff(h,{joins:m,leaves:g},s,c)}static syncDiff(a,r,s,c){const{joins:h,leaves:f}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return s||(s=()=>{}),c||(c=()=>{}),this.map(h,(m,g)=>{var v;const S=(v=a[m])!==null&&v!==void 0?v:[];if(a[m]=this.cloneDeep(g),S.length>0){const T=a[m].map(N=>N.presence_ref),O=S.filter(N=>T.indexOf(N.presence_ref)<0);a[m].unshift(...O)}s(m,S,g)}),this.map(f,(m,g)=>{let v=a[m];if(!v)return;const S=g.map(T=>T.presence_ref);v=v.filter(T=>S.indexOf(T.presence_ref)<0),a[m]=v,c(m,v,g),v.length===0&&delete a[m]}),a}static map(a,r){return Object.getOwnPropertyNames(a).map(s=>r(s,a[s]))}static transformState(a){return a=this.cloneDeep(a),Object.getOwnPropertyNames(a).reduce((r,s)=>{const c=a[s];return"metas"in c?r[s]=c.metas.map(h=>(h.presence_ref=h.phx_ref,delete h.phx_ref,delete h.phx_ref_prev,h)):r[s]=c,r},{})}static cloneDeep(a){return JSON.parse(JSON.stringify(a))}onJoin(a){this.caller.onJoin=a}onLeave(a){this.caller.onLeave=a}onSync(a){this.caller.onSync=a}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var tc;(function(l){l.ALL="*",l.INSERT="INSERT",l.UPDATE="UPDATE",l.DELETE="DELETE"})(tc||(tc={}));var wi;(function(l){l.BROADCAST="broadcast",l.PRESENCE="presence",l.POSTGRES_CHANGES="postgres_changes",l.SYSTEM="system"})(wi||(wi={}));var nn;(function(l){l.SUBSCRIBED="SUBSCRIBED",l.TIMED_OUT="TIMED_OUT",l.CLOSED="CLOSED",l.CHANNEL_ERROR="CHANNEL_ERROR"})(nn||(nn={}));class xa{constructor(a,r={config:{}},s){var c,h;if(this.topic=a,this.params=r,this.socket=s,this.bindings={},this.state=Pe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=a.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Go(this,It.join,this.params,this.timeout),this.rejoinTimer=new Og(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Pe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(f=>f.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Pe.closed,this.socket._remove(this)}),this._onError(f=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,f),this.state=Pe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Pe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",f=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,f),this.state=Pe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(It.reply,{},(f,m)=>{this._trigger(this._replyEventName(m),f)}),this.presence=new _i(this),this.broadcastEndpointURL=jg(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((h=(c=this.params.config)===null||c===void 0?void 0:c.broadcast)===null||h===void 0)&&h.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(a,r=this.timeout){var s,c,h;if(this.socket.isConnected()||this.socket.connect(),this.state==Pe.closed){const{config:{broadcast:f,presence:m,private:g}}=this.params,v=(c=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(N=>N.filter))!==null&&c!==void 0?c:[],S=!!this.bindings[wi.PRESENCE]&&this.bindings[wi.PRESENCE].length>
1530||((h=this.params.config.presence)===null||h===void 0?void 0:h.enabled)===!0,T={},O={broadcast:f,presence:Object.assign(Object.assign({},m),{enabled:S}),postgres_changes:v,private:g};this.socket.accessTokenValue&&(T.access_token=this.socket.accessTokenValue),this._onError(N=>a?.(nn.CHANNEL_ERROR,N)),this._onClose(()=>a?.(nn.CLOSED)),this.updateJoinPayload(Object.assign({config:O},T)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:N})=>{var D;if(this.socket._isManualToken()||this.socket.setAuth(),N===void 0){a?.(nn.SUBSCRIBED);return}else{const B=this.bindings.postgres_changes,$=(D=B?.length)!==null&&D!==void 0?D:0,V=[];for(let K=0;K<$;K++){const H=B[K],{filter:{event:W,schema:_e,table:le,filter:I}}=H,ne=N&&N[K];if(ne&&ne.event===W&&xa.isFilterValueEqual(ne.schema,_e)&&xa.isFilterValueEqual(ne.table,le)&&xa.isFilterValueEqual(ne.filter,I))V.push(Object.assign(Object.assign({},H),{id:ne.id}));else{this.unsubscribe(),this.state=Pe.errored,a?.(nn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=V,a&&a(nn.SUBSCRIBED);return}}).receive("error",N=>{this.state=Pe.errored,a?.(nn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(N).join(", ")||"error")))}).receive("timeout",()=>{a?.(nn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(a,r={}){return await this.send({type:"presence",event:"track",payload:a},r.timeout||this.timeout)}async untrack(a={}){return await this.send({type:"presence",event:"untrack"},a)}on(a,r,s){return this.state===Pe.joined&&a===wi.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(a,r,s)}async httpSend(a,r,s={}){var c;if(r==null)return Promise.reject("Payload is required for httpSend()");const h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:r,private:this.private}]})},m=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(c=s.timeout)!==null&&c!==void 0?c:this.timeout);if(m.status===202)return{success:!0};let g=m.statusText;try{const v=await m.json();g=v.error||v.message||g}catch{}return Promise.reject(new Error(g))}async send(a,r={}){var s,c;if(!this._canPush()&&a.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
153in the future. Please use httpSend() explicitly for REST delivery.");const{event:h,payload:f}=a,m={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(m.Authorization=`Bearer ${this.socket.accessTokenValue}`);const g={method:"POST",headers:m,body:JSON.stringify({messages:[{topic:this.subTopic,event:h,payload:f,private:this.private}]})};try{const v=await this._fetchWithTimeout(this.broadcastEndpointURL,g,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);return await((c=v.body)===null||c===void 0?void 0:c.cancel()),v.ok?"ok":"error"}catch(v){return v.name==="AbortError"?"timed out":"error"}}else return new Promise(h=>{var f,m,g;const v=this._push(a.type,a,r.timeout||this.timeout);a.type==="broadcast"&&!(!((g=(m=(f=this.params)===null||f===void 0?void 0:f.config)===null||m===void 0?void 0:m.broadcast)===null||g===void 0)&&g.ack)&&h("ok"),v.receive("ok",()=>h("ok")),v.receive("error",()=>h("error")),v.receive("timeout",()=>h("timed out"))})}updateJoinPayload(a){this.joinPush.updatePayload(a)}unsubscribe(a=this.timeout){this.state=Pe.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(It.close,"leave",this._joinRef())};this.joinPush.destroy();let s=null;return new Promise(c=>{s=new Go(this,It.leave,{},a),s.receive("ok",()=>{r(),c("ok")}).receive("timeout",()=>{r(),c("timed out")}).receive("error",()=>{c("error")}),s.send(),this._canPush()||s.trigger("ok",{})}).finally(()=>{s?.destroy()})}teardown(){this.pushBuffer.forEach(a=>a.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Pe.closed,this.bindings={}}async _fetchWithTimeout(a,r,s){const c=new AbortController,h=setTimeout(()=>c.abort(),s),f=await this.socket.fetch(a,Object.assign(Object.assign({},r),{signal:c.signal}));return clearTimeout(h),f}_push(a,r,s=this.timeout){if(!this.joinedOnce)throw`tried to push '${a}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let c=new Go(this,a,r,s);return this._canPush()?c.send():this._addToPushBuffer(c),c}_addToPushBuffer(a){if(a.startTimeout(),this.pushBuffer.push(a),this.pushBuffer.length>k0){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(a,r,s){return r}_isMember(a){return this.topic===a}_joinRef(){return this.joinPush.ref}_trigger(a,r,s){var c,h;const f=a.toLocaleLowerCase(),{close:m,error:g,leave:v,join:S}=It;if(s&&[m,g,v,S].indexOf(f)>=0&&s!==this._joinRef())return;let O=this._onMessage(f,r,s);if(r&&!O)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(f)?(c=this.bindings.postgres_changes)===null||c===void 0||c.filter(N=>{var D,B,$;return((D=N.filter)===null||D===void 0?void 0:D.event)==="*"||(($=(B=N.filter)===null||B===void 0?void 0:B.event)===null||$===void 0?void 0:$.toLocaleLowerCase())===f}).map(N=>N.callback(O,s)):(h=this.bindings[f])===null||h===void 0||h.filter(N=>{var D,B,$,V,K,H;if(["broadcast","presence","postgres_changes"].includes(f))if("id"in N){const W=N.id,_e=(D=N.filter)===null||D===void 0?void 0:D.event;return W&&((B=r.ids)===null||B===void 0?void 0:B.includes(W))&&(_e==="*"||_e?.toLocaleLowerCase()===(($=r.data)===null||$===void 0?void 0:$.type.toLocaleLowerCase()))}else{const W=(K=(V=N?.filter)===null||V===void 0?void 0:V.event)===null||K===void 0?void 0:K.toLocaleLowerCase();return W==="*"||W===((H=r?.event)===null||H===void 0?void 0:H.toLocaleLowerCase())}else return N.type.toLocaleLowerCase()===f}).map(N=>{if(typeof O=="object"&&"ids"in O){const D=O.data,{schema:B,table:$,commit_timestamp:V,type:K,errors:H}=D;O=Object.assign(Object.assign({},{schema:B,table:$,commit_timestamp:V,eventType:K,new:{},old:{},errors:H}),this._getPayloadRecords(D))}N.callback(O,s)})}_isClosed(){return this.state===Pe.closed}_isJoined(){return this.state===Pe.joined}_isJoining(){return this.state===Pe.joining}_isLeaving(){return this.state===Pe.leaving}_replyEventName(a){return`chan_reply_${a}`}_on(a,r,s){const c=a.toLocaleLowerCase(),h={type:c,filter:r,callback:s};return this.bindings[c]?this.bindings[c].push(h):this.bindings[c]=[h],this}_off(a,r){const s=a.toLocaleLowerCase();return this.bindings[s]&&(this.bindings[s]=this.bindings[s].filter(c=>{var h;return!(((h=c.type)===null||h===void 0?void 0:h.toLocaleLowerCase())===s&&xa.isEqual(c.filter,r))})),this}static isEqual(a,r){if(Object.keys(a).length!==Object.keys(r).length)return!1;for(const s in a)if(a[s]!==r[s])return!1;return!0}static isFilterValueEqual(a,r){return(a??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(a){this._on(It.close,{},a)}_onError(a){this._on(It.error,{},r=>a(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(a=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Pe.joining,this.joinPush.resend(a))}_getPayloadRecords(a){const r={new:{},old:{}};return(a.type==="INSERT"||a.type==="UPDATE")&&(r.new=Ym(a.columns,a.record)),(a.type==="UPDATE"||a.type==="DELETE")&&(r.old=Ym(a.columns,a.old_record)),r}}const Vo=()=>{},Xr={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},$0=[1e3,2e3,5e3,1e4],G0=1e4,V0=`
154  addEventListener("message", (e) => {
155    if (e.data.event === "start") {
156      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
157    }
158  });`;class Cg{constructor(a,r){var s;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Po,this.transport=null,this.heartbeatIntervalMs=Xr.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Vo,this.ref=0,this.reconnectTimer=null,this.vsn=Km,this.logger=Vo,this.conn=null,this.sendBuffer=[],this.serializer
158=new D0,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=c=>c?(...h)=>c(...h):(...h)=>fetch(...h),!(!((s=r?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${a}/${Wo.websocket}`,this.httpEndpoint=jg(a),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r?.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=xg.createWebSocket(this.endpointURL())}catch(a){this._setConnectionState("disconnected");const r=a.message;throw r.includes("Node.js")?new Error(`${r}
159
160To use Realtime in Node.js, you need to provide a WebSocket implementation:
161
162Option 1: Use Node.js 22+ which has native WebSocket support
163Option 2: Install and provide the "ws" package:
164
165  npm install ws
166
167  import ws from "ws"
168  const client = new RealtimeClient(url, {
169    ...options,
170    transport: ws
171  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(a,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const s=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(s),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(a?this.conn.close(a,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(a){const r=await a.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const a=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),a}log(a,r,s){this.logger(a,r,s)}connectionState(){switch(this.conn&&this.conn.readyState){case In.connecting:return Ta.Connecting;case In.open:return Ta.Open;case In.closing:return Ta.Closing;default:return Ta.Closed}}isConnected(){return this.connectionState()===Ta.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(a,r={config:{}}){const s=`realtime:${a}`,c=this.getChannels().find(h=>h.topic===s);if(c)return c;{const h=new xa(`realtime:${a}`,r,this);return this.channels.push(h),h}}push(a){const{topic:r,event:s,payload:c,ref:h}=a,f=()=>{this.encode(a,m=>{var g;(g=this.conn)===null||g===void 0||g.send(m)})};this.log("push",`${r} ${s} (${h})`,c),this.isConnected()?f():this.sendBuffer.push(f)}async setAuth(a=null){this._authPromise=this._performAuth(a);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var a;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(a=this.conn)===null||a===void 0||a.close(U0,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
171heduleTimeout()},Xr.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(a){this.heartbeatCallback=a}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(a=>a()),this.sendBuffer=[])}_makeRef(){let a=this.ref+1;return a===this.ref?this.ref=0:this.ref=a,this.ref.toString()}_leaveOpenTopic(a){let r=this.channels.find(s=>s.topic===a&&(s._isJoined()||s._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${a}"`),r.unsubscribe())}_remove(a){this.channels=this.channels.filter(r=>r.topic!==a.topic)}_onConnMessage(a){this.decode(a.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(v){this.log("error","error in heartbeat callback",v)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:s,event:c,payload:h,ref:f}=r,m=f?`(${f})`:"",g=h.status||"";this.log("receive",`${g} ${s} ${c} ${m}`.trim(),h),this.channels.filter(v=>v._isMember(s)).forEach(v=>v._trigger(c,h,f)),this._triggerStateCallbacks("message",r)})}_clearTimer(a){var r;a==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):a==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.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=a=>this._onConnError(a),this.conn.onmessage=a=>this._onConnMessage(a),this.conn.onclose=a=>this._onConnClose(a),this.conn.readyState===In.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===In.open||this.conn.readyState===In.connecting)try{this.conn.close()}catch(a){this.log("error","Error closing connection",a)}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(a=>a.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(r=>{this.log("error","error waiting for auth on connect",r),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 a=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(a),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.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(a){var r;this._setConnectionState("disconnected"),this.log("transport","close",a),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
171heduleTimeout(),this._triggerStateCallbacks("close",a)}_onConnError(a){this._setConnectionState("disconnected"),this.log("transport",`${a}`),this._triggerChanError(),this._triggerStateCallbacks("error",a)}_triggerChanError(){this.channels.forEach(a=>a._trigger(It.error))}_appendParams(a,r){if(Object.keys(r).length===0)return a;const s=a.match(/\?/)?"&":"?",c=new URLSearchParams(r);return`${a}${s}${c}`}_workerObjectUrl(a){let r;if(a)r=a;else{const s=new Blob([V0],{type:"application/javascript"});r=URL.createObjectURL(s)}return r}_setConnectionState(a,r=!1){this._connectionState=a,a==="connecting"?this._wasManualDisconnect=!1:a==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(a=null){let r,s=!1;if(a)r=a,s=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),r=this.accessTokenValue}else r=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(c=>{const h={access_token:r,version:C0};r&&c.updateJoinPayload(h),c.joinedOnce&&c._isJoined()&&c._push(It.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(a="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${a}`,r)})}_triggerStateCallbacks(a,r){try{this.stateChangeCallbacks[a].forEach(s=>{try{s(r)}catch(c){this.log("error",`error in ${a} callback`,c)}})}catch(s){this.log("error",`error triggering ${a} callbacks`,s)}}_setupReconnectionTimer(){this.reconnectTimer=new Og(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Xr.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(a){var r,s,c,h,f,m,g,v,S,T,O,N;switch(this.transport=(r=a?.transport)!==null&&r!==void 0?r:null,this.timeout=(s=a?.timeout)!==null&&s!==void 0?s:Po,this.heartbeatIntervalMs=(c=a?.heartbeatIntervalMs)!==null&&c!==void 0?c:Xr.HEARTBEAT_INTERVAL,this.worker=(h=a?.worker)!==null&&h!==void 0?h:!1,this.accessToken=(f=a?.accessToken)!==null&&f!==void 0?f:null,this.heartbeatCallback=(m=a?.heartbeatCallback)!==null&&m!==void 0?m:Vo,this.vsn=(g=a?.vsn)!==null&&g!==void 0?g:Km,a?.params&&(this.params=a.params),a?.logger&&(this.logger=a.logger),(a?.logLevel||a?.log_level)&&(this.logLevel=a.logLevel||a.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(v=a?.reconnectAfterMs)!==null&&v!==void 0?v:(D=>$0[D-1]||G0),this.vsn){case Ag:this.encode=(S=a?.encode)!==null&&S!==void 0?S:((D,B)=>B(JSON.stringify(D))),this.decode=(T=a?.decode)!==null&&T!==void 0?T:((D,B)=>B(JSON.parse(D)));break;case N0:this.encode=(O=a?.encode)!==null&&O!==void 0?O:this.serializer.encode.bind(this.serializer),this.decode=(N=a?.decode)!==null&&N!==void 0?N: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=a?.workerUrl}}}var Tl=class extends Error{constructor(l,a){super(l),this.name="IcebergError",this.status=a.status,this.icebergType=a.icebergType,this.icebergCode=a.icebergCode,this.details=a.details,this.isCommitStateUnknown=a.icebergType==="CommitStateUnknownException"||[500,502,504].includes(a.status)&&a.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function K0(l,a,r){const s=new URL(a,l);if(r)for(const[c,h]of Object.entries(r))h!==void 0&&s.searchParams.set(c,h);return s.toString()}async function Y0(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 Q0(l){const a=l.fetchImpl??globalThis.fetch;return{async request({method:r,path:s,query:c,body:h,headers:f}){const m=K0(l.baseUrl,s,c),g=await Y0(l.auth),v=await a(m,{method:r,headers:{...h?{"Content-Type":"application/json"}:{},...g,...f},body:h?JSON.stringify(h):void 0}),S=await v.text(),T=(v.headers.get("content-type")||"").includes("application/json"),O=T&&S?JSON.parse(S):S;if(!v.ok){const N=T?O:void 0,D=N?.error;throw new Tl(D?.message??`Request failed with status ${v.status}`,{status:v.status,icebergType:D?.type,icebergCode:D?.code,details:N})}return{status:v.status,headers:v.headers,data:O}}}}function Zr(l){return l.join("�")}var J0=class{constructor(l,a=""){this.client=l,this.prefix=a}async listNamespaces(l){const a=l?{parent:Zr(l.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:a})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(l,a){const r={namespace:l.namespace,properties:a?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(l){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Zr(l.namespace)}`})}async loadNamespaceMetadata(l){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Zr(l.namespace)}`})).data.properties}}async namespaceExists(l){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Zr(l.namespace)}`}),!0}catch(a){if(a instanceof Tl&&a.status===404)return!1;throw a}}async createNamespaceIfNotExists(l,a){try{return await this.createNamespace(l,a)}catch(r){if(r instanceof Tl&&r.status===409)return;throw r}}};function di(l){return l.join("�")}var X0=class{constructor(l,a="",r){this.client=l,this.prefix=a,this.accessDelegation=r}async listTables(l){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables`})).data.identifiers}async createTable(l,a){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables`,body:a,headers:r})).data.metadata}async updateTable(l,a){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables/${l.name}`,body:a});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(l,a){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables/${l.name}`,query:{purgeRequested:String(a?.purge??!1)}})}async loadTable(l){const a={};return this.accessDelegation&&(a["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables/${l.name}`,headers:a})).data.metadata}async tableExists(l){const a={};this.accessDelegation&&(a["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${di(l.namespace)}/tables/${l.name}`,headers:a}),!0}catch(r){if(r instanceof Tl&&r.status===404)return!1;throw r}}async createTableIfNotExists(l,a){try{return await this.createTable(l,a)}catch(r){if(r instanceof Tl&&r.status===409)return await this.loadTable({namespace:l.namespace,name:a.name});throw r}}},Z0=class{constructor(l){let a="v1";l.catalogName&&(a+=`/${l.catalogName}`);const r=l.baseUrl.endsWith("/")?l.baseUrl:`${l.baseUrl}/`;this.client=Q0({baseUrl:r,auth:l.auth,fetchImpl:l.fetch}),this.accessDelegation=l.accessDelegation?.join(","),this.namespaceOps=new J0(this.client,a),this.tableOps=new X0(this.client,a,this.accessDelegation)}async listNamespaces(l){return this.namespaceOps.listNamespaces(l)}async createNamespace(l,a){return this.namespaceOps.createNamespace(l,a)}async dropNamespace(l){await this.namespaceOps.dropNamespace(l)}async loadNamespaceMetadata(l){return this.namespaceOps.loadNamespaceMetadata(l)}async listTables(l){return this.tableOps.listTables(l)}
171async createTable(l,a){return this.tableOps.createTable(l,a)}async updateTable(l,a){return this.tableOps.updateTable(l,a)}async dropTable(l,a){await this.tableOps.dropTable(l,a)}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,a){return this.namespaceOps.createNamespaceIfNotExists(l,a)}async createTableIfNotExists(l,a){return this.tableOps.createTableIfNotExists(l,a)}},ds=class extends Error{constructor(l){super(l),this.__isStorageError=!0,this.name="StorageError"}};function Le(l){return typeof l=="object"&&l!==null&&"__isStorageError"in l}var I0=class extends ds{constructor(l,a,r){super(l),this.name="StorageApiError",this.status=a,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},nc=class extends ds{constructor(l,a){super(l),this.name="StorageUnknownError",this.originalError=a}};const pc=l=>l?(...a)=>l(...a):(...a)=>fetch(...a),P0=()=>Response,ac=l=>{if(Array.isArray(l))return l.map(r=>ac(r));if(typeof l=="function"||l!==Object(l))return l;const a={};return Object.entries(l).forEach(([r,s])=>{const c=r.replace(/([-_][a-z])/gi,h=>h.toUpperCase().replace(/[-_]/g,""));a[c]=ac(s)}),a},W0=l=>{if(typeof l!="object"||l===null)return!1;const a=Object.getPrototypeOf(l);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in l)&&!(Symbol.iterator in l)},F0=l=>!l||typeof l!="string"||l.length===0||l.length>100||l.trim()!==l||l.includes("/")||l.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(l);function xl(l){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},xl(l)}function eb(l,a){if(xl(l)!="object"||!l)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,a);if(xl(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(l)}function tb(l){var a=eb(l,"string");return xl(a)=="symbol"?a:a+""}function nb(l,a,r){return(a=tb(a))in l?Object.defineProperty(l,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[a]=r,l}function Qm(l,a){var r=Object.keys(l);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(l);a&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),r.push.apply(r,s)}return r}function te(l){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?Qm(Object(r),!0).forEach(function(s){nb(l,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(r)):Qm(Object(r)).forEach(function(s){Object.defineProperty(l,s,Object.getOwnPropertyDescriptor(r,s))})}return l}const Ko=l=>{var a;return l.msg||l.message||l.error_description||(typeof l.error=="string"?l.error:(a=l.error)===null||a===void 0?void 0:a.message)||JSON.stringify(l)},ab=async(l,a,r)=>{l instanceof await P0()&&!r?.noResolveJson?l.json().then(s=>{const c=l.status||500,h=s?.statusCode||c+"";a(new I0(Ko(s),c,h))}).catch(s=>{a(new nc(Ko(s),s))}):a(new nc(Ko(l),l))},ib=(l,a,r,s)=>{const c={method:l,headers:a?.headers||{}};return l==="GET"||!s?c:(W0(s)?(c.headers=te({"Content-Type":"application/json"},a?.headers),c.body=JSON.stringify(s)):c.body=s,a?.duplex&&(c.duplex=a.duplex),te(te({},c),r))};async function Rl(l,a,r,s,c,h){return new Promise((f,m)=>{l(r,ib(a,s,c,h)).then(g=>{if(!g.ok)throw g;return s?.noResolveJson?g:g.json()}).then(g=>f(g)).catch(g=>ab(g,m,s))})}async function Al(l,a,r,s){return Rl(l,"GET",a,r,s)}async function Zt(l,a,r,s,c){return Rl(l,"POST",a,s,c,r)}async function ic(l,a,r,s,c){return Rl(l,"PUT",a,s,c,r)}async function lb(l,a,r,s){return Rl(l,"HEAD",a,te(te({},r),{},{noResolveJson:!0}),s)}async function vc(l,a,r,s,c){return Rl(l,"DELETE",a,s,c,r)}var rb=class{constructor(l,a){this.downloadFn=l,this.shouldThrowOnError=a}then(l,a){return this.execute().then(l,a)}async execute(){var l=this;try{return{data:(await l.downloadFn()).body,error:null}}catch(a){if(l.shouldThrowOnError)throw a;if(Le(a))return{data:null,error:a};throw a}}};let Ng;Ng=Symbol.toStringTag;var sb=class{constructor(l,a){this.downloadFn=l,this.shouldThrowOnError=a,this[Ng]="BlobDownloadBuilder",this.promise=null}asStream(){return new rb(this.downloadFn,this.shouldThrowOnError)}then(l,a){return this.getPromise().then(l,a)}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(a){if(l.shouldThrowOnError)throw a;if(Le(a))return{data:null,error:a};throw a}}};const ub={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Jm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var ob=class{constructor(l,a={},r,s){this.shouldThrowOnError=!1,this.url=l,this.headers=a,this.bucketId=r,this.fetch=pc(s)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(l,a,r,s){var c=this;try{let h;const f=te(te({},Jm),s);let m=te(te({},c.headers),l==="POST"&&{"x-upsert":String(f.upsert)});const g=f.metadata;typeof Blob<"u"&&r instanceof Blob?(h=new FormData,h.append("cacheControl",f.cacheControl),g&&h.append("metadata",c.encodeMetadata(g)),h.append("",r)):typeof FormData<"u"&&r instanceof FormData?(h=r,h.has("cacheControl")||h.append("cacheControl",f.cacheControl),g&&!h.has("metadata")&&h.append("metadata",c.encodeMetadata(g))):(h=r,m["cache-control"]=`max-age=${f.cac
171heControl}`,m["content-type"]=f.contentType,g&&(m["x-metadata"]=c.toBase64(c.encodeMetadata(g))),(typeof ReadableStream<"u"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!f.duplex&&(f.duplex="half")),s?.headers&&(m=te(te({},m),s.headers));const v=c._removeEmptyFolders(a),S=c._getFinalPath(v),T=await(l=="PUT"?ic:Zt)(c.fetch,`${c.url}/object/${S}`,h,te({headers:m},f?.duplex?{duplex:f.duplex}:{}));return{data:{path:v,id:T.Id,fullPath:T.Key},error:null}}catch(h){if(c.shouldThrowOnError)throw h;if(Le(h))return{data:null,error:h};throw h}}async upload(l,a,r){return this.uploadOrUpdate("POST",l,a,r)}async uploadToSignedUrl(l,a,r,s){var c=this;const h=c._removeEmptyFolders(l),f=c._getFinalPath(h),m=new URL(c.url+`/object/upload/sign/${f}`);m.searchParams.set("token",a);try{let g;const v=te({upsert:Jm.upsert},s),S=te(te({},c.headers),{"x-upsert":String(v.upsert)});return typeof Blob<"u"&&r instanceof Blob?(g=new FormData,g.append("cacheControl",v.cacheControl),g.append("",r)):typeof FormData<"u"&&r instanceof FormData?(g=r,g.append("cacheControl",v.cacheControl)):(g=r,S["cache-control"]=`max-age=${v.cacheControl}`,S["content-type"]=v.contentType),{data:{path:h,fullPath:(await ic(c.fetch,m.toString(),g,{headers:S})).Key},error:null}}catch(g){if(c.shouldThrowOnError)throw g;if(Le(g))return{data:null,error:g};throw g}}async createSignedUploadUrl(l,a){var r=this;try{let s=r._getFinalPath(l);const c=te({},r.headers);a?.upsert&&(c["x-upsert"]="true");const h=await Zt(r.fetch,`${r.url}/object/upload/sign/${s}`,{},{headers:c}),f=new URL(r.url+h.url),m=f.searchParams.get("token");if(!m)throw new ds("No token returned by API");return{data:{signedUrl:f.toString(),path:l,token:m},error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async update(l,a,r){return this.uploadOrUpdate("PUT",l,a,r)}async move(l,a,r){var s=this;try{return{data:await Zt(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:l,destinationKey:a,destinationBucket:r?.destinationBucket},{headers:s.headers}),error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}async copy(l,a,r){var s=this;try{return{data:{path:(await Zt(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:l,destinationKey:a,destinationBucket:r?.destinationBucket},{headers:s.headers})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}async createSignedUrl(l,a,r){var s=this;try{let c=s._getFinalPath(l),h=await Zt(s.fetch,`${s.url}/object/sign/${c}`,te({expiresIn:a},r?.transform?{transform:r.transform}:{}),{headers:s.headers});const f=r?.download?`&download=${r.download===!0?"":r.download}`:"";return h={signedUrl:encodeURI(`${s.url}${h.signedURL}${f}`)},{data:h,error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}async createSignedUrls(l,a,r){var s=this;try{const c=await Zt(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:a,paths:l},{headers:s.headers}),h=r?.download?`&download=${r.download===!0?"":r.download}`:"";return{data:c.map(f=>te(te({},f),{},{signedUrl:f.signedURL?encodeURI(`${s.url}${f.signedURL}${h}`):null})),error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}download(l,a){const r=typeof a?.transform<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString(a?.transform||{}),c=s?`?${s}`:"",h=this._getFinalPath(l),f=()=>Al(this.fetch,`${this.url}/${r}/${h}${c}`,{headers:this.headers,noResolveJson:!0});return new sb(f,this.shouldThrowOnError)}async info(l){var a=this;const r=a._getFinalPath(l);try{return{data:ac(await Al(a.fetch,`${a.url}/object/info/${r}`,{headers:a.headers})),error:null}}catch(s){if(a.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async exists(l){var a=this;const r=a._getFinalPath(l);try{return await lb(a.fetch,`${a.url}/object/${r}`,{headers:a.headers}),{data:!0,error:null}}catch(s){if(a.shouldThrowOnError)throw s;if(Le(s)&&s instanceof nc){const c=s.originalError;if([400,404].includes(c?.status))return{data:!1,error:s}}throw s}}getPublicUrl(l,a){const r=this._getFinalPath(l),s=[],c=a?.download?`download=${a.download===!0?"":a.download}`:"";c!==""&&s.push(c);const h=typeof a?.transform<"u"?"render/image":"object",f=this.transformOptsToQueryString(a?.transform||{});f!==""&&s.push(f);let m=s.join("&");return m!==""&&(m=`?${m}`),{data:{publicUrl:encodeURI(`${this.url}/${h}/public/${r}${m}`)}}}async remove(l){var a=this;try{return{data:await vc(a.fetch,`${a.url}/object/${a.bucketId}`,{prefixes:l},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async list(l,a,r){var s=this;try{const c=te(te(te({},ub),a),{},{prefix:l||""});return{data:await Zt(s.fetch,`${s.url}/object/list/${s.bucketId}`,c,{headers:s.headers},r),error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}async listV2(l,a){var r=this;try{const s=te({},l);return{data:await Zt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,s,{headers:r.headers},a),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}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 a=[];return l.width&&a.push(`width=${l.width}`),l.height&&a.push(`height=${l.height}`),l.resize&&a.push(`resize=${l.resize}`),l.format&&a.push(`format=${l.format}`),l.quality&&a.push(`quality=${l.quality}`),a.join("&")}};const Ug="2.89.0",kg={"X-Client-Info":`storage-js/${Ug}`};var cb=class{constructor(l,a={},r,s){this.shouldThrowOnError=!1;const c=new URL(l);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(c.hostname)&&!c.hostname.includes("storage.supabase.")&&(c.hostname=c.hostname.replace("supabase.","storage.supabase.")),this.url=c.href.replace(/\/$/,""),this.headers=te(te({},kg),a),this.fetch=pc(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(l){var a=this;try{const r=a.listBucketOptionsToQueryString(l);return{data:await Al(a.fetch,`${a.url}/bucket${r}`,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async getBucket(l){var a=this;try{return{data:await Al(a.fetch,`${a.url}/bucket/${l}`,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async createBucket(l,a={public:!1}){var r=this;try{return{data:await Zt(r.fetch,`${r.url}/bucket`,{id:l,name:l,type:a.type,public:a.public,file_size_limit:a.fileSizeLimit,allowed_mime_types:a.allowedMimeTypes},{headers:r.headers}),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async updateBucket(l,a){var r=this;try{return{data:await ic(r.fetch,`${r.url}/bucket/${l}`,{id:l,name:l,public:a.public,file_size_limit:a.fileSizeLimit,allowed_mime_types:a.allowedMimeTypes},{headers:r.headers}),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async emptyBucket(l){var a=this;try{return{data:await Zt(a.fetch,`${a.url}/bucket/${l}/empty`,{},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async deleteBucket(l){var a=this;try{return{data:await vc(a.fetch,`${a.url}/bucket/${l}`,{},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(l){const a={};return l&&("limit"in l&&(a.limit=String(l.limit)),"offset"in l&&(a.offset=String(l.offset)),l.search&&(a.search=l.search),l.sortColumn&&(a.sortColumn=l.sortColumn),l.sortOrder&&(a.sortOrder=l.sortOrder)),Object.keys(a).length>0?"?"+new URLSearchParams(a).toString():""}},hb=class{constructor(l,a={},r){this.shouldThrowOnError=!1,this.url=l.replace(/\/$/,""),this.headers=te(te({},kg),a),this.fetch=pc(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(l){var a=this;try{return{data:await Zt(a.fetch,`${a.url}/bucket`,{name:l},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async listBuckets(l){var a=this;
171try{const r=new URLSearchParams;l?.limit!==void 0&&r.set("limit",l.limit.toString()),l?.offset!==void 0&&r.set("offset",l.offset.toString()),l?.sortColumn&&r.set("sortColumn",l.sortColumn),l?.sortOrder&&r.set("sortOrder",l.sortOrder),l?.search&&r.set("search",l.search);const s=r.toString(),c=s?`${a.url}/bucket?${s}`:`${a.url}/bucket`;return{data:await Al(a.fetch,c,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async deleteBucket(l){var a=this;try{return{data:await vc(a.fetch,`${a.url}/bucket/${l}`,{},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}from(l){var a=this;if(!F0(l))throw new ds("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 r=new Z0({baseUrl:this.url,catalogName:l,auth:{type:"custom",getHeaders:async()=>a.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(r,{get(c,h){const f=c[h];return typeof f!="function"?f:async(...m)=>{try{return{data:await f.apply(c,m),error:null}}catch(g){if(s)throw g;return{data:null,error:g}}}}})}};const yc={"X-Client-Info":`storage-js/${Ug}`,"Content-Type":"application/json"};var Dg=class extends Error{constructor(l){super(l),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Nt(l){return typeof l=="object"&&l!==null&&"__isStorageVectorsError"in l}var Yo=class extends Dg{constructor(l,a,r){super(l),this.name="StorageVectorsApiError",this.status=a,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},db=class extends Dg{constructor(l,a){super(l),this.name="StorageVectorsUnknownError",this.originalError=a}};const bc=l=>l?(...a)=>l(...a):(...a)=>fetch(...a),fb=l=>{if(typeof l!="object"||l===null)return!1;const a=Object.getPrototypeOf(l);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in l)&&!(Symbol.iterator in l)},Xm=l=>l.msg||l.message||l.error_description||l.error||JSON.stringify(l),mb=async(l,a,r)=>{if(l&&typeof l=="object"&&"status"in l&&"ok"in l&&typeof l.status=="number"&&!r?.noResolveJson){const s=l.status||500,c=l;if(typeof c.json=="function")c.json().then(h=>{const f=h?.statusCode||h?.code||s+"";a(new Yo(Xm(h),s,f))}).catch(()=>{const h=s+"";a(new Yo(c.statusText||`HTTP ${s} error`,s,h))});else{const h=s+"";a(new Yo(c.statusText||`HTTP ${s} error`,s,h))}}else a(new db(Xm(l),l))},gb=(l,a,r,s)=>{const c={method:l,headers:a?.headers||{}};return s?(fb(s)?(c.headers=te({"Content-Type":"application/json"},a?.headers),c.body=JSON.stringify(s)):c.body=s,te(te({},c),r)):c};async function pb(l,a,r,s,c,h){return new Promise((f,m)=>{l(r,gb(a,s,c,h)).then(g=>{if(!g.ok)throw g;if(s?.noResolveJson)return g;const v=g.headers.get("content-type");return!v||!v.includes("application/json")?{}:g.json()}).then(g=>f(g)).catch(g=>mb(g,m,s))})}async function Ut(l,a,r,s,c){return pb(l,"POST",a,s,c,r)}var vb=class{constructor(l,a={},r){this.shouldThrowOnError=!1,this.url=l.replace(/\/$/,""),this.headers=te(te({},yc),a),this.fetch=bc(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/CreateIndex`,l,{headers:a.headers})||{},error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async getIndex(l,a){var r=this;try{return{data:await Ut(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:l,indexName:a},{headers:r.headers}),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Nt(s))return{data:null,error:s};throw s}}async listIndexes(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/ListIndexes`,l,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async deleteIndex(l,a){var r=this;try{return{data:await Ut(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:l,indexName:a},{headers:r.headers})||{},error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Nt(s))return{data:null,error:s};throw s}}},yb=class{constructor(l,a={},r){this.shouldThrowOnError=!1,this.url=l.replace(/\/$/,""),this.headers=te(te({},yc),a),this.fetch=bc(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(l){var a=this;try{if(l.vectors.length<1||l.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Ut(a.fetch,`${a.url}/PutVectors`,l,{headers:a.headers})||{},error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async getVectors(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/GetVectors`,l,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async listVectors(l){var a=this;try{if(l.segmentCount!==void 0){if(l.segmentCount<1||l.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
171if(l.segmentIndex!==void 0&&(l.segmentIndex<0||l.segmentIndex>=l.segmentCount))throw new Error(`segmentIndex must be between 0 and ${l.segmentCount-1}`)}return{data:await Ut(a.fetch,`${a.url}/ListVectors`,l,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async queryVectors(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/QueryVectors`,l,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async deleteVectors(l){var a=this;try{if(l.keys.length<1||l.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Ut(a.fetch,`${a.url}/DeleteVectors`,l,{headers:a.headers})||{},error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}},bb=class{constructor(l,a={},r){this.shouldThrowOnError=!1,this.url=l.replace(/\/$/,""),this.headers=te(te({},yc),a),this.fetch=bc(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/CreateVectorBucket`,{vectorBucketName:l},{headers:a.headers})||{},error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async getBucket(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/GetVectorBucket`,{vectorBucketName:l},{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async listBuckets(l={}){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/ListVectorBuckets`,l,{headers:a.headers}),error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}async deleteBucket(l){var a=this;try{return{data:await Ut(a.fetch,`${a.url}/DeleteVectorBucket`,{vectorBucketName:l},{headers:a.headers})||{},error:null}}catch(r){if(a.shouldThrowOnError)throw r;if(Nt(r))return{data:null,error:r};throw r}}},_b=class extends bb{constructor(l,a={}){super(l,a.headers||{},a.fetch)}from(l){return new wb(this.url,this.headers,l,this.fetch)}async createBucket(l){var a=()=>super.createBucket,r=this;return a().call(r,l)}async getBucket(l){var a=()=>super.getBucket,r=this;return a().call(r,l)}async listBuckets(l={}){var a=()=>super.listBuckets,r=this;return a().call(r,l)}async deleteBucket(l){var a=()=>super.deleteBucket,r=this;return a().call(r,l)}},wb=class extends vb{constructor(l,a,r,s){super(l,a,s),this.vectorBucketName=r}async createIndex(l){var a=()=>super.createIndex,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(l={}){var a=()=>super.listIndexes,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(l){var a=()=>super.getIndex,r=this;return a().call(r,r.vectorBucketName,l)}async deleteIndex(l){var a=()=>super.deleteIndex,r=this;return a().call(r,r.vectorBucketName,l)}index(l){return new Sb(this.url,this.headers,this.vectorBucketName,l,this.fetch)}},Sb=class extends yb{constructor(l,a,r,s,c){super(l,a,c),this.vectorBucketName=r,this.indexName=s}async putVectors(l){var a=()=>super.putVectors,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(l){var a=()=>super.getVectors,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(l={}){var a=()=>super.listVectors,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(l){var a=()=>super.queryVectors,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(l){var a=()=>super.deleteVectors,r=this;return a().call(r,te(te({},l),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Eb=class extends cb{constructor(l,a={},r,s){super(l,a,r,s)}from(l){return new ob(this.url,this.headers,l,this.fetch)}get vectors(){return new _b(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new hb(this.url+"/iceberg",this.headers,this.fetch)}};const zg="2.89.0",yi=30*1e3,lc=3,Qo=lc*yi,Tb="http://localhost:9999",xb="supabase.auth.token",Ab={"X-Client-Info":`gotrue-js/${zg}`},rc="X-Supabase-Api-Version",Mg={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Ob=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Rb=600*1e3;
171class Ei extends Error{constructor(a,r,s){super(a),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=s}}function Z(l){return typeof l=="object"&&l!==null&&"__isAuthError"in l}class Lg extends Ei{constructor(a,r,s){super(a,r,s),this.name="AuthApiError",this.status=r,this.code=s}}function Bg(l){return Z(l)&&l.name==="AuthApiError"}class Pn extends Ei{constructor(a,r){super(a),this.name="AuthUnknownError",this.originalError=r}}class an extends Ei{constructor(a,r,s,c){super(a,s,c),this.name=r,this.status=s}}class bt extends an{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function qg(l){return Z(l)&&l.name==="AuthSessionMissingError"}class wa extends an{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class _l extends an{constructor(a){super(a,"AuthInvalidCredentialsError",400,void 0)}}class wl extends an{constructor(a,r=null){super(a,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Hg(l){return Z(l)&&l.name==="AuthImplicitGrantRedirectError"}class sc extends an{constructor(a,r=null){super(a,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class $g extends an{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 as extends an{constructor(a,r){super(a,"AuthRetryableFetchError",r,void 0)}}function es(l){return Z(l)&&l.name==="AuthRetryableFetchError"}class uc extends an{constructor(a,r,s){super(a,"AuthWeakPasswordError",r,"weak_password"),this.reasons=s}}class is extends an{constructor(a){super(a,"AuthInvalidJwtError",400,"invalid_jwt")}}const ls="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Zm=` 	
172\r=`.split(""),jb=(()=>{const l=new Array(128);for(let a=0;a<l.length;a+=1)l[a]=-1;for(let a=0;a<Zm.length;
172a+=1)l[Zm[a].charCodeAt(0)]=-2;for(let a=0;a<ls.length;a+=1)l[ls[a].charCodeAt(0)]=a;return l})();function Im(l,a,r){if(l!==null)for(a.queue=a.queue<<8|l,a.queuedBits+=8;a.queuedBits>=6;){const s=a.queue>>a.queuedBits-6&63;r(ls[s]),a.queuedBits-=6}else if(a.queuedBits>0)for(a.queue=a.queue<<6-a.queuedBits,a.queuedBits=6;a.queuedBits>=6;){const s=a.queue>>a.queuedBits-6&63;r(ls[s]),a.queuedBits-=6}}function Gg(l,a,r){const s=jb[l];if(s>-1)for(a.queue=a.queue<<6|s,a.queuedBits+=6;a.queuedBits>=8;)r(a.queue>>a.queuedBits-8&255),a.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(l)}"`)}}function Pm(l){const a=[],r=f=>{a.push(String.fromCodePoint(f))},s={utf8seq:0,codepoint:0},c={queue:0,queuedBits:0},h=f=>{Ub(f,s,r)};for(let f=0;f<l.length;f+=1)Gg(l.charCodeAt(f),c,h);return a.join("")}function Cb(l,a){if(l<=127){a(l);return}else if(l<=2047){a(192|l>>6),a(128|l&63);return}else if(l<=65535){a(224|l>>12),a(128|l>>6&63),a(128|l&63);return}else if(l<=1114111){a(240|l>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|l&63);return}throw new Error(`Unrecognized Unicode codepoint: ${l.toString(16)}`)}function Nb(l,a){for(let r=0;r<l.length;r+=1){let s=l.charCodeAt(r);if(s>55295&&s<=56319){const c=(s-55296)*1024&65535;s=(l.charCodeAt(r+1)-56320&65535|c)+65536,r+=1}Cb(s,a)}}function Ub(l,a,r){if(a.utf8seq===0){if(l<=127){r(l);return}for(let s=1;s<6;s+=1)if((l>>7-s&1)===0){a.utf8seq=s;break}if(a.utf8seq===2)a.codepoint=l&31;else if(a.utf8seq===3)a.codepoint=l&15;else if(a.utf8seq===4)a.codepoint=l&7;else throw new Error("Invalid UTF-8 sequence");a.utf8seq-=1}else if(a.utf8seq>0){if(l<=127)throw new Error("Invalid UTF-8 sequence");a.codepoint=a.codepoint<<6|l&63,a.utf8seq-=1,a.utf8seq===0&&r(a.codepoint)}}function Si(l){const a=[],r={queue:0,queuedBits:0},s=c=>{a.push(c)};for(let c=0;c<l.length;c+=1)Gg(l.charCodeAt(c),r,s);return new Uint8Array(a)}function kb(l){const a=[];return Nb(l,r=>a.push(r)),new Uint8Array(a)}function Aa(l){const a=[],r={queue:0,queuedBits:0},s=c=>{a.push(c)};return l.forEach(c=>Im(c,r,s)),Im(null,r,s),a.join("")}function Db(l){return Math.round(Date.now()/1e3)+l}function zb(){return Symbol("auth-callback")}const rt=()=>typeof window<"u"&&typeof document<"u",ba={tested:!1,writable:!1},Vg=()=>{if(!rt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ba.tested)return ba.writable;const l=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(l,l),globalThis.localStorage.removeItem(l),ba.tested=!0,ba.writable=!0}catch{ba.tested=!0,ba.writable=!1}return ba.writable};function Mb(l){const a={},r=new URL(l);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((c,h)=>{a[h]=c})}catch{}return r.searchParams.forEach((s,c)=>{a[c]=s}),a}const Kg=l=>l?(...a)=>l(...a):(...a)=>fetch(...a),Lb=l=>typeof l=="object"&&l!==null&&"status"in l&&"ok"in l&&"json"in l&&typeof l.json=="function",bi=async(l,a,r)=>{await l.setItem(a,JSON.stringify(r))},_a=async(l,a)=>{const r=await l.getItem(a);if(!r)return null;try{return JSON.parse(r)}catch{return r}},lt=async(l,a)=>{await l.removeItem(a)};class fs{constructor(){this.promise=new fs.promiseConstructor((a,r)=>{this.resolve=a,this.reject=r})}}fs.promiseConstructor=Promise;function Jo(l){const a=l.split(".");if(a.length!==3)throw new is("Invalid JWT structure");for(let s=0;s<a.length;s++)if(!Ob.test(a[s]))throw new is("JWT not in base64url format");return{header:JSON.parse(Pm(a[0])),payload:JSON.parse(Pm(a[1])),signature:Si(a[2]),raw:{header:a[0],payload:a[1]}}}async function Bb(l){return await new Promise(a=>{setTimeout(()=>a(null),l)})}function qb(l,a){return new Promise((s,c)=>{(async()=>{for(let h=0;h<1/0;h++)try{const f=await l(h);if(!a(h,null,f)){s(f);return}}catch(f){if(!a(h,f)){c(f);return}}})()})}function Hb(l){return("0"+l.toString(16)).substr(-2)}function $b(){const a=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=r.length;let c="";for(let h=0;h<56;h++)c+=r.charAt(Math.floor(Math.random()*s));return c}return crypto.getRandomValues(a),Array.from(a,Hb).join("")}async function Gb(l){const r=new TextEncoder().encode(l),s=await crypto.subtle.digest("SHA-256",r),c=new Uint8Array(s);return Array.from(c).map(h=>String.fromCharCode(h)).join("")}async function Vb(l){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code 
172challenge method will default to use plain instead of sha256."),l;const r=await Gb(l);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function fi(l,a,r=!1){const s=$b();let c=s;r&&(c+="/PASSWORD_RECOVERY"),await bi(l,`${a}-code-verifier`,c);const h=await Vb(s);return[h,s===h?"plain":"s256"]}const Kb=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Yb(l){const a=l.headers.get(rc);if(!a||!a.match(Kb))return null;try{return new Date(`${a}T00:00:00.0Z`)}catch{return null}}function Qb(l){if(!l)throw new Error("Missing exp claim");const a=Math.floor(Date.now()/1e3);if(l<=a)throw new Error("JWT has expired")}function Jb(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 Xb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function mi(l){if(!Xb.test(l))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Xo(){const l={};return new Proxy(l,{get:(a,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(a,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(a,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Zb(l,a){return new Proxy(l,{get:(r,s,c)=>{if(s==="__isInsecureUserWarningProxy")return!0;if(typeof s=="symbol"){const h=s.toString();if(h==="Symbol(Symbol.toPrimitive)"||h==="Symbol(Symbol.toStringTag)"||h==="Symbol(util.inspect.custom)"||h==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,s,c)}return!a.value&&typeof s=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),a.value=!0),Reflect.get(r,s,c)}})}function Wm(l){return JSON.parse(JSON.stringify(l))}const Sa=l=>l.msg||l.message||l.error_description||l.error||JSON.stringify(l),Ib=[502,503,504];async function Fm(l){var a;if(!Lb(l))throw new as(Sa(l),0);if(Ib.includes(l.status))throw new as(Sa(l),l.status);let r;try{r=await l.json()}catch(h){throw new Pn(Sa(h),h)}let s;const c=Yb(l);if(c&&c.getTime()>=Mg["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?s=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(s=r.error_code),s){if(s==="weak_password")throw new uc(Sa(r),l.status,((a=r.weak_password)===null||a===void 0?void 0:a.reasons)||[]);if(s==="session_not_found")throw new bt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((h,f)=>h&&typeof f=="string",!0))throw new uc(Sa(r),l.status,r.weak_password.reasons);throw new Lg(Sa(r),l.status||500,s)}const Pb=(l,a,r,s)=>{const c={method:l,headers:a?.headers||{}};return l==="GET"?c:(c.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},a?.headers),c.body=JSON.stringify(s),Object.assign(Object.assign({},c),r))};async function ee(l,a,r,s){var c;const h=Object.assign({},s?.headers);h[rc]||(h[rc]=Mg["2024-01-01"].name),s?.jwt&&(h.Authorization=`Bearer ${s.jwt}`);const f=(c=s?.query)!==null&&c!==void 0?c:{};s?.redirectTo&&(f.redirect_to=s.redirectTo);const m=Object.keys(f).length?"?"+new URLSearchParams(f).toString():"",g=await Wb(l,a,r+m,{headers:h,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(g):{data:Object.assign({},g),error:null}}async function Wb(l,a,r,s,c,h){const f=Pb(a,s,c,h);let m;try{m=await l(r,Object.assign({},f))}catch(g){throw console.error(g),new as(Sa(g),0)}if(m.ok||await Fm(m),s?.noResolveJson)return m;try{return await m.json()}catch(g){await Fm(g)}}function Xt(l){var a;let r=null;t_(l)&&(r=Object.assign({},l),l.expires_at||(r.expires_at=Db(l.expires_in)));const s=(a=l.user)!==null&&a!==void 0?a:l;return{data:{session:r,user:s},error:null}}function eg(l){const a=Xt(l);return!a.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((r,s)=>r&&typeof s=="string",!0)&&(a.data.weak_password=l.weak_password),a}function Wn(l){var a;return{data:{user:(a=l.user)!==null&&a!==void 0?a:l},error:null}}function Fb(l){return{data:l,error:null}}function e_(l){const{action_link:a,email_otp:r,hashed_token:s,redirect_to:c,verification_type:h}=l,f=cs(l,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),m={action_link:a,email_otp:r,hashed_token:s,redirect_to:c,verification_type:h},g=Object.assign({},f);return{data:{properties:m,user:g},error:null}}function tg(l){return l}function t_(l){return l.access_token&&l.refresh_token&&l.expires_in}const ts=["global","local","others"];class Yg{constructor({url:a="",headers:r={},fetch:s}){this.url=a,this.headers=r,this.fetch=Kg(s),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)}}
172async signOut(a,r=ts[0]){if(ts.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ts.join(", ")}`);try{return await ee(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:a,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async inviteUserByEmail(a,r={}){try{return await ee(this.fetch,"POST",`${this.url}/invite`,{body:{email:a,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Wn})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async generateLink(a){try{const{options:r}=a,s=cs(a,["options"]),c=Object.assign(Object.assign({},s),r);return"newEmail"in s&&(c.new_email=s?.newEmail,delete c.newEmail),await ee(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:c,headers:this.headers,xform:e_,redirectTo:r?.redirectTo})}catch(r){if(Z(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(a){try{return await ee(this.fetch,"POST",`${this.url}/admin/users`,{body:a,headers:this.headers,xform:Wn})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async listUsers(a){var r,s,c,h,f,m,g;try{const v={nextPage:null,lastPage:0,total:0},S=await ee(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=a?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(h=(c=a?.perPage)===null||c===void 0?void 0:c.toString())!==null&&h!==void 0?h:""},xform:tg});if(S.error)throw S.error;const T=await S.json(),O=(f=S.headers.get("x-total-count"))!==null&&f!==void 0?f:0,N=(g=(m=S.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&g!==void 0?g:[];return N.length>0&&(N.forEach(D=>{const B=parseInt(D.split(";")[0].split("=")[1].substring(0,1)),$=JSON.parse(D.split(";")[1].split("=")[1]);v[`${$}Page`]=B}),v.total=parseInt(O)),{data:Object.assign(Object.assign({},T),v),error:null}}catch(v){if(Z(v))return{data:{users:[]},error:v};throw v}}async getUserById(a){mi(a);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${a}`,{headers:this.headers,xform:Wn})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async updateUserById(a,r){mi(a);try{return await ee(this.fetch,"PUT",`${this.url}/admin/users/${a}`,{body:r,headers:this.headers,xform:Wn})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async deleteUser(a,r=!1){mi(a);try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${a}`,{headers:this.headers,body:{should_soft_delete:r},xform:Wn})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async _listFactors(a){mi(a.userId);try{const{data:r,error:s}=await ee(this.fetch,"GET",`${this.url}/admin/users/${a.userId}/factors`,{headers:this.headers,xform:c=>({data:{factors:c},error:null})});return{data:r,error:s}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _deleteFactor(a){mi(a.userId),mi(a.id);try{return{data:await ee(this.fetch,"DELETE",`${this.url}/admin/users/${a.userId}/factors/${a.id}`,{headers:this.headers}),error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _listOAuthClients(a){var r,s,c,h,f,m,g;try{const v={nextPage:null,lastPage:0,total:0},S=await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=a?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(h=(c=a?.perPage)===null||c===void 0?void 0:c.toString())!==null&&h!==void 0?h:""},xform:tg});if(S.error)throw S.error;const T=await S.json(),O=(f=S.headers.get("x-total-count"))!==null&&f!==void 0?f:0,N=(g=(m=S.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&g!==void 0?g:[];return N.length>0&&(N.forEach(D=>{const B=parseInt(D.split(";")[0].split("=")[1].substring(0,1)),$=JSON.parse(D.split(";")[1].split("=")[1]);v[`${$}Page`]=B}),v.total=parseInt(O)),{data:Object.assign(Object.assign({},T),v),error:null}}catch(v){if(Z(v))return{data:{clients:[]},error:v};throw v}}async _createOAuthClient(a){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:a,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _getOAuthClient(a){try{return await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients/${a}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _updateOAuthClient(a,r){try{return await ee(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${a}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(a){try{return await ee(this.fetch,"DELET
172E",`${this.url}/admin/oauth/clients/${a}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(a){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients/${a}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}}function ng(l={}){return{getItem:a=>l[a]||null,setItem:(a,r)=>{l[a]=r},removeItem:a=>{delete l[a]}}}const Ea={debug:!!(globalThis&&Vg()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Qg extends Error{constructor(a){super(a),this.isAcquireTimeout=!0}}class Jg extends Qg{}async function Xg(l,a,r){Ea.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",l,a);const s=new globalThis.AbortController;return a>0&&setTimeout(()=>{s.abort(),Ea.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",l)},a),await Promise.resolve().then(()=>globalThis.navigator.locks.request(l,a===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async c=>{if(c){Ea.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",l,c.name);try{return await r()}finally{Ea.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",l,c.name)}}else{if(a===0)throw Ea.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",l),new Jg(`Acquiring an exclusive Navigator LockManager lock "${l}" immediately failed`);if(Ea.debug)try{const h=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(h,null,"  "))}catch(h){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",h)}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 r()}}))}function n_(){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 Zg(l){if(!/^0x[a-fA-F0-9]{40}$/.test(l))throw new Error(`@supabase/auth-js: Address "${l}" is invalid.`);return l.toLowerCase()}function a_(l){return parseInt(l,16)}function i_(l){const a=new TextEncoder().encode(l);return"0x"+Array.from(a,s=>s.toString(16).padStart(2,"0")).join("")}function l_(l){var a;const{chainId:r,domain:s,expirationTime:c,issuedAt:h=new Date,nonce:f,notBefore:m,requestId:g,resources:v,scheme:S,uri:T,version:O}=l;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(f&&f.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${f}`);if(!T)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(O!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${O}`);if(!((a=l.statement)===null||a===void 0)&&a.includes(`
173`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${l.statement}`)}const N=Zg(l.address),D=S?`${S}://${s}`:s,B=l.statement?`${l.statement}
174`:"",$=`${D} wants you to sign in with your Ethereum account:
175${N}
176
177${B}`;let V=`URI: ${T}
178Version: ${O}
179Chain ID: ${r}${f?`
180Nonce: ${f}`:""}
181Issued At: ${h.toISOString()}`;if(c&&(V+=`
182Expiration Time: ${c.toISOString()}`),m&&(V+=`
183Not Before: ${m.toISOString()}`),g&&(V+=`
184Request ID: ${g}`),v){let K=`
185Resources:`;for(const H of v){if(!H||typeof H!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${H}`);K+=`
186- ${H}`}V+=K}return`${$}
187${V}`}
187class Ze extends Error{constructor({message:a,code:r,cause:s,name:c}){var h;super(a,{cause:s}),this.__isWebAuthnError=!0,this.name=(h=c??(s instanceof Error?s.name:void 0))!==null&&h!==void 0?h:"Unknown Error",this.code=r}}class rs extends Ze{constructor(a,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:a}),this.name="WebAuthnUnknownError",this.originalError=r}}function r_({error:l,options:a}){var r,s,c;const{publicKey:h}=a;if(!h)throw Error("options was missing required publicKey property");if(l.name==="AbortError"){if(a.signal instanceof AbortSignal)return new Ze({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:l})}else if(l.name==="ConstraintError"){if(((r=h.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ze({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:l});if(a.mediation==="conditional"&&((s=h.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ze({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=h.authenticatorSelection)===null||c===void 0?void 0:c.userVerification)==="required")return new Ze({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 Ze({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:l});if(l.name==="NotAllowedError")return new Ze({message:l.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l});if(l.name==="NotSupportedError")return h.pubKeyCredParams.filter(m=>m.type==="public-key").length===0?new Ze({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:l}):new Ze({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 f=window.location.hostname;if(Ig(f)){if(h.rp.id!==f)return new Ze({message:`The RP ID "${h.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:l})}else return new Ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:l})}else if(l.name==="TypeError"){if(h.user.id.byteLength<1||h.user.id.byteLength>64)return new Ze({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 Ze({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 Ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l})}function s_({error:l,options:a}){const{publicKey:r}=a;if(!r)throw Error("options was missing required publicKey property");if(l.name==="AbortError"){if(a.signal instanceof AbortSignal)return new Ze({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:l})}else{if(l.name==="NotAllowedError")return new Ze({message:l.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l});if(l.name==="SecurityError"){const s=window.location.hostname;if(Ig(s)){if(r.rpId!==s)return new Ze({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:l})}else return new Ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:l})}else if(l.name==="UnknownError")return new Ze({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 Ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:l})}class u_{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const a=new AbortController;return this.controller=a,a.signal}cancelCeremony(){if(this.controller){const a=new Error("Manually cancelling existing WebAuthn API call");a.name="AbortError",this.controller.abort(a),this.controller=void 0}}}const o_=new u_;function c_(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:a,user:r,excludeCredentials:s}=l,c=cs(l,["challenge","user","excludeCredentials"]),h=Si(a).buffer,f=Object.assign(Object.assign({},r),{id:Si(r.id).buffer}),m=Object.assign(Object.assign({},c),{challenge:h,user:f});if(s&&s.length>0){m.excludeCredentials=new Array(s.length);for(let g=0;g<s.length;g++){const v=s[g];m.excludeCredentials[g]=Object.assign(Object.assign({},v),{id:Si(v.id).buffer,type:v.type||"public-key",transports:v.transports})}}return m}function h_(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:a,allowCredentials:r}=l,s=cs(l,["challenge","allowCredentials"]),c=Si(a).buffer,h=Object.assign(Object.assign({}
187,s),{challenge:c});if(r&&r.length>0){h.allowCredentials=new Array(r.length);for(let f=0;f<r.length;f++){const m=r[f];h.allowCredentials[f]=Object.assign(Object.assign({},m),{id:Si(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return h}function d_(l){var a;if("toJSON"in l&&typeof l.toJSON=="function")return l.toJSON();const r=l;return{id:l.id,rawId:l.id,response:{attestationObject:Aa(new Uint8Array(l.response.attestationObject)),clientDataJSON:Aa(new Uint8Array(l.response.clientDataJSON))},type:"public-key",clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:(a=r.authenticatorAttachment)!==null&&a!==void 0?a:void 0}}function f_(l){var a;if("toJSON"in l&&typeof l.toJSON=="function")return l.toJSON();const r=l,s=l.getClientExtensionResults(),c=l.response;return{id:l.id,rawId:l.id,response:{authenticatorData:Aa(new Uint8Array(c.authenticatorData)),clientDataJSON:Aa(new Uint8Array(c.clientDataJSON)),signature:Aa(new Uint8Array(c.signature)),userHandle:c.userHandle?Aa(new Uint8Array(c.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(a=r.authenticatorAttachment)!==null&&a!==void 0?a:void 0}}function Ig(l){return l==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(l)}function ag(){var l,a;return!!(rt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((l=navigator?.credentials)===null||l===void 0?void 0:l.create)=="function"&&typeof((a=navigator?.credentials)===null||a===void 0?void 0:a.get)=="function")}async function m_(l){try{const a=await navigator.credentials.create(l);return a?a instanceof PublicKeyCredential?{data:a,error:null}:{data:null,error:new rs("Browser returned unexpected credential type",a)}:{data:null,error:new rs("Empty credential response",a)}}catch(a){return{data:null,error:r_({error:a,options:l})}}}async function g_(l){try{const a=await navigator.credentials.get(l);return a?a instanceof PublicKeyCredential?{data:a,error:null}:{data:null,error:new rs("Browser returned unexpected credential type",a)}:{data:null,error:new rs("Empty credential response",a)}}catch(a){return{data:null,error:s_({error:a,options:l})}}}const p_={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},v_={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function ss(...l){const a=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),r=c=>c instanceof ArrayBuffer||ArrayBuffer.isView(c),s={};for(const c of l)if(c)for(const h in c){const f=c[h];if(f!==void 0)if(Array.isArray(f))s[h]=f;else if(r(f))s[h]=f;else if(a(f)){const m=s[h];a(m)?s[h]=ss(m,f):s[h]=ss(f)}else s[h]=f}return s}function y_(l,a){return ss(p_,l,a||{})}function b_(l,a){return ss(v_,l,a||{})}class __{constructor(a){this.client=a,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(a){return this.client.mfa.enroll(Object.assign(Object.assign({},a),{factorType:"webauthn"}))}async _challenge({factorId:a,webauthn:r,friendlyName:s,signal:c},h){try{const{data:f,error:m}=await this.client.mfa.challenge({factorId:a,webauthn:r});if(!f)return{data:null,error:m};const g=c??o_.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:v}=f.webauthn.credential_options.publicKey;v.name||(v.name=`${v.id}:${s}
187`),v.displayName||(v.displayName=v.name)}switch(f.webauthn.type){case"create":{const v=y_(f.webauthn.credential_options.publicKey,h?.create),{data:S,error:T}=await m_({publicKey:v,signal:g});return S?{data:{factorId:a,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:S}},error:null}:{data:null,error:T}}case"request":{const v=b_(f.webauthn.credential_options.publicKey,h?.request),{data:S,error:T}=await g_(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:v,signal:g}));return S?{data:{factorId:a,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:S}},error:null}:{data:null,error:T}}}}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new Pn("Unexpected error in challenge",f)}}}async _verify({challengeId:a,factorId:r,webauthn:s}){return this.client.mfa.verify({factorId:r,challengeId:a,webauthn:s})}async _authenticate({factorId:a,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},h){if(!r)return{data:null,error:new Ei("rpId is required for WebAuthn authentication")};try{if(!ag())return{data:null,error:new Pn("Browser does not support WebAuthn",null)};const{data:f,error:m}=await this.challenge({factorId:a,webauthn:{rpId:r,rpOrigins:s},signal:c},{request:h});if(!f)return{data:null,error:m};const{webauthn:g}=f;return this._verify({factorId:a,challengeId:f.challengeId,webauthn:{type:g.type,rpId:r,rpOrigins:s,credential_response:g.credential_response}})}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new Pn("Unexpected error in authenticate",f)}}}async _register({friendlyName:a,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},h){if(!r)return{data:null,error:new Ei("rpId is required for WebAuthn registration")};try{if(!ag())return{data:null,error:new Pn("Browser does not support WebAuthn",null)};const{data:f,error:m}=await this._enroll({friendlyName:a});if(!f)return await this.client.mfa.listFactors().then(S=>{var T;return(T=S.data)===null||T===void 0?void 0:T.all.find(O=>O.factor_type==="webauthn"&&O.friendly_name===a&&O.status!=="unverified")}).then(S=>S?this.client.mfa.unenroll({factorId:S?.id}):void 0),{data:null,error:m};const{data:g,error:v}=await this._challenge({factorId:f.id,friendlyName:f.friendly_name,webauthn:{rpId:r,rpOrigins:s},signal:c},{create:h});return g?this._verify({factorId:f.id,challengeId:g.challengeId,webauthn:{rpId:r,rpOrigins:s,type:g.webauthn.type,credential_response:g.webauthn.credential_response}}):{data:null,error:v}}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new Pn("Unexpected error in register",f)}}}}n_();const w_={url:Tb,storageKey:xb,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Ab,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function ig(l,a,r){return await r()}const gi={};class Ti{get jwks(){var a,r;return(r=(a=gi[this.storageKey])===null||a===void 0?void 0:a.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(a){gi[this.storageKey]=Object.assign(Object.assign({},gi[this.storageKey]),{jwks:a})}get jwks_cached_at(){var a,r;return(r=(a=gi[this.storageKey])===null||a===void 0?void 0:a.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(a){gi[this.storageKey]=Object.assign(Object.assign({},gi[this.storageKey]),{cachedAt:a})}constructor(a){var r,s,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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 h=Object.assign(Object.assign({},w_),a);if(this.storageKey=h.storageKey,this.instanceID=(r=Ti.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ti.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!h.debug,typeof h.debug=="function"&&(this.logger=h.debug),this.instanceID>0&&rt()){const f=`${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(f),this.logDebugMessages&&console.trace(f)}if(this.persistSession=h.persistSession,this.autoRefreshToken=h.autoRefreshToken,this.admin=new Yg({url:h.url,headers:h.headers,fetch:h.fetch}),this.url=h.url,this.headers=h.headers,this.fetch=Kg(h.fetch),this.lock=h.lock||ig,this.detectSessionInUrl=h.detectSessionInUrl,this.flowType=h.flowType,this.hasCustomAuthorizationHeader=h.hasCustomAuthorizationHeader,this.throwOnError=h.throwOnError,h.lock?this.lock=h.lock:this.persistSession&&rt()&&(!((s=globalThis?.navigator)===null||s===void 0)&&s.locks)?this.lock=Xg:this.lock=ig,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 __(this)}
187,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?(h.storage?this.storage=h.storage:Vg()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ng(this.memoryStorage)),h.userStorage&&(this.userStorage=h.userStorage)):(this.memoryStorage={},this.storage=ng(this.memoryStorage)),rt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(f){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",f)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async f=>{this._debug("received broadcast notification from other tab or client",f),await this._notifyAllSubscribers(f.data.event,f.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(a){if(this.throwOnError&&a&&a.error)throw a.error;return a}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${zg}) ${new Date().toISOString()}`}_debug(...a){return this.logDebugMessages&&this.logger(this._logPrefix(),...a),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var a;try{let r={},s="none";if(rt()&&(r=Mb(window.location.href),this._isImplicitGrantCallback(r)?s="implicit":await this._isPKCECallback(r)&&(s="pkce")),rt()&&this.detectSessionInUrl&&s!=="none"){const{data:c,error:h}=await this._getSessionFromURL(r,s);if(h){if(this._debug("#_initialize()","error detecting session from URL",h),Hg(h)){const g=(a=h.details)===null||a===void 0?void 0:a.code;if(g==="identity_already_exists"||g==="identity_not_found"||g==="single_identity_not_deletable")return{error:h}}return await this._removeSession(),{error:h}}const{session:f,redirectType:m}=c;return this._debug("#_initialize()","detected session in URL",f,"redirect type",m),await this._saveSession(f),setTimeout(async()=>{m==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",f):await this._notifyAllSubscribers("SIGNED_IN",f)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Z(r)?this._returnResult({error:r}):this._returnResult({error:new Pn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(a){var r,s,c;try{const h=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(r=a?.options)===null||r===void 0?void 0:r.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(c=a?.options)===null||c===void 0?void 0:c.captchaToken}},xform:Xt}),{data:f,error:m}=h;if(m||!f)return this._returnResult({data:{user:null,session:null},error:m});const g=f.session,v=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",g)),this._returnResult({data:{user:v,session:g},error:null})}catch(h){if(Z(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async signUp(a){var r,s,c;try{let h;if("email"in a){const{email:S,password:T,options:O}=a;let N=null,D=null;this.flowType==="pkce"&&([N,D]=await fi(this.storage,this.storageKey)),h=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:O?.emailRedirectTo,body:{email:S,password:T,data:(r=O?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:O?.captchaToken},code_challenge:N,code_challenge_method:D},xform:Xt})}else if("phone"in a){const{phone:S,password:T,options:O}=a;h=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:S,password:T,data:(s=O?.data)!==null&&s!==void 0?s:{},channel:(c=O?.channel)!==null&&c!==void 0?c:"sms",gotrue_meta_security:{captcha_token:O?.captchaToken}},xform:Xt})}else throw new _l("You must provide either an email or phone number and a password");const{data:f,error:m}=h;if(m||!f)return await lt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:m});const g=f.session,v=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",g)),this._returnResult({data:{user:v,session:g},error:null})}catch(h){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async signInWithPassword(a){try{let r;if("email"in a){const{email:h,password:f,options:m}=a;r=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:h,password:f,gotrue_meta_security:{captcha_token:m?.captchaToken}},xform:eg})}else if("phone"in a){const{phone:h,password:f,options:m}=a;r=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:h,password:f,gotrue_meta_security:{captcha_token:m?.captchaToken}},xform:eg})}else throw new _l("You must provide either an email or phone number and a password");const{data:s,error:c}=r;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!s||!s.session||!s.user){const h=new wa;return this._returnResult({data:{user:null,session:null},error:h})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:c})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(a){var r,s,c,h;return await this._handleProviderSignIn(a.provider,{redirectTo:(r=a.options)===null||r===void 0?void 0:r.redirectTo,scopes:(s=a.options)===null||s===void 0?void 0:s.scopes,queryParams:(c=a.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:(h=a.options)===null||h===void 0?void 0:h.skipBrowserRedirect})}async exchangeCodeForSession(a){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(a))}async signInWithWeb3(a){const{chain:r}=a;switch(r){case"ethereum":return await this.signInWithEthereum(a);case"solana":return await this.signInWithSolana(a);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(a){var r,s,c,h,f,m,g,v,S,T,O;let N,D;if("message"in a)N=a.message,D=a.signature;else{const{chain:B,wallet:$,statement:V,options:K}=a;let H;if(rt())if(typeof $=="object")H=$;else{const Be=window;if("ethereum"in Be&&typeof Be.ethereum=="object"&&"request"in Be.ethereum&&typeof Be.ethereum.request=="function")H=Be.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 $!="object"||!K?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");H=$}const W=new URL((r=K?.url)!==null&&r!==void 0?r:window.location.href),_e=await H.request({method:"eth_requestAccounts"}).then(Be=>Be).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_e||_e.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const le=Zg(_e[0]);let I=(s=K?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!I){const Be=await H.request({method:"eth_chainId"});I=a_(Be)}const ne={domain:W.host,address:le,statement:V,uri:W.href,version:"1",chainId:I,nonce:(c=K?.signInWithEthereum)===null||c===void 0?void 0:c.nonce,issuedAt:(f=(h=K?.signInWithEthereum)===null||h===void 0?void 0:h.issuedAt)!==null&&f!==void 0?f:new Date,expirationTime:(m=K?.signInWithEthereum)===null||m===void 0?void 0:m.expirationTime,notBefore:(g=K?.signInWithEthereum)===null||g===void 0?void 0:g.notBefore,requestId:(v=K?.signInWithEthereum)===null||v===void 0?void 0:v.requestId,resources:(S=K?.signInWithEthereum)===null||S===void 0?void 0:S.resources};N=l_(ne),D=await H.request({method:"personal_sign",params:[i_(N),le]})}try{const{data:B,error:$}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:N,signature:D},!((T=a.options)===null||T===void 0)&&T.captchaToken?{gotrue_meta_security:{captcha_token:(O=a.options)===null||O===void 0?void 0:O.captchaToken}}:null),xform:Xt});if($)throw $;if(!B||!B.session||!B.user){const V=new wa;return this._returnResult({data:{user:null,session:null},error:V})}return B.session&&(await this._saveSession(B.session),await this._notifyAllSubscribers("SIGNED_IN",B.session)),this._returnResult({data:Object.assign({},B),error:$})}
187catch(B){if(Z(B))return this._returnResult({data:{user:null,session:null},error:B});throw B}}async signInWithSolana(a){var r,s,c,h,f,m,g,v,S,T,O,N;let D,B;if("message"in a)D=a.message,B=a.signature;else{const{chain:$,wallet:V,statement:K,options:H}=a;let W;if(rt())if(typeof V=="object")W=V;else{const le=window;if("solana"in le&&typeof le.solana=="object"&&("signIn"in le.solana&&typeof le.solana.signIn=="function"||"signMessage"in le.solana&&typeof le.solana.signMessage=="function"))W=le.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 V!="object"||!H?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");W=V}const _e=new URL((r=H?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in W&&W.signIn){const le=await W.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},H?.signInWithSolana),{version:"1",domain:_e.host,uri:_e.href}),K?{statement:K}:null));let I;if(Array.isArray(le)&&le[0]&&typeof le[0]=="object")I=le[0];else if(le&&typeof le=="object"&&"signedMessage"in le&&"signature"in le)I=le;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)D=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),B=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in W)||typeof W.signMessage!="function"||!("publicKey"in W)||typeof W!="object"||!W.publicKey||!("toBase58"in W.publicKey)||typeof W.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");D=[`${_e.host} wants you to sign in with your Solana account:`,W.publicKey.toBase58(),...K?["",K,""]:[""],"Version: 1",`URI: ${_e.href}`,`Issued At: ${(c=(s=H?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&c!==void 0?c:new Date().toISOString()}`,...!((h=H?.signInWithSolana)===null||h===void 0)&&h.notBefore?[`Not Before: ${H.signInWithSolana.notBefore}`]:[],...!((f=H?.signInWithSolana)===null||f===void 0)&&f.expirationTime?[`Expiration Time: ${H.signInWithSolana.expirationTime}`]:[],...!((m=H?.signInWithSolana)===null||m===void 0)&&m.chainId?[`Chain ID: ${H.signInWithSolana.chainId}`]:[],...!((g=H?.signInWithSolana)===null||g===void 0)&&g.nonce?[`Nonce: ${H.signInWithSolana.nonce}`]:[],...!((v=H?.signInWithSolana)===null||v===void 0)&&v.requestId?[`Request ID: ${H.signInWithSolana.requestId}`]:[],...!((T=(S=H?.signInWithSolana)===null||S===void 0?void 0:S.resources)===null||T===void 0)&&T.length?["Resources",...H.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(`
188`);const le=await W.signMessage(new TextEncoder().encode(D),"utf8");if(!le||!(le instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");B=le}}try{const{data:$,error:V}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:D,signature:Aa(B)},!((O=a.options)===null||O===void 0)&&O.captchaToken?{gotrue_meta_security:{captcha_token:(N=a.options)===null||N===void 0?void 0:N.captchaToken}}:null),xform:Xt});if(V)throw V;if(!$||!$.session||!$.user){const K=new wa;return this._returnResult({data:{user:null,session:null},error:K})}return $.session&&(await this._saveSession($.session),await this._notifyAllSubscribers("SIGNED_IN",$.session)),this._returnResult({data:Object.assign({},$),error:V})}catch($){if(Z($))return this._returnResult({data:{user:null,session:null},error:$});throw $}}async _exchangeCodeForSession(a){const r=await _a(this.storage,`${this.storageKey}-code-verifier`),[s,c]=(r??"").split("/");try{if(!s&&this.flowType==="pkce")throw new $g;const{data:h,error:f}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:a,code_verifier:s},xform:Xt});if(await lt(this.storage,`${this.storageKey}-code-verifier`),f)throw f;if(!h||!h.session||!h.user){const m=new wa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:m})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:Object.assign(Object.assign({},h),{redirectType:c??null}),error:f})}catch(h){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(h))return this._returnResult({data:{user:null,session:null,redirectType:null},error:h});throw h}}async signInWithIdToken(a){try{const{options:r,provider:s,token:c,access_token:h,nonce:f}=a,m=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:c,access_token:h,nonce:f,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:Xt}),{data:g,error:v}=m;if(v)return this._returnResult({data:{user:null,session:null},error:v});if(!g||!g.session||!g.user){const S=new wa;return this._returnResult({data:{user:null,session:null},error:S})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:g,error:v})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(a){var r,s,c,h,f;try{if("email"in a){const{email:m,options:g}=a;let v=null,S=null;this.flowType==="pkce"&&([v,S]=await fi(this.storage,this.storageKey));const{error:T}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:m,data:(r=g?.data)!==null&&r!==void 0?r:{},create_user:(s=g?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:g?.captchaToken},code_challenge:v,code_challenge_method:S},redirectTo:g?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:T})}if("phone"in a){const{phone:m,options:g}=a,{data:v,error:S}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:m,data:(c=g?.data)!==null&&c!==void 0?c:{},create_user:(h=g?.shouldCreateUser)!==null&&h!==void 0?h:!0,gotrue_meta_security:{captcha_token:g?.captchaToken},channel:(f=g?.channel)!==null&&f!==void 0?f:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:v?.message_id},error:S})}throw new _l("You must provide either an email or phone number.")}catch(m){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async verifyOtp(a){var r,s;try{let c,h;"options"in a&&(c=(r=a.options)===null||r===void 0?void 0:r.redirectTo,h=(s=a.options)===null||s===void 0?void 0:s.captchaToken);const{data:f,error:m}=await ee(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},a),{gotrue_meta_security:{captcha_token:h}}),redirectTo:c,xform:Xt});if(m)throw m;if(!f)throw new Error("An error occurred on token verification.");const g=f.session,v=f.user;return g?.access_token&&(await this._saveSession(g),await this._notifyAllSubscribers(a.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",g)),this._returnResult({data:{user:v,session:g},error:null})}catch(c){if(Z(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithSSO(a){var r,s,c,h,f;try{let m=null,g=null;this.flowType==="pkce"&&([m,g]=await fi(this.storage,this.storageKey));const v=await ee(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in a?{provider_id:a.providerId}:null),"domain"in a?{domain:a.domain}:null),{redirect_to:(s=(r=a.options)===null||r===void 0?void 0:r.redirectTo)!==null&&s!==void 0?s:void 0}),!((c=a?.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:a.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:m,code_challenge_method:g}),headers:this.headers,xform:Fb});return!((h=v.data)===null||h===void 0)&&h.url&&rt()&&!(!((f=a.options)===null||f===void 0)&&f.skipBrowserRedirect)&&window.location.assign(v.data.url),this._returnResult(v)}catch(m){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(m))return this._returnResult({data:null,error:m});throw m}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async a=>{const{data:{session:r},error:s}=a;if(s)throw s;if(!r)throw new bt;const{error:c}=await ee(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:c})})}catch(a){if(Z(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async resend(a){try{const r=`${this.url}/resend`;if("email"in a){const{email:s,type:c,options:h}=a,{error:f}=await ee(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},redirectTo:h?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}else if("phone"in a){const{phone:s,type:c,options:h}=a,{data:f,error:m}=await ee(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:c,gotrue_meta_security:{captcha_token:h?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:f?.message_id},error:m})}throw new _l("You must provide either an email or phone number and a type")}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(a,r){this._debug("#_acquireLock","begin",a);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),c=(async()=>(await s,await r()))();return this.pendingInLock.push((async()=>{try{await c}catch{}})()),c}return await this.lock(`lock:${this.storageKey}`,a,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=r();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const c=[...this.pendingInLock];await Promise.all(c),this.pendingInLock.splice(0,c.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(a){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await a(r)}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 a=null;const r=await _a(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?a=r:(this._debug("#getSession()","session from storage is not val
188id"),await this._removeSession())),!a)return{data:{session:null},error:null};const s=a.expires_at?a.expires_at*1e3-Date.now()<Qo:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",a.expires_at),!s){if(this.userStorage){const f=await _a(this.userStorage,this.storageKey+"-user");f?.user?a.user=f.user:a.user=Xo()}if(this.storage.isServer&&a.user&&!a.user.__isUserNotAvailableProxy){const f={value:this.suppressGetSessionWarning};a.user=Zb(a.user,f),f.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:a},error:null}}const{data:c,error:h}=await this._callRefreshToken(a.refresh_token);return h?this._returnResult({data:{session:null},error:h}):this._returnResult({data:{session:c},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(a){if(a)return await this._getUser(a);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(a){try{return a?await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:a,xform:Wn}):await this._useSession(async r=>{var s,c,h;const{data:f,error:m}=r;if(m)throw m;return!(!((s=f.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new bt}:await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(h=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&h!==void 0?h:void 0,xform:Wn})})}catch(r){if(Z(r))return qg(r)&&(await this._removeSession(),await lt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(a,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(a,r))}async _updateUser(a,r={}){try{return await this._useSession(async s=>{const{data:c,error:h}=s;if(h)throw h;if(!c.session)throw new bt;const f=c.session;let m=null,g=null;this.flowType==="pkce"&&a.email!=null&&([m,g]=await fi(this.storage,this.storageKey));const{data:v,error:S}=await ee(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},a),{code_challenge:m,code_challenge_method:g}),jwt:f.access_token,xform:Wn});if(S)throw S;return f.user=v.user,await this._saveSession(f),await this._notifyAllSubscribers("USER_UPDATED",f),this._returnResult({data:{user:f.user},error:null})})}catch(s){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(a){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(a))}async _setSession(a){try{if(!a.access_token||!a.refresh_token)throw new bt;const r=Date.now()/1e3;let s=r,c=!0,h=null;const{payload:f}=Jo(a.access_token);if(f.exp&&(s=f.exp,c=s<=r),c){const{data:m,error:g}=await this._callRefreshToken(a.refresh_token);if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!m)return{data:{user:null,session:null},error:null};h=m}else{const{data:m,error:g}=await this._getUser(a.access_token);if(g)throw g;h={access_token:a.access_token,refresh_token:a.refresh_token,user:m.user,token_type:"bearer",expires_in:s-r,expires_at:s},await this._saveSession(h),await this._notifyAllSubscribers("SIGNED_IN",h)}return this._returnResult({data:{user:h.user,session:h},error:null})}catch(r){if(Z(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(a){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(a))}async _refreshSession(a){try{return await this._useSession(async r=>{var s;if(!a){const{data:f,error:m}=r;if(m)throw m;a=(s=f.session)!==null&&s!==void 0?s:void 0}if(!a?.refresh_token)throw new bt;const{data:c,error:h}=await this._callRefreshToken(a.refresh_token);return h?this._returnResult({data:{user:null,session:null},error:h}):c?this._returnResult({data:{user:c.user,session:c},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(a,r){try{if(!rt())throw new wl("No browser detected.");
188if(a.error||a.error_description||a.error_code)throw new wl(a.error_description||"Error in URL with unspecified error_description",{error:a.error||"unspecified_error",code:a.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new sc("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new wl("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!a.code)throw new sc("No code detected.");const{data:K,error:H}=await this._exchangeCodeForSession(a.code);if(H)throw H;const W=new URL(window.location.href);return W.searchParams.delete("code"),window.history.replaceState(window.history.state,"",W.toString()),{data:{session:K.session,redirectType:null},error:null}}const{provider_token:s,provider_refresh_token:c,access_token:h,refresh_token:f,expires_in:m,expires_at:g,token_type:v}=a;if(!h||!m||!f||!v)throw new wl("No session defined in URL");const S=Math.round(Date.now()/1e3),T=parseInt(m);let O=S+T;g&&(O=parseInt(g));const N=O-S;N*1e3<=yi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${N}s, should have been closer to ${T}s`);const D=O-T;S-D>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",D,O,S):S-D<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",D,O,S);const{data:B,error:$}=await this._getUser(h);if($)throw $;const V={provider_token:s,provider_refresh_token:c,access_token:h,expires_in:T,expires_at:O,refresh_token:f,token_type:v,user:B.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:V,redirectType:a.type},error:null})}catch(s){if(Z(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(a){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),a):!!(a.access_token||a.error_description)}async _isPKCECallback(a){const r=await _a(this.storage,`${this.storageKey}-code-verifier`);return!!(a.code&&r)}async signOut(a={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(a))}async _signOut({scope:a}={scope:"global"}){return await this._useSession(async r=>{var s;const{data:c,error:h}=r;if(h)return this._returnResult({error:h});const f=(s=c.session)===null||s===void 0?void 0:s.access_token;if(f){const{error:m}=await this.admin.signOut(f,a);if(m&&!(Bg(m)&&(m.status===404||m.status===401||m.status===403)))return this._returnResult({error:m})}return a!=="others"&&(await this._removeSession(),await lt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(a){const r=zb(),s={id:r,callback:a,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,s),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:s}}}async _emitInitialSession(a){return await this._useSession(async r=>{var s,c;try{const{data:{session:h},error:f}=r;if(f)throw f;await((s=this.stateChangeEmitters.get(a))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",h)),this._debug("INITIAL_SESSION","callback id",a,"session",h)}catch(h){await((c=this.stateChangeEmitters.get(a))===null||c===void 0?void 0:c.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",a,"error",h),console.error(h)}})}async resetPasswordForEmail(a,r={}){let s=null,c=null;this.flowType==="pkce"&&([s,c]=await fi(this.storage,this.storageKey,!0));try{return await ee(this.fetch,"POST",`${this.url}/recover`,{body:{email:a,code_challenge:s,code_challenge_method:c,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(h){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(h))return this._returnResult({data:null,error:h});throw h}}async getUserIdentities(){var a;try{const{data:r,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(a=r.user.identities)!==null&&a!==void 0?a:[]},error:null})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(a){return"token"in a?this.linkIdentityIdToken(a):this.linkIdentityOAuth(a)}async linkIdentityOAuth(a){var r;try{const{data:s,error:c}=await this._useSession(async h=>{var f,m,g,v,S;const{data:T,error:O}=h;if(O)throw O;const N=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,a.provider,{redirectTo:(f=a.options)===null||f===void 0?void 0:f.redirectTo,scopes:(m=a.options)===null||m===void 0?void 0:m.scopes,queryParams:(g=a.options)===null||g===void 0?void 0:g.queryParams,skipBrowserRedirect:!0});return await ee(this.fetch,"GET",N,{headers:this.headers,jwt:(S=(v=T.session)===null||v===void 0?void 0:v.access_token)!==null&&S!==void 0?S:void 0})});if(c)throw c;return rt()&&!(!((r=a.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:a.provider,url:s?.url},error:null})}catch(s){if(Z(s))return this._returnResult({data:{provider:a.provider,url:null},error:s});throw s}}async linkIdentityIdToken(a){return await this._useSession(async r=>{var s;try{const{error:c,data:{session:h}}=r;if(c)throw c;const{options:f,provider:m,token:g,access_token:v,nonce:S}=a,T=await ee(this.fetch,"POST",`${this.url}
188/token?grant_type=id_token`,{headers:this.headers,jwt:(s=h?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:m,id_token:g,access_token:v,nonce:S,link_identity:!0,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Xt}),{data:O,error:N}=T;return N?this._returnResult({data:{user:null,session:null},error:N}):!O||!O.session||!O.user?this._returnResult({data:{user:null,session:null},error:new wa}):(O.session&&(await this._saveSession(O.session),await this._notifyAllSubscribers("USER_UPDATED",O.session)),this._returnResult({data:O,error:N}))}catch(c){if(await lt(this.storage,`${this.storageKey}-code-verifier`),Z(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}})}async unlinkIdentity(a){try{return await this._useSession(async r=>{var s,c;const{data:h,error:f}=r;if(f)throw f;return await ee(this.fetch,"DELETE",`${this.url}/user/identities/${a.identity_id}`,{headers:this.headers,jwt:(c=(s=h.session)===null||s===void 0?void 0:s.access_token)!==null&&c!==void 0?c:void 0})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(a){const r=`#_refreshAccessToken(${a.substring(0,5)}...)`;this._debug(r,"begin");try{const s=Date.now();return await qb(async c=>(c>0&&await Bb(200*Math.pow(2,c-1)),this._debug(r,"refreshing attempt",c),await ee(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:a},headers:this.headers,xform:Xt})),(c,h)=>{const f=200*Math.pow(2,c);return h&&es(h)&&Date.now()+f-s<yi})}catch(s){if(this._debug(r,"error",s),Z(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(r,"end")}}_isValidSession(a){return typeof a=="object"&&a!==null&&"access_token"in a&&"refresh_token"in a&&"expires_at"in a}async _handleProviderSignIn(a,r){const s=await this._getUrlForProvider(`${this.url}/authorize`,a,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",a,"options",r,"url",s),rt()&&!r.skipBrowserRedirect&&window.location.assign(s),{data:{provider:a,url:s},error:null}}async _recoverAndRefresh(){var a,r;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const c=await _a(this.storage,this.storageKey);if(c&&this.userStorage){let f=await _a(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!f&&(f={user:c.user},await bi(this.userStorage,this.storageKey+"-user",f)),c.user=(a=f?.user)!==null&&a!==void 0?a:Xo()}else if(c&&!c.user&&!c.user){const f=await _a(this.storage,this.storageKey+"-user");f&&f?.user?(c.user=f.user,await lt(this.storage,this.storageKey+"-user"),await bi(this.storage,this.storageKey,c)):c.user=Xo()}if(this._debug(s,"session from storage",c),!this._isValidSession(c)){this._debug(s,"session is not valid"),c!==null&&await this._removeSession();return}const h=((r=c.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Qo;if(this._debug(s,`session has${h?"":" not"} expired with margin of ${Qo}s`),h){if(this.autoRefreshToken&&c.refresh_token){const{error:f}=await this._callRefreshToken(c.refresh_token);f&&(console.error(f),es(f)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",f),await this._removeSession()))}}else if(c.user&&c.user.__isUserNotAvailableProxy===!0)try{const{data:f,error:m}=await this._getUser(c.access_token);!m&&f?.user?(c.user=f.user,await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(f){console.error("Error getting user data:",f),this._debug(s,"error getting user data, skipping SIGNED_IN notification",f)}else await this._notifyAllSubscribers("SIGNED_IN",c)}catch(c){this._debug(s,"error",c),console.error(c);return}finally{this._debug(s,"end")}}async _callRefreshToken(a){var r,s;if(!a)throw new bt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const c=`#_callRefreshToken(${a.substring(0,5)}...)`;this._debug(c,"begin");try{this.refreshingDeferred=new fs;const{data:h,error:f}=await this._refreshAccessToken(a);if(f)throw f;if(!h.session)throw new bt;await this._saveSession(h.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",h.session);const m={data:h.session,error:null};return this.refreshingDeferred.resolve(m),m}catch(h){if(this._debug(c,"error",h),Z(h)){const f={data:null,error:h};return es(h)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(f),f}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(h),h}finally{this.refreshingDeferred=null,this._debug(c,"end")}}async _notifyAllSubscribers(a,r,s=!0){const c=`#_notifyAllSubscribers(${a})`;this._debug(c,"begin",r,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:a,session:r});const h=[],f=Array.from(this.stateChangeEmitters.values()).map(async m=>{try{await m.callback(a,r)}catch(g){h.push(g)}});if(await Promise.all(f),h.length>0){for(let m=0;m<h.length;m+=1)console.error(h[m]);throw h[0]}}finally{this._debug(c,"end")}}async _saveSession(a){this._debug("#_saveSession()",a),this.suppressGetSessionWarning=!0,await lt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},a),s=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&r.user&&await bi(this.userStorage,this.storageKey+"-user",{user:r.user});const c=Object.assign({},r);delete c.user;const h=Wm(c);await bi(this.storage,this.storageKey,h)}else{const c=Wm(r);await bi(this.storage,this.storageKey,c)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await lt(this.storage,this.storageKey),await lt(this.storage,this.storageKey+"-code-verifier"),await lt(this.storage,this.storageKey+"-user"),this.userStorage&&await lt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const a=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{a&&rt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",a)}
188catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const a=setInterval(()=>this._autoRefreshTokenTick(),yi);this.autoRefreshTicker=a,a&&typeof a=="object"&&typeof a.unref=="function"?a.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(a),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const a=this.autoRefreshTicker;this.autoRefreshTicker=null,a&&clearInterval(a)}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 a=Date.now();try{return await this._useSession(async r=>{const{data:{session:s}}=r;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const c=Math.floor((s.expires_at*1e3-a)/yi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${c} ticks, a tick lasts ${yi}ms, refresh threshold is ${lc} ticks`),c<=lc&&await this._callRefreshToken(s.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(a){if(a.isAcquireTimeout||a instanceof Qg)this._debug("auto refresh token tick lock not available");else throw a}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!rt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(a){console.error("_handleVisibilityChange",a)}}async _onVisibilityChanged(a){const r=`#_onVisibilityChanged(${a})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),a||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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(a,r,s){const c=[`provider=${encodeURIComponent(r)}`];if(s?.redirectTo&&c.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&c.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[h,f]=await fi(this.storage,this.storageKey),m=new URLSearchParams({code_challenge:`${encodeURIComponent(h)}`,code_challenge_method:`${encodeURIComponent(f)}`});c.push(m.toString())}if(s?.queryParams){const h=new URLSearchParams(s.queryParams);c.push(h.toString())}return s?.skipBrowserRedirect&&c.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${a}?${c.join("&")}`}async _unenroll(a){try{return await this._useSession(async r=>{var s;const{data:c,error:h}=r;return h?this._returnResult({data:null,error:h}):await ee(this.fetch,"DELETE",`${this.url}/factors/${a.factorId}`,{headers:this.headers,jwt:(s=c?.session)===null||s===void 0?void 0:s.access_token})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(a){try{return await this._useSession(async r=>{var s,c;const{data:h,error:f}=r;if(f)return this._returnResult({data:null,error:f});const m=Object.assign({friendly_name:a.friendlyName,factor_type:a.factorType},a.factorType==="phone"?{phone:a.phone}:a.factorType==="totp"?{issuer:a.issuer}:{}),{data:g,error:v}=await ee(this.fetch,"POST",`${this.url}
188/factors`,{body:m,headers:this.headers,jwt:(s=h?.session)===null||s===void 0?void 0:s.access_token});return v?this._returnResult({data:null,error:v}):(a.factorType==="totp"&&g.type==="totp"&&(!((c=g?.totp)===null||c===void 0)&&c.qr_code)&&(g.totp.qr_code=`data:image/svg+xml;utf-8,${g.totp.qr_code}`),this._returnResult({data:g,error:null}))})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _verify(a){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var s;const{data:c,error:h}=r;if(h)return this._returnResult({data:null,error:h});const f=Object.assign({challenge_id:a.challengeId},"webauthn"in a?{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_response:a.webauthn.type==="create"?d_(a.webauthn.credential_response):f_(a.webauthn.credential_response)})}:{code:a.code}),{data:m,error:g}=await ee(this.fetch,"POST",`${this.url}/factors/${a.factorId}/verify`,{body:f,headers:this.headers,jwt:(s=c?.session)===null||s===void 0?void 0:s.access_token});return g?this._returnResult({data:null,error:g}):(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:g}))})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(a){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var s;const{data:c,error:h}=r;if(h)return this._returnResult({data:null,error:h});const f=await ee(this.fetch,"POST",`${this.url}/factors/${a.factorId}/challenge`,{body:a,headers:this.headers,jwt:(s=c?.session)===null||s===void 0?void 0:s.access_token});if(f.error)return f;const{data:m}=f;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:c_(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:h_(m.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(a){const{data:r,error:s}=await this._challenge({factorId:a.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:a.factorId,challengeId:r.id,code:a.code})}async _listFactors(){var a;const{data:{user:r},error:s}=await this.getUser();if(s)return{data:null,error:s};const c={all:[],phone:[],totp:[],webauthn:[]};for(const h of(a=r?.factors)!==null&&a!==void 0?a:[])c.all.push(h),h.status==="verified"&&c[h.factor_type].push(h);return{data:c,error:null}}async _getAuthenticatorAssuranceLevel(){var a,r;const{data:{session:s},error:c}
188=await this.getSession();if(c)return this._returnResult({data:null,error:c});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=Jo(s.access_token);let f=null;h.aal&&(f=h.aal);let m=f;((r=(a=s.user.factors)===null||a===void 0?void 0:a.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const v=h.amr||[];return{data:{currentLevel:f,nextLevel:m,currentAuthenticationMethods:v},error:null}}async _getAuthorizationDetails(a){try{return await this._useSession(async r=>{const{data:{session:s},error:c}=r;return c?this._returnResult({data:null,error:c}):s?await ee(this.fetch,"GET",`${this.url}/oauth/authorizations/${a}`,{headers:this.headers,jwt:s.access_token,xform:h=>({data:h,error:null})}):this._returnResult({data:null,error:new bt})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(a,r){try{return await this._useSession(async s=>{const{data:{session:c},error:h}=s;if(h)return this._returnResult({data:null,error:h});if(!c)return this._returnResult({data:null,error:new bt});const f=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${a}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"approve"},xform:m=>({data:m,error:null})});return f.data&&f.data.redirect_url&&rt()&&!r?.skipBrowserRedirect&&window.location.assign(f.data.redirect_url),f})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(a,r){try{return await this._useSession(async s=>{const{data:{session:c},error:h}=s;if(h)return this._returnResult({data:null,error:h});if(!c)return this._returnResult({data:null,error:new bt});const f=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${a}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"deny"},xform:m=>({data:m,error:null})});return f.data&&f.data.redirect_url&&rt()&&!r?.skipBrowserRedirect&&window.location.assign(f.data.redirect_url),f})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async a=>{const{data:{session:r},error:s}=a;return s?this._returnResult({data:null,error:s}):r?await ee(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new bt})})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _revokeOAuthGrant(a){try{return await this._useSession(async r=>{const{data:{session:s},error:c}=r;return c?this._returnResult({data:null,error:c}):s?(await ee(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:a.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new bt})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(a,r={keys:[]}){let s=r.keys.find(m=>m.kid===a);if(s)return s;const c=Date.now();if(s=this.jwks.keys.find(m=>m.kid===a),s&&this.jwks_cached_at+Rb>c)return s;const{data:h,error:f}=await ee(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(f)throw f;return!h.keys||h.keys.length===0||(this.jwks=h,this.jwks_cached_at=c,s=h.keys.find(m=>m.kid===a),!s)?null:s}async getClaims(a,r={}){try{let s=a;if(!s){const{data:N,error:D}
188=await this.getSession();if(D||!N.session)return this._returnResult({data:null,error:D});s=N.session.access_token}const{header:c,payload:h,signature:f,raw:{header:m,payload:g}}=Jo(s);r?.allowExpired||Qb(h.exp);const v=!c.alg||c.alg.startsWith("HS")||!c.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(c.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!v){const{error:N}=await this.getUser(s);if(N)throw N;return{data:{claims:h,header:c,signature:f},error:null}}const S=Jb(c.alg),T=await crypto.subtle.importKey("jwk",v,S,!0,["verify"]);if(!await crypto.subtle.verify(S,T,f,kb(`${m}.${g}`)))throw new is("Invalid JWT signature");return{data:{claims:h,header:c,signature:f},error:null}}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}}Ti.nextInstanceID={};const Pg=Ti,S_="2.89.0";let Sl="";typeof Deno<"u"?Sl="deno":typeof document<"u"?Sl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Sl="react-native":Sl="node";const E_={"X-Client-Info":`supabase-js-${Sl}/${S_}`},T_={headers:E_},x_={schema:"public"},A_={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},O_={};function Ol(l){"@babel/helpers - typeof";return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ol(l)}function R_(l,a){if(Ol(l)!="object"||!l)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,a);if(Ol(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(l)}function j_(l){var a=R_(l,"string");return Ol(a)=="symbol"?a:a+""}function C_(l,a,r){return(a=j_(a))in l?Object.defineProperty(l,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[a]=r,l}function lg(l,a){var r=Object.keys(l);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(l);a&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),r.push.apply(r,s)}return r}function $e(l){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?lg(Object(r),!0).forEach(function(s){C_(l,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach(function(s){Object.defineProperty(l,s,Object.getOwnPropertyDescriptor(r,s))})}return l}const N_=l=>l?(...a)=>l(...a):(...a)=>fetch(...a),U_=()=>Headers,k_=(l,a,r)=>{const s=N_(r),c=U_();return async(h,f)=>{var m;const g=(m=await a())!==null&&m!==void 0?m:l;let v=new c(f?.headers);return v.has("apikey")||v.set("apikey",l),v.has("Authorization")||v.set("Authorization",`Bearer ${g}`),s(h,$e($e({},f),{},{headers:v}))}};function D_(l){return l.endsWith("/")?l:l+"/"}function z_(l,a){var r,s;const{db:c,auth:h,realtime:f,global:m}=l,{db:g,auth:v,realtime:S,global:T}=a,O={db:$e($e({},g),c),auth:$e($e({},v),h),realtime:$e($e({},S),f),storage:{},global:$e($e($e({},T),m),{},{headers:$e($e({},(r=T?.headers)!==null&&r!==void 0?r:{}),(s=m?.headers)!==null&&s!==void 0?s:{})}),accessToken:async()=>""};return l.accessToken?O.accessToken=l.accessToken:delete O.accessToken,O}function M_(l){const a=l?.trim();if(!a)throw new Error("supabaseUrl is required.");if(!a.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(D_(a))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var L_=class extends Pg{constructor(l){super(l)}},Wg=class{constructor(l,a,r){var s,c;this.supabaseUrl=l,this.supabaseKey=a;const h=M_(l);if(!a)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",h),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",h),this.storageUrl=new URL("storage/v1",h),this.functionsUrl=new URL("functions/v1",h);const f=`sb-${h.hostname.split(".")[0]}-auth-token`,m={db:x_,realtime:O_,auth:$e($e({},A_),{},{storageKey:f}),global:T_},g=z_(r??{},m);if(this.storageKey=(s=g.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(c=g.global.headers)!==null&&c!==void 0?c:{},g.accessToken)this.accessToken=g.accessToken,this.auth=new Proxy({},{get:(S,T)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(T)} is not possible`)}});else{var v;this.auth=this._initSupabaseAuthClient((v=g.auth)!==null&&v!==void 0?v:{},this.headers,g.global.fetch)}this.fetch=k_(a,this._getAccessToken.bind(this),g.global.fetch),this.realtime=this._initRealtimeClient($e({headers:this.headers,accessToken:this._getAccessToken.bind(this)},g.realtime)),this.accessToken&&this.accessToken().then(S=>this.realtime.setAuth(S)).catch(S=>console.warn("Failed to set initial Realtime auth token:",S)),this.rest=new R0(new URL("rest/v1",h).href,{headers:this.headers,schema:g.db.schema,fetch:this.fetch}),this.storage=new Eb(this.storageUrl.href,this.headers,this.fetch,r?.storage),g.accessToken||this._listenForAuthEvents()}get functions(){return new T0(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,a={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(l,a,r)}channel(l,a={config:{}}){return this.realtime.channel(l,a)}getChannels(){return this.realtime.getChannels()}removeChannel(l){return this.realtime.removeChannel(l)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var l=this,a,r;if(l.accessToken)return await l.accessToken();const{data:s}=await l.auth.getSession();return(a=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&a!==void 0?a:l.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:l,persistSession:a,detectSessionInUrl:r,storage:s,userStorage:c,storageKey:h,flowType:f,lock:m,debug:g,throwOnError:v},S,T){const O={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new L_({url:this.authUrl.href,headers:$e($e({},O),S),storageKey:h,autoRefreshToken:l,persistSession:a,detectSessionInUrl:r,storage:s,userStorage:c,flowType:f,lock:m,debug:g,throwOnError:v,fetch:T,hasCu
188stomAuthorizationHeader:Object.keys(this.headers).some(N=>N.toLowerCase()==="authorization")})}_initRealtimeClient(l){return new Cg(this.realtimeUrl.href,$e($e({},l),{},{params:$e($e({},{apikey:this.supabaseKey}),l?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((l,a)=>{this._handleTokenChanged(l,"CLIENT",a?.access_token)})}_handleTokenChanged(l,a,r){(l==="TOKEN_REFRESHED"||l==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):l==="SIGNED_OUT"&&(this.realtime.setAuth(),a=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Fg=(l,a,r)=>new Wg(l,a,r);function B_(){if(typeof window<"u"||typeof process>"u")return!1;const l=process.version;if(l==null)return!1;const a=l.match(/^v(\d+)\./);return a?parseInt(a[1],10)<=18:!1}B_()&&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 Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const dw=Object.freeze(Object.defineProperty({__proto__:null,AuthApiError:Lg,AuthClient:Pg,AuthError:Ei,AuthImplicitGrantRedirectError:wl,AuthInvalidCredentialsError:_l,AuthInvalidJwtError:is,AuthInvalidToken
188ResponseError:wa,AuthPKCECodeVerifierMissingError:$g,AuthPKCEGrantCodeExchangeError:sc,AuthRetryableFetchError:as,AuthSessionMissingError:bt,AuthUnknownError:Pn,AuthWeakPasswordError:uc,CustomAuthError:an,get FunctionRegion(){return ns},FunctionsError:hs,FunctionsFetchError:Sg,FunctionsHttpError:Io,FunctionsRelayError:Zo,GoTrueAdminApi:Yg,GoTrueClient:Ti,NavigatorLockAcquireTimeoutError:Jg,PostgrestError:Eg,get REALTIME_LISTEN_TYPES(){return wi},get REALTIME_POSTGRES_CHANGES_LISTEN_EVENT(){return tc},get REALTIME_PRESENCE_LISTEN_EVENTS(){return ec},get REALTIME_SUBSCRIBE_STATES(){return nn},RealtimeChannel:xa,RealtimeClient:Cg,RealtimePresence:_i,SIGN_OUT_SCOPES:ts,SupabaseClient:Wg,WebSocketFactory:xg,createClient:Fg,isAuthApiError:Bg,isAuthError:Z,isAuthImplicitGrantRedirectError:Hg,isAuthRetryableFetchError:es,isAuthSessionMissingError:qg,lockInternals:Ea,navigatorLock:Xg},Symbol.toStringTag,{value:"Module"})),q_="clutch-dashboard-auth",H_="https://api.clutch-app.co",$_="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFreG1lY2lxeHFub3Z2aWVpenNkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI1OTc3NzcsImV4cCI6MjA4Nzk1Nzc3N30.o9Z3RV0V1qLAflGJ3fqgYQGQi9QEGIS2lNxFlQZa91E",El=Fg(H_,$_,{auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0,storageKey:q_}}),G_=[{value:"/",label:"Home (/)"},{value:"/download.html",label:"Download (/download.html)"},{value:"/lfg/warzone",label:"Warzone (/lfg/warzone)"},{value:"/lfg/fortnite",label:"Fortnite (/lfg/fortnite)"},{value:"/lfg/valorant",label:"Valorant (/lfg/valorant)"},{value:"/lfg/rocket-league",label:"Rocket League (/lfg/rocket-league)"},{value:"/lfg/roblox",label:"Roblox (/lfg/roblox)"},{value:"/lfg/minecraft",label:"Minecraft (/lfg/minecraft)"},{value:"/lfg/gta-5",label:"GTA 5 (/lfg/gta-5)"},{value:"/lfg/marvel-rivals",label:"Marvel Rivals (/lfg/marvel-rivals)"},{value:"/lfg/arc-raiders",label:"Arc Raiders (/lfg/arc-raiders)"},{value:"/lfg/counter-strike-2",label:"Counter-Strike 2 (/lfg/counter-strike-2)"}];function V_(l){xe.useEffect(()=>{const a=document.title;return document.title=l,()=>{document.title=a}},[l])}function pi({title:l,description:a,children:r}){return y.jsxs("section",{className:"rounded-[2rem] border border-white/10 bg-white/5 p-5 shadow-glow md:p-7",children:[y.jsxs("div",{className:"mb-5",children:[y.jsx("h2",{className:"text-xl font-semibold tracking-tight md:text-2xl",children:l}),a?y.jsx("p",{className:"mt-2 text-sm text-white/60 md:text-base",children:a}):null]}),r]})}function je({label:l,hint:a,children:r}){return y.jsxs("label",{className:"block",children:[y.jsx("div",{className:"text-sm font-medium text-white/85",children:l}),a?y.jsx("div",{className:"mt-1 text-xs text-white/45",children:a}):null,y.jsx("div",{className:"mt-2",children:r})]})}function Ce(){return"w-full rounded-2xl border border-white/10 bg-black/30 px-4 py-3 text-sm text-white outline-none placeholder:text-white/30 focus:border-white/20"}function Zn(l="secondary"){return l==="primary"?"inline-flex items-center justify-center rounded-2xl border border-clutch-orange/40 bg-clutch-orange px-4 py-2.5 text-sm font-semibold text-white transition hover:-translate-y-0.5":l==="ghost"?"inline-flex items-center justify-center rounded-2xl border border-white/10 bg-transparent px-4 py-2.5 text-sm font-semibold text-white/80 transition hover:border-white/20 hover:text-white":"inline-flex items-center justify-center rounded-2xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm font-semibold text-white transition hover:-translate-y-0.5 hover:border-white/20"}async function K_(l){await navigator.clipboard.writeText(l)}function Y_(l){return l.short_url||l.shortUrl||l.url||""}function Q_({authToken:l}){V_("Campaign Link Builder | Clutch");const[a,r]=xe.useState($o(Hm,ya[1])),[s,c]=xe.useState(ya[1].id),[h,f]=xe.useState({}),[m,g]=xe.useState({status:"idle",message:""}),[v,S]=xe.useState(""),[T,O]=xe.useState([]),[N,D]=xe.useState("idle");xe.useEffect(()=>{let L=!0;return(async()=>{D("loading");const{data:q,error:Y}=await El.from("hubs").select("name,slug").eq("is_visible",!0).not("slug","is",null).order("name",{ascending:!0}).limit(1e3);if(!L)return;if(Y||!Array.isArray(q)){D("error");return}const oe=q.map(pe=>
188{const w=String(pe.slug??"").trim().toLowerCase(),M=String(pe.name??"").trim();return w?{slug:w,name:M||w}:null}).filter(pe=>!!pe);O(oe),D("success")})(),()=>{L=!1}},[]);const B=xe.useMemo(()=>p0(),[]),$=xe.useMemo(()=>_0(a),[a]),V=xe.useMemo(()=>Gm(a),[a]),K=xe.useMemo(()=>y0(a),[a]),H=xe.useMemo(()=>b0(a),[a]),W=xe.useMemo(()=>w0(a),[a]),_e=xe.useMemo(()=>wg(a),[a]),le=xe.useMemo(()=>{const j=[...T.map(oe=>({value:`/hubs/${oe.slug}`,label:`${oe.name} (/hubs/${oe.slug})`})),...G_],q=j.filter((oe,pe)=>j.findIndex(w=>w.value===oe.value)===pe);return q.some(oe=>oe.value===a.destinationPath)||!a.destinationPath?q:[{value:a.destinationPath,label:`Current (${a.destinationPath})`},...q]},[a.destinationPath,T]),I=xe.useMemo(()=>{const L=a.hubSlug.trim().toLowerCase(),j=T.map(Y=>({value:Y.slug,label:`${Y.name} (${Y.slug})`}));return j.some(Y=>Y.value===L)||!L?j:[{value:L,label:`Current (${L})`},...j]},[a.hubSlug,T]),ne=(L,j)=>{r(q=>{const Y={...q,[L]:j};return L==="hubSlug"&&Y.destinationType==="hub"&&(Y.destinationPath=`/hubs/${String(j).trim().toLowerCase()||"dead-by-daylight"}`),L==="destinationType"&&j==="hub"&&(Y.destinationPath=`/hubs/${Y.hubSlug.trim().toLowerCase()||"dead-by-daylight"}`),Y})},Be=L=>{c(L.id),r(j=>$o(j,L))},En=L=>{const j=ya.find(q=>q.id===L);j&&Be(j)},_t=()=>{r(L=>({...L,slug:Gm(L),sequence:L.sequence.replace(/\D/g,"").slice(-3).padStart(3,"0")||"001"}))},ut=()=>{r($o(Hm,ya[1])),c(ya[1].id),g({status:"idle",message:""}),S(""),f({})},kt=async(L,j)=>{if(j)try{await K_(j),f(q=>({...q,[L]:!0})),window.setTimeout(()=>{f(q=>({...q,[L]:!1}))},1400)}catch{g({status:"error",message:"Clipboard copy failed. Copy manually from the preview box."})}},Kt=async()=>{if(!(!B||$.length>0)){if(!l){g({status:"error",message:"You must be signed in to create links with the secure endpoint."});return}S(""),g({status:"saving",message:"Creating campaign link…"});try{const L=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json",...l?{Authorization:`Bearer ${l}`}:{}},body:JSON.stringify(_e)});if(!L.ok){const Y=await L.text();throw new Error(Y||`Request failed with status ${L.status}.`)}const j=await L.json(),q=Y_(j);S(q),g({status:"success",message:q?`Campaign link created successfully: ${q}`:"Campaign link created successfully."})}catch(L){g({status:"error",message:L instanceof Error?L.message:"Create Link failed. Use Copy SQL mode instead."})}}};return y.jsxs("div",{className:"min-h-screen overflow-x-hidden bg-clutch-black text-white",children:[y.jsxs("div",{className:"pointer-events-none fixed inset-0",children:[y.jsx("div",{className:"absolute left-1/2 top-[-220px] h-[520px] w-[520px] -translate-x-1/2 rounded-full bg-clutch-orange/20 blur-[140px]"}),y.jsx("div",{className:"absolute bottom-[-260px] right-[-120px] h-[420px] w-[420px] rounded-full bg-white/10 blur-[150px]"})]}),y.jsxs("main",{className:"relative mx-auto max-w-7xl px-5 py-8 md:px-8 md:py-12",children:[y.jsx("div",{className:"rounded-[2.5rem] border border-white/10 bg-white/5 p-6 shadow-glow md:p-10",children:y.jsxs("div",{className:"flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[y.jsxs("div",{children:[y.jsx("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/10 bg-black/30 px-4 py-2 text-xs uppercase tracking-[0.18em] text-clutch-orange",children:"Internal Tool"}),y.jsx("h1",{className:"mt-5 text-3xl font-semibold tracking-tight md:text-5xl",children:"Campaign Link Builder"}),y.jsx("p",{className:"mt-4 max-w-3xl text-sm text-white/65 md:text-base",children:"This is now optimized for quick link creation: pick a template, fill the core fields, generate the slug, and copy the SQL. Advanced metadata is still available when you need it."})]}),y.jsx("div",{className:"rounded-2xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-100 md:max-w-sm",children:"Fast path: preset → basics → slug → copy SQL."})]})}),y.jsxs("div",{className:"mt-8 grid gap-8 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[y.jsxs("div",{className:"grid gap-8",children:[y.jsx(pi,{title:"Quick Create",description:"Most links only need these fields. Use Advanced Options only when a campaign needs extra metadata.",children:y.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[y.jsx("div",{className:"md:col-span-2",children:y.jsxs(je,{label:"Template",hint:"Start from a common campaign type, then tweak only what matters.",children:[y.jsx("select",{className:Ce(),value:s,onChange:L=>En(L.target.value),children:ya.map(L=>y.jsx("option",{value:L.id,children:L.label},L.id))}),y.jsx("div",{className:"mt-2 text-xs text-white/45",children:ya.find(L=>L.id===s)?.description})]})}),y.jsx(je,{label:"Link name",children:y.jsx("input",{className:Ce(),value:a.name,onChange:L=>ne("name",L.target.value),placeholder:"DBD LFG Discord Post 002"})}),y.jsx(je,{label:"Slug",hint:"Use the suggested slug or type your own.",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("input",{className:Ce(),value:a.slug,onChange:L=>ne("slug",L.target.value.toLowerCase()),placeholder:"dbd-lfg-discord-002"}),y.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[y.jsx("button",{type:"button",className:Zn(),onClick:_t,children:"Use suggested slug"}),y.jsxs("div",{className:"text-xs text-white/50",children:["Suggested:"," ",y.jsx("span",{className:"font-mono",children:V})]})]})]})}),y.jsx(je,{label:"Sequence",hint:"Used by the slug generator.",children:y.jsx("input",{className:Ce(),value:a.sequence,onChange:L=>ne("sequence",L.target.value),placeholder:"002"})}),y.jsx(je,{label:"utm_source",children:y.jsx("input",{className:Ce(),value:a.utmSource,onCh
188ange:L=>ne("utmSource",L.target.value),placeholder:"discord"})}),y.jsx(je,{label:"utm_medium",children:y.jsx("input",{className:Ce(),value:a.utmMedium,onChange:L=>ne("utmMedium",L.target.value),placeholder:"community"})}),y.jsx(je,{label:"utm_campaign",children:y.jsx("input",{className:Ce(),value:a.utmCampaign,onChange:L=>ne("utmCampaign",L.target.value),placeholder:"dbd_launch"})}),y.jsx(je,{label:"Link label",hint:"Usually the post, placement, or creative name.",children:y.jsx("input",{className:Ce(),value:a.utmContent,onChange:L=>ne("utmContent",L.target.value),placeholder:"dbd_lfg_server_002"})}),y.jsx(je,{label:"Destination type",children:y.jsxs("select",{className:Ce(),value:a.destinationType,onChange:L=>ne("destinationType",L.target.value),children:[y.jsx("option",{value:"hub",children:"Hub"}),y.jsx("option",{value:"path",children:"Custom path"}),y.jsx("option",{value:"url",children:"Full URL"})]})}),y.jsxs(je,{label:"Hub slug",hint:"Default example: dead-by-daylight",children:[y.jsx("select",{className:Ce(),value:a.hubSlug,onChange:L=>ne("hubSlug",L.target.value),disabled:a.destinationType!=="hub",children:I.map(L=>y.jsx("option",{value:L.value,children:L.label},L.value))}),N==="loading"?y.jsx("div",{className:"mt-2 text-xs text-white/45",children:"Loading hubs…"}):null,N==="error"?y.jsx("div",{className:"mt-2 text-xs text-amber-200",children:"Couldn't load hubs from Supabase. Using current/manual values."}):null]}),y.jsx(je,{label:"Destination path",hint:"Choose a supported internal path.",children:y.jsx("select",{className:Ce(),value:a.destinationPath,onChange:L=>ne("destinationPath",L.target.value),children:le.map(L=>y.jsx("option",{value:L.value,children:L.label},L.value))})}),y.jsx("div",{className:"md:col-span-2",children:y.jsx(je,{label:"Destination URL",hint:"Optional for Full URL destination type.",children:y.jsx("input",{className:Ce(),value:a.destinationUrl,onChange:L=>ne("destinationUrl",L.target.value),placeholder:"https://example.com/special-landing"})})}),y.jsx(je,{label:"referral_code",hint:"Optional. Only add this when the link also needs affiliate or referral credit.",children:y.jsx("input",{className:Ce(),value:a.referralCode,onChange:L=>ne("referralCode",L.target.value),placeholder:"JAY123"})})]})}),y.jsx(pi,{title:"Advanced Options",description:"Optional fields for reporting, affiliate experiments, scheduling, and custom metadata.",children:y.jsxs("details",{className:"group rounded-2xl border border-white/10 bg-black/20 p-4 open:border-white/20",children:[y.jsx("summary",{className:"cursor-pointer list-none text-sm font-semibold text-white/90",children:"Show advanced fields"}),y.jsxs("div",{className:"mt-5 grid gap-5 md:grid-cols-2",children:[y.jsx(je,{label:"utm_term",children:y.jsx("input",{className:Ce(),value:a.utmTerm,onChange:L=>ne("utmTerm",L.target.value),placeholder:"optional"})}),y.jsx(je,{label:"channel",children:y.jsx("input",{className:Ce(),value:a.channel,onChange:L=>ne("channel",L.target.value),placeholder:"discord"})}),y.jsx(je,{label:"placement",children:y.jsx("input",{className:Ce(),value:a.placement,onChange:L=>ne("placement",L.target.value),placeholder:"lfg_server_post"})}),y.jsx(je,{label:"audience",children:y.jsx("input",{className:Ce(),value:a.audience,onChange:L=>ne("audience",L.target.value),placeholder:"dead_by_daylight"})}),y.jsx(je,{label:"creator_name",children:y.jsx("input",{className:Ce(),value:a.creatorName,onChange:L=>ne("creatorName",L.target.value),placeholder:"jay"})}),y.jsx(je,{label:"experiment_key",children:y.jsx("input",{className:Ce(),value:a.experimentKey,onChange:L=>ne("experimentKey",L.target.value),placeholder:"dbd_community_test_002"})}),y.jsx(je,{label:"starts_at",hint:"Optional ISO timestamp.",children:y.jsx("input",{className:Ce(),value:a.startsAt,onChange:L=>ne("startsAt",L.target.value),placeholder:"2026-05-07T12:00:00Z"})}),y.jsx(je,{label:"expires_at",hint:"Optional ISO timestamp.",children:y.jsx("input",{className:Ce(),value:a.expiresAt,onChange:L=>ne("expiresAt",L.target.value),placeholder:"2026-05-31T23:59:59Z"})}),y.jsx(je,{label:"is_active",children:y.jsxs("label",{className:"inline-flex items-center gap-3 rounded-2xl border border-white/10 bg-black/30 px-4 py-3 text-sm text-white/85",children:[y.jsx("input",{type:"checkbox",checked:a.isActive,onChange:L=>ne("isActive",L.target.checked)}),"Active campaign link"]})}),y.jsx("div",{className:"md:col-span-2",children:y.jsx(je,{label:"Description",children:y.jsx("textarea",{className:`${Ce()} min-h-[96px]`,value:a.description,onChange:L=>
188ne("description",L.target.value),placeholder:"Internal context for this campaign."})})}),y.jsx("div",{className:"md:col-span-2",children:y.jsx(je,{label:"meta JSON",hint:"Optional JSON object stored in public.campaign_links.meta",children:y.jsx("textarea",{className:`${Ce()} min-h-[160px] font-mono text-xs`,value:a.metaText,onChange:L=>ne("metaText",L.target.value),placeholder:'{"notes":"flat-fee creator test"}'})})})]})]})})]}),y.jsxs("aside",{className:"grid gap-8 self-start xl:sticky xl:top-6",children:[y.jsx(pi,{title:"Validation",description:"Fix these before copying or creating the link.",children:$.length?y.jsx("ul",{className:"space-y-2 text-sm text-rose-200",children:$.map(L=>y.jsx("li",{className:"rounded-2xl border border-rose-500/20 bg-rose-500/10 px-4 py-3",children:L},L))}):y.jsxs("div",{className:"rounded-2xl border border-emerald-500/20 bg-emerald-500/10 px-4 py-3 text-sm text-emerald-100",children:["Looks good. This campaign link is ready for SQL-copy mode",B?" or API mode":"","."]})}),y.jsx(pi,{title:"Link Preview",description:"Check the short link and final destination before you copy the SQL.",children:y.jsxs("div",{className:"space-y-5",children:[y.jsx(je,{label:"Short URL",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("textarea",{readOnly:!0,className:`${Ce()} min-h-[76px] font-mono text-xs`,value:K}),y.jsx("button",{type:"button",className:Zn(),onClick:()=>kt("shortUrl",K),children:h.shortUrl?"Copied":"Copy short URL"})]})}),v?y.jsx(je,{label:"Created short URL",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("textarea",{readOnly:!0,className:`${Ce()} min-h-[76px] font-mono text-xs`,value:v}),y.jsx("button",{type:"button",className:Zn(),onClick:()=>kt("createdShortUrl",v),children:h.createdShortUrl?"Copied":"Copy created short URL"})]})}):null,y.jsx(je,{label:"Destination preview",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("textarea",{readOnly:!0,className:`${Ce()} min-h-[120px] font-mono text-xs`,value:H}),y.jsx("button",{type:"button",className:Zn(),onClick:()=>kt("destination",H),children:h.destination?"Copied":"Copy destination URL"})]})})]})}),y.jsx(pi,{title:"Create",description:"Copy SQL is still the default workflow.",children:y.jsxs("div",{className:"space-y-5",children:[y.jsx(je,{label:"SQL insert / upsert",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("textarea",{readOnly:!0,className:`${Ce()} min-h-[380px] font-mono text-xs`,value:W}),y.jsx("button",{type:"button",className:Zn(),onClick:()=>kt("sql",W),children:h.sql?"Copied":"Copy SQL"})]})}),y.jsxs("div",{className:"flex flex-wrap gap-3",children:[y.jsx("button",{type:"button",className:Zn(),onClick:_t,children:"Use suggested slug"}),y.jsx("button",{type:"button",className:Zn("ghost"),onClick:ut,children:"Reset form"}),B?y.jsx("button",{type:"button",className:Zn("primary"),onClick:Kt,disabled:$.length>0||m.status==="saving",children:m.status==="saving"?"Creating…":"Create Link"}):null]}),B?y.jsxs("div",{className:"rounded-2xl border border-clutch-orange/20 bg-clutch-orange/10 px-4 py-3 text-sm text-orange-100",children:["API mode is enabled via"," ",y.jsx("code",{children:"VITE_CAMPAIGN_LINK_CREATE_URL"})," and uses your signed-in Supabase bearer token."]}):y.jsx("div",{className:"rounded-2xl border border-white/10 bg-black/30 px-4 py-3 text-sm text-white/60",children:"SQL-copy mode is active because no secure create endpoint is configured."}),m.message?y.jsx("div",{className:["rounded-2xl px-4 py-3 text-sm",m.status==="success"?"border border-emerald-500/20 bg-emerald-500/10 text-emerald-100":m.status==="error"?"border border-rose-500/20 bg-rose-500/10 text-rose-100":"border border-white/10 bg-black/30 text-white/70"].join(" "),children:m.message}):null]})}),y.jsx(pi,{title:"API payload preview",description:"This payload is sent only when API mode is configured.",children:y.jsxs("details",{className:"rounded-2xl border border-white/10 bg-black/20 p-4",children:[y.jsx("summary",{className:"cursor-pointer list-none text-sm font-semibold text-white/90",children:"Show API payload"}),y.jsx("textarea",{readOnly:!0,className:`${Ce()} mt-4 min-h-[220px] font-mono text-xs`,value:JSON.stringify(_e,null,2)})]})})]})]})]})]})}const J_="campaign_link_builder";function oc(l){if(typeof l!="string")return null;const a=l.trim();return a||null}function X_(l,a){const r=l.app_metadata?.internal_tools;if(Array.isArray(r))return r.includes(a)||r.includes("*")?"granted":null;if(!r||typeof r!="object")return null;const s=r,c=s["*"];if(c===!0)return"granted";const h=oc(c);if(h)return h;const f=s[a];return f===!0?"granted":oc(f)}async function Z_(l,a){const r=X_(l,a);if(r)return{allowed:!0,role:r,source:"app_metadata",reason:null};const{data:s,error:c}=await El.from("internal_tool_access").select("role").eq("user_id",l.id).eq("tool_key",a).maybeSingle();return c?{allowed:!1,role:null,source:null,reason:c.message}:{allowed:!!s,role:oc(s?.role)??(s?"granted":null),source:s?"table":null,reason:s?null:"No access grant was found for this user."}}function Ir(l="secondary"){return l==="primary"?"inline-flex items-center justify-center rounded-2xl border border-clutch-orange/40 bg-clutch-orange px-4 py-2.5 text-sm font-semibold text-white transition hover:-translate-y-0.5":"inline-flex items-center justify-center rounded-2xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm font-semibold text-white transition hover:border-white/20"}function I_(){return"rounded-[2rem] border border-white/10 bg-white/5 p-6 shadow-glow md:p-8"}function P_(l){return`/login.html?next=${encodeURIComponent(l)}`}function W_(l){return l?l.includes("internal_tool_access")||l.toLowerCase().includes("permission denied")?"The internal tool access check is not configured yet. Create the `public.internal_tool_access` table and its RLS policies, or add `app_metadata.internal_tools` to this user.":l:"Unable to verify your access right now."}function F_({toolKey:l,toolName:a,nextPath:r,description:s,children:c}){const[h,f]=xe.useState({status:"loading",message:"Checking access…",session:null,accessRole:null,accessSource:null});xe.useEffect(()=>{let v=!1;const S=N=>{v||f(N)},T=async N=>{if(!N){S({status:"signed-out",message:"Sign in with your Clutch Supabase account to access this tool.",session:null,accessRole:null,accessSource:null});return}S({status:"loading",message:"Checking your internal tool access…",session:N,accessRole:null,accessSource:null});try{const D=await Z_(N.user,l);if(D.allowed){S({status:"ready",message:"Access granted.",session:N,accessRole:D.role,accessSource:D.source});return}S({status:D.reason?.includes("internal_tool_access")?"error":"unauthorized",message:D.reason||"Your account does not have access to this internal tool.",session:N,accessRole:null,accessSource:null})}catch(D){S({status:"error",message:D instanceof Error?D.message:"Unable to verify internal tool access.",session:N,accessRole:null,accessSource:null})}};El.auth.getSession().then(({data:N})=>{T(N.session??null)});const{data:{subscription:O}}=El.auth.onAuthStateChange((N,D)=>{T(D)});return()=>{v=!0,O.unsubscribe()}},[l]);const m=h.session?.user.email??"",g=async()=>{await El.auth.signOut()};return h.status==="ready"&&h.session?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"fixed right-4 top-4 z-40 flex items-center gap-3 rounded-full border border-white/10 bg-black/60 px-4 py-2 text-xs text-white/75 shadow-glow backdrop-blur",children:[y.jsx("span",{children:m}),h.accessRole?y.jsx("span",{className:"rounded-full border border-white/10 bg-white/5 px-2 py-1 text-[11px] uppercase tracking-[0.12em] text-clutch-orange",children:h.accessRole}):null,y.jsx("button",{type:"button",className:Ir(),onClick:()=>{g()},children:"Sign out"})]}),c({session:h.session,accessRole:h.accessRole,accessSource:h.accessSource})]}):y.jsxs("div",{className:"min-h-screen overflow-x-hidden bg-clutch-black px-5 py-8 text-white md:px-8 md:py-12",children:[y.jsxs("div",{className:"pointer-events-none fixed inset-0",children:[y.jsx("div",{className:"absolute left-1/2 top-[-220px] h-[520px] w-[520px] -translate-x-1/2 roun
188ded-full bg-clutch-orange/20 blur-[140px]"}),y.jsx("div",{className:"absolute bottom-[-260px] right-[-120px] h-[420px] w-[420px] rounded-full bg-white/10 blur-[150px]"})]}),y.jsx("main",{className:"relative mx-auto max-w-3xl",children:y.jsxs("div",{className:I_(),children:[y.jsx("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/10 bg-black/30 px-4 py-2 text-xs uppercase tracking-[0.18em] text-clutch-orange",children:"Internal Tool Access"}),y.jsx("h1",{className:"mt-5 text-3xl font-semibold tracking-tight md:text-4xl",children:a}),y.jsx("p",{className:"mt-4 text-sm text-white/65 md:text-base",children:s}),y.jsx("div",{className:["mt-6 rounded-2xl border px-4 py-4 text-sm",h.status==="error"?"border-rose-500/20 bg-rose-500/10 text-rose-100":h.status==="signed-out"?"border-white/10 bg-black/30 text-white/70":"border-amber-500/20 bg-amber-500/10 text-amber-100"].join(" "),children:h.status==="error"?W_(h.message):h.message}),m?y.jsxs("div",{className:"mt-4 text-sm text-white/55",children:["Signed in as ",m]}):null,h.accessSource?y.jsxs("div",{className:"mt-2 text-xs uppercase tracking-[0.14em] text-white/35",children:["Access source: ",h.accessSource]}):null,y.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[h.status==="signed-out"?y.jsx("a",{href:P_(r),className:Ir("primary"),children:"Sign in"}):null,(h.status==="unauthorized"||h.status==="error")&&m?y.jsx("button",{type:"button",className:Ir(),onClick:()=>{g()},children:"Sign out"}):null,y.jsx("a",{href:"/",className:Ir(),children:"Back to site"})]}),y.jsxs("div",{className:"mt-8 rounded-2xl border border-white/10 bg-black/20 p-5 text-sm text-white/65",children:[y.jsx("div",{className:"font-semibold text-white",children:"Recommended access model"}),y.jsxs("ul",{className:"mt-3 space-y-2",children:[y.jsx("li",{children:"Use `login.html` for email/password sign-in via Supabase Auth."}),y.jsx("li",{children:"Grant access per tool with `public.internal_tool_access` plus RLS."}),y.jsx("li",{children:"Optionally use `app_metadata.internal_tools` if you already manage JWT claims."})]})]})]})})]})}function ew(){return y.jsx(F_,{toolKey:J_,toolName:"Campaign Link Builder",nextPath:"/tools/campaign-link-builder",description:"This page reuses your existing Supabase account. Sign in with the same account you use in Clutch, then the site checks whether you have permission to use this internal tool.",children:({session:l})=>y.jsx(Q_,{authToken:l.access_token})})}function Pr({images:l,autoRotate:a=!0,intervalMs:r=2600,widthClassName:s="w-[280px] md:w-[320px]",alt:c="Clutch app screenshot",loading:h="lazy",fetchPriority:f="auto",sizes:m,fit:g="cover"}){const v=Wr.useMemo(()=>l.filter(Boolean),[l]),[S,T]=Wr.useState(0);Wr.useEffect(()=>{if(!a||v.length<=1)return;const D=globalThis.setInterval(()=>{T(B=>(B+1)%v.length)},r);return()=>globalThis.clearInterval(D)},[a,r,v.length]);const O=v[S]??"",N=g==="contain"?"object-contain":"object-cover";return y.jsxs("div",{className:`relative max-w-full ${s} select-none`,children:[y.jsxs("div",{className:"relative aspect-[390/844] rounded-[3.1rem] bg-zinc-950 shadow-[0_30px_120px_rgba(0,0,0,0.75)]",children:[y.jsx("div",{className:"absolute inset-0 rounded-[3.1rem] border border-white/10"}),y.jsx("div",{className:"pointer-events-none absolute inset-[1px] rounded-[3.05rem] border border-white/5"}),y.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[3.1rem] bg-gradient-to-br from-white/10 via-trans
188parent to-transparent opacity-60"}),y.jsx("div",{className:"absolute -left-[2px] top-[22%] h-9 w-[3px] rounded-full bg-white/10"}),y.jsx("div",{className:"absolute -left-[2px] top-[32%] h-14 w-[3px] rounded-full bg-white/10"}),y.jsx("div",{className:"absolute -right-[2px] top-[28%] h-16 w-[3px] rounded-full bg-white/10"}),y.jsx("div",{className:"absolute inset-[7px] rounded-[2.7rem] bg-black"}),y.jsxs("div",{className:"absolute inset-[9px] overflow-hidden rounded-[2.6rem] bg-black",children:[O?y.jsx("img",{src:O,alt:c,className:`h-full w-full ${N}`,width:390,height:844,loading:h,fetchPriority:f,decoding:h==="eager"?"sync":"async",sizes:m,draggable:!1}):y.jsx("div",{className:"h-full w-full bg-gradient-to-b from-white/10 to-black"}),y.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-tr from-white/0 via-white/10 to-white/0 opacity-40 mix-blend-overlay"})]}),y.jsxs("div",{className:"absolute left-1/2 top-[10px] z-10 h-[30px] w-[44%] -translate-x-1/2 rounded-b-[1.2rem] bg-black/95 border border-white/10",children:[y.jsx("div",{className:"absolute left-1/2 top-[10px] h-[6px] w-[46px] -translate-x-1/2 rounded-full bg-white/10"}),y.jsx("div",{className:"absolute right-[18px] top-[9px] h-[10px] w-[10px] rounded-full bg-white/10"})]})]}),v.length>1&&y.jsx("div",{className:"mt-4 flex justify-center gap-2",children:v.map((D,B)=>y.jsx("button",{onClick:()=>T(B),className:`h-2.5 w-2.5 rounded-full transition ${B===S?"bg-clutch-orange":"bg-white/20 hover:bg-white/30"}`,"aria-label":`Show screenshot ${B+1}`},`${D}-${B}`))})]})}const tw="[email protected]",us="https://apps.apple.com/us/app/clutch-team-up-lfg-play/id6756883623",os="https://play.google.com/store/apps/details?id=com.erniec1.ClutchApp&hl=en_US",nw=xe.lazy(()=>My(()=>import("./HomeDeferredSections-BfE21rLE.js"),[]));function aw(){const[l,a]=xe.useState(!1);return xe.useEffect(()=>{if(l||!("window"in globalThis))return;const r=globalThis.window;let s,c;const h=()=>a(!0),f=()=>{if(r.requestIdleCallback){c=r.requestIdleCallback(h,{timeout:1800});return}s=globalThis.setTimeout(h,1200)},m=()=>{r.scrollY>120&&h()};return r.addEventListener("pointerdown",h,{once:!0,passive:!0}),r.addEventListener("keydown",h,{once:!0}),r.addEventListener("scroll",m,{passive:!0}),document.readyState==="complete"?f():r.addEventListener("load",f,{once:!0}),()=>{s&&globalThis.clearTimeout(s),c&&r.cancelIdleCallback&&r.cancelIdleCallback(c),r.removeEventListener("pointerdown",h),r.removeEventListener("keydown",h),r.removeEventListener("scroll",m),r.removeEventListener("load",f)}},[l]),l}function iw(l){const a=xe.useCallback(()=>!("window"in globalThis)||!globalThis.window.matchMedia?!1:globalThis.window.matchMedia(l).matches,[l]),[r,s]=xe.useState(a);return xe.useEffect(()=>{if(!("window"in globalThis)||!globalThis.window.matchMedia)return;const c=globalThis.window.matchMedia(l),h=()=>s(c.matches);return h(),c.addEventListener?.("change",h),()=>c.removeEventListener?.("change",h)},[a,l]),r}function lw(l){if(!("window"in globalThis))return;const a=document.getElementById(l);a&&a.scrollIntoView({behavior:"smooth",block:"start"})}function rw(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)}function sw(){return typeof navigator>"u"?!1:/Android/.test(navigator.userAgent)}function rg(l){!l||!("window"in globalThis)||globalThis.window.open(l,"_blank","noopener,noreferrer")}function sg({href:l,src:a,alt:r,className:s}){const c=!l,h=y.jsx("img",{src:a,alt:r,className:[s,"select-none",c?"opacity-40 cursor-not-allowed grayscale":"hover:-translate-y-0.5 transition"].join(" "),draggable:!1,loading:"lazy"});return c?y.jsx("div",{"aria-disabled":"true",children:h}):y.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer","aria-label":r,children:h})}function uw({size:l="md",className:a=""}){const r=l==="lg"?"h-12 md:h-14":"h-11 md:h-12",s=Oa(us),c=Oa(os);return y.jsxs("div",{className:["flex flex-wrap items-center justify-center gap-3",a].join(" "),children:[y.jsx(sg,{href:s,src:"/badges/app-store.svg",alt:"Download on the App Store",className:r}),y.jsx(sg,{href:c,src:"/badges/google-play.svg",alt:"Get it on Google Play",className:r})]})}function ug({size:l="md",variant:a="badges"}){if(a==="badges")return y.jsx(uw,{size:l,className:"justify-center sm:justify-start"});const r=l==="lg"?{padding:"px-7 py-3.5",text:"text-base md:text-lg",radiu
188s:"rounded-3xl",minH:"min-h-[52px]"}:{padding:"px-6 py-3",text:"text-sm md:text-base",radius:"rounded-3xl",minH:"min-h-[48px]"},s=()=>{if(rw()&&us)return rg(Oa(us));if(sw()&&os)return rg(Oa(os));lw("download")};return y.jsx("button",{type:"button",onClick:s,className:["inline-flex items-center justify-center",r.radius,r.minH,"border border-white/10 bg-clutch-orange text-white","font-extrabold tracking-tight",r.padding,r.text,"shadow-[0_18px_55px_rgba(0,0,0,0.45)]","transition hover:-translate-y-0.5 hover:shadow-[0_26px_80px_rgba(0,0,0,0.6)]","active:translate-y-0"].join(" "),"aria-label":"Download Clutch",children:"Download"})}function ow(){const l=iw("(min-width: 768px)"),a=aw(),r=Oa(us),s=Oa(os);return(typeof window<"u"?window.location.pathname:"/")==="/tools/campaign-link-builder"?y.jsxs(y.Fragment,{children:[y.jsx(Bm,{}),y.jsx(ew,{})]}):y.jsxs("div",{className:"min-h-screen overflow-x-hidden bg-clutch-black text-white",children:[y.jsx(Bm,{}),y.jsxs("div",{className:"pointer-events-none fixed inset-0",children:[y.jsx("div",{className:"absolute left-1/2 top-[-220px] h-[520px] w-[520px] -translate-x-1/2 rounded-full bg-clutch-orange/25 blur-[130px]"}),y.jsx("div",{className:"absolute bottom-[-260px] left-[-140px] h-[520px] w-[520px] rounded-full bg-white/10 blur-[150px]"})]}),y.jsxs("div",{className:"relative mx-auto max-w-6xl px-6",children:[y.jsxs("header",{className:"flex items-center justify-between py-6",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("img",{src:"/clutch-logo-128.webp",alt:"Clutch logo",width:128,height:128,className:"h-14 w-14 md:h-20 md:w-20 drop-shadow-[0_18px_40px_rgba(0,0,0,0.55)]"}),y.jsx("div",{className:"text-2xl font-extrabold tracking-tight md:text-4xl",children:"Clutch"})]}),y.jsxs("nav",{className:"hidden items-center gap-8 text-sm text-white/70 md:flex",children:[y.jsx("a",{className:"hover:text-white",href:"#features",children:"Features"}),y.jsx("a",{className:"hover:text-white",href:"#screens",children:"Screens"}),y.jsx("a",{className:"hover:text-white",href:"#how",children:"How it works"}),y.jsx("a",{className:"hover:text-white",href:"#download",children:"Download"}),y.jsx("a",{className:"hover:text-white",href:"#request-hub",children:"Request Hub"}),y.jsx("a",{className:"hover:text-white",href:"#faq",children:"FAQ"})]}),y.jsx("div",{className:"hidden md:block",children:y.jsx(ug,{size:"lg",variant:"text"})})]}),y.jsx("div",{className:"h-px w-full bg-white/10"}),y.jsxs("section",{className:"relative overflow-hidden py-14 md:py-20",children:[y.jsxs("div",{className:"pointer-events-none absolute inset-0 opacity-40",children:[y.jsx("div",{className:"absolute left-[-10%] top-[32%] h-[2px] w-[40%] rotate-[8deg] bg-white/10"}),y.jsx("div",{className:"absolute right-[-10%] top-[32%] h-[2px] w-[40%] rotate-[-8deg] bg-white/10"})]}),y.jsxs("div",{className:"relative mx-auto max-w-3xl text-center",children:[y.jsxs("h1",{className:"mt-6 text-4xl font-semibold tracking-tight md:text-6xl",children:["The gaming teammate finder built for serious players."," ",y.jsx("span",{className:"text-white/70",children:"Start playing sooner."})]}),y.jsx("p",{className:"mx-auto mt-5 max-w-2xl text-base text-white/70 md:text-lg",children:"Discover open sessions, use hub-based LFG, connect instantly, and start playing without friction."}),y.jsx("div",{className:"mt-8 flex flex-col items-center justify-center gap-4 sm:flex-row",children:y.jsx(ug,{size:"lg"})}),y.jsx("div",{className:"mt-4 text-xs text-white/50",children:"Available on iOS & Android."}),y.jsx("div",{className:"mt-12",children:l?y.jsxs("div",{className:"relative mx-auto hidden h-[560px] max-w-5xl md:block",children:[y.jsx("div",{className:"pointer-events-none absolute left-1/2 top-[52%] h-[380px] w-[780px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-clutch-orange/10 blur-[120px]"}),y.jsx("div",{className:"pointer-events-none absolute left-0 top-[120px] z-10 -rotate-12 opacity-90",children:y.jsx(Pr,{images:["/screens/optimized/play-now-640.webp"],alt:"Clutch app Play Now screen",autoRotate:!1,loading:"lazy",fetchPriority:"low",sizes:"260px",widthClassName:"w-[240px] lg:w-[260px]"})}),y.jsx("div",{className:"absolute left-1/2 top-[60px] z-20 -translate-x-1/2",children:y.jsx(Pr,{images:["/screens/optimized/hubs-640.webp"],alt:"Clutch app gaming hubs screen",autoRotate:!1,loading:"eager",fetchPriority:"high",sizes:"320px",widthClassName:"w-[270px] lg:w-[320px]"})}),y.jsx("div",{className:"pointer-events-none absolute right-0 top-[120px] z-10 rotate-12 opacity-90",children:y.jsx(Pr,{images:["/screens/optimized/profile-640.webp"],alt:"Clutch app profile screen",autoRotate:!1,loading:"lazy",fetchPriority:"low",sizes:"260px",widthClassName:"w-[240px] lg:w-[260px]"})})]}):y.jsx("div",{className:"flex flex-col items-center md:hidden",children:y.jsx(Pr,{images:["/screens/optimized/play-now-640.webp"],alt:"Clutch app Play Now screen",autoRotate:!1,loading:"eager",fetchPriority:"high",sizes:"(max-width: 767px) 220px, 240px",widthClassName:"w-[220px] sm:w-[240px]"})})})]})]}),a?y.jsx(xe.Suspense,{fallback:y.jsx("div",{className:"h-24"}),children:y.jsx(nw,{appStoreUrl:r,playStoreUrl:s,supportEmail:tw})}):y.jsx("div",{className:"h-12","aria-hidden":"true"})]})]})}function cw(){document.documentElement.classList.add("app-ready")}function hw(l){const a=document.querySelector("link[data-app-styles]");if(!a){l();return}if(a.dataset.loaded==="true"){l();return}const r=()=>{document.removeEventListener("app-css-ready",r),l()};document.addEventListener("app-css-ready",r,{once:!0})}ky.createRoot(document.getElementById("root")).render(y.jsx(xe.StrictMode,{children:y.jsx(ow,{})}));globalThis.requestAnimationFrame(()=>{hw(cw)});
188export{Pr as I,xe as R,My as _,Oa as a,bg as g,dw as i,y as j};

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.