vendor: 6,112 bytes, lines 1-9
1var Jd=e=>{throw TypeError(e)};var Sl=(e,t,r)=>t.has(e)||Jd("Cannot "+r);var T=(e,t,r)=>(Sl(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?Jd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),V=(e,t,r,n)=>(Sl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),je=(e,t,r)=>(Sl(e,t,"access private method"),r);var ho=(e,t,r,n)=>({set _(s){V(e,t,s,r)},get _(){return T(e,t,n)}});function Vy(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function Tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cp={exports:{}},Fa={},Pp={exports:{}},Y={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Zi=Symbol.for("react.element"),qy=Symbol.for("react.portal"),Ky=Symbol.for("react.fragment"),Gy=Symbol.for("react.strict_mode"),Qy=Symbol.for("react.profiler"),Jy=Symbol.for("react.provider"),Yy=Symbol.for("react.context"),Xy=Symbol.for("react.forward_ref"),Zy=Symbol.for("react.suspense"),e0=Symbol.for("react.memo"),t0=Symbol.for("react.lazy"),Yd=Symbol.iterator;function r0(e){return e===null||typeof e!="object"?null:(e=Yd&&e[Yd]||e["@@iterator"],typeof e=="function"?e:null)}var Rp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ap=Object.assign,Op={};function $s(e,t,r){this.props=e,this.context=t,this.refs=Op,this.updater=r||Rp}$s.prototype.isReactComponent={};$s.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Np(){}Np.prototype=$s.prototype;function Ac(e,t,r){this.props=e,this.context=t,this.refs=Op,this.updater=r||Rp}var Oc=Ac.prototype=new Np;Oc.constructor=Ac;Ap(Oc,$s.prototype);Oc.isPureReactComponent=!0;var Xd=Array.isArray,jp=Object.prototype.hasOwnProperty,Nc={current:null},Ip={key:!0,ref:!0,__self:!0,__source:!0};function Lp(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)jp.call(t,n)&&!Ip.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Zi,type:e,key:i,ref:o,props:s,_owner:Nc.current}}function n0(e,t){return{$$typeof:Zi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zi}function s0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Zd=/\/+/g;function kl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?s0(""+e.key):t.toString(36)}function zo(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Zi:case qy:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+kl(o,0):n,Xd(s)?(r="",e!=null&&(r=e.replace(Zd,"$&/")+"/"),zo(s,t,r,"",function(u){return u})):s!=null&&(jc(s)&&(s=n0(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Zd,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Xd(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+kl(i,a);o+=zo(i,t,r,l,s)}else if(l=r0(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+kl(i,a++),o+=zo(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function fo(e,t,r){if(e==null)return e;var n=[],s=0;return zo(e,n,"","",function(i){return t.call(r,i,s++)}),n}function i0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var He={current:null},Ho={transition:null},o0={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:Ho,ReactCurrentOwner:Nc};function $p(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:fo,forEach:function(e,t,r){fo(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return fo(e,function(){t++}),t},toArray:function(e){return fo(e,function(t){return t})||[]},only:function(e){if(!jc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=$s;Y.Fragment=Ky;Y.Profiler=Qy;Y.PureComponent=Ac;Y.StrictMode=Gy;Y.Suspense=Zy;
vendor: 5,027 bytes, lines 9-25
9Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o0;Y.act=$p;Y.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Ap({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Nc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)jp.call(t,l)&&!Ip.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Zi,type:e.type,key:s,ref:i,props:n,_owner:o}};Y.createContext=function(e){return e={$$typeof:Yy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jy,_context:e},e.Consumer=e};Y.createElement=Lp;Y.createFactory=function(e){var t=Lp.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:Xy,render:e}};Y.isValidElement=jc;Y.lazy=function(e){return{$$typeof:t0,_payload:{_status:-1,_result:e},_init:i0}};Y.memo=function(e,t){return{$$typeof:e0,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=Ho.transition;Ho.transition={};try{e()}finally{Ho.transition=t}};Y.unstable_act=$p;Y.useCallback=function(e,t){return He.current.useCallback(e,t)};Y.useContext=function(e){return He.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return He.current.useDeferredValue(e)};Y.useEffect=function(e,t){return He.current.useEffect(e,t)};Y.useId=function(){return He.current.useId()};Y.useImperativeHandle=function(e,t,r){return He.current.useImperativeHandle(e,t,r)};Y.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return He.current.useMemo(e,t)};Y.useReducer=function(e,t,r){return He.current.useReducer(e,t,r)};Y.useRef=function(e){return He.current.useRef(e)};Y.useState=function(e){return He.current.useState(e)};Y.useSyncExternalStore=function(e,t,r){return He.current.useSyncExternalStore(e,t,r)};Y.useTransition=function(){return He.current.useTransition()};Y.version="18.3.1";Pp.exports=Y;var b=Pp.exports;const N=Tp(b),Dp=Vy({__proto__:null,default:N},[b]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var a0=b,l0=Symbol.for("react.element"),u0=Symbol.for("react.fragment"),c0=Object.prototype.hasOwnProperty,d0=a0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h0={key:!0,ref:!0,__self:!0,__source:!0};function Mp(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)c0.call(t,n)&&!h0.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:l0,type:e,key:i,ref:o,props:s,_owner:d0.current}}Fa.Fragment=u0;Fa.jsx=Mp;Fa.jsxs=Mp;Cp.exports=Fa;var x=Cp.exports,Up={exports:{}},lt={},Fp={exports:{}},Bp={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(C,P){var L=C.length;C.push(P);e:for(;0<L;){var q=L-1>>>1,F=C[q];if(0<s(F,P))C[q]=P,C[L]=F,L=q;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var P=C[0],L=C.pop();if(L!==P){C[0]=L;e:for(var q=0,F=C.length,J=F>>>1;q<J;){var X=2*(q+1)-1,we=C[X],Ne=X+1,re=C[Ne];if(0>s(we,L))Ne<F&&0>s(re,we)?(C[q]=re,C[Ne]=L,q=Ne):(C[q]=we,C[X]=L,q=X);else if(Ne<F&&0>s(re,L))C[q]=re,C[Ne]=L,q=Ne;else break e}}return P}function s(C,P){var L=C.sortIndex-P.sortIndex;return L!==0?L:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(C){for(var P=r(u);P!==null;){if(P.callback===null)n(u);else if(P.startTime<=C)n(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(u)}}function _(C){if(g=!1,v(C),!y)if(r(l)!==null)y=!0,H(S);else{var P=r(u);P!==null&&K(_,P.startTime-C)}}function S(C,P){y=!1,g&&(g=!1,m(R),R=-1),h=!0;var L=f;try{for(v(P),d=r(l);d!==null&&(!(d.expirationTime>P)||C&&!z());){var q=d.callback;
vendor: 7,951 bytes, lines 25-33
25if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var F=q(d.expirationTime<=P);P=e.unstable_now(),typeof F=="function"?d.callback=F:d===r(l)&&n(l),v(P)}else n(l);d=r(l)}if(d!==null)var J=!0;else{var X=r(u);X!==null&&K(_,X.startTime-P),J=!1}return J}finally{d=null,f=L,h=!1}}var k=!1,E=null,R=-1,O=5,j=-1;function z(){return!(e.unstable_now()-j<O)}function D(){if(E!==null){var C=e.unstable_now();j=C;var P=!0;try{P=E(!0,C)}finally{P?Q():(k=!1,E=null)}}else k=!1}var Q;if(typeof p=="function")Q=function(){p(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,Z=I.port2;I.port1.onmessage=D,Q=function(){Z.postMessage(null)}}else Q=function(){w(D,0)};function H(C){E=C,k||(k=!0,Q())}function K(C,P){R=w(function(){C(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,H(S))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var L=f;f=P;try{return C()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=f;f=C;try{return P()}finally{f=L}},e.unstable_scheduleCallback=function(C,P,L){var q=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?q+L:q):L=q,C){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=L+F,C={id:c++,callback:P,priorityLevel:C,startTime:L,expirationTime:F,sortIndex:-1},L>q?(C.sortIndex=L,t(u,C),r(l)===null&&C===r(u)&&(g?(m(R),R=-1):g=!0,K(_,L-q))):(C.sortIndex=F,t(l,C),y||h||(y=!0,H(S))),C},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(C){var P=f;return function(){var L=f;f=P;try{return C.apply(this,arguments)}finally{f=L}}}})(Bp);Fp.exports=Bp;var f0=Fp.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var p0=b,at=f0;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var zp=new Set,Si={};function Nn(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Si[e]=t,e=0;e<t.length;e++)zp.add(t[e])}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lu=Object.prototype.hasOwnProperty,m0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,eh={},th={};function g0(e){return lu.call(th,e)?!0:lu.call(eh,e)?!1:m0.test(e)?th[e]=!0:(eh[e]=!0,!1)}function v0(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function y0(e,t,r,n){if(t===null||typeof t>"u"||v0(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function We(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new We(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oe[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ic=/[\-:]([a-z])/g;function Lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);Oe[t]=new We(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);Oe[t]=new We(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ic,Lc);Oe[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function $c(e,t,r,n){var s=Oe.hasOwnProperty(t)?Oe[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(y0(t,r,s,n)&&(r=null),n||s===null?g0(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}
vendor: 17,938 bytes, lines 33-37
33var hr=p0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,po=Symbol.for("react.element"),Yn=Symbol.for("react.portal"),Xn=Symbol.for("react.fragment"),Dc=Symbol.for("react.strict_mode"),uu=Symbol.for("react.profiler"),Hp=Symbol.for("react.provider"),Wp=Symbol.for("react.context"),Mc=Symbol.for("react.forward_ref"),cu=Symbol.for("react.suspense"),du=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),kr=Symbol.for("react.lazy"),Vp=Symbol.for("react.offscreen"),rh=Symbol.iterator;function qs(e){return e===null||typeof e!="object"?null:(e=rh&&e[rh]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Object.assign,El;function ni(e){if(El===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);El=t&&t[1]||""}return` 34`+El+e}var Tl=!1;function Cl(e,t){if(!e||Tl)return"";Tl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=n.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Tl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ni(e):""}function w0(e){switch(e.tag){case 5:return ni(e.type);case 16:return ni("Lazy");case 13:return ni("Suspense");case 19:return ni("SuspenseList");case 0:case 2:case 15:return e=Cl(e.type,!1),e;case 11:return e=Cl(e.type.render,!1),e;case 1:return e=Cl(e.type,!0),e;default:return""}}function hu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xn:return"Fragment";case Yn:return"Portal";case uu:return"Profiler";case Dc:return"StrictMode";case cu:return"Suspense";case du:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wp:return(e.displayName||"Context")+".Consumer";case Hp:return(e._context.displayName||"Context")+".Provider";case Mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uc:return t=e.displayName||null,t!==null?t:hu(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return hu(e(t))}catch{}}return null}function b0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hu(t);case 8:return t===Dc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _0(e){var t=qp(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mo(e){e._valueTracker||(e._valueTracker=_0(e))}function Kp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=qp(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function sa(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}}function fu(e,t){var r=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function nh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=qr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gp(e,t){t=t.checked,t!=null&&$c(e,"checked",t,!1)}function pu(e,t){Gp(e,t);var r=qr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mu(e,t.type,r):t.hasOwnProperty("defaultValue")&&mu(e,t.type,qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sh(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mu(e,t,r){(t!=="number"||sa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var si=Array.isArray;function us(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+qr(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function gu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ih(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(A(92));if(si(r)){if(1<r.length)throw Error(A(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:qr(r)}}function Qp(e,t){var r=qr(t.value),n=qr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function oh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Jp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var go,Yp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(go=go||document.createElement("div"),go.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=go.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ki(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ui={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},x0=["Webkit","ms","Moz","O"];Object.keys(ui).forEach(function(e){x0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ui[t]=ui[e]})});function Xp(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ui.hasOwnProperty(e)&&ui[e]?(""+t).trim():t+"px"}function Zp(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Xp(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var S0=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yu(e,t){if(t){if(S0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function wu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 bu=null;function Fc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _u=null,cs=null,ds=null;function ah(e){if(e=ro(e)){if(typeof _u!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Va(t),_u(e.stateNode,e.type,t))}}function em(e){cs?ds?ds.push(e):ds=[e]:cs=e}function tm(){if(cs){var e=cs,t=ds;if(ds=cs=null,ah(e),t)for(e=0;e<t.length;e++)ah(t[e])}}function rm(e,t){return e(t)}function nm(){}var Pl=!1;function sm(e,t,r){if(Pl)return e(t,r);Pl=!0;try{return rm(e,t,r)}finally{Pl=!1,(cs!==null||ds!==null)&&(nm(),tm())}}function Ei(e,t){var r=e.stateNode;if(r===null)return null;var n=Va(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(A(231,t,typeof r));return r}var xu=!1;if(or)try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){xu=!0}}),window.addEventListener("test",Ks,Ks),window.removeEventListener("test",Ks,Ks)}catch{xu=!1}function k0(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var ci=!1,ia=null,oa=!1,Su=null,E0={onError:function(e){ci=!0,ia=e}};function T0(e,t,r,n,s,i,o,a,l){ci=!1,ia=null,k0.apply(E0,arguments)}function C0(e,t,r,n,s,i,o,a,l){if(T0.apply(this,arguments),ci){if(ci){var u=ia;ci=!1,ia=null}else throw Error(A(198));oa||(oa=!0,Su=u)}}function jn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function im(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 lh(e){if(jn(e)!==e)throw Error(A(188))}function P0(e){var t=e.alternate;if(!t){if(t=jn(e),t===null)throw Error(A(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return lh(s),e;if(i===n)return lh(s),t;i=i.sibling}throw Error(A(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(A(189))}}if(r.alternate!==n)throw Error(A(190))}if(r.tag!==3)throw Error(A(188));return r.stateNode.current===r?e:t}function om(e){return e=P0(e),e!==null?am(e):null}function am(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=am(e);if(t!==null)return t;e=e.sibling}return null}var lm=at.unstable_scheduleCallback,uh=at.unstable_cancelCallback,R0=at.unstable_shouldYield,A0=at.unstable_requestPaint,ye=at.unstable_now,O0=at.unstable_getCurrentPriorityLevel,Bc=at.unstable_ImmediatePriority,um=at.unstable_UserBlockingPriority,aa=at.unstable_NormalPriority,N0=at.unstable_LowPriority,cm=at.unstable_IdlePriority,Ba=null,qt=null;function j0(e){if(qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(Ba,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:$0,I0=Math.log,L0=Math.LN2;function $0(e){return e>>>=0,e===0?32:31-(I0(e)/L0|0)|0}var vo=64,yo=4194304;function ii(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function la(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=ii(a):(i&=o,i!==0&&(n=ii(i)))}else o=r&~s,o!==0?n=ii(o):i!==0&&(n=ii(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ot(t),s=1<<r,n|=e[r],t&=~s;return n}function D0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M0(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ot(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=D0(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function ku(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dm(){var e=vo;return vo<<=1,!(vo&4194240)&&(vo=64),e}function Rl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function eo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=r}function U0(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Ot(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function zc(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ot(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ne=0;function hm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fm,Hc,pm,mm,gm,Eu=!1,wo=[],Mr=null,Ur=null,Fr=null,Ti=new Map,Ci=new Map,Tr=[],F0="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 submit".split(" ");function ch(e,t){switch(e){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":Ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ci.delete(t.pointerId)}}function Gs(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ro(t),t!==null&&Hc(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function B0(e,t,r,n,s){switch(t){case"focusin":return Mr=Gs(Mr,e,t,r,n,s),!0;case"dragenter":return Ur=Gs(Ur,e,t,r,n,s),!0;case"mouseover":return Fr=Gs(Fr,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Ti.set(i,Gs(Ti.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Ci.set(i,Gs(Ci.get(i)||null,e,t,r,n,s)),!0}return!1}function vm(e){var t=pn(e.target);if(t!==null){var r=jn(t);if(r!==null){if(t=r.tag,t===13){if(t=im(r),t!==null){e.blockedOn=t,gm(e.priority,function(){pm(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Tu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);bu=n,r.target.dispatchEvent(n),bu=null}else return t=ro(r),t!==null&&Hc(t),e.blockedOn=r,!1;t.shift()}return!0}function dh(e,t,r){Wo(e)&&r.delete(t)}function z0(){Eu=!1,Mr!==null&&Wo(Mr)&&(Mr=null),Ur!==null&&Wo(Ur)&&(Ur=null),Fr!==null&&Wo(Fr)&&(Fr=null),Ti.forEac
vendor: 11,841 bytes, line 37
37h(dh),Ci.forEach(dh)}function Qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Eu||(Eu=!0,at.unstable_scheduleCallback(at.unstable_NormalPriority,z0)))}function Pi(e){function t(s){return Qs(s,e)}if(0<wo.length){Qs(wo[0],e);for(var r=1;r<wo.length;r++){var n=wo[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Mr!==null&&Qs(Mr,e),Ur!==null&&Qs(Ur,e),Fr!==null&&Qs(Fr,e),Ti.forEach(t),Ci.forEach(t),r=0;r<Tr.length;r++)n=Tr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Tr.length&&(r=Tr[0],r.blockedOn===null);)vm(r),r.blockedOn===null&&Tr.shift()}var hs=hr.ReactCurrentBatchConfig,ua=!0;function H0(e,t,r,n){var s=ne,i=hs.transition;hs.transition=null;try{ne=1,Wc(e,t,r,n)}finally{ne=s,hs.transition=i}}function W0(e,t,r,n){var s=ne,i=hs.transition;hs.transition=null;try{ne=4,Wc(e,t,r,n)}finally{ne=s,hs.transition=i}}function Wc(e,t,r,n){if(ua){var s=Tu(e,t,r,n);if(s===null)Ul(e,t,n,ca,r),ch(e,n);else if(B0(s,e,t,r,n))n.stopPropagation();else if(ch(e,n),t&4&&-1<F0.indexOf(e)){for(;s!==null;){var i=ro(s);if(i!==null&&fm(i),i=Tu(e,t,r,n),i===null&&Ul(e,t,n,ca,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Ul(e,t,n,null,r)}}var ca=null;function Tu(e,t,r,n){if(ca=null,e=Fc(n),e=pn(e),e!==null)if(t=jn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=im(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ca=e,null}function ym(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(O0()){case Bc:return 1;case um:return 4;case aa:case N0:return 16;case cm:return 536870912;default:return 16}default:return 16}}var Lr=null,Vc=null,Vo=null;function wm(){if(Vo)return Vo;var e,t=Vc,r=t.length,n,s="value"in Lr?Lr.value:Lr.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return Vo=s.slice(e,1<n?1-n:void 0)}function qo(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 bo(){return!0}function hh(){return!1}function ut(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bo:hh,this.isPropagationStopped=hh,this}return pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var Ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qc=ut(Ds),to=pe({},Ds,{view:0,detail:0}),V0=ut(to),Al,Ol,Js,za=pe({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kc,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!==Js&&(Js&&e.type==="mousemove"?(Al=e.screenX-Js.screenX,Ol=e.screenY-Js.screenY):Ol=Al=0,Js=e),Al)},movementY:function(e){return"movementY"in e?e.movementY:Ol}}),fh=ut(za),q0=pe({},za,{dataTransfer:0}),K0=ut(q0),G0=pe({},to,{relatedTarget:0}),Nl=ut(G0),Q0=pe({},Ds,{animationName:0,elapsedTime:0,pseudoElement:0}),J0=ut(Q0),Y0=pe({},Ds,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),X0=ut(Y0),Z0=pe({},Ds,{data:0}),ph=ut(Z0),ew={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tw={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"},rw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rw[e])?!!t[e]:!1}function Kc(){return nw}var sw=pe({},to,{key:function(e){if(e.key){var t=ew[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kc,charCode:function(e){return e.type==="keypress"?qo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iw=ut(sw),ow=pe({},za,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mh=ut(ow),aw=pe({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kc}),lw=ut(aw),uw=pe({},Ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),cw=ut(uw),dw=pe({},za,{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}),hw=ut(dw),fw=[9,13,27,32],Gc=or&&"CompositionEvent"in window,di=null;or&&"documentMode"in document&&(di=document.documentMode);var pw=or&&"TextEvent"in window&&!di,bm=or&&(!Gc||di&&8<di&&11>=di),gh=" ",vh=!1;function _m(e,t){switch(e){case"keyup":return fw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zn=!1;function mw(e,t){switch(e){case"compositionend":return xm(t);case"keypress":return t.which!==32?null:(vh=!0,gh);case"textInput":return e=t.data,e===gh&&vh?null:e;default:return null}}function gw(e,t){if(Zn)return e==="compositionend"||!Gc&&_m(e,t)?(e=wm(),Vo=Vc=Lr=null,Zn=!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 bm&&t.locale!=="ko"?null:t.data;default:return null}}var vw={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 yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vw[e.type]:t==="textarea"}function Sm(e,t,r,n){em(n),t=da(t,"onChange"),0<t.length&&(r=new qc("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var hi=null,Ri=null;function yw(e){Im(e,0)}function Ha(e){var t=rs(e);if(Kp(t))return e}function ww(e,t){if(e==="change")return t}var km=!1;if(or){var jl;if(or){var Il="oninput"in document;if(!Il){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),Il=typeof wh.oninput=="function"}jl=Il}else jl=!1;km=jl&&(!document.documentMode||9<document.documentMode)}function bh(){hi&&(hi.detachEvent("onpropertychange",Em),Ri=hi=null)}function Em(e){if(e.propertyName==="value"&&Ha(Ri)){var t=[];Sm(t,Ri,e,Fc(e)),sm(yw,t)}}function bw(e,t,r){e==="focusin"?(bh(),hi=t,Ri=r,hi.attachEvent("onpropertychange",Em)):e==="focusout"&&bh()}function _w(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ha(Ri)}function xw(e,t){if(e==="click")return Ha(t)}function Sw(e,t){if(e==="input"||e==="change")return Ha(t)}function kw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:kw;function Ai(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!lu.call(t,s)||!jt(e[s],t[s]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xh(e,t){var r=_h(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_h(r)}}function Tm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cm(){for(var e=window,t=sa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=sa(e.document)}return t}function Qc(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")}function Ew(e){var t=Cm(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Tm(r.ownerDocument.documentElement,r)){if(n!==null&&Qc(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=xh(r,i);var o=xh(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Tw=or&&"documentMode"in document&&11>=document.documentMode,es=null,Cu=null,fi=null,Pu=!1;function Sh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pu||es==null||es!==sa(n)||(n=es,"selectionStart"in n&&Qc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),fi&&Ai(fi,n)||(fi=n,n=da(Cu,"onSelect"),0<n.length&&(t=new qc("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=es)))}function _o(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ts={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionend:_o("Transition","TransitionEnd")},Ll={},Pm={};or&&(Pm=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Wa(e){if(Ll[e])return Ll[e];if(!ts[e])return e;var t=ts[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Pm)return Ll[e]=t[r];return e}var Rm=Wa("animationend"),Am=Wa("animationiteration"),Om=Wa("animationstart"),Nm=Wa("transitionend"),jm=new Map,kh="abort auxClick 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(" ");function en(e,t){jm.set(e,t),Nn(t,[e])}for(var $l=0;$l<kh.length;$l++){var Dl=kh[$l],Cw=Dl.toLowerCase(),Pw=Dl[0].toUpperCase()+Dl.slice(1);en(Cw,"on"+Pw)}en(Rm,"onAnimationEnd");en(Am,"onAnimationIteration");en(Om,"onAnimationStart");en("dblclick","onDoubleClick");en("focusin","onFocus");en("focusout","onBlur");en(Nm,"onTransitionEnd");Cs("onMouseEnter",["mouseout","mouseover"]);Cs("onMouseLeave",["mouseout","mouseover"]);Cs("onPointerEnter",["pointerout","pointerover"]);Cs("onPointerLeave",["pointerout","pointerover"]);Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="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(" "),Rw=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Eh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,C0(n,t,void 0,e),e.currentTarget=null}function Im(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Eh(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Eh(s,a,u),i=l}}}if(oa)throw e=Su,oa=!1,Su=null,e}function le(e,t){var r=t[ju];r===void 0&&(r=t[ju]=new Set);var n=e+"__bubble";r.has(n)||(Lm(t,e,2,!1),r.add(n))}function Ml(e,t,r){var n=0;t&&(n|=4),Lm(r,e,n,t)}var xo="_reactListening"+Math.random().toString(36).slice(2);function Oi(e){if(!e[xo]){e[xo]=!0,zp.forEach(function(r){r!=="selectionchange"&&(Rw.has(r)||Ml(r,!1,e),Ml(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xo]||(t[xo]=!0,Ml("selectionchange",!1,t))}}function Lm(e,t,r,n){switch(ym(t)){case 1:var s=H0;break;case 4:s=W0;break;default:s=Wc}r=s.bind(null,t,r,e),s=void 0,!xu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Ul(e,t,r,n,s){var i=n;
vendor: 2,645 bytes, line 37
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=pn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}sm(function(){var u=i,c=Fc(r),d=[];e:{var f=jm.get(e);if(f!==void 0){var h=qc,y=e;switch(e){case"keypress":if(qo(r)===0)break e;case"keydown":case"keyup":h=iw;break;case"focusin":y="focus",h=Nl;break;case"focusout":y="blur",h=Nl;break;case"beforeblur":case"afterblur":h=Nl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=K0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=lw;break;case Rm:case Am:case Om:h=J0;break;case Nm:h=cw;break;case"scroll":h=V0;break;case"wheel":h=hw;break;case"copy":case"cut":case"paste":h=X0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=mh}var g=(t&4)!==0,w=!g&&e==="scroll",m=g?f!==null?f+"Capture":null:f;g=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ei(p,m),_!=null&&g.push(Ni(p,_,v)))),w)break;p=p.return}0<g.length&&(f=new h(f,y,null,r,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==bu&&(y=r.relatedTarget||r.fromElement)&&(pn(y)||y[ar]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=r.relatedTarget||r.toElement,h=u,y=y?pn(y):null,y!==null&&(w=jn(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(g=fh,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(g=mh,_="onPointerLeave",m="onPointerEnter",p="pointer"),w=h==null?f:rs(h),v=y==null?f:rs(y),f=new g(_,p+"leave",h,r,c),f.target=w,f.relatedTarget=v,_=null,pn(c)===u&&(g=new g(m,p+"enter",y,r,c),g.target=v,g.relatedTarget=w,_=g),w=_,h&&y)t:{for(g=h,m=y,p=0,v=g;v;v=Fn(v))p++;for(v=0,_=m;_;_=Fn(_))v++;for(;0<p-v;)g=Fn(g),p--;for(;0<v-p;)m=Fn(m),v--;for(;p--;){if(g===m||m!==null&&g===m.alternate)break t;g=Fn(g),m=Fn(m)}g=null}else g=null;h!==null&&Th(d,f,h,g,!1),y!==null&&w!==null&&Th(d,w,y,g,!0)}}
vendor: 5,921 bytes, lines 37-38
37e:{if(f=u?rs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=ww;else if(yh(f))if(km)S=Sw;else{S=_w;var k=bw}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=xw);if(S&&(S=S(e,u))){Sm(d,S,r,c);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&mu(f,"number",f.value)}switch(k=u?rs(u):window,e){case"focusin":(yh(k)||k.contentEditable==="true")&&(es=k,Cu=u,fi=null);break;case"focusout":fi=Cu=es=null;break;case"mousedown":Pu=!0;break;case"contextmenu":case"mouseup":case"dragend":Pu=!1,Sh(d,r,c);break;case"selectionchange":if(Tw)break;case"keydown":case"keyup":Sh(d,r,c)}var E;if(Gc)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Zn?_m(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(bm&&r.locale!=="ko"&&(Zn||R!=="onCompositionStart"?R==="onCompositionEnd"&&Zn&&(E=wm()):(Lr=c,Vc="value"in Lr?Lr.value:Lr.textContent,Zn=!0)),k=da(u,R),0<k.length&&(R=new ph(R,e,null,r,c),d.push({event:R,listeners:k}),E?R.data=E:(E=xm(r),E!==null&&(R.data=E)))),(E=pw?mw(e,r):gw(e,r))&&(u=da(u,"onBeforeInput"),0<u.length&&(c=new ph("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=E))}Im(d,t)})}function Ni(e,t,r){return{instance:e,listener:t,currentTarget:r}}function da(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ei(e,r),i!=null&&n.unshift(Ni(e,i,s)),i=Ei(e,t),i!=null&&n.push(Ni(e,i,s))),e=e.return}return n}function Fn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Th(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=Ei(r,i),l!=null&&o.unshift(Ni(r,l,a))):s||(l=Ei(r,i),l!=null&&o.push(Ni(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Aw=/\r\n?/g,Ow=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(Aw,` 38`).replace(Ow,"")}function So(e,t,r){if(t=Ch(t),Ch(e)!==t&&r)throw Error(A(425))}function ha(){}var Ru=null,Au=null;function Ou(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Nu=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,Ph=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof Ph<"u"?function(e){return Ph.resolve(null).then(e).catch(Iw)}:Nu;function Iw(e){setTimeout(function(){throw e})}function Fl(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Pi(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Pi(t)}function Br(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==="$?")break;if(t==="/$")return null}}return e}function Rh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ms=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Ms,ji="__reactProps$"+Ms,ar="__reactContainer$"+Ms,ju="__reactEvents$"+Ms,Lw="__reactListeners$"+Ms,$w="__reactHandles$"+Ms;function pn(e){var t=e[Vt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ar]||r[Vt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rh(e);e!==null;){if(r=e[Vt])return r;e=Rh(e)}return t}e=r,r=e.parentNode}return null}function ro(e){return e=e[Vt]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Va(e){return e[ji]||null}var Iu=[],ns=-1;function tn(e){return{current:e}}function ue(e){0>ns||(e.current=Iu[ns],Iu[ns]=null,ns--)}function oe(e,t){ns++,Iu[ns]=e.current,e.current=t}var Kr={},Me=tn(Kr),Qe=tn(!1),Tn=Kr;function Ps(e,t){var r=e.type.contextTypes;if(!r)return Kr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Je(e){return e=e.childContextTypes,e!=null}function fa(){ue(Qe),ue(Me)}function Ah(e,t,r){if(Me.current!==Kr)throw Error(A(168));oe(Me,t),oe(Qe,r)}function $m(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(A(108,b0(e)||"Unknown",s));return pe({},r,n)}function pa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kr,Tn=Me.current,oe(Me,e),oe(Qe,Qe.current),!0}function Oh(e,t,r){var n=e.stateNode;if(!n)throw Error(A(169));r?(e=$m(e,t,Tn),n.__reactInternalMemoizedMergedChildContext=e,ue(Qe),ue(Me),oe(Me,e)):ue(Qe),oe(Qe,r)}var tr=null,qa=!1,Bl=!1;function Dm(e){tr===null?tr=[e]:tr.push(e)}function Dw(e){qa=!0,Dm(e)}function rn(){if(!Bl&&tr!==null){Bl=!0;var e=0,t=ne;try{var r=tr;for(ne=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}tr=null,qa=!1}catch(s){throw tr!==null&&(tr=tr.slice(e+1)),lm(Bc,rn),s}finally{ne=t,Bl=!1}}return null}var ss=[],is=0,ma=null,ga=0,ht=[],ft=0,Cn=null,nr=1,sr="";function cn(e,t){ss[is++]=ga,ss[is++]=ma,ma=e,ga=t}function Mm(e,t,r){ht[ft++]=nr,ht[ft++]=sr,ht[ft++]=Cn,Cn=e;var n=nr;e=sr;var s=32-Ot(n)-1;n&=~(1<<s),r+=1;var i=32-Ot(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,nr=1<<32-Ot(t)+s|r<<s|n,sr=i+e}else nr=1<<i|r<<s|n,sr=e}
vendor: 5,744 bytes, line 38
38function Jc(e){e.return!==null&&(cn(e,1),Mm(e,1,0))}function Yc(e){for(;e===ma;)ma=ss[--is],ss[is]=null,ga=ss[--is],ss[is]=null;for(;e===Cn;)Cn=ht[--ft],ht[ft]=null,sr=ht[--ft],ht[ft]=null,nr=ht[--ft],ht[ft]=null}var it=null,st=null,de=!1,At=null;function Um(e,t){var r=pt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Nh(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,it=e,st=Br(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,it=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cn!==null?{id:nr,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=pt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,it=e,st=null,!0):!1;default:return!1}}function Lu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $u(e){if(de){var t=st;if(t){var r=t;if(!Nh(e,t)){if(Lu(e))throw Error(A(418));t=Br(r.nextSibling);var n=it;t&&Nh(e,t)?Um(n,r):(e.flags=e.flags&-4097|2,de=!1,it=e)}}else{if(Lu(e))throw Error(A(418));e.flags=e.flags&-4097|2,de=!1,it=e}}}function jh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function ko(e){if(e!==it)return!1;if(!de)return jh(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ou(e.type,e.memoizedProps)),t&&(t=st)){if(Lu(e))throw Fm(),Error(A(418));for(;t;)Um(e,t),t=Br(t.nextSibling)}if(jh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){st=Br(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}st=null}}else st=it?Br(e.stateNode.nextSibling):null;return!0}function Fm(){for(var e=st;e;)e=Br(e.nextSibling)}function Rs(){st=it=null,de=!1}function Xc(e){At===null?At=[e]:At.push(e)}var Mw=hr.ReactCurrentBatchConfig;function Ys(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(A(309));var n=r.stateNode}if(!n)throw Error(A(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(A(284));if(!r._owner)throw Error(A(290,e))}return e}function Eo(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ih(e){var t=e._init;return t(e._payload)}function Bm(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function r(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function n(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function s(m,p){return m=Vr(m,p),m.index=0,m.sibling=null,m}function i(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,v,_){return p===null||p.tag!==6?(p=Gl(v,m.mode,_),p.return=m,p):(p=s(p,v),p.return=m,p)}function l(m,p,v,_){var S=v.type;return S===Xn?c(m,p,v.props.children,_,v.key):p!==null&&(p.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===kr&&Ih(S)===p.type)?(_=s(p,v.props),_.ref=Ys(m,p,v),_.return=m,_):(_=Zo(v.type,v.key,v.props,null,m.mode,_),_.ref=Ys(m,p,v),_.return=m,_)}function u(m,p,v,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Ql(v,m.mode,_),p.return=m,p):(p=s(p,v.children||[]),p.return=m,p)}function c(m,p,v,_,S){return p===null||p.tag!==7?(p=En(v,m.mode,_,S),p.return=m,p):(p=s(p,v),p.return=m,p)}function d(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Gl(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case po:return v=Zo(p.type,p.key,p.props,null,m.mode,v),v.ref=Ys(m,null,p),v.return=m,v;case Yn:return p=Ql(p,m.mode,v),p.return=m,p;case kr:var _=p._init;return d(m,_(p._payload),v)}if(si(p)||qs(p))return p=En(p,m.mode,v,null),p.return=m,p;Eo(m,p)}return null}function f(m,p,v,_){var S=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(m,p,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case po:return v.key===S?l(m,p,v,_):null;case Yn:return v.key===S?u(m,p,v,_):null;case kr:return S=v._init,f(m,p,S(v._payload),_)}if(si(v)||qs(v))return S!==null?null:c(m,p,v,_,null);Eo(m,v)}return null}function h(m,p,v,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return m=m.get(v)||null,a(p,m,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case po:return m=m.get(_.key===null?v:_.key)||null,l(p,m,_,S);case Yn:return m=m.get(_.key===null?v:_.key)||null,u(p,m,_,S);case kr:var k=_._init;return h(m,p,v,k(_._payload),S)}if(si(_)||qs(_))return m=m.get(v)||null,c(p,m,_,S,null);Eo(p,_)}return null}function y(m,p,v,_){for(var S=null,k=null,E=p,R=p=0,O=null;E!==null&&R<v.length;R++){E.index>R?(O=E,E=null):O=E.sibling;var j=f(m,E,v[R],_);if(j===null){E===null&&(E=O);break}e&&E&&j.alternate===null&&t(m,E),p=i(j,p,R),k===null?S=j:k.sibling=j,k=j,E=O}if(R===v.length)return r(m,E),de&&cn(m,R),S;if(E===null){for(;R<v.length;R++)E=d(m,v[R],_),E!==null&&(p=i(E,p,R),k===null?S=E:k.sibling=E,k=E);return de&&cn(m,R),S}for(E=n(m,E);R<v.length;R++)O=h(E,m,R,v[R],_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?R:O.key),p=i(O,p,R),k===null?S=O:k.sibling=O,k=O);
vendor: 1,476 bytes, line 38
38return e&&E.forEach(function(z){return t(m,z)}),de&&cn(m,R),S}function g(m,p,v,_){var S=qs(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var k=S=null,E=p,R=p=0,O=null,j=v.next();E!==null&&!j.done;R++,j=v.next()){E.index>R?(O=E,E=null):O=E.sibling;var z=f(m,E,j.value,_);if(z===null){E===null&&(E=O);break}e&&E&&z.alternate===null&&t(m,E),p=i(z,p,R),k===null?S=z:k.sibling=z,k=z,E=O}if(j.done)return r(m,E),de&&cn(m,R),S;if(E===null){for(;!j.done;R++,j=v.next())j=d(m,j.value,_),j!==null&&(p=i(j,p,R),k===null?S=j:k.sibling=j,k=j);return de&&cn(m,R),S}for(E=n(m,E);!j.done;R++,j=v.next())j=h(E,m,R,j.value,_),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?R:j.key),p=i(j,p,R),k===null?S=j:k.sibling=j,k=j);return e&&E.forEach(function(D){return t(m,D)}),de&&cn(m,R),S}function w(m,p,v,_){if(typeof v=="object"&&v!==null&&v.type===Xn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case po:e:{for(var S=v.key,k=p;k!==null;){if(k.key===S){if(S=v.type,S===Xn){if(k.tag===7){r(m,k.sibling),p=s(k,v.props.children),p.return=m,m=p;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===kr&&Ih(S)===k.type){r(m,k.sibling),p=s(k,v.props),p.ref=Ys(m,k,v),p.return=m,m=p;break e}r(m,k);break}else t(m,k);k=k.sibling}v.type===Xn?(p=En(v.props.children,m.mode,_,v.key),p.return=m,m=p):(_=Zo(v.type,v.key,v.props,null,m.mode,_),_.ref=Ys(m,p,v),_.return=m,m=_)}return o(m);
vendor: 5,981 bytes, line 38
38case Yn:e:{for(k=v.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){r(m,p.sibling),p=s(p,v.children||[]),p.return=m,m=p;break e}else{r(m,p);break}else t(m,p);p=p.sibling}p=Ql(v,m.mode,_),p.return=m,m=p}return o(m);case kr:return k=v._init,w(m,p,k(v._payload),_)}if(si(v))return y(m,p,v,_);if(qs(v))return g(m,p,v,_);Eo(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(r(m,p.sibling),p=s(p,v),p.return=m,m=p):(r(m,p),p=Gl(v,m.mode,_),p.return=m,m=p),o(m)):r(m,p)}return w}var As=Bm(!0),zm=Bm(!1),va=tn(null),ya=null,os=null,Zc=null;function ed(){Zc=os=ya=null}function td(e){var t=va.current;ue(va),e._currentValue=t}function Du(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function fs(e,t){ya=e,Zc=os=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Zc!==e)if(e={context:e,memoizedValue:t,next:null},os===null){if(ya===null)throw Error(A(308));os=e,ya.dependencies={lanes:0,firstContext:e}}else os=os.next=e;return t}var mn=null;function rd(e){mn===null?mn=[e]:mn.push(e)}function Hm(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,rd(t)):(r.next=s.next,s.next=r),t.interleaved=r,lr(e,n)}function lr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Er=!1;function nd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,lr(e,r)}return s=n.interleaved,s===null?(t.next=t,rd(n)):(t.next=s.next,s.next=t),n.interleaved=t,lr(e,r)}function Ko(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zc(e,r)}}function Lh(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function wa(e,t,r,n){var s=e.updateQueue;Er=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(f=t,h=r,g.tag){case 1:if(y=g.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=pe({},d,f);break e;case 2:Er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Rn|=o,e.lanes=o,e.memoizedState=d}}function $h(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(A(191,s));s.call(n)}}}var no={},Kt=tn(no),Ii=tn(no),Li=tn(no);function gn(e){if(e===no)throw Error(A(174));return e}function sd(e,t){switch(oe(Li,t),oe(Ii,e),oe(Kt,no),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vu(t,e)}ue(Kt),oe(Kt,t)}function Os(){ue(Kt),ue(Ii),ue(Li)}function Vm(e){gn(Li.current);var t=gn(Kt.current),r=vu(t,e.type);t!==r&&(oe(Ii,e),oe(Kt,r))}function id(e){Ii.current===e&&(ue(Kt),ue(Ii))}var he=tn(0);function ba(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 zl=[];function od(){for(var e=0;e<zl.length;e++)zl[e]._workInProgressVersionPrimary=null;zl.length=0}var Go=hr.ReactCurrentDispatcher,Hl=hr.ReactCurrentBatchConfig,Pn=0,fe=null,xe=null,Ee=null,_a=!1,pi=!1,$i=0,Uw=0;function Ie(){throw Error(A(321))}function ad(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!jt(e[r],t[r]))return!1;return!0}function ld(e,t,r,n,s,i){if(Pn=i,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Go.
vendor: 6,183 bytes, line 38
38current=e===null||e.memoizedState===null?Hw:Ww,e=r(n,s),pi){i=0;do{if(pi=!1,$i=0,25<=i)throw Error(A(301));i+=1,Ee=xe=null,t.updateQueue=null,Go.current=Vw,e=r(n,s)}while(pi)}if(Go.current=xa,t=xe!==null&&xe.next!==null,Pn=0,Ee=xe=fe=null,_a=!1,t)throw Error(A(300));return e}function ud(){var e=$i!==0;return $i=0,e}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?fe.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function vt(){if(xe===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=Ee===null?fe.memoizedState:Ee.next;if(t!==null)Ee=t,xe=e;else{if(e===null)throw Error(A(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ee===null?fe.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function Di(e,t){return typeof t=="function"?t(e):t}function Wl(e){var t=vt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=xe,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((Pn&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,fe.lanes|=c,Rn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,jt(n,t.memoizedState)||(Ge=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,fe.lanes|=i,Rn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Vl(e){var t=vt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);jt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function qm(){}function Km(e,t){var r=fe,n=vt(),s=t(),i=!jt(n.memoizedState,s);if(i&&(n.memoizedState=s,Ge=!0),n=n.queue,cd(Jm.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ee!==null&&Ee.memoizedState.tag&1){if(r.flags|=2048,Mi(9,Qm.bind(null,r,n,s,t),void 0,null),Te===null)throw Error(A(349));Pn&30||Gm(r,t,s)}return s}function Gm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Qm(e,t,r,n){t.value=r,t.getSnapshot=n,Ym(t)&&Xm(e)}function Jm(e,t,r){return r(function(){Ym(t)&&Xm(e)})}function Ym(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jt(e,r)}catch{return!0}}function Xm(e){var t=lr(e,1);t!==null&&Nt(t,e,1,-1)}function Dh(e){var t=Ut();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Di,lastRenderedState:e},t.queue=e,e=e.dispatch=zw.bind(null,fe,e),[t.memoizedState,e]}function Mi(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Zm(){return vt().memoizedState}function Qo(e,t,r,n){var s=Ut();fe.flags|=e,s.memoizedState=Mi(1|t,r,void 0,n===void 0?null:n)}function Ka(e,t,r,n){var s=vt();n=n===void 0?null:n;var i=void 0;if(xe!==null){var o=xe.memoizedState;if(i=o.destroy,n!==null&&ad(n,o.deps)){s.memoizedState=Mi(t,r,i,n);return}}fe.flags|=e,s.memoizedState=Mi(1|t,r,i,n)}function Mh(e,t){return Qo(8390656,8,e,t)}function cd(e,t){return Ka(2048,8,e,t)}function eg(e,t){return Ka(4,2,e,t)}function tg(e,t){return Ka(4,4,e,t)}function rg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ng(e,t,r){return r=r!=null?r.concat([e]):null,Ka(4,4,rg.bind(null,t,e),r)}function dd(){}function sg(e,t){var r=vt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ad(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ig(e,t){var r=vt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ad(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function og(e,t,r){return Pn&21?(jt(r,t)||(r=dm(),fe.lanes|=r,Rn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=r)}function Fw(e,t){var r=ne;ne=r!==0&&4>r?r:4,e(!0);var n=Hl.transition;Hl.transition={};try{e(!1),t()}finally{ne=r,Hl.transition=n}}function ag(){return vt().memoizedState}function Bw(e,t,r){var n=Wr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},lg(e))ug(t,r);else if(r=Hm(e,t,r,n),r!==null){var s=ze();Nt(r,e,n,s),cg(r,t,n)}}function zw(e,t,r){var n=Wr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(lg(e))ug(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,jt(a,o)){var l=t.interleaved;l===null?(s.next=s,rd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Hm(e,t,s,n),r!==null&&(s=ze(),Nt(r,e,n,s),cg(r,t,n))}}function lg(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function ug(e,t){pi=_a=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function cg(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zc(e,r)}}var xa={readContext:gt,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useInsertionEffect:Ie,useLayoutEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useMutableSource:Ie,useSyncExternalStore:Ie,useId:Ie,unstable_isNewReconciler:!1},Hw={readContext:gt,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Mh,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Qo(4194308,4,rg.b
vendor: 5,182 bytes, lines 38-40
38ind(null,t,e),r)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(4,2,e,t)},useMemo:function(e,t){var r=Ut();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ut();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Bw.bind(null,fe,e),[n.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:Dh,useDebugValue:dd,useDeferredValue:function(e){return Ut().memoizedState=e},useTransition:function(){var e=Dh(!1),t=e[0];return e=Fw.bind(null,e[1]),Ut().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=fe,s=Ut();if(de){if(r===void 0)throw Error(A(407));r=r()}else{if(r=t(),Te===null)throw Error(A(349));Pn&30||Gm(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,Mh(Jm.bind(null,n,i,e),[e]),n.flags|=2048,Mi(9,Qm.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ut(),t=Te.identifierPrefix;if(de){var r=sr,n=nr;r=(n&~(1<<32-Ot(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=$i++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Uw++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ww={readContext:gt,useCallback:sg,useContext:gt,useEffect:cd,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:Wl,useRef:Zm,useState:function(){return Wl(Di)},useDebugValue:dd,useDeferredValue:function(e){var t=vt();return og(t,xe.memoizedState,e)},useTransition:function(){var e=Wl(Di)[0],t=vt().memoizedState;return[e,t]},useMutableSource:qm,useSyncExternalStore:Km,useId:ag,unstable_isNewReconciler:!1},Vw={readContext:gt,useCallback:sg,useContext:gt,useEffect:cd,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:Vl,useRef:Zm,useState:function(){return Vl(Di)},useDebugValue:dd,useDeferredValue:function(e){var t=vt();return xe===null?t.memoizedState=e:og(t,xe.memoizedState,e)},useTransition:function(){var e=Vl(Di)[0],t=vt().memoizedState;return[e,t]},useMutableSource:qm,useSyncExternalStore:Km,useId:ag,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Mu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:pe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ga={isMounted:function(e){return(e=e._reactInternals)?jn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ze(),s=Wr(e),i=ir(n,s);i.payload=t,r!=null&&(i.callback=r),t=zr(e,i,s),t!==null&&(Nt(t,e,s,n),Ko(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ze(),s=Wr(e),i=ir(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=zr(e,i,s),t!==null&&(Nt(t,e,s,n),Ko(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ze(),n=Wr(e),s=ir(r,n);s.tag=2,t!=null&&(s.callback=t),t=zr(e,s,n),t!==null&&(Nt(t,e,n,r),Ko(t,e,n))}};function Uh(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Ai(r,n)||!Ai(s,i):!0}function dg(e,t,r){var n=!1,s=Kr,i=t.contextType;return typeof i=="object"&&i!==null?i=gt(i):(s=Je(t)?Tn:Me.current,n=t.contextTypes,i=(n=n!=null)?Ps(e,s):Kr),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ga,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Fh(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Ga.enqueueReplaceState(t,t.state,null)}function Uu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},nd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=gt(i):(i=Je(t)?Tn:Me.current,s.context=Ps(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Mu(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Ga.enqueueReplaceState(s,s.state,null),wa(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ns(e,t){try{var r="",n=t;do r+=w0(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function ql(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Fu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var qw=typeof WeakMap=="function"?WeakMap:Map;function hg(e,t,r){r=ir(-1,r),r.tag=3,r.payload={element:null};var n=t.value;
vendor: 7,433 bytes, line 40
40return r.callback=function(){ka||(ka=!0,Ju=n),Fu(e,t)},r}function fg(e,t,r){r=ir(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Fu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Fu(e,t),typeof n!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Bh(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new qw;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=ob.bind(null,e,t,r),t.then(e,e))}function zh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Hh(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ir(-1,1),t.tag=2,zr(r,t,1))),r.lanes|=1),e)}var Kw=hr.ReactCurrentOwner,Ge=!1;function Fe(e,t,r,n){t.child=e===null?zm(t,null,r,n):As(t,e.child,r,n)}function Wh(e,t,r,n,s){r=r.render;var i=t.ref;return fs(t,s),n=ld(e,t,r,n,i,s),r=ud(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ur(e,t,s)):(de&&r&&Jc(t),t.flags|=1,Fe(e,t,n,s),t.child)}function Vh(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!wd(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,pg(e,t,i,n,s)):(e=Zo(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Ai,r(o,n)&&e.ref===t.ref)return ur(e,t,s)}return t.flags|=1,e=Vr(i,n),e.ref=t.ref,e.return=t,t.child=e}function pg(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Ai(i,n)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,ur(e,t,s)}return Bu(e,t,r,n,s)}function mg(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(ls,tt),tt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(ls,tt),tt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,oe(ls,tt),tt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,oe(ls,tt),tt|=n;return Fe(e,t,s,r),t.child}function gg(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Bu(e,t,r,n,s){var i=Je(r)?Tn:Me.current;return i=Ps(t,i),fs(t,s),r=ld(e,t,r,n,i,s),n=ud(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ur(e,t,s)):(de&&n&&Jc(t),t.flags|=1,Fe(e,t,r,s),t.child)}function qh(e,t,r,n,s){if(Je(r)){var i=!0;pa(t)}else i=!1;if(fs(t,s),t.stateNode===null)Jo(e,t),dg(t,r,n),Uu(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=gt(u):(u=Je(r)?Tn:Me.current,u=Ps(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Fh(t,o,n,u),Er=!1;var f=t.memoizedState;o.state=f,wa(t,n,o,s),l=t.memoizedState,a!==n||f!==l||Qe.current||Er?(typeof c=="function"&&(Mu(t,r,c,n),l=t.memoizedState),(a=Er||Uh(t,r,a,n,f,l,u))?(d||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=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Wm(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:kt(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=gt(l):(l=Je(r)?Tn:Me.current,l=Ps(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Fh(t,o,n,l),Er=!1,f=t.memoizedState,o.state=f,wa(t,n,o,s);var y=t.memoizedState;a!==d||f!==y||Qe.current||Er?(typeof h=="function"&&(Mu(t,r,h,n),y=t.memoizedState),(u=Er||Uh(t,r,u,n,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),o.props=n,o.state=y,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return zu(e,t,r,n,i,s)}function zu(e,t,r,n,s,i){gg(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&Oh(t,r,!1),ur(e,t,i);n=t.stateNode,Kw.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=As(t,e.child,null,i),t.child=As(t,null,a,i)):Fe(e,t,a,i),t.memoizedState=n.state,s&&Oh(t,r,!0),t.child}function vg(e){var t=e.stateNode;t.pendingContext?Ah(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ah(e,t.context,!1),sd(e,t.containerInfo)}function Kh(e,t,r,n,s){return Rs(),Xc(s),t.flags|=256,Fe(e,t,r,n),t.child}var Hu={dehydrated:null,treeContext:null,retryLane:0};function Wu(e){return{baseLanes:e,cachePool:null,transitions:null}}function yg(e,t,r){var n=t.pendingProps,s=he.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(he,s&1),e===null)return $u(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Ya(o,n,0,null),e=En(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Wu(r),t.memoizedState=Hu,e):hd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Gw(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Vr(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Vr(a,i):(i=En(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Wu(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Hu,n}return i=e.child,e=i.sibling,n=Vr(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function hd(e,t){return t=Ya({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function To(e,t,r,n){return n!==null&&Xc(n),As(t,e.child,null,r),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gw(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=ql(Error(A(422))),To(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=Ya({mode:"visible",children:n.children},s,0,null),i=En(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&As(t,e.child,null,o),t.child.memoizedState=Wu(o),t.memoizedState=Hu,i);if(!(t.mode&1))return To(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(A(419)),n=ql(i,n,void 0),To(e,t,o,n)}if(a=(o&e.childLanes)!==0,Ge||a){if(n=Te,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,lr(e,s),Nt(n,e,s,-1))}return yd(),n=ql(Error(A(421))),To(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ab.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,st=Br(s.nextSibling),it=t,de=!0,At=null,e!==null&&(ht[ft++]=nr,ht[ft++]=sr,ht[ft++]=Cn,nr=e.id,sr=e.overflow,Cn=t),t=hd(t,n.children),t.flags|=4096,t)}function Gh(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Du(e.return,t,r)}function Kl(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function wg(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Fe(e,t,n.children,r),n=he.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gh(e,r,t);else if(e.tag===19)Gh(e,r,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}n&=1}if(oe(he,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&ba(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Kl(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ba(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Kl(t,!0,r,null,i);break;case"together":Kl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ur(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,r=Vr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Vr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Qw(e,t,r){switch(t.tag){case 3:vg(t),Rs();break;case 5:Vm(t);break;case 1:Je(t.type)&&pa(t);break;case 4:sd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;oe(va,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(oe(he,he.current&1),t.flags|=128,null):r&t.child.childLanes?yg(e,t,r):(oe(he,he.current&1),e=ur(e,t,r),e!==null?e.sibling:null);oe(he,he.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return wg(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(he,he.current),n)break;return null;case 22:case 23:return t.lanes=0,mg(e,t,r)}return ur(e,t,r)}var bg,Vu,_g,xg;bg=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Vu=function(){};_g=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,gn(Kt.current);var i=null;switch(r){case"input":s=fu(e,s),n=fu(e,n),i=[];break;case"select":s=pe({},s,{value:void 0}),n=pe({},n,{value:void 0}),i=[];break;case"textarea":s=gu(e,s),n=gu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ha)}yu(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Si.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Si.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};xg=function(e,t,r,n){r!==n&&(t.flags|=4)};function Xs(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Jw(e,t,r){var n=t.pendingProps;switch(Yc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Je(t.type)&&fa(),Le(t),null;case 3:return n=t.stateNode,Os(),ue(Qe),ue(Me),od(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ko(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,At!==null&&(Zu(At),At=null))),Vu(e,t),Le(t),null;case 5:id(t);var s=gn(Li.current);if(r=t.type,e!==null&&t.stateNode!=null)_g(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(A(166));return Le(t),null}if(e=gn(Kt.current),ko(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Vt]=t,n[ji]=i,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<oi.length;s++)le(oi[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":nh(n,i),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},le("invalid",n);break;case"textarea":ih(n,i),le("invalid",n)}yu(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&So(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&So(n.textContent,a,e),s=["children",""+a]):Si.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&le("scroll",n)}switch(r){case"input":mo(n),sh(n,i,!0);break;case"textarea":mo(n),oh(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ha)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Jp(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Vt]=t,e[ji]=n,bg(e,t,!1,!1),t.stateNode=e;e:{switch(o=wu(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<oi.length;s++)le(oi[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":nh(e,n),s=fu(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=pe({},n,{value:void 0}),le("invalid",e);break;case"textarea":ih(e,n),s=gu(e,n),le("invalid",e);break;default:s=n}yu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Zp(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Yp(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ki(e,l):typeof l=="number"&&ki(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Si.hasOwnProperty(i)?l!=null&&i==="onScroll"&&le("scroll",e):l!=null&&$c(e,i,l,o))}switch(r){case"input":mo(e),sh(e,n,!1);break;case"textarea":mo(e),oh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+qr(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?us(e,!!n.multiple,i,!1):n.defaultValue!=null&&us(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ha)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)xg(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(A(166));if(r=gn(Li.current),gn(Kt.current),ko(t)){if(n=t.stateNode,r=t.memoizedProps,n[Vt]=t,(i=n.nodeValue!==r)&&(e=it,e!==null))switch(e.tag){case 3:So(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&So(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Vt]=t,t.stateNode=n}return Le(t),null;case 13:if(ue(he),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&st!==null&&t.mode&1&&!(t.flags&128))Fm(),Rs(),t.flags|=98560,i=!1;else if(i=ko(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(A(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(A(317));i[Vt]=t}else Rs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Le(t),i=!1}else At!==null&&(Zu(At),At=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||he.current&1?ke===0&&(ke=3):yd())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Os(),Vu(e,t),e===null&&Oi(t.stateNode.containerInfo),Le(t),null;case 10:return td(t.type._context),Le(t),null;case 17:return Je(t.type)&&fa(),Le(t),null;case 19:if(ue(he),i=t.memoizedState,i===null)return Le(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Xs(i,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ba(e),o!==null){for(t.flags|=128,Xs(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return oe(he,he.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>js&&(t.flags|=128,n=!0,Xs(i,!1),t.lanes=4194304)}else{if(!n)if(e=ba(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Xs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!de)return Le(t),null}else 2*ye()-i.renderingStartTime>js&&r!==1073741824&&(t.flags|=128,n=!0,Xs(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,r=he.current,oe(he,n?r&1|2:r&1),t):(Le(t),null);case 22:case 23:return vd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?tt&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function Yw(e,t){switch(Yc(t),t.tag){case 1:return Je(t.type)&&fa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Os(),ue(Qe),ue(Me),od(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return id(t),null;case 13:if(ue(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(he),null;case 4:return Os(),null;case 10:return td(t.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var Co=!1,De=!1,Xw=typeof WeakSet=="function"?WeakSet:Set,$=null;function as(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ve(e,t,n)}else r.current=null}function qu(e,t,r){try{r()}catch(n){ve(e,t,n)}}var Qh=!1;function Zw(e,t){if(Ru=ua,e=Cm(),Qc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===s&&(a=o),f===i&&++c===n&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Au={focusedElem:e,selectionRange:r},ua=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:kt(t.type,g),w);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(_){ve(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return y=Qh,Qh=!1,y}function mi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&qu(t,r,i)}s=s.next}while(s!==n)}}function Qa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ku(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Sg(e){var t=e.alternate;t!==null&&(e.alternate=null,Sg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[ji],delete t[ju],delete t[Lw],delete t[$w])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kg(e){return e.tag===5||e.tag===3||e.tag===4}function Jh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kg(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.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 Gu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ha));else if(n!==4&&(e=e.child,e!==null))for(Gu(e,t,r),e=e.sibling;e!==null;)Gu(e,t,r),e=e.sibling}function Qu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qu(e,t,r),e=e.sibling;e!==null;)Qu(e,t,r),e=e.sibling}var Re=null,Rt=!1;function br(e,t,r){for(r=r.child;r!==null;)Eg(e,t,r),r=r.sibling}function Eg(e,t,r){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Ba,r)}catch{}switch(r.tag){case 5:De||as(r,t);case 6:var n=Re,s=Rt;Re=null,br(e,t,r),Re=n,Rt=s,Re!==null&&(Rt?(e=Re,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Re.removeChild(r.stateNode));break;case 18:Re!==null&&(Rt?(e=Re,r=r.stateNode,e.nodeType===8?Fl(e.parentNode,r):e.nodeType===1&&Fl(e,r),Pi(e)):Fl(Re,r.stateNode));break;case 4:n=Re,s=Rt,Re=r.stateNode.containerInfo,Rt=!0,br(e,t,r),Re=n,Rt=s;break;case 0:case 11:case 14:case 15:if(!De&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&qu(r,t,o),s=s.next}while(s!==n)}br(e,t,r);break;case 1:if(!De&&(as(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ve(r,t,a)}br(e,t,r);break;case 21:br(e,t,r);break;case 22:r.mode&1?(De=(n=De)||r.memoizedState!==null,br(e,t,r),De=n):br(e,t,r);break;default:br(e,t,r)}}function Yh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Xw),t.forEach(function(n){var s=lb.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function _t(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Re=a.stateNode,Rt=!1;break e;case 3:Re=a.stateNode.containerInfo,Rt=!0;break e;case 4:Re=a.stateNode.containerInfo,Rt=!0;break e}a=a.return}if(Re===null)throw Error(A(160));Eg(i,o,s),Re=null,Rt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ve(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Tg(t,e),t=t.sibling}function Tg(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_t(t,e),Dt(e),n&4){try{mi(3,e,e.return),Qa(3,e)}catch(g){ve(e,e.return,g)}try{mi(5,e,e.return)}catch(g){ve(e,e.return,g)}}break;case 1:_t(t,e),Dt(e),n&512&&r!==null&&as(r,r.return);break;case 5:if(_t(t,e),Dt(e),n&512&&r!==null&&as(r,r.return),e.flags&32){var s=e.stateNode;try{ki(s,"")}catch(g){ve(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Gp(s,i),wu(a,o);var u=wu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Zp(s,d):c==="dangerouslySetInnerHTML"?Yp(s,d):c==="children"?ki(s,d):$c(s,c,d,u)}switch(a){case"input":pu(s,i);break;case"textarea":Qp(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?us(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?us(s,!!i.multiple,i.defaultValue,!0):us(s,!!i.multiple,i.multiple?[]:"",!1))}s[ji]=i}catch(g){ve(e,e.return,g)}}break;case 6:if(_t(t,e),Dt(e),n&4){if(e.stateNode===null)throw Error(A(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){ve(e,e.return,g)}}break;case 3:if(_t(t,e),Dt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Pi(t.containerInfo)}catch(g){ve(e,e.return,g)}break;case 4:_t(t,e),Dt(e);break;case 13:_t(t,e),Dt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(md=ye())),n&4&&Yh(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(De=(u=De)||c,_t(t,e),De=u):_t(t,e),Dt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for($=e,c=e.child;c!==null;){for(d=$=c;$!==null;){switch(f=$,h=f.child,f.tag){case 0:case 11:case 14:case 15:mi(4,f,f.return);break;case 1:as(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){ve(n,r,g)}}break;case 5:as(f,f.return);break;case 22:if(f.memoizedState!==null){Zh(d);continue}}h!==null?(h.return=f,$=h):Zh(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Xp("display",o))}catch(g){ve(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){ve(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_t(t,e),Dt(e),n&4&&Yh(e);break;case 21:break;default:_t(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(kg(r)){var n=r;break e}r=r.return}throw Error(A(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ki(s,""),n.flags&=-33);var i=Jh(e);Qu(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Jh(e);Gu(e,a,o);break;default:throw Error(A(161))}}catch(l){ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eb(e,t,r){$=e,Cg(e)}function Cg(e,t,r){for(var n=(e.mode&1)!==0;$!==null;){var s=$,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Co;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||De;a=Co;var u=De;if(Co=o,(De=l)&&!u)for($=s;$!==null;)o=$,l=o.child,o.tag===22&&o.memoizedState!==null?ef(s):l!==null?(l.return=o,$=l):ef(s);for(;i!==null;)$=i,Cg(i),i=i.sibling;$=s,Co=a,De=u}Xh(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,$=i):Xh(e)}}function Xh(e){for(;$!==null;){var t=$;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:De||Qa(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!De)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:kt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&$h(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}$h(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Pi(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}De||t.flags&512&&Ku(t)}catch(f){ve(t,t.return,f)}}if(t===e){$=null;break}if(r=t.sibling,r!==null){r.return=t.return,$=r;break}$=t.return}}function Zh(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$=r;break}$=t.return}}function ef(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Qa(4,t)}catch(l){ve(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ve(t,s,l)}}var i=t.return;try{Ku(t)}catch(l){ve(t,i,l)}break;case 5:var o=t.return;try{Ku(t)}catch(l){ve(t,o,l)}}}catch(l){ve(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var tb=Math.ceil,Sa=hr.ReactCurrentDispatcher,fd=hr.ReactCurrentOwner,mt=hr.ReactCurrentBatchConfig,ee=0,Te=null,_e=null,Ae=0,tt=0,ls=tn(0),ke=0,Ui=null,Rn=0,Ja=0,pd=0,gi=null,Ke=null,md=0,js=1/0,Xt=null,ka=!1,Ju=null,Hr=null,Po=!1,$r=null,Ea=0,vi=0,Yu=null,Yo=-1,Xo=0;function ze(){return ee&6?ye():Yo!==-1?Yo:Yo=ye()}function Wr(e){return e.mode&1?ee&2&&Ae!==0?Ae&-Ae:Mw.transition!==null?(Xo===0&&(Xo=dm()),Xo):(e=ne,e!==0||(e=window.event,e=e===void 0?16:ym(e.type)),e):1}function Nt(e,t,r,n){if(50<vi)throw vi=0,Yu=null,Error(A(185));eo(e,r,n),(!(ee&2)||e!==Te)&&(e===Te&&(!(ee&2)&&(Ja|=r),ke===4&&Cr(e,Ae)),Ye(e,n),r===1&&ee===0&&!(t.mode&1)&&(js=ye()+500,qa&&rn()))}function Ye(e,t){var r=e.callbackNode;M0(e,t);var n=la(e,e===Te?Ae:0);if(n===0)r!==null&&uh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&uh(r),t===1)e.tag===0?Dw(tf.bind(null,e)):Dm(tf.bind(null,e)),jw(function(){!(ee&6)&&rn()}),r=null;else{switch(hm(n)){case 1:r=Bc;break;case 4:r=um;break;case 16:r=aa;break;case 536870912:r=cm;break;default:r=aa}r=Lg(r,Pg.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Pg(e,t){if(Yo=-1,Xo=0,ee&6)throw Error(A(327));var r=e.callbackNode;if(ps()&&e.callbackNode!==r)return null;var n=la(e,e===Te?Ae:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ta(e,n);else{t=n;var s=ee;ee|=2;var i=Ag();(Te!==e||Ae!==t)&&(Xt=null,js=ye()+500,kn(e,t));do try{sb();break}catch(a){Rg(e,a)}while(!0);ed(),Sa.current=i,ee=s,_e!==null?t=0:(Te=null,Ae=0,t=ke)}if(t!==0){if(t===2&&(s=ku(e),s!==0&&(n=s,t=Xu(e,s))),t===1)throw r=Ui,kn(e,0),Cr(e,n),Ye(e,ye()),r;if(t===6)Cr(e,n);else{if(s=e.current.alternate,!(n&30)&&!rb(s)&&(t=Ta(e,n),t===2&&(i=ku(e),i!==0&&(n=i,t=Xu(e,i))),t===1))throw r=Ui,kn(e,0),Cr(e,n),Ye(e,ye()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(A(345));case 2:dn(e,Ke,Xt);break;case 3:if(Cr(e,n),(n&130023424)===n&&(t=md+500-ye(),10<t)){if(la(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){ze(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Nu(dn.bind(null,e,Ke,Xt),t);break}dn(e,Ke,Xt);break;case 4:if(Cr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-Ot(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=ye()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*tb(n/1960))-n,10<n){e.timeoutHandle=Nu(dn.bind(null,e,Ke,Xt),n);break}dn(e,Ke,Xt);break;case 5:dn(e,Ke,Xt);break;default:throw Error(A(329))}}}return Ye(e,ye()),e.callbackNode===r?Pg.bind(null,e):null}function Xu(e,t){var r=gi;return e.current.memoizedState.isDehydrated&&(kn(e,t).flags|=256),e=Ta(e,t),e!==2&&(t=Ke,Ke=r,t!==null&&Zu(t)),e}function Zu(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function rb(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!jt(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Cr(e,t){for(t&=~pd,t&=~Ja,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ot(t),n=1<<r;e[r]=-1,t&=~n}}function tf(e){if(ee&6)throw Error(A(327));ps();var t=la(e,0);if(!(t&1))return Ye(e,ye()),null;var r=Ta(e,t);if(e.tag!==0&&r===2){var n=ku(e);n!==0&&(t=n,r=Xu(e,n))}if(r===1)throw r=Ui,kn(e,0),Cr(e,t),Ye(e,ye()),r;if(r===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dn(e,Ke,Xt),Ye(e,ye()),null}function gd(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(js=ye()+500,qa&&rn())}}function An(e){$r!==null&&$r.tag===0&&!(ee&6)&&ps();var t=ee;ee|=1;var r=mt.transition,n=ne;try{if(mt.transition=null,ne=1,e)return e()}finally{ne=n,mt.transition=r,ee=t,!(ee&6)&&rn()}}function vd(){tt=ls.current,ue(ls)}function kn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Nw(r)),_e!==null)for(r=_e.return;r!==null;){var n=r;switch(Yc(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&fa();break;case 3:Os(),ue(Qe),ue(Me),od();break;case 5:id(n);break;case 4:Os();break;case 13:ue(he);break;case 19:ue(he);break;case 10:td(n.type._context);break;case 22:case 23:vd()}r=r.return}if(Te=e,_e=e=Vr(e.current,null),Ae=tt=t,ke=0,Ui=null,pd=Ja=Rn=0,Ke=gi=null,mn!==null){for(t=0;t<mn.length;t++)if(r=mn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}mn=null}return e}function Rg(e,t){do{var r=_e;try{if(ed(),Go.current=xa,_a){for(var n=fe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}_a=!1}if(Pn=0,Ee=xe=fe=null,pi=!1,$i=0,fd.current=null,r===null||r.return===null){ke=1,Ui=t,_e=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Ae,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=zh(o);if(h!==null){h.flags&=-257,Hh(h,o,a,i,t),h.mode&1&&Bh(i,u,t),t=h,l=u;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){Bh(i,u,t),yd();break e}l=Error(A(426))}}else if(de&&a.mode&1){var w=zh(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Hh(w,o,a,i,t),Xc(Ns(l,a));break e}}i=l=Ns(l,a),ke!==4&&(ke=2),gi===null?gi=[i]:gi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=hg(i,l,t);Lh(i,m);break e;case 1:a=l;var p=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Hr===null||!Hr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=fg(i,a,t);Lh(i,_);break e}}i=i.return}while(i!==null)}Ng(r)}catch(S){t=S,_e===r&&r!==null&&(_e=r=r.return);continue}break}while(!0)}function Ag(){var e=Sa.current;return Sa.current=xa,e===null?xa:e}function yd(){(ke===0||ke===3||ke===2)&&(ke=4),Te===null||!(Rn&268435455)&&!(Ja&268435455)||Cr(Te,Ae)}function Ta(e,t){var r=ee;ee|=2;var n=Ag();(Te!==e||Ae!==t)&&(Xt=null,kn(e,t));do try{nb();break}catch(s){Rg(e,s)}while(!0);if(ed(),ee=r,Sa.current=n,_e!==null)throw Error(A(261));return Te=null,Ae=0,ke}function nb(){for(;_e!==null;)Og(_e)}function sb(){for(;_e!==null&&!R0();)Og(_e)}function Og(e){var t=Ig(e.alternate,e,tt);e.memoizedProps=e.pendingProps,t===null?Ng(e):_e=t,fd.current=null}function Ng(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Yw(r,t),r!==null){r.flags&=32767,_e=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,_e=null;return}}else if(r=Jw(r,t,tt),r!==null){_e=r;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);ke===0&&(ke=5)}function dn(e,t,r){var n=ne,s=mt.transition;try{mt.transition=null,ne=1,ib(e,t,r,n)}finally{mt.transition=s,ne=n}return null}function ib(e,t,r,n){do ps();while($r!==null);if(ee&6)throw Error(A(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(U0(e,i),e===Te&&(_e=Te=null,Ae=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Po||(Po=!0,Lg(aa,function(){return ps(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=mt.transition,mt.transition=null;var o=ne;ne=1;var a=ee;ee|=4,fd.current=null,Zw(e,r),Tg(r,e),Ew(Au),ua=!!Ru,Au=Ru=null,e.current=r,eb(r),A0(),ee=a,ne=o,mt.transition=i}else e.current=r;if(Po&&(Po=!1,$r=e,Ea=s),i=e.pendingLanes,i===0&&(Hr=null),j0(r.stateNode),Ye(e,ye()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(ka)throw ka=!1,e=Ju,Ju=null,e;return Ea&1&&e.tag!==0&&ps(),i=e.pendingLanes,i&1?e===Yu?vi++:(vi=0,Yu=e):vi=0,rn(),null}function ps(){if($r!==null){var e=hm(Ea),t=mt.transition,r=ne;try{if(mt.transition=null,ne=16>e?16:e,$r===null)var n=!1;else{if(e=$r,$r=null,Ea=0,ee&6)throw Error(A(331));var s=ee;for(ee|=4,$=e.current;$!==null;){var i=$,o=i.child;if($.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var c=$;switch(c.tag){case 0:case 11:case 15:mi(8,c,i)}var d=c.child;if(d!==null)d.return=c,$=d;else for(;$!==null;){c=$;var f=c.sibling,h=c.return;if(Sg(c),c===u){$=null;break}if(f!==null){f.return=h,$=f;break}$=h}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}$=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,$=o;else e:for(;$!==null;){if(i=$,i.flags&2048)switch(i.tag){case 0:case 11:case 15:mi(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,$=m;break e}$=i.return}}var p=e.current;for($=p;$!==null;){o=$;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,$=v;else e:for(o=p;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qa(9,a)}}catch(S){ve(a,a.return,S)}if(a===o){$=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,$=_;break e}$=a.return}}if(ee=s,rn(),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(Ba,e)}catch{}n=!0}return n}finally{ne=r,mt.transition=t}}return!1}function rf(e,t,r){t=Ns(r,t),t=hg(e,t,1),e=zr(e,t,1),t=ze(),e!==null&&(eo(e,1,t),Ye(e,t))}function ve(e,t,r){if(e.tag===3)rf(e,e,r);else for(;t!==null;){if(t.tag===3){rf(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Hr===null||!Hr.has(n))){e=Ns(r,e),e=fg(t,e,1),t=zr(t,e,1),e=ze(),t!==null&&(eo(t,1,e),Ye(t,e));break}}t=t.return}}function ob(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=ze(),e.pingedLanes|=e.suspendedLanes&r,Te===e&&(Ae&r)===r&&(ke===4||ke===3&&(Ae&130023424)===Ae&&500>ye()-md?kn(e,0):pd|=r),Ye(e,t)}function jg(e,t){t===0&&(e.mode&1?(t=yo,yo<<=1,!(yo&130023424)&&(yo=4194304)):t=1);var r=ze();e=lr(e,t),e!==null&&(eo(e,t,r),Ye(e,r))}function ab(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),jg(e,r)}function lb(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(A(314))}n!==null&&n.delete(t),jg(e,r)}var Ig;Ig=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ge=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ge=!1,Qw(e,t,r);Ge=!!(e.flags&131072)}else Ge=!1,de&&t.flags&1048576&&Mm(t,ga,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Jo(e,t),e=t.pendingProps;var s=Ps(t,Me.current);fs(t,r),s=ld(null,t,n,e,s,r);var i=ud();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(n)?(i=!0,pa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,nd(t),s.updater=Ga,t.stateNode=s,s._reactInternals=t,Uu(t,n,e,r),t=zu(null,t,n,!0,i,r)):(t.tag=0,de&&i&&Jc(t),Fe(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Jo(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=cb(n),e=kt(n,e),s){case 0:t=Bu(null,t,n,e,r);break e;case 1:t=qh(null,t,n,e,r);break e;case 11:t=Wh(null,t,n,e,r);break e;case 14:t=Vh(null,t,n,kt(n.type,e),r);break e}throw Error(A(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kt(n,s),Bu(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kt(n,s),qh(e,t,n,s,r);case 3:e:{if(vg(t),e===null)throw Error(A(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Wm(e,t),wa(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ns(Error(A(423)),t),t=Kh(e,t,n,r,s);break e}else if(n!==s){s=Ns(Error(A(424)),t),t=Kh(e,t,n,r,s);break e}else for(st=Br(t.stateNode.containerInfo.firstChild),it=t,de=!0,At=null,r=zm(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Rs(),n===s){t=ur(e,t,r);break e}Fe(e,t,n,r)}t=t.child}return t;case 5:return Vm(t),e===null&&$u(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ou(n,s)?o=null:i!==null&&Ou(n,i)&&(t.flags|=32),gg(e,t),Fe(e,t,o,r),t.child;case 6:return e===null&&$u(t),null;case 13:return yg(e,t,r);case 4:return sd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=As(t,null,n,r):Fe(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kt(n,s),Wh(e,t,n,s,r);case 7:return Fe(e,t,t.pendingProps,r),t.child;case 8:return Fe(e,t,t.pendingProps.children,r),t.child;case 12:return Fe(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,oe(va,n._currentValue),n._currentValue=o,i!==null)if(jt(i.value,o)){if(i.children===s.children&&!Qe.current){t=ur(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ir(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Du(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(A(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Du(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Fe(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,fs(t,r),s=gt(s),n=n(s),t.flags|=1,Fe(e,t,n,r),t.child;case 14:return n=t.type,s=kt(n,t.pendingProps),s=kt(n.type,s),Vh(e,t,n,s,r);case 15:return pg(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kt(n,s),Jo(e,t),t.tag=1,Je(n)?(e=!0,pa(t)):e=!1,fs(t,r),dg(t,n,s),Uu(t,n,s,r),zu(null,t,n,!0,e,r);case 19:return wg(e,t,r);case 22:return mg(e,t,r)}throw Error(A(156,t.tag))};function Lg(e,t){return lm(e,t)}function ub(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,r,n){return new ub(e,t,r,n)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cb(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mc)return 11;if(e===Uc)return 14}return 2}function Vr(e,t){var r=e.alternate;return r===null?(r=pt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 4,751 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zo(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")wd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xn:return En(r.children,s,i,t);case Dc:o=8,s|=8;break;case uu:return e=pt(12,r,t,s|2),e.elementType=uu,e.lanes=i,e;case cu:return e=pt(13,r,t,s),e.elementType=cu,e.lanes=i,e;case du:return e=pt(19,r,t,s),e.elementType=du,e.lanes=i,e;case Vp:return Ya(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hp:o=10;break e;case Wp:o=9;break e;case Mc:o=11;break e;case Uc:o=14;break e;case kr:o=16,n=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=pt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function En(e,t,r,n){return e=pt(7,e,n,t),e.lanes=r,e}function Ya(e,t,r,n){return e=pt(22,e,n,t),e.elementType=Vp,e.lanes=r,e.stateNode={isHidden:!1},e}function Gl(e,t,r){return e=pt(6,e,null,t),e.lanes=r,e}function Ql(e,t,r){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function db(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function bd(e,t,r,n,s,i,o,a,l){return e=new db(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},nd(i),e}function hb(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yn,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function $g(e){if(!e)return Kr;e=e._reactInternals;e:{if(jn(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var r=e.type;if(Je(r))return $m(e,r,t)}return t}function Dg(e,t,r,n,s,i,o,a,l){return e=bd(r,n,!0,e,s,i,o,a,l),e.context=$g(null),r=e.current,n=ze(),s=Wr(r),i=ir(n,s),i.callback=t??null,zr(r,i,s),e.current.lanes=s,eo(e,s,n),Ye(e,n),e}function Xa(e,t,r,n){var s=t.current,i=ze(),o=Wr(s);return r=$g(r),t.context===null?t.context=r:t.pendingContext=r,t=ir(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=zr(s,t,o),e!==null&&(Nt(e,s,o,i),Ko(e,s,o)),o}function Ca(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function nf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function _d(e,t){nf(e,t),(e=e.alternate)&&nf(e,t)}function fb(){return null}var Mg=typeof reportError=="function"?reportError:function(e){console.error(e)};function xd(e){this._internalRoot=e}Za.prototype.render=xd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Xa(e,t,null,null)};Za.prototype.unmount=xd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;An(function(){Xa(null,e,null,null)}),t[ar]=null}};function Za(e){this._internalRoot=e}Za.prototype.unstable_scheduleHydration=function(e){if(e){var t=mm();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Tr.length&&t!==0&&t<Tr[r].priority;r++);Tr.splice(r,0,e),r===0&&vm(e)}};function Sd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function el(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sf(){}function pb(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Ca(o);i.call(u)}}var o=Dg(t,n,e,0,null,!1,!1,"",sf);return e._reactRootContainer=o,e[ar]=o.current,Oi(e.nodeType===8?e.parentNode:e),An(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Ca(l);a.call(u)}}var l=bd(e,0,!1,null,null,!1,!1,"",sf);return e._reactRootContainer=l,e[ar]=l.current,Oi(e.nodeType===8?e.parentNode:e),An(function(){Xa(t,l,r,n)}),l}function tl(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Ca(o);a.call(l)}}Xa(t,o,e,s)}
vendor: 4,752 bytes, line 40
40else o=pb(r,t,e,s,n);return Ca(o)}fm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ii(t.pendingLanes);r!==0&&(zc(t,r|1),Ye(t,ye()),!(ee&6)&&(js=ye()+500,rn()))}break;case 13:An(function(){var n=lr(e,1);if(n!==null){var s=ze();Nt(n,e,1,s)}}),_d(e,1)}};Hc=function(e){if(e.tag===13){var t=lr(e,134217728);if(t!==null){var r=ze();Nt(t,e,134217728,r)}_d(e,134217728)}};pm=function(e){if(e.tag===13){var t=Wr(e),r=lr(e,t);if(r!==null){var n=ze();Nt(r,e,t,n)}_d(e,t)}};mm=function(){return ne};gm=function(e,t){var r=ne;try{return ne=e,t()}finally{ne=r}};_u=function(e,t,r){switch(t){case"input":if(pu(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Va(n);if(!s)throw Error(A(90));Kp(n),pu(n,s)}}}break;case"textarea":Qp(e,r);break;case"select":t=r.value,t!=null&&us(e,!!r.multiple,t,!1)}};rm=gd;nm=An;var mb={usingClientEntryPoint:!1,Events:[ro,rs,Va,em,tm,gd]},Zs={findFiberByHostInstance:pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gb={bundleType:Zs.bundleType,version:Zs.version,rendererPackageName:Zs.rendererPackageName,rendererConfig:Zs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=om(e),e===null?null:e.stateNode},findFiberByHostInstance:Zs.findFiberByHostInstance||fb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ro.isDisabled&&Ro.supportsFiber)try{Ba=Ro.inject(gb),qt=Ro}catch{}}lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mb;lt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sd(t))throw Error(A(200));return hb(e,t,null,r)};lt.createRoot=function(e,t){if(!Sd(e))throw Error(A(299));var r=!1,n="",s=Mg;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=bd(e,1,!1,null,null,r,!1,n,s),e[ar]=t.current,Oi(e.nodeType===8?e.parentNode:e),new xd(t)};lt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=om(t),e=e===null?null:e.stateNode,e};lt.flushSync=function(e){return An(e)};lt.hydrate=function(e,t,r){if(!el(t))throw Error(A(200));return tl(null,e,t,!0,r)};lt.hydrateRoot=function(e,t,r){if(!Sd(e))throw Error(A(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Mg;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Dg(t,null,e,1,r??null,s,!1,i,o),e[ar]=t.current,Oi(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Za(t)};lt.render=function(e,t,r){if(!el(t))throw Error(A(200));return tl(null,e,t,!1,r)};lt.unmountComponentAtNode=function(e){if(!el(e))throw Error(A(40));return e._reactRootContainer?(An(function(){tl(null,null,e,!1,function(){e._reactRootContainer=null,e[ar]=null})}),!0):!1};lt.unstable_batchedUpdates=gd;lt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!el(r))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return tl(e,t,r,!1,n)};lt.version="18.3.1-next-f1338f8080-20240426";function Ug(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ug)}catch(e){console.error(e)}}Ug(),Up.exports=lt;var so=Up.exports;const Fg=Tp(so);var Bg,of=so;Bg=of.createRoot,of.hydrateRoot;const vb=1,yb=1e6;let Jl=0;function wb(){return Jl=(Jl+1)%Number.MAX_SAFE_INTEGER,Jl.toString()}const Yl=new Map,af=e=>{if(Yl.has(e))return;const t=setTimeout(()=>{Yl.delete(e),yi({type:"REMOVE_TOAST",toastId:e})},yb);Yl.set(e,t)},bb=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,vb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
40return r?af(r):e.toasts.forEach(n=>{af(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ea=[];let ta={toasts:[]};function yi(e){ta=bb(ta,e),ea.forEach(t=>{t(ta)})}function ec({...e}){const t=wb(),r=s=>yi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>yi({type:"DISMISS_TOAST",toastId:t});return yi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function _b(){const[e,t]=b.useState(ta);return b.useEffect(()=>(ea.push(t),()=>{const r=ea.indexOf(t);r>-1&&ea.splice(r,1)}),[e]),{...e,toast:ec,dismiss:r=>yi({type:"DISMISS_TOAST",toastId:r})}}function Se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function lf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zg(...e){return t=>{let r=!1;const n=e.map(s=>{const i=lf(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():lf(e[s],null)}}}}function It(...e){return b.useCallback(zg(...e),e)}function rl(e,t=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const u=d=>{var m;const{scope:f,children:h,...y}=d,g=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,w=b.useMemo(()=>y,Object.values(y));return x.jsx(g.Provider,{value:w,children:h})};u.displayName=i+"Provider";function c(d,f){var g;const h=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,y=b.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,xb(s,...t)]}function xb(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Pa(e){const t=kb(e),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(Tb);if(l){const u=l.props.children,c=a.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return x.jsx(t,{...o,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return x.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var Sb=Pa("Slot");function kb(e){const t=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=Pb(s),a=Cb(i,s.props);return s.type!==b.Fragment&&(a.ref=n?zg(n,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hg=Symbol("radix.slottable");function Eb(e){const t=({children:r})=>x.jsx(x.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Hg,t}function Tb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hg}function Cb(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function Pb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Rb(e){const t=e+"CollectionProvider",[r,n]=rl(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:w,children:m}=g,p=N.useRef(null),v=N.useRef(new Map).current;return x.jsx(s,{scope:w,itemMap:v,collectionRef:p,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=Pa(a),u=N.forwardRef((g,w)=>{const{scope:m,children:p}=g,v=i(a,m),_=It(w,v.collectionRef);return x.jsx(l,{ref:_,children:p})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Pa(c),h=N.forwardRef((g,w)=>{const{scope:m,children:p,...v}
vendor: 8,360 bytes, line 40
40=g,_=N.useRef(null),S=It(w,_),k=i(c,m);return N.useEffect(()=>(k.itemMap.set(_,{ref:_,...v}),()=>void k.itemMap.delete(_))),x.jsx(f,{[d]:"",ref:S,children:p})});h.displayName=c;function y(g){const w=i(e+"CollectionConsumer",g);return N.useCallback(()=>{const p=w.collectionRef.current;if(!p)return[];const v=Array.from(p.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((k,E)=>v.indexOf(k.ref.current)-v.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,n]}var Ab=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=Ab.reduce((e,t)=>{const r=Pa(`Primitive.${t}`),n=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Wg(e,t){e&&so.flushSync(()=>e.dispatchEvent(t))}function Gr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Ob(e,t=globalThis==null?void 0:globalThis.document){const r=Gr(e);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Nb="DismissableLayer",tc="dismissableLayer.update",jb="dismissableLayer.pointerDownOutside",Ib="dismissableLayer.focusOutside",uf,Vg=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=b.useContext(Vg),[c,d]=b.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),y=It(t,E=>d(E)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(w),p=c?g.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,_=p>=m,S=$b(E=>{const R=E.target,O=[...u.branches].some(j=>j.contains(R));!_||O||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),k=Db(E=>{const R=E.target;[...u.branches].some(j=>j.contains(R))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return Ob(E=>{p===u.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),b.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(uf=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),cf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=uf)}},[c,f,r,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),cf())},[c,u]),b.useEffect(()=>{const E=()=>h({});return document.addEventListener(tc,E),()=>document.removeEventListener(tc,E)},[]),x.jsx(Ze.div,{...l,ref:y,style:{pointerEvents:v?_?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,S.onPointerDownCapture)})});kd.displayName=Nb;var Lb="DismissableLayerBranch",qg=b.forwardRef((e,t)=>{const r=b.useContext(Vg),n=b.useRef(null),s=It(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),x.jsx(Ze.div,{...e,ref:s})});qg.displayName=Lb;function $b(e,t=globalThis==null?void 0:globalThis.document){const r=Gr(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Kg(jb,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Db(e,t=globalThis==null?void 0:globalThis.document){const r=Gr(e),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&Kg(Ib,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function cf(){const e=new CustomEvent(tc);document.dispatchEvent(e)}function Kg(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Wg(s,i):s.dispatchEvent(i)}var Mb=kd,Ub=qg,Qr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Fb="Portal",Gg=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=b.useState(!1);Qr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Fg.createPortal(x.jsx(Ze.div,{...n,ref:t}),o):null});Gg.displayName=Fb;function Bb(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var Ed=e=>{const{present:t,children:r}=e,n=zb(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=It(n.ref,Hb(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};Ed.displayName="Presence";function zb(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=Bb(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Ao(n.current);i.current=a==="mounted"?u:"none"},[a]),Qr(()=>{const u=n.current,c=s.current;if(c!==e){const f=i.current,h=Ao(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Qr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const g=Ao(n.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=h=>{h.target===t&&(i.current=Ao(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ao(e){return(e==null?void 0:e.animationName)||"none"}function Hb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Wb=Dp[" useInsertionEffect ".trim().toString()]||Qr;function Vb({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=qb({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=b.useRef(e!==void 0);b.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,n])}const u=b.useCallback(c=>{var d;if(a){const f=Kb(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else i(c)},[a,e,i,o]);return[l,u]}function qb({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),i=b.useRef(t);return Wb(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function Kb(e){return typeof e=="function"}var Gb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qb="VisuallyHidden",nl=b.forwardRef((e,t)=>
40x.jsx(Ze.span,{...e,ref:t,style:{...Gb,...e.style}}));nl.displayName=Qb;var Jb=nl,Td="ToastProvider",[Cd,Yb,Xb]=Rb("Toast"),[Qg,AC]=rl("Toast",[Xb]),[Zb,sl]=Qg(Td),Jg=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Td}\`. Expected non-empty \`string\`.`),x.jsx(Cd.Provider,{scope:t,children:x.jsx(Zb,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>c(h=>h+1),[]),onToastRemove:b.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Jg.displayName=Td;var Yg="ToastViewport",e_=["F8"],rc="toast.viewportPause",nc="toast.viewportResume",Xg=b.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=e_,label:s="Notifications ({hotkey})",...i}=e,o=sl(Yg,r),a=Yb(r),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),f=It(t,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;b.useEffect(()=>{const w=m=>{var v;n.length!==0&&n.every(_=>m[_]||m.code===_)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),b.useEffect(()=>{const w=l.current,m=d.current;if(y&&w&&m){const p=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(rc);m.dispatchEvent(k),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(nc);m.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!w.contains(k.relatedTarget)&&v()},S=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",p),w.addEventListener("focusout",_),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",S),window.addEventListener("blur",p),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",p),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const g=b.useCallback(({tabbingDirection:w})=>{const p=a().map(v=>{const _=v.ref.current,S=[_,...f_(_)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?p.reverse():p).flat()},[a]);return b.useEffect(()=>{const w=d.current;if(w){const m=p=>{var S,k,E;const v=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!v){const R=document.activeElement,O=p.shiftKey;if(p.target===w&&O){(S=u.current)==null||S.focus();return}const D=g({tabbingDirection:O?"backwards":"forwards"}),Q=D.findIndex(I=>I===R);Xl(D.slice(Q+1))?p.preventDefault():O?(k=u.current)==null||k.focus():(E=c.current)==null||E.focus()}};return w.addEventListener("keydown",m),()=>w.removeEventListener("keydown",m)}},[a,g]),x.jsxs(Ub,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&x.jsx(sc,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Xl(w)}}),x.jsx(Cd.Slot,{scope:r,children:x.jsx(Ze.ol,{tabIndex:-1,...i,ref:f})}),y&&x.jsx(sc,{ref:c,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Xl(w)}})]})});Xg.displayName=Yg;var Zg="ToastFocusProxy",sc=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=sl(Zg,r);return x.jsx(nl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});sc.displayName=Zg;var io="Toast",t_="toast.swipeStart",r_="toast.swipeMove",n_="toast.swipeCancel",s_="toast.swipeEnd",ev=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Vb({prop:n,defaultProp:s??!0,onChange:i,caller:io});return x.jsx(Ed,{present:r||a,children:x.jsx(a_,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Gr(e.onPause),onResume:Gr(e.onResume),onSwipeStart:Se(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Se(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Se(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Se(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});ev.displayName=io;var[i_,o_]=Qg(io,{onClose(){}}),a_=b.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=e,g=sl(io,r),[w,m]=b.useState(null),p=It(t,I=>m(I)),v=b.useRef(null),_=b.useRef(null),S=s||g.duration,k=b.useRef(0),E=b.useRef(S),R=b.useRef(0),{onToastAdd:O,onToastRemove:j}=g,z=Gr(()=>{var Z;(w==null?void 0:w.contains(document.activeElement))&&((Z=g.viewport)==null||Z.focus()),o()}),D=b.useCallback(I=>{!I||I===1/0||(window.clearTimeout(R.current),k.current=new Date().getTime(),R.current=window.setTimeout(z,I))},[z]);b.useEffect(()=>{const I=g.viewport;if(I){const Z=()=>{D(E.current),u==null||u()},H=()=>{const K=new Date().getTime()-k.current;E.current=E.current-K,window.clearTimeout(R.current),l==null||l()};return I.addEventListener(rc,H),I.addEventListener(nc,Z),()=>{I.removeEventListener(rc,H),I.removeEventListener(nc,Z)}}},[g.viewport,S,l,u,D]),b.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(S)},[i,S,g.isClosePausedRef,D]),b.useEffect(()=>(O(),()=>j()),[O,j]);const Q=b.useMemo(()=>w?av(w):null,[w]);return g.viewport?x.jsxs(x.Fragment,{children:[Q&&x.jsx(l_,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),x.jsx(i_,{scope:r,onClose:z,children:so.createPortal(x.jsx(Cd.ItemSlot,{scope:r,children:x.jsx(Mb,{asChild:!0,onEscapeKeyDown:Se(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||z(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Ze.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Se(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:Se(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:Se(e.onPointerMove,I=>{if(!v.current)return;const Z=I.clientX-v.current.x,H=I.clientY-v.current.y,K=!!_.current,C=["left","right"].includes(g.swipeDirection),P=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,L=C?P(0,Z):0,q=C?0:P(0,H),F=I.pointerType==="touch"?10:2,J={x:L,y:q},X={originalEvent:I,delta:J};K?(_.current=J,Oo(r_,d,X,{discrete:!1})):df(J,g.swipeDirection,F)?(_.current=J,Oo(t_,c,X,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(Z)>F||Math.abs(H)>F)&&(v.current=null)}),onPointerUp:Se(e.onPointerUp,I=>{const Z=_.current,H=I.target;if(H.hasPointerCapture(I.pointerId)&&H.releasePointerCapture(I.pointerId),_.current=null,v.current=null,Z){const K=I.currentTarget,C={originalEvent:I,delta:Z};df(Z,g.swipeDirection,g.swipeThreshold)?Oo(s_,h,C,{discrete:!0}):Oo(n_,f,C,{discrete:!0}),K.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),l_=e=>{const{__scopeToast:t,children:r,...n}=e,s=sl(io,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return d_(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(Gg,{asChild:!0,children:x.jsx(nl,{...n,children:i&&x.jsxs(x.Fragment,{children:[s.label," ",r]})})})},u_="ToastTitle",tv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(Ze.div,{...n,ref:t})});tv.displayName=u_;var c_="ToastDescription",rv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(Ze.div,{...n,ref:t})});rv.displayName=c_;var nv="ToastAction",sv=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?x.jsx(ov,{altText:r,asChild:!0,children:x.jsx(Pd,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nv}\`. Expected non-empty \`string\`.`),null)});
vendor: 6,109 bytes, lines 40-90
40sv.displayName=nv;var iv="ToastClose",Pd=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=o_(iv,r);return x.jsx(ov,{asChild:!0,children:x.jsx(Ze.button,{type:"button",...n,ref:t,onClick:Se(e.onClick,s.onClose)})})});Pd.displayName=iv;var ov=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return x.jsx(Ze.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function av(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),h_(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...av(n))}}),t}function Oo(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Wg(s,i):s.dispatchEvent(i)}var df=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function d_(e=()=>{}){const t=Gr(e);Qr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function h_(e){return e.nodeType===e.ELEMENT_NODE}function f_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Xl(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var p_=Jg,lv=Xg,uv=ev,cv=tv,dv=rv,hv=sv,fv=Pd;function pv(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=pv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function mv(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=pv(e))&&(n&&(n+=" "),n+=t);return n}const hf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ff=mv,gv=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ff(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=hf(c)||hf(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...u,d,f]:u},[]);return ff(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const m_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vv=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var g_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const v_=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...g_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:vv("lucide",s),...a},[...o.map(([u,c])=>b.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Us=(e,t)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(v_,{ref:i,iconNode:t,className:vv(`lucide-${m_(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const y_=Us("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const w_=Us("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const b_=Us("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const __=Us("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const x_=Us("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const S_=Us("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 90
90],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Rd="-",k_=e=>{const t=T_(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Rd);return a[0]===""&&a.length!==1&&a.shift(),yv(a,t)||E_(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},yv=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?yv(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Rd);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},pf=/^\[(.+)\]$/,E_=e=>{if(pf.test(e)){const t=pf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},T_=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return P_(Object.entries(e.classGroups),r).forEach(([i,o])=>{ic(o,n,i,t)}),n},ic=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:mf(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(C_(s)){ic(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{ic(o,mf(t,i),r,n)})})},mf=(e,t)=>{let r=e;return t.split(Rd).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},C_=e=>e.isThemeGetter,P_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,R_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},wv="!",A_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let m=a[w];if(u===0){if(m===s&&(n||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(m==="/"){d=w;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(wv),y=h?f.substring(1):f,g=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return r?a=>r({className:a,parseClassName:o}):o},O_=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},N_=e=>({cache:R_(e.cacheSize),parseClassName:A_(e),...k_(e)}),j_=/\s+/,I_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(j_);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let y=!!h,g=n(y?f.substring(0,h):f);if(!g){if(!y){a=u+(a.length>0?" "+a:a);continue}if(g=n(f),!g){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=O_(c).join(":"),m=d?w+wv:w,p=m+g;if(i.includes(p))continue;i.push(p);const v=s(g,y);for(let _=0;_<v.length;++_){const S=v[_];i.push(m+S)}a=u+(a.length>0?" "+a:a)}return a};function L_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=bv(t))&&(n&&(n+=" "),n+=r);return n}const bv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bv(e[n]))&&(r&&(r+=" "),r+=t);return r};function $_(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return r=N_(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=I_(l,r);return s(l,c),c}return function(){return i(L_.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},_v=/^\[(?:([a-z-]+):)?(.+)\]$/i,D_=/^\d+\/\d+$/,M_=new Set(["px","full","screen"]),U_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,B_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,z_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jt=e=>ms(e)||M_.has(e)||D_.test(e),_r=e=>Fs(e,"length",Y_),ms=e=>!!e&&!Number.isNaN(Number(e)),Zl=e=>Fs(e,"number",ms),ei=e=>!!e&&Number.isInteger(Number(e)),W_=e=>e.endsWith("%")&&ms(e.slice(0,-1)),G=e=>_v.test(e),xr=e=>U_.test(e),V_=new Set(["length","size","percentage"]),q_=e=>Fs(e,V_,xv),K_=e=>Fs(e,"position",xv),G_=new Set(["image","url"]),Q_=e=>Fs(e,G_,Z_),J_=e=>Fs(e,"",X_),ti=()=>!0,Fs=(e,t,r)=>{const n=_v.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Y_=e=>F_.test(e)&&!B_.test(e),xv=()=>!1,X_=e=>z_.test(e),Z_=e=>H_.test(e),ex=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),s=ae("borderColor"),i=ae("borderRadius"),o=ae("borderSpacing"),a=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),c=ae("hueRotate"),d=ae("invert"),f=ae("gap"),h=ae("gradientColorStops"),y=ae("gradientColorStopPositions"),g=ae("inset"),w=ae("margin"),m=ae("opacity"),p=ae("padding"),v=ae("saturate"),_=ae("scale"),S=ae("sepia"),k=ae("skew"),E=ae("space"),R=ae("translate"),O=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",G,t],D=()=>[G,t],Q=()=>["",Jt,_r],I=()=>["auto",ms,G],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",G],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[ms,G];return{cacheSize:500,separator:":",theme:{colors:[ti],spacing:[Jt,_r],blur:["none","",xr,G],brightness:q(),borderColor:[e],borderRadius:["none","","full",xr,G],borderSpacing:D(),borderWidth:Q(),contrast:q(),grayscale:P(),hueRotate:q(),invert:P(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[W_,_r],inset:z(),margin:z(),opacity:q(),padding:D(),saturate:q(),scale:q(),sepia:P(),skew:q(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[xr]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),G]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ei,G]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",ei,G]}],"grid-cols":[{"grid-cols":[ti]}],"col-start-end":[{col:["auto",{span:["full",ei,G]},G]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ti]}],"row-start-end":[{row:["auto",{span:[ei,G]},G]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[xr]},xr]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xr,_r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zl]}],"font-family":[{font:[ti]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",G]}],"line-clamp":[{"line-clamp":["none",ms,Zl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Jt,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Jt,_r]}],"underline-offset":[{"underline-offset":["auto",Jt,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),K_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Q_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}
vendor: 5,172 bytes, line 90
90],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:H()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Jt,G]}],"outline-w":[{outline:[Jt,_r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Jt,_r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xr,J_]}],"shadow-color":[{shadow:[ti]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xr,G]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ei,G]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 90
90],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jt,_r,Zl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},tx=$_(ex);function nn(...e){return tx(mv(e))}const rx=p_,Sv=b.forwardRef(({className:e,...t},r)=>x.jsx(lv,{ref:r,className:nn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Sv.displayName=lv.displayName;const nx=gv("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),kv=b.forwardRef(({className:e,variant:t,...r},n)=>x.jsx(uv,{ref:n,className:nn(nx({variant:t}),e),...r}));kv.displayName=uv.displayName;const sx=b.forwardRef(({className:e,...t},r)=>x.jsx(hv,{ref:r,className:nn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));sx.displayName=hv.displayName;const Ev=b.forwardRef(({className:e,...t},r)=>x.jsx(fv,{ref:r,className:nn("absolute right-2 top-2 rounded-md p-1 text-foreground
90/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(S_,{className:"h-4 w-4"})}));Ev.displayName=fv.displayName;const Tv=b.forwardRef(({className:e,...t},r)=>x.jsx(cv,{ref:r,className:nn("text-sm font-semibold",e),...t}));Tv.displayName=cv.displayName;const Cv=b.forwardRef(({className:e,...t},r)=>x.jsx(dv,{ref:r,className:nn("text-sm opacity-90",e),...t}));Cv.displayName=dv.displayName;function ix(){const{toasts:e}=_b();return x.jsxs(rx,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return x.jsxs(kv,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[r&&x.jsx(Tv,{children:r}),n&&x.jsx(Cv,{children:n})]}),s,x.jsx(Ev,{})]},t)}),x.jsx(Sv,{})]})}var gf=["light","dark"],ox="(prefers-color-scheme: dark)",ax=b.createContext(void 0),lx={setTheme:e=>{},themes:[]},ux=()=>{var e;return(e=b.useContext(ax))!=null?e:lx};b.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?gf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,g=!1,w=!0)=>{let m=o?o[y]:y,p=g?y+"|| ''":`'${m}'`,v="";return s&&w&&!g&&gf.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),r==="class"?g||m?v+=`c.add(${p})`:v+="null":m&&(v+=`d[s](n,${p})`),v},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${ox}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var cx=e=>{switch(e){case"success":return fx;case"info":return mx;case"warning":return px;case"error":return gx;default:return null}},dx=Array(12).fill(0),hx=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},dx.map((r,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),fx=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),px=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mx=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gx=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vx=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yx=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},oc=1,wx=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 90
90{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:oc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
90this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],N.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(_x(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||oc++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},qe=new wx,bx=(e,t)=>{let r=(t==null?void 0:t.id)||oc++;return qe.addToast({title:e,...t,id:r}),r},_x=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xx=bx,Sx=()=>qe.toasts,kx=()=>qe.getActiveToasts();Object.assign(xx,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:Sx,getToasts:kx});function Ex(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Ex(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
90left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
90:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
90--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 91`);function No(e){return e.label!==void 0}var Tx=3,Cx="32px",Px="16px",vf=4e3,Rx=356,Ax=14,Ox=20,Nx=200;function xt(...e){return e.filter(Boolean).join(" ")}function jx(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var Ix=e=>{var t,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:y,interacting:g,setHeights:w,visibleToasts:m,heights:p,index:v,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:R,style:O,cancelButtonStyle:j,actionButtonStyle:z,className:D="",descriptionClassName:Q="",duration:I,position:Z,gap:H,loadingIcon:K,expandByDefault:C,classNames:P,icons:L,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:F}=e,[J,X]=N.useState(null),[we,Ne]=N.useState(null),[re,In]=N.useState(!1),[pr,sn]=N.useState(!1),[mr,Ln]=N.useState(!1),[gr,lo]=N.useState(!1),[wl,uo]=N.useState(!1),[bl,Ws]=N.useState(0),[$n,Wd]=N.useState(0),Vs=N.useRef(h.duration||I||vf),Vd=N.useRef(null),on=N.useRef(null),$y=v===0,Dy=v+1<=m,ct=h.type,Dn=h.dism
vendor: 1,631 bytes, line 91
91issible!==!1,My=h.className||"",Uy=h.descriptionClassName||"",co=N.useMemo(()=>p.findIndex(W=>W.toastId===h.id)||0,[p,h.id]),Fy=N.useMemo(()=>{var W;return(W=h.closeButton)!=null?W:R},[h.closeButton,R]),qd=N.useMemo(()=>h.duration||I||vf,[h.duration,I]),_l=N.useRef(0),Mn=N.useRef(0),Kd=N.useRef(0),Un=N.useRef(null),[By,zy]=Z.split("-"),Gd=N.useMemo(()=>p.reduce((W,se,ce)=>ce>=co?W:W+se.height,0),[p,co]),Qd=yx(),Hy=h.invert||f,xl=ct==="loading";Mn.current=N.useMemo(()=>co*H+Gd,[co,Gd]),N.useEffect(()=>{Vs.current=qd},[qd]),N.useEffect(()=>{In(!0)},[]),N.useEffect(()=>{let W=on.current;if(W){let se=W.getBoundingClientRect().height;return Wd(se),w(ce=>[{toastId:h.id,height:se,position:h.position},...ce]),()=>w(ce=>ce.filter(yt=>yt.toastId!==h.id))}},[w,h.id]),N.useLayoutEffect(()=>{if(!re)return;let W=on.current,se=W.style.height;W.style.height="auto";let ce=W.getBoundingClientRect().height;W.style.height=se,Wd(ce),w(yt=>yt.find(wt=>wt.toastId===h.id)?yt.map(wt=>wt.toastId===h.id?{...wt,height:ce}:wt):[{toastId:h.id,height:ce,position:h.position},...yt])},[re,h.title,h.description,w,h.id]);let vr=N.useCallback(()=>{sn(!0),Ws(Mn.current),w(W=>W.filter(se=>se.toastId!==h.id)),setTimeout(()=>{k(h)},Nx)},[h,k,w,Mn]);N.useEffect(()=>{if(h.promise&&ct==="loading"||h.duration===1/0||h.type==="loading")return;let W;return S||g||F&&Qd?(()=>{if(Kd.current<_l.current){let se=new Date().getTime()-_l.current;Vs.current=Vs.current-se}Kd.current=new Date().getTime()})():Vs.current!==1/0&&(_l.current=new Date().getTime(),W=setTimeout(()=>{var se;(se=h.onAutoClose)==null||se.call(h,h),vr()},Vs.current)),()=>clearTimeout(W)}
91,[S,g,h,ct,F,Qd,vr]),N.useEffect(()=>{h.delete&&vr()},[vr,h.delete]);function Wy(){var W,se,ce;return L!=null&&L.loading?N.createElement("div",{className:xt(P==null?void 0:P.loader,(W=h==null?void 0:h.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":ct==="loading"},L.loading):K?N.createElement("div",{className:xt(P==null?void 0:P.loader,(se=h==null?void 0:h.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":ct==="loading"},K):N.createElement(hx,{className:xt(P==null?void 0:P.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader),visible:ct==="loading"})}return N.createElement("li",{tabIndex:0,ref:on,className:xt(D,My,P==null?void 0:P.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[ct],(r=h==null?void 0:h.classNames)==null?void 0:r[ct]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:E,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":re,"data-promise":!!h.promise,"data-swiped":wl,"data-removed":pr,"data-visible":Dy,"data-y-position":By,"data-x-position":zy,"data-index":v,"data-front":$y,"data-swiping":mr,"data-dismissible":Dn,"data-type":ct,"data-invert":Hy,"data-swipe-out":gr,"data-swipe-direction":we,"data-expanded":!!(S||C&&re),style:{"--index":v,"--toasts-before":v,"--z-index":_.length-v,"--offset":`${pr?bl:Mn.current}px`,"--initial-height":C?"auto":`${$n}px`,...O,...h.style},onDragEnd:()=>{Ln(!1),X(null),Un.current=null},onPointerDown:W=>{xl||!Dn||(Vd.current=new Date,Ws(Mn.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(Ln(!0),Un.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,se,ce,yt;if(gr||!Dn)return;Un.current=null;let wt=Number(((W=on.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yr=Number(((se=on.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),an=new Date().getTime()-((ce=Vd.current)==null?void 0:ce.getTime()),bt=J==="x"?wt:yr,wr=Math.abs(bt)/an;if(Math.abs(bt)>=Ox||wr>.11){Ws(Mn.current),(yt=h.onDismiss)==null||yt.call(h,h),Ne(J==="x"?wt>0?"right":"left":yr>0?"down":"up"),vr(),lo(!0),uo(!1);return}Ln(!1),X(null)},onPointerMove:W=>{var se,ce,yt,wt;if(!Un.current||!Dn||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;let yr=W.clientY-Un.current.y,an=W.clientX-Un.current.x,bt=(ce=e.swipeDirections)!=null?ce:jx(Z);!J&&(Math.abs(an)>1||Math.abs(yr)>1)&&X(Math.abs(an)>Math.abs(yr)?"x":"y");let wr={x:0,y:0};J==="y"?(bt.includes("top")||bt.includes("bottom"))&&(bt.includes("top")&&yr<0||bt.includes("bottom")&&yr>0)&&(wr.y=yr):J==="x"&&(bt.includes("left")||bt.includes("right"))&&(bt.includes("left")&&an<0||bt.includes("right")&&an>0)&&(wr.x=an),(Math.abs(wr.x)>0||Math.abs(wr.y)>0)&&uo(!0),(yt=on.current)==null||yt.style.setProperty("--swipe-amount-x",`${wr.x}px`),(wt=on.current)==null||wt.style.setProperty("--swipe-amount-y",`${wr.y}px`)}},Fy&&!h.jsx?N.createElement("button",{"aria-label":q,"data-disabled":xl,"data-close-button":!0,onClick:xl||!Dn?()=>{}:()=>{var W;vr(),(W=h.onDismiss)==null||W.call(h,h)},className:xt(P==null?void 0:P.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=L==null?void 0:L.close)!=null?i:vx):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:N.createElement(N.Fragment,null,ct||h.icon||h.promise?N.createElement("div",{"data-icon":"",className:xt(P==null?void 0:P.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Wy():null,h.type!=="loading"?h.icon||(L==null?void 0:L[ct])||cx(ct):null):null,N.createElement("div",{"data-content":"",className:xt(P==null?void 0:P.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:xt(P==null?void 0:P.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?N.createElement("div",{"data-description":"",className:xt(Q,Uy,P==null?void 0:P.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&No(h.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:W=>{var se,ce;No(h.cancel)&&Dn&&((ce=(se=h.cancel).onClick)==null||ce.call(se,W),vr())},className:xt(P==null?void 0:P.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&No(h.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:W=>{var se,ce;No(h.action)&&((ce=(se=h.action).onClick)==null||ce.call(se,W),!W.defaultPrevented&&vr())},className:xt(P==null?void 0:P.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function yf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Lx(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?Px:Cx;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var $x=b.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:y=Tx,toastOptions:g,dir:w=yf(),gap:m=Ax,loadingIcon:p,icons:v,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[k,E]=N.useState([]),R=N.useMemo(()=>Array.from(new Set([n].concat(k.filter(F=>F.position).map(F=>F.position)))),[k,n]),[O,j]=N.useState([]),[z,D]=N.useState(!1),[Q,I]=N.useState(!1),[Z,H]=N.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
91k":"light"),K=N.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=N.useRef(null),L=N.useRef(!1),q=N.useCallback(F=>{E(J=>{var X;return(X=J.find(we=>we.id===F.id))!=null&&X.delete||qe.dismiss(F.id),J.filter(({id:we})=>we!==F.id)})},[]);return N.useEffect(()=>qe.subscribe(F=>{if(F.dismiss){E(J=>J.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Fg.flushSync(()=>{E(J=>{let X=J.findIndex(we=>we.id===F.id);return X!==-1?[...J.slice(0,X),{...J[X],...F},...J.slice(X+1)]:[F,...J]})})})}),[]),N.useEffect(()=>{if(c!=="system"){H(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:J})=>{H(J?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{H(X?"dark":"light")}catch(we){console.error(we)}})}},[c]),N.useEffect(()=>{k.length<=1&&D(!1)},[k]),N.useEffect(()=>{let F=J=>{var X,we;s.every(Ne=>J[Ne]||J.code===Ne)&&(D(!0),(X=K.current)==null||X.focus()),J.code==="Escape"&&(document.activeElement===K.current||(we=K.current)!=null&&we.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),N.useEffect(()=>{if(K.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,L.current=!1)}},[K.current]),N.createElement("section",{ref:t,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((F,J)=>{var X;let[we,Ne]=F.split("-");return k.length?N.createElement("ol",{key:F,dir:w==="auto"?yf():w,tabIndex:-1,ref:K,className:a,"data-sonner-toaster":!0,"data-theme":Z,"data-y-position":we,"data-lifted":z&&k.length>1&&!i,"data-x-position":Ne,style:{"--front-toast-height":`${((X=O[0])==null?void 0:X.height)||0}px`,"--width":`${Rx}px`,"--gap":`${m}px`,...h,...Lx(l,u)},onBlur:re=>{L.current&&!re.currentTarget.contains(re.relatedTarget)&&(L.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L.current||(L.current=!0,P.current=re.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Q||D(!1)},onDragEnd:()=>D(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(re=>!re.position&&J===0||re.position===F).map((re,In)=>{var pr,sn;return N.createElement(Ix,{key:re.id,icons:v,index:In,toast:re,defaultRichColors:d,duration:(pr=g==null?void 0:g.duration)!=null?pr:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:y,closeButton:(sn=g==null?void 0:g.closeButton)!=null?sn:o,interacting:Q,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:q,toasts:k.filter(mr=>mr.position==re.position),heights:O.filter(mr=>mr.position==re.position),setHeights:j,expandByDefault:i,gap:m,loadingIcon:p,expanded:z,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const Dx=({...e})=>{const{theme:t="system"}=ux();return x.jsx($x,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},Mx=["top","right","bottom","left"],Jr=Math.min,rt=Math.max,Ra=Math.round,jo=Math.floor,Yr=e=>({x:e,y:e}),Ux={left:"right",right:"left",bottom:"top",top:"bottom"},Fx={start:"end",end:"start"};function ac(e,t,r){return rt(e,Jr(t,r))}function cr(e,t){return typeof e=="function"?e(t):e}function dr(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function Ad(e){return e==="x"?"y":"x"}function Od(e){return e==="y"?"height":"width"}function Xr(e){return["top","bottom"].includes(dr(e))?"y":"x"}function Nd(e){return Ad(Xr(e))}function Bx(e,t,r){r===void 0&&(r=!1);const n=Bs(e),s=Nd(e),i=Od(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Aa(o)),[o,Aa(o)]}function zx(e){const t=Aa(e);return[lc(e),t,lc(t)]}function lc(e){return e.replace(/start|end/g,t=>Fx[t])}function Hx(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function Wx(e,t,r,n){const s=Bs(e);let i=Hx(dr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(lc)))),i}function Aa(e){return e.replace(/left|right|bottom|top/g,t=>Ux[t])}function Vx(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pv(e){return typeof e!="number"?Vx(e):{top:e,right:e,bottom:e,left:e}}function Oa(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function wf(e,t,r){let{reference:n,floating:s}=e;const i=Xr(t),o=Nd(t),a=Od(o),l=dr(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Bs(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const qx=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,693 bytes, line 91
91=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=wf(u,n,l),f=n,h={},y=0;for(let g=0;g<a.length;g++){const{name:w,fn:m}=a[g],{x:p,y:v,data:_,reset:S}=await m({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=p??c,d=v??d,h={...h,[w]:{...h[w],..._}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:c,y:d}=wf(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function Fi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=cr(t,e),y=Pv(h),w=a[f?d==="floating"?"reference":"floating":d],m=Oa(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),p=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=Oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:v,strategy:l}):p);return{top:(m.top-S.top+y.top)/_.y,bottom:(S.bottom-m.bottom+y.bottom)/_.y,left:(m.left-S.left+y.left)/_.x,right:(S.right-m.right+y.right)/_.x}}const Kx=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=cr(e,t)||{};if(u==null)return{};const d=Pv(c),f={x:r,y:n},h=Nd(s),y=Od(h),g=await o.getDimensions(u),w=h==="y",m=w?"top":"left",p=w?"bottom":"right",v=w?"clientHeight":"clientWidth",_=i.reference[y]+i.reference[h]-f[h]-i.floating[y],S=f[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=k?k[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[v]||i.floating[y]);const R=_/2-S/2,O=E/2-g[y]/2-1,j=Jr(d[m],O),z=Jr(d[p],O),D=j,Q=E-g[y]-z,I=E/2-g[y]/2+R,Z=ac(D,I,Q),H=!l.arrow&&Bs(s)!=null&&I!==Z&&i.reference[y]/2-(I<D?j:z)-g[y]/2<0,K=H?I<D?I-D:I-Q:0;return{[h]:f[h]+K,data:{[h]:Z,centerOffset:I-Z-K,...H&&{alignmentOffset:K}},reset:H}}}),Gx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=cr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=dr(s),p=Xr(a),v=dr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(v||!g?[Aa(a)]:zx(a)),k=y!=="none";!f&&k&&S.push(...Wx(a,g,y,_));const E=[a,...S],R=await Fi(t,w),O=[];let j=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&O.push(R[m]),d){const I=Bx(s,o,_);O.push(R[I[0]],R[I[1]])}if(j=[...j,{placement:s,overflows:O}],!O.every(I=>I<=0)){var z,D;const I=(((z=i.flip)==null?void 0:z.index)||0)+1,Z=E[I];if(Z)return{data:{index:I,overflows:j},reset:{placement:Z}};let H=(D=j.filter(K=>K.overflows[0]<=0).sort((K,C)=>K.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(h){case"bestFit":{var Q;const K=(Q=j.filter(C=>{if(k){const P=Xr(C.placement);return P===p||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,L)=>P+L,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:Q[0];K&&(H=K);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function bf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _f(e){return Mx.some(t=>e[t]>=0)}const Qx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=cr(e,t);switch(n){case"referenceHidden":{const i=await Fi(t,{...s,elementContext:"reference"}),o=bf(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:_f(o)}}}case"escaped":{const i=await Fi(t,{...s,altBoundary:!0}),o=bf(i,r.floating);return{data:{escapedOffsets:o,escaped:_f(o)}}}default:return{}}}}};async function Jx(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=dr(r),a=Bs(r),l=Xr(r)==="y",u=["left","top"].includes(o)?-1:1,c=i&&l?-1:1,d=cr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const Yx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await Jx(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Xx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:m,y:p}=w;return{x:m,y:p}}},...l}=cr(e,t),u={x:r,y:n},c=await Fi(t,l),d=Xr(dr(s)),f=Ad(d);let h=u[f],y=u[d];if(i){const w=f==="y"?"top":"left",m=f==="y"?"bottom":"right",p=h+c[w],v=h-c[m];h=ac(p,h,v)}if(o){const w=d==="y"?"top":"left",m=d==="y"?"bottom":"right",p=y+c[w],v=y-c[m];y=ac(p,y,v)}const g=a.fn({...t,[f]:h,[d]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:i,[d]:o}}}}}},Zx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=cr(e,t),c={x:r,y:n},d=Xr(s),f=Ad(d);let h=c[f],y=c[d];const g=cr(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const v=f==="y"?"height":"width",_=i.reference[f]-i.floating[v]+w.mainAxis,S=i.reference[f]+i.reference[v]-w.mainAxis;h<_?h=_:h>S&&(h=S)}if(u){var m,p;const v=f==="y"?"width":"height",_=["top","left"].includes(dr(s)),S=i.reference[d]-i.floating[v]+(_&&((m=o.offset)==null?void 0:m[d])||0)+(_?0:w.crossAxis),k=i.reference[d]+i.reference[v]+(_?0:((p=o.offset)==null?void 0:p[d])||0)-(_?w.crossAxis:0);y<S?y=S:y>k&&(y=k)}return{[f]:h,[d]:y}}}},eS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=cr(e,t),c=await Fi(t,u),d=dr(s),f=Bs(s),h=Xr(s)==="y",{width:y,height:g}=i.floating;let w,m;d==="top"||d==="bottom"?(w=d,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,w=f==="end"?"top":"bottom");const p=g-c.top-c.bottom,v=y-c.left-c.right,_=Jr(g-c[w],p),S=Jr(y-c[m],v),k=!t.middlewareData.shift;let E=_,R=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=p),k&&!f){const j=rt(c.left,0),z=rt(c.right,0),D=rt(c.top,0),Q=rt(c.bottom,0);h?R=y-2*(j!==0||z!==0?j+z:rt(c.left,c.right)):E=g-2*(D!==0||Q!==0?D+Q:rt(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:E});const O=await o.getDimensions(a.floating);return y!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function il(){return typeof window<"u"}function zs(e){return Rv(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qt(e){var t;return(t=(Rv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rv(e){return il()?e instanceof Node||e instanceof ot(e).Node:!1}function Lt(e){return il()?e instanceof Element||e instanceof ot(e).Element:!1}function Gt(e){return il()?e instanceof HTMLElement||e instanceof ot(e).HTMLElement:!1}function xf(e){return!il()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}function oo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=$t(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function tS(e){return["table","td","th"].includes(zs(e))}function ol(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jd(e){const t=Id(),r=Lt(e)?$t(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function rS(e){let t=Zr(e);for(;Gt(t)&&!Is(t);){if(jd(t))return t;if(ol(t))return null;t=Zr(t)}return null}function Id(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Is(e){return["html","body","#document"].includes(zs(e))}function $t(e){return ot(e).getComputedStyle(e)}function al(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zr(e){if(zs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xf(e)&&e.host||Qt(e);return xf(t)?t.host:t}function Av(e){const t=Zr(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&oo(t)?t:Av(t)}function Bi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Av(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=ot(s);if(i){const a=uc(o);
vendor: 4,595 bytes, line 91
91return t.concat(o,o.visualViewport||[],oo(s)?s:[],a&&r?Bi(a):[])}return t.concat(s,Bi(s,[],r))}function uc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ov(e){const t=$t(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Gt(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Ra(r)!==i||Ra(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Ld(e){return Lt(e)?e:e.contextElement}function gs(e){const t=Ld(e);if(!Gt(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ov(t);let o=(i?Ra(r.width):r.width)/n,a=(i?Ra(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const nS=Yr(0);function Nv(e){const t=ot(e);return!Id()||!t.visualViewport?nS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sS(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ot(e)?!1:t}function On(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Ld(e);let o=Yr(1);t&&(n?Lt(n)&&(o=gs(n)):o=gs(e));const a=sS(i,r,n)?Nv(i):Yr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const f=ot(i),h=n&&Lt(n)?ot(n):n;let y=f,g=uc(y);for(;g&&n&&h!==y;){const w=gs(g),m=g.getBoundingClientRect(),p=$t(g),v=m.left+(g.clientLeft+parseFloat(p.paddingLeft))*w.x,_=m.top+(g.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=v,u+=_,y=ot(g),g=uc(y)}}return Oa({width:c,height:d,x:l,y:u})}function iS(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Qt(n),a=t?ol(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Yr(1);const c=Yr(0),d=Gt(n);if((d||!d&&!i)&&((zs(n)!=="body"||oo(o))&&(l=al(n)),Gt(n))){const f=On(n);u=gs(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}}function oS(e){return Array.from(e.getClientRects())}function cc(e,t){const r=al(e).scrollLeft;return t?t.left+r:On(Qt(e)).left+r}function aS(e){const t=Qt(e),r=al(e),n=e.ownerDocument.body,s=rt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+cc(e);const a=-r.scrollTop;return $t(n).direction==="rtl"&&(o+=rt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function lS(e,t){const r=ot(e),n=Qt(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Id();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function uS(e,t){const r=On(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Gt(e)?gs(e):Yr(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Sf(e,t,r){let n;if(t==="viewport")n=lS(e,r);else if(t==="document")n=aS(Qt(e));else if(Lt(t))n=uS(t,r);else{const s=Nv(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return Oa(n)}function jv(e,t){const r=Zr(e);return r===t||!Lt(r)||Is(r)?!1:$t(r).position==="fixed"||jv(r,t)}function cS(e,t){const r=t.get(e);if(r)return r;let n=Bi(e,[],!1).filter(a=>Lt(a)&&zs(a)!=="body"),s=null;const i=$t(e).position==="fixed";let o=i?Zr(e):e;for(;Lt(o)&&!Is(o);){const a=$t(o),l=jd(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||oo(o)&&!l&&jv(e,o))?n=n.filter(c=>c!==o):s=a,o=Zr(o)}return t.set(e,n),n}function dS(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?ol(t)?[]:cS(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=Sf(t,c,s);return u.top=rt(d.top,u.top),u.right=Jr(d.right,u.right),u.bottom=Jr(d.bottom,u.bottom),u.left=rt(d.left,u.left),u},Sf(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hS(e){const{width:t,height:r}=Ov(e);return{width:t,height:r}}function fS(e,t,r){const n=Gt(t),s=Qt(t),i=r==="fixed",o=On(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Yr(0);if(n||!n&&!i)if((zs(t)!=="body"||oo(s))&&(a=al(t)),n){const h=On(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&(l.x=cc(s));let u=0,c=0;if(s&&!n&&!i){const h=s.getBoundingClientRect();c=h.top+a.scrollTop,u=h.left+a.scrollLeft-cc(s,h)}const d=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-c;return{x:d,y:f,width:o.width,height:o.height}}function eu(e){return $t(e).position==="static"}function kf(e,t){if(!Gt(e)||$t(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qt(e)===r&&(r=r.ownerDocument.body),r}function Iv(e,t){const r=ot(e);
vendor: 8,894 bytes, line 91
91if(ol(e))return r;if(!Gt(e)){let s=Zr(e);for(;s&&!Is(s);){if(Lt(s)&&!eu(s))return s;s=Zr(s)}return r}let n=kf(e,t);for(;n&&tS(n)&&eu(n);)n=kf(n,t);return n&&Is(n)&&eu(n)&&!jd(n)?r:n||rS(e)||r}const pS=async function(e){const t=this.getOffsetParent||Iv,r=this.getDimensions,n=await r(e.floating);return{reference:fS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mS(e){return $t(e).direction==="rtl"}const gS={convertOffsetParentRelativeRectToViewportRelativeRect:iS,getDocumentElement:Qt,getClippingRect:dS,getOffsetParent:Iv,getElementRects:pS,getClientRects:oS,getDimensions:hS,getScale:gs,isElement:Lt,isRTL:mS};function vS(e,t){let r=null,n;const s=Qt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=jo(c),y=jo(s.clientWidth-(u+d)),g=jo(s.clientHeight-(c+f)),w=jo(u),p={rootMargin:-h+"px "+-y+"px "+-g+"px "+-w+"px",threshold:rt(0,Jr(1,l))||1};let v=!0;function _(S){const k=S[0].intersectionRatio;if(k!==l){if(!v)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(_,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,p)}r.observe(e)}return o(!0),i}function yS(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ld(e),c=s||i?[...u?Bi(u):[],...Bi(t)]:[];c.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const d=u&&a?vS(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let y,g=l?On(e):null;l&&w();function w(){const m=On(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&r(),g=m,y=requestAnimationFrame(w)}return r(),()=>{var m;c.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const wS=Yx,bS=Xx,_S=Gx,xS=eS,SS=Qx,Ef=Kx,kS=Zx,ES=(e,t,r)=>{const n=new Map,s={platform:gS,...r},i={...s.platform,_c:n};return qx(e,t,{...s,platform:i})};var ra=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Na(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Na(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!Na(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Lv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tf(e,t){const r=Lv(e);return Math.round(t*r)/r}function tu(e){const t=b.useRef(e);return ra(()=>{t.current=e}),t}function TS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(n);Na(f,n)||h(n);const[y,g]=b.useState(null),[w,m]=b.useState(null),p=b.useCallback(C=>{C!==k.current&&(k.current=C,g(C))},[]),v=b.useCallback(C=>{C!==E.current&&(E.current=C,m(C))},[]),_=i||y,S=o||w,k=b.useRef(null),E=b.useRef(null),R=b.useRef(c),O=l!=null,j=tu(l),z=tu(s),D=tu(u),Q=b.useCallback(()=>{if(!k.current||!E.current)return;const C={placement:t,strategy:r,middleware:f};z.current&&(C.platform=z.current),ES(k.current,E.current,C).then(P=>{const L={...P,isPositioned:D.current!==!1};I.current&&!Na(R.current,L)&&(R.current=L,so.flushSync(()=>{d(L)}))})},[f,t,r,z,D]);ra(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const I=b.useRef(!1);ra(()=>(I.current=!0,()=>{I.current=!1}),[]),ra(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(j.current)return j.current(_,S,Q);Q()}},[_,S,Q,j,O]);const Z=b.useMemo(()=>({reference:k,floating:E,setReference:p,setFloating:v}),[p,v]),H=b.useMemo(()=>({reference:_,floating:S}),[_,S]),K=b.useMemo(()=>{const C={position:r,left:0,top:0};if(!H.floating)return C;const P=Tf(H.floating,c.x),L=Tf(H.floating,c.y);return a?{...C,transform:"translate("+P+"px, "+L+"px)",...Lv(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:L}},[r,a,H.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:Q,refs:Z,elements:H,floatingStyles:K}),[c,Q,Z,H,K])}const CS=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Ef({element:n.current,padding:s}).fn(r):{}:n?Ef({element:n,padding:s}).fn(r):{}}}},PS=(e,t)=>({...wS(e),options:[e,t]}),RS=(e,t)=>({...bS(e),options:[e,t]}),AS=(e,t)=>({...kS(e),options:[e,t]}),OS=(e,t)=>({..._S(e),options:[e,t]}),NS=(e,t)=>({...xS(e),options:[e,t]}),jS=(e,t)=>({...SS(e),options:[e,t]}),IS=(e,t)=>({...CS(e),options:[e,t]});var LS="Arrow",$v=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return x.jsx(Ze.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});$v.displayName=LS;var $S=$v;function DS(e){const[t,r]=b.useState(void 0);return Qr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Dv="Popper",[Mv,Uv]=rl(Dv),[OC,Fv]=Mv(Dv),Bv="PopperAnchor",zv=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=Fv(Bv,r),o=b.useRef(null),a=It(t,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:x.jsx(Ze.div,{...s,ref:a})});zv.displayName=Bv;var $d="PopperContent",[MS,US]=Mv($d),Hv=b.forwardRef((e,t)=>{var re,In,pr,sn,mr,Ln;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,w=Fv($d,r),[m,p]=b.useState(null),v=It(t,gr=>p(gr)),[_,S]=b.useState(null),k=DS(_),E=(k==null?void 0:k.width)??0,R=(k==null?void 0:k.height)??0,O=n+(i!=="center"?"-"+i:""),j=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},z=Array.isArray(u)?u:[u],D=z.length>0,Q={padding:j,boundary:z.filter(BS),altBoundary:D},{refs:I,floatingStyles:Z,placement:H,isPositioned:K,middlewareData:C}=TS({strategy:"fixed",placement:O,whileElementsMounted:(...gr)=>yS(...gr,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[PS({mainAxis:s+R,alignmentAxis:o}),l&&RS({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?AS():void 0,...Q}),l&&OS({...Q}),NS({...Q,apply:({elements:gr,rects:lo,availableWidth:wl,availableHeight:uo})=>{const{width:bl,height:Ws}=lo.reference,$n=gr.floating.style;$n.setProperty("--radix-popper-available-width",`${wl}px`),$n.setProperty("--radix-popper-available-height",`${uo}px`),$n.setProperty("--radix-popper-anchor-width",`${bl}px`),$n.setProperty("--radix-popper-anchor-height",`${Ws}px`)}}),_&&IS({element:_,padding:a}),zS({arrowWidth:E,arrowHeight:R}),f&&jS({strategy:"referenceHidden",...Q})]}),[P,L]=qv(H),q=Gr(y);Qr(()=>{K&&(q==null||q())},[K,q]);const F=(re=C.arrow)==null?void 0:re.x,J=(In=C.arrow)==null?void 0:In.y,X=((pr=C.arrow)==null?void 0:pr.centerOffset)!==0,[we,Ne]=b.useState();return Qr(()=>{m&&Ne(window.getComputedStyle(m).zIndex)},[m]),x.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:K?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[(sn=C.transformOrigin)==null?void 0:sn.x,(mr=C.transformOrigin)==null?void 0:mr.y].join(" "),...((Ln=C.hide)==null?void 0:Ln.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(MS,{scope:r,placedSide:P,onArrowChange:S,arrowX:F,arrowY:J,shouldHideArrow:X,children:x.jsx(Ze.div,{"data-side":P,"data-align":L,...g,ref:v,style:{...g.style,animation:K?void 0:"none"}})})})});Hv.displayName=$d;var Wv="PopperArrow",FS={top:"bottom",right:"left",bottom:"top",left:"r
91ight"},Vv=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=US(Wv,n),o=FS[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx($S,{...s,ref:r,style:{...s.style,display:"block"}})})});Vv.displayName=Wv;function BS(e){return e!==null}var zS=e=>({name:"transformOrigin",options:e,fn(t){var w,m,p;const{placement:r,rects:n,middlewareData:s}=t,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=qv(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,h=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let y="",g="";return u==="bottom"?(y=o?d:`${f}px`,g=`${-l}px`):u==="top"?(y=o?d:`${f}px`,g=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,g=o?d:`${h}px`):u==="left"&&(y=`${n.floating.width+l}px`,g=o?d:`${h}px`),{data:{x:y,y:g}}}});function qv(e){const[t,r="center"]=e.split("-");return[t,r]}var HS=zv,WS=Hv,VS=Vv,[ll,NC]=rl("Tooltip",[Uv]),Dd=Uv(),Kv="TooltipProvider",qS=700,Cf="tooltip.open",[KS,Gv]=ll(Kv),Qv=e=>{const{__scopeTooltip:t,delayDuration:r=qS,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(KS,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};Qv.displayName=Kv;var Jv="Tooltip",[jC,ul]=ll(Jv),dc="TooltipTrigger",GS=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=ul(dc,r),i=Gv(dc,r),o=Dd(r),a=b.useRef(null),l=It(t,a,s.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(HS,{asChild:!0,...o,children:x.jsx(Ze.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Se(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Se(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Se(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Se(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Se(e.onBlur,s.onClose),onClick:Se(e.onClick,s.onClose)})})});GS.displayName=dc;var QS="TooltipPortal",[IC,JS]=ll(QS,{forceMount:void 0}),Ls="TooltipContent",Yv=b.forwardRef((e,t)=>{const r=JS(Ls,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=ul(Ls,e.__scopeTooltip);return x.jsx(Ed,{present:n||o.open,children:o.disableHoverableContent?x.jsx(Xv,{side:s,...i,ref:t}):x.jsx(YS,{side:s,...i,ref:t})})}),YS=b.forwardRef((e,t)=>{const r=ul(Ls,e.__scopeTooltip),n=Gv(Ls,e.__scopeTooltip),s=b.useRef(null),i=It(t,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((y,g)=>{const w=y.currentTarget,m={x:y.clientX,y:y.clientY},p=r1(m,w.getBoundingClientRect()),v=n1(m,p),_=s1(g.getBoundingClientRect()),S=o1([...v,..._]);a(S),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&c){const y=w=>h(w,c),g=w=>h(w,l);return l.addEventListener("pointerleave",y),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),c.removeEventListener("pointerleave",g)}}},[l,c,h,f]),b.useEffect(()=>{if(o){const y=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),v=!i1(m,o);p?f():v&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,c,o,u,f]),x.jsx(Xv,{...e,ref:i})}),[XS,ZS]=ll(Jv,{isInside:!1}),e1=Eb("TooltipContent"),Xv=b.forwardRef((e,t)=>
vendor: 6,164 bytes, line 91
91{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=ul(Ls,r),u=Dd(r),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(Cf,c),()=>document.removeEventListener(Cf,c)),[c]),b.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),x.jsx(kd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:x.jsxs(WS,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(e1,{children:n}),x.jsx(XS,{scope:r,isInside:!0,children:x.jsx(Jb,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Yv.displayName=Ls;var Zv="TooltipArrow",t1=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Dd(r);return ZS(Zv,r).isInside?null:x.jsx(VS,{...s,...n,ref:t})});t1.displayName=Zv;function r1(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function n1(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function s1(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function i1(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,c=a.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function o1(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),a1(t)}function a1(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var l1=Qv,ey=Yv;const u1=l1,c1=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(ey,{ref:n,sideOffset:t,className:nn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));c1.displayName=ey.displayName;var cl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dl=typeof window>"u"||"Deno"in globalThis;function Et(){}function d1(e,t){return typeof e=="function"?e(t):e}function h1(e){return typeof e=="number"&&e>=0&&e!==1/0}function f1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function hc(e,t){return typeof e=="function"?e(t):e}function p1(e,t){return typeof e=="function"?e(t):e}function Pf(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Md(o,t.options))return!1}else if(!Hi(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Rf(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(zi(t.options.mutationKey)!==zi(i))return!1}else if(!Hi(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Md(e,t){return((t==null?void 0:t.queryKeyHashFn)||zi)(e)}function zi(e){return JSON.stringify(e,(t,r)=>fc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Hi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Hi(e[r],t[r])):!1}function ty(e,t){if(e===t)return e;const r=Af(e)&&Af(t);if(r||fc(e)&&fc(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const d=r?c:i[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=ty(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function Af(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fc(e){if(!Of(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Of(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Of(e){return Object.prototype.toString.call(e)==="[object Object]"}function m1(e){return new Promise(t=>{setTimeout(t,e)})}function g1(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?ty(e,t):t}function v1(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function y1(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ud=Symbol();function ry(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ud?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}
vendor: 14,786 bytes, line 91
91var yn,Ar,ws,yp,w1=(yp=class extends cl{constructor(){super();te(this,yn);te(this,Ar);te(this,ws);V(this,ws,t=>{if(!dl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,Ar)||this.setEventListener(T(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Ar))==null||t.call(this),V(this,Ar,void 0))}setEventListener(t){var r;V(this,ws,t),(r=T(this,Ar))==null||r.call(this),V(this,Ar,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,yn)!==t&&(V(this,yn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,yn)=="boolean"?T(this,yn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yn=new WeakMap,Ar=new WeakMap,ws=new WeakMap,yp),ny=new w1,bs,Or,_s,wp,b1=(wp=class extends cl{constructor(){super();te(this,bs,!0);te(this,Or);te(this,_s);V(this,_s,t=>{if(!dl&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){T(this,Or)||this.setEventListener(T(this,_s))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Or))==null||t.call(this),V(this,Or,void 0))}setEventListener(t){var r;V(this,_s,t),(r=T(this,Or))==null||r.call(this),V(this,Or,t(this.setOnline.bind(this)))}setOnline(t){T(this,bs)!==t&&(V(this,bs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,bs)}},bs=new WeakMap,Or=new WeakMap,_s=new WeakMap,wp),ja=new b1;function _1(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function x1(e){return Math.min(1e3*2**e,3e4)}function sy(e){return(e??"online")==="online"?ja.isOnline():!0}var iy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ru(e){return e instanceof iy}function oy(e){let t=!1,r=0,n=!1,s;const i=_1(),o=g=>{var w;n||(f(new iy(g)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>ny.isFocused()&&(e.networkMode==="always"||ja.isOnline())&&e.canRun(),c=()=>sy(e.networkMode)&&e.canRun(),d=g=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,g),s==null||s(),i.reject(g))},h=()=>new Promise(g=>{var w;s=m=>{(n||u())&&g(m)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;s=void 0,n||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(n)return;let g;const w=r===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(d).catch(m=>{var k;if(n)return;const p=e.retry??(dl?0:3),v=e.retryDelay??x1,_=typeof v=="function"?v(r,m):v,S=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,m);if(t||!S){f(m);return}r++,(k=e.onFail)==null||k.call(e,r,m),m1(_).then(()=>u()?void 0:h()).then(()=>{t?f(m):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():h().then(y),i)}}var S1=e=>setTimeout(e,0);function k1(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=S1;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Be=k1(),wn,bp,ay=(bp=class{constructor(){te(this,wn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h1(this.gcTime)&&V(this,wn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dl?1/0:5*60*1e3))}clearGcTimeout(){T(this,wn)&&(clearTimeout(T(this,wn)),V(this,wn,void 0))}},wn=new WeakMap,bp),xs,bn,dt,_n,$e,Yi,xn,Ct,Yt,_p,E1=(_p=class extends ay{constructor(t){super();te(this,Ct);te(this,xs);te(this,bn);te(this,dt);te(this,_n);te(this,$e);te(this,Yi);te(this,xn);V(this,xn,!1),V(this,Yi,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,_n,t.client),V(this,dt,T(this,_n).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,xs,C1(this.options)),this.state=t.state??T(this,xs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,$e))==null?void 0:t.promise}setOptions(t){this.options={...T(this,Yi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,dt).remove(this)}setData(t,r){const n=g1(this.state.data,t,this.options);return je(this,Ct,Yt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){je(this,Ct,Yt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=T(this,$e))==null?void 0:n.promise;return(s=T(this,$e))==null||s.cancel(t),r?r.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,xs))}isActive(){return this.observers.some(t=>p1(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ud||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>hc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!f1(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,$e))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,$e))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,dt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,$e)&&(T(this,xn)?T(this,$e).cancel({revert:!0}):T(this,$e).cancelRetry()),this.scheduleGc()),T(this,dt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,Ct,Yt).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,$e))return T(this,$e).continueRetry(),T(this,$e).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(V(this,xn,!0),n.signal)})},i=()=>{const f=ry(this.options,r),y=(()=>{const g={client:T(this,_n),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return V(this,xn,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,_n),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),V(this,bn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&je(this,Ct,Yt).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,y,g,w;ru(f)&&f.silent||je(this,Ct,Yt).call(this,{type:"error",error:f}),ru(f)||((y=(h=T(this,dt).config).onError)==null||y.call(h,f,this),(w=(g=T(this,dt).config).onSettled)==null||w.call(g,this.state.data,f,this)),this.scheduleGc()};return V(this,$e,oy({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,y,g,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){l(m);return}(y=(h=T(this,dt).config).onSuccess)==null||y.call(h,f,this),(w=(g=T(this,dt).config).onSettled)==null||w.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{je(this,Ct,Yt).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{je(this,Ct,Yt).call(this,{type:"pause"})},onContinue:()=>{je(this,Ct,Yt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,$e).start()}},xs=new WeakMap,bn=new WeakMap,dt=new WeakMap,_n=new WeakMap,$e=new WeakMap,Yi=new WeakMap,xn=new WeakMap,Ct=new WeakSet,Yt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...T1(n.data,this.options),fetchMeta:t.meta??null};case"success":return V(this,bn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ru(s)&&s.revert&&T(this,bn)?{...T(this,bn),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Be.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,dt).notify({query:this,type:"updated",action:t})})},_p);function T1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function C1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Bt,xp,P1=(xp=class extends cl{constructor(t={}){super();te(this,Bt);this.config=t,V(this,Bt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Md(s,r);let o=this.get(i);return o||(o=new E1({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){T(this,Bt).has(t.queryHash)||(T(this,Bt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,Bt).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,Bt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Bt).get(t)}getAll(){return[...T(this,Bt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Pf(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Pf(t,n)):r}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bt=new WeakMap,xp),zt,Ue,Sn,Ht,Sr,Sp,R1=(Sp=class extends ay{constructor(t){super();te(this,Ht);te(this,zt);te(this,Ue);te(this,Sn);this.mutationId=t.mutationId,V(this,Ue,t.mutationCache),V(this,zt,[]),this.state=t.state||A1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,zt).includes(t)||(T(this,zt).push(t),this.clearGcTimeout(),T(this,Ue).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,zt,T(this,zt).filter(r=>r!==t)),this.scheduleGc(),T(this,Ue).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,zt).length||(this.state.status==="pending"?this.scheduleGc():T(this,Ue).remove(this))}continue(){var t;return((t=T(this,Sn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,d,f,h,y,g,w,m,p,v,_,S,k,E,R;const r=()=>{je(this,Ht,Sr).call(this,{type:"continue"})};V(this,Sn,oy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,j)=>{je(this,Ht,Sr).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{je(this,Ht,Sr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Ue).canRun(this)}));const n=this.state.status==="pending",s=!T(this,Sn).canStart();try{if(n)r();else{je(this,Ht,Sr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=T(this,Ue).config).onMutate)==null?void 0:o.call(i,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&je(this,Ht,Sr).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const O=await T(this,Sn).start();return await((c=(u=T(this,Ue).config).onSuccess)==null?void 0:c.call(u,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((y=(h=T(this,Ue).config).onSettled)==null?void 0:y.call(h,O,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,O,null,t,this.state.context)),je(this,Ht,Sr).call(this,{type:"success",data:O}),O}catch(O){try{throw await((p=(m=T(this,Ue).config).onError)==null?void 0:p.call(m,O,t,this.state.context,this)),await((_=(v=this.options).onError)==null?void 0:_.call(v,O,t,this.state.context)),await((k=(S=T(this,Ue).config).onSettled)==null?void 0:k.call(S,void 0,O,this.state.variables,this.state.context,this)),await((R=(E=this.options).onSettled)==null?void 0:R.call(E,void 0,O,t,this.state.context)),O}finally{je(this,Ht,Sr).call(this,{type:"error",error:O})}}finally{T(this,Ue).runNext(this)}}},zt=new WeakMap,Ue=new WeakMap,Sn=new WeakMap,Ht=new WeakSet,Sr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
91case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Be.batch(()=>{T(this,zt).forEach(n=>{n.onMutationUpdate(t)}),T(this,Ue).notify({mutation:this,type:"updated",action:t})})},Sp);function A1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rr,Pt,Xi,kp,O1=(kp=class extends cl{constructor(t={}){super();te(this,rr);te(this,Pt);te(this,Xi);this.config=t,V(this,rr,new Set),V(this,Pt,new Map),V(this,Xi,0)}build(t,r,n){const s=new R1({mutationCache:this,mutationId:++ho(this,Xi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){T(this,rr).add(t);const r=Io(t);if(typeof r=="string"){const n=T(this,Pt).get(r);n?n.push(t):T(this,Pt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,rr).delete(t)){const r=Io(t);if(typeof r=="string"){const n=T(this,Pt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&T(this,Pt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Io(t);if(typeof r=="string"){const n=T(this,Pt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Io(t);if(typeof r=="string"){const s=(n=T(this,Pt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Be.batch(()=>{T(this,rr).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,rr).clear(),T(this,Pt).clear()})}getAll(){return Array.from(T(this,rr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rf(r,n))}findAll(t={}){return this.getAll().filter(r=>Rf(t,r))}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 91
91r.state.isPaused);return Be.batch(()=>Promise.all(t.map(r=>r.continue().catch(Et))))}},rr=new WeakMap,Pt=new WeakMap,Xi=new WeakMap,kp);function Io(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Nf(e){return{onFetch:(t,r)=>{var c,d,f,h,y;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},m=ry(t.options,t.fetchOptions),p=async(v,_,S)=>{if(g)return Promise.reject();if(_==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return w(z),z})(),R=await m(E),{maxPages:O}=t.options,j=S?y1:v1;return{pages:j(v.pages,R,O),pageParams:j(v.pageParams,_,O)}};if(s&&i.length){const v=s==="backward",_=v?N1:jf,S={pages:i,pageParams:o},k=_(n,S);a=await p(S,k,v)}else{const v=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:jf(n,a);if(l>0&&_==null)break;a=await p(a,_),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function jf(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function N1(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var me,Nr,jr,Ss,ks,Ir,Es,Ts,Ep,j1=(Ep=class{constructor(e={}){te(this,me);te(this,Nr);te(this,jr);te(this,Ss);te(this,ks);te(this,Ir);te(this,Es);te(this,Ts);V(this,me,e.queryCache||new P1),V(this,Nr,e.mutationCache||new O1),V(this,jr,e.defaultOptions||{}),V(this,Ss,new Map),V(this,ks,new Map),V(this,Ir,0)}mount(){ho(this,Ir)._++,T(this,Ir)===1&&(V(this,Es,ny.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,me).onFocus())})),V(this,Ts,ja.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,me).onOnline())})))}unmount(){var e,t;ho(this,Ir)._--,T(this,Ir)===0&&((e=T(this,Es))==null||e.call(this),V(this,Es,void 0),(t=T(this,Ts))==null||t.call(this),V(this,Ts,void 0))}isFetching(e){return T(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Nr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,me).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,me).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(hc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,me).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=T(this,me).get(n.queryHash),i=s==null?void 0:s.state.data,o=d1(t,i);if(o!==void 0)return T(this,me).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Be.batch(()=>T(this,me).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,me).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,me);Be.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,me);return Be.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Be.batch(()=>T(this,me).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Et).catch(Et)}invalidateQueries(e,t={}){return Be.batch(()=>(T(this,me).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Be.batch(()=>T(this,me).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Et)),s.state.fetchStatus==="paused"?Promise.resolve():i}
91));return Promise.all(n).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,me).build(this,t);return r.isStaleByTime(hc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=Nf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e.behavior=Nf(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ja.isOnline()?T(this,Nr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,me)}getMutationCache(){return T(this,Nr)}getDefaultOptions(){return T(this,jr)}setDefaultOptions(e){V(this,jr,e)}setQueryDefaults(e,t){T(this,Ss).set(zi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ss).values()],r={};return t.forEach(n=>{Hi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,ks).set(zi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ks).values()],r={};return t.forEach(n=>{Hi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,jr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Md(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ud&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,jr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,me).clear(),T(this,Nr).clear()}},me=new WeakMap,Nr=new WeakMap,jr=new WeakMap,Ss=new WeakMap,ks=new WeakMap,Ir=new WeakMap,Es=new WeakMap,Ts=new WeakMap,Ep),I1=b.createContext(void 0),L1=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(I1.Provider,{value:e,children:t}));/** 92 * @remix-run/router v1.23.0 93 * 94 * Copyright (c) Remix Software Inc. 95 * 96 * This source code is licensed under the MIT license found in the 97 * LICENSE.md file in the root directory of this source tree. 98 * 99 * @license MIT 100 */function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ia.apply(this,arguments)}var Dr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Dr||(Dr={}));const If="popstate";function $1(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return pc("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:uy(s)}return M1(t,r,null,e)}function Xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ly(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function D1(){return Math.random().toString(36).substr(2,8)}function Lf(e,t){return{usr:e.state,key:e.key,idx:t}}function pc(e,t,r,n){return r===void 0&&(r=null),Ia({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hl(t):t,{state:r,key:t&&t.key||n||D1()})}function uy(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function hl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function M1(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Dr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Ia({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=Dr.Pop;let w=c(),m=w==null?null:w-u;u=w,l&&l({action:a,location:g.location,delta:m})}function f(w,m){a=Dr.Push;let p=pc(g.location,w,m);u=c()+1;let v=Lf(p,u),_=g.createHref(p);try{o.pushState(v,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:g.location,delta:1})}function h(w,m){a=Dr.Replace;let p=pc(g.location,w,m);u=c();let v=Lf(p,u),_=g.createHref(p);o.replaceState(v,"",_),i&&l&&l({action:a,location:g.location,delta:0})}function y(w){let m=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:uy(w);return p=p.replace(/ $/,"%20"),Xe(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let g={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(If,d),l=w,()=>{s.removeEventListener(If,d),l=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let m=y(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(w){return o.go(w)}};return g}var $f;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($f||($f={}));function U1(e,t,r){return r===void 0&&(r="/"),F1(e,t,r,!1)}function F1(e,t,r,n){let s=typeof t=="string"?hl(t):t,i=hy(s.pathname||"/",r);if(i==null)return null;let o=cy(e);B1(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=X1(i);a=J1(o[l],u,n)}return a}function cy(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Xe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
100id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=vs([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),cy(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:G1(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of dy(i.path))s(i,o,l)}),t}function dy(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=dy(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function B1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Q1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const z1=/^:[\w-]+$/,H1=3,W1=2,V1=1,q1=10,K1=-2,Df=e=>e==="*";function G1(e,t){let r=e.split("/"),n=r.length;return r.some(Df)&&(n+=K1),t&&(n+=W1),r.filter(s=>!Df(s)).reduce((s,i)=>s+(z1.test(i)?H1:i===""?V1:q1),n)}function Q1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function J1(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=Mf({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=Mf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 4,131 bytes, lines 100-109
100Object.assign(s,d.params),o.push({params:s,pathname:vs([i,d.pathname]),pathnameBase:Z1(vs([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=vs([i,d.pathnameBase]))}return o}function Mf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Y1(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[d];return h&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Y1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ly(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function X1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ly(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function hy(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const vs=e=>e.join("/").replace(/\/\/+/g,"/"),Z1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function ek(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fy=["post","put","patch","delete"];new Set(fy);const tk=["get",...fy];new Set(tk);/** 101 * React Router v6.30.1 102 * 103 * Copyright (c) Remix Software Inc. 104 * 105 * This source code is licensed under the MIT license found in the 106 * LICENSE.md file in the root directory of this source tree. 107 * 108 * @license MIT 109 */function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},La.apply(this,arguments)}const rk=b.createContext(null),nk=b.createContext(null),py=b.createContext(null),fl=b.createContext(null),pl=b.createContext({outlet:null,matches:[],isDataRoute:!1}),my=b.createContext(null);function Fd(){return b.useContext(fl)!=null}function gy(){return Fd()||Xe(!1),b.useContext(fl).location}function sk(e,t){return ik(e,t)}function ik(e,t,r,n){Fd()||Xe(!1);let{navigator:s}=b.useContext(py),{matches:i}=b.useContext(pl),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=gy(),c;if(t){var d;let w=typeof t=="string"?hl(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Xe(!1),c=w}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=U1(e,{pathname:h}),g=ck(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:vs([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:vs([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return t&&g?b.createElement(fl.Provider,{value:{location:La({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Dr.Pop}},g):g}function ok(){let e=pk(),t=ek(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application
109Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const ak=b.createElement(ok,null);class lk extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(pl.Provider,{value:this.props.routeContext},b.createElement(my.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uk(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(rk);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(pl.Provider,{value:t},n)}function ck(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Xe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,y=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let h,y=!1,g=null,w=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||ak,l&&(u<0&&f===0?(y=!0,w=null):u===f&&(y=!0,w=d.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),p=()=>{let v;return h?v=g:y?v=w:d.route.Component?v=b.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,b.createElement(uk,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(lk,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var mc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(mc||{});function dk(e){let t=b.useContext(nk);return t||Xe(!1),t}function hk(e){let t=b.useContext(pl);return t||Xe(!1),t}function fk(e){let t=hk(),r=t.matches[t.matches.length-1];return r.route.id||Xe(!1),r.route.id}function pk(){var e;let t=b.useContext(my),r=dk(mc.UseRouteError),n=fk(mc.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function mk(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function gc(e){Xe(!1)}function gk(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Dr.Pop,navigator:i,static:o=!1,future:a}=e;Fd()&&Xe(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:La({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=hl(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:y="default"}=n,g=b.useMemo(()=>{let w=hy(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:y},navigationType:s}},[l,c,d,f,h,y,s]);return g==null?null:b.createElement(py.Provider,{value:u},b.createElement(fl.Provider,{children:r,value:g}))}function vk(e){let{children:t,location:r}=e;return sk(vc(t),r)}new Promise(()=>{});
109function vc(e,t){t===void 0&&(t=[]);let r=[];return b.Children.forEach(e,(n,s)=>{if(!b.isValidElement(n))return;let i=[...t,s];if(n.type===b.Fragment){r.push.apply(r,vc(n.props.children,i));return}n.type!==gc&&Xe(!1),!n.props.index||!n.props.children||Xe(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=vc(n.props.children,i)),r.push(o)}),r}/** 110 * React Router DOM v6.30.1 111 * 112 * Copyright (c) Remix Software Inc. 113 * 114 * This source code is licensed under the MIT license found in the 115 * LICENSE.md file in the root directory of this source tree. 116 * 117 * @license MIT 118 */const yk="6";try{window.__reactRouterVersion=yk}catch{}const wk="startTransition",Uf=Dp[wk];function bk(e){let{basename:t,children:r,future:n,window:s}=e,i=b.useRef();i.current==null&&(i.current=$1({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=b.useCallback(d=>{u&&Uf?Uf(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>mk(n),[n]),b.createElement(gk,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var Ff;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ff||(Ff={}));var Bf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bf||(Bf={}));const zf=[{key:"medianPrice",label:"Median Price",invertColor:!1},{key:"activeListings",label:"Active Listings",invertColor:!1},{key:"medianDays",label:"Days on Market",invertColor:!0},{key:"priceReduced",label:"Price Reduced",invertColor:!0}],Hf=({change:e,invertColor:t})=>{const r=e>0;if(e===0)return x.jsx("span",{className:"text-muted-foreground",children:"â"});const s=t?!r:r;return x.jsxs("span",{className:`inline-flex items-center gap-0.5 font-bold ${s?"text-emerald-400":"text-red-400"}`,children:[r?x.jsx(w_,{className:"w-3.5 h-3.5"}):x.jsx(y_,{className:"w-3.5 h-3.5"}),Math.abs(e).toFixed(1),"%"]})},_k=({delta:e,invertColor:t})=>{const r=parseFloat(e.replace(/[^0-9.-]/g,""));if(r===0)return x.jsx("span",{className:"text-muted-foreground",children:"â"});const n=r>0;return(t?!n:n)?x.jsx("span",{className:"text-emerald-400 font-bold",children:e}):x.jsx("span",{className:"text-red-400 font-bold",children:e.replace("-","")})},xk={gold:"bg-blue-600 text-white shadow-lg",green:"bg-emerald-600 text-white shadow-lg",red:"bg-red-600 text-white shadow-lg"},Wf={gold:"ring-2 ring-blue-500 bg-blue-500/15 rounded-full px-2 py-0.5",green:"ring-2 ring-emerald-500 bg-emerald-500/15 rounded-full px-2 py-0.5",red:"ring-2 ring-red-500 bg-red-500/15 rounded-full px-2 py-0.5"},Sk=({title:e,data:t,rankings:r,badges:n,highlights:s})=>{const i=r?"grid-cols-6":"grid-cols-5",o=(a,l)=>s&&s.find(u=>u.metric===a&&u.column===l)||null;return x.jsxs("div",{className:"mb-4",children:[x.jsx("h2",{className:"text-center font-display font-bold text-xl text-gold mb-2 italic",children:e}),n&&n.length>0&&x.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-2",children:n.map((a,l)=>x.jsx("span",{className:`text-xs font-extrabold px-3 py-1 rounded-full ${xk[a.color]}`,children:a.label},l))}),x.jsxs("div",{className:"bg-card rounded-lg border border-border overflow-hidden",children:[x.jsxs("div",{className:`grid ${i} text-sm uppercase tracking-wider font-bold bg-gold text-white px-4 py-1.5`,children:[r&&x.jsx("span",{className:"text-center",children:"Rank"}),x.jsx("span",{children:"Metric"}),x.jsx("span",{className:"text-right",children:"1 Yr Ago"}),x.jsx("span",{className:"text-right",children:new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),x.jsx("span",{className:"text-right",children:"+/â"}),x.jsx("span",{className:"text-right",children:"Change"})]}),zf.map(({key:a,label:l,invertColor:u},c)=>{const d=t[a],f=c===zf.length-1,h=o(a,"current"),y=o(a,"change");return x.jsxs("div",{className:`grid ${i} items-center px-4 py-1 ${f?"":"border-b border-border/50"}`,children:[r&&x.jsx("span",{className:"text-center text-sm font-bold font-display text-foreground",children:r[a]}),x.jsx("span",{className:"text-sm text-foreground font-medium",children:l}),x.jsx("span",{className:"text-right text-sm font-bold font-display text-foreground",children:d.prior}),x.jsx("span",{className:"text-right text-sm font-bold font-display text-foreground",children:h?x.jsx("span",{className:`inline-block ${Wf[h.color]}`,children:d.current}):d.current}),x.jsx("div",{className:"text-right text-sm",children:x.jsx(_k,{delta:d.delta,invertColor:u})}),x.jsx("div",{className:"text-right text-sm",children:y?x.jsx("span",{className:`inline-block ${Wf[y.color]}`,children:x.jsx(Hf,{change:d.change,invertColor:u})}):x.jsx(Hf,{change:d.change,invertColor:u})})]},a)})]})]})},kk="/assets/cisneros-logo-gold-clean-DTbkAN1b.png",Ek="/assets/exp-luxury-email-final-VhUSnP6r.png",Tk=gv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),vy=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?Sb:"button";return x.jsx(o,{className:nn(Tk({variant:t,size:r,className:e})),ref:i,...s})});vy.displayName="Button";function Ck(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const Pk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
118class Bd extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class Rk extends Bd{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Vf extends Bd{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class qf extends Bd{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var yc;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(yc||(yc={}));class Ak{constructor(t,{headers:r={},customFetch:n,region:s=yc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=Pk(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Ck(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const y=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,y.searchParams.set("forceFunctionRegion",h));let g;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let w=c;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const m=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:g,signal:w}).catch(S=>{throw new Rk(S)}),p=m.headers.get("x-relay-error");if(p&&p==="true")throw new Vf(m);if(!m.ok)throw new qf(m);let v=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return v==="application/json"?_=yield m.json():v==="application/octet-stream"||v==="application/pdf"?_=yield m.blob():v==="text/event-stream"?_=m:v==="multipart/form-data"?_=yield m.formData():_=yield m.text(),{data:_,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof qf||a instanceof Vf?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var Ok=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
118de=e.code}},Nk=class{constructor(e){var t,r,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){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 n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,u=i.status,c=i.statusText;if(i.ok){var d,f;if(r.method!=="HEAD"){var h;const w=await i.text();w===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?a=w:a=JSON.parse(w))}const y=(d=r.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),g=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&g&&g.length>1&&(l=parseInt(g[1])),r.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await i.text();try{o=JSON.parse(y),Array.isArray(o)&&i.status===404&&(a=[],o=null,u=200,c="OK")}catch{i.status===404&&y===""?(u=204,c="No Content"):o={message:y}}if(o&&r.shouldThrowOnError)throw new Ok(o)}return{error:o,data:a,count:l,status:u,statusText:c}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",u="";const c=i==null?void 0:i.cause;if(c){var d,f,h,y;const m=(d=c==null?void 0:c.message)!==null&&d!==void 0?d:"",p=(f=c==null?void 0:c.code)!==null&&f!==void 0?f:"";a=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,a+=` 119 120Caused by: ${(y=c==null?void 0:c.name)!==null&&y!==void 0?y:"Error"}: ${m}`,p&&(a+=` (${p})`),c!=null&&c.stack&&(a+=` 121${c.stack}`)}else{var g;a=(g=i==null?void 0:i.stack)!==null&&g!==void 0?g:""}const w=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",l="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((c==null?void 0:c.name)==="HeadersOverflowError"||(c==null?void 0:c.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",l="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(l+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:u},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},jk=class extends Nk{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
121explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Kf=new RegExp("[,()]");var Kn=class extends jk{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Kf.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Kf.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},Ik=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new Kn({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1210){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Kn({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new Kn({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Kn({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Kn({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Wi(e){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(e)}function Lk(e,t){if(Wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $k(e){var t=Lk(e,"string");return Wi(t)=="symbol"?t:t+""}function Dk(e,t,r){return(t=$k(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gf(Object(r),!0).forEach(function(n){Dk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Mk=class yy{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,u)=>{const c=new AbortController,d=setTimeout(()=>c.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(d),a(l,u);const h=()=>{clearTimeout(d),c.abort()};return f.addEventListener("abort",h,{once:!0}),a(l,Lo(Lo({},u),{},{signal:c.signal})).finally(()=>{clearTimeout(d),f.removeEventListener("abort",h)})}return a(l,Lo(Lo({},u),{},{signal:c.signal})).finally(()=>clearTimeout(d))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Ik(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new yy(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=n&&Object.values(r).some(c);d?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,y])=>y!==void 0).map(([h,y])=>[h,Array.isArray(y)?`{${y.join(",")}}`:`${y}
121`]).forEach(([h,y])=>{l.searchParams.append(h,y)})):(a="POST",u=r);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Kn({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class Uk{constructor(){}static detectEnvironment(){var t;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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 122import ws from "ws" 123new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 124 125Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Fk="2.100.1",Bk=`realtime-js/${Fk}`,zk="1.0.0",wy="2.0.0",Hk=wy,Wk=1e4,Vk=100,Pr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},by={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},wc={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class qk{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
125let y=new DataView(h),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,u.length),y.setUint8(g++,d.length),y.setUint8(g++,r),Array.from(l,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(o,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(u,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(d,m=>y.setUint8(g++,m.charCodeAt(0)));var w=new Uint8Array(h.byteLength+n.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(n),h.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+i));l=l+i;const d=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,y={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ie;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ie||(ie={}));const Qf=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=Kk(o,e,t,s),i),{}):{}},Kk=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?_y(i,o):bc(o)},_y=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Yk(t,r)}switch(e){case ie.bool:return Gk(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return Qk(t);case ie.json:case ie.jsonb:return Jk(t);case ie.timestamp:return Xk(t);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return bc(t);default:return bc(t)}},bc=e=>e,Gk=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Qk=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Jk=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Yk=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>_y(t,a))}return e},Xk=e=>typeof e=="string"?e.replace(" ","T"):e,xy=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var wi=e=>typeof e=="function"?e:function(){return e},Zk=typeof self<"u"?self:null,Gn=typeof window<"u"?window:null,Ft=Zk||Gn||globalThis,eE="2.0.0",tE=1e4,rE=1e3,Wt={connecting:0,open:1,closing:2,closed:3},Ve={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Zt={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},_c={longpoll:"longpoll",websocket:"websocket"},nE={complete:4},xc="base64url.bearer.phx.",$o=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 125
125oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Sy=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},sE=class{constructor(e,t,r){this.state=Ve.closed,this.topic=e,this.params=wi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new $o(this,Zt.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Sy(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Ve.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ve.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ve.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Ve.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new $o(this,Zt.leave,wi({}),this.timeout).send(),this.state=Ve.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Zt.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ve.closed,this.bindings=[]}onClose(e){this.on(Zt.close,e)}onError(e){return this.on(Zt.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new $o(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ve.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Zt.close,"leave")},r=new $o(this,Zt.leave,wi({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ve.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ve.closed}isErrored(){return this.state===Ve.errored}isJoined(){return this.state===Ve.joined}isJoining(){return this.state===Ve.joining}isLeaving(){return this.state===Ve.leaving}},$a=class{static request(e,t,r,n,s,i,o){if(Ft.XDomainRequest){let a=new Ft.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(Ft.XMLHttpRequest){let a=new Ft.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(Ft.fetch&&Ft.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Ft.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===nE.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},iE=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},Bn=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(xc)&&(this.authToken=atob(t[1].slice(xc.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Wt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+_c.websocket),"$1/"+_c.longpoll)}endpointURL(){return $a.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Wt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Wt.open||this.readyState===Wt.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Wt.open,this.onopen({}),this.poll();break;
125case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=iE(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 126`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=Wt.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=$a.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},oE=class ai{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ai.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=ai.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ai.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ai.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(g=>g.phx_ref),f=c.metas.map(g=>g.phx_ref),h=u.metas.filter(g=>f.indexOf(g.phx_ref)<0),y=c.metas.filter(g=>d.indexOf(g.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),y.length>0&&(a[l]=this.clone(c),a[l].metas=y)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Do={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+i.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(i),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 126
126switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let u=r.decode(e.slice(o,o+i));o=o+i;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let c=r.decode(e.slice(a,a+i));a=a+i;let d=r.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:Zt.reply,payload:h}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},aE=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||tE,this.transport=t.transport||Ft.WebSocket||Bn,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Ft&&Ft.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Do.encode.bind(Do),this.defaultDecoder=Do.decode.bind(Do),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Bn?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Gn&&Gn.addEventListener&&(Gn.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Gn.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Gn.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,s,i)=>{console.log(`${n}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=wi(t.params||{}),this.endPoint=`${e}/${_c.websocket}`,this.vsn=t.vsn||eE,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Sy(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Bn}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=$a.appendParams($a.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=wi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Bn?this.connectWithFallback(Bn,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case Bn:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${xc}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),rE,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Wt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
126triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Zt.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Wt.connecting:return"connecting";case Wt.open:return"open";case Wt.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new sE(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class bi{constructor(t,r){const n=uE(r);this.presence=new oE(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=bi.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=bi.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return bi.transformState(this.presence.state)}static transformState(t){return t=lE(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=na(s),r},{})}static onJoinPayload(t,r,n){const s=Jf(r),i=na(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Jf(r),i=na(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function na(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function lE(e){return JSON.parse(JSON.stringify(e))}function uE(e){return(e==null?void 0:e.events)&&{events:e.events}}function Jf(e){return e!=null&&e.metas?na(e):[]}var Yf;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Yf||(Yf={}));class cE{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new bi(this.channel.channelAdapter,r)}}class dE{constructor(t,r,n){const s=hE(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>Vk){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Pr.joined}isJoined(){return this.state===Pr.joined}isJoining(){return this.state===Pr.joining}isClosed(){return this.state===Pr.closed}isLeaving(){return this.state===Pr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function hE(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Xf;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Xf||(Xf={}));var _i;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(_i||(_i={}));var er;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(er||(er={}));class xi{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new dE(this.socket.socketAdapter,t,this.params),this.presence=new cE(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=xy(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[_i.PRESENCE]&&this.bindings[_i.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(er.CHANNEL_ERROR,h)}),this._onClose(()=>t==null?void 0:t(er.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(er.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
126).receive("error",h=>{this.state=Pr.errored,t==null||t(er.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(er.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[a];if(h&&h.event===u&&xi.isFilterValueEqual(h.schema,c)&&xi.isFilterValueEqual(h.table,d)&&xi.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Pr.errored,r==null||r(er.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Pr.errored&&r&&r(er.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){if(this.channelAdapter.isJoined()&&t===_i.PRESENCE)throw this.socket.log("channel",`cannot add presence callbacks for ${this.topic} after joining.`),new Error("cannot add presence callbacks after joining a channel");return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
126in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=r.ids)===null||o===void 0?void 0:o.includes(h))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=r==null?void 0:r.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=by;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Qf(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Qf(t.columns,t.old_record)),r}}class fE{constructor(t,r){this.socket=new aE(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==wc.connecting}isDisconnecting(){return this.socket.connectionState()==wc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const pE={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},mE=[1e3,2e3,5e3,1e4],gE=1e4,vE=` 127 addEventListener("message", (e) => { 128 if (e.data.event === "start") { 129 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 130 } 131 });`;class yE{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
131,this.ref=0,this.serializer=new qk,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new fE(t,s),this.httpEndpoint=xy(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r} 132 133To use Realtime in Node.js, you need to provide a WebSocket implementation: 134 135Option 1: Use Node.js 22+ which has native WebSocket support 136Option 2: Install and provide the "ws" package: 137 138 npm install ws 139 140 import ws from "ws" 141 const client = new RealtimeClient(url, { 142 ...options, 143 transport: ws 144 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||wc.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new xi(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:Bk};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(by.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},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)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([vE],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,c;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const d={};
144d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:Wk,d.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:pE.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:Uk.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:g=>mE[g-1]||gE;let f,h;const y=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:Hk;switch(y){case zk:f=(g,w)=>w(JSON.stringify(g)),h=(g,w)=>w(JSON.parse(g));break;case wy:f=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=y,d.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,d.decode=(c=t==null?void 0:t.decode)!==null&&c!==void 0?c:h,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Vi=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function wE(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function bE(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function _E(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=wE(e.baseUrl,n,s),l=await bE(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,y=h==null?void 0:h.error;throw new Vi((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Mo(e){return e.join("�")}var xE=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Mo(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Mo(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Mo(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Mo(e.namespace)}`}),!0}catch(t){if(t instanceof Vi&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Vi&&r.status===409)return;throw r}}};function zn(e){return e.join("�")}var SE=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${zn(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Vi&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Vi&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},kE=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=_E({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new xE(this.client,t),this.tableOps=new SE(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
144async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ml=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function gl(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Sc=class extends ml{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},ky=class extends ml{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const EE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),TE=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kc=e=>{if(Array.isArray(e))return e.map(r=>kc(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=kc(n)}),t},CE=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function PE(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RE(e){var t=PE(e,"string");return qi(t)=="symbol"?t:t+""}function AE(e,t,r){return(t=RE(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(r),!0).forEach(function(n){AE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ep=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},OE=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Sc(ep(o),i,a,n))}).catch(()=>{const o=i+"";t(new Sc(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new ky(ep(e),e,n))},NE=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!n?B(B({},s),r):(TE(n)?(s.headers=B({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),B(B({},s),r))};async function ri(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,NE(t,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>OE(u,l,n,o))})}function Ey(e="storage"){return{get:async(t,r,n,s)=>
144ri(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>ri(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>ri(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>ri(t,"HEAD",r,B(B({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>ri(t,"DELETE",r,s,i,n,e)}}const jE=Ey("storage"),{get:Ki,post:Tt,put:Ec,head:IE,remove:zd}=jE,nt=Ey("vectors");var Hs=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=EE(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=B(B({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(gl(r))return{data:null,error:r};throw r}}},LE=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(gl(t))return{data:null,error:t};throw t}}};let Ty;Ty=Symbol.toStringTag;var $E=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ty]="BlobDownloadBuilder",this.promise=null}asStream(){return new LE(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(gl(t))return{data:null,error:t};throw t}}};const DE={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},tp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var ME=class extends Hs{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=B(B({},tp),n);let a=B(B({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=B(B({},a),n.headers));const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),d=await(e=="PUT"?Ec:Tt)(s.fetch,`${s.url}/object/${c}`,i,B({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=B(B({},tp),n),c=B(B({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{path:i,fullPath:(await Ec(s.fetch,a.toString(),l,{headers:c})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=B({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Tt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new ml("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Tt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
144stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Tt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Tt(n.fetch,`${n.url}/object/sign/${s}`,B({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"",l=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${n.url}${l}${a}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Tt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(o=>B(B({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>Ki(this.fetch,`${this.url}/${n}/${o}${i}`,{headers:this.headers,noResolveJson:!0},r);return new $E(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>kc(await Ki(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await IE(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(gl(s)){var n;const i=s instanceof Sc?s.status:s instanceof ky?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await zd(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=B(B(B({},DE),t),{},{prefix:e||""});return await Tt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=B({},e);return await Tt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const UE="2.100.1",ao={"X-Client-Info":`storage-js/${UE}`};var FE=class extends Hs{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=B(B({},ao),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Ki(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ki(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Tt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Ec(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Tt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await zd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},BE=class extends Hs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},ao),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Tt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
144{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Ki(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await zd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!CE(e))throw new ml("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 kE({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},zE=class extends Hs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},ao),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await nt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await nt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},HE=class extends Hs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},ao),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},WE=class extends Hs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},ao),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await nt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},VE=class extends WE{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new qE(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},qE=class extends zE{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}
144async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new KE(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},KE=class extends HE{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},GE=class extends FE{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new ME(this.url,this.headers,e,this.fetch)}get vectors(){return new VE(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new BE(this.url+"/iceberg",this.headers,this.fetch)}};function vl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const Cy="2.100.1",Qn=30*1e3,Tc=3,nu=Tc*Qn,QE="http://localhost:9999",JE="supabase.auth.token",YE={"X-Client-Info":`gotrue-js/${Cy}`},Cc="X-Supabase-Api-Version",Py={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},XE=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ZE=10*60*1e3;class Gi extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class eT extends Gi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function tT(e){return M(e)&&e.name==="AuthApiError"}class fn extends Gi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class fr extends Gi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class et extends fr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function su(e){return M(e)&&e.name==="AuthSessionMissingError"}class Hn extends fr{constructor(){super("Auth session or user missing","AuthInvalidToken
144ResponseError",500,void 0)}}class Uo extends fr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Fo extends fr{constructor(t,r=null){super(t,"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 rT(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class rp extends fr{constructor(t,r=null){super(t,"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 nT extends fr{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 Pc extends fr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function iu(e){return M(e)&&e.name==="AuthRetryableFetchError"}class np extends fr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Rc extends fr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),sp=` 145\r=`.split(""),sT=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<sp.length;t+=1)e[sp[t].charCodeAt(0)]=-2;for(let t=0;t<Da.length;t+=1)e[Da[t].charCodeAt(0)]=t;return e})();function ip(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Da[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Da[n]),t.queuedBits-=6}}function Ry(e,t,r){const n=sT[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function op(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{aT(o,n,r)};for(let o=0;o<e.length;o+=1)Ry(e.charCodeAt(o),s,i);return t.join("")}function iT(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function oT(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}iT(n,t)}}function aT(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function ys(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Ry(e.charCodeAt(s),r,n);return new Uint8Array(t)}function lT(e){const t=[];return oT(e,r=>t.push(r)),new Uint8Array(t)}function vn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>ip(s,r,n)),ip(null,r,n),t.join("")}function uT(e){return Math.round(Date.now()/1e3)+e}function cT(){return Symbol("auth-callback")}const Pe=()=>typeof window<"u"&&typeof document<"u",ln={tested:!1,writable:!1},Ay=()=>{if(!Pe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ln.tested)return ln.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ln.tested=!0,ln.writable=!0}catch{ln.tested=!0,ln.writable=!1}return ln.writable};function dT(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
145h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Oy=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hT=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Jn=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},un=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ce=async(e,t)=>{await e.removeItem(t)};class yl{constructor(){this.promise=new yl.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}yl.promiseConstructor=Promise;function Bo(e){const t=e.split(".");if(t.length!==3)throw new Rc("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!XE.test(t[n]))throw new Rc("JWT not in base64url format");return{header:JSON.parse(op(t[0])),payload:JSON.parse(op(t[1])),signature:ys(t[2]),raw:{header:t[0],payload:t[1]}}}async function fT(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function pT(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function mT(e){return("0"+e.toString(16)).substr(-2)}function gT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,mT).join("")}async function vT(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function yT(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await vT(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Wn(e,t,r=!1){const n=gT();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Jn(e,`${t}-code-verifier`,s);const i=await yT(n);return[i,n===i?"plain":"s256"]}const wT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function bT(e){const t=e.headers.get(Cc);if(!t||!t.match(wT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function _T(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function xT(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const ST=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Vn(e){if(!ST.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ou(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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:(t,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:(t,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 kT(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function ap(e){return JSON.parse(JSON.stringify(e))}const hn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ET=[502,503,504];async function lp(e){var t;if(!hT(e))throw new Pc(hn(e),0);if(ET.includes(e.status))throw new Pc(hn(e),e.status);let r;try{r=await e.json()}catch(i){throw new fn(hn(i),i)}let n;const s=bT(e);if(s&&s.getTime()>=Py["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new np(hn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new et}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((i,o)=>
145i&&typeof o=="string",!0))throw new np(hn(r),e.status,r.weak_password.reasons);throw new eT(hn(r),e.status||500,n)}const TT=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function U(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Cc]||(i[Cc]=Py["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await CT(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function CT(e,t,r,n,s,i){const o=TT(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new Pc(hn(l),0)}if(a.ok||await lp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await lp(l)}}function St(e){var t;let r=null;AT(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=uT(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function up(e){const t=St(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Rr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function PT(e){return{data:e,error:null}}function RT(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=vl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function cp(e){return e}function AT(e){return e.access_token&&e.refresh_token&&e.expires_in}const au=["global","local","others"];class OT{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Oy(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,r=au[0]){if(au.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${au.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Rr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=vl(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:RT,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(M(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Rr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await U(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:cp});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1450&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Vn(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Rr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Vn(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Rr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Vn(t);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Rr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Vn(t.userId);try{const{data:r,error:n}=await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Vn(t.userId),Vn(t.id);try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await U(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:cp});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await U(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(M(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELET
145E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}}function dp(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Mt={debug:!!(globalThis&&Ay()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Ny extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class hp extends Ny{}async function NT(e,t,r){Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new hp(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Mt.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(n.signal.aborted)return Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Mt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new hp(`Lock "${e}" was released because another request stole it`)}throw i}}function jT(){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 jy(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function IT(e){return parseInt(e,16)}function LT(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function $T(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=e;{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(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 146`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=jy(e.address),y=c?`${c}://${n}`:n,g=e.statement?`${e.statement} 147`:"",w=`${y} wants you to sign in with your Ethereum account: 148${h} 149 150${g}`;let m=`URI: ${d} 151Version: ${f} 152Chain ID: ${r}${o?` 153Nonce: ${o}`:""} 154Issued At: ${i.toISOString()}`;if(s&&(m+=` 155Expiration Time: ${s.toISOString()}`),a&&(m+=` 156Not Before: ${a.toISOString()}`),l&&(m+=` 157Request ID: ${l}`),u){let p=` 158Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);p+=` 159- ${v}`}m+=p}return`${w} 160${m}`}
160class be extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Ma extends be{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function DT({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new be({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new be({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new be({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new be({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new be({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new be({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new be({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new be({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(Iy(o)){if(i.rp.id!==o)return new be({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new be({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new be({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function MT({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new be({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new be({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Iy(n)){if(r.rpId!==n)return new be({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new be({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class UT{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const FT=new UT;function BT(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=vl(e,["challenge","user","excludeCredentials"]),i=ys(t).buffer,o=Object.assign(Object.assign({},r),{id:ys(r.id).buffer}),a=Object.assign(Object.assign({}
160,s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:ys(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function zT(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=vl(e,["challenge","allowCredentials"]),s=ys(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:ys(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function HT(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:vn(new Uint8Array(e.response.attestationObject)),clientDataJSON:vn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function WT(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:vn(new Uint8Array(s.authenticatorData)),clientDataJSON:vn(new Uint8Array(s.clientDataJSON)),signature:vn(new Uint8Array(s.signature)),userHandle:s.userHandle?vn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Iy(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function fp(){var e,t;return!!(Pe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function VT(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ma("Browser returned unexpected credential type",t)}:{data:null,error:new Ma("Empty credential response",t)}}catch(t){return{data:null,error:DT({error:t,options:e})}}}async function qT(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ma("Browser returned unexpected credential type",t)}:{data:null,error:new Ma("Empty credential response",t)}}catch(t){return{data:null,error:MT({error:t,options:e})}}}const KT={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},GT={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ua(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=Ua(a,o):n[i]=Ua(o)}else n[i]=o}return n}function QT(e,t){return Ua(KT,e,t||{})}function JT(e,t){return Ua(GT,e,t||{})}class YT{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??FT.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=n;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,y=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${y}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=QT(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await VT({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=JT(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await qT(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new fn("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Gi("rpId is required for WebAuthn authentication")};try{if(!fp())return{data:null,error:new fn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new fn("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Gi("rpId is required for WebAuthn registration")};try{if(!fp())return{data:null,error:new fn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new fn("Unexpected error in register",o)}}}}jT();const XT={url:QE,storageKey:JE,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:YE,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function pp(e,t,r){return await r()}const qn={};class Qi{get jwks(){var t,r;return(r=(t=qn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){qn[this.storageKey]=Object.assign(Object.assign({},qn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=qn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){qn[this.storageKey]=Object.assign(Object.assign({},qn[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({}
160,XT),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Qi.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Qi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Pe()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new OT({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Oy(i.fetch),this.lock=i.lock||pp,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&Pe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=NT:this.lock=pp,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 YT(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Ay()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=dp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=dp(this.memoryStorage)),Pe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Cy}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Pe()&&(r=dT(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Pe()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),rT(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return M(r)?this._returnResult({error:r}):this._returnResult({error:new fn("Unexpected error during initialization",r)}
160)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:St}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Wn(this.storage,this.storageKey)),i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:y},xform:St})}else if("phone"in t){const{phone:c,password:d,options:f}=t;i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:St})}else throw new Uo("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ce(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:up})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:up})}else throw new Uo("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Hn;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,c,d,f;let h,y;if("message"in t)h=t.message,y=t.signature;else{const{chain:g,wallet:w,statement:m,options:p}=t;let v;if(Pe())if(typeof w=="object")v=w;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")v=O.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 w!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const _=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=jy(S[0]);
160let E=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const O=await v.request({method:"eth_chainId"});E=IT(O)}const R={domain:_.host,address:k,statement:m,uri:_.href,version:"1",chainId:E,nonce:(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=p==null?void 0:p.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=p==null?void 0:p.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=p==null?void 0:p.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=p==null?void 0:p.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=$T(R),y=await v.request({method:"personal_sign",params:[LT(h),k]})}try{const{data:g,error:w}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:St});if(w)throw w;if(!g||!g.session||!g.user){const m=new Hn;return this._returnResult({data:{user:null,session:null},error:m})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:w})}catch(g){if(M(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,c,d,f,h;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:w,wallet:m,statement:p,options:v}=t;let _;if(Pe())if(typeof m=="object")_=m;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.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 m!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=m}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),p?{statement:p}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),g=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((d=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 161`);const k=await _.signMessage(new TextEncoder().encode(y),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=k}}try{const{data:w,error:m}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:vn(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:St});if(m)throw m;if(!w||!w.session||!w.user){const p=new Hn;return this._returnResult({data:{user:null,session:null},error:p})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:m})}catch(w){if(M(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await un(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new nT;const{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:St});if(await Ce(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Hn;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:St}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new Hn;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Wn(this.storage,this.storageKey));const{error:d}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new Uo("You must provide either an email or phone number.")}catch(a){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:St});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Wn(this.storage,this.storageKey));const u=await U(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:PT});return!((i=u.data)===null||i===void 0)&&i.url&&Pe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new et;const{error:s}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(M(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t,{error:o}=await U(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await U(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Uo("You must provide either an email or phone number and a type")}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(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 t=null;const r=await un(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
161id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<nu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await un(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=ou()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=kT(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Rr}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new et}:await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Rr})})}catch(r){if(M(r))return su(r)&&(await this._removeSession(),await Ce(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new et;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Wn(this.storage,this.storageKey));const{data:u,error:c}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Rr});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new et;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Bo(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(M(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new et;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Pe())throw new Fo("No browser detected.");
161if(t.error||t.error_description||t.error_code)throw new Fo(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new rp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Fo("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new rp("No code detected.");const{data:p,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:p.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=t;if(!i||!a||!o||!u)throw new Fo("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=Qn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const y=f-d;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,c);const{data:g,error:w}=await this._getUser(i);if(w)throw w;const m={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(n){if(M(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await un(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!su(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(tT(a)&&(a.status===404||a.status===401||a.status===403)||su(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ce(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=cT(),n={id:r,callback:t,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,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Wn(this.storage,this.storageKey,!0));try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await U(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Pe()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(M(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,d=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:St}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Hn}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ce(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
161return await U(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await pT(async s=>(s>0&&await fT(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:St})),(s,i)=>{const o=200*Math.pow(2,s);return i&&iu(i)&&Date.now()+o-n<Qn})}catch(n){if(this._debug(r,"error",n),M(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Pe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await un(this.storage,this.storageKey);if(s&&this.userStorage){let o=await un(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Jn(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:ou()}else if(s&&!s.user&&!s.user){const o=await un(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ce(this.storage,this.storageKey+"-user"),await Jn(this.storage,this.storageKey,s)):s.user=ou()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<nu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${nu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),iu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new et;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new yl;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new et;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),M(i)){const o={data:null,error:i};return iu(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ce(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Jn(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=ap(s);await Jn(this.storage,this.storageKey,i)}else{const s=ap(r);await Jn(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ce(this.storage,this.storageKey),await Ce(this.storage,this.storageKey+"-code-verifier"),await Ce(this.storage,this.storageKey+"-user"),this.userStorage&&await Ce(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Pe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
161catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Qn);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}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 t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Qn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Qn}ms, refresh threshold is ${Tc} ticks`),s<=Tc&&await this._callRefreshToken(n.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(t){if(t.isAcquireTimeout||t instanceof Ny)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Pe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,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(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Wn(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await U(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await U(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?HT(t.webauthn.credential_response):WT(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:BT(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:zT(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:h}=Bo(t);let y=null;h.aal&&(y=h.aal);let g=y;const{data:{user:w},error:m}=await this.getUser(t);if(m)return this._returnResult({data:null,error:m});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(g="aal2");const v=h.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:v},error:null}}catch(h){if(M(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
161=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Bo(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await U(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new et})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new et});const o=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new et});const o=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await U(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new et})})}catch(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await U(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new et})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+ZE>s)return n;const{data:i,error:o}=await U(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:y}
161=await this.getSession();if(y||!h.session)return this._returnResult({data:null,error:y});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Bo(n);r!=null&&r.allowExpired||_T(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const c=xT(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,lT(`${a}.${l}`)))throw new Rc("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}}Qi.nextInstanceID={};const ZT=Qi,eC="2.100.1";let li="";typeof Deno<"u"?li="deno":typeof document<"u"?li="web":typeof navigator<"u"&&navigator.product==="ReactNative"?li="react-native":li="node";const tC={"X-Client-Info":`supabase-js-${li}/${eC}`},rC={headers:tC},nC={schema:"public"},sC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},iC={};function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ji(e)}function oC(e,t){if(Ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aC(e){var t=oC(e,"string");return Ji(t)=="symbol"?t:t+""}function lC(e,t,r){return(t=aC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mp(Object(r),!0).forEach(function(n){lC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const uC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),cC=()=>Headers,dC=(e,t,r)=>{const n=uC(r),s=cC();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,ge(ge({},o),{},{headers:u}))}};function hC(e){return e.endsWith("/")?e:e+"/"}function fC(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:ge(ge({},l),s),auth:ge(ge({},u),i),realtime:ge(ge({},c),o),storage:{},global:ge(ge(ge({},d),a),{},{headers:ge(ge({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function pC(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(hC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var mC=class extends ZT{constructor(e){super(e)}},gC=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=pC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:nC,realtime:iC,auth:ge(ge({},sC),{},{storageKey:o}),global:rC},l=fC(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=dC(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ge({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new Mk(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new GE(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new Ak(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
161channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new mC({url:this.authUrl.href,headers:ge(ge({},f),c),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new yE(this.realtimeUrl.href,ge(ge({},e),{},{params:ge(ge({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const vC=(e,t,r)=>new gC(e,t,r);function yC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}yC()&&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 wC="https://bucjaqgpjodiuygfyhwo.supabase.co",bC="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ1Y2phcWdwam9kaXV5Z2Z5aHdvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE4MDk2NjIsImV4cCI6MjA4NzM4NTY2Mn0.zq8kOkrrvO1tfo_KsrcJVWF-RPbZ032F9m1riOkb2Q0",_C=vC(wC,bC,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Hd=[{title:"Nationwide",data:{medianPrice:{current:"$399,950",prior:"$385,000",delta:"+$14,950",change:3.9},activeListings:{current:"976,833",prior:"912,450",delta:"+64,383",change:7.1},medianDays:{current:"73",prior:"68",delta:"+5",change:7.4},priceReduced:{current:"200,664",prior:"178,320",delta:"+22,344",change:12.5}}},{title:"State - NH",data:{medianPrice:{current:"$573,050",prior:"$529,900",delta:"+$43,150",change:8.1},activeListings:{current:"2,408",prior:"2,185",delta:"+223",change:10.2},medianDays:{current:"68",prior:"52",delta:"+16",change:30.8},priceReduced:{current:"416",prior:"362",delta:"+54",change:14.9}}},{title:"County - Belknap",data:{medianPrice:{current:"$699,450",prior:"$625,000",delta:"+$74,450",change:11.9},activeListings:{current:"233",prior:"198",delta:"+35",change:17.7},medianDays:{current:"85",prior:"62",delta:"+23",change:37.1},priceReduced:{current:"42",prior:"35",delta:"+7",change:20}}},{title:"County - Carroll",data:{medianPrice:{current:"$475,000",prior:"$435,000",delta:"+$40,000",change:9.2},activeListings:{current:"310",prior:"275",delta:"+35",change:12.7},medianDays:{current:"79",prior:"60",delta:"+19",change:31.7},priceReduced:{current:"58",prior:"48",delta:"+10",change:20.8}}},{title:"Gilford, NH",data:{medianPrice:{current:"$837,475",prior:"$749,000",delta:"+$88,475",change:11.8},activeListings:{current:"30",prior:"25",delta:"+5",change:20},medianDays:{current:"105",prior:"78",delta:"+27",change:34.6},priceReduced:{current:"8",prior:"6",delta:"+2",change:33.3}}},{title:"Laconia, NH",data:{medianPrice:{current:"$425,000",prior:"$389,000",delta:"+$36,000",change:9.3},activeListings:{current:"52",prior:"45",delta:"+7",change:15.6},medianDays:{current:"72",prior:"58",delta:"+14",change:24.1},priceReduced:{current:"14",prior:"10",delta:"+4",change:40}}},{title:"Meredith, NH",data:{medianPrice:{current:"$725,000",prior:"$679,000",delta:"+$46,000",change:6.8},activeListings:{current:"45",prior:"38",delta:"+7",change:18.4},medianDays:{current:"78",prior:"65",delta:"+13",change:20},priceReduced:{current:"12",prior:"9",delta:"+3",change:33.3}}},{title:"Center Harbor, NH",data:{medianPrice:{current:"$895,000",prior:"$825,000",delta:"+$70,000",change:8.5},activeListings:{current:"12",prior:"10",delta:"+2",change:20},medianDays:{current:"92",prior:"74",delta:"+18",change:24.3},priceReduced:{current:"3",prior:"2",delta:"+1",change:50}}},{title:"Moultonborough, NH",data:{medianPrice:{current:"$950,000",prior:"$879,000",delta:"+$71,000",change:8.1},activeListings:{current:"58",prior:"52",delta:"+6",change:11.5},medianDays:{current:"110",prior:"88",delta:"+22",change:25},priceReduced:{current:"15",prior:"11",delta:"+4",change:36.4}}},{title:"Tuftonboro, NH",data:{medianPrice:{current:"$875,000",prior:"$810,000",delta:"+$65,000",change:8},activeListings:{current:"22",prior:"19",delta:"+3",change:15.8},medianDays:{current:"95",prior:"72",delta:"+23",change:31.9},priceReduced:{current:"5",prior:"4",delta:"+1",change:25}}},{title:"Wolfeboro, NH",data:{medianPrice:{current:"$799,000",prior:"$745,000",delta:"+$54,000",change:7.2},activeListings:{current:"48",prior:"42",delta:"+6",change:14.3},medianDays:{current:"88",prior:"70",delta:"+18",change:25.7},priceReduced:{current:"11",prior:"8",delta:"+3",change:37.5}}},{title:"Alton, NH",data:{medianPrice:{current:"$625,000",prior:"$575,000",delta:"+$50,000",change:8.7},activeListings:{current:"35",prior:"30",delta:"+5",change:16.7},medianDays:{current:"82",prior:"65",delta:"+17",change:26.2},priceReduced:{current:"9",prior:"7",delta:"+2",change:28.6}}}],Ly=["Gilford, NH","Laconia, NH","Meredith, NH","Center Harbor, NH","Moultonborough, NH","Tuftonboro, NH","Wolfeboro, NH","Alton, NH"],gp=e=>
161parseFloat(e.replace(/[^0-9.-]/g,"")),xC=()=>{const e=Hd.filter(n=>Ly.includes(n.title)),t=["medianPrice","activeListings","medianDays","priceReduced"],r={};return t.forEach(n=>{[...e].sort((i,o)=>gp(o.data[n].current)-gp(i.data[n].current)).forEach((i,o)=>{r[i.title]||(r[i.title]={}),r[i.title][n]=o+1})}),r},SC=()=>{const e=Hd.filter(s=>Ly.includes(s.title)),t={},r=[...e].sort((s,i)=>i.data.medianPrice.change-s.data.medianPrice.change);if(r.length>0){const s=r[0].title;t[s]||(t[s]=[]),t[s].push("ð Greatest Appreciation")}const n=[...e].sort((s,i)=>i.data.medianDays.change-s.data.medianDays.change);if(n.length>0){const s=n[0].title;t[s]||(t[s]=[]),t[s].push("ð¢ Greatest Days on Market Increase")}return t},vp={medianPrice:{rank1:"ð° Highest Median Price",rank8:"ð·ï¸ Lowest Median Price"},activeListings:{rank1:"ð Most Active Listings",rank8:"ð Fewest Listings"},medianDays:{rank1:"ð¢ Most Days on Market",rank8:"â¡ Fewest Days on Market"},priceReduced:{rank1:"âï¸ Most Price Reductions",rank8:"ð Fewest Price Reductions"}},kC=(e,t,r)=>{const n=[],s=[];return t&&["medianPrice","activeListings","medianDays","priceReduced"].forEach(o=>{const a=t[o];a===1&&(n.push({label:vp[o].rank1,color:"gold"}),s.push({metric:o,column:"current",color:"gold"})),a===8&&(n.push({label:vp[o].rank8,color:"gold"}),s.push({metric:o,column:"current",color:"gold"}))}),r[e]&&r[e].forEach(i=>{n.push({label:i,color:"green"}),i.includes("Appreciation")&&s.push({metric:"medianPrice",column:"change",color:"green"}),i.includes("Days on Market")&&s.push({metric:"medianDays",column:"change",color:"green"})}),{badges:n.length>0?n:void 0,highlights:s.length>0?s:void 0}},EC=()=>{const e=b.useMemo(xC,[]),t=b.useMemo(SC,[]),[r,n]=b.useState(!1),[s,i]=b.useState(!1),o=async()=>{n(!0),i(!1);try{const{data:a,error:l}=await _C.functions.invoke("send-snapshot");if(l)throw l;if(!(a!=null&&a.success))throw new Error((a==null?void 0:a.error)||"Failed to send");i(!0),ec({title:"Snapshot sent!",description:"Email delivered to both recipients."}),setTimeout(()=>i(!1),3e3)}catch(a){ec({title:"Send failed",description:a.message,variant:"destructive"})}finally{n(!1)}};return x.jsx("div",{className:"min-h-screen bg-surface-dark py-8 px-4",children:x.jsxs("div",{className:"max-w-5xl mx-auto",children:[x.jsx("header",{className:"mb-10",children:x.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4",children:[x.jsx("div",{className:"flex-shrink-0 overflow-hidden rounded-sm bg-[hsl(var(--background))]",style:{width:"10rem",height:"10rem"},children:x.jsx("img",{src:Ek,alt:"eXp Realty Luxury",className:"w-full h-full object-cover scale-[1.35]"})}),x.jsxs("div",{className:"text-center flex-1",children:[x.jsx("h1",{className:"font-display font-extrabold text-3xl text-foreground tracking-tight",children:"Cisneros Realty Group"}),x.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"eXp Luxury â Market Snapshot"}),x.jsxs("p",{className:"text-muted-foreground text-xs mt-2",children:["Data as of ",new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]}),x.jsx(vy,{onClick:o,disabled:r,className:"mt-4 bg-gold hover:bg-gold-light text-primary-foreground font-display font-bold text-xs uppercase tracking-wider",size:"sm",children:r?x.jsxs(x.Fragment,{children:[x.jsx(__,{className:"w-3.5 h-3.5 animate-spin"})," Sendingâ¦"]}):s?x.jsxs(x.Fragment,{children:[x.jsx(b_,{className:"w-3.5 h-3.5"})," Sent!"]}):x.jsxs(x.Fragment,{children:[x.jsx(x_,{className:"w-3.5 h-3.5"})," Send Snapshot Email"]})})]}),x.jsx("div",{className:"flex-shrink-0",children:x.jsx("img",{src:kk,alt:"Cisneros Realty Group",className:"h-52 w-52 object-contain mix-blend-lighten"})})]})}),Hd.map(a=>{const l=e[a.title],{badges:u,highlights:c}=kC(a.title,l,t);return x.jsx(Sk,{title:a.title,data:a.data,rankings:l||void 0,badges:u,highlights:c},a.title)}),x.jsxs("div",{className:"bg-card rounded-lg border border-border p-4 mb-6",children:[x.jsx("h3",{className:"text-gold font-display font-bold text-sm uppercase tracking-wider mb-2",children:"Rank Legend (Towns Only)"}),x.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1",children:[x.jsxs("li",{children:[x.jsx("span",{className:"text-foreground font-medium",children:"Median Price:"})," 1 = most expensive, 8 = least expensive"]}),x.jsxs("li",{children:[x.jsx("span",{className:"text-foreground font-medium",children:"Active Listings:"})," 1 = most listings, 8 = fewest listings"]}),x.jsxs("li",{children:[x.jsx("span",{className:"text-foreground font-medium",children:"Days on Market:"})," 1 = most days on market, 8 = fewest days"]}),x.jsxs("li",{children:[x.jsx("span",{className:"text-foreground font-medium",children:"Price Reduced:"})," 1 = most reductions, 8 = fewest reductions"]})]}),x.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Rankings based on current data. Residential properties only â land sales excluded."})]}),x.jsxs("footer",{className:"text-center text-xs text-muted-foreground mt-6",children:["Data by"," ",x.jsx("a",{href:"https://redfin.com",className:"text-gold underline hover:text-gold-light",children:"Redfin"}),". Analysis by"," ",x.jsx("span",{className:"text-gold",children:"Cisneros Realty Group"}),"."]})]})})},TC=()=>{const e=gy();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),x.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:x.jsxs("div",{className:"text-center",children:[x.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),x.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),x.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},CC=new j1,PC=()=>x.jsx(L1,{client:CC,children:x.jsxs(u1,{children:[x.jsx(ix,{}),x.jsx(Dx,{}),x.jsx(bk,{children:x.jsxs(vk,{children:[x.jsx(gc,{path:"/",element:x.jsx(EC,{})}),x.jsx(gc,{path:"*",element:x.jsx(TC,{})})]})})]})});Bg(document.getElementById("root")).render(x.jsx(PC,{}));
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.