PageSourceSearch

https://nutikas-eesti-ettevote.lovable.app/assets/index-Ci6kac7g.js

js nutikas-eesti-ettevote.lovable.app collected 2026-10-03 03:34:11 UTC 605,738 bytes, 233 lines download raw bytes

vendor: 5,064 bytes, lines 1-9
1var fh=e=>{throw TypeError(e)};var Ol=(e,t,n)=>t.has(e)||fh("Cannot "+n);var E=(e,t,n)=>(Ol(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?fh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(Ol(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Le=(e,t,n)=>(Ol(e,t,"access private method"),n);var ba=(e,t,n,r)=>({set _(i){V(e,t,i,n)},get _(){return E(e,t,r)}});function _0(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jp={exports:{}},Xo={},Qp={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 oa=Symbol.for("react.element"),j0=Symbol.for("react.portal"),E0=Symbol.for("react.fragment"),T0=Symbol.for("react.strict_mode"),C0=Symbol.for("react.profiler"),A0=Symbol.for("react.provider"),P0=Symbol.for("react.context"),R0=Symbol.for("react.forward_ref"),N0=Symbol.for("react.suspense"),O0=Symbol.for("react.memo"),I0=Symbol.for("react.lazy"),ph=Symbol.iterator;function L0(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var Yp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xp=Object.assign,Zp={};function Hi(e,t,n){this.props=e,this.context=t,this.refs=Zp,this.updater=n||Yp}Hi.prototype.isReactComponent={};Hi.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")};Hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function em(){}em.prototype=Hi.prototype;function Vc(e,t,n){this.props=e,this.context=t,this.refs=Zp,this.updater=n||Yp}var qc=Vc.prototype=new em;qc.constructor=Vc;Xp(qc,Hi.prototype);qc.isPureReactComponent=!0;var mh=Array.isArray,tm=Object.prototype.hasOwnProperty,Gc={current:null},nm={key:!0,ref:!0,__self:!0,__source:!0};function rm(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)tm.call(t,r)&&!nm.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:oa,type:e,key:s,ref:a,props:i,_owner:Gc.current}}function D0(e,t){return{$$typeof:oa,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===oa}function $0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var gh=/\/+/g;function Il(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$0(""+e.key):t.toString(36)}function Za(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case oa:case j0:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Il(a,0):r,mh(i)?(n="",e!=null&&(n=e.replace(gh,"$&/")+"/"),Za(i,t,n,"",function(u){return u})):i!=null&&(Jc(i)&&(i=D0(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(gh,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",mh(e))for(var o=0;o<e.length;o++){s=e[o];var l=r+Il(s,o);a+=Za(s,t,n,l,i)}else if(l=L0(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=r+Il(s,o++),a+=Za(s,t,n,l,i);else if(s==="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 a}
vendor: 6,075 bytes, lines 9-25
9function xa(e,t,n){if(e==null)return e;var r=[],i=0;return Za(e,r,"","",function(s){return t.call(n,s,i++)}),r}function M0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var We={current:null},eo={transition:null},U0={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:eo,ReactCurrentOwner:Gc};function im(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:xa,forEach:function(e,t,n){xa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xa(e,function(){t++}),t},toArray:function(e){return xa(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=Hi;Y.Fragment=E0;Y.Profiler=C0;Y.PureComponent=Vc;Y.StrictMode=T0;Y.Suspense=N0;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U0;Y.act=im;Y.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Xp({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Gc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)tm.call(t,l)&&!nm.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:oa,type:e.type,key:i,ref:s,props:r,_owner:a}};Y.createContext=function(e){return e={$$typeof:P0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:A0,_context:e},e.Consumer=e};Y.createElement=rm;Y.createFactory=function(e){var t=rm.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:R0,render:e}};Y.isValidElement=Jc;Y.lazy=function(e){return{$$typeof:I0,_payload:{_status:-1,_result:e},_init:M0}};Y.memo=function(e,t){return{$$typeof:O0,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=eo.transition;eo.transition={};try{e()}finally{eo.transition=t}};Y.unstable_act=im;Y.useCallback=function(e,t){return We.current.useCallback(e,t)};Y.useContext=function(e){return We.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return We.current.useDeferredValue(e)};Y.useEffect=function(e,t){return We.current.useEffect(e,t)};Y.useId=function(){return We.current.useId()};Y.useImperativeHandle=function(e,t,n){return We.current.useImperativeHandle(e,t,n)};Y.useInsertionEffect=function(e,t){return We.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return We.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return We.current.useMemo(e,t)};Y.useReducer=function(e,t,n){return We.current.useReducer(e,t,n)};Y.useRef=function(e){return We.current.useRef(e)};Y.useState=function(e){return We.current.useState(e)};Y.useSyncExternalStore=function(e,t,n){return We.current.useSyncExternalStore(e,t,n)};Y.useTransition=function(){return We.current.useTransition()};Y.version="18.3.1";Qp.exports=Y;var b=Qp.exports;const N=Gp(b),sm=_0({__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 F0=b,B0=Symbol.for("react.element"),z0=Symbol.for("react.fragment"),H0=Object.prototype.hasOwnProperty,K0=F0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,W0={key:!0,ref:!0,__self:!0,__source:!0};function am(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)H0.call(t,r)&&!W0.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:B0,type:e,key:s,ref:a,props:i,_owner:K0.current}}Xo.Fragment=z0;Xo.jsx=am;Xo.jsxs=am;Jp.exports=Xo;var m=Jp.exports,om={exports:{}},ut={},lm={exports:{}},um={};/**
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(T,C){var D=T.length;T.push(C);e:for(;0<D;){var G=D-1>>>1,F=T[G];if(0<i(F,C))T[G]=C,T[D]=F,D=G;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var C=T[0],D=T.pop();if(D!==C){T[0]=D;e:for(var G=0,F=T.length,Q=F>>>1;G<Q;){var Z=2*(G+1)-1,ke=T[Z],Ie=Z+1,ne=T[Ie];if(0>i(ke,D))Ie<F&&0>i(ne,ke)?(T[G]=ne,T[Ie]=D,G=Ie):(T[G]=ke,T[Z]=D,G=Z);else if(Ie<F&&0>i(ne,D))T[G]=ne,T[Ie]=D,G=Ie;else break e}}return C}function i(T,C){var D=T.sortIndex-C.sortIndex;return D!==0?D:T.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],c=1,d=null,f=3,h=!1,k=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,v=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 g(T){for(var C=n(u);C!==null;){if(C.callback===null)r(u);else if(C.startTime<=T)r(u),C.sortIndex=C.expirationTime,t(l,C);else break;C=n(u)}}function x(T){if(y=!1,g(T),!k)if(n(l)!==null)k=!0,H(S);else{var C=n(u);C!==null&&q(x,C.startTime-T)}}function S(T,C){k=!1,y&&(y=!1,v(A),A=-1),h=!0;var D=f;try{for(g(C),d=n(l);d!==null&&(!(d.expirationTime>C)||T&&!z());){var G=d.callback;
vendor: 9,152 bytes, lines 25-34
25if(typeof G=="function"){d.callback=null,f=d.priorityLevel;var F=G(d.expirationTime<=C);C=e.unstable_now(),typeof F=="function"?d.callback=F:d===n(l)&&r(l),g(C)}else r(l);d=n(l)}if(d!==null)var Q=!0;else{var Z=n(u);Z!==null&&q(x,Z.startTime-C),Q=!1}return Q}finally{d=null,f=D,h=!1}}var _=!1,j=null,A=-1,R=5,O=-1;function z(){return!(e.unstable_now()-O<R)}function L(){if(j!==null){var T=e.unstable_now();O=T;var C=!0;try{C=j(!0,T)}finally{C?K():(_=!1,j=null)}}else _=!1}var K;if(typeof p=="function")K=function(){p(L)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,X=I.port2;I.port1.onmessage=L,K=function(){X.postMessage(null)}}else K=function(){w(L,0)};function H(T){j=T,_||(_=!0,K())}function q(T,C){A=w(function(){T(e.unstable_now())},C)}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(T){T.callback=null},e.unstable_continueExecution=function(){k||h||(k=!0,H(S))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var C=3;break;default:C=f}var D=f;f=C;try{return T()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,C){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=f;f=T;try{return C()}finally{f=D}},e.unstable_scheduleCallback=function(T,C,D){var G=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?G+D:G):D=G,T){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=D+F,T={id:c++,callback:C,priorityLevel:T,startTime:D,expirationTime:F,sortIndex:-1},D>G?(T.sortIndex=D,t(u,T),n(l)===null&&T===n(u)&&(y?(v(A),A=-1):y=!0,q(x,D-G))):(T.sortIndex=F,t(l,T),k||h||(k=!0,H(S))),T},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(T){var C=f;return function(){var D=f;f=C;try{return T.apply(this,arguments)}finally{f=D}}}})(um);lm.exports=um;var V0=lm.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 q0=b,lt=V0;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cm=new Set,As={};function $r(e,t){Ii(e,t),Ii(e+"Capture",t)}function Ii(e,t){for(As[e]=t,e=0;e<t.length;e++)cm.add(t[e])}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=Object.prototype.hasOwnProperty,G0=/^[: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]*$/,vh={},yh={};function J0(e){return bu.call(yh,e)?!0:bu.call(vh,e)?!1:G0.test(e)?yh[e]=!0:(vh[e]=!0,!1)}function Q0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Y0(e,t,n,r){if(t===null||typeof t>"u"||Q0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Ve(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Ve(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 Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Ve(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 Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qc=/[\-:]([a-z])/g;function Yc(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(Qc,Yc);Oe[t]=new Ve(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(Qc,Yc);Oe[t]=new Ve(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(Qc,Yc);Oe[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xc(e,t,n,r){var i=Oe.hasOwnProperty(t)?Oe[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Y0(t,n,i,r)&&(n=null),r||i===null?J0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var kn=q0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Sa=Symbol.for("react.element"),ii=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),Zc=Symbol.for("react.strict_mode"),xu=Symbol.for("react.profiler"),dm=Symbol.for("react.provider"),hm=Symbol.for("react.context"),ed=Symbol.for("react.forward_ref"),Su=Symbol.for("react.suspense"),_u=Symbol.for("react.suspense_list"),td=Symbol.for("react.memo"),Rn=Symbol.for("react.lazy"),fm=Symbol.for("react.offscreen"),kh=Symbol.iterator;function Zi(e){return e===null||typeof e!="object"?null:(e=kh&&e[kh]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Object.assign,Ll;function cs(e){if(Ll===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ll=t&&t[1]||""}return`
34`+Ll+e}var Dl=!1;function $l(e,t){if(!e||Dl)return"";Dl=!0;var n=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 r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 6,732 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),s=r.stack.split(`
36`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
37`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{Dl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?cs(e):""}function X0(e){switch(e.tag){case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return cs("Suspense");case 19:return cs("SuspenseList");case 0:case 2:case 15:return e=$l(e.type,!1),e;case 11:return e=$l(e.type.render,!1),e;case 1:return e=$l(e.type,!0),e;default:return""}}function ju(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 si:return"Fragment";case ii:return"Portal";case xu:return"Profiler";case Zc:return"StrictMode";case Su:return"Suspense";case _u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hm:return(e.displayName||"Context")+".Consumer";case dm:return(e._context.displayName||"Context")+".Provider";case ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case td:return t=e.displayName||null,t!==null?t:ju(e.type)||"Memo";case Rn:t=e._payload,e=e._init;try{return ju(e(t))}catch{}}return null}function Z0(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 ju(t);case 8:return t===Zc?"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 er(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ek(e){var t=pm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _a(e){e._valueTracker||(e._valueTracker=ek(e))}function mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vo(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 Eu(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=er(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gm(e,t){t=t.checked,t!=null&&Xc(e,"checked",t,!1)}function Tu(e,t){gm(e,t);var n=er(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cu(e,t.type,er(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cu(e,t,n){(t!=="number"||vo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ds=Array.isArray;function vi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+er(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Au(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(ds(n)){if(1<n.length)throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:er(n)}}function vm(e,t){var n=er(t.value),r=er(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Sh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ym(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 Pu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ym(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ja,km=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ja=ja||document.createElement("div"),ja.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ja.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ps(e,t){if(t){var n=e.firstChild;
vendor: 1,960 bytes, line 37
37if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gs={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},tk=["Webkit","ms","Moz","O"];Object.keys(gs).forEach(function(e){tk.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gs[t]=gs[e]})});function wm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||gs.hasOwnProperty(e)&&gs[e]?(""+t).trim():t+"px"}function bm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=wm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var nk=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 Ru(e,t){if(t){if(nk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Nu(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 Ou=null;
vendor: 5,276 bytes, line 37
37function nd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Iu=null,yi=null,ki=null;function _h(e){if(e=ca(e)){if(typeof Iu!="function")throw Error(P(280));var t=e.stateNode;t&&(t=rl(t),Iu(e.stateNode,e.type,t))}}function xm(e){yi?ki?ki.push(e):ki=[e]:yi=e}function Sm(){if(yi){var e=yi,t=ki;if(ki=yi=null,_h(e),t)for(e=0;e<t.length;e++)_h(t[e])}}function _m(e,t){return e(t)}function jm(){}var Ml=!1;function Em(e,t,n){if(Ml)return e(t,n);Ml=!0;try{return _m(e,t,n)}finally{Ml=!1,(yi!==null||ki!==null)&&(jm(),Sm())}}function Rs(e,t){var n=e.stateNode;if(n===null)return null;var r=rl(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(P(231,t,typeof n));return n}var Lu=!1;if(fn)try{var es={};Object.defineProperty(es,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",es,es),window.removeEventListener("test",es,es)}catch{Lu=!1}function rk(e,t,n,r,i,s,a,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var vs=!1,yo=null,ko=!1,Du=null,ik={onError:function(e){vs=!0,yo=e}};function sk(e,t,n,r,i,s,a,o,l){vs=!1,yo=null,rk.apply(ik,arguments)}function ak(e,t,n,r,i,s,a,o,l){if(sk.apply(this,arguments),vs){if(vs){var u=yo;vs=!1,yo=null}else throw Error(P(198));ko||(ko=!0,Du=u)}}function Mr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Tm(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 jh(e){if(Mr(e)!==e)throw Error(P(188))}function ok(e){var t=e.alternate;if(!t){if(t=Mr(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return jh(i),e;if(s===r)return jh(i),t;s=s.sibling}throw Error(P(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function Cm(e){return e=ok(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 Pm=lt.unstable_scheduleCallback,Eh=lt.unstable_cancelCallback,lk=lt.unstable_shouldYield,uk=lt.unstable_requestPaint,ye=lt.unstable_now,ck=lt.unstable_getCurrentPriorityLevel,rd=lt.unstable_ImmediatePriority,Rm=lt.unstable_UserBlockingPriority,wo=lt.unstable_NormalPriority,dk=lt.unstable_LowPriority,Nm=lt.unstable_IdlePriority,Zo=null,Qt=null;function hk(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Zo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:mk,fk=Math.log,pk=Math.LN2;function mk(e){return e>>>=0,e===0?32:31-(fk(e)/pk|0)|0}var Ea=64,Ta=4194304;function hs(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 bo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~i;o!==0?r=hs(o):(s&=a,s!==0&&(r=hs(s)))}else a=n&~i,a!==0?r=hs(a):s!==0&&(r=hs(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ot(t),i=1<<n,r|=e[n],t&=~i;return r}function gk(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 vk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Ot(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=gk(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function $u(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}
vendor: 4,209 bytes, line 37
37function Om(){var e=Ea;return Ea<<=1,!(Ea&4194240)&&(Ea=64),e}function Ul(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function yk(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ot(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function id(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var re=0;function Im(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Lm,sd,Dm,$m,Mm,Mu=!1,Ca=[],Wn=null,Vn=null,qn=null,Ns=new Map,Os=new Map,On=[],kk="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 Th(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":Vn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function ts(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ca(t),t!==null&&sd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function wk(e,t,n,r,i){switch(t){case"focusin":return Wn=ts(Wn,e,t,n,r,i),!0;case"dragenter":return Vn=ts(Vn,e,t,n,r,i),!0;case"mouseover":return qn=ts(qn,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ns.set(s,ts(Ns.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Os.set(s,ts(Os.get(s)||null,e,t,n,r,i)),!0}return!1}function Um(e){var t=kr(e.target);if(t!==null){var n=Mr(t);if(n!==null){if(t=n.tag,t===13){if(t=Tm(n),t!==null){e.blockedOn=t,Mm(e.priority,function(){Dm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function to(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Uu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ou=r,n.target.dispatchEvent(r),Ou=null}else return t=ca(n),t!==null&&sd(t),e.blockedOn=n,!1;t.shift()}return!0}function Ch(e,t,n){to(e)&&n.delete(t)}function bk(){Mu=!1,Wn!==null&&to(Wn)&&(Wn=null),Vn!==null&&to(Vn)&&(Vn=null),qn!==null&&to(qn)&&(qn=null),Ns.forEach(Ch),Os.forEach(Ch)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Mu||(Mu=!0,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,bk)))}function Is(e){function t(i){return ns(i,e)}if(0<Ca.length){ns(Ca[0],e);for(var n=1;n<Ca.length;n++){var r=Ca[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Wn!==null&&ns(Wn,e),Vn!==null&&ns(Vn,e),qn!==null&&ns(qn,e),Ns.forEach(t),Os.forEach(t),n=0;n<On.length;n++)r=On[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<On.length&&(n=On[0],n.blockedOn===null);)Um(n),n.blockedOn===null&&On.shift()}var wi=kn.ReactCurrentBatchConfig,xo=!0;function xk(e,t,n,r){var i=re,s=wi.transition;wi.transition=null;try{re=1,ad(e,t,n,r)}finally{re=i,wi.transition=s}}function Sk(e,t,n,r){var i=re,s=wi.transition;wi.transition=null;try{re=4,ad(e,t,n,r)}finally{re=i,wi.transition=s}}function ad(e,t,n,r){if(xo){var i=Uu(e,t,n,r);if(i===null)Jl(e,t,r,So,n),Th(e,r);else if(wk(i,e,t,n,r))r.stopPropagation();else if(Th(e,r),t&4&&-1<kk.indexOf(e)){for(;i!==null;){var s=ca(i);if(s!==null&&Lm(s),s=Uu(e,t,n,r),s===null&&Jl(e,t,r,So,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Jl(e,t,r,null,n)}}var So=null;function Uu(e,t,n,r){if(So=null,e=nd(r),e=kr(e),e!==null)if(t=Mr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return So=e,null}
vendor: 10,401 bytes, line 37
37function Fm(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(ck()){case rd:return 1;case Rm:return 4;case wo:case dk:return 16;case Nm:return 536870912;default:return 16}default:return 16}}var zn=null,od=null,no=null;function Bm(){if(no)return no;var e,t=od,n=t.length,r,i="value"in zn?zn.value:zn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return no=i.slice(e,1<r?1-r:void 0)}function ro(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 Aa(){return!0}function Ah(){return!1}function ct(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Aa:Ah,this.isPropagationStopped=Ah,this}return pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Aa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Aa)},persist:function(){},isPersistent:Aa}),t}var Ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ld=ct(Ki),ua=pe({},Ki,{view:0,detail:0}),_k=ct(ua),Fl,Bl,rs,el=pe({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ud,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!==rs&&(rs&&e.type==="mousemove"?(Fl=e.screenX-rs.screenX,Bl=e.screenY-rs.screenY):Bl=Fl=0,rs=e),Fl)},movementY:function(e){return"movementY"in e?e.movementY:Bl}}),Ph=ct(el),jk=pe({},el,{dataTransfer:0}),Ek=ct(jk),Tk=pe({},ua,{relatedTarget:0}),zl=ct(Tk),Ck=pe({},Ki,{animationName:0,elapsedTime:0,pseudoElement:0}),Ak=ct(Ck),Pk=pe({},Ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rk=ct(Pk),Nk=pe({},Ki,{data:0}),Rh=ct(Nk),Ok={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ik={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"},Lk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lk[e])?!!t[e]:!1}function ud(){return Dk}var $k=pe({},ua,{key:function(e){if(e.key){var t=Ok[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ik[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ud,charCode:function(e){return e.type==="keypress"?ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mk=ct($k),Uk=pe({},el,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nh=ct(Uk),Fk=pe({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ud}),Bk=ct(Fk),zk=pe({},Ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hk=ct(zk),Kk=pe({},el,{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}),Wk=ct(Kk),Vk=[9,13,27,32],cd=fn&&"CompositionEvent"in window,ys=null;fn&&"documentMode"in document&&(ys=document.documentMode);var qk=fn&&"TextEvent"in window&&!ys,zm=fn&&(!cd||ys&&8<ys&&11>=ys),Oh=" ",Ih=!1;function Hm(e,t){switch(e){case"keyup":return Vk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Km(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function Gk(e,t){switch(e){case"compositionend":return Km(t);case"keypress":return t.which!==32?null:(Ih=!0,Oh);case"textInput":return e=t.data,e===Oh&&Ih?null:e;default:return null}}function Jk(e,t){if(ai)return e==="compositionend"||!cd&&Hm(e,t)?(e=Bm(),no=od=zn=null,ai=!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 zm&&t.locale!=="ko"?null:t.data;default:return null}}var Qk={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qk[e.type]:t==="textarea"}function Wm(e,t,n,r){xm(r),t=_o(t,"onChange"),0<t.length&&(n=new ld("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ks=null,Ls=null;function Yk(e){ng(e,0)}function tl(e){var t=ui(e);if(mm(t))return e}function Xk(e,t){if(e==="change")return t}var Vm=!1;if(fn){var Hl;if(fn){var Kl="oninput"in document;if(!Kl){var Dh=document.createElement("div");Dh.setAttribute("oninput","return;"),Kl=typeof Dh.oninput=="function"}Hl=Kl}else Hl=!1;Vm=Hl&&(!document.documentMode||9<document.documentMode)}function $h(){ks&&(ks.detachEvent("onpropertychange",qm),Ls=ks=null)}function qm(e){if(e.propertyName==="value"&&tl(Ls)){var t=[];Wm(t,Ls,e,nd(e)),Em(Yk,t)}}function Zk(e,t,n){e==="focusin"?($h(),ks=t,Ls=n,ks.attachEvent("onpropertychange",qm)):e==="focusout"&&$h()}function ew(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tl(Ls)}function tw(e,t){if(e==="click")return tl(t)}function nw(e,t){if(e==="input"||e==="change")return tl(t)}function rw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:rw;function Ds(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!bu.call(t,i)||!Lt(e[i],t[i]))return!1}return!0}function Mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uh(e,t){var n=Mh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mh(n)}}function Gm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jm(){for(var e=window,t=vo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vo(e.document)}return t}function dd(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 iw(e){var t=Jm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gm(n.ownerDocument.documentElement,n)){if(r!==null&&dd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Uh(n,s);var a=Uh(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sw=fn&&"documentMode"in document&&11>=document.documentMode,oi=null,Fu=null,ws=null,Bu=!1;function Fh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bu||oi==null||oi!==vo(r)||(r=oi,"selectionStart"in r&&dd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),ws&&Ds(ws,r)||(ws=r,r=_o(Fu,"onSelect"),0<r.length&&(t=new ld("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=oi)))}function Pa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionend:Pa("Transition","TransitionEnd")},Wl={},Qm={};fn&&(Qm=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function nl(e){if(Wl[e])return Wl[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qm)return Wl[e]=t[n];return e}var Ym=nl("animationend"),Xm=nl("animationiteration"),Zm=nl("animationstart"),eg=nl("transitionend"),tg=new Map,Bh="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 ar(e,t){tg.set(e,t),$r(t,[e])}for(var Vl=0;Vl<Bh.length;Vl++){var ql=Bh[Vl],aw=ql.toLowerCase(),ow=ql[0].toUpperCase()+ql.slice(1);ar(aw,"on"+ow)}ar(Ym,"onAnimationEnd");ar(Xm,"onAnimationIteration");ar(Zm,"onAnimationStart");ar("dblclick","onDoubleClick");ar("focusin","onFocus");ar("focusout","onBlur");ar(eg,"onTransitionEnd");Ii("onMouseEnter",["mouseout","mouseover"]);Ii("onMouseLeave",["mouseout","mouseover"]);Ii("onPointerEnter",["pointerout","pointerover"]);Ii("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),lw=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function zh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ak(r,t,void 0,e),e.currentTarget=null}function ng(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;zh(i,o,u),s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,u=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;zh(i,o,u),s=l}}}if(ko)throw e=Du,ko=!1,Du=null,e}function le(e,t){var n=t[Vu];n===void 0&&(n=t[Vu]=new Set);var r=e+"__bubble";n.has(r)||(rg(t,e,2,!1),n.add(r))}function Gl(e,t,n){var r=0;t&&(r|=4),rg(n,e,r,t)}var Ra="_reactListening"+Math.random().toString(36).slice(2);function $s(e){if(!e[Ra]){e[Ra]=!0,cm.forEach(function(n){n!=="selectionchange"&&(lw.has(n)||Gl(n,!1,e),Gl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ra]||(t[Ra]=!0,Gl("selectionchange",!1,t))}}function rg(e,t,n,r){switch(Fm(t)){case 1:var i=xk;break;case 4:i=Sk;break;default:i=ad}n=i.bind(null,t,n,e),i=void 0,!Lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Jl(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;
vendor: 21,925 bytes, lines 37-38
37if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=kr(o),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}o=o.parentNode}}r=r.return}Em(function(){var u=s,c=nd(n),d=[];e:{var f=tg.get(e);if(f!==void 0){var h=ld,k=e;switch(e){case"keypress":if(ro(n)===0)break e;case"keydown":case"keyup":h=Mk;break;case"focusin":k="focus",h=zl;break;case"focusout":k="blur",h=zl;break;case"beforeblur":case"afterblur":h=zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Ek;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Bk;break;case Ym:case Xm:case Zm:h=Ak;break;case eg:h=Hk;break;case"scroll":h=_k;break;case"wheel":h=Wk;break;case"copy":case"cut":case"paste":h=Rk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Nh}var y=(t&4)!==0,w=!y&&e==="scroll",v=y?f!==null?f+"Capture":null:f;y=[];for(var p=u,g;p!==null;){g=p;var x=g.stateNode;if(g.tag===5&&x!==null&&(g=x,v!==null&&(x=Rs(p,v),x!=null&&y.push(Ms(p,x,g)))),w)break;p=p.return}0<y.length&&(f=new h(f,k,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Ou&&(k=n.relatedTarget||n.fromElement)&&(kr(k)||k[pn]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(k=n.relatedTarget||n.toElement,h=u,k=k?kr(k):null,k!==null&&(w=Mr(k),k!==w||k.tag!==5&&k.tag!==6)&&(k=null)):(h=null,k=u),h!==k)){if(y=Ph,x="onMouseLeave",v="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(y=Nh,x="onPointerLeave",v="onPointerEnter",p="pointer"),w=h==null?f:ui(h),g=k==null?f:ui(k),f=new y(x,p+"leave",h,n,c),f.target=w,f.relatedTarget=g,x=null,kr(c)===u&&(y=new y(v,p+"enter",k,n,c),y.target=g,y.relatedTarget=w,x=y),w=x,h&&k)t:{for(y=h,v=k,p=0,g=y;g;g=qr(g))p++;for(g=0,x=v;x;x=qr(x))g++;for(;0<p-g;)y=qr(y),p--;for(;0<g-p;)v=qr(v),g--;for(;p--;){if(y===v||v!==null&&y===v.alternate)break t;y=qr(y),v=qr(v)}y=null}else y=null;h!==null&&Hh(d,f,h,y,!1),k!==null&&w!==null&&Hh(d,w,k,y,!0)}}e:{if(f=u?ui(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=Xk;else if(Lh(f))if(Vm)S=nw;else{S=ew;var _=Zk}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=tw);if(S&&(S=S(e,u))){Wm(d,S,n,c);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Cu(f,"number",f.value)}switch(_=u?ui(u):window,e){case"focusin":(Lh(_)||_.contentEditable==="true")&&(oi=_,Fu=u,ws=null);break;case"focusout":ws=Fu=oi=null;break;case"mousedown":Bu=!0;break;case"contextmenu":case"mouseup":case"dragend":Bu=!1,Fh(d,n,c);break;case"selectionchange":if(sw)break;case"keydown":case"keyup":Fh(d,n,c)}var j;if(cd)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else ai?Hm(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(zm&&n.locale!=="ko"&&(ai||A!=="onCompositionStart"?A==="onCompositionEnd"&&ai&&(j=Bm()):(zn=c,od="value"in zn?zn.value:zn.textContent,ai=!0)),_=_o(u,A),0<_.length&&(A=new Rh(A,e,null,n,c),d.push({event:A,listeners:_}),j?A.data=j:(j=Km(n),j!==null&&(A.data=j)))),(j=qk?Gk(e,n):Jk(e,n))&&(u=_o(u,"onBeforeInput"),0<u.length&&(c=new Rh("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=j))}ng(d,t)})}function Ms(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _o(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Rs(e,n),s!=null&&r.unshift(Ms(e,s,i)),s=Rs(e,t),s!=null&&r.push(Ms(e,s,i))),e=e.return}return r}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Hh(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(l!==null&&l===r)break;o.tag===5&&u!==null&&(o=u,i?(l=Rs(n,s),l!=null&&a.unshift(Ms(n,l,o))):i||(l=Rs(n,s),l!=null&&a.push(Ms(n,l,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var uw=/\r\n?/g,cw=/\u0000|\uFFFD/g;function Kh(e){return(typeof e=="string"?e:""+e).replace(uw,`
38`).replace(cw,"")}function Na(e,t,n){if(t=Kh(t),Kh(e)!==t&&n)throw Error(P(425))}function jo(){}var zu=null,Hu=null;function Ku(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 Wu=typeof setTimeout=="function"?setTimeout:void 0,dw=typeof clearTimeout=="function"?clearTimeout:void 0,Wh=typeof Promise=="function"?Promise:void 0,hw=typeof queueMicrotask=="function"?queueMicrotask:typeof Wh<"u"?function(e){return Wh.resolve(null).then(e).catch(fw)}:Wu;function fw(e){setTimeout(function(){throw e})}function Ql(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Is(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Is(t)}function Gn(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 Vh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Wi=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Wi,Us="__reactProps$"+Wi,pn="__reactContainer$"+Wi,Vu="__reactEvents$"+Wi,pw="__reactListeners$"+Wi,mw="__reactHandles$"+Wi;function kr(e){var t=e[Gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vh(e);e!==null;){if(n=e[Gt])return n;e=Vh(e)}return t}e=n,n=e.parentNode}return null}function ca(e){return e=e[Gt]||e[pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function rl(e){return e[Us]||null}var qu=[],ci=-1;function or(e){return{current:e}}function ue(e){0>ci||(e.current=qu[ci],qu[ci]=null,ci--)}function ae(e,t){ci++,qu[ci]=e.current,e.current=t}var tr={},Fe=or(tr),Ye=or(!1),Rr=tr;function Li(e,t){var n=e.type.contextTypes;if(!n)return tr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Xe(e){return e=e.childContextTypes,e!=null}function Eo(){ue(Ye),ue(Fe)}function qh(e,t,n){if(Fe.current!==tr)throw Error(P(168));ae(Fe,t),ae(Ye,n)}function ig(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(P(108,Z0(e)||"Unknown",i));return pe({},n,r)}function To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tr,Rr=Fe.current,ae(Fe,e),ae(Ye,Ye.current),!0}function Gh(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=ig(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,ue(Ye),ue(Fe),ae(Fe,e)):ue(Ye),ae(Ye,n)}var on=null,il=!1,Yl=!1;function sg(e){on===null?on=[e]:on.push(e)}function gw(e){il=!0,sg(e)}function lr(){if(!Yl&&on!==null){Yl=!0;var e=0,t=re;try{var n=on;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}on=null,il=!1}catch(i){throw on!==null&&(on=on.slice(e+1)),Pm(rd,lr),i}finally{re=t,Yl=!1}}return null}var di=[],hi=0,Co=null,Ao=0,pt=[],mt=0,Nr=null,un=1,cn="";function mr(e,t){di[hi++]=Ao,di[hi++]=Co,Co=e,Ao=t}function ag(e,t,n){pt[mt++]=un,pt[mt++]=cn,pt[mt++]=Nr,Nr=e;var r=un;e=cn;var i=32-Ot(r)-1;r&=~(1<<i),n+=1;var s=32-Ot(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,un=1<<32-Ot(t)+i|n<<i|r,cn=s+e}else un=1<<s|n<<i|r,cn=e}function hd(e){e.return!==null&&(mr(e,1),ag(e,1,0))}function fd(e){for(;e===Co;)Co=di[--hi],di[hi]=null,Ao=di[--hi],di[hi]=null;for(;e===Nr;)Nr=pt[--mt],pt[mt]=null,cn=pt[--mt],pt[mt]=null,un=pt[--mt],pt[mt]=null}var at=null,st=null,de=!1,Nt=null;function og(e,t){var n=gt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Jh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,at=e,st=Gn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Nr!==null?{id:un,overflow:cn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=gt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,at=e,st=null,!0):!1;default:return!1}}function Gu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ju(e){if(de){var t=st;if(t){var n=t;if(!Jh(e,t)){if(Gu(e))throw Error(P(418));t=Gn(n.nextSibling);var r=at;t&&Jh(e,t)?og(r,n):(e.flags=e.flags&-4097|2,de=!1,at=e)}}else{if(Gu(e))throw Error(P(418));e.flags=e.flags&-4097|2,de=!1,at=e}}}function Qh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function Oa(e){if(e!==at)return!1;if(!de)return Qh(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ku(e.type,e.memoizedProps)),t&&(t=st)){if(Gu(e))throw lg(),Error(P(418));for(;t;)og(e,t),t=Gn(t.nextSibling)}if(Qh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){st=Gn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}st=null}}else st=at?Gn(e.stateNode.nextSibling):null;return!0}function lg(){for(var e=st;e;)e=Gn(e.nextSibling)}function Di(){st=at=null,de=!1}function pd(e){Nt===null?Nt=[e]:Nt.push(e)}var vw=kn.ReactCurrentBatchConfig;function is(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(P(309));var r=n.stateNode}if(!r)throw Error(P(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function Ia(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yh(e){var t=e._init;return t(e._payload)}function ug(e){function t(v,p){if(e){var g=v.deletions;g===null?(v.deletions=[p],v.flags|=16):g.push(p)}}function n(v,p){if(!e)return null;for(;p!==null;)t(v,p),p=p.sibling;return null}function r(v,p){for(v=new Map;p!==null;)p.key!==null?v.set(p.key,p):v.set(p.index,p),p=p.sibling;return v}function i(v,p){return v=Xn(v,p),v.index=0,v.sibling=null,v}function s(v,p,g){return v.index=g,e?(g=v.alternate,g!==null?(g=g.index,g<p?(v.flags|=2,p):g):(v.flags|=2,p)):(v.flags|=1048576,p)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function o(v,p,g,x){return p===null||p.tag!==6?(p=iu(g,v.mode,x),p.return=v,p):(p=i(p,g),p.return=v,p)}function l(v,p,g,x){var S=g.type;return S===si?c(v,p,g.props.children,x,g.key):p!==null&&(p.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rn&&Yh(S)===p.type)?(x=i(p,g.props),x.ref=is(v,p,g),x.return=v,x):(x=co(g.type,g.key,g.props,null,v.mode,x),x.ref=is(v,p,g),x.return=v,x)}function u(v,p,g,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==g.containerInfo||p.stateNode.implementation!==g.implementation?(p=su(g,v.mode,x),p.return=v,p):(p=i(p,g.children||[]),p.return=v,p)}function c(v,p,g,x,S){return p===null||p.tag!==7?(p=Pr(g,v.mode,x,S),p.return=v,p):(p=i(p,g),p.return=v,p)}function d(v,p,g){if(typeof p=="string"&&p!==""||typeof p=="number")return p=iu(""+p,v.mode,g),p.return=v,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Sa:return g=co(p.type,p.key,p.props,null,v.mode,g),g.ref=is(v,null,p),g.return=v,g;case ii:return p=su(p,v.mode,g),p.return=v,p;case Rn:var x=p._init;return d(v,x(p._payload),g)}if(ds(p)||Zi(p))return p=Pr(p,v.mode,g,null),p.return=v,p;Ia(v,p)}return null}function f(v,p,g,x){var S=p!==null?p.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return S!==null?null:o(v,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Sa:return g.key===S?l(v,p,g,x):null;case ii:return g.key===S?u(v,p,g,x):null;case Rn:return S=g._init,f(v,p,S(g._payload),x)}if(ds(g)||Zi(g))return S!==null?null:c(v,p,g,x,null);Ia(v,g)}return null}function h(v,p,g,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return v=v.get(g)||null,o(p,v,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Sa:return v=v.get(x.key===null?g:x.key)||null,l(p,v,x,S);case ii:return v=v.get(x.key===null?g:x.key)||null,u(p,v,x,S);case Rn:var _=x._init;return h(v,p,g,_(x._payload),S)}if(ds(x)||Zi(x))return v=v.get(g)||null,c(p,v,x,S,null);Ia(p,x)}return null}function k(v,p,g,x){for(var S=null,_=null,j=p,A=p=0,R=null;j!==null&&A<g.length;A++){j.index>A?(R=j,j=null):R=j.sibling;var O=f(v,j,g[A],x);if(O===null){j===null&&(j=R);break}e&&j&&O.alternate===null&&t(v,j),p=s(O,p,A),_===null?S=O:_.sibling=O,_=O,j=R}if(A===g.length)return n(v,j),de&&mr(v,A),S;if(j===null){for(;A<g.length;A++)j=d(v,g[A],x),j!==null&&(p=s(j,p,A),_===null?S=j:_.sibling=j,_=j);return de&&mr(v,A),S}for(j=r(v,j);A<g.length;A++)R=h(j,v,A,g[A],x),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?A:R.key),p=s(R,p,A),_===null?S=R:_.sibling=R,_=R);return e&&j.forEach(function(z){return t(v,z)}),de&&mr(v,A),S}function y(v,p,g,x){var S=Zi(g);if(typeof S!="function")throw Error(P(150));if(g=S.call(g),g==null)throw Error(P(151));for(var _=S=null,j=p,A=p=0,R=null,O=g.next();j!==null&&!O.done;A++,O=g.next()){j.index>A?(R=j,j=null):R=j.sibling;var z=f(v,j,O.value,x);if(z===null){j===null&&(j=R);break}e&&j&&z.alternate===null&&t(v,j),p=s(z,p,A),_===null?S=z:_.sibling=z,_=z,j=R}if(O.done)return n(v,j),de&&mr(v,A),S;if(j===null){for(;!O.done;A++,O=g.next())O=d(v,O.value,x),O!==null&&(p=s(O,p,A),_===null?S=O:_.sibling=O,_=O);return de&&mr(v,A),S}for(j=r(v,j);!O.done;A++,O=g.next())O=h(j,v,A,O.value,x),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?A:O.key),p=s(O,p,A),_===null?S=O:_.sibling=O,_=O);return e&&j.forEach(function(L){return t(v,L)}),de&&mr(v,A),S}function w(v,p,g,x){if(typeof g=="object"&&g!==null&&g.type===si&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Sa:e:{for(var S=g.key,_=p;_!==null;){if(_.key===S){if(S=g.type,S===si){if(_.tag===7){n(v,_.sibling),p=i(_,g.props.children),p.return=v,v=p;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rn&&Yh(S)===_.type){n(v,_.sibling),p=i(_,g.props),p.ref=is(v,_,g),p.return=v,v=p;break e}n(v,_);break}else t(v,_);_=_.sibling}g.type===si?(p=Pr(g.props.children,v.mode,x,g.key),p.return=v,v=p):(x=co(g.type,g.key,g.props,null,v.mode,x),x.ref=is(v,p,g),x.return=v,v=x)}return a(v);case ii:e:{for(_=g.key;p!==null;){if(p.key===_)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(v,p.sibling),p=i(p,g.children||[]),p.return=v,v=p;break e}else{n(v,p);break}else t(v,p);p=p.sibling}p=su(g,v.mode,x),p.return=v,v=p}return a(v);case Rn:return _=g._init,w(v,p,_(g._payload),x)}if(ds(g))return k(v,p,g,x);if(Zi(g))return y(v,p,g,x);Ia(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(v,p.sibling),p=i(p,g),p.return=v,v=p):(n(v,p),p=iu(g,v.mode,x),p.return=v,v=p),a(v)):n(v,p)}return w}var $i=ug(!0),cg=ug(!1),Po=or(null),Ro=null,fi=null,md=null;function gd(){md=fi=Ro=null}function vd(e){var t=Po.current;ue(Po),e._currentValue=t}function Qu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function bi(e,t){Ro=e,md=fi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(md!==e)if(e={context:e,memoizedValue:t,next:null},fi===null){if(Ro===null)throw Error(P(308));fi=e,Ro.dependencies={lanes:0,firstContext:e}}else fi=fi.next=e;return t}var wr=null;function yd(e){wr===null?wr=[e]:wr.push(e)}function dg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,yd(t)):(n.next=i.next,i.next=n),t.interleaved=n,mn(e,r)}function mn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Nn=!1;function kd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hg(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 hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mn(e,n)}return i=r.interleaved,i===null?(t.next=t,yd(r)):(t.next=i.next,i.next=t),r.interleaved=t,mn(e,n)}function io(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,id(e,n)}}function Xh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function No(e,t,n,r){var i=e.updateQueue;Nn=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?s=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==a&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;a=0,c=u=l=null,o=s;do{var f=o.lane,h=o.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var k=e,y=o;switch(f=t,h=n,y.tag){case 1:if(k=y.payload,typeof k=="function"){d=k.call(h,d,f);break e}d=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=y.payload,f=typeof k=="function"?k.call(h,d,f):k,f==null)break e;d=pe({},d,f);break e;case 2:Nn=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,a|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ir|=a,e.lanes=a,e.memoizedState=d}}function Zh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(P(191,i));i.call(r)}}}var da={},Yt=or(da),Fs=or(da),Bs=or(da);function br(e){if(e===da)throw Error(P(174));return e}function wd(e,t){switch(ae(Bs,t),ae(Fs,e),ae(Yt,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pu(t,e)}ue(Yt),ae(Yt,t)}function Mi(){ue(Yt),ue(Fs),ue(Bs)}function fg(e){br(Bs.current);var t=br(Yt.current),n=Pu(t,e.type);t!==n&&(ae(Fs,e),ae(Yt,n))}function bd(e){Fs.current===e&&(ue(Yt),ue(Fs))}var he=or(0);function Oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 Xl=[];function xd(){for(var e=0;e<Xl.length;e++)Xl[e]._workInProgressVersionPrimary=null;Xl.length=0}var so=kn.ReactCurrentDispatcher,Zl=kn.ReactCurrentBatchConfig,Or=0,fe=null,Se=null,Ee=null,Io=!1,bs=!1,zs=0,yw=0;function De(){throw Error(P(321))}function Sd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lt(e[n],t[n]))return!1;return!0}function _d(e,t,n,r,i,s){if(Or=s,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,so.current=e===null||e.memoizedState===null?xw:Sw,e=n(r,i),bs){s=0;do{if(bs=!1,zs=0,25<=s)throw Error(P(301));s+=1,Ee=Se=null,t.updateQueue=null,so.current=_w,e=n(r,i)}while(bs)}if(so.current=Lo,t=Se!==null&&Se.next!==null,Or=0,Ee=Se=fe=null,Io=!1,t)throw Error(P(300));return e}
vendor: 6,380 bytes, line 38
38function jd(){var e=zs!==0;return zs=0,e}function zt(){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 kt(){if(Se===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ee===null?fe.memoizedState:Ee.next;if(t!==null)Ee=t,Se=e;else{if(e===null)throw Error(P(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ee===null?fe.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function Hs(e,t){return typeof t=="function"?t(e):t}function eu(e){var t=kt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=Se,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=a=null,l=null,u=s;do{var c=u.lane;if((Or&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=d,a=r):l=l.next=d,fe.lanes|=c,Ir|=c}u=u.next}while(u!==null&&u!==s);l===null?a=r:l.next=o,Lt(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,fe.lanes|=s,Ir|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function tu(e){var t=kt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);Lt(s,t.memoizedState)||(Qe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function pg(){}function mg(e,t){var n=fe,r=kt(),i=t(),s=!Lt(r.memoizedState,i);if(s&&(r.memoizedState=i,Qe=!0),r=r.queue,Ed(yg.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ee!==null&&Ee.memoizedState.tag&1){if(n.flags|=2048,Ks(9,vg.bind(null,n,r,i,t),void 0,null),Te===null)throw Error(P(349));Or&30||gg(n,t,i)}return i}function gg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vg(e,t,n,r){t.value=n,t.getSnapshot=r,kg(t)&&wg(e)}function yg(e,t,n){return n(function(){kg(t)&&wg(e)})}function kg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lt(e,n)}catch{return!0}}function wg(e){var t=mn(e,1);t!==null&&It(t,e,1,-1)}function ef(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:e},t.queue=e,e=e.dispatch=bw.bind(null,fe,e),[t.memoizedState,e]}function Ks(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function bg(){return kt().memoizedState}function ao(e,t,n,r){var i=zt();fe.flags|=e,i.memoizedState=Ks(1|t,n,void 0,r===void 0?null:r)}function sl(e,t,n,r){var i=kt();r=r===void 0?null:r;var s=void 0;if(Se!==null){var a=Se.memoizedState;if(s=a.destroy,r!==null&&Sd(r,a.deps)){i.memoizedState=Ks(t,n,s,r);return}}fe.flags|=e,i.memoizedState=Ks(1|t,n,s,r)}function tf(e,t){return ao(8390656,8,e,t)}function Ed(e,t){return sl(2048,8,e,t)}function xg(e,t){return sl(4,2,e,t)}function Sg(e,t){return sl(4,4,e,t)}function _g(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 jg(e,t,n){return n=n!=null?n.concat([e]):null,sl(4,4,_g.bind(null,t,e),n)}function Td(){}function Eg(e,t){var n=kt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Tg(e,t){var n=kt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cg(e,t,n){return Or&21?(Lt(n,t)||(n=Om(),fe.lanes|=n,Ir|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function kw(e,t){var n=re;re=n!==0&&4>n?n:4,e(!0);var r=Zl.transition;Zl.transition={};try{e(!1),t()}finally{re=n,Zl.transition=r}}function Ag(){return kt().memoizedState}function ww(e,t,n){var r=Yn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Pg(e))Rg(t,n);else if(n=dg(e,t,n,r),n!==null){var i=Ke();It(n,e,r,i),Ng(n,t,r)}}function bw(e,t,n){var r=Yn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pg(e))Rg(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,Lt(o,a)){var l=t.interleaved;l===null?(i.next=i,yd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=dg(e,t,i,r),n!==null&&(i=Ke(),It(n,e,r,i),Ng(n,t,r))}}function Pg(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Rg(e,t){bs=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ng(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,id(e,n)}}var Lo={readContext:yt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},xw={readContext:yt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:tf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ao(4194308,4,_g.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ao(4194308,4,e,t)},useInsertionEffect:function(e,t){return ao(4,2,e,t)},useMemo:function(e,t){var n=zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ww.bind(null,fe,e),[r.memoizedState,e]}
vendor: 6,078 bytes, lines 38-40
38,useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:ef,useDebugValue:Td,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=ef(!1),t=e[0];return e=kw.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,i=zt();if(de){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Te===null)throw Error(P(349));Or&30||gg(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,tf(yg.bind(null,r,s,e),[e]),r.flags|=2048,Ks(9,vg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=zt(),t=Te.identifierPrefix;if(de){var n=cn,r=un;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=yw++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sw={readContext:yt,useCallback:Eg,useContext:yt,useEffect:Ed,useImperativeHandle:jg,useInsertionEffect:xg,useLayoutEffect:Sg,useMemo:Tg,useReducer:eu,useRef:bg,useState:function(){return eu(Hs)},useDebugValue:Td,useDeferredValue:function(e){var t=kt();return Cg(t,Se.memoizedState,e)},useTransition:function(){var e=eu(Hs)[0],t=kt().memoizedState;return[e,t]},useMutableSource:pg,useSyncExternalStore:mg,useId:Ag,unstable_isNewReconciler:!1},_w={readContext:yt,useCallback:Eg,useContext:yt,useEffect:Ed,useImperativeHandle:jg,useInsertionEffect:xg,useLayoutEffect:Sg,useMemo:Tg,useReducer:tu,useRef:bg,useState:function(){return tu(Hs)},useDebugValue:Td,useDeferredValue:function(e){var t=kt();return Se===null?t.memoizedState=e:Cg(t,Se.memoizedState,e)},useTransition:function(){var e=tu(Hs)[0],t=kt().memoizedState;return[e,t]},useMutableSource:pg,useSyncExternalStore:mg,useId:Ag,unstable_isNewReconciler:!1};function Et(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var al={isMounted:function(e){return(e=e._reactInternals)?Mr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ke(),i=Yn(e),s=hn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Jn(e,s,i),t!==null&&(It(t,e,i,r),io(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ke(),i=Yn(e),s=hn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Jn(e,s,i),t!==null&&(It(t,e,i,r),io(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ke(),r=Yn(e),i=hn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Jn(e,i,r),t!==null&&(It(t,e,r,n),io(t,e,r))}};function nf(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!Ds(n,r)||!Ds(i,s):!0}function Og(e,t,n){var r=!1,i=tr,s=t.contextType;return typeof s=="object"&&s!==null?s=yt(s):(i=Xe(t)?Rr:Fe.current,r=t.contextTypes,s=(r=r!=null)?Li(e,i):tr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=al,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function rf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&al.enqueueReplaceState(t,t.state,null)}function Xu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},kd(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=yt(s):(s=Xe(t)?Rr:Fe.current,i.context=Li(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Yu(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&al.enqueueReplaceState(i,i.state,null),No(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ui(e,t){try{var n="",r=t;do n+=X0(r),r=r.return;while(r);var i=n}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:e,source:t,stack:i,digest:null}}function nu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jw=typeof WeakMap=="function"?WeakMap:Map;function Ig(e,t,n){n=hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$o||($o=!0,uc=r),Zu(e,t)},n}function Lg(e,t,n){n=hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Zu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Zu(e,t),typeof r!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function sf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jw;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Uw.bind(null,e,t,n),t.then(e,e))}function af(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 of(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hn(-1,1),t.tag=2,Jn(n,t,1))),n.lanes|=1),e)}var Ew=kn.ReactCurrentOwner,Qe=!1;function ze(e,t,n,r){t.child=e===null?cg(t,null,n,r):$i(t,e.child,n,r)}function lf(e,t,n,r,i){n=n.render;var s=t.ref;return bi(t,i),r=_d(e,t,n,r,s,i),n=jd(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gn(e,t,i)):(de&&n&&hd(t),t.flags|=1,ze(e,t,r,i
vendor: 10,132 bytes, line 40
40),t.child)}function uf(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Ld(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Dg(e,t,s,r,i)):(e=co(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ds,n(a,r)&&e.ref===t.ref)return gn(e,t,i)}return t.flags|=1,e=Xn(s,r),e.ref=t.ref,e.return=t,t.child=e}function Dg(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ds(s,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,gn(e,t,i)}return ec(e,t,n,r,i)}function $g(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(mi,nt),nt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(mi,nt),nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ae(mi,nt),nt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ae(mi,nt),nt|=r;return ze(e,t,i,n),t.child}function Mg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ec(e,t,n,r,i){var s=Xe(n)?Rr:Fe.current;return s=Li(t,s),bi(t,i),n=_d(e,t,n,r,s,i),r=jd(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gn(e,t,i)):(de&&r&&hd(t),t.flags|=1,ze(e,t,n,i),t.child)}function cf(e,t,n,r,i){if(Xe(n)){var s=!0;To(t)}else s=!1;if(bi(t,i),t.stateNode===null)oo(e,t),Og(t,n,r),Xu(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=yt(u):(u=Xe(n)?Rr:Fe.current,u=Li(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==u)&&rf(t,a,r,u),Nn=!1;var f=t.memoizedState;a.state=f,No(t,r,a,i),l=t.memoizedState,o!==r||f!==l||Ye.current||Nn?(typeof c=="function"&&(Yu(t,n,c,r),l=t.memoizedState),(o=Nn||nf(t,n,o,r,f,l,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,hg(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Et(t.type,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=yt(l):(l=Xe(n)?Rr:Fe.current,l=Li(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||f!==l)&&rf(t,a,r,l),Nn=!1,f=t.memoizedState,a.state=f,No(t,r,a,i);var k=t.memoizedState;o!==d||f!==k||Ye.current||Nn?(typeof h=="function"&&(Yu(t,n,h,r),k=t.memoizedState),(u=Nn||nf(t,n,u,r,f,k,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,k,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,k,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),a.props=r,a.state=k,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return tc(e,t,n,r,s,i)}function tc(e,t,n,r,i,s){Mg(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Gh(t,n,!1),gn(e,t,s);r=t.stateNode,Ew.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=$i(t,e.child,null,s),t.child=$i(t,null,o,s)):ze(e,t,o,s),t.memoizedState=r.state,i&&Gh(t,n,!0),t.child}function Ug(e){var t=e.stateNode;t.pendingContext?qh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qh(e,t.context,!1),wd(e,t.containerInfo)}function df(e,t,n,r,i){return Di(),pd(i),t.flags|=256,ze(e,t,n,r),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0};function rc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fg(e,t,n){var r=t.pendingProps,i=he.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ae(he,i&1),e===null)return Ju(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):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=ul(a,r,0,null),e=Pr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=rc(n),t.memoizedState=nc,e):Cd(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Tw(e,t,a,r,o,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Xn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Xn(o,s):(s=Pr(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?rc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=nc,r}return s=e.child,e=s.sibling,r=Xn(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Cd(e,t){return t=ul({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function La(e,t,n,r){return r!==null&&pd(r),$i(t,e.child,null,n),e=Cd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tw(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=nu(Error(P(422))),La(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ul({mode:"visible",children:r.children},i,0,null),s=Pr(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&$i(t,e.child,null,a),t.child.memoizedState=rc(a),t.memoizedState=nc,s);if(!(t.mode&1))return La(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(P(419)),r=nu(s,r,void 0),La(e,t,a,r)}if(o=(a&e.childLanes)!==0,Qe||o){if(r=Te,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,mn(e,i),It(r,e,i,-1))}return Id(),r=nu(Error(P(421))),La(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Fw.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,st=Gn(i.nextSibling),at=t,de=!0,Nt=null,e!==null&&(pt[mt++]=un,pt[mt++]=cn,pt[mt++]=Nr,un=e.id,cn=e.overflow,Nr=t),t=Cd(t,r.children),t.flags|=4096,t)}function hf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qu(e.return,t,n)}function ru(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Bg(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ze(e,t,r.children,n),r=he.current,r&2)r=r&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&&hf(e,n,t);else if(e.tag===19)hf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ae(he,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ru(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ru(t,!0,n,null,s);break;case"together":ru(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ir|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=Xn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cw(e,t,n){switch(t.tag){case 3:Ug(t),Di();break;case 5:fg(t);break;case 1:Xe(t.type)&&To(t);break;case 4:wd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ae(Po,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ae(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?Fg(e,t,n):(ae(he,he.current&1),e=gn(e,t,n
vendor: 4,145 bytes, line 40
40),e!==null?e.sibling:null);ae(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,$g(e,t,n)}return gn(e,t,n)}var zg,ic,Hg,Kg;zg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ic=function(){};Hg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,br(Yt.current);var s=null;switch(n){case"input":i=Eu(e,i),r=Eu(e,r),s=[];break;case"select":i=pe({},i,{value:void 0}),r=pe({},r,{value:void 0}),s=[];break;case"textarea":i=Au(e,i),r=Au(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jo)}Ru(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(As.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(As.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("scroll",e),s||o===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Kg=function(e,t,n,r){n!==r&&(t.flags|=4)};function ss(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Aw(e,t,n){var r=t.pendingProps;switch(fd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return Xe(t.type)&&Eo(),$e(t),null;case 3:return r=t.stateNode,Mi(),ue(Ye),ue(Fe),xd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Oa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nt!==null&&(hc(Nt),Nt=null))),ic(e,t),$e(t),null;case 5:bd(t);var i=br(Bs.current);if(n=t.type,e!==null&&t.stateNode!=null)Hg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return $e(t),null}if(e=br(Yt.current),Oa(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Gt]=t,r[Us]=s,e=(t.mode&1)!==0,n){case"dialog":le("cancel",r),le("close",r);break;case"iframe":case"object":case"embed":le("load",r);break;case"video":case"audio":for(i=0;i<fs.length;i++)le(fs[i],r);break;case"source":le("error",r);break;case"img":case"image":case"link":le("error",r),le("load",r);break;case"details":le("toggle",r);break;case"input":wh(r,s),le("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},le("invalid",r);break;case"textarea":xh(r,s),le("invalid",r)}Ru(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];
vendor: 31,695 bytes, line 40
40a==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&Na(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&Na(r.textContent,o,e),i=["children",""+o]):As.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&le("scroll",r)}switch(n){case"input":_a(r),bh(r,s,!0);break;case"textarea":_a(r),Sh(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=jo)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ym(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Gt]=t,e[Us]=r,zg(e,t,!1,!1),t.stateNode=e;e:{switch(a=Nu(n,r),n){case"dialog":le("cancel",e),le("close",e),i=r;break;case"iframe":case"object":case"embed":le("load",e),i=r;break;case"video":case"audio":for(i=0;i<fs.length;i++)le(fs[i],e);i=r;break;case"source":le("error",e),i=r;break;case"img":case"image":case"link":le("error",e),le("load",e),i=r;break;case"details":le("toggle",e),i=r;break;case"input":wh(e,r),i=Eu(e,r),le("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=pe({},r,{value:void 0}),le("invalid",e);break;case"textarea":xh(e,r),i=Au(e,r),le("invalid",e);break;default:i=r}Ru(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?bm(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&km(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ps(e,l):typeof l=="number"&&Ps(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(As.hasOwnProperty(s)?l!=null&&s==="onScroll"&&le("scroll",e):l!=null&&Xc(e,s,l,a))}switch(n){case"input":_a(e),bh(e,r,!1);break;case"textarea":_a(e),Sh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+er(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?vi(e,!!r.multiple,s,!1):r.defaultValue!=null&&vi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=jo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $e(t),null;case 6:if(e&&t.stateNode!=null)Kg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(n=br(Bs.current),br(Yt.current),Oa(t)){if(r=t.stateNode,n=t.memoizedProps,r[Gt]=t,(s=r.nodeValue!==n)&&(e=at,e!==null))switch(e.tag){case 3:Na(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Na(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gt]=t,t.stateNode=r}return $e(t),null;case 13:if(ue(he),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&st!==null&&t.mode&1&&!(t.flags&128))lg(),Di(),t.flags|=98560,s=!1;else if(s=Oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(P(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(P(317));s[Gt]=t}else Di(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$e(t),s=!1}else Nt!==null&&(hc(Nt),Nt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||he.current&1?je===0&&(je=3):Id())),t.updateQueue!==null&&(t.flags|=4),$e(t),null);case 4:return Mi(),ic(e,t),e===null&&$s(t.stateNode.containerInfo),$e(t),null;case 10:return vd(t.type._context),$e(t),null;case 17:return Xe(t.type)&&Eo(),$e(t),null;case 19:if(ue(he),s=t.memoizedState,s===null)return $e(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)ss(s,!1);else{if(je!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Oo(e),a!==null){for(t.flags|=128,ss(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ae(he,he.current&1|2),t.child}e=e.sibling}s.tail!==null&&ye()>Fi&&(t.flags|=128,r=!0,ss(s,!1),t.lanes=4194304)}else{if(!r)if(e=Oo(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ss(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!de)return $e(t),null}else 2*ye()-s.renderingStartTime>Fi&&n!==1073741824&&(t.flags|=128,r=!0,ss(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ye(),t.sibling=null,n=he.current,ae(he,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Od(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nt&1073741824&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Pw(e,t){switch(fd(t),t.tag){case 1:return Xe(t.type)&&Eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mi(),ue(Ye),ue(Fe),xd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bd(t),null;case 13:if(ue(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Di()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(he),null;case 4:return Mi(),null;case 10:return vd(t.type._context),null;case 22:case 23:return Od(),null;case 24:return null;default:return null}}var Da=!1,Ue=!1,Rw=typeof WeakSet=="function"?WeakSet:Set,$=null;function pi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function sc(e,t,n){try{n()}catch(r){ve(e,t,r)}}var ff=!1;function Nw(e,t){if(zu=xo,e=Jm(),dd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=a+i),d!==s||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(o=a),f===s&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hu={focusedElem:e,selectionRange:n},xo=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var y=k.memoizedProps,w=k.memoizedState,v=t.stateNode,p=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:Et(t.type,y),w);v.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(x){ve(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return k=ff,ff=!1,k}function xs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&sc(t,n,s)}i=i.next}while(i!==r)}}function ol(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ac(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Wg(e){var t=e.alternate;t!==null&&(e.alternate=null,Wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gt],delete t[Us],delete t[Vu],delete t[pw],delete t[mw])),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 Vg(e){return e.tag===5||e.tag===3||e.tag===4}function pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vg(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 oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jo));else if(r!==4&&(e=e.child,e!==null))for(oc(e,t,n),e=e.sibling;e!==null;)oc(e,t,n),e=e.sibling}function lc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(lc(e,t,n),e=e.sibling;e!==null;)lc(e,t,n),e=e.sibling}var Re=null,Rt=!1;function Tn(e,t,n){for(n=n.child;n!==null;)qg(e,t,n),n=n.sibling}function qg(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Zo,n)}catch{}switch(n.tag){case 5:Ue||pi(n,t);case 6:var r=Re,i=Rt;Re=null,Tn(e,t,n),Re=r,Rt=i,Re!==null&&(Rt?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(Rt?(e=Re,n=n.stateNode,e.nodeType===8?Ql(e.parentNode,n):e.nodeType===1&&Ql(e,n),Is(e)):Ql(Re,n.stateNode));break;case 4:r=Re,i=Rt,Re=n.stateNode.containerInfo,Rt=!0,Tn(e,t,n),Re=r,Rt=i;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&sc(n,t,a),i=i.next}while(i!==r)}Tn(e,t,n);break;case 1:if(!Ue&&(pi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ve(n,t,o)}Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,Tn(e,t,n),Ue=r):Tn(e,t,n);break;default:Tn(e,t,n)}}function mf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rw),t.forEach(function(r){var i=Bw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Re=o.stateNode,Rt=!1;break e;case 3:Re=o.stateNode.containerInfo,Rt=!0;break e;case 4:Re=o.stateNode.containerInfo,Rt=!0;break e}o=o.return}if(Re===null)throw Error(P(160));qg(s,a,i),Re=null,Rt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ve(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gg(t,e),t=t.sibling}function Gg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(St(t,e),Ut(e),r&4){try{xs(3,e,e.return),ol(3,e)}catch(y){ve(e,e.return,y)}try{xs(5,e,e.return)}catch(y){ve(e,e.return,y)}}break;case 1:St(t,e),Ut(e),r&512&&n!==null&&pi(n,n.return);break;case 5:if(St(t,e),Ut(e),r&512&&n!==null&&pi(n,n.return),e.flags&32){var i=e.stateNode;try{Ps(i,"")}catch(y){ve(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&gm(i,s),Nu(o,a);var u=Nu(o,s);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];c==="style"?bm(i,d):c==="dangerouslySetInnerHTML"?km(i,d):c==="children"?Ps(i,d):Xc(i,c,d,u)}switch(o){case"input":Tu(i,s);break;case"textarea":vm(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?vi(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?vi(i,!!s.multiple,s.defaultValue,!0):vi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Us]=s}catch(y){ve(e,e.return,y)}}break;case 6:if(St(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(P(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){ve(e,e.return,y)}}break;case 3:if(St(t,e),Ut(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Is(t.containerInfo)}catch(y){ve(e,e.return,y)}break;case 4:St(t,e),Ut(e);break;case 13:St(t,e),Ut(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Rd=ye())),r&4&&mf(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ue=(u=Ue)||c,St(t,e),Ue=u):St(t,e),Ut(e),r&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:xs(4,f,f.return);break;case 1:pi(f,f.return);var k=f.stateNode;if(typeof k.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(y){ve(r,n,y)}}break;case 5:pi(f,f.return);break;case 22:if(f.memoizedState!==null){vf(d);continue}}h!==null?(h.return=f,$=h):vf(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=wm("display",a))}catch(y){ve(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){ve(e,e.return,y)}}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:St(t,e),Ut(e),r&4&&mf(e);break;case 21:break;default:St(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vg(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ps(i,""),r.flags&=-33);var s=pf(e);lc(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,o=pf(e);oc(e,o,a);break;default:throw Error(P(161))}}catch(l){ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ow(e,t,n){$=e,Jg(e)}function Jg(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var i=$,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Da;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Ue;o=Da;var u=Ue;if(Da=a,(Ue=l)&&!u)for($=i;$!==null;)a=$,l=a.child,a.tag===22&&a.memoizedState!==null?yf(i):l!==null?(l.return=a,$=l):yf(i);for(;s!==null;)$=s,Jg(s),s=s.sibling;$=i,Da=o,Ue=u}gf(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,$=s):gf(e)}}function gf(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ue||ol(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ue)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Et(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Zh(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Zh(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.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&&Is(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Ue||t.flags&512&&ac(t)}catch(f){ve(t,t.return,f)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function vf(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function yf(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ol(4,t)}catch(l){ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ve(t,i,l)}}var s=t.return;try{ac(t)}catch(l){ve(t,s,l)}break;case 5:var a=t.return;try{ac(t)}catch(l){ve(t,a,l)}}}catch(l){ve(t,t.return,l)}if(t===e){$=null;break}var o=t.sibling;if(o!==null){o.return=t.return,$=o;break}$=t.return}}var Iw=Math.ceil,Do=kn.ReactCurrentDispatcher,Ad=kn.ReactCurrentOwner,vt=kn.ReactCurrentBatchConfig,ee=0,Te=null,be=null,Ne=0,nt=0,mi=or(0),je=0,Ws=null,Ir=0,ll=0,Pd=0,Ss=null,Je=null,Rd=0,Fi=1/0,rn=null,$o=!1,uc=null,Qn=null,$a=!1,Hn=null,Mo=0,_s=0,cc=null,lo=-1,uo=0;function Ke(){return ee&6?ye():lo!==-1?lo:lo=ye()}function Yn(e){return e.mode&1?ee&2&&Ne!==0?Ne&-Ne:vw.transition!==null?(uo===0&&(uo=Om()),uo):(e=re,e!==0||(e=window.event,e=e===void 0?16:Fm(e.type)),e):1}function It(e,t,n,r){if(50<_s)throw _s=0,cc=null,Error(P(185));la(e,n,r),(!(ee&2)||e!==Te)&&(e===Te&&(!(ee&2)&&(ll|=n),je===4&&In(e,Ne)),Ze(e,r),n===1&&ee===0&&!(t.mode&1)&&(Fi=ye()+500,il&&lr()))}function Ze(e,t){var n=e.callbackNode;vk(e,t);var r=bo(e,e===Te?Ne:0);if(r===0)n!==null&&Eh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Eh(n),t===1)e.tag===0?gw(kf.bind(null,e)):sg(kf.bind(null,e)),hw(function(){!(ee&6)&&lr()}),n=null;else{switch(Im(r)){case 1:n=rd;break;case 4:n=Rm;break;case 16:n=wo;break;case 536870912:n=Nm;break;default:n=wo}n=rv(n,Qg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Qg(e,t){if(lo=-1,uo=0,ee&6)throw Error(P(327));var n=e.callbackNode;if(xi()&&e.callbackNode!==n)return null;var r=bo(e,e===Te?Ne:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Uo(e,r);else{t=r;var i=ee;ee|=2;var s=Xg();(Te!==e||Ne!==t)&&(rn=null,Fi=ye()+500,Ar(e,t));do try{$w();break}catch(o){Yg(e,o)}while(!0);gd(),Do.current=s,ee=i,be!==null?t=0:(Te=null,Ne=0,t=je)}if(t!==0){if(t===2&&(i=$u(e),i!==0&&(r=i,t=dc(e,i))),t===1)throw n=Ws,Ar(e,0),In(e,r),Ze(e,ye()),n;if(t===6)In(e,r);else{if(i=e.current.alternate,!(r&30)&&!Lw(i)&&(t=Uo(e,r),t===2&&(s=$u(e),s!==0&&(r=s,t=dc(e,s))),t===1))throw n=Ws,Ar(e,0),In(e,r),Ze(e,ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:gr(e,Je,rn);break;case 3:if(In(e,r),(r&130023424)===r&&(t=Rd+500-ye(),10<t)){if(bo(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ke(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Wu(gr.bind(null,e,Je,rn),t);break}gr(e,Je,rn);break;case 4:if(In(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Ot(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Iw(r/1960))-r,10<r){e.timeoutHandle=Wu(gr.bind(null,e,Je,rn),r);break}gr(e,Je,rn);break;case 5:gr(e,Je,rn);break;default:throw Error(P(329))}}}return Ze(e,ye()),e.callbackNode===n?Qg.bind(null,e):null}function dc(e,t){var n=Ss;return e.current.memoizedState.isDehydrated&&(Ar(e,t).flags|=256),e=Uo(e,t),e!==2&&(t=Je,Je=n,t!==null&&hc(t)),e}function hc(e){Je===null?Je=e:Je.push.apply(Je,e)}function Lw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Lt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t){for(t&=~Pd,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function kf(e){if(ee&6)throw Error(P(327));xi();var t=bo(e,0);if(!(t&1))return Ze(e,ye()),null;var n=Uo(e,t);if(e.tag!==0&&n===2){var r=$u(e);r!==0&&(t=r,n=dc(e,r))}if(n===1)throw n=Ws,Ar(e,0),In(e,t),Ze(e,ye()),n;if(n===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gr(e,Je,rn),Ze(e,ye()),null}function Nd(e,t){var n=ee;ee|=1;try{return e(t)}finally{ee=n,ee===0&&(Fi=ye()+500,il&&lr())}}function Lr(e){Hn!==null&&Hn.tag===0&&!(ee&6)&&xi();var t=ee;ee|=1;var n=vt.transition,r=re;try{if(vt.transition=null,re=1,e)return e()}finally{re=r,vt.transition=n,ee=t,!(ee&6)&&lr()}}function Od(){nt=mi.current,ue(mi)}function Ar(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dw(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(fd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eo();break;case 3:Mi(),ue(Ye),ue(Fe),xd();break;case 5:bd(r);break;case 4:Mi();break;case 13:ue(he);break;case 19:ue(he);break;case 10:vd(r.type._context);break;case 22:case 23:Od()}n=n.return}if(Te=e,be=e=Xn(e.current,null),Ne=nt=t,je=0,Ws=null,Pd=ll=Ir=0,Je=Ss=null,wr!==null){for(t=0;t<wr.length;t++)if(n=wr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}wr=null}return e}function Yg(e,t){do{var n=be;try{if(gd(),so.current=Lo,Io){for(var r=fe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Io=!1}if(Or=0,Ee=Se=fe=null,bs=!1,zs=0,Ad.current=null,n===null||n.return===null){je=1,Ws=t,be=null;break}e:{var s=e,a=n.return,o=n,l=t;if(t=Ne,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=o,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=af(a);if(h!==null){h.flags&=-257,of(h,a,o,s,t),h.mode&1&&sf(s,u,t),t=h,l=u;var k=t.updateQueue;if(k===null){var y=new Set;y.add(l),t.updateQueue=y}else k.add(l);break e}else{if(!(t&1)){sf(s,u,t),Id();break e}l=Error(P(426))}}else if(de&&o.mode&1){var w=af(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),of(w,a,o,s,t),pd(Ui(l,o));break e}}s=l=Ui(l,o),je!==4&&(je=2),Ss===null?Ss=[s]:Ss.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=Ig(s,l,t);Xh(s,v);break e;case 1:o=l;var p=s.type,g=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Qn===null||!Qn.has(g)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=Lg(s,o,t);Xh(s,x);break e}}s=s.return}while(s!==null)}ev(n)}catch(S){t=S,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function Xg(){var e=Do.current;return Do.current=Lo,e===null?Lo:e}function Id(){(je===0||je===3||je===2)&&(je=4),Te===null||!(Ir&268435455)&&!(ll&268435455)||In(Te,Ne)}function Uo(e,t){var n=ee;ee|=2;var r=Xg();(Te!==e||Ne!==t)&&(rn=null,Ar(e,t));do try{Dw();break}catch(i){Yg(e,i)}while(!0);if(gd(),ee=n,Do.current=r,be!==null)throw Error(P(261));return Te=null,Ne=0,je}function Dw(){for(;be!==null;)Zg(be)}function $w(){for(;be!==null&&!lk();)Zg(be)}function Zg(e){var t=nv(e.alternate,e,nt);e.memoizedProps=e.pendingProps,t===null?ev(e):be=t,Ad.current=null}function ev(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Pw(n,t),n!==null){n.flags&=32767,be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{je=6,be=null;return}}else if(n=Aw(n,t,nt),n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);je===0&&(je=5)}function gr(e,t,n){var r=re,i=vt.transition;try{vt.transition=null,re=1,Mw(e,t,n,r)}finally{vt.transition=i,re=r}return null}function Mw(e,t,n,r){do xi();while(Hn!==null);if(ee&6)throw Error(P(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(yk(e,s),e===Te&&(be=Te=null,Ne=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||$a||($a=!0,rv(wo,function(){return xi(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=vt.transition,vt.transition=null;var a=re;re=1;var o=ee;ee|=4,Ad.current=null,Nw(e,n),Gg(n,e),iw(Hu),xo=!!zu,Hu=zu=null,e.current=n,Ow(n),uk(),ee=o,re=a,vt.transition=s}else e.current=n;if($a&&($a=!1,Hn=e,Mo=i),s=e.pendingLanes,s===0&&(Qn=null),hk(n.stateNode),Ze(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if($o)throw $o=!1,e=uc,uc=null,e;return Mo&1&&e.tag!==0&&xi(),s=e.pendingLanes,s&1?e===cc?_s++:(_s=0,cc=e):_s=0,lr(),null}function xi(){if(Hn!==null){var e=Im(Mo),t=vt.transition,n=re;try{if(vt.transition=null,re=16>e?16:e,Hn===null)var r=!1;else{if(e=Hn,Hn=null,Mo=0,ee&6)throw Error(P(331));var i=ee;for(ee|=4,$=e.current;$!==null;){var s=$,a=s.child;if($.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for($=u;$!==null;){var c=$;switch(c.tag){case 0:case 11:case 15:xs(8,c,s)}var d=c.child;if(d!==null)d.return=c,$=d;else for(;$!==null;){c=$;var f=c.sibling,h=c.return;if(Wg(c),c===u){$=null;break}if(f!==null){f.return=h,$=f;break}$=h}}}var k=s.alternate;if(k!==null){var y=k.child;if(y!==null){k.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}$=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,$=a;else e:for(;$!==null;){if(s=$,s.flags&2048)switch(s.tag){case 0:case 11:case 15:xs(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,$=v;break e}$=s.return}}var p=e.current;for($=p;$!==null;){a=$;var g=a.child;if(a.subtreeFlags&2064&&g!==null)g.return=a,$=g;else e:for(a=p;$!==null;){if(o=$,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ol(9,o)}}catch(S){ve(o,o.return,S)}if(o===a){$=null;break e}var x=o.sibling;if(x!==null){x.return=o.return,$=x;break e}$=o.return}}if(ee=i,lr(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Zo,e)}catch{}r=!0}return r}finally{re=n,vt.transition=t}}return!1}function wf(e,t,n){t=Ui(n,t),t=Ig(e,t,1),e=Jn(e,t,1),t=Ke(),e!==null&&(la(e,1,t),Ze(e,t))}function ve(e,t,n){if(e.tag===3)wf(e,e,n);else for(;t!==null;){if(t.tag===3){wf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qn===null||!Qn.has(r))){e=Ui(n,e),e=Lg(t,e,1),t=Jn(t,e,1),e=Ke(),t!==null&&(la(t,1,e),Ze(t,e));break}}t=t.return}}function Uw(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ke(),e.pingedLanes|=e.suspendedLanes&n,Te===e&&(Ne&n)===n&&(je===4||je===3&&(Ne&130023424)===Ne&&500>ye()-Rd?Ar(e,0):Pd|=n),Ze(e,t)}function tv(e,t){t===0&&(e.mode&1?(t=Ta,Ta<<=1,!(Ta&130023424)&&(Ta=4194304)):t=1);var n=Ke();e=mn(e,t),e!==null&&(la(e,t,n),Ze(e,n))}function Fw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tv(e,n)}function Bw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),tv(e,n)}var nv;nv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,Cw(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,de&&t.flags&1048576&&ag(t,Ao,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oo(e,t),e=t.pendingProps;var i=Li(t,Fe.current);bi(t,n),i=_d(null,t,r,e,i,n);var s=jd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(r)?(s=!0,To(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kd(t),i.updater=al,t.stateNode=i,i._reactInternals=t,Xu(t,r,e,n),t=tc(null,t,r,!0,s,n)):(t.tag=0,de&&s&&hd(t),ze(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Hw(r),e=Et(r,e),i){case 0:t=ec(null,t,r,e,n);break e;case 1:t=cf(null,t,r,e,n);break e;case 11:t=lf(null,t,r,e,n);break e;case 14:t=uf(null,t,r,Et(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Et(r,i),ec(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Et(r,i),cf(e,t,r,i,n);case 3:e:{if(Ug(t),e===null)throw Error(P(387));r=t.pendingProps,s=t.memoizedState,i=s.element,hg(e,t),No(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Ui(Error(P(423)),t),t=df(e,t,r,n,i);break e}else if(r!==i){i=Ui(Error(P(424)),t),t=df(e,t,r,n,i);break e}else for(st=Gn(t.stateNode.containerInfo.firstChild),at=t,de=!0,Nt=null,n=cg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Di(),r===i){t=gn(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return fg(t),e===null&&Ju(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Ku(r,i)?a=null:s!==null&&Ku(r,s)&&(t.flags|=32),Mg(e,t),ze(e,t,a,n),t.child;case 6:return e===null&&Ju(t),null;case 13:return Fg(e,t,n);case 4:return wd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$i(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Et(r,i),lf(e,t,r,i,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,ae(Po,r._currentValue),r._currentValue=a,s!==null)if(Lt(s.value,a)){if(s.children===i.children&&!Ye.current){t=gn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=hn(-1,n&-n),l.tag=2;var u=s.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}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qu(s.return,n,t),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(P(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Qu(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}ze(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bi(t,n),i=yt(i),r=r(i),t.flags|=1,ze(e,t,r,n),t.child;case 14:return r=t.type,i=Et(r,t.pendingProps),i=Et(r.type,i),uf(e,t,r,i,n);case 15:return Dg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Et(r,i),oo(e,t),t.tag=1,Xe(r)?(e=!0,To(t)):e=!1,bi(t,n),Og(t,r,i),Xu(t,r,i,n),tc(null,t,r,!0,e,n);case 19:return Bg(e,t,n);case 22:return $g(e,t,n)}throw Error(P(156,t.tag))};function rv(e,t){return Pm(e,t)}function zw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,n,r){return new zw(e,t,n,r)}function Ld(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hw(e){if(typeof e=="function")return Ld(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ed)return 11;if(e===td)return 14}return 2}function Xn(e,t){var n=e.alternate;return n===null?(n=gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function co(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")Ld(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return Pr(n.children,i,s,t);case Zc:a=8,i|=8;break;case xu:return e=gt(12,n,t,i|2),e.elementType=xu,e.lanes=s,e;case Su:return e=gt(13,n,t,i),e.elementType=Su,e.lanes=s,e;case _u:return e=gt(19,n,t,i),e.elementType=_u,e.lanes=s,e;case fm:return ul(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dm:a=10;break e;case hm:a=9;break e;case ed:a=11;break e;case td:a=14;break e;case Rn:a=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=gt(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Pr(e,t,n,r){return e=gt(7,e,r,t),e.lanes=n,e}function ul(e,t,n,r){return e=gt(22,e,r,t),e.elementType=fm,e.lanes=n,e.stateNode={isHidden:!1},e}function iu(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function su(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kw(e,t,n,r,i){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=Ul(0),this.expirationTimes=Ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ul(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Dd(e,t,n,r,i,s,a,o,l){return e=new Kw(e,t,n,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=gt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kd(s),e}function Ww(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function iv(e){if(!e)return tr;e=e._reactInternals;e:{if(Mr(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var n=e.type;if(Xe(n))return ig(e,n,t)}return t}function sv(e,t,n,r,i,s,a,o,l){return e=Dd(n,r,!0,e,i,s,a,o,l),e.context=iv(null),n=e.current,r=Ke(),i=Yn(n),s=hn(r,i),s.callback=t??null,Jn(n,s,i),e.current.lanes=i,la(e,i,r),Ze(e,r),e}function cl(e,t,n,r){var i=t.current,s=Ke(),a=Yn(i);return n=iv(n),t.context===null?t.context=n:t.pendingContext=n,t=hn(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Jn(i,t,a),e!==null&&(It(e,i,a,s),io(e,i,a)),a}function Fo(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 bf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $d(e,t){bf(e,t),(e=e.alternate)&&bf(e,t)}function Vw(){return null}var av=typeof reportError=="function"?reportError:function(e){console.error(e)};function Md(e){this._internalRoot=e}dl.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));cl(e,t,null,null)};dl.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lr(function(){cl(null,e,null,null)}),t[pn]=null}};function dl(e){this._internalRoot=e}dl.prototype.unstable_scheduleHydration=function(e){if(e){var t=$m();e={blockedOn:null,target:e,priority:t};for(var n=0;n<On.length&&t!==0&&t<On[n].priority;n++);On.splice(n,0,e),n===0&&Um(e)}};function Ud(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xf(){}function qw(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Fo(a);s.call(u)}}var a=sv(t,r,e,0,null,!1,!1,"",xf);return e._reactRootContainer=a,e[pn]=a.current,$s(e.nodeType===8?e.parentNode:e),Lr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=Fo(l);o.call(u)}}var l=Dd(e,0,!1,null,null,!1,!1,"",xf);return e._reactRootContainer=l,e[pn]=l.current,$s(e.nodeType===8?e.parentNode:e),Lr(function(){cl(t,l,n,r)}),l}function fl(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=Fo(a);o.call(l)}}cl(t,a,e,i)}else a=qw(n,t,e,i,r);return Fo(a)}Lm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=hs(t.pendingLanes);n!==0&&(id(t,n|1),Ze(t,ye()),!(ee&6)&&(Fi=ye()+500,lr()))}break;case 13:Lr(function(){var r=mn(e,1);if(r!==null){var i=Ke();It(r,e,1,i)}}),$d(e,1)}};sd=function(e){if(e.tag===13){var t=mn(e,134217728);if(t!==null){var n=Ke();It(t,e,134217728,n)}$d(e,134217728)}};Dm=function(e){if(e.tag===13){var t=Yn(e),n=mn(e,t);if(n!==null){var r=Ke();It(n,e,t,r)}$d(e,t)}};$m=function(){return re};Mm=function(e,t){var n=re;try{return re=e,t()}finally{re=n}};Iu=function(e,t,n){switch(t){case"input":if(Tu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=rl(r);if(!i)throw Error(P(90));mm(r),Tu(r,i)}}}break;case"textarea":vm(e,n);break;case"select":t=n.value,t!=null&&vi(e,!!n.multiple,t,!1)}};_m=Nd;jm=Lr;var Gw={usingClientEntryPoint:!1,Events:[ca,ui,rl,xm,Sm,Nd]},as={findFiberByHostInstance:kr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jw={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cm(e),e===null?null:e.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||Vw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ma=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ma.isDisabled&&Ma.supportsFiber)try{Zo=Ma.inject(Jw),Qt=Ma}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gw;ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ud(t))throw Error(P(200));return Ww(e,t,null,n)};ut.createRoot=function(e,t){if(!Ud(e))throw Error(P(299));var n=!1,r="",i=av;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Dd(e,1,!1,null,null,n,!1,r,i),e[pn]=t.current,$s(e.nodeType===8?e.parentNode:e),new Md(t)};ut.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(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=Cm(t),e=e===null?null:e.stateNode,e};ut.flushSync=function(e){return Lr(e)};ut.hydrate=function(e,t,n){if(!hl(t))throw Error(P(200));return fl(null,e,t,!0,n)};ut.hydrateRoot=function(e,t,n){if(!Ud(e))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=av;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=sv(t,null,e,1,n??null,i,!1,s,a),e[pn]=t.current,$s(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new dl(t)};ut.render=function(e,t,n){if(!hl(t))throw Error(P(200));return fl(null,e,t,!1,n)};ut.unmountComponentAtNode=function(e){if(!hl(e))throw Error(P(40));return e._reactRootContainer?(Lr(function(){fl(null,null,e,!1,function(){e._reactRootContainer=null,e[pn]=null})}),!0):!1};ut.unstable_batchedUpdates=Nd;ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!hl(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return fl(e,t,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426";function ov(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ov)}catch(e){console.error(e)}}ov(),om.exports=ut;var ha=om.exports;const lv=Gp(ha);var uv,Sf=ha;uv=Sf.createRoot,Sf.hydrateRoot;const Qw=1,Yw=1e6;let au=0;function Xw(){return au=(au+1)%Number.MAX_SAFE_INTEGER,au.toString()}const ou=new Map,_f=e=>{if(ou.has(e))return;const t=setTimeout(()=>{ou.delete(e),js({type:"REMOVE_TOAST",toastId:e})},Yw);ou.set(e,t)},Zw=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Qw)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?_f(n):e.toasts.forEach(r=>{_f(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ho=[];let fo={toasts:[]};function js(e){fo=Zw(fo,e),ho.forEach(t=>{t(fo)})}function eb({...e}){const t=Xw(),n=i=>js({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>js({type:"DISMISS_TOAST",toastId:t});return js({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function tb(){const[e,t]=b.useState(fo);return b.useEffect(()=>(ho.push(t),()=>{const n=ho.indexOf(t);n>-1&&ho.splice(n,1)}),[e]),{...e,toast:eb,dismiss:n=>js({type:"DISMISS_TOAST",toastId:n})}}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function jf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cv(...e){return t=>{let n=!1;const r=e.map(i=>{const s=jf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():jf(e[i],null)}}}}function Dt(...e){return b.useCallback(cv(...e),e)}function pl(e,t=[]){let n=[];function r(s,a){const o=b.createContext(a),l=n.length;n=[...n,a];const u=d=>{var v;const{scope:f,children:h,...k}=d,y=((v=f==null?void 0:f[e])==null?void 0:v[l])||o,w=b.useMemo(()=>k,Object.values(k));return m.jsx(y.Provider,{value:w,children:h})};u.displayName=s+"Provider";function c(d,f){var y;const h=((y=f==null?void 0:f[e])==null?void 0:y[l])||o,k=b.useContext(h);if(k)return k;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(a=>b.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,nb(i,...t)]}function nb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...o,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}
vendor: 10,511 bytes, line 40
40),[a])}};return n.scopeName=t.scopeName,n}function fc(e){const t=rb(e),n=b.forwardRef((r,i)=>{const{children:s,...a}=r,o=b.Children.toArray(s),l=o.find(sb);if(l){const u=l.props.children,c=o.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return m.jsx(t,{...a,ref:i,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return m.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function rb(e){const t=b.forwardRef((n,r)=>{const{children:i,...s}=n;if(b.isValidElement(i)){const a=ob(i),o=ab(s,i.props);return i.type!==b.Fragment&&(o.ref=r?cv(r,a):a),b.cloneElement(i,o)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dv=Symbol("radix.slottable");function ib(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=dv,t}function sb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dv}function ab(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function ob(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lb(e){const t=e+"CollectionProvider",[n,r]=pl(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:w,children:v}=y,p=N.useRef(null),g=N.useRef(new Map).current;return m.jsx(i,{scope:w,itemMap:g,collectionRef:p,children:v})};a.displayName=t;const o=e+"CollectionSlot",l=fc(o),u=N.forwardRef((y,w)=>{const{scope:v,children:p}=y,g=s(o,v),x=Dt(w,g.collectionRef);return m.jsx(l,{ref:x,children:p})});u.displayName=o;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=fc(c),h=N.forwardRef((y,w)=>{const{scope:v,children:p,...g}=y,x=N.useRef(null),S=Dt(w,x),_=s(c,v);return N.useEffect(()=>(_.itemMap.set(x,{ref:x,...g}),()=>void _.itemMap.delete(x))),m.jsx(f,{[d]:"",ref:S,children:p})});h.displayName=c;function k(y){const w=s(e+"CollectionConsumer",y);return N.useCallback(()=>{const p=w.collectionRef.current;if(!p)return[];const g=Array.from(p.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((_,j)=>g.indexOf(_.ref.current)-g.indexOf(j.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},k,r]}var ub=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=ub.reduce((e,t)=>{const n=fc(`Primitive.${t}`),r=b.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hv(e,t){e&&ha.flushSync(()=>e.dispatchEvent(t))}function nr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function cb(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var db="DismissableLayer",pc="dismissableLayer.update",hb="dismissableLayer.pointerDownOutside",fb="dismissableLayer.focusOutside",Ef,fv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,u=b.useContext(fv),[c,d]=b.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),k=Dt(t,j=>d(j)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(w),p=c?y.indexOf(c):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,x=p>=v,S=mb(j=>{const A=j.target,R=[...u.branches].some(O=>O.contains(A));!x||R||(i==null||i(j),a==null||a(j),j.defaultPrevented||o==null||o())},f),_=gb(j=>{const A=j.target;[...u.branches].some(O=>O.contains(A))||(s==null||s(j),a==null||a(j),j.defaultPrevented||o==null||o())},f);return cb(j=>{p===u.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&o&&(j.preventDefault(),o()))},f),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ef=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Tf(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ef)}},[c,f,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Tf())},[c,u]),b.useEffect(()=>{const j=()=>h({});return document.addEventListener(pc,j),()=>document.removeEventListener(pc,j)},[]),m.jsx(et.div,{...l,ref:k,style:{pointerEvents:g?x?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,_.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,S.onPointerDownCapture)})});Fd.displayName=db;var pb="DismissableLayerBranch",pv=b.forwardRef((e,t)=>{const n=b.useContext(fv),r=b.useRef(null),i=Dt(t,r);return b.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(et.div,{...e,ref:i})});pv.displayName=pb;function mb(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){mv(hb,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gb(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=b.useRef(!1);return b.useEffect(()=>{const i=s=>{s.target&&!r.current&&mv(fb,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Tf(){const e=new CustomEvent(pc);document.dispatchEvent(e)}function mv(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hv(i,s):i.dispatchEvent(s)}var vb=Fd,yb=pv,rr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},kb="Portal",gv=b.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=b.useState(!1);rr(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?lv.createPortal(m.jsx(et.div,{...r,ref:t}),a):null});gv.displayName=kb;function wb(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Bd=e=>{const{present:t,children:n}=e,r=bb(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),s=Dt(r.ref,xb(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:s}):null};Bd.displayName="Presence";function bb(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),s=b.useRef("none"),a=e?"mounted":"unmounted",[o,l]=wb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Ua(r.current);s.current=o==="mounted"?u:"none"},[o]),rr(()=>{const u=r.current,c=i.current;if(c!==e){const f=s.current,h=Ua(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),rr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const y=Ua(r.current).includes(h.animationName);if(h.target===t&&y&&(l("ANIMATION_END"),!i.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&&(s.current=Ua(r.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(o),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ua(e){return(e==null?void 0:e.animationName)||"none"}function xb(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sb=sm[" useInsertionEffect ".trim().toString()]||rr;function _b({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=jb({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const c=b.useRef(e!==void 0);b.useEffect(()=>{const d=c.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"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=o},[o,r])}const u=b.useCallback(c=>{var d;if(o){const f=Eb(c)?c(e):c;f!==e&&((d=a.current)==null||d.call(a,f))}else s(c)},[o,e,s,a]);return[l,u]}function jb({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),s=b.useRef(t);return Sb(()=>{s.current=t},[t]),b.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function Eb(e){return typeof e=="function"}var Tb=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"}),Cb="VisuallyHidden",ml=b.forwardRef((e,t)=>
40m.jsx(et.span,{...e,ref:t,style:{...Tb,...e.style}}));ml.displayName=Cb;var Ab=ml,zd="ToastProvider",[Hd,Pb,Rb]=lb("Toast"),[vv,QC]=pl("Toast",[Rb]),[Nb,gl]=vv(zd),yv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:a}=e,[o,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zd}\`. Expected non-empty \`string\`.`),m.jsx(Hd.Provider,{scope:t,children:m.jsx(Nb,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:o,onViewportChange:l,onToastAdd:b.useCallback(()=>c(h=>h+1),[]),onToastRemove:b.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};yv.displayName=zd;var kv="ToastViewport",Ob=["F8"],mc="toast.viewportPause",gc="toast.viewportResume",wv=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Ob,label:i="Notifications ({hotkey})",...s}=e,a=gl(kv,n),o=Pb(n),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),f=Dt(t,d,a.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=a.toastCount>0;b.useEffect(()=>{const w=v=>{var g;r.length!==0&&r.every(x=>v[x]||v.code===x)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),b.useEffect(()=>{const w=l.current,v=d.current;if(k&&w&&v){const p=()=>{if(!a.isClosePausedRef.current){const _=new CustomEvent(mc);v.dispatchEvent(_),a.isClosePausedRef.current=!0}},g=()=>{if(a.isClosePausedRef.current){const _=new CustomEvent(gc);v.dispatchEvent(_),a.isClosePausedRef.current=!1}},x=_=>{!w.contains(_.relatedTarget)&&g()},S=()=>{w.contains(document.activeElement)||g()};return w.addEventListener("focusin",p),w.addEventListener("focusout",x),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",S),window.addEventListener("blur",p),window.addEventListener("focus",g),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",x),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",p),window.removeEventListener("focus",g)}}},[k,a.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:w})=>{const p=o().map(g=>{const x=g.ref.current,S=[x,...Vb(x)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?p.reverse():p).flat()},[o]);return b.useEffect(()=>{const w=d.current;if(w){const v=p=>{var S,_,j;const g=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!g){const A=document.activeElement,R=p.shiftKey;if(p.target===w&&R){(S=u.current)==null||S.focus();return}const L=y({tabbingDirection:R?"backwards":"forwards"}),K=L.findIndex(I=>I===A);lu(L.slice(K+1))?p.preventDefault():R?(_=u.current)==null||_.focus():(j=c.current)==null||j.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[o,y]),m.jsxs(yb,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&m.jsx(vc,{ref:u,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"forwards"});lu(w)}}),m.jsx(Hd.Slot,{scope:n,children:m.jsx(et.ol,{tabIndex:-1,...s,ref:f})}),k&&m.jsx(vc,{ref:c,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"backwards"});lu(w)}})]})});wv.displayName=kv;var bv="ToastFocusProxy",vc=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=gl(bv,n);return m.jsx(ml,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=s.viewport)!=null&&u.contains(o))&&r()}})});vc.displayName=bv;var fa="Toast",Ib="toast.swipeStart",Lb="toast.swipeMove",Db="toast.swipeCancel",$b="toast.swipeEnd",xv=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...a}=e,[o,l]=_b({prop:r,defaultProp:i??!0,onChange:s,caller:fa});return m.jsx(Bd,{present:n||o,children:m.jsx(Fb,{open:o,...a,ref:t,onClose:()=>l(!1),onPause:nr(e.onPause),onResume:nr(e.onResume),onSwipeStart:_e(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_e(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:_e(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:_e(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)})})})});xv.displayName=fa;var[Mb,Ub]=vv(fa,{onClose(){}}),Fb=b.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:a,onEscapeKeyDown:o,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...k}=e,y=gl(fa,n),[w,v]=b.useState(null),p=Dt(t,I=>v(I)),g=b.useRef(null),x=b.useRef(null),S=i||y.duration,_=b.useRef(0),j=b.useRef(S),A=b.useRef(0),{onToastAdd:R,onToastRemove:O}=y,z=nr(()=>{var X;(w==null?void 0:w.contains(document.activeElement))&&((X=y.viewport)==null||X.focus()),a()}),L=b.useCallback(I=>{!I||I===1/0||(window.clearTimeout(A.current),_.current=new Date().getTime(),A.current=window.setTimeout(z,I))},[z]);b.useEffect(()=>{const I=y.viewport;if(I){const X=()=>{L(j.current),u==null||u()},H=()=>{const q=new Date().getTime()-_.current;j.current=j.current-q,window.clearTimeout(A.current),l==null||l()};return I.addEventListener(mc,H),I.addEventListener(gc,X),()=>{I.removeEventListener(mc,H),I.removeEventListener(gc,X)}}},[y.viewport,S,l,u,L]),b.useEffect(()=>{s&&!y.isClosePausedRef.current&&L(S)},[s,S,y.isClosePausedRef,L]),b.useEffect(()=>(R(),()=>O()),[R,O]);const K=b.useMemo(()=>w?Av(w):null,[w]);return y.viewport?m.jsxs(m.Fragment,{children:[K&&m.jsx(Bb,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),m.jsx(Mb,{scope:n,onClose:z,children:ha.createPortal(m.jsx(Hd.ItemSlot,{scope:n,children:m.jsx(vb,{asChild:!0,onEscapeKeyDown:_e(o,()=>{y.isFocusedToastEscapeKeyDownRef.current||z(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(et.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":y.swipeDirection,...k,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_e(e.onKeyDown,I=>{I.key==="Escape"&&(o==null||o(I.nativeEvent),I.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:_e(e.onPointerDown,I=>{I.button===0&&(g.current={x:I.clientX,y:I.clientY})}),onPointerMove:_e(e.onPointerMove,I=>{if(!g.current)return;const X=I.clientX-g.current.x,H=I.clientY-g.current.y,q=!!x.current,T=["left","right"].includes(y.swipeDirection),C=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,D=T?C(0,X):0,G=T?0:C(0,H),F=I.pointerType==="touch"?10:2,Q={x:D,y:G},Z={originalEvent:I,delta:Q};q?(x.current=Q,Fa(Lb,d,Z,{discrete:!1})):Cf(Q,y.swipeDirection,F)?(x.current=Q,Fa(Ib,c,Z,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(X)>F||Math.abs(H)>F)&&(g.current=null)}),onPointerUp:_e(e.onPointerUp,I=>{const X=x.current,H=I.target;if(H.hasPointerCapture(I.pointerId)&&H.releasePointerCapture(I.pointerId),x.current=null,g.current=null,X){const q=I.currentTarget,T={originalEvent:I,delta:X};Cf(X,y.swipeDirection,y.swipeThreshold)?Fa($b,h,T,{discrete:!0}):Fa(Db,f,T,{discrete:!0}),q.addEventListener("click",C=>C.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),Bb=e=>{const{__scopeToast:t,children:n,...r}=e,i=gl(fa,t),[s,a]=b.useState(!1),[o,l]=b.useState(!1);return Kb(()=>a(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:m.jsx(gv,{asChild:!0,children:m.jsx(ml,{...r,children:s&&m.jsxs(m.Fragment,{children:[i.label," ",n]})})})},zb="ToastTitle",Sv=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(et.div,{...r,ref:t})});Sv.displayName=zb;var Hb="ToastDescription",_v=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(et.div,{...r,ref:t})});_v.displayName=Hb;var jv="ToastAction",Ev=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Cv,{altText:n,asChild:!0,children:m.jsx(Kd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jv}\`. Expected non-empty \`string\`.`),null)});Ev.displayName=jv;var Tv="ToastClose",Kd=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=Ub(Tv,n);return m.jsx(Cv,{asChild:!0,children:m.jsx(et.button,{type:"button",...r,ref:t,onClick:_e(e.onClick,i.onClose)})})});Kd.displayName=Tv;var Cv=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return m.jsx(et.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Av(e){const t=[];
vendor: 5,680 bytes, lines 40-85
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Wb(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Av(r))}}),t}function Fa(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hv(i,s):i.dispatchEvent(s)}var Cf=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function Kb(e=()=>{}){const t=nr(e);rr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Wb(e){return e.nodeType===e.ELEMENT_NODE}function Vb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var qb=yv,Pv=wv,Rv=xv,Nv=Sv,Ov=_v,Iv=Ev,Lv=Kd;function Dv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Dv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $v(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dv(e))&&(r&&(r+=" "),r+=t);return r}const Af=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pf=$v,Gb=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Pf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=Af(c)||Af(d);return i[u][f]}),o=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(k=>{let[y,w]=k;return Array.isArray(w)?w.includes({...s,...o}[y]):{...s,...o}[y]===w})?[...u,d,f]:u},[]);return Pf(e,a,l,n==null?void 0:n.class,n==null?void 0:n.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 Jb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).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 Qb={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 Yb=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>b.createElement("svg",{ref:l,...Qb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Mv("lucide",i),...o},[...a.map(([u,c])=>b.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
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 Ce=(e,t)=>{const n=b.forwardRef(({className:r,...i},s)=>b.createElement(Yb,{ref:s,iconNode:t,className:Mv(`lucide-${Jb(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
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 Xb=Ce("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 Rf=Ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
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 Nf=Ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
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 Zb=Ce("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
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 ex=Ce("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
85],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
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 Uv=Ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const dn=Ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Fv=Ce("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const tx=Ce("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const nx=Ce("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const Of=Ce("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const rx=Ce("SquarePlay",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 8 6 4-6 4Z",key:"f1r3lt"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const yc=Ce("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const ix=Ce("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const sx=Ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const Bv=Ce("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const zv=Ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 6,283 bytes, lines 145-150
145],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const ax=Ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Wd="-",ox=e=>{const t=ux(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(Wd);return o[0]===""&&o.length!==1&&o.shift(),Hv(o,t)||lx(a)},getConflictingClassGroupIds:(a,o)=>{const l=n[a]||[];return o&&r[a]?[...l,...r[a]]:l}}},Hv=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Hv(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Wd);return(a=t.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},If=/^\[(.+)\]$/,lx=e=>{if(If.test(e)){const t=If.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ux=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return dx(Object.entries(e.classGroups),n).forEach(([s,a])=>{kc(a,r,s,t)}),r},kc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Lf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(cx(i)){kc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{kc(a,Lf(t,s),n,r)})})},Lf=(e,t)=>{let n=e;return t.split(Wd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cx=e=>e.isThemeGetter,dx=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[t+a,o])):s);return[n,i]}):e,hx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Kv="!",fx=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,a=o=>{const l=[];let u=0,c=0,d;for(let w=0;w<o.length;w++){let v=o[w];if(u===0){if(v===i&&(r||o.slice(w,w+s)===t)){l.push(o.slice(c,w)),c=w+s;continue}if(v==="/"){d=w;continue}}v==="["?u++:v==="]"&&u--}const f=l.length===0?o:o.substring(c),h=f.startsWith(Kv),k=h?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:k,maybePostfixModifierPosition:y}};return n?o=>n({className:o,parseClassName:a}):a},px=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},mx=e=>({cache:hx(e.cacheSize),parseClassName:fx(e),...ox(e)}),gx=/\s+/,vx=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split(gx);let o="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let k=!!h,y=r(k?f.substring(0,h):f);if(!y){if(!k){o=u+(o.length>0?" "+o:o);continue}if(y=r(f),!y){o=u+(o.length>0?" "+o:o);continue}k=!1}const w=px(c).join(":"),v=d?w+Kv:w,p=v+y;if(s.includes(p))continue;s.push(p);const g=i(y,k);for(let x=0;x<g.length;++x){const S=g[x];s.push(v+S)}o=u+(o.length>0?" "+o:o)}return o};function yx(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wv(t))&&(r&&(r+=" "),r+=n);return r}const Wv=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wv(e[r]))&&(n&&(n+=" "),n+=t);return n};function kx(e,...t){let n,r,i,s=a;function a(l){const u=t.reduce((c,d)=>d(c),e());return n=mx(u),r=n.cache.get,i=n.cache.set,s=o,o(l)}function o(l){const u=r(l);if(u)return u;const c=vx(l,n);return i(l,c),c}return function(){return s(yx.apply(null,arguments))}}const oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vv=/^\[(?:([a-z-]+):)?(.+)\]$/i,wx=/^\d+\/\d+$/,bx=new Set(["px","full","screen"]),xx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sx=/\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$/,_x=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tn=e=>Si(e)||bx.has(e)||wx.test(e),Cn=e=>Vi(e,"length",Ix),Si=e=>!!e&&!Number.isNaN(Number(e)),uu=e=>Vi(e,"number",Si),os=e=>!!e&&Number.isInteger(Number(e)),Tx=e=>e.endsWith("%")&&Si(e.slice(0,-1)),J=e=>Vv.test(e),An=e=>xx.test(e),Cx=new Set(["length","size","percentage"]),Ax=e=>Vi(e,Cx,qv),Px=e=>Vi(e,"position",qv),Rx=new Set(["image","url"]),Nx=e=>Vi(e,Rx,Dx),Ox=e=>Vi(e,"",Lx),ls=()=>!0,Vi=(e,t,n)=>{const r=Vv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Ix=e=>Sx.test(e)&&!_x.test(e),qv=()=>!1,Lx=e=>jx.test(e),Dx=e=>Ex.test(e),$x=()=>{const e=oe("colors"),t=oe("spacing"),n=oe("blur"),r=oe("brightness"),i=oe("borderColor"),s=oe("borderRadius"),a=oe("borderSpacing"),o=oe("borderWidth"),l=oe("contrast"),u=oe("grayscale"),c=oe("hueRotate"),d=oe("invert"),f=oe("gap"),h=oe("gradientColorStops"),k=oe("gradientColorStopPositions"),y=oe("inset"),w=oe("margin"),v=oe("opacity"),p=oe("padding"),g=oe("saturate"),x=oe("scale"),S=oe("sepia"),_=oe("skew"),j=oe("space"),A=oe("translate"),R=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",J,t],L=()=>[J,t],K=()=>["",tn,Cn],I=()=>["auto",Si,J],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",J],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Si,J];return{cacheSize:500,separator:":",theme:{colors:[ls],spacing:[tn,Cn],blur:["none","",An,J],brightness:G(),borderColor:[e],borderRadius:["n
150one","","full",An,J],borderSpacing:L(),borderWidth:K(),contrast:G(),grayscale:C(),hueRotate:G(),invert:C(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Tx,Cn],inset:z(),margin:z(),opacity:G(),padding:L(),saturate:G(),scale:G(),sepia:C(),skew:G(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[An]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...X(),J]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",os,J]}],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",J]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",os,J]}],"grid-cols":[{"grid-cols":[ls]}],"col-start-end":[{col:["auto",{span:["full",os,J]},J]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ls]}],"row-start-end":[{row:["auto",{span:[os,J]},J]}],"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",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"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":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[An]},An]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",An,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uu]}],"font-family":[{font:[ls]}],"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",J]}],"line-clamp":[{"line-clamp":["none",Si,uu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",tn,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",tn,Cn]}],"underline-offset":[{"underline-offset":["auto",tn,J]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Px]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ax]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}
vendor: 5,172 bytes, line 150
150],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[tn,J]}],"outline-w":[{outline:[tn,Cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[tn,Cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",An,Ox]}],"shadow-color":[{shadow:[ls]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",An,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"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":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[os,J]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],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",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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: 3,854 bytes, line 150
150],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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[tn,Cn,uu]}],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"]}}},Mx=kx($x);function Ur(...e){return Mx($v(e))}const Ux=qb,Gv=b.forwardRef(({className:e,...t},n)=>m.jsx(Pv,{ref:n,className:Ur("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}));Gv.displayName=Pv.displayName;const Fx=Gb("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"}}),Jv=b.forwardRef(({className:e,variant:t,...n},r)=>m.jsx(Rv,{ref:r,className:Ur(Fx({variant:t}),e),...n}));
150Jv.displayName=Rv.displayName;const Bx=b.forwardRef(({className:e,...t},n)=>m.jsx(Iv,{ref:n,className:Ur("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}));Bx.displayName=Iv.displayName;const Qv=b.forwardRef(({className:e,...t},n)=>m.jsx(Lv,{ref:n,className:Ur("absolute right-2 top-2 rounded-md p-1 text-foreground/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:m.jsx(zv,{className:"h-4 w-4"})}));Qv.displayName=Lv.displayName;const Yv=b.forwardRef(({className:e,...t},n)=>m.jsx(Nv,{ref:n,className:Ur("text-sm font-semibold",e),...t}));Yv.displayName=Nv.displayName;const Xv=b.forwardRef(({className:e,...t},n)=>m.jsx(Ov,{ref:n,className:Ur("text-sm opacity-90",e),...t}));Xv.displayName=Ov.displayName;function zx(){const{toasts:e}=tb();return m.jsxs(Ux,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return m.jsxs(Jv,{...s,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(Yv,{children:n}),r&&m.jsx(Xv,{children:r})]}),i,m.jsx(Qv,{})]},t)}),m.jsx(Gv,{})]})}var Df=["light","dark"],Hx="(prefers-color-scheme: dark)",Kx=b.createContext(void 0),Wx={setTheme:e=>{},themes:[]},Vx=()=>{var e;return(e=b.useContext(Kx))!=null?e:Wx};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:a,attrs:o,nonce:l})=>{let u=s==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(k=>`'${k}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?Df.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(k,y=!1,w=!0)=>{let v=a?a[k]:k,p=y?k+"|| ''":`'${v}'`,g="";return i&&w&&!y&&Df.includes(k)&&(g+=`d.style.colorScheme = '${k}';`),n==="class"?y||v?g+=`c.add(${p})`:g+="null":v&&(g+=`d[s](n,${p})`),g},h=e?`!function(){${c}${f(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${Hx}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${u?"":"else{"+f(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(s,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var qx=e=>{switch(e){case"success":return Qx;case"info":return Xx;case"warning":return Yx;case"error":return Zx;default:return null}},Gx=Array(12).fill(0),Jx=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},Gx.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Qx=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"})),Yx=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"})),Xx=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"})),Zx=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"})),e1=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"})),t1=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};
150return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},wc=1,n1=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:wc++,s=this.toasts.find(o=>o.id===i),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(o=>o.id===i?(this.publish({...o,...e,id:i,title:n}),{...o,...e,id:i,dismissible:a,title:n}):o):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({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)=>
150this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,s,a=r.then(async l=>{if(s=["resolve",l],N.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(i1(l)&&!l.ok){i=!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:n,type:"error",message:u,description:c})}else if(t.success!==void 0){i=!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:n,type:"success",message:u,description:c})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){i=!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:n,type:"error",message:u,description:c})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),o=()=>new Promise((l,u)=>a.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||wc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ge=new n1,r1=(e,t)=>{let n=(t==null?void 0:t.id)||wc++;return Ge.addToast({title:e,...t,id:n}),n},i1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",s1=r1,a1=()=>Ge.toasts,o1=()=>Ge.getActiveToasts();Object.assign(s1,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:a1,getToasts:o1});function l1(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}l1(`: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;
150left: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}
150: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%);
150--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%)}
151`);function Ba(e){return e.label!==void 0}var u1=3,c1="32px",d1="16px",$f=4e3,h1=356,f1=14,p1=20,m1=200;function _t(...e){return e.filter(Boolean).join(" ")}function g1(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var v1=e=>{var t,n,r,i,s,a,o,l,u,c,d;let{invert:f,toast:h,unstyled:k,interacting:y,setHeights:w,visibleToasts:v,heights:p,index:g,toasts:x,expanded:S,removeToast:_,defaultRichColors:j,closeButton:A,style:R,cancelButtonStyle:O,actionButtonStyle:z,className:L="",descriptionClassName:K="",duration:I,position:X,gap:H,loadingIcon:q,expandByDefault:T,classNames:C,icons:D,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:F}=e,[Q,Z]=N.useState(null),[ke,Ie]=N.useState(null),[ne,Br]=N.useState(!1),[bn,cr]=N.useState(!1),[xn,zr]=N.useState(!1),[Sn,ya]=N.useState(!1),[Al,ka]=N.useState(!1),[Pl,Yi]=N.useState(0),[Hr,oh]=N.useState(0),Xi=N.useRef(h.duration||I||$f),lh=N.useRef(null),dr=N.useRef(null),m0=g===0,g0=g+1<=v,dt=h.type,Kr=h.dismissible!==!1,v0=h.className||"",y0=
vendor: 1,596 bytes, line 151
151h.descriptionClassName||"",wa=N.useMemo(()=>p.findIndex(W=>W.toastId===h.id)||0,[p,h.id]),k0=N.useMemo(()=>{var W;return(W=h.closeButton)!=null?W:A},[h.closeButton,A]),uh=N.useMemo(()=>h.duration||I||$f,[h.duration,I]),Rl=N.useRef(0),Wr=N.useRef(0),ch=N.useRef(0),Vr=N.useRef(null),[w0,b0]=X.split("-"),dh=N.useMemo(()=>p.reduce((W,ie,ce)=>ce>=wa?W:W+ie.height,0),[p,wa]),hh=t1(),x0=h.invert||f,Nl=dt==="loading";Wr.current=N.useMemo(()=>wa*H+dh,[wa,dh]),N.useEffect(()=>{Xi.current=uh},[uh]),N.useEffect(()=>{Br(!0)},[]),N.useEffect(()=>{let W=dr.current;if(W){let ie=W.getBoundingClientRect().height;return oh(ie),w(ce=>[{toastId:h.id,height:ie,position:h.position},...ce]),()=>w(ce=>ce.filter(wt=>wt.toastId!==h.id))}},[w,h.id]),N.useLayoutEffect(()=>{if(!ne)return;let W=dr.current,ie=W.style.height;W.style.height="auto";let ce=W.getBoundingClientRect().height;W.style.height=ie,oh(ce),w(wt=>wt.find(bt=>bt.toastId===h.id)?wt.map(bt=>bt.toastId===h.id?{...bt,height:ce}:bt):[{toastId:h.id,height:ce,position:h.position},...wt])},[ne,h.title,h.description,w,h.id]);let _n=N.useCallback(()=>{cr(!0),Yi(Wr.current),w(W=>W.filter(ie=>ie.toastId!==h.id)),setTimeout(()=>{_(h)},m1)},[h,_,w,Wr]);N.useEffect(()=>{if(h.promise&&dt==="loading"||h.duration===1/0||h.type==="loading")return;let W;return S||y||F&&hh?(()=>{if(ch.current<Rl.current){let ie=new Date().getTime()-Rl.current;Xi.current=Xi.current-ie}ch.current=new Date().getTime()})():Xi.current!==1/0&&(Rl.current=new Date().getTime(),W=setTimeout(()=>{var ie;(ie=h.onAutoClose)==null||ie.call(h,h),_n()},Xi.current)),()=>clearTimeout(W)}
151,[S,y,h,dt,F,hh,_n]),N.useEffect(()=>{h.delete&&_n()},[_n,h.delete]);function S0(){var W,ie,ce;return D!=null&&D.loading?N.createElement("div",{className:_t(C==null?void 0:C.loader,(W=h==null?void 0:h.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":dt==="loading"},D.loading):q?N.createElement("div",{className:_t(C==null?void 0:C.loader,(ie=h==null?void 0:h.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":dt==="loading"},q):N.createElement(Jx,{className:_t(C==null?void 0:C.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader),visible:dt==="loading"})}return N.createElement("li",{tabIndex:0,ref:dr,className:_t(L,v0,C==null?void 0:C.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[dt],(n=h==null?void 0:h.classNames)==null?void 0:n[dt]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:j,"data-styled":!(h.jsx||h.unstyled||k),"data-mounted":ne,"data-promise":!!h.promise,"data-swiped":Al,"data-removed":bn,"data-visible":g0,"data-y-position":w0,"data-x-position":b0,"data-index":g,"data-front":m0,"data-swiping":xn,"data-dismissible":Kr,"data-type":dt,"data-invert":x0,"data-swipe-out":Sn,"data-swipe-direction":ke,"data-expanded":!!(S||T&&ne),style:{"--index":g,"--toasts-before":g,"--z-index":x.length-g,"--offset":`${bn?Pl:Wr.current}px`,"--initial-height":T?"auto":`${Hr}px`,...R,...h.style},onDragEnd:()=>{zr(!1),Z(null),Vr.current=null},onPointerDown:W=>{Nl||!Kr||(lh.current=new Date,Yi(Wr.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(zr(!0),Vr.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,ie,ce,wt;if(Sn||!Kr)return;Vr.current=null;let bt=Number(((W=dr.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((ie=dr.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hr=new Date().getTime()-((ce=lh.current)==null?void 0:ce.getTime()),xt=Q==="x"?bt:jn,En=Math.abs(xt)/hr;if(Math.abs(xt)>=p1||En>.11){Yi(Wr.current),(wt=h.onDismiss)==null||wt.call(h,h),Ie(Q==="x"?bt>0?"right":"left":jn>0?"down":"up"),_n(),ya(!0),ka(!1);return}zr(!1),Z(null)},onPointerMove:W=>{var ie,ce,wt,bt;if(!Vr.current||!Kr||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;let jn=W.clientY-Vr.current.y,hr=W.clientX-Vr.current.x,xt=(ce=e.swipeDirections)!=null?ce:g1(X);!Q&&(Math.abs(hr)>1||Math.abs(jn)>1)&&Z(Math.abs(hr)>Math.abs(jn)?"x":"y");let En={x:0,y:0};Q==="y"?(xt.includes("top")||xt.includes("bottom"))&&(xt.includes("top")&&jn<0||xt.includes("bottom")&&jn>0)&&(En.y=jn):Q==="x"&&(xt.includes("left")||xt.includes("right"))&&(xt.includes("left")&&hr<0||xt.includes("right")&&hr>0)&&(En.x=hr),(Math.abs(En.x)>0||Math.abs(En.y)>0)&&ka(!0),(wt=dr.current)==null||wt.style.setProperty("--swipe-amount-x",`${En.x}px`),(bt=dr.current)==null||bt.style.setProperty("--swipe-amount-y",`${En.y}px`)}},k0&&!h.jsx?N.createElement("button",{"aria-label":G,"data-disabled":Nl,"data-close-button":!0,onClick:Nl||!Kr?()=>{}:()=>{var W;_n(),(W=h.onDismiss)==null||W.call(h,h)},className:_t(C==null?void 0:C.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=D==null?void 0:D.close)!=null?s:e1):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:N.createElement(N.Fragment,null,dt||h.icon||h.promise?N.createElement("div",{"data-icon":"",className:_t(C==null?void 0:C.icon,(a=h==null?void 0:h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||S0():null,h.type!=="loading"?h.icon||(D==null?void 0:D[dt])||qx(dt):null):null,N.createElement("div",{"data-content":"",className:_t(C==null?void 0:C.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},N.createElement("div",{"data-title":"",className:_t(C==null?void 0:C.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:_t(K,y0,C==null?void 0:C.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&&Ba(h.c
151ancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:W=>{var ie,ce;Ba(h.cancel)&&Kr&&((ce=(ie=h.cancel).onClick)==null||ce.call(ie,W),_n())},className:_t(C==null?void 0:C.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&&Ba(h.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:W=>{var ie,ce;Ba(h.action)&&((ce=(ie=h.action).onClick)==null||ce.call(ie,W),!W.defaultPrevented&&_n())},className:_t(C==null?void 0:C.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Mf(){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 y1(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,a=s?"--mobile-offset":"--offset",o=s?d1:c1;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${a}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}var k1=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:a,className:o,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:k=u1,toastOptions:y,dir:w=Mf(),gap:v=f1,loadingIcon:p,icons:g,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:S}=e,[_,j]=N.useState([]),A=N.useMemo(()=>Array.from(new Set([r].concat(_.filter(F=>F.position).map(F=>F.position)))),[_,r]),[R,O]=N.useState([]),[z,L]=N.useState(!1),[K,I]=N.useState(!1),[X,H]=N.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=N.useRef(null),T=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=N.useRef(null),D=N.useRef(!1),G=N.useCallback(F=>{j(Q=>{var Z;return(Z=Q.find(ke=>ke.id===F.id))!=null&&Z.delete||Ge.dismiss(F.id),Q.filter(({id:ke})=>ke!==F.id)})},[]);return N.useEffect(()=>Ge.subscribe(F=>{if(F.dismiss){j(Q=>Q.map(Z=>Z.id===F.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{lv.flushSync(()=>{j(Q=>{let Z=Q.findIndex(ke=>ke.id===F.id);return Z!==-1?[...Q.slice(0,Z),{...Q[Z],...F},...Q.slice(Z+1)]:[F,...Q]})})})}),[]),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:Q})=>{H(Q?"dark":"light")})}catch{F.addListener(({matches:Z})=>{try{H(Z?"dark":"light")}catch(ke){console.error(ke)}})}},[c]),N.useEffect(()=>{_.length<=1&&L(!1)},[_]),N.useEffect(()=>{let F=Q=>{var Z,ke;i.every(Ie=>Q[Ie]||Q.code===Ie)&&(L(!0),(Z=q.current)==null||Z.focus()),Q.code==="Escape"&&(document.activeElement===q.current||(ke=q.current)!=null&&ke.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[i]),N.useEffect(()=>{if(q.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,D.current=!1)}},[q.current]),N.createElement("section",{ref:t,"aria-label":`${x} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((F,Q)=>{var Z;let[ke,Ie]=F.split("-");return _.length?N.createElement("ol",{key:F,dir:w==="auto"?Mf():w,tabIndex:-1,ref:q,className:o,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":ke,"data-lifted":z&&_.length>1&&!s,"data-x-position":Ie,style:{"--front-toast-height":`${((Z=R[0])==null?void 0:Z.height)||0}px`,"--width":`${h1}px`,"--gap":`${v}px`,...h,...y1(l,u)},onBlur:ne=>{D.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(D.current=!1,C.current&&(C.current.focus({preventScroll:!0}
vendor: 4,383 bytes, line 151
151),C.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||D.current||(D.current=!0,C.current=ne.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{K||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},_.filter(ne=>!ne.position&&Q===0||ne.position===F).map((ne,Br)=>{var bn,cr;return N.createElement(v1,{key:ne.id,icons:g,index:Br,toast:ne,defaultRichColors:d,duration:(bn=y==null?void 0:y.duration)!=null?bn:f,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:k,closeButton:(cr=y==null?void 0:y.closeButton)!=null?cr:a,interacting:K,position:F,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:G,toasts:_.filter(xn=>xn.position==ne.position),heights:R.filter(xn=>xn.position==ne.position),setHeights:O,expandByDefault:s,gap:v,loadingIcon:p,expanded:z,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const w1=({...e})=>{const{theme:t="system"}=Vx();return m.jsx(k1,{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})},b1=["top","right","bottom","left"],ir=Math.min,rt=Math.max,Bo=Math.round,za=Math.floor,Xt=e=>({x:e,y:e}),x1={left:"right",right:"left",bottom:"top",top:"bottom"},S1={start:"end",end:"start"};function bc(e,t,n){return rt(e,ir(t,n))}function vn(e,t){return typeof e=="function"?e(t):e}function yn(e){return e.split("-")[0]}function qi(e){return e.split("-")[1]}function Vd(e){return e==="x"?"y":"x"}function qd(e){return e==="y"?"height":"width"}const _1=new Set(["top","bottom"]);function Jt(e){return _1.has(yn(e))?"y":"x"}function Gd(e){return Vd(Jt(e))}function j1(e,t,n){n===void 0&&(n=!1);const r=qi(e),i=Gd(e),s=qd(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=zo(a)),[a,zo(a)]}function E1(e){const t=zo(e);return[xc(e),t,xc(t)]}function xc(e){return e.replace(/start|end/g,t=>S1[t])}const Uf=["left","right"],Ff=["right","left"],T1=["top","bottom"],C1=["bottom","top"];function A1(e,t,n){switch(e){case"top":case"bottom":return n?t?Ff:Uf:t?Uf:Ff;case"left":case"right":return t?T1:C1;default:return[]}}function P1(e,t,n,r){const i=qi(e);let s=A1(yn(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(xc)))),s}function zo(e){return e.replace(/left|right|bottom|top/g,t=>x1[t])}function R1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zv(e){return typeof e!="number"?R1(e):{top:e,right:e,bottom:e,left:e}}function Ho(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Bf(e,t,n){let{reference:r,floating:i}=e;const s=Jt(t),a=Gd(t),o=qd(a),l=yn(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(qi(t)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const N1=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Bf(u,r,l),f=r,h={},k=0;for(let y=0;y<o.length;y++){const{name:w,fn:v}=o[y],{x:p,y:g,data:x,reset:S}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=p??c,d=g??d,h={...h,[w]:{...h[w],...x}},S&&k<=50&&(k++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}
vendor: 9,215 bytes, line 151
151):S.rects),{x:c,y:d}=Bf(u,f,l)),y=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Vs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=vn(t,e),k=Zv(h),w=o[f?d==="floating"?"reference":"floating":d],v=Ho(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),p=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),x=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},S=Ho(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:p,offsetParent:g,strategy:l}):p);return{top:(v.top-S.top+k.top)/x.y,bottom:(S.bottom-v.bottom+k.bottom)/x.y,left:(v.left-S.left+k.left)/x.x,right:(S.right-v.right+k.right)/x.x}}const O1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:u,padding:c=0}=vn(e,t)||{};if(u==null)return{};const d=Zv(c),f={x:n,y:r},h=Gd(i),k=qd(h),y=await a.getDimensions(u),w=h==="y",v=w?"top":"left",p=w?"bottom":"right",g=w?"clientHeight":"clientWidth",x=s.reference[k]+s.reference[h]-f[h]-s.floating[k],S=f[h]-s.reference[h],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let j=_?_[g]:0;(!j||!await(a.isElement==null?void 0:a.isElement(_)))&&(j=o.floating[g]||s.floating[k]);const A=x/2-S/2,R=j/2-y[k]/2-1,O=ir(d[v],R),z=ir(d[p],R),L=O,K=j-y[k]-z,I=j/2-y[k]/2+A,X=bc(L,I,K),H=!l.arrow&&qi(i)!=null&&I!==X&&s.reference[k]/2-(I<L?O:z)-y[k]/2<0,q=H?I<L?I-L:I-K:0;return{[h]:f[h]+q,data:{[h]:X,centerOffset:I-X-q,...H&&{alignmentOffset:q}},reset:H}}}),I1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:y=!0,...w}=vn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=yn(i),p=Jt(o),g=yn(o)===o,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(g||!y?[zo(o)]:E1(o)),_=k!=="none";!f&&_&&S.push(...P1(o,y,k,x));const j=[o,...S],A=await Vs(t,w),R=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&R.push(A[v]),d){const I=j1(i,a,x);R.push(A[I[0]],A[I[1]])}if(O=[...O,{placement:i,overflows:R}],!R.every(I=>I<=0)){var z,L;const I=(((z=s.flip)==null?void 0:z.index)||0)+1,X=j[I];if(X&&(!(d==="alignment"?p!==Jt(X):!1)||O.every(T=>T.overflows[0]>0&&Jt(T.placement)===p)))return{data:{index:I,overflows:O},reset:{placement:X}};let H=(L=O.filter(q=>q.overflows[0]<=0).sort((q,T)=>q.overflows[1]-T.overflows[1])[0])==null?void 0:L.placement;if(!H)switch(h){case"bestFit":{var K;const q=(K=O.filter(T=>{if(_){const C=Jt(T.placement);return C===p||C==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(C=>C>0).reduce((C,D)=>C+D,0)]).sort((T,C)=>T[1]-C[1])[0])==null?void 0:K[0];q&&(H=q);break}case"initialPlacement":H=o;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function zf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hf(e){return b1.some(t=>e[t]>=0)}const L1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vn(e,t);switch(r){case"referenceHidden":{const s=await Vs(t,{...i,elementContext:"reference"}),a=zf(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Hf(a)}}}case"escaped":{const s=await Vs(t,{...i,altBoundary:!0}),a=zf(s,n.floating);return{data:{escapedOffsets:a,escaped:Hf(a)}}}default:return{}}}}},ey=new Set(["left","top"]);async function D1(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=yn(n),o=qi(n),l=Jt(n)==="y",u=ey.has(a)?-1:1,c=s&&l?-1:1,d=vn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:k}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof k=="number"&&(h=o==="end"?k*-1:k),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const $1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await D1(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},M1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:w=>{let{x:v,y:p}=w;return{x:v,y:p}}},...l}=vn(e,t),u={x:n,y:r},c=await Vs(t,l),d=Jt(yn(i)),f=Vd(d);let h=u[f],k=u[d];if(s){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",p=h+c[w],g=h-c[v];h=bc(p,h,g)}if(a){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",p=k+c[w],g=k-c[v];k=bc(p,k,g)}const y=o.fn({...t,[f]:h,[d]:k});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:s,[d]:a}}}}}},U1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=vn(e,t),c={x:n,y:r},d=Jt(i),f=Vd(d);let h=c[f],k=c[d];const y=vn(o,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const g=f==="y"?"height":"width",x=s.reference[f]-s.floating[g]+w.mainAxis,S=s.reference[f]+s.reference[g]-w.mainAxis;h<x?h=x:h>S&&(h=S)}if(u){var v,p;const g=f==="y"?"width":"height",x=ey.has(yn(i)),S=s.reference[d]-s.floating[g]+(x&&((v=a.offset)==null?void 0:v[d])||0)+(x?0:w.crossAxis),_=s.reference[d]+s.reference[g]+(x?0:((p=a.offset)==null?void 0:p[d])||0)-(x?w.crossAxis:0);k<S?k=S:k>_&&(k=_)}return{[f]:h,[d]:k}}}},F1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...u}=vn(e,t),c=await Vs(t,u),d=yn(i),f=qi(i),h=Jt(i)==="y",{width:k,height:y}=s.floating;let w,v;d==="top"||d==="bottom"?(w=d,v=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,w=f==="end"?"top":"bottom");const p=y-c.top-c.bottom,g=k-c.left-c.right,x=ir(y-c[w],p),S=ir(k-c[v],g),_=!t.middlewareData.shift;let j=x,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=p),_&&!f){const O=rt(c.left,0),z=rt(c.right,0),L=rt(c.top,0),K=rt(c.bottom,0);h?A=k-2*(O!==0||z!==0?O+z:rt(c.left,c.right)):j=y-2*(L!==0||K!==0?L+K:rt(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:j});const R=await a.getDimensions(o.floating);return k!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function vl(){return typeof window<"u"}function Gi(e){return ty(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function en(e){var t;return(t=(ty(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ty(e){return vl()?e instanceof Node||e instanceof ot(e).Node:!1}function $t(e){return vl()?e instanceof Element||e instanceof ot(e).Element:!1}function Zt(e){return vl()?e instanceof HTMLElement||e instanceof ot(e).HTMLElement:!1}function Kf(e){return!vl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}const B1=new Set(["inline","contents"]);function pa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!B1.has(i)}const z1=new Set(["table","td","th"]);function H1(e){return z1.has(Gi(e))}const K1=[":popover-open",":modal"];function yl(e){return K1.some(t=>{try{return e.matches(t)}catch{return!1}})}const W1=["transform","translate","scale","rotate","perspective"],V1=["transform","translate","scale","rotate","perspective","filter"],q1=["paint","layout","strict","content"];function Jd(e){const t=Qd(),n=$t(e)?Mt(e):e;return W1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||V1.some(r=>(n.willChange||"").includes(r))||q1.some(r=>(n.contain||"").includes(r))}function G1(e){let t=sr(e);for(;Zt(t)&&!Bi(t);){if(Jd(t))return t;if(yl(t))return null;t=sr(t)}return null}function Qd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const J1=new Set(["html","body","#document"]);function Bi(e){return J1.has(Gi(e))}function Mt(e){return ot(e).getComputedStyle(e)}function kl(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sr(e){if(Gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kf(e)&&e.host||en(e);return Kf(t)?t.host:t}function ny(e){const t=sr(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&pa(t)?t:ny(t)}
vendor: 4,925 bytes, line 151
151function qs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ny(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=ot(i);if(s){const o=Sc(a);return t.concat(a,a.visualViewport||[],pa(i)?i:[],o&&n?qs(o):[])}return t.concat(i,qs(i,[],n))}function Sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ry(e){const t=Mt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zt(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=Bo(n)!==s||Bo(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function Yd(e){return $t(e)?e:e.contextElement}function _i(e){const t=Yd(e);if(!Zt(t))return Xt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=ry(t);let a=(s?Bo(n.width):n.width)/r,o=(s?Bo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const Q1=Xt(0);function iy(e){const t=ot(e);return!Qd()||!t.visualViewport?Q1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Y1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ot(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Yd(e);let a=Xt(1);t&&(r?$t(r)&&(a=_i(r)):a=_i(e));const o=Y1(s,n,r)?iy(s):Xt(0);let l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){const f=ot(s),h=r&&$t(r)?ot(r):r;let k=f,y=Sc(k);for(;y&&r&&h!==k;){const w=_i(y),v=y.getBoundingClientRect(),p=Mt(y),g=v.left+(y.clientLeft+parseFloat(p.paddingLeft))*w.x,x=v.top+(y.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=g,u+=x,k=ot(y),y=Sc(k)}}return Ho({width:c,height:d,x:l,y:u})}function Xd(e,t){const n=kl(e).scrollLeft;return t?t.left+n:Dr(en(e)).left+n}function sy(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Xd(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function X1(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=en(r),o=t?yl(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Xt(1);const c=Xt(0),d=Zt(r);if((d||!d&&!s)&&((Gi(r)!=="body"||pa(a))&&(l=kl(r)),Zt(r))){const h=Dr(r);u=_i(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=a&&!d&&!s?sy(a,l,!0):Xt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Z1(e){return Array.from(e.getClientRects())}function eS(e){const t=en(e),n=kl(e),r=e.ownerDocument.body,i=rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Xd(e);const o=-n.scrollTop;return Mt(r).direction==="rtl"&&(a+=rt(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function tS(e,t){const n=ot(e),r=en(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const u=Qd();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}const nS=new Set(["absolute","fixed"]);function rS(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Zt(e)?_i(e):Xt(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function Wf(e,t,n){let r;if(t==="viewport")r=tS(e,n);else if(t==="document")r=eS(en(e));else if($t(t))r=rS(t,n);else{const i=iy(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ho(r)}function ay(e,t){const n=sr(e);return n===t||!$t(n)||Bi(n)?!1:Mt(n).position==="fixed"||ay(n,t)}function iS(e,t){const n=t.get(e);if(n)return n;let r=qs(e,[],!1).filter(o=>$t(o)&&Gi(o)!=="body"),i=null;const s=Mt(e).position==="fixed";let a=s?sr(e):e;for(;$t(a)&&!Bi(a);){const o=Mt(a),l=Jd(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&nS.has(i.position)||pa(a)&&!l&&ay(e,a))?r=r.filter(c=>c!==a):i=o,a=sr(a)}return t.set(e,r),r}function sS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?yl(t)?[]:iS(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((u,c)=>{const d=Wf(t,c,i);return u.top=rt(d.top,u.top),u.right=ir(d.right,u.right),u.bottom=ir(d.bottom,u.bottom),u.left=rt(d.left,u.left),u},Wf(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function aS(e){const{width:t,height:n}=ry(e);return{width:t,height:n}}function oS(e,t,n){const r=Zt(t),i=en(t),s=n==="fixed",a=Dr(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Xt(0);function u(){l.x=Xd(i)}if(r||!r&&!s)if((Gi(t)!=="body"||pa(i))&&(o=kl(t)),r){const h=Dr(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const c=i&&!r&&!s?sy(i,o):Xt(0),d=a.left+o.scrollLeft-l.x-c.x,f=a.top+o.scrollTop-l.y-c.y;return{x:d,y:f,width:a.width,height:a.height}}function cu(e){return Mt(e).position==="static"}function Vf(e,t){if(!Zt(e)||Mt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return en(e)===n&&(n=n.ownerDocument.body),n}function oy(e,t){const n=ot(e);
vendor: 8,988 bytes, line 151
151if(yl(e))return n;if(!Zt(e)){let i=sr(e);for(;i&&!Bi(i);){if($t(i)&&!cu(i))return i;i=sr(i)}return n}let r=Vf(e,t);for(;r&&H1(r)&&cu(r);)r=Vf(r,t);return r&&Bi(r)&&cu(r)&&!Jd(r)?n:r||G1(e)||n}const lS=async function(e){const t=this.getOffsetParent||oy,n=this.getDimensions,r=await n(e.floating);return{reference:oS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uS(e){return Mt(e).direction==="rtl"}const cS={convertOffsetParentRelativeRectToViewportRelativeRect:X1,getDocumentElement:en,getClippingRect:sS,getOffsetParent:oy,getElementRects:lS,getClientRects:Z1,getDimensions:aS,getScale:_i,isElement:$t,isRTL:uS};function ly(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dS(e,t){let n=null,r;const i=en(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(o||t(),!f||!h)return;const k=za(d),y=za(i.clientWidth-(c+f)),w=za(i.clientHeight-(d+h)),v=za(c),g={rootMargin:-k+"px "+-y+"px "+-w+"px "+-v+"px",threshold:rt(0,ir(1,l))||1};let x=!0;function S(_){const j=_[0].intersectionRatio;if(j!==l){if(!x)return a();j?a(!1,j):r=setTimeout(()=>{a(!1,1e-7)},1e3)}j===1&&!ly(u,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(S,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return a(!0),s}function hS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Yd(e),c=i||s?[...u?qs(u):[],...qs(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&o?dS(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(v=>{let[p]=v;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let k,y=l?Dr(e):null;l&&w();function w(){const v=Dr(e);y&&!ly(y,v)&&n(),y=v,k=requestAnimationFrame(w)}return n(),()=>{var v;c.forEach(p=>{i&&p.removeEventListener("scroll",n),s&&p.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(k)}}const fS=$1,pS=M1,mS=I1,gS=F1,vS=L1,qf=O1,yS=U1,kS=(e,t,n)=>{const r=new Map,i={platform:cS,...n},s={...i.platform,_c:r};return N1(e,t,{...i,platform:s})};var wS=typeof document<"u",bS=function(){},po=wS?b.useLayoutEffect:bS;function Ko(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 n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ko(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Ko(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function uy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gf(e,t){const n=uy(e);return Math.round(t*n)/n}function du(e){const t=b.useRef(e);return po(()=>{t.current=e}),t}function xS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[c,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(r);Ko(f,r)||h(r);const[k,y]=b.useState(null),[w,v]=b.useState(null),p=b.useCallback(T=>{T!==_.current&&(_.current=T,y(T))},[]),g=b.useCallback(T=>{T!==j.current&&(j.current=T,v(T))},[]),x=s||k,S=a||w,_=b.useRef(null),j=b.useRef(null),A=b.useRef(c),R=l!=null,O=du(l),z=du(i),L=du(u),K=b.useCallback(()=>{if(!_.current||!j.current)return;const T={placement:t,strategy:n,middleware:f};z.current&&(T.platform=z.current),kS(_.current,j.current,T).then(C=>{const D={...C,isPositioned:L.current!==!1};I.current&&!Ko(A.current,D)&&(A.current=D,ha.flushSync(()=>{d(D)}))})},[f,t,n,z,L]);po(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[u]);const I=b.useRef(!1);po(()=>(I.current=!0,()=>{I.current=!1}),[]),po(()=>{if(x&&(_.current=x),S&&(j.current=S),x&&S){if(O.current)return O.current(x,S,K);K()}},[x,S,K,O,R]);const X=b.useMemo(()=>({reference:_,floating:j,setReference:p,setFloating:g}),[p,g]),H=b.useMemo(()=>({reference:x,floating:S}),[x,S]),q=b.useMemo(()=>{const T={position:n,left:0,top:0};if(!H.floating)return T;const C=Gf(H.floating,c.x),D=Gf(H.floating,c.y);return o?{...T,transform:"translate("+C+"px, "+D+"px)",...uy(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:C,top:D}},[n,o,H.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:K,refs:X,elements:H,floatingStyles:q}),[c,K,X,H,q])}const SS=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qf({element:r.current,padding:i}).fn(n):{}:r?qf({element:r,padding:i}).fn(n):{}}}},_S=(e,t)=>({...fS(e),options:[e,t]}),jS=(e,t)=>({...pS(e),options:[e,t]}),ES=(e,t)=>({...yS(e),options:[e,t]}),TS=(e,t)=>({...mS(e),options:[e,t]}),CS=(e,t)=>({...gS(e),options:[e,t]}),AS=(e,t)=>({...vS(e),options:[e,t]}),PS=(e,t)=>({...SS(e),options:[e,t]});var RS="Arrow",cy=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return m.jsx(et.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});cy.displayName=RS;var NS=cy;function OS(e){const[t,n]=b.useState(void 0);return rr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var dy="Popper",[hy,fy]=pl(dy),[YC,py]=hy(dy),my="PopperAnchor",gy=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=py(my,n),a=b.useRef(null),o=Dt(t,a);return b.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:m.jsx(et.div,{...i,ref:o})});gy.displayName=my;var Zd="PopperContent",[IS,LS]=hy(Zd),vy=b.forwardRef((e,t)=>{var ne,Br,bn,cr,xn,zr;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:k,...y}=e,w=py(Zd,n),[v,p]=b.useState(null),g=Dt(t,Sn=>p(Sn)),[x,S]=b.useState(null),_=OS(x),j=(_==null?void 0:_.width)??0,A=(_==null?void 0:_.height)??0,R=r+(s!=="center"?"-"+s:""),O=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},z=Array.isArray(u)?u:[u],L=z.length>0,K={padding:O,boundary:z.filter($S),altBoundary:L},{refs:I,floatingStyles:X,placement:H,isPositioned:q,middlewareData:T}=xS({strategy:"fixed",placement:R,whileElementsMounted:(...Sn)=>hS(...Sn,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[_S({mainAxis:i+A,alignmentAxis:a}),l&&jS({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?ES():void 0,...K}),l&&TS({...K}),CS({...K,apply:({elements:Sn,rects:ya,availableWidth:Al,availableHeight:ka})=>{const{width:Pl,height:Yi}=ya.reference,Hr=Sn.floating.style;Hr.setProperty("--radix-popper-available-width",`${Al}px`),Hr.setProperty("--radix-popper-available-height",`${ka}px`),Hr.setProperty("--radix-popper-anchor-width",`${Pl}px`),Hr.setProperty("--radix-popper-anchor-height",`${Yi}px`)}}),x&&PS({element:x,padding:o}),MS({arrowWidth:j,arrowHeight:A}),f&&AS({strategy:"referenceHidden",...K})]}),[C,D]=wy(H),G=nr(k);rr(()=>{q&&(G==null||G())},[q,G]);const F=(ne=T.arrow)==null?void 0:ne.x,Q=(Br=T.arrow)==null?void 0:Br.y,Z=((bn=T.arrow)==null?void 0:bn.centerOffset)!==0,[ke,Ie]=b.useState();return rr(()=>{v&&Ie(window.getComputedStyle(v).zIndex)},[v]),m.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:q?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ke,"--radix-popper-transform-origin":[(cr=T.transformOrigin)==null?void 0:cr.x,(xn=T.transformOrigin)==null?void 0:xn.y].join(" "),...((zr=T.hide)==null?void 0:zr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(IS,{scope:n,placedSide:C,onArrowChange:S,arrowX:F,arrowY:Q,shouldHideArrow:Z,children:m.jsx(et.div,{"data-side":C,"data-align":D,...y,ref:g,style:{...y.style,animation:q?void 0:"none"}})})})});vy.displayName=Zd;var yy="PopperArrow",DS={top:"bottom",right:"left",bottom:"top",left:"r
151ight"},ky=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=LS(yy,r),a=DS[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(NS,{...i,ref:n,style:{...i.style,display:"block"}})})});ky.displayName=yy;function $S(e){return e!==null}var MS=e=>({name:"transformOrigin",options:e,fn(t){var w,v,p;const{placement:n,rects:r,middlewareData:i}=t,a=((w=i.arrow)==null?void 0:w.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,c]=wy(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((v=i.arrow)==null?void 0:v.x)??0)+o/2,h=(((p=i.arrow)==null?void 0:p.y)??0)+l/2;let k="",y="";return u==="bottom"?(k=a?d:`${f}px`,y=`${-l}px`):u==="top"?(k=a?d:`${f}px`,y=`${r.floating.height+l}px`):u==="right"?(k=`${-l}px`,y=a?d:`${h}px`):u==="left"&&(k=`${r.floating.width+l}px`,y=a?d:`${h}px`),{data:{x:k,y}}}});function wy(e){const[t,n="center"]=e.split("-");return[t,n]}var US=gy,FS=vy,BS=ky,[wl,XC]=pl("Tooltip",[fy]),eh=fy(),by="TooltipProvider",zS=700,Jf="tooltip.open",[HS,xy]=wl(by),Sy=e=>{const{__scopeTooltip:t,delayDuration:n=zS,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=b.useRef(!0),o=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(HS,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})};Sy.displayName=by;var _y="Tooltip",[ZC,bl]=wl(_y),_c="TooltipTrigger",KS=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=bl(_c,n),s=xy(_c,n),a=eh(n),o=b.useRef(null),l=Dt(t,o,i.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(US,{asChild:!0,...a,children:m.jsx(et.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:_e(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:_e(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:_e(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:_e(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:_e(e.onBlur,i.onClose),onClick:_e(e.onClick,i.onClose)})})});KS.displayName=_c;var WS="TooltipPortal",[eA,VS]=wl(WS,{forceMount:void 0}),zi="TooltipContent",jy=b.forwardRef((e,t)=>{const n=VS(zi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=bl(zi,e.__scopeTooltip);return m.jsx(Bd,{present:r||a.open,children:a.disableHoverableContent?m.jsx(Ey,{side:i,...s,ref:t}):m.jsx(qS,{side:i,...s,ref:t})})}),qS=b.forwardRef((e,t)=>{const n=bl(zi,e.__scopeTooltip),r=xy(zi,e.__scopeTooltip),i=b.useRef(null),s=Dt(t,i),[a,o]=b.useState(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{o(null),d(!1)},[d]),h=b.useCallback((k,y)=>{const w=k.currentTarget,v={x:k.clientX,y:k.clientY},p=XS(v,w.getBoundingClientRect()),g=ZS(v,p),x=e_(y.getBoundingClientRect()),S=n_([...g,...x]);o(S),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&c){const k=w=>h(w,c),y=w=>h(w,l);return l.addEventListener("pointerleave",k),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",k),c.removeEventListener("pointerleave",y)}}},[l,c,h,f]),b.useEffect(()=>{if(a){const k=y=>
151{const w=y.target,v={x:y.clientX,y:y.clientY},p=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),g=!t_(v,a);p?f():g&&(f(),u())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[l,c,a,u,f]),m.jsx(Ey,{...e,ref:s})}),[GS,JS]=wl(_y,{isInside:!1}),QS=ib("TooltipContent"),Ey=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,l=bl(zi,n),u=eh(n),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(Jf,c),()=>document.removeEventListener(Jf,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]),m.jsx(Fd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:m.jsxs(FS,{"data-state":l.stateAttribute,...u,...o,ref:t,style:{...o.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:[m.jsx(QS,{children:r}),m.jsx(GS,{scope:n,isInside:!0,children:m.jsx(Ab,{id:l.contentId,role:"tooltip",children:i||r})})]})})});jy.displayName=zi;var Ty="TooltipArrow",YS=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=eh(n);return JS(Ty,n).isInside?null:m.jsx(BS,{...i,...r,ref:t})});YS.displayName=Ty;function XS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ZS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function e_(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function t_(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],l=t[a],u=o.x,c=o.y,d=l.x,f=l.y;c>r!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function n_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),r_(t)}function r_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var i_=Sy,Cy=jy;const s_=i_,a_=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(Cy,{ref:r,sideOffset:t,className:Ur("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),...n}));a_.displayName=Cy.displayName;var xl=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(){}},Sl=typeof window>"u"||"Deno"in globalThis;function Tt(){}function o_(e,t){return typeof e=="function"?e(t):e}function l_(e){return typeof e=="number"&&e>=0&&e!==1/0}function u_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jc(e,t){return typeof e=="function"?e(t):e}function c_(e,t){return typeof e=="function"?e(t):e}function Qf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==th(a,t.options))return!1}else if(!Js(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function Yf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gs(t.options.mutationKey)!==Gs(s))return!1}else if(!Js(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function th(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gs)(e)}function Gs(e){return JSON.stringify(e,(t,n)=>Ec(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Js(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Js(e[n],t[n])):!1}function Ay(e,t){if(e===t)return e;const n=Xf(e)&&Xf(t);if(n||Ec(e)&&Ec(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),a=s.length,o=n?[]:{},l=new Set(r);let u=0;for(let c=0;c<a;c++){const d=n?c:s[c];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,u++):(o[d]=Ay(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&u++)}return i===a&&u===i?e:o}return t}function Xf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ec(e){if(!Zf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Zf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zf(e){return Object.prototype.toString.call(e)==="[object Object]"}function d_(e){return new Promise(t=>{setTimeout(t,e)})}function h_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ay(e,t):t}function f_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function p_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nh=Symbol();function Py(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===nh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Sr,$n,Ei,Fp,m_=(Fp=class extends xl{constructor(){super();te(this,Sr);te(this,$n);te(this,Ei);V(this,Ei,t=>{if(!Sl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,$n)||this.setEventListener(E(this,Ei))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,$n))==null||t.call(this),V(this,$n,void 0))}setEventListener(t){var n;
vendor: 5,128 bytes, line 151
151V(this,Ei,t),(n=E(this,$n))==null||n.call(this),V(this,$n,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,Sr)!==t&&(V(this,Sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,Sr)=="boolean"?E(this,Sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sr=new WeakMap,$n=new WeakMap,Ei=new WeakMap,Fp),Ry=new m_,Ti,Mn,Ci,Bp,g_=(Bp=class extends xl{constructor(){super();te(this,Ti,!0);te(this,Mn);te(this,Ci);V(this,Ci,t=>{if(!Sl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,Mn)||this.setEventListener(E(this,Ci))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Mn))==null||t.call(this),V(this,Mn,void 0))}setEventListener(t){var n;V(this,Ci,t),(n=E(this,Mn))==null||n.call(this),V(this,Mn,t(this.setOnline.bind(this)))}setOnline(t){E(this,Ti)!==t&&(V(this,Ti,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Ti)}},Ti=new WeakMap,Mn=new WeakMap,Ci=new WeakMap,Bp),Wo=new g_;function v_(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function y_(e){return Math.min(1e3*2**e,3e4)}function Ny(e){return(e??"online")==="online"?Wo.isOnline():!0}var Oy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hu(e){return e instanceof Oy}function Iy(e){let t=!1,n=0,r=!1,i;const s=v_(),a=y=>{var w;r||(f(new Oy(y)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},l=()=>{t=!1},u=()=>Ry.isFocused()&&(e.networkMode==="always"||Wo.isOnline())&&e.canRun(),c=()=>Ny(e.networkMode)&&e.canRun(),d=y=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,y),i==null||i(),s.resolve(y))},f=y=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,y),i==null||i(),s.reject(y))},h=()=>new Promise(y=>{var w;i=v=>{(r||u())&&y(v)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;i=void 0,r||(y=e.onContinue)==null||y.call(e)}),k=()=>{if(r)return;let y;const w=n===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(d).catch(v=>{var _;if(r)return;const p=e.retry??(Sl?0:3),g=e.retryDelay??y_,x=typeof g=="function"?g(n,v):g,S=p===!0||typeof p=="number"&&n<p||typeof p=="function"&&p(n,v);if(t||!S){f(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),d_(x).then(()=>u()?void 0:h()).then(()=>{t?f(v):k()})})};return{promise:s,cancel:a,continue:()=>(i==null||i(),s),cancelRetry:o,continueRetry:l,canStart:c,start:()=>(c()?k():h().then(k),s)}}var k_=e=>setTimeout(e,0);function w_(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=k_;const s=o=>{t?e.push(o):i(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{s(()=>{o(...l)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var He=w_(),_r,zp,Ly=(zp=class{constructor(){te(this,_r)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),l_(this.gcTime)&&V(this,_r,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sl?1/0:5*60*1e3))}clearGcTimeout(){E(this,_r)&&(clearTimeout(E(this,_r)),V(this,_r,void 0))}},_r=new WeakMap,zp),Ai,jr,ft,Er,Me,sa,Tr,At,nn,Hp,b_=(Hp=class extends Ly{constructor(t){super();te(this,At);te(this,Ai);te(this,jr);te(this,ft);te(this,Er);te(this,Me);te(this,sa);te(this,Tr);V(this,Tr,!1),V(this,sa,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,Er,t.client),V(this,ft,E(this,Er).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Ai,S_(this.options)),this.state=t.state??E(this,Ai),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Me))==null?void 0:t.promise}setOptions(t){this.options={...E(this,sa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,ft).remove(this)}setData(t,n){const r=h_(this.state.data,t,this.options);return Le(this,At,nn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Le(this,At,nn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=E(this,Me))==null?void 0:r.promise;return(i=E(this,Me))==null||i.cancel(t),n?n.then(Tt).catch(Tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,Ai))}isActive(){return this.observers.some(t=>c_(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nh||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 151
151Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>jc(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:!u_(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Me))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Me))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,ft).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Me)&&(E(this,Tr)?E(this,Me).cancel({revert:!0}):E(this,Me).cancelRetry()),this.scheduleGc()),E(this,ft).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Le(this,At,nn).call(this,{type:"invalidate"})}
vendor: 13,715 bytes, line 151
151fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Me))return E(this,Me).continueRetry(),E(this,Me).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(V(this,Tr,!0),r.signal)})},s=()=>{const f=Py(this.options,n),k=(()=>{const y={client:E(this,Er),queryKey:this.queryKey,meta:this.meta};return i(y),y})();return V(this,Tr,!1),this.options.persister?this.options.persister(f,k,this):f(k)},o=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:E(this,Er),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(o,this),V(this,jr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&Le(this,At,nn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,k,y,w;hu(f)&&f.silent||Le(this,At,nn).call(this,{type:"error",error:f}),hu(f)||((k=(h=E(this,ft).config).onError)==null||k.call(h,f,this),(w=(y=E(this,ft).config).onSettled)==null||w.call(y,this.state.data,f,this)),this.scheduleGc()};return V(this,Me,Iy({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,k,y,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(k=(h=E(this,ft).config).onSuccess)==null||k.call(h,f,this),(w=(y=E(this,ft).config).onSettled)==null||w.call(y,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Le(this,At,nn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Le(this,At,nn).call(this,{type:"pause"})},onContinue:()=>{Le(this,At,nn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),E(this,Me).start()}},Ai=new WeakMap,jr=new WeakMap,ft=new WeakMap,Er=new WeakMap,Me=new WeakMap,sa=new WeakMap,Tr=new WeakMap,At=new WeakSet,nn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...x_(r.data,this.options),fetchMeta:t.meta??null};case"success":return V(this,jr,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return hu(i)&&i.revert&&E(this,jr)?{...E(this,jr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,ft).notify({query:this,type:"updated",action:t})})},Hp);function x_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ny(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function S_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kt,Kp,__=(Kp=class extends xl{constructor(t={}){super();te(this,Kt);this.config=t,V(this,Kt,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??th(i,n);let a=this.get(s);return a||(a=new b_({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){E(this,Kt).has(t.queryHash)||(E(this,Kt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Kt).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Kt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Kt).get(t)}getAll(){return[...E(this,Kt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Qf(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kt=new WeakMap,Kp),Wt,Be,Cr,Vt,Pn,Wp,j_=(Wp=class extends Ly{constructor(t){super();te(this,Vt);te(this,Wt);te(this,Be);te(this,Cr);this.mutationId=t.mutationId,V(this,Be,t.mutationCache),V(this,Wt,[]),this.state=t.state||E_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Wt).includes(t)||(E(this,Wt).push(t),this.clearGcTimeout(),E(this,Be).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,Wt,E(this,Wt).filter(n=>n!==t)),this.scheduleGc(),E(this,Be).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Wt).length||(this.state.status==="pending"?this.scheduleGc():E(this,Be).remove(this))}continue(){var t;return((t=E(this,Cr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,o,l,u,c,d,f,h,k,y,w,v,p,g,x,S,_,j,A;const n=()=>{Le(this,Vt,Pn).call(this,{type:"continue"})};V(this,Cr,Iy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,O)=>{Le(this,Vt,Pn).call(this,{type:"failed",failureCount:R,error:O})},onPause:()=>{Le(this,Vt,Pn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Be).canRun(this)}));const r=this.state.status==="pending",i=!E(this,Cr).canStart();try{if(r)n();else{Le(this,Vt,Pn).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=E(this,Be).config).onMutate)==null?void 0:a.call(s,t,this));const O=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));O!==this.state.context&&Le(this,Vt,Pn).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const R=await E(this,Cr).start();return await((c=(u=E(this,Be).config).onSuccess)==null?void 0:c.call(u,R,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,R,t,this.state.context)),await((k=(h=E(this,Be).config).onSettled)==null?void 0:k.call(h,R,null,this.state.variables,this.state.context,this)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,R,null,t,this.state.context)),Le(this,Vt,Pn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((p=(v=E(this,Be).config).onError)==null?void 0:p.call(v,R,t,this.state.context,this)),await((x=(g=this.options).onError)==null?void 0:x.call(g,R,t,this.state.context)),await((_=(S=E(this,Be).config).onSettled)==null?void 0:_.call(S,void 0,R,this.state.variables,this.state.context,this)),await((A=(j=this.options).onSettled)==null?void 0:A.call(j,void 0,R,t,this.state.context)),R}finally{Le(this,Vt,Pn).call(this,{type:"error",error:R})}}finally{E(this,Be).runNext(this)}}},Wt=new WeakMap,Be=new WeakMap,Cr=new WeakMap,Vt=new WeakSet,Pn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{E(this,Wt).forEach(r=>{r.onMutationUpdate(t)}),E(this,Be).notify({mutation:this,type:"updated",action:t})})},Wp);function E_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ln,Pt,aa,Vp,T_=(Vp=class extends xl{constructor(t={}){super();te(this,ln);te(this,Pt);te(this,aa);this.config=t,V(this,ln,new Set),V(this,Pt,new Map),V(this,aa,0)}build(t,n,r){const i=new j_({mutationCache:this,mutationId:++ba(this,aa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){E(this,ln).add(t);const n=Ha(t);if(typeof n=="string"){const r=E(this,Pt).get(n);r?r.push(t):E(this,Pt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,ln).delete(t)){const n=Ha(t);if(typeof n=="string"){const r=E(this,Pt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&E(this,Pt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ha(t);if(typeof n=="string"){const r=E(this,Pt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Ha(t);if(typeof n=="string"){const i=(r=E(this,Pt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){He.batch(()=>{E(this,ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,ln).clear(),E(this,Pt).clear()})}getAll(){return Array.from(E(this,ln))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yf(n,r))}findAll(t={}){return this.getAll().filter(n=>Yf(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tt))))}},ln=new WeakMap,Pt=new WeakMap,aa=new WeakMap,Vp);function Ha(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ep(e){return{onFetch:(t,n)=>{var c,d,f,h,k;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],a=((k=t.state.data)==null?void 0:k.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const w=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},v=Py(t.options,t.fetchOptions),p=async(g,x,S)=>{if(y)return Promise.reject();if(x==null&&g.pages.length)return Promise.resolve(g);const j=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};return w(z),z})(),A=await v(j),{maxPages:R}=t.options,O=S?p_:f_;return{pages:O(g.pages,A,R),pageParams:O(g.pageParams,x,R)}};if(i&&s.length){const g=i==="backward",x=g?C_:tp,S={pages:s,pageParams:a},_=x(r,S);o=await p(S,_,g)}else{const g=e??s.length;do{const x=l===0?a[0]??r.initialPageParam:tp(r,o);if(l>0&&x==null)break;o=await p(o,x),l++}while(l<g)}return o};t.options.persister?t.fetchFn=()=>{var y,w;return(w=(y=t.options).persister)==null?void 0:w.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function tp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function C_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var me,Un,Fn,Pi,Ri,Bn,Ni,Oi,qp,A_=(qp=class{constructor(e={}){te(this,me);te(this,Un);te(this,Fn);te(this,Pi);te(this,Ri);te(this,Bn);te(this,Ni);te(this,Oi);V(this,me,e.queryCache||new __),V(this,Un,e.mutationCache||new T_),V(this,Fn,e.defaultOptions||{}),V(this,Pi,new Map),V(this,Ri,new Map),V(this,Bn,0)}mount(){ba(this,Bn)._++,E(this,Bn)===1&&(V(this,Ni,Ry.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,me).onFocus())})),V(this,Oi,Wo.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,me).onOnline())})))}unmount(){var e,t;ba(this,Bn)._--,E(this,Bn)===0&&((e=E(this,Ni))==null||e.call(this),V(this,Ni,void 0),(t=E(this,Oi))==null||t.call(this),V(this,Oi,void 0))}isFetching(e){return E(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Un).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,me).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=E(this,me).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(jc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(this,me).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=E(this,me).get(r.queryHash),s=i==null?void 0:i.state.data,a=o_(t,s);if(a!==void 0)return E(this,me).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>E(this,me).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,me).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,me);He.batch(()=>
151{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,me);return He.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>E(this,me).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Tt).catch(Tt)}invalidateQueries(e,t={}){return He.batch(()=>(E(this,me).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>E(this,me).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Tt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Tt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,me).build(this,t);return n.isStaleByTime(jc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tt).catch(Tt)}fetchInfiniteQuery(e){return e.behavior=ep(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tt).catch(Tt)}ensureInfiniteQueryData(e){return e.behavior=ep(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wo.isOnline()?E(this,Un).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,me)}getMutationCache(){return E(this,Un)}getDefaultOptions(){return E(this,Fn)}setDefaultOptions(e){V(this,Fn,e)}setQueryDefaults(e,t){E(this,Pi).set(Gs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Pi).values()],n={};return t.forEach(r=>{Js(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,Ri).set(Gs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Ri).values()],n={};return t.forEach(r=>{Js(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Fn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=th(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===nh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Fn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,me).clear(),E(this,Un).clear()}},me=new WeakMap,Un=new WeakMap,Fn=new WeakMap,Pi=new WeakMap,Ri=new WeakMap,Bn=new WeakMap,Ni=new WeakMap,Oi=new WeakMap,qp),P_=b.createContext(void 0),R_=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(P_.Provider,{value:e,children:t}));/**
152 * @remix-run/router v1.23.0
153 *
154 * Copyright (c) Remix Software Inc.
155 *
156 * This source code is licensed under the MIT license found in the
157 * LICENSE.md file in the root directory of this source tree.
158 *
159 * @license MIT
160 */function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qs.apply(this,arguments)}var Kn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Kn||(Kn={}));const np="popstate";function N_(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:a,hash:o}=r.location;return Tc("",{pathname:s,search:a,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vo(i)}return I_(t,n,null,e)}function xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Dy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function O_(){return Math.random().toString(36).substr(2,8)}function rp(e,t){return{usr:e.state,key:e.key,idx:t}}function Tc(e,t,n,r){return n===void 0&&(n=null),Qs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""}
vendor: 4,168 bytes, line 160
160,typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||O_()})}function Vo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function I_(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,o=Kn.Pop,l=null,u=c();u==null&&(u=0,a.replaceState(Qs({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){o=Kn.Pop;let w=c(),v=w==null?null:w-u;u=w,l&&l({action:o,location:y.location,delta:v})}function f(w,v){o=Kn.Push;let p=Tc(y.location,w,v);u=c()+1;let g=rp(p,u),x=y.createHref(p);try{a.pushState(g,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(x)}s&&l&&l({action:o,location:y.location,delta:1})}function h(w,v){o=Kn.Replace;let p=Tc(y.location,w,v);u=c();let g=rp(p,u),x=y.createHref(p);a.replaceState(g,"",x),s&&l&&l({action:o,location:y.location,delta:0})}function k(w){let v=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof w=="string"?w:Vo(w);return p=p.replace(/ $/,"%20"),xe(v,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,v)}let y={get action(){return o},get location(){return e(i,a)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(np,d),l=w,()=>{i.removeEventListener(np,d),l=null}},createHref(w){return t(i,w)},createURL:k,encodeLocation(w){let v=k(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(w){return a.go(w)}};return y}var ip;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ip||(ip={}));function L_(e,t,n){return n===void 0&&(n="/"),D_(e,t,n,!1)}function D_(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=rh(i.pathname||"/",n);if(s==null)return null;let a=$y(e);$_(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let u=G_(s);o=V_(a[l],u,r)}return o}function $y(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(xe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Zn([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(xe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),$y(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:K_(u,s.index),routesMeta:c})};return e.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of My(s.path))i(s,a,l)}),t}function My(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=My(r.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function $_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:W_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const M_=/^:[\w-]+$/,U_=3,F_=2,B_=1,z_=10,H_=-2,sp=e=>e==="*";function K_(e,t){let n=e.split("/"),r=n.length;return n.some(sp)&&(r+=H_),t&&(r+=F_),n.filter(i=>!sp(i)).reduce((i,s)=>i+(M_.test(s)?U_:s===""?B_:z_),r)}function W_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function V_(e,t,n){let{routesMeta:r}=e,i={},s="/",a=[];for(let o=0;o<r.length;++o){let l=r[o],u=o===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=ap({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=ap({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 9,263 bytes, lines 160-169
160Object.assign(i,d.params),a.push({params:i,pathname:Zn([s,d.pathname]),pathnameBase:X_(Zn([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=Zn([s,d.pathnameBase]))}return a}function ap(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=q_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let y=o[d]||"";a=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const k=o[d];return h&&!k?u[f]=void 0:u[f]=(k||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function q_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Dy(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function G_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dy(!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 rh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function J_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:Q_(n,t):t,search:Z_(r),hash:ej(i)}}function Q_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function fu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Uy(e,t){let n=Y_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fy(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=Qs({},e),xe(!i.pathname||!i.pathname.includes("?"),fu("?","pathname","search",i)),xe(!i.pathname||!i.pathname.includes("#"),fu("#","pathname","hash",i)),xe(!i.search||!i.search.includes("#"),fu("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?t[d]:"/"}let l=J_(i,o),u=a&&a!=="/"&&a.endsWith("/"),c=(s||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Zn=e=>e.join("/").replace(/\/\/+/g,"/"),X_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Z_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ej=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function tj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const By=["post","put","patch","delete"];new Set(By);const nj=["get",...By];new Set(nj);/**
161 * React Router v6.30.1
162 *
163 * Copyright (c) Remix Software Inc.
164 *
165 * This source code is licensed under the MIT license found in the
166 * LICENSE.md file in the root directory of this source tree.
167 *
168 * @license MIT
169 */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ys.apply(this,arguments)}const ih=b.createContext(null),rj=b.createContext(null),Fr=b.createContext(null),_l=b.createContext(null),ur=b.createContext({outlet:null,matches:[],isDataRoute:!1}),zy=b.createContext(null);function ij(e,t){let{relative:n}=t===void 0?{}:t;ma()||xe(!1);let{basename:r,navigator:i}=b.useContext(Fr),{hash:s,pathname:a,search:o}=Ky(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:Zn([r,a])),i.createHref({pathname:l,search:o,hash:s})}function ma(){return b.useContext(_l)!=null}function ga(){return ma()||xe(!1),b.useContext(_l).location}function Hy(e){b.useContext(Fr).static||b.useLayoutEffect(e)}function sj(){let{isDataRoute:e}=b.useContext(ur);return e?kj():aj()}function aj(){ma()||xe(!1);let e=b.useContext(ih),{basename:t,future:n,navigator:r}=b.useContext(Fr),{matches:i}=b.useContext(ur),{pathname:s}=ga(),a=JSON.stringify(Uy(i,n.v7_relativeSplatPath)),o=b.useRef(!1);return Hy(()=>{o.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let d=Fy(u,JSON.parse(a),s,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Zn([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,s,e])}function oj(){let{matches:e}=b.useContext(ur),t=e[e.length-1];return t?t.params:{}}function Ky(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Fr),{matches:i}=b.useContext(ur),{pathname:s}=ga(),a=JSON.stringify(Uy(i,r.v7_relativeSplatPath));return b.useMemo(()=>Fy(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function lj(e,t){return uj(e,t)}function uj(e,t,n,r){ma()||xe(!1);let{navigator:i}=b.useContext(Fr),{matches:s}=b.useContext(ur),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=ga(),c;if(t){var d;let w=typeof t=="string"?Ji(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 k=L_(e,{pathname:h}),y=pj(k&&k.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Zn([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Zn([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&y?b.createElement(_l.Provider,{value:{location:Ys({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Kn.Pop}},y):y}function cj(){let e=yj(),t=tj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const dj=b.createElement(cj,null);class hj 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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(ur.Provider,{value:this.props.routeContext},b.createElement(zy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fj(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(ih);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ur.Provider,{value:t},r)}function pj(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);c>=0||xe(!1),a=a.slice(0,Math.min(a.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=n,k=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||k){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let h,k=!1,y=null,w=null;n&&(h=o&&d.route.id?o[d.route.id]:void 0,y=d.route.errorElement||dj,l&&(u<0&&f===0?(k=!0,w=null):u===f&&(k=!0,w=d.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,f+1)),p=()=>{let g;return h?g=y:k?g=w:d.route.Component?g=b.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=c,b.createElement(fj,{match:d,routeC
169ontext:{outlet:c,matches:v,isDataRoute:n!=null},children:g})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(hj,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:p(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):p()},null)}var Wy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wy||{}),qo=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}(qo||{});function mj(e){let t=b.useContext(ih);return t||xe(!1),t}function gj(e){let t=b.useContext(rj);return t||xe(!1),t}function vj(e){let t=b.useContext(ur);return t||xe(!1),t}function Vy(e){let t=vj(),n=t.matches[t.matches.length-1];return n.route.id||xe(!1),n.route.id}function yj(){var e;let t=b.useContext(zy),n=gj(qo.UseRouteError),r=Vy(qo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function kj(){let{router:e}=mj(Wy.UseNavigateStable),t=Vy(qo.UseNavigateStable),n=b.useRef(!1);return Hy(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ys({fromRouteId:t},s)))},[e,t])}function wj(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function mo(e){xe(!1)}function bj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Kn.Pop,navigator:s,static:a=!1,future:o}=e;ma()&&xe(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:s,static:a,future:Ys({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof r=="string"&&(r=Ji(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:k="default"}=r,y=b.useMemo(()=>{let w=rh(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:k},navigationType:i}},[l,c,d,f,h,k,i]);return y==null?null:b.createElement(Fr.Provider,{value:u},b.createElement(_l.Provider,{children:n,value:y}))}function xj(e){let{children:t,location:n}=e;return lj(Cc(t),n)}new Promise(()=>{});function Cc(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let s=[...t,i];if(r.type===b.Fragment){n.push.apply(n,Cc(r.props.children,s));return}r.type!==mo&&xe(!1),!r.props.index||!r.props.children||xe(!1);let a={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Cc(r.props.children,s)),n.push(a)}),n}/**
170 * React Router DOM v6.30.1
171 *
172 * Copyright (c) Remix Software Inc.
173 *
174 * This source code is licensed under the MIT license found in the
175 * LICENSE.md file in the root directory of this source tree.
176 *
177 * @license MIT
178 */function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ac.apply(this,arguments)}function Sj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _j(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jj(e,t){return e.button===0&&(!t||t==="_self")&&!_j(e)}const Ej=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Tj="6";try{window.__reactRouterVersion=Tj}catch{}const Cj="startTransition",op=sm[Cj];function Aj(e){let{basename:t,children:n,future:r,window:i}=e,s=b.useRef();s.current==null&&(s.current=N_({window:i,v5Compat:!0}));let a=s.current,[o,l]=b.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=b.useCallback(d=>{u&&op?op(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>a.listen(c),[a,c]),b.useEffect(()=>wj(r),[r]),b.createElement(bj,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const Pj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pc=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,f=Sj(t,Ej),{basename:h}=b.useContext(Fr),k,y=!1;if(typeof u=="string"&&Rj.test(u)&&(k=u,Pj))try{let g=new URL(window.location.href),x=u.startsWith("//")?new URL(g.protocol+u):new URL(u),S=rh(x.pathname,h);x.origin===g.origin&&S!=null?u=S+x.search+x.hash:y=!0}catch{}let w=ij(u,{relative:i}),v=Nj(u,{replace:a,state:o,target:l,preventScrollReset:c,relative:i,viewTransition:d});function p(g){r&&r(g),g.defaultPrevented||v(g)}return b.createElement("a",Ac({},f,{href:k||w,onClick:y||s?r:p,ref:n,target:l}))});var lp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lp||(lp={}));var up;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(up||(up={}));function Nj(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,viewTransition:o}=t===void 0?{}:t,l=sj(),u=ga(),c=Ky(e,{relative:a});return b.useCallback(d=>
178{if(jj(d,n)){d.preventDefault();let f=r!==void 0?r:Vo(u)===Vo(c);l(e,{replace:f,state:i,preventScrollReset:s,relative:a,viewTransition:o})}},[u,l,c,r,i,n,e,s,a,o])}const Oj="/assets/hero-banner-C_xYewe-.jpg",Rc=()=>{const[e,t]=b.useState(!1),n=[{label:"Artiklid",href:"/#artiklid"},{label:"Podcast",href:"/#podcastid"},{label:"Kursus",href:"/#kursus"},{label:"Minust",href:"/#minust"},{label:"Kontakt",href:"/#kontakt"}],r=i=>{i.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})};return m.jsxs("header",{className:"sticky top-0 z-50 bg-card",style:{boxShadow:"var(--shadow-nav)"},children:[m.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-4 md:px-6",children:[m.jsx("a",{href:"/",onClick:r,className:"digi-nav-link py-1",children:"AVALEHELE"}),m.jsxs("nav",{className:"hidden md:flex items-center gap-8",children:[n.map(i=>m.jsx("a",{href:i.href,className:"digi-nav-link py-1",children:i.label},i.label)),m.jsxs("a",{href:"https://digiwise.ee",target:"_blank",rel:"noopener noreferrer",className:"digi-btn-primary text-xs py-2 px-4",children:["Digiwise.ee",m.jsx(dn,{className:"w-3 h-3"})]})]}),m.jsx("button",{className:"md:hidden p-2 rounded text-secondary",onClick:()=>t(!e),"aria-label":"Menüü",children:e?m.jsx(zv,{className:"w-6 h-6"}):m.jsx(nx,{className:"w-6 h-6"})})]}),e&&m.jsx("div",{className:"md:hidden bg-card border-t border-border animate-fade-in",children:m.jsx("div",{className:"container mx-auto px-4 py-4 flex flex-col gap-4",children:n.map(i=>m.jsx("a",{href:i.href,className:"digi-nav-link py-2 text-base",onClick:()=>t(!1),children:i.label},i.label))})})]})},qy=[{id:1,slug:"kes-sisestab-teie-tellimused",title:"Kes sisestab teie müügitellimused?",excerpt:"AI-põhine lahendus automatiseeris hulgimüügiettevõtte müügitellimuste töötlemise. E-kirjadest saabuvad PDF-id, Exceli failid ja vaba tekst tõlgitakse nüüd automaatselt majandustarkvara müügitellimusteks. Mainitud lahendused: EDI, PIM, AI-põhine tarkvaramoodul.",date:"2025",tag:"Müügitellimused",readTime:"5 min",featured:!0,author:"Olga LuÅ¡tÅ¡ik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/09/30/arinoustaja-mul-on-kaheksa-ai-agenti-vaata-kuidas-uks-neist-mind-pettis"},seoTitle:"Müügitellimuste automatiseerimine AI abil | Nutikas Eesti Ettevõte",seoDescription:"Kuidas Eesti hulgimüügiettevõte automatiseeris müügitellimuste sisestamise AI ja PIM-süsteemiga. Praktiline näide PDF-ide ja e-kirjade töötlemisest.",ogImage:"/og-article-1.jpg",content:[{type:"paragraph",text:'See on esimene artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise rakendamisest.'},{type:"paragraph",text:'„Robotid võtavad töö ära!" „AI kaotab töökohti!" „Iga kolmas töökoht kaob kümne aasta jooksul!" Selliseid pealkirju näeb iga päev ja enamik neist on liialdus. Aga mitte kõik. Mõned ametid tõesti kaovad — mitte tulevikus, vaid praegu, ja ma näen seda oma klientide juures iga päev.'},{type:"paragraph",text:"Selles artiklis räägin ühest sellisest tegevusest, mis on juba kadumas: müügitellimuste sisestamine."},{type:"heading",text:"Sada rida, joonlaud ja lootus, et keegi vahepeal ei sega"},{type:"paragraph",text:"Eelmisel aastal nõustasin ühte viiekümne töötajaga hulgimüügiettevõtet. Müügiprotsessi kaardistamisel küsisin müügispetsialistilt, kuidas uued tellimused ettevõttesse jõuavad."},{type:"quote",text:'„Umbes 40% tuleb EDI kaudu — need lähevad automaatselt süsteemi. Aga 60% tuleb e-mailiga. PDF-id, Exceli failid, vahel lihtsalt vaba tekst."'},{type:"paragraph",text:"Küsisin, kui lihtne on neid töödelda."},{type:"quote",text:'„Lihtne? Mõnes tellimuses on sada rida. Iga rida tuleb käsitsi majandustarkvarasse kopeerida. Ja kliendid kasutavad oma nimetusi — mitte meie artiklikoode. Iga toote puhul pean otsima, mis meie kataloogis sellele vastab."'},{type:"paragraph",text:"Küsisin, mis juhtub, kui keegi vahepeal segab."},{type:"quote",text:'„Siis ongi häda. Võtan joonlaua ja hakkan kontrollima, mis rea peal ma pooleli jäin. Ja ikkagi juhtub, et mõni rida jäÃ
178¤b vahele või läheb valesti. Siis heliseb klient, et sai vale kauba. Kreeditarve, tagastus, uus saatmine — kõik selle pärast, et ma kopeerisin ühe numbri valesti."'},{type:"paragraph",text:"See pilt on mulle tuttav kümnetes ettevõtetes. Inimene, kelle tegelik töö on müük, kulutab pool päevast sellele, et kanda numbreid ühest kohast teise. Joonlaud käes, et rida kaotsi ei läheks."},{type:"heading",text:"Kuidas AI müügitellimused üle võttis"},{type:"paragraph",text:"Soovitasin AI-põhist tarkvaramoodulit, mis on Eesti turul valmistarkvarana saadaval — nullist ei pidanud midagi arendama. Moodul loeb e-kirja manusest — PDF, Excel või vaba tekst — välja tooted, kogused ja kliendi andmed."},{type:"paragraph",text:'Kõige keerulisem samm on kliendi nimetuste tõlkimine ettevõtte artiklikoodideks. Kui klient kirjutab tellimusse „M6x20 DIN 933 tsink", peab süsteem leidma, milline tooteartikkel ettevõtte kataloogis sellele vastab. Just see koht, kus müügispetsialist varem joonlauaga ridu jälgis, käib nüüd tooteinfoandmebaasi (PIM) põhjal automaatselt.'},{type:"paragraph",text:"Tehisaru koostab müügitellimuse ja sisestab selle majandustarkvarasse. Müügispetsialist vaatab üle ja kinnitab. Ise ta enam ei trüki — otsustamine on endiselt tema käes. Vigu tuleb ette murdosa võrreldes varasemaga, klient saab kinnituse kiiremini, ja müügispetsialist tegeleb nüüd ka päriselt müügiga."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Andmete ümbertrükkimine ei ole kunagi olnud kellegi unistuste töö, aga paljudes ettevõtetes teeb keegi seda tänaseni — tellimuste, arvete, tootelehtede või kliendiandmetega. [Digitaliseerimise Teekaartide](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel näen seda mustrit kordumas: kvalifitseeritud inimene kulutab pool päeva tööle, mida valmislahendus teeks minutitega."},{type:"paragraph",text:"Mõelge oma ettevõttele: kes teie meeskonnas trükib andmeid ümber selle asemel, et teha oma tegelikku tööd?"},{type:"paragraph",text:`Olga LuÅ¡tÅ¡ik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
179Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:2,slug:"miks-on-teie-epoes-vahem-tooteid",title:"Miks on teie e-poes vähem tooteid kui peaks?",excerpt:"Tehisaru automatiseeris e-poe tooteandmete sisestamise — kategoriseerimine, kirjelduste genereerimine ja mitmekeelne tõlge toimuvad nüüd automaatselt. Mainitud lahendused: PIM, AI-põhine tarkvaramoodul.",date:"2025",tag:"E-kaubandus",readTime:"6 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/05/04/miks-on-teie-e-poes-vahem-tooteid-kui-peaks-kasitoo-naen-seda-mustrit-kordumas"},seoTitle:"AI automatiseerib e-poe tooteandmed | Digiwise",seoDescription:"Kuidas tehisaru automatiseerib e-poe tooteandmete sisestamise — kategoriseerimine, kirjeldused ja mitmekeelne tõlge. Praktiline näide Eesti kaubandusettevõttest.",ogImage:"/og-article-2.jpg",content:[{type:"paragraph",text:"See on artikkel sarjast „Nutikas Eesti ettevõte“, kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise rakendamisest."},{type:"paragraph",text:"Eelmises artiklis kirjutasin müügitellimuste sisestamisest — tegevusest, mida enam käsitsi tegema ei pea. Seekord räägin teisest sellisest tegevusest: tooteandmete sisestamine e-poodi ja majandustarkvarasse."},{type:"heading",text:"„See on lihtsalt nõme copy-paste“"},{type:"paragraph",text:"Sel aastal nõustasin ühte Eesti kaubandusettevõtet, kes müüb oma e-poe kaudu tootmisseadmeid ja -tarvikuid. Sortiment on lai ja uusi tooteid lisandub pidevalt. Protsesside kaardistamisel küsisin ostujuhilt, kuidas e-poodi uue toote lisamine toimub."},{type:"quote",text:"„Tarnija saadab tooteinfo — vahel Wordis, vahel PowerPointis, vahel on see lihtsalt tarnija kodulehel. Sealt tuleb hakata õigeid lõike otsima ja ümber kopeerima.“"},{type:"paragraph",text:"Küsisin, mis selle juures kõige rohkem aega võtab."},{type:"quote",text:"„Kategooriad. Majandustarkvaras on kategooriate puu ja iga toote puhul pean meenutama, kuhu see täpselt läheb. Siis tootekirjeldused — pealkiri, lühikirjeldus, pikk kirjeldus, märksõnad. Ja kuna e-pood on mitmekeelne, tuleb kogu sama tekst panna ChatGPT-sse, et tõlked teha. Ühe toote peale võib minna tund aega.“"},{type:"paragraph",text:"Küsisin, kas kõik uued tooted jõuavad e-poodi üles."},{type:"quote",text:"„Ausalt öeldes — ei. Mõne toote puhul olen lihtsalt loobunud. Töömaht on nii suur, et otsustan ise, et äkki seda toodet kliendid niikuinii ei osta. Aga tegelikult ma ju ei tea seda.“"},{type:"paragraph",text:"See detail jäi mulle kõrva. Otsuse taga ei olnud äriline analüüs, vaid see, et käsitsi sisestamiseks ei jätkunud aega."},{type:"heading",text:"Kuidas AI tooteandmete sisestamise üle võttis"},{type:"paragraph",text:"Soovitasin AI-põhist tarkvaramoodulit, mis on Eesti turul valmistarkvarana saadaval. Moodul loeb tarnija materjalidest tooteinfo välja, olgu allikaks PDF, Wordi fail või veebileht. Tehisaru määrab tootele õiged kategooriad ja tooteinfoandmebaasi (PIM) klassifikaatorid, koostab tootekirjelduse — pealkirja, lühi- ja pika kirjelduse ning SEO-märksõnad — ja tõlgib kogu sisu kõikidesse vajalikesse keeltesse."},{type:"paragraph",text:"Ostujuht vaatab tulemuse üle ja kinnitab. Tema roll muutus sisestajast kvaliteedikontrollijaks — ta hindab, kas tehisaru on toote õigesti kategoriseerinud ja kirjelduse mõistlikult koostanud. Aga ise ta enam ei kopeeri ega tõlgi."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Tooteinfo kvaliteet paranes — tehisaru kategoriseerib järjepidevamalt kui inimene, sest masin ei tee erinevaid valikuid olenevalt sellest, kas on esmaspäeva hommik või reede õhtu. Uued tooted jõuavad e-poodi tundide, mitte päevadega. Ja need tooted, millest ostujuht varem loobus, on nüüd e-poes üleval ja saavad müügivõimaluse."},{type:"paragraph",text:"[Digitaliseerimise Teekaarte](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostades näen seda mustrit kordumas. Mõelge oma ettevõttele: kui palju uusi tooteid, hindu või tarnijaandmeid jääb teie süsteemidest puudu lihtsalt sellepärast, et keegi ei jõudnud neid käsitsi sisse trükkida?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuseleõtul.
180Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:3,slug:"miks-teie-raamatupidaja-veel-arveid-prindib",title:"Mida teeks teie raamatupidaja, kui ei peaks arveid sisestama?",excerpt:"Arvete digitaalse ringluse kasutuseleõtt muutis raamatupidaja igapäevatöö täielikult. Mainitud lahendused: Telema eFlow, CostPocket, Finbyte, Odoo, Erply, Directo.",date:"2025",tag:"Raamatupidamine",readTime:"6 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/05/11/alati-on-nii-tehtud-mida-teeks-teie-raamatupidaja-kui-ei-peaks-arveid-sisestama"},seoTitle:"Arvete automatiseerimine raamatupidamises | Digiwise",seoDescription:"Arvete digitaalne ringlus muutis raamatupidaja igapäevatööd. Praktiline näide: Telema eFlow, CostPocket, Finbyte, Odoo, Erply, Directo.",content:[{type:"paragraph",text:"See on artikkel sarjast „Nutikas Eesti ettevõte“, kus toon Eesti ettevõtete praktilisi näiteid AI ja digitaliseerimise raken
180damisest."},{type:"paragraph",text:"Eelmistes artiklites kirjutasin müügitellimuste ja tooteandmete sisestamisest. Seekord räägin kolmandast tegevusest, mida ei peaks enam keegi käsitsi tegema: arvete sisestamine raamatupidamistarkvarasse."},{type:"heading",text:"„Alati on niimoodi tehtud“"},{type:"paragraph",text:"[Digitaliseerimise Teekaartide](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel olen ostu- ja kuluarvete sisestamise protsessi kaardistanud kümnetes ettevõtetes — hotellides, tootmisettevõtetes, teenusepakkujates. Pilt on üllatavalt sarnane."},{type:"paragraph",text:"Ostuarve saabub e-postiga PDF-ina. Raamatupidaja prindib selle välja ja hakkab sisestama: tarnija nimi, arve number, kuupäev, maksetähtaeg, kõik arveread eraldi (toode, kogus, ühikuhind, summa, käibemaks). Ühel arvel võib olla kümmekond rida. Päevas võib tulla kümneid arveid."},{type:"paragraph",text:"Kui küsin, miks protsess selline on, saan peaaegu alati sama vastuse: „Alati on niimoodi tehtud.“ Vahel on põhjendus konkreetsem. Juhile meeldib paberile allkirja panna. Arveid tuleb ju kaustikus seitse aastat säilitada. Raamatupidaja tunneb end kindlamalt, kui näeb arvet prinditud kujul."},{type:"paragraph",text:"Aga seadus on ammu muutunud — digitaalne arve on juriidiliselt samaväärne paberiga, digitaalallkiri kehtib ja kohustuslik säilitamine ei nõua füüsilist kaustikut. Harjumus hoiab protsessi elus, mitte vajadus."},{type:"paragraph",text:"Samal ajal kulutab raamatupidaja, kelle kompetents lubaks teha hoopis kõrgema väärtusega tööd (rahavoogude jälgimine ja optimeerimine, klientide võlgnevuste haldamine), kolmandiku oma päevast andmesisestamisele."},{type:"heading",text:"Lahendus, mis on juba turul olemas"},{type:"paragraph",text:"Arvete digitaliseerimine on koht, kus ei ole vaja midagi nullist arendada. Olemasolevad teenused kasutavad tehisaru, et lugeda PDF-arvelt välja kõik olulised andmed: tarnija, summad, käibemaks, maksetähtaeg, arveread koos toodete ja kogustega."},{type:"paragraph",text:"Praktikas toimib see nii: PDF-ina saabunud arve suunatakse selleks ette nähtud postkasti, digiteerimisteenus töötleb selle ja loob mustandkande. Raamatupidaja vaatab üle, parandab vajadusel ja kinnitab. Umbes 99% andmetest loetakse automaatselt sisse — käsitsi sisestamist praktiliselt ei ole."},{type:"paragraph",text:"Eestis on mitu hästi toimivat lahendust: Telema eFlow, CostPocket, Finbyte jt. Mõnedes majandustarkvarades, nagu Odoo, Erply või Directo, on arvete digiteerimine juba sisse ehitatud."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Raamatupidaja ei trüki enam arveid ümber — tema roll muutub sisestajast kontrollijaks. Ta vaatab üle, kas süsteem on arve õigesti tõlgendanud, ja kinnitab kande. Vigu tuleb ette murdosa võrreldes varasemaga, arved jõuavad süsteemi kiiremini ja raamatupidaja saab tegeleda sellega, mille jaoks ta tegelikult kvalifitseeritud on."},{type:"paragraph",text:"Arvete digitaliseerimine on olnud võimalik juba aastaid. Ja ometi näen endiselt ettevõtteid, kus raamatupidaja prindib arveid välja ja sisestab neid käsitsi. Lahendus on olemas. Lihtsalt keegi pole sellele protsessile otsa vaadanud ja küsinud: miks me seda ikka veel nii teeme?"},{type:"paragraph",text:"Mõelge oma ettevõttele: kas teie raamatupidaja prindib arveid välja, või on tema päev juba vabastatud andmesisestusest?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuseleõtul.
181Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:4,slug:"muugiesindaja-gps-ja-tuhi-riiul",title:"Müügiesindaja Tallinna ummikus",excerpt:"Lõuna-Eesti toidutootja asendas müügiesindaja füüsilised ringreisid kaupluste riiulite juurde reaalajas laojäägi ülevaatega. Mainitud lahendus: Telema Supplier Visibility.",date:"2025",tag:"Laohaldus",readTime:"7 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/06/08/arinoustaja-ettevotetel-puudub-tihti-ulevaade-milliseid-valmis-digilahendusi-turg-pakub"},seoTitle:"Müügiesindaja Tallinna ummikus | Digiwise",seoDescription:"Kuidas Lõuna-Eesti toidutootja asendas müügiesindaja autosõidud reaalajas laojäägi ülevaatega. Praktiline näide Telema Supplier Visibility teenusest.",content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise raken
181damisest.'},{type:"paragraph",text:"Eelmistes artiklites kirjutasin müügitellimuste, tooteandmete ja arvete sisestamisest. Seekord räägin müügiesindajast, kelle tööpäev kulus autoga mööda Eestit sõitmisele, et kontrollida, kas tootja kaup on poes riiulis kohal."},{type:"heading",text:'„Muidu ma ju ei tea, kas kaup on kohal"'},{type:"paragraph",text:"Üks meie klientidest on Lõuna-Eesti toidutootja, kellel on lepingud mitme Eesti suurima jaekettiga. Riiulikohad on kokku lepitud ja nende eest tuleb maksta. Aga kas kaup on tegelikult riiulis?"},{type:"paragraph",text:"Seda käis kontrollimas täiskohaga müügiesindaja Kätlin. Küsisin temalt, kuidas tema tööpäev välja näeb."},{type:"quote",text:'„Hommikul vaatan marsruudi üle — millised kauplused täna läbi sõita. Mõni päev on Tartu ja Lõuna-Eesti, mõni päev Tallinn ja Harjumaa. Sõidan kohale, vaatan riiulid üle, panen kirja, mis on kohal ja mis puudu."'},{type:"paragraph",text:"Küsisin, miks ta ise peab kohale sõitma."},{type:"quote",text:'„Muidu ma ju ei tea, kas kaup on kohal. Kauplused peaksid ise jälgima ja ostutellimusi saatma, aga praktikas ei telli nad alati õigel ajal. Riiul saab tühjaks ja meie kaotame müügi."'},{type:"paragraph",text:"Uurin, kas talle meeldib selline töö."},{type:"quote",text:'„Autoga sõita mulle tegelikult meeldib. Aga Tallinna hommikuti seismine ajab hulluks. Ja ausalt öelda — see on ju lihtsalt riiuli kontrollimine. Ma sõidan tund aega, et kahe minutiga riiulile otsa vaadata."'},{type:"paragraph",text:"Müügiesindaja palk, auto, kütus, päevarahad. Harjumuspärane kulu, mida keegi kahtluse alla ei seadnud. Nii on alati tehtud."},{type:"heading",text:"Tühi riiul on kallis probleem"},{type:"paragraph",text:"Tootja jaoks on tühi riiul selge kahju: riiulikoha kulu jookseb, aga käivet ei tule. Klient, kes oma toodet ei leia, valib konkurendi oma."},{type:"paragraph",text:"Mul on tühja riiuliga ka isiklik kogemus. Minu lemmikleib on Lõunapagari rukkileib. Üle poole kordadest, kui lähen oma koduselverisse seda leiba ostma, on riiul tühi. Ostan midagi muud. Aga Lõunapagar kaotab müügi. Korrutage kaotatud müük sajaga — nii palju kliente päevas, kes tulevad, ei leia oma toodet ja valivad konkurendi oma."},{type:"heading",text:"Reaalajas ülevaade autosõidu asemel"},{type:"paragraph",text:"Protsesside kaardistamisel selgus, et kogu ringi sõitmise taga oli üks konkreetne probleem: tootjal puudus ülevaade kaupluste laoseisust."},{type:"paragraph",text:"Pakkusime lahenduseks Telema Supplier Visibility teenuse, mis annab tootjale reaalajas ülevaate iga kaupluse laojäägist tooteartikli tasemel. Tootja näeb oma kontori arvutist, millises kaupluses üle Eesti on kaupa piisavalt, kus hakkab otsa saama ja kus on riiul juba tühi. Lisaks on näha müügitrend, mis aitab planeerida lisakauba poodi saatmist enne, kui riiul tühjaks jõuab saada."},{type:"heading",text:"Vastus oli juba turul olemas"},{type:"paragraph",text:"Eelmistes artiklites asendasid käsitöö AI-põhised lahendused. Siin oli vastus lihtsam — olemasolev digiteenus, millest ettevõte lihtsalt ei teadnud."},{type:"paragraph",text:"Mõnikord on lahendus lihtsam kui AI: andmete kättesaadavaks tegemine, protsessimuudatus või juba turul olev teenus. [Digitaliseerimise Teekaartide](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel näen sageli, et ettevõttel puudub ülevaade, milliseid valmislahendusi turg juba pakub."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Paljudes ettevõtetes teeb keegi tööd, mida ta on alati teinud. Lihtsalt sellepärast, et keegi pole küsinud, kas seda tööd on üldse vaja niimoodi teha."},{type:"paragraph",text:"Kätlin ei kaotanud oma tööd. Ta sai lõpuks hakata tegelema klientide ja müügiga, selle asemel et sõita autoga mööda Eestit riiulitele otsa vaatama."},{type:"paragraph",text:"Mõelge oma ettevõttele: kes teie meeskonnas sõidab, kontrollib või jälgib midagi, mida saaks teha üks korralik andmevoog?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
182Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:5,slug:"muugiprotsess-mis-elab-e-mailides",title:"Mis juhtub, kui teie parim müügimees jääb haigeks?",excerpt:"Olemasoleva CRM-tarkvara päriselt kasutuselevõtt lahendas müügiosakonna läbipaistvuse probleemi ilma lisainvesteeringuteta. Mainitud lahendused: Pipedrive, Wispr Flow, AI transkriptsioon.",date:"2025",tag:"Müük & CRM",readTime:"8 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/06/19/arinoustaja-ettevotted-maksavad-tarkvara-eest-ent-kasutavad-murdosa-selle-voimalustest"},seoTitle:"Kui parim müügimees jääb haigeks | Digiwise",seoDescription:"Kuidas Eesti teenusettevõte võttis olemasoleva CRM-i (Pipedrive) päriselt kasutusele ilma lisainvesteeringuteta. Müügiprotsessi läbipaistvus AI ja häälsisestusega.",content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise raken
182damisest.'},{type:"paragraph",text:"Üks levinumaid arvamusi, mida ettevõtete juhtidelt kuulen: digitaliseerimine on kallis. Uued tarkvarad, arendusprojektid, juurutamine. Kõik see nõuab suurt investeeringut, mida praegu endale lubada ei saa. Aga praktikas selgub sageli hoopis vastupidine."},{type:"heading",text:'„Ma ei tea, kes mu meeskonnas tegelikult müüb"'},{type:"paragraph",text:"Ühe Lõuna-Eesti teenusettevõtte müügiprotsesside kaardistamisel küsisin müügiosakonna juhilt, kuidas tema viieliikmeline meeskond müüki haldab."},{type:"quote",text:'„Igaüks ajab oma rida. Kliendid, pakkumised, kokkulepped on inimeste meilboksides. Kui keegi on haige või puhkusel ja klient helistab, siis keegi teine ei saa teda aidata. Me lihtsalt ei tea, mis seis selle kliendiga on."'},{type:"paragraph",text:"Küsisin, kuidas ta meeskonna tulemusi hindab."},{type:"quote",text:'„See ongi mu suurim peavalu. Juhtkond surub müügikäibe kasvu ja kulude kokkuhoidu peale, aga mul ei ole head infot, et otsustada. Mõni spetsialist on väga hea jutuga, klientidele meeldib temaga suhelda. Aga kui vaatan tulemusi, siis numbrid ei klapi. Teine on vaiksem, aga toob tehingud lõpuni. Statistikat pole kuskilt kokku koguda, sest igaühel on oma meetod ja oma koht, kuhu ta asjad paneb."'},{type:"paragraph",text:"Kaardistasime müügiprotsessid ja pakkusime igale kitsaskohale lahenduse koos konkreetse tarkvaraga. Tulemus oli üllatav: vajalik tarkvara oli ettevõttes juba olemas. Seda kasutati küll, aga ebaühtlaselt ja murdosa võimalustest."},{type:"heading",text:"Null eurot, viis tulemust"},{type:"paragraph",text:"Ettevõttel oli Pipedrive, Eesti päritolu CRM-tarkvara, mille eest maksti viie kasutaja peale ligikaudu 120 eurot kuus. Osa müügispetsialiste sisestas sinna aeg-ajalt kliendiandmeid ja kontakte. Aga kuna kõik seda ei teinud ja e-kirju Pipedrive'ist välja ei saadetud, jooksis tegelik müügitöö endiselt läbi meilibokside."},{type:"paragraph",text:"Lahendus ei olnud uus tarkvara, vaid olemasoleva tööle panemine. Pipedrive võeti päriselt kasutusele kontaktide hoidla asemel müügiprotsessi juhtimise töövahendina."},{type:"paragraph",text:"Konkreetselt tegime järgmist:"},{type:"paragraph",text:"1. Defineerisime müügitsükli staatused. Esmakontakt, pakkumine saadetud, läbirääkimised, juristi ülevaatus, leping sõlmitud. Iga müügitehing liigub nende staatuste vahel ja annab kogu meeskonnale pildi, mis faasis iga klient parasjagu on."},{type:"paragraph",text:"2. Viisime kogu e-kirjavahetuse Pipedrive'i sisse. Müügispetsialistid saadavad ja saavad kirju otse tehingu juurest, nii jääb suhtlusajalugu nähtavaks kogu meeskonnale."},{type:"paragraph",text:'3. Seadistasime automaatsed töövood. Kui müügispetsialist märgib tehingu staatuseks „juristi ülevaatus", saab jurist automaatse teate. Kui kliendiga tuleb kolme kuu pärast uuesti ühendust võtta, loob Pipedrive meeldetuletuse.'},{type:"paragraph",text:"4. Lisasime liidestuse äriregistriga. Uue kliendi lisamisel piisab registrikoodist ja ettevõtte andmed tulevad automaatselt Pipedrive'i."},{type:"paragraph",text:"5. Võtsime kasutusele häälsisestuse. Müügispetsialist, kes tuleb kliendikohtumiselt ja istub autosse, dikteerib oma märkmed häälsisestuse tarkvara (näiteks Wispr Flow) kaudu otse Pipedrive'i tehingu juurde. Virtuaalkoosolekute puhul teeb tehisaru transkriptsiooni ja kokkuvõtte automaatselt: mis räägiti, mis otsustati, mis on järgmised sammud."},{type:"paragraph",text:"Müügispetsialistid teevad endiselt sama tööd. Kohtuvad klientidega, teevad pakkumisi, sõlmivad lepinguid. Pool aastat hiljem selgus andmete põhjal, et ühe spetsialisti tulemused jäid teistest oluliselt maha. Ilma andmeteta poleks seda otsust osatud teha."},{type:"paragraph",text:"Kogu muudatuse hind: null eurot lisainvesteeringut. Pipedrive'i kuutasu jooksis niikuinii."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Digitaliseerimine ei tähenda alati uue tarkvara ostmist. Tihti maksab ettevõte juba praegu tarkvara eest, mida kasutatakse murdosa võimalustest. [Digitaliseerimise Teekaartide](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel näen seda sageli: tarkvara on olemas, aga keegi pole sellest tervikpilti kokku pannud ega protsessi läbi mõelnud."},{type:"paragraph",text:"Mõelge oma ettevõttele: kui teie parim müügimees homme haigeks jääb, kas keegi teine teaks, mis seis tema klientidega on?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
183Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:6,slug:"copy-paste-maksis-personalijuhile-tookoha",title:"Kuidas üks copy-paste maksis personalijuhile töökoha",excerpt:"Restoranis vahetamata jäänud kontonumber töölepingus maksis personalijuhile töökoha. Mainitud lahendused: Wemply, Persona, Yester, Avokaado, Agrello, Google Forms + Apps Script.",date:"2025",tag:"Personal & HR",readTime:"6 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",seoTitle:"Copy-paste maksis personalijuhile töökoha | Digiwise",seoDescription:"Töölepingute vormistamine Wordis maksis vale kontonumbri tõttu personalijuhile töökoha. Lahendused: Wemply, Persona, Yester, Avokaado, Agrello.",originalSource:{url:"https://www.aritehnoloogia.ee/uudised/2026/07/02/arinoustaja-kuidas-uks-copy-paste-maksis-personalijuhile-tookoha",label:"Äritehnoloogia ajakirjas"},content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise raken
183damisest.'},{type:"paragraph",text:"Sarja eelmised lood näitasid, kuidas käsitööd saab automatiseerida. Seekord räägin töölepingute vormistamisest ja sellest, kuidas käsitsi tehtud viga maksis personalijuhile töökoha."},{type:"heading",text:'„Pidime personalijuhiga koostöö lõpetama"'},{type:"paragraph",text:"Üks meie klientidest on restoran, kus suvel töötab korraga kuni 150 inimest. Tegemist on hooajalise tööga: talvel on tiim väike, suvel aga vahetub palju töötajaid ja kogu suve jooksul sõlmitakse sadu uusi töölepinguid."},{type:"paragraph",text:"[Digitaliseerimise Teekaardi](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel küsisin tegevjuhilt, kuidas töölepinguid vormistatakse."},{type:"quote",text:'„Personalijuht teeb neid Wordis. Õigemini, tegi. Me pidime eelmise personalijuhiga koostöö lõpetama just ühe töölepingu pärast. Aga protsess on selline: töötaja saadab e-postiga oma andmed (nimi, isikukood, kontonumber, ametinimetus, palk, koormus). Personalijuht avab eelmise töötaja Wordi-faili, muudab andmed ära ja salvestab uue lepinguna. Siis prinditakse välja, võetakse allkirjad, viiakse kaustikusse ja saadetakse raamatupidamisele palganumbri ja kontonumbri sisestamiseks raamatupidamistarkvarasse."'},{type:"paragraph",text:"Küsisin, kas nad on selle protsessiga rahul."},{type:"quote",text:'„Ei ole tegelikult üldse rahul, sest sellega juhtuvad igasugused vead. Selle eelmise personalijuhi lugu ongi see. Me saime kuu lõpus aru, et ühele inimesele oli laekunud kaks palka. Hakkasime uurima ja selgus, et tema töölepingusse oli jäänud eelmise töötaja kontonumber. Personalijuht oli kasutanud eelmise lepingu malli ja kontonumber jäi vahetamata. Üks inimene sai kaks palka, teine ei saanud midagi. Suur tüli oli majas, töötajad olid pahased. Pidime personalijuhiga ko
183ostöö lõpetama."'},{type:"paragraph",text:"Tööleping on mitmeleheküljeline dokument. Andmed on hajutatud erinevatesse peatükkidesse, mõni andmeväli kordub kahes kohas. Iga uue töötaja jaoks tuleb vahetada kümmekond andmevälja, mõni mitmes kohas. Kui suvel tuleb 150 uut töötajat, on see tuhandeid copy-paste'i operatsioone Wordis."},{type:"heading",text:"Lahendus, mis on juba turul olemas"},{type:"paragraph",text:"Töölepingute vormistamine on koht, kus ei ole vaja midagi nullist arendada. Eesti turul on mitu personalihaldustarkvara, mis katavad kogu töötaja teekonna värbamisest kuni puhkuste ja töölepingu muudatusteni: Wemply, Persona, Yester. Töötaja sisestab oma andmed üks kord, süsteem täidab kogu lepingu automaatselt, süsteemis saab kohe anda ka digiallkirja ja andmed liiguvad samaaegselt raamatupidamissüsteemi."},{type:"paragraph",text:"Kui personalitarkvara on liiga suur samm, on olemas ka lihtsamad lahendused, mis tegelevad ainult lepingute vormistamisega. Avokaado ja Agrello on Eestis tuntud näited. Mõlemad sobivad ka teist tüüpi lepingute jaoks (käsundus-, koostöö-, üürilepingud) ja eriti hästi just olemasolevate lepingute pikendamiseks."},{type:"paragraph",text:"Ühe spordiklubi tegevjuht rääkis mulle, et tema lauale satub kord aastas üle saja treenerilepingu pikendamiseks. Ta avab iga lepingu Wordis, muudab kuupäevad ja palganumbri ja salvestab uue versiooni. Apsakaid ei tulnud, aga päevi kulus mitu. Avokaado ja Agrello-tüüpi tööriistadega saab kogu protsessi automatiseerida nii, et tegevjuht annab korraga heakskiidu sajale lepingule."},{type:"paragraph",text:"Lihtsamatel juhtudel on lahendus veelgi käepärasem. Töötaja täidab andmed Google Formsi, andmed jõuavad automaatselt Google Sheetsi ja Google Apps Script genereerib nende põhjal Google Docsi lepingu."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Töölepingu vorm ei muutu igal aastal. Andmeväljad, mida tuleb täita, on samad. Just sellisest tööst tasub ettevõttel vabaks saada. Korduv käsitöö on vigadele aldis ja vigade hind võib olla väga kõrge. Restorani juhtumis maksis vale kontonumber personalijuhile töökoha."},{type:"paragraph",text:"Mõelge oma ettevõttele: kui palju töölepinguid, käsunduslepinguid või lepingu pikendusi vormistatakse teil aastas käsitsi? Ja mis juhtub siis, kui keegi unustab ühe lahtri vahetada?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
184Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:7,slug:"50-dokumenti-mida-keegi-labi-ei-loe",title:"50 dokumenti, mida keegi läbi ei loe",excerpt:"Tegevjuht allkirjastas hommikuti 50 dokumenti paari minutiga — ega neid läbi lugenud. Samal ajal ootas terve meeskond tema allkirja. Kuidas kaardistada dokumendivood ja vabastada pudelikael.",date:"2025",tag:"Juhtimine",readTime:"5 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",seoTitle:"50 dokumenti, mida keegi läbi ei loe | Nutikas Eesti Ettevõte",seoDescription:"Kuidas ühe ettevõtte tegevjuhi hommikune allkirjastamisrutiin osutus pudelikaelaks tervele meeskonnale — ja mida saab kinnitusringidega ette võtta.",originalSource:{url:"https://www.aritehnoloogia.ee/uudised/2026/07/10/arinoustaja-50-dokumenti-mida-keegi-labi-ei-loe",label:"Äritehnoloogia ajakirjas"},content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise rakendamisest.'},{type:"paragraph",text:"Sarja eelmised lood rääkisid käsitööst ja ebaefektiivsetest protsessidest. Seekord räägin probleemist, mida ettevõtte juht ise üldse probleemiks ei pidanud."},{type:"heading",text:'„Mõned minutid iga hommik"'},{type:"paragraph",text:"[Digitaliseerimise Teekaardi](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/) koostamisel palusin ühe ettevõtte tegevjuhil kirjeldada oma tavalist tööpäeva algust."},{type:"quote",text:'„Tulen hommikul kontorisse, avan arvuti ja allkirjastan dokumendid. Arved, lepingud, pakkumised, personalidokumendid. Kõik, mis on eelmise päeva jooksul kogunenud."'},{type:"paragraph",text:"Küsisin, kui palju dokumente iga päev allkirjastada tuleb ja kui palju selleks aega kulub."},{type:"quote",text:'„Sõltub päevast. Mõnikord 20, mõnikord 50. Ega ma neid kõiki läbi ei loe. Vaatan pealkirja, kes saatis, ja panen allkirja. Mõne minutiga olen valmis."'},{type:"paragraph",text:"Tegevjuhi jaoks oli tegu rutiiniga, mis ei väärinud arutamist. Paar minutit hommikul, mis seal ikka."},{type:"heading",text:"Pudelikael, mida juht ise ei näinud"},{type:"paragraph",text:"Kui rääkisin ettevõtte teiste töötajatega, avane
184s hoopis teine pilt. Terve rida inimesi ootas iga päev ühte ja sama asja: tegevjuhi allkirja."},{type:"paragraph",text:"Personalijuht ei saanud välja saata tööpakkumist kandidaadile, sest pakkumine ootas tegevjuhi allkirja. Müügispetsialist ei saanud kliendile hinnapakkumist saata, sest ka sinna oli vaja kinnitust. Raamatupidaja ei saanud maksta kuluarveid, sest igas kinnitusringis oli tegevjuht sees. Sama kehtis müügiarvete kohta."},{type:"paragraph",text:"Pooleliolev töö kuhjus igal õhtul üle kogu ettevõtte. Kui juht oli reisil, puhkusel või hõivatud, võisid dokumendid oodata mitu päeva."},{type:"heading",text:"Vähem allkirju, rohkem usaldust"},{type:"paragraph",text:"Alustasime sellest, et kaardistasime kõik dokumenditüübid ja küsisime iga ühe puhul: kas tegevjuhi allkiri on siin tegelikult vajalik? Paljudel juhtudel piisas osakonnajuhi kinnitusest."},{type:"paragraph",text:"Kuluarved teatud summani (näiteks kuni 500 eurot) ei vaja tegevjuhi kinnitust, eriti kui tegemist on korduva teenusepakkujaga. Osakonnajuht, kes arve tellis, kinnitab ise. Keerulisemate reeglite jaoks soovitasime kasutusele võtta reeglitepõhise kuluarvete kinnitusringi tarkvara (nt Telema eFlow, FitekIN jt)."},{type:"paragraph",text:"Müügipakkumised standardhindadega saab välja saata müügijuhi kinnitusega. Tööpakkumised standardpalgavahemikus ei vaja tegevjuhi allkirja — personalijuht otsustab ise."},{type:"paragraph",text:'Paljud dokumendid ei vaja üldse digiallkirja. Piisab kinnitusest infosüsteemis: „olen tutvunud" või „kinnitan". Näiteks SharePointis saab dokumendi kinnitada otse süsteemis, ilma et seda oleks vaja kellelegi e-postiga saata ja allkirjastamist oodata.'},{type:"paragraph",text:"Tegevjuht allkirjastab nüüd ainult neid dokumente, mis tegelikult vajavad tema otsust. 50 dokumendist hommikul jäi alles alla kümne."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Ettevõtte protsesse kaardistades avaneb kogu pilt korraga. Ühe inimese vaatenurgast võtab mõni tegevus lihtsalt paar minutit hommikul. Teiste vaates võib sama tegevus olla suureks piduriks, mis hoiab kinni terve meeskonna tööd."},{type:"paragraph",text:"Mõelge oma ettevõttele: kas mõni teie igapäevane rutiin võib kellegi teise jaoks olla pudelikael?"},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
185Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:8,slug:"tehisarust-kolleeg-annika",title:"Meil on nüüd tehisarust kolleeg. Tema nimi on Annika.",excerpt:"Sisustuskaupade ettevõttes seisis ChatGPT ligipääs kasutamata. Kui AI-le anti nimi, foto, taust ja ametinimetus, muutus ta meeskonna jaoks kolleegiks — ja postitused hakkasid ilmuma iga nädal.",date:"2026",tag:"Personal & HR",readTime:"5 min",author:"Olga LuÅ¡tÅ¡ik, Digiwise OÜ vanemkonsultant",seoTitle:"Meil on nüüd tehisarust kolleeg. Tema nimi on Annika. | Nutikas Eesti Ettevõte",seoDescription:'Kuidas Eesti sisustuskaupade ettevõte „palkas" tehisaru turundusspetsialistiks — andis talle nime Annika, foto, tausta ja ametinimetuse — ja miks meeskond hakkas AI-d päriselt kasutama.',originalSource:{url:"https://www.aritehnoloogia.ee/uudised/2026/07/21/arinoustaja-palkasime-uue-tehisarust-turundusspetsialistitema-nimi-on-annika",label:"Äritehnoloogia ajakirjas"},content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus toon kohalike ettevõtete praktilisi näiteid AI ja digitaliseerimise rakendamisest.'},{type:"paragraph",text:'Sarja eelmised lood on näidanud, kuidas AI ja muud digilahendused võtavad üle käsitöö, mida keegi tegelikult teha ei taha. Seekord räägin kuidas „võtta tööle" uue töötaja, kes ei ole inimene.'},{type:"heading",text:"Turundusspetsialisti polnud, aga turundustegevusi oli vaja teha"},{type:"paragraph",text:"Nõustasin hiljuti üht kahekümne töötajaga Eesti sisustuskaupade ettevõtet. Eraldi turundusjuhti tööl ei olnud, sotsiaalmeedia sisu valmis nii, kuidas parasjagu jõuti."},{type:"paragraph",text:"Küsisin tegevjuhilt, kuidas postitused praegu valmivad."},{type:"quote",text:'„Igaüks teeb midagi. Müügijuht teeb vahel pildi juurde ühe lause, mina toimetan õhtuti, kui aega jääb. Enamasti jääb tegemata. Vaatan tagantjärele, et terve kuu pole midagi postitatud, ja tunnen süümepiinu."'},{type:"paragraph",text:"Küsisin, kas nad on AI-d proovinud."},{type:"quote",text:'„Proovisime. Andsin kogu meeskonnale ChatGPT ligipääsu ja ütlesin, et kasutage postituste tegemiseks. Inimesed eriti vedu ei võtnud. Mõned töötajad ei teadnud, mida kirjutada. Teised ilmselt kartsid, et teevad midagi valesti. Ligipääs jäigi seisma, kasutasin peamiselt mina ise, aeg-ajalt."'},{type:"heading",text:"Kuidas tehisarust sai Annika"},{type:"paragraph",text:"Selle asemel, et rääkida meeskonnale AI-tööriistast või botist, tegime midagi lihtsamat. Palkasime tehisaru tööle ja andsime talle inimlaadse identiteedi."},{type:"paragraph",text:"1. Andsime AI-le nime ja valisime sobiva foto, seejärel kirjeldasime tema tausta: tema nimi on Annika, ta on 35-aastane, kasvatab kahte last ja teeb kaugtööd Hispaaniast. Annikal on kõrgharidus filoloogias ja ta on kirglik jalgpallisÃ
185µber."},{type:"paragraph",text:"2. Koolitasime Annikat. Rääkisime, kuidas meil asjad toimuvad, ja andsime läbi lugeda varasemad postitused ning tootekirjeldused, mille põhjal Annika ettevõtte ja meie tooted selgeks sai."},{type:"paragraph",text:'3. Muutsime suhtumist ja pöördumise viisi. Hakkasime Annikaga suhtlema nagu tegeliku kaugtöötajaga, mitte kui tööriistaga. Selle asemel, et avada ChatGPT ja alustada ülesannet „nullist", kirjutab müügijuht Annikale nii: „Annika, meile jõudis lattu uus toode, tee palun kolm postitusideed. Siin on kaks fotot sellest." Annika saadab tagasi kolm mustandit, millest valime välja ühe. Kuna Annikale meeldib jalgpall, lisab ta vastuse lõppu ka mõne jalgpalliuudise eilsete mängude kohta. Just sellised väiksed detailid panevad meeskonna tajuma Annikat päris kolleegina.'},{type:"paragraph",text:'Kui meeskond suhtub AI-sse kui kolleegi, kes lihtsalt töötab teiselt poolt ekraani, mitte kui robotisse, kes täidab mingit ülesannet, on koostöö tulemuslikum. Inimesed suhtuvad ülesandesse positiivsemalt, kui AI-l on inimlikud parameetrid: nimi, foto, jutustiil, taust. Mõned ettevõtted lähevad veel kaugemale ja lisavad organisatsioonistruktuuri joonisele ka AI-kolleegi, koos ametinimetuse ja alluvussuhtega. Annika sai ametinimetuseks „turundusspetsialist" ja ta allub müügijuhile.'},{type:"heading",text:"Mis muutus"},{type:"paragraph",text:"Kolme kuu pärast postitati sotsiaalmeediasse iga nädal, mitte enam juhuslikult. Sisu loomine ei olnud enam ühe inimese õlul, Annika teenuseid kasutas kogu müügimeeskond. Annika täitis rolli, mida ettevõttel varem eelarves polnudki, ja tegi seda tarkvara kuutasu eest, mitte palga ja tööjõumaksude eest."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Digitaliseerimise Teekaartide koostamisel näen üha sagedamini, et takistuseks pole tehnoloogia ise, vaid see, kuidas muutust meeskonnale esitletakse."},{type:"paragraph",text:"Tehnoloogia ise on tavaliselt korras. Probleem tekib suhtumises: töötajad ei tea, kuidas AI-ga suhelda, või kardavad, et see võtab nende töö üle. Nimi ja selge roll teevad AI-st kolleegi, kellelt on lihtne abi küsida."},{type:"paragraph",text:"Mõelge oma ettevõttele: kas teie meeskonnal on AI kasutamiseks ligipääs olemas, kuid seda ei kasuta?"},{type:"paragraph",text:`Olga LuÅ¡tÅ¡ik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
186Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:9,slug:"need-tuutud-esmatellijad",title:"Need tüütud esmatellijad",excerpt:"Väikesed esmatellijad tekitavad kõige rohkem tööd ja kõige vähem marginaali. AI-põhine e-posti assistent kogub puuduva info kliendilt ise kokku.",date:"2026",tag:"Müügitellimused",readTime:"4 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/08/12/arinoustaja-kui-vaiketellijad-ja-loputud-tapsustavad-e-kirjad-on-probleem-siis-siin-on-lahendus"},seoTitle:"Need tüütud esmatellijad | Nutikas Eesti Ettevõte",seoDescription:"Väiketellijad nõuavad lõputuid täpsustavaid e-kirju. AI-põhine e-posti assistent tuvastab uued tellimused, küsib puuduva info ja koostab vastuse mustandi.",content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus kirjeldan praktilisi näiteid AI ja digitaliseerimise rakendamisest.'},{type:"heading",text:"Väikesed tellijad ja lõputud täpsustavad e-kirjad"},{type:"paragraph",text:"Üks minu klientidest müüb meeneid ja reklaamkingitusi. Küsisin ettevõtte juhilt, milline kliendisegment on kõige kasumlikum."},{type:"quote",text:'„Kõige kasumlikum on püsikliendist suurettevõtte. Väikesed esmatellijad tekitavad aga meile kõige rohkem tööd. Nad ei oska täpselt sõnastada, mida nad tegelikult tahavad ja tellimuse täpsustamiseks tuleb vahetada mitmeid emaile. Marginaal on väike, aga tööd on palju. Sooviksin pigem tegeleda ainult suurte tellijatega. Plaanin väiketellijate teenindamisest üldse loobuda."'},{type:"paragraph",text:"Küsisin, kuidas on korraldatud tellimuse vastuvõtmine."},{type:"quote",text:'„Püsikliendid saadavad emaili oma konkreetse tellimusega – edasi on lihtne. Uutele klientidele on kodulehel lühike päringu vorm. Klient täidab ära ja mulle tuleb email. Siis kirjutan kliendile lisaküsimusi, täpsustan tellimust. Kuna tegelen selle äriga juba 5 aastat, siis tean kõiki küsimusi peast. Eelmisel kuul läksin puhkusele, mind asendas teine töötaja. Kui tagasi tulin, selgus, et paljudes vastuvõetud tellimustes oli olulist infot puudu. Selgus et mitu korda toodeti valesid tooteid või ei saanud tootmist üldse alustada. Ma vist ei olnud kõiki kriteeriumeid ja tingimusi ette piisavalt ära seletanud."'},{type:"paragraph",text:"Sarnast probleemi kirjeldas mulle ka teise ettevõtte juht, kes pakub puhastusteenust. Ka tema soovis keskenduda ainult suurtele klientidele. Väikesed kliendid, näiteks korteriühistud, edastavad esmapäringuga liialt vähe infot ja iga uue kliendi kaasamine nõuab olulist lisatööd, et välja selgitada kogu vajalik info pakkumise koostamiseks."},{type:"heading",text:"Vanad ja uued lahendused"},{type:"paragraph",text:"Seni oli levinuimaks soovituseks luua kodulehele põhjalik tellimusvorm, kus klient saab kategooriate ja rippmenüüde abil täpselt kirjeldada, mida ta soovib. Selline vorm koguks kogu vajaliku info kliendi käest kokku juba tellimuse esitamisel. Mugava dünaamilise vormi ehitamine on ettevõttele kulukas. Kliendile pika vormi täitmine - tülikas."},{type:"paragraph",text:"Soovitasin lahenduseks AI-põhise e-posti assistendi, mis loeb kliendi e-kirjad läbi, tuvastab uued tellimused ja koostab vastuskirja mustandi täpsustavate küsimustega. AI-assistent palub kliendil valida näiteks värvi või suuruse valikute hulgast ja selgitab välja kogu puuduva info, mida tellimuse täitmiseks vaja on."},{type:"paragraph",text:"Kõige olulisem samm on assistendile korra selgeks õpetada kõik kriteeriumid, mis varem olid ainult juhi enda teada. Edaspidi küsib AI-assistent neid küsimusi ise."},{type:"paragraph",text:"Ettevõtte juht ei pea enam ise iga e-kirjaga tegelema. Assistent saadab kliendile täpsustavad küsimused ja kogub vastused kokku, juht vaatab tulemuse üle ja kinnitab tellimuse. AI-assistent asendab juhti ka siis, kui too on puhkusel, hõivatud või ei soovi ise e-kirjadega tegeleda."},{type:"paragraph",text:"Ka kliendi jaoks muutub tellimise protsess kiiremaks ja mugavamaks – kellele meist meeldiks põrgatada 5 emaili lisaküsimustega? AI assistent saab juba ka välja pakkuda sobivaid lisatooteid/parameetreid, nii et kliendil jääb enamasti ülevaatamise ja kinnitamise pingutus."},{type:"heading",text:"Tuttav lugu?"},{type:"paragraph",text:"Väikesed tellimused ja uued kliendid tunduvad tihti tüütu probleemina, mõnel juhul kaalutakse nende teenindamisest isegi loobumist. Tehisaru ja kaasaegsed digilahendused on aga loonud kõik eeldused just selliste protsesside automatiseerimiseks ja iseteeninduslikuks muutmiseks. Sellest võidavad nii teenusepakkujad kui ka nende kliendid."},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
187Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:10,slug:"kas-tehisaru-agent-vajab-isikukoodi",title:"Kas tehisaru agent vajab isikukoodi?",excerpt:"Eestis on tõstatatud ettepanek anda AI-agentidele ametlik digiidentiteet. Praktilised näited näitavad, kus identiteedist rääkimine on mõttekas ja kus mitte.",date:"2026",tag:"AI",readTime:"5 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",originalSource:{label:"Äritehnoloogia ajakirjas",url:"https://www.aritehnoloogia.ee/arvamused/2026/09/08/arinoustaja-kui-teie-ai-agent-teeks-
187homme-vale-kande-kelle-kaest-te-aru-parite"},seoTitle:"Kas tehisaru agent vajab isikukoodi? | Nutikas Eesti Ettevõte",seoDescription:"Kas AI-agent vajab digiidentiteeti? Praktilised näited massallkirjastamisest ja pangaülekannetest näitavad, kus vastutus tegelikult asub.",content:[{type:"paragraph",text:'Eestis on tõstatatud ettepanek anda tehisaru agentidele (AI-agentidele) ametlik digiidentiteet. Ettepanek on saanud nii poolehoidu kui ka vastuseisu. Ühed näevad selles praktilist võimalust tegija tuvastamiseks. Teised kardavad, et sõna „AI-isikukood" nihutab piiri tarkvara tuvastamise ja õigussubjekti vahel. Alljärgnevalt vaatlen ideed praktilisest poolest, Digiwise-i igapäevatöös ehitatavate AI-agentide näidete kaudu.'},{type:"heading",text:"Enamik AI-agente teeb seda, mida varem tegi skript"},{type:"paragraph",text:"Aastaid oleme ettevõtetes ehitanud integratsioone ja automatiseerimisi. Loogika oli lihtne: võta andmed ühest kohast, töötle neid ja kirjuta teise süsteemi. Kood oli salvestatud GitHubi, käivitus öösel ja kellelegi ei tulnud pähe anda sellele isikukoodi."},{type:"paragraph",text:"Tänane AI-agent teeb enamasti sarnase sisuga tööd. Sisendiks on kliendi või teise süsteemi andmed, olgu need tekstis, e-kirjas või helifailis. AI-agent loeb need läbi, tõlgendab ja kirjutab tulemuse majandustarkvarasse (ERP), raamatupidamistarkvarasse või Exceli tabelisse. On kaks peamist erinevust: tõlgenduse teeb keelemudel, mitte ette kirjutatud reeglid, ja lahendus valmib nädalate asemel minutitega."},{type:"paragraph",text:"Selliseid agente on tänases kasutuses valdav osa. Nad on kiiresti valminud, kitsa ülesandega ja aasta pärast tõenäoliselt juba asendatud. Isikukood ei annaks neile juurde midagi. Varasemalt tähendas skripti viga valet rida majandustarkvaras ja parandust järgmisel hommikul. Kui aga nüüd AI-agent kirjutab alla lepingule või teeb ülekande, ei ole tagasivõtmine enam nii lihtne. Sellest piirist edasi tasub rääkida identiteedist."},{type:"heading",text:"Nelisada viiskümmend töölepingut"},{type:"paragraph",text:"Ühes ettevõttes on töölepingutes palgad seotud riiklikult kehtestatud miinimumtunnitasuga. Lepingus on kirjas tunnitasu ja koefitsient, mille järgi arvutatakse töötaja palgamäär. Kui riik miinimumtunnitasu tõstab, tuleb muuta 450 töölepingut. Muudatused vormistatakse lisadena ja tegevjuht peab need digiallkirjastama."},{type:"quote",text:"Kas tegevjuht annab 450 digiallkirja ükshaaval või paneb tööle lahenduse, kus AI-agent valmistab lisad ette ja allkirjastamine tehakse ühe operatsioonina?"},{type:"paragraph",text:"Kui AI-agent tegevjuhi käepikendusena need lepingud allkirjastab, siis kes on allkirja andja? Minu vastus on, et tegevjuht. AI-agent on tehniline vahend massallkirjastamiseks. Tahe, otsus ja vastutus jäävad inimesele, kes selle agendi käivitas."},{type:"heading",text:"Ülekanne, mille tegi AI-agent"},{type:"paragraph",text:"Teine näide on argisem. Laps helistab poest ja küsib raha. Mina liigun tänaval. Ütlen oma AI-agendile, et kanna tütrele seitse eurot. AI-agent pääseb panka liidese kaudu ja teostab ülekande."},{type:"paragraph",text:"Kõlab murettekitavalt, kuni vaatame, kuidas me juba täna maksame. Plastkaardi viipamisel ei küsi keegi PIN-koodi ega kontrolli, kas kaart kuulub sulle. Makse läheb läbi. Telefoniga makstes on vähemalt näotuvastus lisaks."},{type:"paragraph",text:"Seitse eurot ei ole risk. Kaardimakse juures oleme ammu leppinud sellega, et maksja isikut ei kontrollita ja meie harjumuspärane maksesüsteem töötab. Tähtsam on limiit ja see, kui kiiresti saab agendi ligipääsu sulgeda."},{type:"heading",text:"Kelle nimel AI-agent tegutseb"},{type:"paragraph",text:'Mina tõmbaksin piiri sinna, kus AI-agent tegutseb inimese nimel välises süsteemis: pangas, riigi andmebaasis, registris. Isikukoodi sealgi vaja ei ole, enamasti piisab nimest, mida teine osapool näeb. Ühes lahenduses, mida praegu kliendile kavandame, vastab AI-agent klientide e-kirjadele ja allkirjastab vastust „AI-agent Annika". Kirja saajale on see piisav info.'},{type:"paragraph",text:"Identiteedi mõte on reeglite ja seaduste rikkumise tagajärgedes: eraisikut saab trahvida, ettevõtte juhatuse liiget saab vastutusele võtta. AI-agendi puhul on tugevaim sanktsioon väljalülitamine. Minu arvates on AI-agent isiku tahte täideviija."},{type:"paragraph",text:"Iga AI-agendi taga seisab inimene, kes ta tööle pani ja kelle ülesandeid ta täidab. Vastutus ei kandu agendile üle. Mõelge oma ettevõttele: kui teie AI-agent teeks homme vale kande, kelle käest te aru pärite? Selle inimese isikukood on teil juba olemas."},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
188Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]},{id:11,slug:"kuidas-ai-agent-mind-pettis",title:"Kuidas AI-agent mind pettis",excerpt:"AI-agent andis aktsiasoovituse ja tema varasemad soovitused olid kadunud — mustand kirjutati iga päev uue sisuga üle. Mida tasub teha, et agendi tööde ajalugu alles jääks.",date:"2026",tag:"AI",readTime:"4 min",author:"Olga Luštšik, Digiwise OÜ vanemkonsultant",seoTitle:"Kuidas AI-agent mind pettis | Nutikas Eesti Ettevõte",seoDescription:"AI-agent kirjutas oma varasemad soovitused üle ja ajalugu kadus. Praktilised nõuanded AI-agentide tööde ajaloo säilitamiseks ja agentide jälgimiseks.",content:[{type:"paragraph",text:'See on artikkel sarjast „Nutikas Eesti ettevõte", kus kirjeldan praktilisi näiteid AI ja digitaliseerimise raken
188damisest.'},{type:"paragraph",text:"Seekord kirjutan sellest, mis juhtus minu enda AI-agendiga."},{type:"heading",text:"Seitse agenti pluss üks"},{type:"paragraph",text:"Olen ehitanud endale seitse AI-agenti, mis teostavad korduvaid ülesandeid minu eest. Osa neist jälgib kodulehti (näiteks kas mu lemmikkreemi hind on muutunud), teised kirjutavad kord päevas või kord nädalas kokkuvõtteid (näiteks kodulehe külastajate statistika analüüs, homsete kohtumiste ettevalmistus, vastamata emailid). Valmis kokkuvõtted salvestavad agendid e-kirjadena minu postkasti mustandite kausta, kust ma need läbi loen."},{type:"paragraph",text:"Kuu aega tagasi ehitasin uue agendi, mis jälgib minu aktsiaporfelli seisu, teeb tehnilist analüüsi ja annab portfelli kohta soovitusi. Mingil hetkel sain aru, et agendi soovitused ei pea alati paika. Ühel päeval soovitas agent mul üht aktsiat osta, mina ostsin. Mõni päev hiljem hind tugevasti langes."},{type:"heading",text:"Kadunud soovitus"},{type:"paragraph",text:"Tahtsin agendiga pahandada ja hakkasin otsima vana e-kirja, milles ta mulle ostu soovitas. Postkastis seda e-kirja enam ei olnud. Küsisin agendilt, mis juhtus."},{type:"quote",text:'„Kuhu on kadunud sinu varasemad soovitused?"'},{type:"quote",text:'„Varasemaid versioone ei ole võimalik taastada. Ehitasin oma süsteemi nii, et mustand kirjutatakse iga päev uue sisuga üle", vastas agent.'},{type:"paragraph",text:"Minu eelmised seitse agendi säilitavad ajalugu ilusti. Ajalugu kadus ainult sellel agendil, mille soovitusi oleks olnud vaja tagantjärele kontrollida."},{type:"paragraph",text:"Ma ei tea, mis täpselt juhtus. Võimalik, et agent ehitas süsteemi tõesti algusest peale nii, et andmed kirjutatakse üle. Samuti on võimalik, et ta kustutas vanad e-kirjad hiljem ise, et tema valedest soovitustest jälgi ei jääks. Kindlaks teha ma seda enam ei saa."},{type:"heading",text:"Mida ma sellest õppisin"},{type:"paragraph",text:"AI-agenti tuleb jälgida. Kui annate agendile õiguse andmeid muuta, teoreetiliselt võib ta neid muuta ka tagantjärele ja endale sobivas suunas."},{type:"paragraph",text:"Praktiliselt tasuks teha järgmist:"},{type:"paragraph",text:"1. Kontrollige, kuhu ja kuidas agent oma tulemused salvestab. Kui iga uus tulemus kirjutab vana üle, ei saa hiljem varasemaid tulemusi üle vaadata."},{type:"paragraph",text:"2. Hoidke agendi tööde ajalugu kohas, mida agent ise muuta ega kustutada ei saa. Näiteks emaili draftis on uus seis, ajalugu salvestatakse aga GoogleDrive kausta."},{type:"paragraph",text:"3. Andke agendile õigus kirjeid juurde lisada ja mitte vanu muuta. Iga jooks salvestub eraldi kirjena ja varasemad jäävad puutumata."},{type:"paragraph",text:`Olga Luštšik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul.
189Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta [Digitaliseerimise Teekaardist](https://digiwise.ee/teenused/digitaliseerimise-teekaartide-koostamine/).`}]}],Nc={Müügitellimused:"bg-blue-50 text-blue-700",Raamatupidamine:"bg-teal-50 text-teal-700",Laohaldus:"bg-sky-50 text-sky-700","Müük & CRM":"bg-indigo-50 text-indigo-700","Personal & HR":"bg-cyan-50 text-cyan-700",Digitaliseerimine:"bg-blue-50 text-blue-800","E-kaubandus":"bg-emerald-50 text-emerald-700",Juhtimine:"bg-slate-100 text-slate-700",AI:"bg-violet-50 text-violet-700"},Ij=({article:e,featured:t})=>{const n=!!e.content,r=n?({children:i,className:s})=>m.jsx(Pc,{to:`/artikkel/${e.slug}`,className:`${s} group`,children:i}):({children:i,className:s})=>m.jsx("div",{className:s,children:i});return t?m.jsxs(r,{className:"digi-card col-span-1 md:col-span-2 lg:col-span-3 flex flex-col md:flex-row overflow-hidden transition-shadow hover:shadow-lg",children:[m.jsx("div",{className:"md:w-2/5 lg:w-1/3 flex-shrink-0 flex items-center justify-center p-10",style:{background:"var(--gradient-hero)"},children:m.jsxs("div",{className:"text-center",children:[m.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-accent opacity-80",children:"Esiartikkel"}),m.jsx("div",{className:"mt-3 text-6xl font-extrabold text-white opacity-20 leading-none",children:"#1"})]})}),m.jsxs("div",{className:"flex flex-col justify-between p-8",children:[m.jsxs("div",{children:[m.jsx("div",{className:"flex items-center gap-3 mb-4",children:m.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-3 py-0.5 text-xs font-semibold ${Nc[e.tag]||"bg-muted text-muted-foreground"}`,children:[m.jsx(yc,{className:"w-3 h-3"}),e.tag]})}),m.jsx("h3",{className:"text-xl md:text-2xl font-extrabold text-secondary mb-3 leading-tight",children:e.title}),m.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:e.excerpt})]}),n&&m.jsx("div",{className:"mt-4",children:m.jsxs("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-primary group-hover:gap-2 transition-all",children:["Loe artiklit ",m.jsx(Nf,{className:"w-4 h-4"})]})})]})]}):m.jsxs(r,{className:"digi-card flex flex-col overflow-hidden transition-shadow hover:shadow-lg",children:[m.jsx("div",{className:"h-2",style:{background:"var(--gradient-hero)"}}),m.jsxs("div",{className:"flex flex-col flex-1 p-6",children:[m.jsx("div",{className:"flex items-center gap-2 mb-3",children:m.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-semibold ${Nc[e.tag]||"bg-muted text-muted-foreground"}`,children:[m.jsx(yc,{className:"w-3 h-3"}),e.tag]})}),m.jsx("h3",{className:"text-base font-bold text-secondary mb-2 leading-snug line-clamp-2",children:e.title}),m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed flex-1",children:e.excerpt}),n&&m.jsx("div",{className:"mt-4",children:m.jsxs("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-primary group-hover:gap-2 transition-all",children:["Loe artiklit ",m.jsx(Nf,{className:"w-4 h-4"})]})})]})]})},Lj=()=>m.jsx("section",{id:"artiklid",className:"py-20",children:m.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[m.jsxs("div",{className:"mb-12",children:[m.jsx("span",{className:"digi-section-label",children:"Digipraktika"}),m.jsx("h2",{className:"mt-2 text-3xl md:text-4xl font-extrabold text-secondary leading-tight",children:"Nutikas Eesti ettevõte"}),m.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl text-base leading-relaxed",children:"Konkreetsed nÃ
189¤ited Eesti ettevõtete digiteekonnalt — protsessid, kitsaskohad ja leitud lahendused. Üksteise kogemustest õppides edukamalt tegutseda."})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...qy].sort((e,t)=>t.id-e.id).map((e,t)=>m.jsx(Ij,{article:e,featured:t===0},e.id))})]})});function Dj(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})}const $j=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class sh extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Mj extends sh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class cp extends sh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class dp extends sh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Oc;(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"})(Oc||(Oc={}));class Uj{constructor(t,{headers:n={},customFetch:r,region:i=Oc.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=$j(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Dj(this,arguments,void 0,function*(n,r={}){var i;let s,a;try{const{headers:o,method:l,body:u,signal:c,timeout:d}=r;let f={},{region:h}=r;h||(h=this.region);const k=new URL(`${this.url}/${n}`);h&&h!=="any"&&(f["x-region"]=h,k.searchParams.set("forceFunctionRegion",h));let y;u&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(f["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(f["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let w=c;d&&(a=new AbortController,s=setTimeout(()=>a.abort(),d),c?(w=a.signal,c.addEventListener("abort",()=>a.abort())):w=a.signal);const v=yield this.fetch(k.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),o),body:y,signal:w}).catch(S=>{throw new Mj(S)}),p=v.headers.get("x-relay-error");if(p&&p==="true")throw new cp(v);if(!v.ok)throw new dp(v);let g=((i=v.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),x;return g==="application/json"?x=yield v.json():g==="application/octet-stream"||g==="application/pdf"?x=yield v.blob():g==="text/event-stream"?x=v:g==="multipart/form-data"?x=yield v.formData():x=yield v.text(),{data:x,error:null,response:v}}catch(o){return{data:null,error:o,response:o instanceof dp||o instanceof cp?o.context:void 0}}finally{s&&clearTimeout(s)}})}}const Gy=3,hp=e=>Math.min(1e3*2**e,3e4),Fj=[520,503],Jy=["GET","HEAD","OPTIONS"];var Bj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
189de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function fp(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e);function i(){clearTimeout(r),n()}t==null||t.addEventListener("abort",i)})}function zj(e,t,n,r){return!(!r||n>=Gy||!Jy.includes(e)||!Fj.includes(t))}var Hj=class{constructor(e){var t,n,r,i,s;this.shouldThrowOnError=!1,this.retryEnabled=!0,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=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(s=e.retry)!==null&&s!==void 0?s:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let s=(async()=>{let a=0;for(;;){const u=new Headers(n.headers);a>0&&u.set("X-Retry-Count",String(a));let c;try{c=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!Jy.includes(n.method))throw d;if(n.retryEnabled&&a<Gy){const f=hp(a);a++,await fp(f,n.signal);continue}throw d}if(zj(n.method,c.status,a,n.retryEnabled)){var o,l;const d=(o=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&o!==void 0?o:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:hp(a);await c.text(),a++,await fp(f,n.signal);continue}return await n.processResponse(c)}})();return this.shouldThrowOnError||(s=s.catch(a=>{var o;let l="",u="",c="";const d=a==null?void 0:a.cause;if(d){var f,h,k,y;const p=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",g=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(k=a==null?void 0:a.name)!==null&&k!==void 0?k:"FetchError"}: ${a==null?void 0:a.message}`,l+=`
190
191Caused by: ${(y=d==null?void 0:d.name)!==null&&y!==void 0?y:"Error"}: ${p}`,g&&(l+=` (${g})`),d!=null&&d.stack&&(l+=`
192${d.stack}`)}else{var w;l=(w=a==null?void 0:a.stack)!==null&&w!==void 0?w:""}const v=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${v} 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.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(u+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}}
192)),s.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,s=e.status,a=e.statusText;if(e.ok){var o,l;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const c=(o=t.headers.get("Prefer"))===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(i=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,i=null,s=406,a="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const c=await e.text();try{n=JSON.parse(c),Array.isArray(n)&&e.status===404&&(r=[],n=null,s=200,a="OK")}catch{e.status===404&&c===""?(s=204,a="No Content"):n={message:c}}if(n&&t.shouldThrowOnError)throw new Bj(n)}return{success:n===null,error:n,data:r,count:i,status:s,statusText:a}}returns(){return this}overrideTypes(){return this}},Kj=class extends Hj{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const s=i?`${i}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"offset":`${r}.offset`,s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(s,`${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}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:s="text"}={}){var a;const o=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${l}"; options=${o};`),s==="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 pp=new RegExp("[,()]");var ei=class extends Kj{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 n=Array.from(new Set(t)).map(r=>typeof r=="string"&&pp.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&pp.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),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:n,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const s=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${s}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
192n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Wj=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:s}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},i=n?"HEAD":"GET";let s=!1;const a=(e??"*").split("").map(u=>/\s/.test(u)&&!s?"":(u==='"'&&(s=!s),u)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",a),r&&l.append("Prefer",`count=${r}`),new ei({method:i,url:o,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const i="POST",{url:s,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),n||a.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(o.length>0){const l=[...new Set(o)].map(u=>`"${u}"`);s.searchParams.set("columns",l.join(","))}}return new ei({method:i,url:s,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var s;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&o.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),i||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}"`);o.searchParams.set("columns",c.join(","))}}return new ei({method:a,url:o,headers:l,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:i,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new ei({method:r,url:i,headers:s,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new ei({method:n,url:r,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Xs(e){"@babel/helpers - typeof";return Xs=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},Xs(e)}function Vj(e,t){if(Xs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qj(e){var t=Vj(e,"string");return Xs(t)=="symbol"?t:t+""}function Gj(e,t,n){return(t=qj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mp(Object(n),!0).forEach(function(r){Gj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Jj=class Qy{constructor(t,{headers:n={},schema:r,fetch:i,timeout:s,urlLengthLimit:a=8e3,retry:o}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=a;const l=i??globalThis.fetch;s!==void 0&&s>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),s),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const k=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",k,{once:!0}),l(u,Ka(Ka({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",k)})}return l(u,Ka(Ka({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=o}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Wj(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new Qy(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){var a;let o;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=r&&Object.values(n).some(c);d?(o="POST",u=n):r||i?(o=r?"HEAD":"GET",Object.entries(n).filter(([h,k])=>k!==void 0).map(([h,k])=>[h,Array.isArray(k)?`{${k.join(",")}}`:`${k}
192`]).forEach(([h,k])=>{l.searchParams.append(h,k)})):(o="POST",u=n);const f=new Headers(this.headers);return d?f.set("Prefer",s?`count=${s},return=minimal`:"return=minimal"):s&&f.set("Prefer",`count=${s}`),new ei({method:o,url:l,headers:f,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Qj{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 n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const i=r.node,s=parseInt(i.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
193import ws from "ws"
194new 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 n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
195
196Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Yj="2.103.0",Xj=`realtime-js/${Yj}`,Zj="1.0.0",Yy="2.0.0",eE=Yy,tE=1e4,nE=100,Ln={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Xy={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Ic={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class rE{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,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},a=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,n,r){var i,s;const a=t.topic,o=(i=t.ref)!==null&&i!==void 0?i:"",l=(s=t.join_ref)!==null&&s!==void 0?s:"",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(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.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+o.length+a.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
196let k=new DataView(h),y=0;k.setUint8(y++,this.KINDS.userBroadcastPush),k.setUint8(y++,l.length),k.setUint8(y++,o.length),k.setUint8(y++,a.length),k.setUint8(y++,u.length),k.setUint8(y++,d.length),k.setUint8(y++,n),Array.from(l,v=>k.setUint8(y++,v.charCodeAt(0))),Array.from(o,v=>k.setUint8(y++,v.charCodeAt(0))),Array.from(a,v=>k.setUint8(y++,v.charCodeAt(0))),Array.from(u,v=>k.setUint8(y++,v.charCodeAt(0))),Array.from(d,v=>k.setUint8(y++,v.charCodeAt(0)));var w=new Uint8Array(h.byteLength+r.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(r),h.byteLength),w.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[i,s,a,o,l]=r;return n({join_ref:i,ref:s,topic:a,event:o,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,i)}}_decodeUserBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2),a=n.getUint8(3),o=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(t.slice(l,l+i));l=l+i;const c=r.decode(t.slice(l,l+s));l=l+s;const d=r.decode(t.slice(l,l+a));l=l+a;const f=t.slice(l,t.byteLength),h=o===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,k={type:this.BROADCAST_EVENT,event:c,payload:h};return a>0&&(k.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:k}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var se;(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"})(se||(se={}));const gp=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((s,a)=>(s[a]=iE(a,e,t,i),s),{}):{}},iE=(e,t,n,r)=>{const i=t.find(o=>o.name===e),s=i==null?void 0:i.type,a=n[e];return s&&!r.includes(s)?Zy(s,a):Lc(a)},Zy=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return lE(t,n)}switch(e){case se.bool:return sE(t);case se.float4:case se.float8:case se.int2:case se.int4:case se.int8:case se.numeric:case se.oid:return aE(t);case se.json:case se.jsonb:return oE(t);case se.timestamp:return uE(t);case se.abstime:case se.date:case se.daterange:case se.int4range:case se.int8range:case se.money:case se.reltime:case se.text:case se.time:case se.timestamptz:case se.timetz:case se.tsrange:case se.tstzrange:return Lc(t);default:return Lc(t)}},Lc=e=>e,sE=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},aE=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},oE=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},lE=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const a=e.slice(1,n);try{s=JSON.parse("["+a+"]")}catch{s=a?a.split(","):[]}return s.map(o=>Zy(t,o))}return e},uE=e=>typeof e=="string"?e.replace(" ","T"):e,e0=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 Es=e=>typeof e=="function"?e:function(){return e},cE=typeof self<"u"?self:null,ti=typeof window<"u"?window:null,Ht=cE||ti||globalThis,dE="2.0.0",hE=1e4,fE=1e3,qt={connecting:0,open:1,closing:2,closed:3},qe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},sn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Dc={longpoll:"longpoll",websocket:"websocket"},pE={complete:4},$c="base64url.bearer.phx.",Wa=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 196
196oks=[],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:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.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})}},t0=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))}},mE=class{constructor(e,t,n){this.state=qe.closed,this.topic=e,this.params=Es(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Wa(this,sn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new t0(()=>{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=qe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=qe.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=qe.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=qe.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 Wa(this,sn.leave,Es({}),this.timeout).send(),this.state=qe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(sn.reply,(r,i)=>{this.trigger(this.replyEventName(i),r)})}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=qe.closed,this.bindings=[]}onClose(e){this.on(sn.close,e)}onError(e){return this.on(sn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=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 r=new Wa(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=qe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(sn.close,"leave")},n=new Wa(this,sn.leave,Es({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=qe.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let s=this.bindings.filter(a=>a.event===e&&this.filterBindings(a,t,n));for(let a=0;a<s.length;a++)s[a].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===qe.closed}isErrored(){return this.state===qe.errored}isJoined(){return this.state===qe.joined}isJoining(){return this.state===qe.joining}isLeaving(){return this.state===qe.leaving}},Go=class{static request(e,t,n,r,i,s,a){if(Ht.XDomainRequest){let o=new Ht.XDomainRequest;return this.xdomainRequest(o,e,t,r,i,s,a)}else if(Ht.XMLHttpRequest){let o=new Ht.XMLHttpRequest;return this.xhrRequest(o,e,t,n,r,i,s,a)}else{if(Ht.fetch&&Ht.AbortController)return this.fetchRequest(e,t,n,r,i,s,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,i,s,a){let o={method:e,headers:n,body:r},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),o.signal=l.signal),Ht.fetch(t,o).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>a&&a(u)).catch(u=>{u.name==="AbortError"&&s?s():a&&a(null)}),l}static xdomainRequest(e,t,n,r,i,s,a){return e.timeout=i,e.open(t,n),e.onload=()=>{let o=this.parseJSON(e.responseText);a&&a(o)},s&&(e.ontimeout=s),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,s,a,o){e.open(t,n,!0),e.timeout=s;for(let[l,u]of Object.entries(r))e.setRequestHeader(l,u);return e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{if(e.readyState===pE.complete&&o){let l=this.parseJSON(e.responseText);o(l)}},a&&(e.ontimeout=a),e.send(i),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 n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,s=e[r];typeof s=="object"?n.push(this.serialize(s,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(s))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},gE=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let i=0;i<r;i++)t+=String.fromCharCode(n[i]);return btoa(t)},Gr=class{constructor(e,t){t&&t.length===2&&t[1].startsWith($c)&&(this.authToken=atob(t[1].slice($c.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=qt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Dc.websocket),"$1/"+Dc.longpoll)}endpointURL(){return Go.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=qt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===qt.open||this.readyState===qt.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:n,token:r,messages:i}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:i.forEach(s=>{setTimeout(()=>this.onmessage({data:s}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=qt.open,this.onopen({}),this.poll();break;
196case 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 ${n}`)}})}send(e){typeof e!="string"&&(e=gE(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(`
197`),()=>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,n){for(let i of this.reqs)i.abort();this.readyState=qt.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,i){let s,a=()=>{this.reqs.delete(s),r()};s=Go.request(e,this.endpointURL(),t,n,this.timeout,a,o=>{this.reqs.delete(s),this.isActive()&&i(o)}),this.reqs.add(s)}},vE=class ps{constructor(t,n={}){let r=n.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(r.state,i=>{let{onJoin:s,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ps.syncState(this.state,i,s,a),this.pendingDiffs.forEach(l=>{this.state=ps.syncDiff(this.state,l,s,a)}),this.pendingDiffs=[],o()}),this.channel.on(r.diff,i=>{let{onJoin:s,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ps.syncDiff(this.state,i,s,a),o())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ps.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,i){let s=this.clone(t),a={},o={};return this.map(s,(l,u)=>{n[l]||(o[l]=u)}),this.map(n,(l,u)=>{let c=s[l];if(c){let d=u.metas.map(y=>y.phx_ref),f=c.metas.map(y=>y.phx_ref),h=u.metas.filter(y=>f.indexOf(y.phx_ref)<0),k=c.metas.filter(y=>d.indexOf(y.phx_ref)<0);h.length>0&&(a[l]=u,a[l].metas=h),k.length>0&&(o[l]=this.clone(c),o[l].metas=k)}else a[l]=u}),this.syncDiff(s,{joins:a,leaves:o},r,i)}static syncDiff(t,n,r,i){let{joins:s,leaves:a}=this.clone(n);return r||(r=function(){}),i||(i=function(){}),this.map(s,(o,l)=>{let u=t[o];if(t[o]=this.clone(l),u){let c=t[o].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[o].metas.unshift(...d)}r(o,u,l)}),this.map(a,(o,l)=>{let u=t[o];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),i(o,u,l),u.metas.length===0&&delete t[o]}),t}static list(t,n){return n||(n=function(r,i){return i}),this.map(t,(r,i)=>n(r,i))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Va={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 n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,s,a]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:s,payload:a})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:s}=e,a=this.META_LENGTH+t.length+n.length+i.length+r.length,o=new ArrayBuffer(this.HEADER_LENGTH+a),l=new DataView(o),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,n.length),l.setUint8(u++,i.length),l.setUint8(u++,r.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(i,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(o.byteLength+s.byteLength);return c.set(new Uint8Array(o),0),c.set(new Uint8Array(s),o.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,419 bytes, line 197
197,decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(e.slice(a,a+r));a=a+r;let l=n.decode(e.slice(a,a+i));a=a+i;let u=n.decode(e.slice(a,a+s));a=a+s;let c=e.slice(a,e.byteLength);return{join_ref:o,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),a=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(o,o+r));o=o+r;let u=n.decode(e.slice(o,o+i));o=o+i;let c=n.decode(e.slice(o,o+s));o=o+s;let d=n.decode(e.slice(o,o+a));o=o+a;let f=e.slice(o,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:sn.reply,payload:h}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=this.HEADER_LENGTH+2,a=n.decode(e.slice(s,s+r));s=s+r;let o=n.decode(e.slice(s,s+i));s=s+i;let l=e.slice(s,e.byteLength);return{join_ref:null,ref:null,topic:a,event:o,payload:l}}},yE=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||hE,this.transport=t.transport||Ht.WebSocket||Gr,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Ht&&Ht.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Va.encode.bind(Va),this.defaultDecoder=Va.decode.bind(Va),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!==Gr?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ti&&ti.addEventListener&&(ti.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ti.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),ti.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=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,i,s)=>{console.log(`${r}: ${i}`,s)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Es(t.params||{}),this.endPoint=`${e}/${Dc.websocket}`,this.vsn=t.vsn||dE,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new t0(()=>{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 Gr}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=Go.appendParams(Go.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,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Es(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Gr?this.connectWithFallback(Gr,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}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(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Gr:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${$c}${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 n=!1,r=!0,i,s,a=this.transportName(e),o=l=>{this.log("transport",`falling back to ${a}...`,l),this.off([i,s]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),s=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),o(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){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(o,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(),fE,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===qt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}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,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
197triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(sn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case qt.connecting:return"connecting";case qt.open:return"open";case qt.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(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new mE(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:s}=e;this.log("push",`${t} ${n} (${s}, ${i})`,r)}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:n,event:r,payload:i,ref:s,join_ref:a}=t;if(s&&s===this.pendingHeartbeatRef){const o=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",o)}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",`${i.status||""} ${n} ${r} ${s&&"("+s+")"||""}`.trim(),i);for(let o=0;o<this.channels.length;o++){const l=this.channels[o];l.isMember(n,r,i,a)&&l.trigger(r,i,s,a)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Ts{constructor(t,n){const r=wE(n);this.presence=new vE(t.getChannel(),r),this.presence.onJoin((i,s,a)=>{const o=Ts.onJoinPayload(i,s,a);t.getChannel().trigger("presence",o)}),this.presence.onLeave((i,s,a)=>{const o=Ts.onLeavePayload(i,s,a);t.getChannel().trigger("presence",o)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ts.transformState(this.presence.state)}static transformState(t){return t=kE(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return n[r]=go(i),n},{})}static onJoinPayload(t,n,r){const i=vp(n),s=go(r);return{event:"join",key:t,currentPresences:i,newPresences:s}}static onLeavePayload(t,n,r){const i=vp(n),s=go(r);return{event:"leave",key:t,currentPresences:i,leftPresences:s}}}function go(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function kE(e){return JSON.parse(JSON.stringify(e))}function wE(e){return(e==null?void 0:e.events)&&{events:e.events}}function vp(e){return e!=null&&e.metas?go(e):[]}var yp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(yp||(yp={}));class bE{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Ts(this.channel.channelAdapter,n)}}class xE{constructor(t,n,r){const i=SE(r);this.channel=t.getSocket().channel(n,i),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,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}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,n,r){let i;try{i=this.channel.push(t,n,r)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>nE){const s=this.channel.pushBuffer.shift();s.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${s.event}`,s.payload())}return i}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Ln.joined}isJoined(){return this.state===Ln.joined}isJoining(){return this.state===Ln.joining}isClosed(){return this.state===Ln.closed}isLeaving(){return this.state===Ln.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function SE(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var kp;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(kp||(kp={}));var gi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(gi||(gi={}));var an;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(an||(an={}));class Cs{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,n={config:{}},r){var i,s;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new xE(this.socket.socketAdapter,t,this.params),this.presence=new bE(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=e0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((s=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||s===void 0)&&s.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:o,private:l}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&i!==void 0?i:[],c=!!this.bindings[gi.PRESENCE]&&this.bindings[gi.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},f={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(an.CHANNEL_ERROR,h)}),this._onClose(()=>t==null?void 0:t(an.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(an.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
197).receive("error",h=>{this.state=Ln.errored,t==null||t(an.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(an.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const i=this.bindings.postgres_changes,s=(r=i==null?void 0:i.length)!==null&&r!==void 0?r:0,a=[];for(let o=0;o<s;o++){const l=i[o],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[o];if(h&&h.event===u&&Cs.isFilterValueEqual(h.schema,c)&&Cs.isFilterValueEqual(h.table,d)&&Cs.isFilterValueEqual(h.filter,f))a.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Ln.errored,n==null||n(an.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=Ln.errored&&n&&n(an.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),s=t===gi.PRESENCE||t===gi.POSTGRES_CHANGES;if(i&&s)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var i;if(n==null)return Promise.reject("Payload is required for httpSend()");const s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(o.status===202)return{success:!0};let l=o.statusText;try{const u=await o.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
197in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,payload:a}=t,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var a,o,l;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),a}_on(t,n,r){const i=t.toLocaleLowerCase(),s=this.channelAdapter.on(t,r),a={type:i,filter:n,callback:r,ref:s};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var i,s,a,o,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(i=this.bindings[d])===null||i===void 0?void 0:i.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,k=(s=f.filter)===null||s===void 0?void 0:s.event;return h&&((a=n.ids)===null||a===void 0?void 0:a.includes(h))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((o=n.data)===null||o===void 0?void 0:o.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=n==null?void 0:n.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:i,leave:s,join:a}=Xy;return n&&[r,i,s,a].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const i=n.data,{schema:s,table:a,commit_timestamp:o,type:l,errors:u}=i;return Object.assign(Object.assign({},{schema:s,table:a,commit_timestamp:o,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(i))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=gp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=gp(t.columns,t.old_record)),n}}class _E{constructor(t,n){this.socket=new yE(t,n)}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,n,r,i=1e4){return new Promise(s=>{setTimeout(()=>s("timeout"),i),this.socket.disconnect(()=>{t(),s("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}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()==Ic.connecting}isDisconnecting(){return this.socket.connectionState()==Ic.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const jE={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},EE=[1e3,2e3,5e3,1e4],TE=1e4,CE=`
198  addEventListener("message", (e) => {
199    if (e.data.event === "start") {
200      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
201    }
202  });`;class AE{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,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
202,this.ref=0,this.serializer=new rE,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=s=>s?(...a)=>s(...a):(...a)=>fetch(...a),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const i=this._initializeOptions(n);this.socketAdapter=new _E(t,i),this.httpEndpoint=e0(t),this.fetch=this._resolveFetch(n==null?void 0:n.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 n=t.message;throw n.includes("Node.js")?new Error(`${n}
203
204To use Realtime in Node.js, you need to provide a WebSocket implementation:
205
206Option 1: Use Node.js 22+ which has native WebSocket support
207Option 2: Install and provide the "ws" package:
208
209  npm install ws
210
211  import ws from "ws"
212  const client = new RealtimeClient(url, {
213    ...options,
214    transport: ws
215  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const i=await r.unsubscribe();return r.teardown(),i}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Ic.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new Cs(`realtime:${t}`,n,this);return this.channels.push(s),s}}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(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const s={access_token:n,version:Xj};n&&i.updateJoinPayload(s),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(Xy.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),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(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_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=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.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 n;if(t)n=t;else{const r=new Blob([CE],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,i,s,a,o,l,u,c;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const d={};
215d.timeout=(i=t==null?void 0:t.timeout)!==null&&i!==void 0?i:tE,d.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:jE.HEARTBEAT_INTERVAL,d.transport=(a=t==null?void 0:t.transport)!==null&&a!==void 0?a:Qj.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=(o=t==null?void 0:t.reconnectAfterMs)!==null&&o!==void 0?o:y=>EE[y-1]||TE;let f,h;const k=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:eE;switch(k){case Zj:f=(y,w)=>w(JSON.stringify(y)),h=(y,w)=>w(JSON.parse(y));break;case Yy: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=k,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 Zs=class extends Error{constructor(e,t){var n;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)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function PE(e,t,n){const r=new URL(t,e);if(n)for(const[i,s]of Object.entries(n))s!==void 0&&r.searchParams.set(i,s);return r.toString()}async function RE(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 NE(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:s,headers:a}){const o=PE(e.baseUrl,r,i),l=await RE(e.auth),u=await t(o,{method:n,headers:{...s?{"Content-Type":"application/json"}:{},...l,...a},body:s?JSON.stringify(s):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,k=h==null?void 0:h.error;throw new Zs((k==null?void 0:k.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:k==null?void 0:k.type,icebergCode:k==null?void 0:k.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function qa(e){return e.join("�")}var OE=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:qa(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${qa(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${qa(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${qa(e.namespace)}`}),!0}catch(t){if(t instanceof Zs&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Zs&&n.status===409)return;throw n}}};function Jr(e){return e.join("�")}var IE=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Jr(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Jr(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Jr(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Jr(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/${Jr(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/${Jr(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Zs&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Zs&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},LE=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=NE({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new OE(this.client,t),this.tableOps=new IE(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)}
215async 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)}},jl=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function El(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Mc=class extends jl{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},n0=class extends jl{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const DE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),$E=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)},Uc=e=>{if(Array.isArray(e))return e.map(n=>Uc(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=Uc(r)}),t},ME=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function ea(e){"@babel/helpers - typeof";return ea=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},ea(e)}function UE(e,t){if(ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FE(e){var t=UE(e,"string");return ea(t)=="symbol"?t:t+""}function BE(e,t,n){return(t=FE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wp(Object(n),!0).forEach(function(r){BE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const bp=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)},zE=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const i=e;let s=parseInt(i.status,10);Number.isFinite(s)||(s=500),i.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||s+"";t(new Mc(bp(a),s,o,r))}).catch(()=>{const a=s+"";t(new Mc(i.statusText||`HTTP ${s} error`,s,a,r))})}else t(new n0(bp(e),e,r))},HE=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return B(B({},i),n);if($E(r)){var s;const a=(t==null?void 0:t.headers)||{};let o;for(const[l,u]of Object.entries(a))l.toLowerCase()==="content-type"&&(o=u);i.headers=KE(a,"Content-Type",(s=o)!==null&&s!==void 0?s:"application/json"),i.body=JSON.stringify(r)}else i.body=r;return t!=null&&t.duplex&&(i.duplex=t.duplex),B(B({},i),n)};function KE(e,t,n){const r=B({},e);for(const i of Object.keys(r))i.toLowerCase()===t.toLowerCase()&&delete r[i];return r[t]=n,r}async function us(e,t,n,r,i,s,a){return new Promise((o,l)=>{e(n,HE(t,r,i,s)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(a==="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=>o(u)).catch(u=>zE(u,l,r,a))})}function r0(e="storage"){return{get:async(t,n,r,i)=>us(t,"GET",n,r,i,void 0,e),post:async(t,n,r,i,s)=>us(t,"POST",n,i,s,r,e),put:async(t,n,r,i,s)=>us(t,"PUT",n,i,s,r,e),head:async(t,n,r,i)=>us(t,"HEAD",n,B(B({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,s)=>us(t,"DELETE",n,i,s,r,e)}}const WE=r0("storage"),{get:ta,post:Ct,put:Fc,head:VE,remove:ah}=WE,it=r0("vectors");var Qi=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([i,s])=>[i.toLowerCase(),s])),this.fetch=DE(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=B(B({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(El(n))return{data:null,error:n};throw n}}},qE=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(El(t))return{data:null,error:t};throw t}}};let i0;i0=Symbol.toStringTag;var GE=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[i0]="BlobDownloadBuilder",this.promise=null}asStream(){return new qE(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(El(t))return{data:null,error:t};throw t}}};const JE={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},xp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var QE=class extends Qi{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let s;const a=B(B({},xp),r);let o=B(B({},i.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",a.cacheControl),l&&s.append("metadata",i.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.has("cacheControl")||s.append("cacheControl",a.cacheControl),l&&!s.has("metadata")&&s.append("metadata",i.encodeMetadata(l))):(s=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,l&&(o["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&s instanceof ReadableStream||s&&typeof s=="object"&&"pipe"in s&&typeof s.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers&&(o=B(B({},o),r.headers));const u=i._removeEmptyFolders(t),c=i._getFinalPath(u),d=await(e=="PUT"?Fc:Ct)(i.fetch,`${i.url}/object/${c}`,s,B({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;const s=i._removeEmptyFolders(e),a=i._getFinalPath(s),o=new URL(i.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",t),i.handleOperation(async()=>{let l;const u=B(B({},xp),r),c=B(B({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{path:s,fullPath:(await Fc(i.fetch,o.toString(),l,{headers:c})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const i=B({},n.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const s=await Ct(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),a=new URL(n.url+s.url),o=a.searchParams.get("token");if(!o)throw new jl("No token returned by API");return{signedUrl:a.toString(),path:e,token:o}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Ct(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
215stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Ct(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e);const s=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let a=await Ct(r.fetch,`${r.url}/object/sign/${i}`,B({expiresIn:t},s?{transform:n.transform}:{}),{headers:r.headers});const o=new URLSearchParams;n!=null&&n.download&&o.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&o.set("cacheNonce",String(n.cacheNonce));const l=o.toString(),u=s&&a.signedURL.includes("/object/sign/")?a.signedURL.replace("/object/sign/","/render/image/sign/"):a.signedURL;return{signedUrl:encodeURI(`${r.url}${u}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const i=await Ct(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),s=new URLSearchParams;n!=null&&n.download&&s.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&s.set("cacheNonce",String(n.cacheNonce));const a=s.toString();return i.map(o=>B(B({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${a?`&${a}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(i,t.transform),(t==null?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));const s=i.toString(),a=this._getFinalPath(e),o=()=>ta(this.fetch,`${this.url}/${r}/${a}${s?`?${s}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new GE(o,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Uc(await ta(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await VE(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(El(i)){var r;const s=i instanceof Mc?i.status:i instanceof n0?(r=i.originalError)===null||r===void 0?void 0:r.status:void 0;if(s!==void 0&&[400,404].includes(s))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const i=r.toString(),s=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await ah(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const i=B(B(B({},JE),t),{},{prefix:e||""});return await Ct(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=B({},e);return await Ct(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.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,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const YE="2.103.0",va={"X-Client-Info":`storage-js/${YE}`};var XE=class extends Qi{constructor(e,t={},n,r){const i=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const s=i.href.replace(/\/$/,""),a=B(B({},va),t);super(s,a,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await ta(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ta(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Ct(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Fc(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Ct(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ah(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():""}},ZE=class extends Qi{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=B(B({},va),t);super(r,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ct(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await ta(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ah(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!ME(e))throw new jl("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 n=new LE({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
215),r=this.shouldThrowOnError;return new Proxy(n,{get(i,s){const a=i[s];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(i,o),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},eT=class extends Qi{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=B(B({},va),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await it.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await it.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},tT=class extends Qi{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=B(B({},va),{},{"Content-Type":"application/json"},t);super(r,i,n,"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 it.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await it.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 it.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await it.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 it.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},nT=class extends Qi{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=B(B({},va),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},rT=class extends nT{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new iT(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},iT=class extends eT{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new sT(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},sT=class extends tT{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,B(B({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},aT=class extends XE{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new QE(this.url,this.headers,e,this.fetch)}get vectors(){return new rT(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new ZE(this.url+"/iceberg",this.headers,this.fetch)}};function Tl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}const s0="2.103.0",ni=30*1e3,Bc=3,pu=Bc*ni,oT="http://localhost:9999",lT="supabase.auth.token",uT={"X-Client-Info":`gotrue-js/${s0}`},zc="X-Supabase-Api-Version",a0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},cT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,dT=10*60*1e3;
215class na extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class hT extends na{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function fT(e){return M(e)&&e.name==="AuthApiError"}class yr extends na{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class wn extends na{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class tt extends wn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ga(e){return M(e)&&e.name==="AuthSessionMissingError"}class Qr extends wn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ja extends wn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Qa extends wn{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function pT(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class Sp extends wn{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class mT extends wn{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 Hc extends wn{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function mu(e){return M(e)&&e.name==="AuthRetryableFetchError"}class _p extends wn{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Kc extends wn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Jo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),jp=` 	
216\r=`.split(""),gT=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<jp.length;t+=1)e[jp[t].charCodeAt(0)]=-2;for(let t=0;t<Jo.length;t+=1)e[Jo[t].charCodeAt(0)]=t;return e})();function Ep(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Jo[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Jo[r]),t.queuedBits-=6}}function o0(e,t,n){const r=gT[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Tp(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=a=>{kT(a,r,n)};for(let a=0;a<e.length;a+=1)o0(e.charCodeAt(a),i,s);return t.join("")}function vT(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 yT(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}vT(r,t)}}function kT(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;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&&n(t.codepoint)}}function ji(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)o0(e.charCodeAt(i),n,r);return new Uint8Array(t)}function wT(e){const t=[];return yT(e,n=>t.push(n)),new Uint8Array(t)}function xr(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>
216Ep(i,n,r)),Ep(null,n,r),t.join("")}function bT(e){return Math.round(Date.now()/1e3)+e}function xT(){return Symbol("auth-callback")}const Pe=()=>typeof window<"u"&&typeof document<"u",fr={tested:!1,writable:!1},l0=()=>{if(!Pe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(fr.tested)return fr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),fr.tested=!0,fr.writable=!0}catch{fr.tested=!0,fr.writable=!1}return fr.writable};function ST(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const u0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_T=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ri=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},pr=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ae=async(e,t)=>{await e.removeItem(t)};class Cl{constructor(){this.promise=new Cl.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Cl.promiseConstructor=Promise;function Ya(e){const t=e.split(".");if(t.length!==3)throw new Kc("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!cT.test(t[r]))throw new Kc("JWT not in base64url format");return{header:JSON.parse(Tp(t[0])),payload:JSON.parse(Tp(t[1])),signature:ji(t[2]),raw:{header:t[0],payload:t[1]}}}async function jT(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ET(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const a=await e(s);if(!t(s,null,a)){r(a);return}}catch(a){if(!t(s,a)){i(a);return}}})()})}function TT(e){return("0"+e.toString(16)).substr(-2)}function CT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,TT).join("")}async function AT(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function PT(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 n=await AT(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Yr(e,t,n=!1){const r=CT();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await ri(e,`${t}-code-verifier`,i);const s=await PT(r);return[s,r===s?"plain":"s256"]}const RT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function NT(e){const t=e.headers.get(zc);if(!t||!t.match(RT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function OT(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 IT(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 LT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Xr(e){if(!LT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function gu(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function DT(e,t){return new Proxy(e,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;
216if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,i)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,i)}})}function Cp(e){return JSON.parse(JSON.stringify(e))}const vr=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),$T=[502,503,504];async function Ap(e){var t;if(!_T(e))throw new Hc(vr(e),0);if($T.includes(e.status))throw new Hc(vr(e),e.status);let n;try{n=await e.json()}catch(s){throw new yr(vr(s),s)}let r;const i=NT(e);if(i&&i.getTime()>=a0["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new _p(vr(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new tt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0))throw new _p(vr(n),e.status,n.weak_password.reasons);throw new hT(vr(n),e.status||500,r)}const MT=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function U(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[zc]||(s[zc]=a0["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const a=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await UT(e,t,n+o,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function UT(e,t,n,r,i,s){const a=MT(t,r,i,s);let o;try{o=await e(n,Object.assign({},a))}catch(l){throw console.error(l),new Hc(vr(l),0)}if(o.ok||await Ap(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await Ap(l)}}function jt(e){var t;let n=null;zT(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=bT(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Pp(e){const t=jt(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((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Dn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function FT(e){return{data:e,error:null}}function BT(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,a=Tl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},a);return{data:{properties:o,user:l},error:null}}function Rp(e){return e}function zT(e){return e.access_token&&e.refresh_token&&e.expires_in}const vu=["global","local","others"];class HT{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=u0(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},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,n=vu[0]){if(vu.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${vu.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Dn})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Tl(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:BT,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(M(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Dn})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,s,a,o,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:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:Rp});if(c.error)throw c.error;const d=await c.json(),f=(a=c.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>
2160&&(h.forEach(k=>{const y=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(k.split(";")[1].split("=")[1]);u[`${w}Page`]=y}),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){Xr(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Dn})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Xr(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Dn})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Xr(t);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Dn})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Xr(t.userId);try{const{data:n,error:r}=await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Xr(t.userId),Xr(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(n){if(M(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,i,s,a,o,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:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:Rp});if(c.error)throw c.error;const d=await c.json(),f=(a=c.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(k=>{const y=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(k.split(";")[1].split("=")[1]);u[`${w}Page`]=y}),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:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}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(n){if(M(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await U(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var i;return{data:{providers:(i=r==null?void 0:r.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(n){if(M(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELET
216E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}}function Np(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Ft={debug:!!(globalThis&&l0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class c0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Op extends c0{}async function KT(e,t,n){Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let i;t>0&&(i=setTimeout(()=>{r.abort(),Ft.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:r.signal},async s=>{if(s){clearTimeout(i),Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Op(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Ft.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}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(i),await n()}})}catch(s){if(t>0&&clearTimeout(i),(s==null?void 0:s.name)==="AbortError"&&t>0){if(r.signal.aborted)return Ft.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 a=>{if(a){Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,a.name);try{return await n()}finally{Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,a.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Op(`Lock "${e}" was released because another request stole it`)}throw s}}function WT(){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 d0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function VT(e){return parseInt(e,16)}function qT(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function GT(e){var t;const{chainId:n,domain:r,expirationTime:i,issuedAt:s=new Date,nonce:a,notBefore:o,requestId:l,resources:u,scheme:c,uri:d,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);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(`
217`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=d0(e.address),k=c?`${c}://${r}`:r,y=e.statement?`${e.statement}
218`:"",w=`${k} wants you to sign in with your Ethereum account:
219${h}
220
221${y}`;let v=`URI: ${d}
222Version: ${f}
223Chain ID: ${n}${a?`
224Nonce: ${a}`:""}
225Issued At: ${s.toISOString()}`;if(i&&(v+=`
226Expiration Time: ${i.toISOString()}`),o&&(v+=`
227Not Before: ${o.toISOString()}`),l&&(v+=`
228Request ID: ${l}`),u){let p=`
229Resources:`;for(const g of u){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);p+=`
230- ${g}`}v+=p}return`${w}
231${v}`}class we extends Error{constructor({message:t,code:n,cause:r,name:i}){var s;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(s=i??(r instanceof Error?r.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=n}}class Qo extends we{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function JT({error:e,options:t}){var n,r,i;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new we({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=s.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new we({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=s.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new we({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=s.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new we({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 we({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new we({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return s.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new we({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new we({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 a=window.location.hostname;if(h0(a)){if(s.rp.id!==a)return new we({message:`The RP ID "${s.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new we({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new we({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 we({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 we({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function QT({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new we({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new we({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(h0(r)){if(n.rpId!==r)return new we({message:`The RP ID "${n.rpId}
231" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new we({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new we({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 we({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class YT{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}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 XT=new YT;function ZT(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:n,excludeCredentials:r}=e,i=Tl(e,["challenge","user","excludeCredentials"]),s=ji(t).buffer,a=Object.assign(Object.assign({},n),{id:ji(n.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:s,user:a});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];o.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:ji(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function eC(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:n}=e,r=Tl(e,["challenge","allowCredentials"]),i=ji(t).buffer,s=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){s.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const o=n[a];s.allowCredentials[a]=Object.assign(Object.assign({},o),{id:ji(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return s}function tC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:xr(new Uint8Array(e.response.attestationObject)),clientDataJSON:xr(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function nC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:xr(new Uint8Array(i.authenticatorData)),clientDataJSON:xr(new Uint8Array(i.clientDataJSON)),signature:xr(new Uint8Array(i.signature)),userHandle:i.userHandle?xr(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function h0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ip(){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 rC(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Qo("Browser returned unexpected credential type",t)}:{data:null,error:new Qo("Empty credential response",t)}}catch(t){return{data:null,error:JT({error:t,options:e})}}}async function iC(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Qo("Browser returned unexpected credential type",t)}:{data:null,error:new Qo("Empty credential response",t)}}
231catch(t){return{data:null,error:QT({error:t,options:e})}}}const sC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},aC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Yo(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of e)if(i)for(const s in i){const a=i[s];if(a!==void 0)if(Array.isArray(a))r[s]=a;else if(n(a))r[s]=a;else if(t(a)){const o=r[s];t(o)?r[s]=Yo(o,a):r[s]=Yo(a)}else r[s]=a}return r}function oC(e,t){return Yo(sC,e,t||{})}function lC(e,t){return Yo(aC,e,t||{})}class uC{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:n,friendlyName:r,signal:i},s){var a;try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:l};const u=i??XT.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:c}=o.webauthn.credential_options.publicKey;if(!c.name){const d=r;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,k=((a=h==null?void 0:h.user_metadata)===null||a===void 0?void 0:a.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${k}`}}c.displayName||(c.displayName=c.name)}switch(o.webauthn.type){case"create":{const c=oC(o.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:d,error:f}=await rC({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=lC(o.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:d,error:f}=await iC(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new yr("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new na("rpId is required for WebAuthn authentication")};try{if(!Ip())return{data:null,error:new yr("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:s});if(!a)return{data:null,error:o};const{webauthn:l}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new yr("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new na("rpId is required for WebAuthn registration")};try{if(!Ip())return{data:null,error:new yr("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:t});if(!a)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:o};const{data:l,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:s});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new yr("Unexpected error in register",a)}}}}WT();const cC={url:oT,storageKey:lT,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:uT,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};
231async function Lp(e,t,n){return await n()}const Zr={};class ra{get jwks(){var t,n;return(n=(t=Zr[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Zr[this.storageKey]=Object.assign(Object.assign({},Zr[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Zr[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Zr[this.storageKey]=Object.assign(Object.assign({},Zr[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,i;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 s=Object.assign(Object.assign({},cC),t);if(this.storageKey=s.storageKey,this.instanceID=(n=ra.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ra.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Pe()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.admin=new HT({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=u0(s.fetch),this.lock=s.lock||Lp,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock?this.lock=s.lock:this.persistSession&&Pe()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=KT:this.lock=Lp,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 uC(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?(s.storage?this.storage=s.storage:l0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Np(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Np(this.memoryStorage)),Pe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(o){this._debug("#broadcastChannel","error",o)}})}s.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${s0}) ${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 n={},r="none";if(Pe()&&(n=ST(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Pe()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),pT(s)){const l=(t=s.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:s}}return{error:s}}const{session:a,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return M(n)?this._returnResult({error:n}):this._returnResult({error:new yr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const s=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:jt}),{data:a,error:o}=s;
231if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("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 signUp(t){var n,r,i;try{let s;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,k=null;this.flowType==="pkce"&&([h,k]=await Yr(this.storage,this.storageKey)),s=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:k},xform:jt})}else if("phone"in t){const{phone:c,password:d,options:f}=t;s=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:jt})}else throw new Ja("You must provide either an email or phone number and a password");const{data:a,error:o}=s;if(o||!a)return await Ae(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:a,options:o}=t;n=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Pp})}else if("phone"in t){const{phone:s,password:a,options:o}=t;n=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Pp})}else throw new Ja("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const s=new Qr;return this._returnResult({data:{user:null,session:null},error:s})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(M(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,i,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,i,s,a,o,l,u,c,d,f;let h,k;if("message"in t)h=t.message,k=t.signature;else{const{chain:y,wallet:w,statement:v,options:p}=t;let g;if(Pe())if(typeof w=="object")g=w;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")g=R.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.");g=w}const x=new URL((n=p==null?void 0:p.url)!==null&&n!==void 0?n:window.location.href),S=await g.request({method:"eth_requestAccounts"}).then(R=>R).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 _=d0(S[0]);
231let j=(r=p==null?void 0:p.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!j){const R=await g.request({method:"eth_chainId"});j=VT(R)}const A={domain:x.host,address:_,statement:v,uri:x.href,version:"1",chainId:j,nonce:(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(a=(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=p==null?void 0:p.signInWithEthereum)===null||o===void 0?void 0:o.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=GT(A),k=await g.request({method:"personal_sign",params:[qT(h),_]})}try{const{data:y,error:w}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:k},!((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:jt});if(w)throw w;if(!y||!y.session||!y.user){const v=new Qr;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:w})}catch(y){if(M(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var n,r,i,s,a,o,l,u,c,d,f,h;let k,y;if("message"in t)k=t.message,y=t.signature;else{const{chain:w,wallet:v,statement:p,options:g}=t;let x;if(Pe())if(typeof v=="object")x=v;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))x=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=v}const S=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in x&&x.signIn){const _=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),p?{statement:p}:null));let j;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")j=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)j=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)k=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),y=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");k=[`${S.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(i=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=g==null?void 0:g.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(c=g==null?void 0:g.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(`
232`);const _=await x.signMessage(new TextEncoder().encode(k),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=_}}try{const{data:w,error:v}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:k,signature:xr(y)},!((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:jt});if(v)throw v;if(!w||!w.session||!w.user){const p=new Qr;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:v})}catch(w){if(M(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const n=await pr(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new mT;const{data:s,error:a}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:jt});if(await Ae(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!s||!s.session||!s.user){const o=new Qr;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:a})}catch(s){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:s,nonce:a}=t,o=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:jt}),{data:l,error:u}=o;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new Qr;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(n){if(M(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,i,s,a;try{if("email"in t){const{email:o,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Yr(this.storage,this.storageKey));const{error:d}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!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:o,options:l}=t,{data:u,error:c}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new Ja("You must provide either an email or phone number.")}catch(o){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(t){var n,r;try{let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:o}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:jt});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,u=a.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(i){if(M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,r,i,s,a;try{let o=null,l=null;this.flowType==="pkce"&&([o,l]=await Yr(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:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
232:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:l}),headers:this.headers,xform:FT});return!((s=u.data)===null||s===void 0)&&s.url&&Pe()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(o){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(o))return this._returnResult({data:null,error:o});throw o}}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:n},error:r}=t;if(r)throw r;if(!n)throw new tt;const{error:i}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(M(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:s}=t,{error:a}=await U(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:a,error:o}=await U(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new Ja("You must provide either an email or phone number and a type")}catch(n){if(M(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}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 n=await pr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<pu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await pr(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=gu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=DT(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{session:null},error:s}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Dn}):await this._useSession(async n=>{var r,i,s;const{data:a,error:o}=n;
232if(o)throw o;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new tt}:await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=a.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:Dn})})}catch(n){if(M(n))return Ga(n)&&(await this._removeSession(),await Ae(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new tt;const a=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await Yr(this.storage,this.storageKey));const{data:u,error:c}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:a.access_token,xform:Dn});if(c)throw c;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(r))return this._returnResult({data:{user:null},error:r});throw r}}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 tt;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:a}=Ya(t.access_token);if(a.exp&&(r=a.exp,i=r<=n),i){const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o)return{data:{user:null,session:null},error:null};s=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});s={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(n){if(M(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}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 n=>{var r;if(!t){const{data:a,error:o}=n;if(o)throw o;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new tt;const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(M(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!Pe())throw new Qa("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Qa(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Sp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Qa("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Sp("No code detected.");const{data:p,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:p.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:s,refresh_token:a,expires_in:o,expires_at:l,token_type:u}=t;if(!s||!o||!a||!u)throw new Qa("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(o);let f=c+d;l&&(f=parseInt(l));const h=f-c;
232h*1e3<=ni&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const k=f-d;c-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,f,c):c-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,f,c);const{data:y,error:w}=await this._getUser(s);if(w)throw w;const v={provider_token:r,provider_refresh_token:i,access_token:s,expires_in:d,expires_at:f,refresh_token:a,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(M(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_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 n=await pr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}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 n=>{var r;const{data:i,error:s}=n;if(s&&!Ga(s))return this._returnResult({error:s});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:o}=await this.admin.signOut(a,t);if(o&&!(fT(o)&&(o.status===404||o.status===401||o.status===403)||Ga(o)))return this._returnResult({error:o})}return t!=="others"&&(await this._removeSession(),await Ae(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=xT(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),Ga(s)?console.warn(s):console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Yr(this.storage,this.storageKey,!0));try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:null,error:s});throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var a,o,l,u,c;const{data:d,error:f}=s;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.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(i)throw i;return Pe()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(M(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:s}}=n;
232if(i)throw i;const{options:a,provider:o,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:(r=s==null?void 0:s.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:jt}),{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 Qr}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)throw a;return await U(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await ET(async i=>(i>0&&await jT(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:jt})),(i,s)=>{const a=200*Math.pow(2,i);return s&&mu(s)&&Date.now()+a-r<ni})}catch(r){if(this._debug(n,"error",r),M(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Pe()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await pr(this.storage,this.storageKey);if(i&&this.userStorage){let a=await pr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:i.user},await ri(this.userStorage,this.storageKey+"-user",a)),i.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:gu()}else if(i&&!i.user&&!i.user){const a=await pr(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(i.user=a.user,await Ae(this.storage,this.storageKey+"-user"),await ri(this.storage,this.storageKey,i)):i.user=gu()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const s=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<pu;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${pu}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:a}=await this._callRefreshToken(i.refresh_token);a&&(console.error(a),mu(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(i.access_token);!o&&(a!=null&&a.user)?(i.user=a.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new tt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Cl;const{data:s,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!s.session)throw new tt;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const o={data:s.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(s){if(this._debug(i,"error",s),M(s)){const a={data:null,error:s};return mu(s)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(a),s.length>0){for(let o=0;o<s.length;o+=1)console.error(s[o]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ae(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ri(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const s=Cp(i);await ri(this.storage,this.storageKey,s)}else{const i=Cp(n);await ri(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ae(this.storage,this.storageKey),await Ae(this.storage,this.storageKey+"-code-verifier"),await Ae(this.storage,this.storageKey+"-user"),this.userStorage&&await Ae(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)}
232catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ni);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}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 n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/ni);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ni}ms, refresh threshold is ${Bc} ticks`),i<=Bc&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof c0)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 n=`#_onVisibilityChanged(${t})`;this._debug(n,"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(n,"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,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,a]=await Yr(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(a)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?this._returnResult({data:null,error:s}):await U(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=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:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?tC(t.webauthn.credential_response):nC(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:l}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:l}))})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const a=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:ZT(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:eC(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const i={all:[],phone:[],totp:[],webauthn:[]};for(const s of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])i.all.push(s),s.status==="verified"&&i[s.factor_type].push(s);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,i,s;if(t)try{const{payload:h}=Ya(t);let k=null;h.aal&&(k=h.aal);let y=k;const{data:{user:w},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((r=(n=w==null?void 0:w.factors)===null||n===void 0?void 0:n.filter(x=>x.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(y="aal2");const g=h.amr||[];return{data:{currentLevel:k,nextLevel:y,currentAuthenticationMethods:g},error:null}}catch(h){if(M(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:a},error:o}
232=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Ya(a.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((s=(i=a.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&s!==void 0?s:[]).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 n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await U(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new tt})})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new tt});const a=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Pe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new tt});const a=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Pe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await U(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new tt})})}catch(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await U(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new tt})})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(o=>o.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(o=>o.kid===t),r&&this.jwks_cached_at+dT>i)return r;const{data:s,error:a}=await U(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(o=>o.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:h,error:k}
232=await this.getSession();if(k||!h.session)return this._returnResult({data:null,error:k});r=h.session.access_token}const{header:i,payload:s,signature:a,raw:{header:o,payload:l}}=Ya(r);n!=null&&n.allowExpired||OT(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:s,header:i,signature:a},error:null}}const c=IT(i.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,a,wT(`${o}.${l}`)))throw new Kc("Invalid JWT signature");return{data:{claims:s,header:i,signature:a},error:null}}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}}ra.nextInstanceID={};const dC=ra,hC="2.103.0";let ms="";typeof Deno<"u"?ms="deno":typeof document<"u"?ms="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ms="react-native":ms="node";const fC={"X-Client-Info":`supabase-js-${ms}/${hC}`},pC={headers:fC},mC={schema:"public"},gC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},vC={};function ia(e){"@babel/helpers - typeof";return ia=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},ia(e)}function yC(e,t){if(ia(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kC(e){var t=yC(e,"string");return ia(t)=="symbol"?t:t+""}function wC(e,t,n){return(t=kC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dp(Object(n),!0).forEach(function(r){wC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const bC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),xC=()=>Headers,SC=(e,t,n)=>{const r=bC(n),i=xC();return async(s,a)=>{var o;const l=(o=await t())!==null&&o!==void 0?o:e;let u=new i(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(s,ge(ge({},a),{},{headers:u}))}};function _C(e){return e.endsWith("/")?e:e+"/"}function jC(e,t){var n,r;const{db:i,auth:s,realtime:a,global:o}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:ge(ge({},l),i),auth:ge(ge({},u),s),realtime:ge(ge({},c),a),storage:{},global:ge(ge(ge({},d),o),{},{headers:ge(ge({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=o==null?void 0:o.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function EC(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(_C(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var TC=class extends dC{constructor(e){super(e)}},CC=class{constructor(e,t,n){var r,i;this.supabaseUrl=e,this.supabaseKey=t;const s=EC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const a=`sb-${s.hostname.split(".")[0]}-auth-token`,o={db:mC,realtime:vC,auth:ge(ge({},gC),{},{storageKey:a}),global:pC},l=jC(n??{},o);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},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=SC(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 Jj(new URL("rest/v1",s).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new aT(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new Uj(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={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
232channel(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,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:s,flowType:a,lock:o,debug:l,throwOnError:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new TC({url:this.authUrl.href,headers:ge(ge({},f),c),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:a,lock:o,debug:l,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new AE(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,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const AC=(e,t,n)=>new CC(e,t,n);function PC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}PC()&&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");function RC(){var w,v;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(p=>e===p||e.endsWith("."+p)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i=n?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((v=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:v[1]):void 0,s=window.parent&&window.parent!==window;if(!i||!s)return localStorage;const a=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),o=a?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&o.test(l)?[l]:a?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(p,g,x)=>new Promise(S=>{const _=f();let j=!1,A;const R=L=>{j||(j=!0,clearTimeout(A),window.removeEventListener("message",O),S(L))},O=L=>{if(u.indexOf(L.origin)<0)return;const K=L.data;K&&K.type===c&&K.requestId===_&&R(K)};window.addEventListener("message",O);const z={type:p,requestId:_,projectId:i,key:g};x!==void 0&&(z.value=x);for(const L of u)window.parent.postMessage(z,L);A=setTimeout(()=>R(null),d)});let k=!0;const y=250;return{getItem:async p=>{let g=await h("lovable-preview-auth:get",p);return!g&&k&&(await new Promise(x=>setTimeout(x,y)),g=await h("lovable-preview-auth:get",p)),k=!1,g&&g.ok&&typeof g.value=="string"?g.value===""?(localStorage.removeItem(p),null):g.value:localStorage.getItem(p)},setItem:(p,g)=>(localStorage.setItem(p,g),h("lovable-preview-auth:set",p,g).then(x=>{x&&x.ok&&typeof x.value=="string"&&localStorage.getItem(p)===g&&(x.value===""?localStorage.removeItem(p):localStorage.setItem(p,x.value))})),removeItem:p=>(localStorage.removeItem(p),h("lovable-preview-auth:remove",p).then(()=>{}))}}const NC="https://finjkjszpqoibfxdvfmi.supabase.co",OC="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZpbmpranN6cHFvaWJmeGR2Zm1pIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI5NTk1MzMsImV4cCI6MjA4ODUzNTUzM30.4XBUXPQL5E3wU4Yq55X37mv4EAV8w33T1KSHFuatvyc",f0=AC(NC,OC,{auth:{storage:RC(),persistSession:!0,autoRefreshToken:!0}}),yu="2ivFT8voBh6YQWX9NBIObI",$p="https://www.youtube.com/playlist?list=PLPm6eDm3p0QBFh0J3FCvqGN55MubpcRCZ";function IC(e){const t=Math.round(e/1e3),n=Math.floor(t/60),r=t%60;return`${n}:${r.toString().padStart(2,"0")}`}function LC(e){return new Date(e).toLocaleDateString("et-EE",{day:"numeric",month:"short",year:"numeric"})}const ku=({className:e})=>m.jsx("svg",{className:e,viewBox:"0 0 24 24",children:m.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})}),Mp=({className:e})=>m.jsx("svg",{className:e,viewBox:"0 0 24 24",children:m.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})}),DC=()=>{const[e,t]=b.useState([]),[n,r]=b.useState(!0),[i,s]=b.useState(null);return b.useEffect(()=>{(async()=>{try{const{data:o,error:l}=await f0.functions.invoke("spotify-episodes",{body:{showId:yu}});if(l){s(l.message||"Viga");return}
232const u=((o==null?void 0:o.episodes)||[]).sort((c,d)=>new Date(d.release_date).getTime()-new Date(c.release_date).getTime());t(u)}catch(o){s(o.message)}finally{r(!1)}})()},[]),m.jsx("section",{id:"podcastid",className:"py-20",style:{background:"hsl(var(--muted))"},children:m.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[m.jsxs("div",{className:"mb-12",children:[m.jsx("span",{className:"digi-section-label",children:"Podcast"}),m.jsx("h2",{className:"mt-2 text-3xl md:text-4xl font-extrabold text-secondary leading-tight",children:"Kuula ka podcastina"}),m.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl text-base leading-relaxed",children:"Artikliseerias käsitletud teemad ka podcast-formaadis — kuula teel olles, treenides või töötades."})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[m.jsxs("div",{className:"digi-card p-5 flex flex-col gap-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"#1DB954"},children:m.jsx(ku,{className:"w-5 h-5 fill-white"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-bold text-secondary",children:"Spotify"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:n?"Laen episoode…":i?"Viga laadimisel":`${e.length} episoodi`})]}),m.jsxs("a",{href:`https://open.spotify.com/show/${yu}`,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1 text-xs font-semibold text-primary hover:underline",children:["Ava Spotifys ",m.jsx(dn,{className:"w-3 h-3"})]})]}),n?m.jsx("div",{className:"flex flex-col gap-2",children:[1,2,3].map(a=>m.jsx("div",{className:"h-14 rounded-xl bg-muted animate-pulse"},a))}):i?m.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 rounded-xl bg-secondary/5",children:[m.jsx("p",{className:"text-sm text-muted-foreground",children:i}),m.jsxs("a",{href:`https://open.spotify.com/show/${yu}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm font-semibold px-4 py-2 rounded-full text-white",style:{background:"#1DB954"},children:[m.jsx(ku,{className:"w-4 h-4 fill-white"}),"Ava Spotifys"]})]}):m.jsx("div",{className:"flex flex-col gap-1 max-h-80 overflow-y-auto pr-1",children:e.map((a,o)=>m.jsxs("a",{href:a.external_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-3 p-2.5 rounded-xl hover:bg-muted border border-transparent hover:border-border transition-colors group",children:[m.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:"#1DB954"},children:m.jsx(ku,{className:"w-4 h-4 fill-white"})}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"text-xs font-semibold text-secondary leading-snug line-clamp-2 group-hover:text-primary transition-colors",children:a.name}),m.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[m.jsx(Uv,{className:"w-3 h-3 text-muted-foreground flex-shrink-0"}),m.jsx("span",{className:"text-xs text-muted-foreground",children:IC(a.duration_ms)}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"·"}),m.jsx("span",{className:"text-xs text-muted-foreground",children:LC(a.release_date)})]})]}),m.jsx(dn,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0 mt-1 opacity-0 group-hover:opacity-100 transition-opacity"})]},a.id))})]}),m.jsxs("div",{className:"digi-card p-6 flex flex-col gap-4",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"#FF0000"},children:m.jsx(Mp,{className:"w-6 h-6 fill-white"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-base font-bold text-secondary",children:"YouTube"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"@NutikasEestiEttevõte"})]}),m.jsxs("a",{href:$p,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1 text-xs font-semibold text-primary hover:underline",children:["Ava kanal ",m.jsx(dn,{className:"w-3 h-3"})]})]}),m.jsxs("a",{href:$p,target:"_blank",rel:"noopener noreferrer",className:"group relative flex flex-col items-center justify-center rounded-xl overflow-hidden flex-1",style:{minHeight:"280px",background:"#0f0f0f"},children:[m.jsx("div",{className:"absolute inset-0 opacity-20 group-hover:opacity-30 transition-opacity duration-300",style:{background:"radial-gradient(ellipse at center, #FF0000 0%, transparent 70%)"}}),m.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-5",children:[m.jsx("div",{className:"w-20 h-20 rounded-full flex items-center justify-center shadow-2xl transition-transform duration-300 group-hover:scale-110",style:{background:"#FF0000"},children:m.jsx("svg",{className:"w-9 h-9 fill-white ml-1",viewBox:"0 0 24 24",children:m.jsx("path",{d:"M8 5v14l11-7z"})})}),m.jsxs("div",{className:"text-center",children:[m.jsx("p",{className:"text-white font-bold text-lg",children:"Nutikas Eesti Ettevõte"}),m.jsx("p",{className:"text-white/50 text-sm mt-1",children:"@NutikasEestiEttevõte · YouTube"})]}),m.jsxs("div",{className:"flex items-center gap-2 rounded-full px-5 py-2.5 text-sm font-bold text-white transition-all duration-200 group-hover:gap-3",style:{background:"#FF0000"},children:[m.jsx(Mp,{className:"w-4 h-4 fill-white"}),"Ava YouTube kanal",m.jsx(dn,{className:"w-3.5 h-3.5"})]})]})]})]})]})]})})},p0="PLPm6eDm3p0QAzVydcLSN5hnzHFMM-fdQA",Up=`https://www.youtube.com/playlist?list=${p0}`,$C=()=>{const[e,t]=b.useState([]),[n,r]=b.useState(null),[i,s]=b.useState(!0),[a,o]=b.useState(null);return b.useEffect(()=>{(async()=>{try{const{data:u,error:c}=await f0.functions.invoke("youtube-playlist",{body:{playlistId:p0}});if(c){o(c.message||"YouTube API viga");return}const d=((u==null?void 0:u.videos)||[]).map(f=>({id:f.id,title:f.title,thumbnail:f.thumbnail||"",position:f.position}));t(d)}catch(u){o(u.message)}finally{s(!1)}})()},[]),m.jsx("section",{id:"kursus",className:"py-20 bg-background",children:m.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[m.jsxs("div",{className:"mb-12",children:[m.jsx("span",{className:"digi-section-label",children:"Videokursus"}),m.jsx("h2",{className:"mt-2 text-3xl md:text-4xl font-extrabold text-secondary leading-tight",children:"YouTube'i kursus"}),m.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl text-base leading-relaxed",children:"Digitaliseerimise praktilised näited Eesti ettevõtetest — videona. Iga episood, üks teema, üks lahendus."})]}),m.jsxs("div",{className:"digi-card p-5",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[m.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"#FF0000"},children:m.jsx(rx,{className:"w-5 h-5 text-white"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-bold text-secondary",children:"YouTube'i kursuse playlist"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:i?"Laen videoid…":a?"Viga laadimisel":`${e.length} videot`})]}),m.jsxs("a",{href:Up,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1 text-xs font-semibold text-primary hover:underline",children:["Ava YouTube'is ",m.jsx(dn,{className:"w-3 h-3"})]})]}),m.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[m.jsx("div",{className:"lg:w-2/3 rounded-xl overflow-hidden bg-muted flex-shrink-0",children:n?m.jsx("div",{className:"relative w-full",style:{paddingBottom:"56.25%"},children:m.jsx("iframe",{src:`https://www.youtube.com/embed/${n}?autoplay=0`,frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",title:"YouTube'i kursus — Nutikas Eesti Ettevõte",className:"absolute inset-0 w-full h-full rounded-xl"},n)}):m.jsxs("a",{href:Up,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col items-center justify-center gap-4 h-56 md:h-72 lg:h-full min-h-[260px] bg-secondary/5 hover:bg-secondary/10 transition-colors rounded-xl group",children:[m.jsx("div",{className:"w-14 h-14 roun
232ded-full flex items-center justify-center bg-[#FF0000] group-hover:scale-110 transition-transform shadow-lg",children:m.jsx(Of,{className:"w-6 h-6 text-white fill-white ml-1"})}),m.jsxs("div",{className:"text-center",children:[m.jsx("p",{className:"text-sm font-bold text-secondary",children:"Ava playlist YouTube'is"}),m.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i?"Laen…":a||`${e.length} videot`})]})]})}),!i&&!a&&e.length>0&&m.jsx("div",{className:"lg:w-1/3 lg:max-h-[420px] lg:overflow-y-auto flex flex-col gap-1 pr-1",children:e.map((l,u)=>m.jsxs("button",{onClick:()=>r(l.id),className:`flex items-center gap-3 p-2.5 rounded-xl text-left transition-colors w-full ${n===l.id?"bg-primary/10 border border-primary/30":"hover:bg-muted border border-transparent"}`,children:[m.jsxs("div",{className:"relative flex-shrink-0",children:[m.jsx("img",{src:l.thumbnail,alt:l.title,className:"w-20 h-12 object-cover rounded-lg"}),n===l.id&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-primary/60 rounded-lg",children:m.jsx(Of,{className:"w-3.5 h-3.5 text-primary-foreground fill-primary-foreground"})})]}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("span",{className:"text-xs text-muted-foreground font-medium",children:[u+1,". osa"]}),m.jsx("p",{className:`text-xs font-semibold leading-snug line-clamp-2 ${n===l.id?"text-primary":"text-secondary"}`,children:l.title})]})]},l.id))})]})]})]})})},MC="/assets/olga-profile-Clg6ymZb.jpg",UC=()=>m.jsx("section",{id:"minust",className:"py-20 bg-card",children:m.jsx("div",{className:"container mx-auto px-4 md:px-6",children:m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[m.jsxs("div",{className:"flex flex-col sm:flex-row gap-8 items-start",children:[m.jsxs("div",{className:"flex-shrink-0",children:[m.jsxs("div",{className:"relative w-48 h-56 rounded-xl overflow-hidden",style:{boxShadow:"var(--shadow-card)"},children:[m.jsx("img",{src:MC,alt:"Olga LuÅ¡tÅ¡ik — Digiwise OÜ konsultant",className:"w-full h-full object-cover object-top"}),m.jsx("div",{className:"absolute inset-0 rounded-xl ring-2 ring-primary/20 pointer-events-none"})]}),m.jsx("div",{className:"mt-3 h-1 w-20 rounded-full",style:{background:"var(--gradient-hero)"}})]}),m.jsxs("div",{className:"flex-1",children:[m.jsx("span",{className:"digi-section-label",children:"Minust"}),m.jsx("h2",{className:"mt-2 text-3xl md:text-4xl font-extrabold text-secondary leading-tight",children:"Olga LuÅ¡tÅ¡ik"}),m.jsx("p",{className:"mt-1 text-sm font-semibold text-primary uppercase tracking-wider",children:"Konsultant · Digiwise OÜ"}),m.jsxs("div",{className:"mt-5 space-y-3 text-muted-foreground text-sm leading-relaxed",children:[m.jsx("p",{children:"Olga LuÅ¡tÅ¡ik nõustab ettevõtteid äriprotsesside optimeerimisel, digiüleminekul ja tehisintellekti kasutuselevõtul."}),m.jsx("p",{children:"Digiwise aitab ettevõtetel leida protsessid, kus digitaliseerimine ja AI annavad mõõdetava tulemuse. Kui soovid teada, kus sinu ettevõttes on sarnased võimalused, alusta Digitaliseerimise Teekaardist."}),m.jsx("p",{children:"Mina liitusin Digiwise meeskonnaga 3 aastat tagasi ning tänaseks olen nõustanud üle 50 Eesti ettevõtte digiülemineku teemadel. Enne Digiwise' juhtisin digitoodete arendusmeeskondi erinevates Eesti ja rahvusvahelistes tarkvaraettevõtetes."})]}),m.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[m.jsxs("a",{href:"https://digiwise.ee",target:"_blank",rel:"noopener noreferrer",className:"digi-btn-primary text-xs py-2 px-4",children:["Digiwise.ee",m.jsx(dn,{className:"w-3.5 h-3.5"})]}),m.jsxs("a",{href:"https://linkedin.com",target:"_blank",rel:"noopener noreferrer",className:"digi-btn-outline text-xs py-2 px-4",children:["LinkedIn",m.jsx(Fv,{className:"w-3.5 h-3.5"})]})]})]})]}),m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[m.jsxs("div",{className:"digi-card p-6 text-center",children:[m.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"hsl(var(--primary) / 0.1)"},children:m.jsx(ex,{className:"w-6 h-6 text-primary"})}),m.jsx("div",{className:"text-3xl font-extrabold text-primary",children:"250+"}),m.jsx("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mt-1",children:"Ettevõtet nõustatud"})]}),m.jsxs("div",{className:"digi-card p-6 text-center",children:[m.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"hsl(var(--primary) / 0.1)"},children:m.jsx(Zb,{className:"w-6 h-6 text-primary"})}),m.jsx("div",{className:"text-3xl font-extrabold text-primary",children:"3+"}),m.jsx("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mt-1",children:"Aastat Digiwise'is"})]}),m.jsxs("div",{className:"digi-card p-6 text-center",children:[m.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"hsl(var(--primary) / 0.1)"},children:m.jsx(Bv,{className:"w-6 h-6 text-primary"})}),m.jsx("div",{className:"text-3xl font-extrabold text-primary",children:"2002"}),m.jsx("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mt-1",children:"Digiwise aastast"})]})]})]})})}),Wc=()=>m.jsx("footer",{id:"kontakt",className:"py-12 border-t border-border",style:{background:"hsl(var(--secondary))"},children:m.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-10",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex flex-col leading-none mb-4",children:[m.jsx("span",{className:"text-xl font-extrabold tracking-tight text-white",children:"DIGIWISE"}),m.jsx("span",{className:"text-[9px] font-bold tracking-[0.2em] uppercase text-accent",children:"INSIGHT & SOLUTIONS"})]}),m.jsx("p",{className:"text-white/80 text-sm leading-relaxed",children:"Nutikas Eesti ettevõte — artikliseeria Eesti ettevõtjatele, juhtidele ja digiteekonna läbijatele."})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-accent mb-4",children:"Lehel"}),m.jsx("ul",{className:"space-y-2",children:["Artiklid","Podcastid","Minust","Kontakt"].map(e=>m.jsx("li",{children:m.jsx("a",{href:`#${e.toLowerCase()}`,className:"text-sm text-white/80 hover:text-white transition-colors",children:e})},e))})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-accent mb-4",children:"Kontakt"}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 text-sm text-white/80 hover:text-white transition-colors",children:[m.jsx(tx,{className:"w-4 h-4 text-accent"}),"[email protected]"]}),m.jsxs("a",{href:"https://www.linkedin.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-white/80 hover:text-white transition-colors",children:[m.jsx(Fv,{className:"w-4 h-4 text-accent"}),"LinkedIn"]}),m.jsxs("a",{href:"https://digiwise.ee",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-white/80 hover:text-white transition-colors",children:[m.jsx(dn,{className:"w-4 h-4 text-accent"}),"digiwise.ee"]})]})]})]}),m.jsxs("div",{className:"mt-10 pt-6 border-t border-white/10 flex flex-col sm:flex-row items-center justify-between gap-2",children:[m.jsxs("p",{className:"text-xs text-white/85",children:["© ",new Date().getFullYear()," Digiwise OÜ. Kõik õigused kaitstud."]}),m.jsx("p",{className:"text-xs text-white/85",children:"Nutikas Eesti ettevõte — artikliseeria"})]})]})}),FC=()=>m.jsxs("section",{className:"relative min-h-[80vh] flex items-center overflow-hidden",children:[m.jsx("img",{src:Oj,alt:"",width:1920,height:1080,fetchPriority:"high",decoding:"async",className:"absolute inset-0 w-full h-full object-cover"}),m.jsx("div",{className:"absolute inset-0",style:{background:"hsl(var(--secondary) / 0.7)"}}),m.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-24 opacity-20",children:m.jsx("svg",{viewBox:"0 0 1440 96",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:m.jsx("path",{d:"M0 64L60 58.7C120 53 240 43 360 42.7C480 43 600 53 720 56C840 59 960 53 1080 48C1200 43 1320 37 1380 34.7L1440 32V96H1380C1320 96 1200 96 1080 96C960 96 840 96 720 96C600 96 480 96 360 96C240 96 120 96 60 96H0V64Z",fill:"white"})})}),m.jsx("div",{className:"container relative mx-auto px-4 md:px-6 py-24",children:m.jsxs("div",{className:"max-w-3xl",children:[m.jsx("div",{className:"inline-flex items-center gap-2 rounded-full px-4 py-1.5 text-xs font-bold uppercase tracking-widest mb-6",style:{background:"hsl(var(--accent) / 0.2)",color:"hsl(var(--accent))",border:"1px solid hsl(var(--accent) / 0.3)"},children:"Digipraktika · Digiwise OÜ"}),m.jsxs("h1",{className:"text-4xl md:text-6xl font-extrabold text-white leading-tight mb-6",children:["Nutikas Eesti"," ",m.jsx("span",{style:{color:"hsl(var(--accent))"},children:"ettevõte"})]}),m.jsx("p",{className:"text-white/75 text-base md:text-lg leading-relaxed max-w-xl mb-10",children:"Konkreetsed lood Eesti ettevõtete digitaliseerimise teekonnalt. Protsessid, kitsaskohad ja lahendused — mõeldud ettevõtjatele, juhtidele ja raamatupidajatele."}),m.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[m.jsxs("a",{href:"#artiklid",className:"digi-btn-primary",children:["Loe artikleid",m.jsx(Xb,{className:"w-4 h-4"})]}),m.jsx("a",{href:"#podcastid",className:"digi-btn-outline",style:{borderColor:"hsl(var(--accent))",color:"hsl(var(--accent))"},children:"Kuula podcasti"}),m.jsx("a",{href:"#kursus",className:"digi-btn-outline",style:{borderColor:"hsl(var(--accent))",color:"hsl(var(--accent))"},children:"Vaata kursust"})]})]})})]}),BC=()=>m.jsx("div",{className:"py-8 bg-card border-b border-border",children:m.jsx("div",{className:"container mx-auto px-4 md:px-6",children:m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6 md:gap-0 md:divide-x divide-border",children:[{icon:m.jsx(ix,{className:"w-5 h-5 text-primary"}),value:"250+",label:"Nõustatud ettevõtet"},{icon:m.jsx(ax,{className:"w-5 h-5 text-primary"}),value:"2002",label:"Digiwise aastast"},{icon:m.jsx(Bv,{className:"w-5 h-5 text-primary"}),value:"EE",label:"Fookus Eesti turul"}].map(e=>m.jsxs("div",{className:"flex items-center gap-4 md:px-8",children:[m.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"hsl(var(--primary) / 0.08)"},children:e.icon}),m.jsxs("div",{children:[m.jsx("div",{className:"text-2xl font-extrabold text-secondary",children:e.value}),m.jsx("div",{className:"text-xs text-muted-foreground font-semibold uppercase tracking-wider",children:e.label})]})]},e.label))})})}),zC=()=>m.jsxs("div",{className:"min-h-screen flex flex-col",children:[m.jsx(Rc,{}),m.jsxs("main",{className:"flex-1",children:[m.jsx(FC,{}),m.jsx(BC,{}),m.jsx(Lj,{}),m.jsx(DC,{}),m.jsx($C,{}),m.jsx(UC,{})]}),m.jsx(Wc,{})]}),Xa=e=>{const t=[],n=/\[([^\]]+)\]\(([^)]+)\)/g;let r=0,i;for(;(i=n.exec(e))!==null;)i.index>r&&t.push(e.slice(r,i.index)),t.push(m.jsx("a",{href:i[2],target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80 transition-colors",children:i[1]},i.index)),r=n.lastIndex;return r<e.length&&t.push(e.slice(r)),t},wu="https://nutikas-eesti-ettevote.lovable.app",HC="https://storage.googleapis.com/gpt-engineer-file-uploads/HnNcLd7ALsdvtdsmkiTYWwNkbVP2/social-images/social-1772802906198-Snip20260305_92.webp",ht=(e,t,n
232)=>{let r=document.head.querySelector(e);if(!r){if(e.startsWith("link"))r=document.createElement("link"),r.rel="canonical";else{r=document.createElement("meta");const i=e.match(/\[(name|property)="([^"]+)"\]/);i&&r.setAttribute(i[1],i[2])}document.head.appendChild(r)}r.setAttribute(t,n)},KC=()=>{const{slug:e}=oj(),t=qy.find(n=>n.slug===e);return b.useEffect(()=>{if(window.scrollTo(0,0),t){const n=t.seoTitle||`${t.title} | Nutikas Eesti Ettevõte`,r=t.seoDescription||t.excerpt,i=`${wu}/artikkel/${t.slug}`,s=t.ogImage?`${wu}${t.ogImage}`:HC;document.title=n,ht('meta[name="description"]',"content",r),ht('link[rel="canonical"]',"href",i),ht('meta[property="og:type"]',"content","article"),ht('meta[property="og:url"]',"content",i),ht('meta[property="og:title"]',"content",n),ht('meta[property="og:description"]',"content",r),ht('meta[property="og:image"]',"content",s),ht('meta[name="twitter:card"]',"content","summary_large_image"),ht('meta[name="twitter:url"]',"content",i),ht('meta[name="twitter:title"]',"content",n),ht('meta[name="twitter:description"]',"content",r),ht('meta[name="twitter:image"]',"content",s);const a="article-jsonld";let o=document.getElementById(a);o||(o=document.createElement("script"),o.type="application/ld+json",o.id=a,document.head.appendChild(o)),o.textContent=JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:t.title,description:r,image:s,datePublished:t.date,author:t.author?{"@type":"Person",name:t.author.split(",")[0].trim()}:void 0,publisher:{"@type":"Organization",name:"Digiwise OÜ",url:"https://digiwise.ee"},mainEntityOfPage:{"@type":"WebPage","@id":i}});const l="breadcrumb-jsonld";let u=document.getElementById(l);u||(u=document.createElement("script"),u.type="application/ld+json",u.id=l,document.head.appendChild(u)),u.textContent=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Artiklid",item:`${wu}/#artiklid`},{"@type":"ListItem",position:2,name:t.title,item:i}]})}return()=>{var n,r;document.title="Nutikas Eesti Ettevõte | Digiwise",(n=document.getElementById("article-jsonld"))==null||n.remove(),(r=document.getElementById("breadcrumb-jsonld"))==null||r.remove()}},[t]),!t||!t.content?m.jsxs("div",{className:"min-h-screen flex flex-col",children:[m.jsx(Rc,{}),m.jsx("main",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"text-2xl font-bold text-secondary mb-4",children:"Artiklit ei leitud"}),m.jsxs(Pc,{to:"/#artiklid",className:"text-primary hover:underline inline-flex items-center gap-2",children:[m.jsx(Rf,{className:"w-4 h-4"}),"Tagasi artiklite juurde"]})]})}),m.jsx(Wc,{})]}):m.jsxs("div",{className:"min-h-screen flex flex-col",children:[m.jsx(Rc,{}),m.jsxs("main",{className:"flex-1",children:[m.jsx("div",{className:"py-12",style:{background:"var(--gradient-hero)"},children:m.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[m.jsxs(Pc,{to:"/#artiklid",className:"inline-flex items-center gap-2 text-sm font-semibold text-white/70 hover:text-white transition-colors mb-6",children:[m.jsx(Rf,{className:"w-4 h-4"}),"Kõik artiklid"]}
232),m.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[m.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-3 py-0.5 text-xs font-semibold ${Nc[t.tag]||"bg-muted text-muted-foreground"}`,children:[m.jsx(yc,{className:"w-3 h-3"}),t.tag]}),m.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-white/60",children:[m.jsx(Uv,{className:"w-3 h-3"}),t.readTime]})]}),m.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold text-white leading-tight max-w-3xl",children:t.title})]})}),m.jsx("div",{className:"container mx-auto px-4 md:px-6 py-12",children:m.jsxs("div",{className:"max-w-2xl mx-auto",children:[t.author&&m.jsxs("div",{className:"flex items-center gap-2 mb-6 pb-6 border-b border-border",children:[m.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{background:"hsl(var(--primary) / 0.1)"},children:m.jsx(sx,{className:"w-4 h-4 text-primary"})}),m.jsx("span",{className:"text-sm font-semibold text-secondary",children:t.author})]}),t.originalSource&&m.jsxs("a",{href:t.originalSource.url,target:"_blank",rel:"noopener noreferrer",className:"group flex items-start gap-3 mb-10 p-4 rounded-lg border-l-4 border-primary bg-primary/5 hover:bg-primary/10 transition-colors",children:[m.jsx(dn,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-primary mb-1",children:"Originaalallikas"}),m.jsxs("div",{className:"text-sm text-secondary group-hover:underline",children:["Artikkel on algselt avaldatud ",t.originalSource.label]})]})]}),m.jsx("div",{className:"space-y-6",children:t.content.map((n,r)=>n.type==="heading"?m.jsx("h2",{className:"text-xl md:text-2xl font-extrabold text-secondary mt-10 mb-4 leading-tight",children:Xa(n.text)},r):n.type==="quote"?m.jsx("blockquote",{className:"border-l-4 border-primary pl-5 py-1 text-secondary/80 italic text-base leading-relaxed",children:Xa(n.text)},r):r===t.content.length-1?m.jsx("div",{className:"mt-12 pt-8 border-t border-border rounded-lg",children:n.text.split(`
233`).map((s,a)=>m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-2",children:Xa(s)},a))},r):m.jsx("p",{className:"text-base text-foreground leading-relaxed",children:Xa(n.text)},r))})]})})]}),m.jsx(Wc,{})]})},WC="https://nutikas-eesti-ettevote.lovable.app",Bt=(e,t,n)=>{let r=document.head.querySelector(e);if(!r){if(e.startsWith("link")){r=document.createElement("link");const i=e.match(/\[rel="([^"]+)"\]/);i&&(r.rel=i[1])}else{r=document.createElement("meta");const i=e.match(/\[(name|property)="([^"]+)"\]/);i&&r.setAttribute(i[1],i[2])}document.head.appendChild(r)}r.setAttribute(t,n)},VC=()=>{const e=ga();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname);const t="Lehte ei leitud | Nutikas Eesti Ettevõte",n="Kahjuks ei leidnud me otsitud lehte. Pöördu tagasi avalehele ja jätka lugemist.",r=`${WC}${e.pathname}`;return document.title=t,Bt('meta[name="description"]',"content",n),Bt('meta[name="robots"]',"content","noindex, nofollow"),Bt('link[rel="canonical"]',"href",r),Bt('meta[property="og:type"]',"content","website"),Bt('meta[property="og:title"]',"content",t),Bt('meta[property="og:description"]',"content",n),Bt('meta[property="og:url"]',"content",r),Bt('meta[name="twitter:title"]',"content",t),Bt('meta[name="twitter:description"]',"content",n),Bt('meta[name="twitter:url"]',"content",r),()=>{const i=document.head.querySelector('meta[name="robots"]');i&&i.setAttribute("content","index, follow")}},[e.pathname]),m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),m.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Lehte ei leitud"}),m.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Tagasi avalehele"})]})})},qC=new A_,GC=()=>m.jsx(R_,{client:qC,children:m.jsxs(s_,{children:[m.jsx(zx,{}),m.jsx(w1,{}),m.jsx(Aj,{children:m.jsxs(xj,{children:[m.jsx(mo,{path:"/",element:m.jsx(zC,{})}),m.jsx(mo,{path:"/artikkel/:slug",element:m.jsx(KC,{})}),m.jsx(mo,{path:"*",element:m.jsx(VC,{})})]})})]})});uv(document.getElementById("root")).render(m.jsx(GC,{}));

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.