vendor: 4,098 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Checkout-CG_70QWA.js","assets/FlipCountdown-DgdIKFJh.js","assets/input-BnT4VPj0.js","assets/label-CkB6hm6h.js","assets/metaCapi-Dk85Yl-F.js","assets/shield-check-BUykKfzR.js","assets/ThankYou-Ch-Vho9S.js","assets/circle-check-big-DtpoL6DE.js","assets/PlThankYou-21t2vQ25.js","assets/ThankYou2a-DEoSKWf7.js","assets/Questionnaire1-P4nrgSYD.js","assets/progress-Czcyyy8y.js","assets/Questionnaire1a-CPRGEVZC.js","assets/Optin1-DT4uW1R8.js","assets/Start1a-a8HA9TsD.js","assets/quote-DmqdAiWa.js","assets/lightbulb-BPNmjDC-.js","assets/brain-BW2yYTEI.js","assets/QuizPlatform-DAWwVtP7.js","assets/SiteHeader-Dr0z_NTN.js","assets/PillArrowButton-Bi6wz19Z.js","assets/It-BPJfaG2G.js","assets/app-mockup.png.asset-DiJW_ujp.js","assets/vse-na-enem-mestu.png.asset-BOh0rW4c.js","assets/student-3-CsEPkhsr.js","assets/list-checks-D5Q82YzS.js","assets/zap-DP3Bm0EP.js","assets/ItLpS-33s31JGs.js","assets/target-B7tGxMxT.js","assets/circle-check-D3BPrNUH.js","assets/ItLpP-C8_BtBR0.js","assets/users-CHIPMNYr.js","assets/ItHome-B9kBLfKZ.js","assets/logo-white-CiRdHyxj.js","assets/Test-DAFHdZqK.js","assets/chatgpt-icon.png.asset-Dbx9KRK_.js","assets/Pl-DVIj4Qym.js","assets/FinalCTASectionPl-DAQAS42y.js","assets/PlLp1-BPcYxJoy.js","assets/PlCheckout-DTU9MPRK.js","assets/PlPoradnik-B3wYngEz.js","assets/download-CC8nfSFb.js","assets/mail-Cr87okgj.js","assets/arrow-left-mJGVoeAD.js","assets/PlGrupa-CyRwWv09.js","assets/Rezultat2-Bg6gVzAH.js","assets/FreeGuide-4hq5mUn-.js","assets/MediaKit-IgwX4M8p.js","assets/articles-B6d_ka2e.js","assets/Kontakt-6EtKezT5.js","assets/PlPrivacy-D4xh_hoa.js","assets/shield-CaWTf73K.js","assets/CookiePolicy-CaNu1fE9.js","assets/Article-BJP6lpPq.js","assets/Vsl2-nPyVumIQ.js","assets/HeroSection2-B0NgXTkk.js","assets/Vsl2b-BMAkrND8.js","assets/ThankYou2b-DaRaEL0u.js","assets/Admin-DKJ1wyJ4.js","assets/EarlyBird-Dr86bxhE.js","assets/untitled-red-x.png.asset-Ee1TYN7d.js","assets/NpzLp1-DYXrGLAK.js","assets/PlE8Lp1-BQ3Siykp.js"])))=>i.map(i=>d[i]); 2var xh=e=>{throw TypeError(e)};var Bl=(e,t,r)=>t.has(e)||xh("Cannot "+r);var T=(e,t,r)=>(Bl(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?xh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),q=(e,t,r,n)=>(Bl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(Bl(e,t,"access private method"),r);var Co=(e,t,r,n)=>({set _(s){q(e,t,s,r)},get _(){return T(e,t,n)}});function q0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vm={exports:{}},al={},ym={exports:{}},X={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var po=Symbol.for("react.element"),K0=Symbol.for("react.portal"),G0=Symbol.for("react.fragment"),J0=Symbol.for("react.strict_mode"),Q0=Symbol.for("react.profiler"),Y
vendor: 11,052 bytes, lines 10-26
100=Symbol.for("react.provider"),X0=Symbol.for("react.context"),Z0=Symbol.for("react.forward_ref"),ew=Symbol.for("react.suspense"),tw=Symbol.for("react.memo"),rw=Symbol.for("react.lazy"),_h=Symbol.iterator;function nw(e){return e===null||typeof e!="object"?null:(e=_h&&e[_h]||e["@@iterator"],typeof e=="function"?e:null)}var wm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bm=Object.assign,xm={};function Hs(e,t,r){this.props=e,this.context=t,this.refs=xm,this.updater=r||wm}Hs.prototype.isReactComponent={};Hs.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")};Hs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _m(){}_m.prototype=Hs.prototype;function Yc(e,t,r){this.props=e,this.context=t,this.refs=xm,this.updater=r||wm}var Xc=Yc.prototype=new _m;Xc.constructor=Yc;bm(Xc,Hs.prototype);Xc.isPureReactComponent=!0;var kh=Array.isArray,km=Object.prototype.hasOwnProperty,Zc={current:null},Em={key:!0,ref:!0,__self:!0,__source:!0};function Sm(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)km.call(t,n)&&!Em.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:po,type:e,key:i,ref:o,props:s,_owner:Zc.current}}function sw(e,t){return{$$typeof:po,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ed(e){return typeof e=="object"&&e!==null&&e.$$typeof===po}function iw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Eh=/\/+/g;function Wl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?iw(""+e.key):t.toString(36)}function ia(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case po:case K0:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Wl(o,0):n,kh(s)?(r="",e!=null&&(r=e.replace(Eh,"$&/")+"/"),ia(s,t,r,"",function(u){return u})):s!=null&&(ed(s)&&(s=sw(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Eh,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",kh(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Wl(i,a);o+=ia(i,t,r,l,s)}else if(l=nw(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Wl(i,a++),o+=ia(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Po(e,t,r){if(e==null)return e;var n=[],s=0;return ia(e,n,"","",function(i){return t.call(r,i,s++)}),n}function ow(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ge={current:null},oa={transition:null},aw={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:oa,ReactCurrentOwner:Zc};function Tm(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:Po,forEach:function(e,t,r){Po(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Po(e,function(){t++}),t},toArray:function(e){return Po(e,function(t){return t})||[]},only:function(e){if(!ed(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Hs;X.Fragment=G0;X.Profiler=Q0;X.PureComponent=Yc;X.StrictMode=J0;X.Suspense=ew;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aw;X.act=Tm;X.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=bm({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Zc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)km.call(t,l)&&!Em.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:po,type:e.type,key:s,ref:i,props:n,_owner:o}};X.createContext=function(e){return e={$$typeof:X0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Y0,_context:e},e.Consumer=e};X.createElement=Sm;X.createFactory=function(e){var t=Sm.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:Z0,render:e}};X.isValidElement=ed;X.lazy=function(e){return{$$typeof:rw,_payload:{_status:-1,_result:e},_init:ow}};X.memo=function(e,t){return{$$typeof:tw,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=oa.transition;oa.transition={};try{e()}finally{oa.transition=t}};X.unstable_act=Tm;X.useCallback=function(e,t){return Ge.current.useCallback(e,t)};X.useContext=function(e){return Ge.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};X.useEffect=function(e,t){return Ge.current.useEffect(e,t)};X.useId=function(){return Ge.current.useId()};X.useImperativeHandle=function(e,t,r){return Ge.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return Ge.current.useMemo(e,t)};X.useReducer=function(e,t,r){return Ge.current.useReducer(e,t,r)};X.useRef=function(e){return Ge.current.useRef(e)};X.useState=function(e){return Ge.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return Ge.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return Ge.current.useTransition()};X.version="18.3.1";ym.exports=X;var b=ym.exports;const O=gm(b),Cm=q0({__proto__:null,default:O},[b]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var lw=b,uw=Symbol.for("react.element"),cw=Symbol.for("react.fragment"),dw=Object.prototype.hasOwnProperty,hw=lw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fw={key:!0,ref:!0,__self:!0,__source:!0};function Pm(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)dw.call(t,n)&&!fw.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:uw,type:e,key:i,ref:o,props:s,_owner:hw.current}}al.Fragment=cw;al.jsx=Pm;al.jsxs=Pm;vm.exports=al;var m=vm.exports,Rm={exports:{}},dt={},jm={exports:{}},Am={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(C,P){var D=C.length;C.push(P);e:for(;0<D;){var J=D-1>>>1,U=C[J];if(0<s(U,P))C[J]=P,C[D]=U,D=J;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var P=C[0],D=C.pop();if(D!==P){C[0]=D;e:for(var J=0,U=C.length,Y=U>>>1;J<Y;){var te=2*(J+1)-1,ke=C[te],Le=te+1,se=C[Le];if(0>s(ke,D))Le<U&&0>s(se,ke)?(C[J]=se,C[Le]=D,J=Le):(C[J]=ke,C[te]=D,J=te);else if(Le<U&&0>s(se,D))C[J]=se,C[Le]=D,J=Le;else break e}}return P}function s(C,P){var D=C.sortIndex-P.sortIndex;return D!==0?D:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,w=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 y(C){for(var P=r(u);P!==null;){if(P.callback===null)n(u);else if(P.startTime<=C)n(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(u)}}function _(C){if(v=!1,y(C),!g)if(r(l)!==null)g=!0,W(k);else{var P=r(u);P!==null&&G(_,P.startTime-C)}}function k(C,P){g=!1,v&&(v=!1,w(R),R=-1),h=!0;var D=f;try{for(y(P),d=r(l);d!==null&&(!(d.expirationTime>P)||C&&!B());){var J=d.callback;if(typeof J=="function"){d.callback=null,f=d.priorityLevel;var U=J(d.expirationTime<=P);P=e.unstable_now(),typeof U=="function"?d.callback=U:d===r(l)&&n(l),y(P)}else n(l);d=r(l)}if(d!==null)var Y=!0;else{var te=r(u);te!==null&&G(_,te.startTime-P),Y=!1}return Y}finally{d=null,f=D,h=!1}}var E=!1,S=null,R=-1,A=5,N=-1;function B(){return!(e.unstable_now()-N<A)}function $(){if(S!==null){var C=e.unstable_now();N=C;var P=!0;try{P=S(!0,C)}finally{P?V():(E=!1,S=null)}}else E=!1}var V;if(typeof p=="function")V=function(){p($)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,ee=L.port2;L.port1.onmessage=$,V=function(){ee.postMessage(null)}}else V=function(){x($,0)};function W(C){S=C,E||(E=!0,V())}function G(C,P){R=x(function(){C(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,W(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var D=f;f=P;try{return C()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var D=f;f=C;try{return P()}finally{f=D}},e.unstable_scheduleCallback=function(C,P,D){var J=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?J+D:J):D=J,C){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}
vendor: 4,614 bytes, lines 26-34
26return U=D+U,C={id:c++,callback:P,priorityLevel:C,startTime:D,expirationTime:U,sortIndex:-1},D>J?(C.sortIndex=D,t(u,C),r(l)===null&&C===r(u)&&(v?(w(R),R=-1):v=!0,G(_,D-J))):(C.sortIndex=U,t(l,C),g||h||(g=!0,W(k))),C},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(C){var P=f;return function(){var D=f;f=P;try{return C.apply(this,arguments)}finally{f=D}}}})(Am);jm.exports=Am;var pw=jm.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var mw=b,ct=pw;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Om=new Set,Ii={};function Vn(e,t){$s(e,t),$s(e+"Capture",t)}function $s(e,t){for(Ii[e]=t,e=0;e<t.length;e++)Om.add(t[e])}var wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ou=Object.prototype.hasOwnProperty,gw=/^[: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]*$/,Sh={},Th={};function vw(e){return Ou.call(Th,e)?!0:Ou.call(Sh,e)?!1:gw.test(e)?Th[e]=!0:(Sh[e]=!0,!1)}function yw(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ww(e,t,r,n){if(t===null||typeof t>"u"||yw(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new Je(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){Ie[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var td=/[\-:]([a-z])/g;function rd(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
34-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(td,rd);Ie[t]=new Je(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(td,rd);Ie[t]=new Je(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(td,rd);Ie[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function nd(e,t,r,n){var s=Ie.hasOwnProperty(t)?Ie[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ww(t,r,s,n)&&(r=null),n||s===null?vw(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Sr=mw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ro=Symbol.for("react.element"),os=Symbol.for("react.portal"),as=Symbol.for("react.fragment"),sd=Symbol.for("react.strict_mode"),Nu=Symbol.for("react.profiler"),Nm=Symbol.for("react.provider"),Im=Symbol.for("react.context"),id=Symbol.for("react.forward_ref"),Iu=Symbol.for("react.suspense"),Lu=Symbol.for("react.suspense_list"),od=Symbol.for("react.memo"),Dr=Symbol.for("react.lazy"),Lm=Symbol.for("react.offscreen"),Ch=Symbol.iterator;function ri(e){return e===null||typeof e!="object"?null:(e=Ch&&e[Ch]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,Vl;function fi(e){if(Vl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Vl=t&&t[1]||""}return` 35`+Vl+e}var Hl=!1;function ql(e,t){if(!e||Hl)return"";Hl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),i=n.stack.split(` 37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Hl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?fi(e):""}function bw(e){switch(e.tag){case 5:return fi(e.type);case 16:return fi("Lazy");case 13:return fi("Suspense");case 19:return fi("SuspenseList");case 0:case 2:case 15:return e=ql(e.type,!1),e;case 11:return e=ql(e.type.render,!1),e;case 1:return e=ql(e.type,!0),e;default:return""}}function $u(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 as:return"Fragment";case os:return"Portal";case Nu:return"Profiler";case sd:return"StrictMode";case Iu:return"Suspense";case Lu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Im:return(e.displayName||"Context")+".Consumer";case Nm:return(e._context.displayName||"Context")+".Provider";case id:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case od:return t=e.displayName||null,t!==null?t:$u(e.type)||"Memo";case Dr:t=e._payload,e=e._init;try{return $u(e(t))}catch{}}return null}function xw(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 $u(t);case 8:return t===sd?"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 an(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _w(e){var t=$m(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jo(e){e._valueTracker||(e._valueTracker=_w(e))}function Dm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=$m(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function xa(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 Du(e,t){var r=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ph(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=an(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zm(e,t){t=t.checked,t!=null&&nd(e,"checked",t,!1)}function zu(e,t){zm(e,t);var r=an(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mu(e,t.type,r):t.hasOwnProperty("defaultValue")&&Mu(e,t.type,an(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rh(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Mu(e,t,r){(t!=="number"||xa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var pi=Array.isArray;function ws(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+an(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Uu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jh(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if(pi(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:an(r)}}function Mm(e,t){var r=an(t.value),n=an(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Ah(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Um(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 Fu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Um(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ao,Fm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ao=Ao||document.createElement("div"),Ao.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ao.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Li(e,t){if(t){var r=e.firstChild;
vendor: 10,020 bytes, line 38
38if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xi={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},kw=["Webkit","ms","Moz","O"];Object.keys(xi).forEach(function(e){kw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xi[t]=xi[e]})});function Bm(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xi.hasOwnProperty(e)&&xi[e]?(""+t).trim():t+"px"}function Wm(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Bm(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Ew=ge({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 Bu(e,t){if(t){if(Ew[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Wu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vu=null;function ad(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hu=null,bs=null,xs=null;function Oh(e){if(e=vo(e)){if(typeof Hu!="function")throw Error(j(280));var t=e.stateNode;t&&(t=hl(t),Hu(e.stateNode,e.type,t))}}function Vm(e){bs?xs?xs.push(e):xs=[e]:bs=e}function Hm(){if(bs){var e=bs,t=xs;if(xs=bs=null,Oh(e),t)for(e=0;e<t.length;e++)Oh(t[e])}}function qm(e,t){return e(t)}function Km(){}var Kl=!1;function Gm(e,t,r){if(Kl)return e(t,r);Kl=!0;try{return qm(e,t,r)}finally{Kl=!1,(bs!==null||xs!==null)&&(Km(),Hm())}}function $i(e,t){var r=e.stateNode;if(r===null)return null;var n=hl(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(j(231,t,typeof r));return r}var qu=!1;if(wr)try{var ni={};Object.defineProperty(ni,"passive",{get:function(){qu=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{qu=!1}function Sw(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var _i=!1,_a=null,ka=!1,Ku=null,Tw={onError:function(e){_i=!0,_a=e}};function Cw(e,t,r,n,s,i,o,a,l){_i=!1,_a=null,Sw.apply(Tw,arguments)}function Pw(e,t,r,n,s,i,o,a,l){if(Cw.apply(this,arguments),_i){if(_i){var u=_a;_i=!1,_a=null}else throw Error(j(198));ka||(ka=!0,Ku=u)}}function Hn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Jm(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 Nh(e){if(Hn(e)!==e)throw Error(j(188))}function Rw(e){var t=e.alternate;if(!t){if(t=Hn(e),t===null)throw Error(j(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Nh(s),e;if(i===n)return Nh(s),t;i=i.sibling}throw Error(j(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(j(189))}}if(r.alternate!==n)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function Qm(e){return e=Rw(e),e!==null?Ym(e):null}function Ym(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ym(e);if(t!==null)return t;e=e.sibling}return null}var Xm=ct.unstable_scheduleCallback,Ih=ct.unstable_cancelCallback,jw=ct.unstable_shouldYield,Aw=ct.unstable_requestPaint,xe=ct.unstable_now,Ow=ct.unstable_getCurrentPriorityLevel,ld=ct.unstable_ImmediatePriority,Zm=ct.unstable_UserBlockingPriority,Ea=ct.unstable_NormalPriority,Nw=ct.unstable_LowPriority,eg=ct.unstable_IdlePriority,ll=null,er=null;function Iw(e){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(ll,e,void 0,(e.current.flags&128)===128)}catch{}}var zt=Math.clz32?Math.clz32:Dw,Lw=Math.log,$w=Math.LN2;function Dw(e){return e>>>=0,e===0?32:31-(Lw(e)/$w|0)|0}var Oo=64,No=4194304;function mi(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 Sa(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=mi(a):(i&=o,i!==0&&(n=mi(i)))}else o=r&~s,o!==0?n=mi(o):i!==0&&(n=mi(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-zt(t),s=1<<r,n|=e[r],t&=~s;return n}function zw(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 Mw(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-zt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=zw(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Gu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tg(){var e=Oo;return Oo<<=1,!(Oo&4194240)&&(Oo=64),e}function Gl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function mo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zt(t),e[t]=r}function Uw(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-zt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function ud(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-zt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ie=0;function rg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ng,cd,sg,ig,og,Ju=!1,Io=[],Yr=null,Xr=null,Zr=null,Di=new Map,zi=new Map,Mr=[],Fw="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 Lh(e,t){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function si(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=vo(t),t!==null&&cd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Bw(e,t,r,n,s){switch(t){case"focusin":return Yr=si(Yr,e,t,r,n,s),!0;case"dragenter":return Xr=si(Xr,e,t,r,n,s),!0;case"mouseover":return Zr=si(Zr,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Di.set(i,si(Di.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,zi.set(i,si(zi.get(i)||null,e,t,r,n,s)),!0}return!1}function ag(e){var t=Tn(e.target);if(t!==null){var r=Hn(t);if(r!==null){if(t=r.tag,t===13){if(t=Jm(r),t!==null){e.blockedOn=t,og(e.priority,function(){sg(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function aa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Qu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Vu=n,r.target.dispatchEvent(n),Vu=null}else return t=vo(r),t!==null&&cd(t),e.blockedOn=r,!1;t.shift()}return!0}function $h(e,t,r){aa(e)&&r.delete(t)}function Ww(){Ju=!1,Yr!==null&&aa(Yr)&&(Yr=null),Xr!==null&&aa(Xr)&&(Xr=null),Zr!==null&&aa(Zr)&&(Zr=null),Di.forEach($h),zi.forEac
vendor: 11,826 bytes, line 38
38h($h)}function ii(e,t){e.blockedOn===t&&(e.blockedOn=null,Ju||(Ju=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,Ww)))}function Mi(e){function t(s){return ii(s,e)}if(0<Io.length){ii(Io[0],e);for(var r=1;r<Io.length;r++){var n=Io[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Yr!==null&&ii(Yr,e),Xr!==null&&ii(Xr,e),Zr!==null&&ii(Zr,e),Di.forEach(t),zi.forEach(t),r=0;r<Mr.length;r++)n=Mr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Mr.length&&(r=Mr[0],r.blockedOn===null);)ag(r),r.blockedOn===null&&Mr.shift()}var _s=Sr.ReactCurrentBatchConfig,Ta=!0;function Vw(e,t,r,n){var s=ie,i=_s.transition;_s.transition=null;try{ie=1,dd(e,t,r,n)}finally{ie=s,_s.transition=i}}function Hw(e,t,r,n){var s=ie,i=_s.transition;_s.transition=null;try{ie=4,dd(e,t,r,n)}finally{ie=s,_s.transition=i}}function dd(e,t,r,n){if(Ta){var s=Qu(e,t,r,n);if(s===null)su(e,t,n,Ca,r),Lh(e,n);else if(Bw(s,e,t,r,n))n.stopPropagation();else if(Lh(e,n),t&4&&-1<Fw.indexOf(e)){for(;s!==null;){var i=vo(s);if(i!==null&&ng(i),i=Qu(e,t,r,n),i===null&&su(e,t,n,Ca,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else su(e,t,n,null,r)}}var Ca=null;function Qu(e,t,r,n){if(Ca=null,e=ad(n),e=Tn(e),e!==null)if(t=Hn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Jm(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ca=e,null}function lg(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(Ow()){case ld:return 1;case Zm:return 4;case Ea:case Nw:return 16;case eg:return 536870912;default:return 16}default:return 16}}var Gr=null,hd=null,la=null;function ug(){if(la)return la;var e,t=hd,r=t.length,n,s="value"in Gr?Gr.value:Gr.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return la=s.slice(e,1<n?1-n:void 0)}function ua(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 Lo(){return!0}function Dh(){return!1}function ht(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Lo:Dh,this.isPropagationStopped=Dh,this}return ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Lo)},persist:function(){},isPersistent:Lo}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fd=ht(qs),go=ge({},qs,{view:0,detail:0}),qw=ht(go),Jl,Ql,oi,ul=ge({},go,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pd,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!==oi&&(oi&&e.type==="mousemove"?(Jl=e.screenX-oi.screenX,Ql=e.screenY-oi.screenY):Ql=Jl=0,oi=e),Jl)},movementY:function(e){return"movementY"in e?e.movementY:Ql}}),zh=ht(ul),Kw=ge({},ul,{dataTransfer:0}),Gw=ht(Kw),Jw=ge({},go,{relatedTarget:0}),Yl=ht(Jw),Qw=ge({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),Yw=ht(Qw),Xw=ge({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zw=ht(Xw),eb=ge({},qs,{data:0}),Mh=ht(eb),tb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rb={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"},nb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nb[e])?!!t[e]:!1}function pd(){return sb}var ib=ge({},go,{key:function(e){if(e.key){var t=tb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ua(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pd,charCode:function(e){return e.type==="keypress"?ua(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ua(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ob=ht(ib),ab=ge({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=ht(ab),lb=ge({},go,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pd}),ub=ht(lb),cb=ge({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),db=ht(cb),hb=ge({},ul,{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}),fb=ht(hb),pb=[9,13,27,32],md=wr&&"CompositionEvent"in window,ki=null;wr&&"documentMode"in document&&(ki=document.documentMode);var mb=wr&&"TextEvent"in window&&!ki,cg=wr&&(!md||ki&&8<ki&&11>=ki),Fh=" ",Bh=!1;function dg(e,t){switch(e){case"keyup":return pb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ls=!1;function gb(e,t){switch(e){case"compositionend":return hg(t);case"keypress":return t.which!==32?null:(Bh=!0,Fh);case"textInput":return e=t.data,e===Fh&&Bh?null:e;default:return null}}function vb(e,t){if(ls)return e==="compositionend"||!md&&dg(e,t)?(e=ug(),la=hd=Gr=null,ls=!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 cg&&t.locale!=="ko"?null:t.data;default:return null}}var yb={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 Wh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yb[e.type]:t==="textarea"}function fg(e,t,r,n){Vm(n),t=Pa(t,"onChange"),0<t.length&&(r=new fd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ei=null,Ui=null;function wb(e){Eg(e,0)}function cl(e){var t=ds(e);if(Dm(t))return e}function bb(e,t){if(e==="change")return t}var pg=!1;if(wr){var Xl;if(wr){var Zl="oninput"in document;if(!Zl){var Vh=document.createElement("div");Vh.setAttribute("oninput","return;"),Zl=typeof Vh.oninput=="function"}Xl=Zl}else Xl=!1;pg=Xl&&(!document.documentMode||9<document.documentMode)}function Hh(){Ei&&(Ei.detachEvent("onpropertychange",mg),Ui=Ei=null)}function mg(e){if(e.propertyName==="value"&&cl(Ui)){var t=[];fg(t,Ui,e,ad(e)),Gm(wb,t)}}function xb(e,t,r){e==="focusin"?(Hh(),Ei=t,Ui=r,Ei.attachEvent("onpropertychange",mg)):e==="focusout"&&Hh()}function _b(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cl(Ui)}function kb(e,t){if(e==="click")return cl(t)}function Eb(e,t){if(e==="input"||e==="change")return cl(t)}function Sb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Sb;function Fi(e,t){if(Ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Ou.call(t,s)||!Ut(e[s],t[s]))return!1}return!0}function qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var r=qh(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qh(r)}}function gg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vg(){for(var e=window,t=xa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=xa(e.document)}return t}function gd(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 Tb(e){var t=vg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&gg(r.ownerDocument.documentElement,r)){if(n!==null&&gd(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Kh(r,i);var o=Kh(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Cb=wr&&"documentMode"in document&&11>=document.documentMode,us=null,Yu=null,Si=null,Xu=!1;function Gh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Xu||us==null||us!==xa(n)||(n=us,"selectionStart"in n&&gd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),Si&&Fi(Si,n)||(Si=n,n=Pa(Yu,"onSelect"),0<n.length&&(t=new fd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=us)))}function $o(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var cs={animationend:$o("Animation","AnimationEnd"),animationiteration:$o("Animation","AnimationIteration"),animationstart:$o("Animation","AnimationStart"),transitionend:$o("Transition","TransitionEnd")},eu={},yg={};wr&&(yg=document.createElement("div").style,"AnimationEvent"in window||(delete cs.animationend.animation,delete cs.animationiteration.animation,delete cs.animationstart.animation),"TransitionEvent"in window||delete cs.transitionend.transition);function dl(e){if(eu[e])return eu[e];if(!cs[e])return e;var t=cs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in yg)return eu[e]=t[r];return e}var wg=dl("animationend"),bg=dl("animationiteration"),xg=dl("animationstart"),_g=dl("transitionend"),kg=new Map,Jh="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 fn(e,t){kg.set(e,t),Vn(t,[e])}for(var tu=0;tu<Jh.length;tu++){var ru=Jh[tu],Pb=ru.toLowerCase(),Rb=ru[0].toUpperCase()+ru.slice(1);fn(Pb,"on"+Rb)}fn(wg,"onAnimationEnd");fn(bg,"onAnimationIteration");fn(xg,"onAnimationStart");fn("dblclick","onDoubleClick");fn("focusin","onFocus");fn("focusout","onBlur");fn(_g,"onTransitionEnd");$s("onMouseEnter",["mouseout","mouseover"]);$s("onMouseLeave",["mouseout","mouseover"]);$s("onPointerEnter",["pointerout","pointerover"]);$s("onPointerLeave",["pointerout","pointerover"]);Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gi="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(" "),jb=new Set("cancel close invalid load scroll toggle".split(" ").concat(gi));function Qh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Pw(n,t,void 0,e),e.currentTarget=null}function Eg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Qh(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Qh(s,a,u),i=l}}}if(ka)throw e=Ku,ka=!1,Ku=null,e}function ce(e,t){var r=t[nc];r===void 0&&(r=t[nc]=new Set);var n=e+"__bubble";r.has(n)||(Sg(t,e,2,!1),r.add(n))}function nu(e,t,r){var n=0;t&&(n|=4),Sg(r,e,n,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function Bi(e){if(!e[Do]){e[Do]=!0,Om.forEach(function(r){r!=="selectionchange"&&(jb.has(r)||nu(r,!1,e),nu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,nu("selectionchange",!1,t))}}function Sg(e,t,r,n){switch(lg(t)){case 1:var s=Vw;break;case 4:s=Hw;break;default:s=dd}r=s.bind(null,t,r,e),s=void 0,!qu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function su(e,t,r,n,s){var i=n;
vendor: 5,445 bytes, lines 38-39
38if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Tn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Gm(function(){var u=i,c=ad(r),d=[];e:{var f=kg.get(e);if(f!==void 0){var h=fd,g=e;switch(e){case"keypress":if(ua(r)===0)break e;case"keydown":case"keyup":h=ob;break;case"focusin":g="focus",h=Yl;break;case"focusout":g="blur",h=Yl;break;case"beforeblur":case"afterblur":h=Yl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Gw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=ub;break;case wg:case bg:case xg:h=Yw;break;case _g:h=db;break;case"scroll":h=qw;break;case"wheel":h=fb;break;case"copy":case"cut":case"paste":h=Zw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Uh}var v=(t&4)!==0,x=!v&&e==="scroll",w=v?f!==null?f+"Capture":null:f;v=[];for(var p=u,y;p!==null;){y=p;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,w!==null&&(_=$i(p,w),_!=null&&v.push(Wi(p,_,y)))),x)break;p=p.return}0<v.length&&(f=new h(f,g,null,r,c),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Vu&&(g=r.relatedTarget||r.fromElement)&&(Tn(g)||g[br]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=r.relatedTarget||r.toElement,h=u,g=g?Tn(g):null,g!==null&&(x=Hn(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(v=zh,_="onMouseLeave",w="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=Uh,_="onPointerLeave",w="onPointerEnter",p="pointer"),x=h==null?f:ds(h),y=g==null?f:ds(g),f=new v(_,p+"leave",h,r,c),f.target=x,f.relatedTarget=y,_=null,Tn(c)===u&&(v=new v(w,p+"enter",g,r,c),v.target=y,v.relatedTarget=x,_=v),x=_,h&&g)t:{for(v=h,w=g,p=0,y=v;y;y=Xn(y))p++;for(y=0,_=w;_;_=Xn(_))y++;for(;0<p-y;)v=Xn(v),p--;for(;0<y-p;)w=Xn(w),y--;for(;p--;){if(v===w||w!==null&&v===w.alternate)break t;v=Xn(v),w=Xn(w)}v=null}else v=null;h!==null&&Yh(d,f,h,v,!1),g!==null&&x!==null&&Yh(d,x,g,v,!0)}}e:{if(f=u?ds(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=bb;else if(Wh(f))if(pg)k=Eb;else{k=_b;var E=xb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=kb);if(k&&(k=k(e,u))){fg(d,k,r,c);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Mu(f,"number",f.value)}switch(E=u?ds(u):window,e){case"focusin":(Wh(E)||E.contentEditable==="true")&&(us=E,Yu=u,Si=null);break;case"focusout":Si=Yu=us=null;break;case"mousedown":Xu=!0;break;case"contextmenu":case"mouseup":case"dragend":Xu=!1,Gh(d,r,c);break;case"selectionchange":if(Cb)break;case"keydown":case"keyup":Gh(d,r,c)}var S;if(md)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else ls?dg(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(cg&&r.locale!=="ko"&&(ls||R!=="onCompositionStart"?R==="onCompositionEnd"&&ls&&(S=ug()):(Gr=c,hd="value"in Gr?Gr.value:Gr.textContent,ls=!0)),E=Pa(u,R),0<E.length&&(R=new Mh(R,e,null,r,c),d.push({event:R,listeners:E}),S?R.data=S:(S=hg(r),S!==null&&(R.data=S)))),(S=mb?gb(e,r):vb(e,r))&&(u=Pa(u,"onBeforeInput"),0<u.length&&(c=new Mh("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}Eg(d,t)})}function Wi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Pa(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=$i(e,r),i!=null&&n.unshift(Wi(e,i,s)),i=$i(e,t),i!=null&&n.push(Wi(e,i,s))),e=e.return}return n}function Xn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Yh(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=$i(r,i),l!=null&&o.unshift(Wi(r,l,a))):s||(l=$i(r,i),l!=null&&o.push(Wi(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Ab=/\r\n?/g,Ob=/\u0000|\uFFFD/g;function Xh(e){return(typeof e=="string"?e:""+e).replace(Ab,` 39`).replace(Ob,"")}function zo(e,t,r){if(t=Xh(t),Xh(e)!==t&&r)throw Error(j(425))}function Ra(){}var Zu=null,ec=null;function tc(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 rc=typeof setTimeout=="function"?setTimeout:void 0,Nb=typeof clearTimeout=="function"?clearTimeout:void 0,Zh=typeof Promise=="function"?Promise:void 0,Ib=typeof queueMicrotask=="function"?queueMicrotask:typeof Zh<"u"?function(e){return Zh.resolve(null).then(e).catch(Lb)}:rc;
vendor: 4,903 bytes, line 39
39function Lb(e){setTimeout(function(){throw e})}function iu(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Mi(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Mi(t)}function en(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 ef(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ks=Math.random().toString(36).slice(2),Xt="__reactFiber$"+Ks,Vi="__reactProps$"+Ks,br="__reactContainer$"+Ks,nc="__reactEvents$"+Ks,$b="__reactListeners$"+Ks,Db="__reactHandles$"+Ks;function Tn(e){var t=e[Xt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[br]||r[Xt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ef(e);e!==null;){if(r=e[Xt])return r;e=ef(e)}return t}e=r,r=e.parentNode}return null}function vo(e){return e=e[Xt]||e[br],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ds(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function hl(e){return e[Vi]||null}var sc=[],hs=-1;function pn(e){return{current:e}}function de(e){0>hs||(e.current=sc[hs],sc[hs]=null,hs--)}function le(e,t){hs++,sc[hs]=e.current,e.current=t}var ln={},We=pn(ln),et=pn(!1),zn=ln;function Ds(e,t){var r=e.type.contextTypes;if(!r)return ln;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function tt(e){return e=e.childContextTypes,e!=null}function ja(){de(et),de(We)}function tf(e,t,r){if(We.current!==ln)throw Error(j(168));le(We,t),le(et,r)}function Tg(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(j(108,xw(e)||"Unknown",s));return ge({},r,n)}function Aa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,zn=We.current,le(We,e),le(et,et.current),!0}function rf(e,t,r){var n=e.stateNode;if(!n)throw Error(j(169));r?(e=Tg(e,t,zn),n.__reactInternalMemoizedMergedChildContext=e,de(et),de(We),le(We,e)):de(et),le(et,r)}var pr=null,fl=!1,ou=!1;function Cg(e){pr===null?pr=[e]:pr.push(e)}function zb(e){fl=!0,Cg(e)}function mn(){if(!ou&&pr!==null){ou=!0;var e=0,t=ie;try{var r=pr;for(ie=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}pr=null,fl=!1}catch(s){throw pr!==null&&(pr=pr.slice(e+1)),Xm(ld,mn),s}finally{ie=t,ou=!1}}return null}var fs=[],ps=0,Oa=null,Na=0,gt=[],vt=0,Mn=null,gr=1,vr="";function kn(e,t){fs[ps++]=Na,fs[ps++]=Oa,Oa=e,Na=t}function Pg(e,t,r){gt[vt++]=gr,gt[vt++]=vr,gt[vt++]=Mn,Mn=e;var n=gr;e=vr;var s=32-zt(n)-1;n&=~(1<<s),r+=1;var i=32-zt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,gr=1<<32-zt(t)+s|r<<s|n,vr=i+e}else gr=1<<i|r<<s|n,vr=e}function vd(e){e.return!==null&&(kn(e,1),Pg(e,1,0))}function yd(e){for(;e===Oa;)Oa=fs[--ps],fs[ps]=null,Na=fs[--ps],fs[ps]=null;for(;e===Mn;)Mn=gt[--vt],gt[vt]=null,vr=gt[--vt],gt[vt]=null,gr=gt[--vt],gt[vt]=null}var lt=null,at=null,fe=!1,$t=null;function Rg(e,t){var r=yt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function nf(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,at=en(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Mn!==null?{id:gr,overflow:vr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,lt=e,at=null,!0):!1;default:return!1}}function ic(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oc(e){if(fe){var t=at;if(t){var r=t;if(!nf(e,t)){if(ic(e))throw Error(j(418));t=en(r.nextSibling);var n=lt;t&&nf(e,t)?Rg(n,r):(e.flags=e.flags&-4097|2,fe=!1,lt=e)}}else{if(ic(e))throw Error(j(418));e.flags=e.flags&-4097|2,fe=!1,lt=e}}}function sf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Mo(e){if(e!==lt)return!1;if(!fe)return sf(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tc(e.type,e.memoizedProps)),t&&(t=at)){if(ic(e))throw jg(),Error(j(418));for(;t;)Rg(e,t),t=en(t.nextSibling)}if(sf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){at=en(e.nextSibling);break e}t--}
vendor: 11,695 bytes, line 39
39else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}at=null}}else at=lt?en(e.stateNode.nextSibling):null;return!0}function jg(){for(var e=at;e;)e=en(e.nextSibling)}function zs(){at=lt=null,fe=!1}function wd(e){$t===null?$t=[e]:$t.push(e)}var Mb=Sr.ReactCurrentBatchConfig;function ai(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(j(309));var n=r.stateNode}if(!n)throw Error(j(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(j(284));if(!r._owner)throw Error(j(290,e))}return e}function Uo(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function of(e){var t=e._init;return t(e._payload)}function Ag(e){function t(w,p){if(e){var y=w.deletions;y===null?(w.deletions=[p],w.flags|=16):y.push(p)}}function r(w,p){if(!e)return null;for(;p!==null;)t(w,p),p=p.sibling;return null}function n(w,p){for(w=new Map;p!==null;)p.key!==null?w.set(p.key,p):w.set(p.index,p),p=p.sibling;return w}function s(w,p){return w=sn(w,p),w.index=0,w.sibling=null,w}function i(w,p,y){return w.index=y,e?(y=w.alternate,y!==null?(y=y.index,y<p?(w.flags|=2,p):y):(w.flags|=2,p)):(w.flags|=1048576,p)}function o(w){return e&&w.alternate===null&&(w.flags|=2),w}function a(w,p,y,_){return p===null||p.tag!==6?(p=fu(y,w.mode,_),p.return=w,p):(p=s(p,y),p.return=w,p)}function l(w,p,y,_){var k=y.type;return k===as?c(w,p,y.props.children,_,y.key):p!==null&&(p.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Dr&&of(k)===p.type)?(_=s(p,y.props),_.ref=ai(w,p,y),_.return=w,_):(_=ga(y.type,y.key,y.props,null,w.mode,_),_.ref=ai(w,p,y),_.return=w,_)}function u(w,p,y,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=pu(y,w.mode,_),p.return=w,p):(p=s(p,y.children||[]),p.return=w,p)}function c(w,p,y,_,k){return p===null||p.tag!==7?(p=Dn(y,w.mode,_,k),p.return=w,p):(p=s(p,y),p.return=w,p)}function d(w,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=fu(""+p,w.mode,y),p.return=w,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ro:return y=ga(p.type,p.key,p.props,null,w.mode,y),y.ref=ai(w,null,p),y.return=w,y;case os:return p=pu(p,w.mode,y),p.return=w,p;case Dr:var _=p._init;return d(w,_(p._payload),y)}if(pi(p)||ri(p))return p=Dn(p,w.mode,y,null),p.return=w,p;Uo(w,p)}return null}function f(w,p,y,_){var k=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(w,p,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ro:return y.key===k?l(w,p,y,_):null;case os:return y.key===k?u(w,p,y,_):null;case Dr:return k=y._init,f(w,p,k(y._payload),_)}if(pi(y)||ri(y))return k!==null?null:c(w,p,y,_,null);Uo(w,y)}return null}function h(w,p,y,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return w=w.get(y)||null,a(p,w,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ro:return w=w.get(_.key===null?y:_.key)||null,l(p,w,_,k);case os:return w=w.get(_.key===null?y:_.key)||null,u(p,w,_,k);case Dr:var E=_._init;return h(w,p,y,E(_._payload),k)}if(pi(_)||ri(_))return w=w.get(y)||null,c(p,w,_,k,null);Uo(p,_)}return null}function g(w,p,y,_){for(var k=null,E=null,S=p,R=p=0,A=null;S!==null&&R<y.length;R++){S.index>R?(A=S,S=null):A=S.sibling;var N=f(w,S,y[R],_);if(N===null){S===null&&(S=A);break}e&&S&&N.alternate===null&&t(w,S),p=i(N,p,R),E===null?k=N:E.sibling=N,E=N,S=A}if(R===y.length)return r(w,S),fe&&kn(w,R),k;if(S===null){for(;R<y.length;R++)S=d(w,y[R],_),S!==null&&(p=i(S,p,R),E===null?k=S:E.sibling=S,E=S);return fe&&kn(w,R),k}for(S=n(w,S);R<y.length;R++)A=h(S,w,R,y[R],_),A!==null&&(e&&A.alternate!==null&&S.delete(A.key===null?R:A.key),p=i(A,p,R),E===null?k=A:E.sibling=A,E=A);return e&&S.forEach(function(B){return t(w,B)}),fe&&kn(w,R),k}function v(w,p,y,_){var k=ri(y);if(typeof k!="function")throw Error(j(150));if(y=k.call(y),y==null)throw Error(j(151));for(var E=k=null,S=p,R=p=0,A=null,N=y.next();S!==null&&!N.done;R++,N=y.next()){S.index>R?(A=S,S=null):A=S.sibling;var B=f(w,S,N.value,_);if(B===null){S===null&&(S=A);break}e&&S&&B.alternate===null&&t(w,S),p=i(B,p,R),E===null?k=B:E.sibling=B,E=B,S=A}if(N.done)return r(w,S),fe&&kn(w,R),k;if(S===null){for(;!N.done;R++,N=y.next())N=d(w,N.value,_),N!==null&&(p=i(N,p,R),E===null?k=N:E.sibling=N,E=N);return fe&&kn(w,R),k}for(S=n(w,S);!N.done;R++,N=y.next())N=h(S,w,R,N.value,_),N!==null&&(e&&N.alternate!==null&&S.delete(N.key===null?R:N.key),p=i(N,p,R),E===null?k=N:E.sibling=N,E=N);return e&&S.forEach(function($){return t(w,$)}),fe&&kn(w,R),k}function x(w,p,y,_){if(typeof y=="object"&&y!==null&&y.type===as&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ro:e:{for(var k=y.key,E=p;E!==null;){if(E.key===k){if(k=y.type,k===as){if(E.tag===7){r(w,E.sibling),p=s(E,y.props.children),p.return=w,w=p;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Dr&&of(k)===E.type){r(w,E.sibling),p=s(E,y.props),p.ref=ai(w,E,y),p.return=w,w=p;break e}r(w,E);break}else t(w,E);E=E.sibling}y.type===as?(p=Dn(y.props.children,w.mode,_,y.key),p.return=w,w=p):(_=ga(y.type,y.key,y.props,null,w.mode,_),_.ref=ai(w,p,y),_.return=w,w=_)}return o(w);case os:e:{for(E=y.key;p!==null;){if(p.key===E)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){r(w,p.sibling),p=s(p,y.children||[]),p.return=w,w=p;break e}else{r(w,p);break}else t(w,p);p=p.sibling}p=pu(y,w.mode,_),p.return=w,w=p}return o(w);case Dr:return E=y._init,x(w,p,E(y._payload),_)}if(pi(y))return g(w,p,y,_);if(ri(y))return v(w,p,y,_);Uo(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(r(w,p.sibling),p=s(p,y),p.return=w,w=p):(r(w,p),p=fu(y,w.mode,_),p.return=w,w=p),o(w)):r(w,p)}return x}var Ms=Ag(!0),Og=Ag(!1),Ia=pn(null),La=null,ms=null,bd=null;function xd(){bd=ms=La=null}function _d(e){var t=Ia.current;de(Ia),e._currentValue=t}function ac(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ks(e,t){La=e,bd=ms=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(bd!==e)if(e={context:e,memoizedValue:t,next:null},ms===null){if(La===null)throw Error(j(308));ms=e,La.dependencies={lanes:0,firstContext:e}}else ms=ms.next=e;return t}var Cn=null;function kd(e){Cn===null?Cn=[e]:Cn.push(e)}function Ng(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,kd(t)):(r.next=s.next,s.next=r),t.interleaved=r,xr(e,n)}function xr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var zr=!1;function Ed(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ig(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 yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,re&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,xr(e,r)}return s=n.interleaved,s===null?(t.next=t,kd(n)):(t.next=s.next,s.next=t),n.interleaved=t,xr(e,r)}function ca(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ud(e,r)}}function af(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function $a(e,t,r,n){var s=e.updateQueue;zr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,v=a;switch(f=t,h=r,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=ge({},d,f);break e;case 2:zr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Fn|=o,e.lanes=o,e.memoizedState=d}}function lf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(j(191,s));s.call(n)}}}var yo={},tr=pn(yo),Hi=pn(yo),qi=pn(yo);function Pn(e){if(e===yo)throw Error(j(174));return e}function Sd(e,t){switch(le(qi,t),le(Hi,e),le(tr,yo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fu(t,e)}de(tr),le(tr,t)}function Us(){de(tr),de(Hi),de(qi)}function Lg(e){Pn(qi.current);var t=Pn(tr.current),r=Fu(t,e.type);t!==r&&(le(Hi,e),le(tr,r))}function Td(e){Hi.current===e&&(de(tr),de(Hi))}var pe=pn(0);function Da(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var au=[];function Cd(){for(var e=0;e<au.length;e++)au[e]._workInProgressVersionPrimary=null;au.length=0}var da=Sr.ReactCurrentDispatcher,lu=Sr.ReactCurrentBatchConfig,Un=0,me=null,Te=null,je=null,za=!1,Ti=!1,Ki=0,Ub=0;function De(){throw Error(j(321))}function Pd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ut(e[r],t[r]))return!1;return!0}function Rd(e,t,r,n,s,i){if(Un=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,da.current=e===null||e.memoizedState===null?Vb:Hb,e=r(n,s),Ti){i=0;do{if(Ti=!1,Ki=0,25<=i)throw Error(j(301));i+=1,je=Te=null,t.updateQueue=null,da.current=qb,e=r(n,s)}while(Ti)}if(da.current=Ma,t=Te!==null&&Te.next!==null,Un=0,je=Te=me=null,za=!1,t)throw Error(j(300));return e}
vendor: 6,380 bytes, line 39
39function jd(){var e=Ki!==0;return Ki=0,e}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?me.memoizedState=je=e:je=je.next=e,je}function xt(){if(Te===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=je===null?me.memoizedState:je.next;if(t!==null)je=t,Te=e;else{if(e===null)throw Error(j(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},je===null?me.memoizedState=je=e:je=je.next=e}return je}function Gi(e,t){return typeof t=="function"?t(e):t}function uu(e){var t=xt(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var n=Te,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((Un&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,me.lanes|=c,Fn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Ut(n,t.memoizedState)||(Ze=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,me.lanes|=i,Fn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function cu(e){var t=xt(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Ut(i,t.memoizedState)||(Ze=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function $g(){}function Dg(e,t){var r=me,n=xt(),s=t(),i=!Ut(n.memoizedState,s);if(i&&(n.memoizedState=s,Ze=!0),n=n.queue,Ad(Ug.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||je!==null&&je.memoizedState.tag&1){if(r.flags|=2048,Ji(9,Mg.bind(null,r,n,s,t),void 0,null),Ae===null)throw Error(j(349));Un&30||zg(r,t,s)}return s}function zg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Mg(e,t,r,n){t.value=r,t.getSnapshot=n,Fg(t)&&Bg(e)}function Ug(e,t,r){return r(function(){Fg(t)&&Bg(e)})}function Fg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ut(e,r)}catch{return!0}}function Bg(e){var t=xr(e,1);t!==null&&Mt(t,e,1,-1)}function uf(e){var t=qt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:e},t.queue=e,e=e.dispatch=Wb.bind(null,me,e),[t.memoizedState,e]}function Ji(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Wg(){return xt().memoizedState}function ha(e,t,r,n){var s=qt();me.flags|=e,s.memoizedState=Ji(1|t,r,void 0,n===void 0?null:n)}function pl(e,t,r,n){var s=xt();n=n===void 0?null:n;var i=void 0;if(Te!==null){var o=Te.memoizedState;if(i=o.destroy,n!==null&&Pd(n,o.deps)){s.memoizedState=Ji(t,r,i,n);return}}me.flags|=e,s.memoizedState=Ji(1|t,r,i,n)}function cf(e,t){return ha(8390656,8,e,t)}function Ad(e,t){return pl(2048,8,e,t)}function Vg(e,t){return pl(4,2,e,t)}function Hg(e,t){return pl(4,4,e,t)}function qg(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 Kg(e,t,r){return r=r!=null?r.concat([e]):null,pl(4,4,qg.bind(null,t,e),r)}function Od(){}function Gg(e,t){var r=xt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Pd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Jg(e,t){var r=xt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Pd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Qg(e,t,r){return Un&21?(Ut(r,t)||(r=tg(),me.lanes|=r,Fn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=r)}function Fb(e,t){var r=ie;ie=r!==0&&4>r?r:4,e(!0);var n=lu.transition;lu.transition={};try{e(!1),t()}finally{ie=r,lu.transition=n}}function Yg(){return xt().memoizedState}function Bb(e,t,r){var n=nn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Xg(e))Zg(t,r);else if(r=Ng(e,t,r,n),r!==null){var s=Ke();Mt(r,e,n,s),ev(r,t,n)}}function Wb(e,t,r){var n=nn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Xg(e))Zg(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Ut(a,o)){var l=t.interleaved;l===null?(s.next=s,kd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Ng(e,t,s,n),r!==null&&(s=Ke(),Mt(r,e,n,s),ev(r,t,n))}}function Xg(e){var t=e.alternate;return e===me||t!==null&&t===me}function Zg(e,t){Ti=za=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ev(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ud(e,r)}}var Ma={readContext:bt,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},Vb={readContext:bt,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:cf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ha(4194308,4,qg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ha(4194308,4,e,t)},useInsertionEffect:function(e,t){return ha(4,2,e,t)},useMemo:function(e,t){var r=qt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=qt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Bb.bind(null,me,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 39-41
39,useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:uf,useDebugValue:Od,useDeferredValue:function(e){return qt().memoizedState=e},useTransition:function(){var e=uf(!1),t=e[0];return e=Fb.bind(null,e[1]),qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=me,s=qt();if(fe){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),Ae===null)throw Error(j(349));Un&30||zg(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,cf(Ug.bind(null,n,i,e),[e]),n.flags|=2048,Ji(9,Mg.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=qt(),t=Ae.identifierPrefix;if(fe){var r=vr,n=gr;r=(n&~(1<<32-zt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ki++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Ub++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hb={readContext:bt,useCallback:Gg,useContext:bt,useEffect:Ad,useImperativeHandle:Kg,useInsertionEffect:Vg,useLayoutEffect:Hg,useMemo:Jg,useReducer:uu,useRef:Wg,useState:function(){return uu(Gi)},useDebugValue:Od,useDeferredValue:function(e){var t=xt();return Qg(t,Te.memoizedState,e)},useTransition:function(){var e=uu(Gi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:$g,useSyncExternalStore:Dg,useId:Yg,unstable_isNewReconciler:!1},qb={readContext:bt,useCallback:Gg,useContext:bt,useEffect:Ad,useImperativeHandle:Kg,useInsertionEffect:Vg,useLayoutEffect:Hg,useMemo:Jg,useReducer:cu,useRef:Wg,useState:function(){return cu(Gi)},useDebugValue:Od,useDeferredValue:function(e){var t=xt();return Te===null?t.memoizedState=e:Qg(t,Te.memoizedState,e)},useTransition:function(){var e=cu(Gi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:$g,useSyncExternalStore:Dg,useId:Yg,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function lc(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ge({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ml={isMounted:function(e){return(e=e._reactInternals)?Hn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ke(),s=nn(e),i=yr(n,s);i.payload=t,r!=null&&(i.callback=r),t=tn(e,i,s),t!==null&&(Mt(t,e,s,n),ca(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ke(),s=nn(e),i=yr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=tn(e,i,s),t!==null&&(Mt(t,e,s,n),ca(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ke(),n=nn(e),s=yr(r,n);s.tag=2,t!=null&&(s.callback=t),t=tn(e,s,n),t!==null&&(Mt(t,e,n,r),ca(t,e,n))}};function df(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Fi(r,n)||!Fi(s,i):!0}function tv(e,t,r){var n=!1,s=ln,i=t.contextType;return typeof i=="object"&&i!==null?i=bt(i):(s=tt(t)?zn:We.current,n=t.contextTypes,i=(n=n!=null)?Ds(e,s):ln),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ml,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function hf(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ml.enqueueReplaceState(t,t.state,null)}function uc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Ed(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=bt(i):(i=tt(t)?zn:We.current,s.context=Ds(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(lc(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ml.enqueueReplaceState(s,s.state,null),$a(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Fs(e,t){try{var r="",n=t;do r+=bw(n),n=n.return;while(n);var s=r}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function du(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function cc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Kb=typeof WeakMap=="function"?WeakMap:Map;function rv(e,t,r){r=yr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Fa||(Fa=!0,bc=n),cc(e,t)},r}function nv(e,t,r){r=yr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){cc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){cc(e,t),typeof n!="function"&&(rn===null?rn=new Set([this]):rn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function ff(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Kb;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=ax.bind(null,e,t,r),t.then(e,e))}function pf(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 mf(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=yr(-1,1),t.tag=2,tn(r,t,1))),r.lanes|=1),e)}var Gb=Sr.ReactCurrentOwner,Ze=!1;function He(e,t,r,n){t.child=e===null?Og(t,null,r,n):Ms(t,e.child,r,n)}function gf(e,t,r,n,s){r=r.render;var i=t.ref;return ks(t,s),n=Rd(e,t,r,n,i,s),r=jd(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_r(e,t,s)):(fe&&r&&vd(t),t.flags|=1,He(e,t,n,s),t.child)}function vf(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Ud(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,sv(e,t,i,n,s)):(e=ga(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Fi,r(o,n)&&e.ref===t.ref)return _r(e,t,s)}return t.flags|=1,e=sn(i,n),e.ref=t.ref,e.return=t,t.child=e}function sv(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Fi(i,n)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,_r(e,t,s)}return dc(e,t,r,n,s)}function iv(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(vs,st),st|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(vs,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,le(vs,st),st|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,le(vs,st),st|=n;return He(e,t,s,r),t.child}function ov(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 41
41function dc(e,t,r,n,s){var i=tt(r)?zn:We.current;return i=Ds(t,i),ks(t,s),r=Rd(e,t,r,n,i,s),n=jd(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_r(e,t,s)):(fe&&n&&vd(t),t.flags|=1,He(e,t,r,s),t.child)}function yf(e,t,r,n,s){if(tt(r)){var i=!0;Aa(t)}else i=!1;if(ks(t,s),t.stateNode===null)fa(e,t),tv(t,r,n),uc(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=bt(u):(u=tt(r)?zn:We.current,u=Ds(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&hf(t,o,n,u),zr=!1;var f=t.memoizedState;o.state=f,$a(t,n,o,s),l=t.memoizedState,a!==n||f!==l||et.current||zr?(typeof c=="function"&&(lc(t,r,c,n),l=t.memoizedState),(a=zr||df(t,r,a,n,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Ig(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:jt(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=bt(l):(l=tt(r)?zn:We.current,l=Ds(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&hf(t,o,n,l),zr=!1,f=t.memoizedState,o.state=f,$a(t,n,o,s);var g=t.memoizedState;a!==d||f!==g||et.current||zr?(typeof h=="function"&&(lc(t,r,h,n),g=t.memoizedState),(u=zr||df(t,r,u,n,f,g,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),o.props=n,o.state=g,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return hc(e,t,r,n,i,s)}function hc(e,t,r,n,s,i){ov(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&rf(t,r,!1),_r(e,t,i);n=t.stateNode,Gb.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Ms(t,e.child,null,i),t.child=Ms(t,null,a,i)):He(e,t,a,i),t.memoizedState=n.state,s&&rf(t,r,!0),t.child}function av(e){var t=e.stateNode;t.pendingContext?tf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tf(e,t.context,!1),Sd(e,t.containerInfo)}function wf(e,t,r,n,s){return zs(),wd(s),t.flags|=256,He(e,t,r,n),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0};function pc(e){return{baseLanes:e,cachePool:null,transitions:null}}function lv(e,t,r){var n=t.pendingProps,s=pe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),le(pe,s&1),e===null)return oc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=yl(o,n,0,null),e=Dn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=pc(r),t.memoizedState=fc,e):Nd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Jb(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=sn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=sn(a,i):(i=Dn(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?pc(r):{base
vendor: 8,213 bytes, line 41
41Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=fc,n}return i=e.child,e=i.sibling,n=sn(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Nd(e,t){return t=yl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fo(e,t,r,n){return n!==null&&wd(n),Ms(t,e.child,null,r),e=Nd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jb(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=du(Error(j(422))),Fo(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=yl({mode:"visible",children:n.children},s,0,null),i=Dn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Ms(t,e.child,null,o),t.child.memoizedState=pc(o),t.memoizedState=fc,i);if(!(t.mode&1))return Fo(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(j(419)),n=du(i,n,void 0),Fo(e,t,o,n)}if(a=(o&e.childLanes)!==0,Ze||a){if(n=Ae,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,xr(e,s),Mt(n,e,s,-1))}return Md(),n=du(Error(j(421))),Fo(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=lx.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,at=en(s.nextSibling),lt=t,fe=!0,$t=null,e!==null&&(gt[vt++]=gr,gt[vt++]=vr,gt[vt++]=Mn,gr=e.id,vr=e.overflow,Mn=t),t=Nd(t,n.children),t.flags|=4096,t)}function bf(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ac(e.return,t,r)}function hu(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function uv(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(He(e,t,n.children,r),n=pe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bf(e,r,t);else if(e.tag===19)bf(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(le(pe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Da(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),hu(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Da(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}hu(t,!0,r,null,i);break;case"together":hu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _r(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Fn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=sn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=sn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Qb(e,t,r){switch(t.tag){case 3:av(t),zs();break;case 5:Lg(t);break;case 1:tt(t.type)&&Aa(t);break;case 4:Sd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;le(Ia,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(le(pe,pe.current&1),t.flags|=128,null):r&t.child.childLanes?lv(e,t,r):(le(pe,pe.current&1),e=_r(e,t,r),e!==null?e.sibling:null);le(pe,pe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return uv(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(pe,pe.current),n)break;return null;case 22:case 23:return t.lanes=0,iv(e,t,r)}return _r(e,t,r)}var cv,mc,dv,hv;cv=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};mc=function(){};dv=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Pn(tr.current);var i=null;switch(r){case"input":s=Du(e,s),n=Du(e,n),i=[];break;case"select":s=ge({},s,{value:void 0}),n=ge({},n,{value:void 0}),i=[];break;case"textarea":s=Uu(e,s),n=Uu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ra)}Bu(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ii.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ii.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ce("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};hv=function(e,t,r,n){r!==n&&(t.flags|=4)};function li(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Yb(e,t,r){var n=t.pendingProps;switch(yd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return tt(t.type)&&ja(),ze(t),null;case 3:return n=t.stateNode,Us(),de(et),de(We),Cd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Mo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$t!==null&&(kc($t),$t=null))),mc(e,t),ze(t),null;case 5:Td(t);var s=Pn(qi.current);if(r=t.type,e!==null&&t.stateNode!=null)dv(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(j(166));return ze(t),null}if(e=Pn(tr.current),Mo(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Xt]=t,n[Vi]=i,e=(t.mode&1)!==0,r){case"dialog":ce("cancel",n),ce("close",n);break;case"iframe":case"object":case"embed":ce("load",n);break;case"video":case"audio":for(s=0;s<gi.length;s++)ce(gi[s],n);break;case"source":ce("error",n);break;case"img":case"image":case"link":ce("error",n),ce("load",n);break;case"details":ce("toggle",n);break;case"input":Ph(n,i),ce("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},ce("invalid",n);break;case"textarea":jh(n,i),ce("invalid",n)}Bu(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 41
41o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&zo(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&zo(n.textContent,a,e),s=["children",""+a]):Ii.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ce("scroll",n)}switch(r){case"input":jo(n),Rh(n,i,!0);break;case"textarea":jo(n),Ah(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Ra)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Um(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Xt]=t,e[Vi]=n,cv(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wu(r,n),r){case"dialog":ce("cancel",e),ce("close",e),s=n;break;case"iframe":case"object":case"embed":ce("load",e),s=n;break;case"video":case"audio":for(s=0;s<gi.length;s++)ce(gi[s],e);s=n;break;case"source":ce("error",e),s=n;break;case"img":case"image":case"link":ce("error",e),ce("load",e),s=n;break;case"details":ce("toggle",e),s=n;break;case"input":Ph(e,n),s=Du(e,n),ce("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ge({},n,{value:void 0}),ce("invalid",e);break;case"textarea":jh(e,n),s=Uu(e,n),ce("invalid",e);break;default:s=n}Bu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Wm(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Fm(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Li(e,l):typeof l=="number"&&Li(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ii.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ce("scroll",e):l!=null&&nd(e,i,l,o))}switch(r){case"input":jo(e),Rh(e,n,!1);break;case"textarea":jo(e),Ah(e);break;case"option":n.value!=null&&e.setAttribute("value",""+an(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?ws(e,!!n.multiple,i,!1):n.defaultValue!=null&&ws(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ra)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ze(t),null;case 6:if(e&&t.stateNode!=null)hv(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(j(166));if(r=Pn(qi.current),Pn(tr.current),Mo(t)){if(n=t.stateNode,r=t.memoizedProps,n[Xt]=t,(i=n.nodeValue!==r)&&(e=lt,e!==null))switch(e.tag){case 3:zo(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zo(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Xt]=t,t.stateNode=n}return ze(t),null;case 13:if(de(pe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&at!==null&&t.mode&1&&!(t.flags&128))jg(),zs(),t.flags|=98560,i=!1;else if(i=Mo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[Xt]=t}else zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else $t!==null&&(kc($t),$t=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?Pe===0&&(Pe=3):Md())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return Us(),mc(e,t),e===null&&Bi(t.stateNode.containerInfo),ze(t),null;case 10:return _d(t.type._context),ze(t),null;case 17:return tt(t.type)&&ja(),ze(t),null;case 19:if(de(pe),i=t.memoizedState,i===null)return ze(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)li(i,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Da(e),o!==null){for(t.flags|=128,li(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return le(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&xe()>Bs&&(t.flags|=128,n=!0,li(i,!1),t.lanes=4194304)}else{if(!n)if(e=Da(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),li(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!fe)return ze(t),null}else 2*xe()-i.renderingStartTime>Bs&&r!==1073741824&&(t.flags|=128,n=!0,li(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xe(),t.sibling=null,r=pe.current,le(pe,n?r&1|2:r&1),t):(ze(t),null);case 22:case 23:return zd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?st&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Xb(e,t){switch(yd(t),t.tag){case 1:return tt(t.type)&&ja(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Us(),de(et),de(We),Cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Td(t),null;case 13:if(de(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(pe),null;case 4:return Us(),null;case 10:return _d(t.type._context),null;case 22:case 23:return zd(),null;case 24:return null;default:return null}}var Bo=!1,Be=!1,Zb=typeof WeakSet=="function"?WeakSet:Set,z=null;function gs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){we(e,t,n)}else r.current=null}function gc(e,t,r){try{r()}catch(n){we(e,t,n)}}var xf=!1;function ex(e,t){if(Zu=Ta,e=vg(),gd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===s&&(a=o),f===i&&++c===n&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ec={focusedElem:e,selectionRange:r},Ta=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,x=g.memoizedState,w=t.stateNode,p=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:jt(t.type,v),x);w.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(_){we(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return g=xf,xf=!1,g}function Ci(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&gc(t,r,i)}s=s.next}while(s!==n)}}function gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function vc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function fv(e){var t=e.alternate;t!==null&&(e.alternate=null,fv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xt],delete t[Vi],delete t[nc],delete t[$b],delete t[Db])),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 pv(e){return e.tag===5||e.tag===3||e.tag===4}function _f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pv(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 yc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ra));else if(n!==4&&(e=e.child,e!==null))for(yc(e,t,r),e=e.sibling;e!==null;)yc(e,t,r),e=e.sibling}function wc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(wc(e,t,r),e=e.sibling;e!==null;)wc(e,t,r),e=e.sibling}var Oe=null,Lt=!1;function Nr(e,t,r){for(r=r.child;r!==null;)mv(e,t,r),r=r.sibling}function mv(e,t,r){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(ll,r)}catch{}switch(r.tag){case 5:Be||gs(r,t);case 6:var n=Oe,s=Lt;Oe=null,Nr(e,t,r),Oe=n,Lt=s,Oe!==null&&(Lt?(e=Oe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Oe.removeChild(r.stateNode));break;case 18:Oe!==null&&(Lt?(e=Oe,r=r.stateNode,e.nodeType===8?iu(e.parentNode,r):e.nodeType===1&&iu(e,r),Mi(e)):iu(Oe,r.stateNode));break;case 4:n=Oe,s=Lt,Oe=r.stateNode.containerInfo,Lt=!0,Nr(e,t,r),Oe=n,Lt=s;break;case 0:case 11:case 14:case 15:if(!Be&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&gc(r,t,o),s=s.next}while(s!==n)}Nr(e,t,r);break;case 1:if(!Be&&(gs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){we(r,t,a)}Nr(e,t,r);break;case 21:Nr(e,t,r);break;case 22:r.mode&1?(Be=(n=Be)||r.memoizedState!==null,Nr(e,t,r),Be=n):Nr(e,t,r);break;default:Nr(e,t,r)}}function kf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Zb),t.forEach(function(n){var s=ux.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Tt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Oe=a.stateNode,Lt=!1;break e;case 3:Oe=a.stateNode.containerInfo,Lt=!0;break e;case 4:Oe=a.stateNode.containerInfo,Lt=!0;break e}a=a.return}if(Oe===null)throw Error(j(160));mv(i,o,s),Oe=null,Lt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){we(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gv(t,e),t=t.sibling}function gv(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),Ht(e),n&4){try{Ci(3,e,e.return),gl(3,e)}catch(v){we(e,e.return,v)}try{Ci(5,e,e.return)}catch(v){we(e,e.return,v)}}break;case 1:Tt(t,e),Ht(e),n&512&&r!==null&&gs(r,r.return);break;case 5:if(Tt(t,e),Ht(e),n&512&&r!==null&&gs(r,r.return),e.flags&32){var s=e.stateNode;try{Li(s,"")}catch(v){we(e,e.return,v)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&zm(s,i),Wu(a,o);var u=Wu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Wm(s,d):c==="dangerouslySetInnerHTML"?Fm(s,d):c==="children"?Li(s,d):nd(s,c,d,u)}switch(a){case"input":zu(s,i);break;case"textarea":Mm(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?ws(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?ws(s,!!i.multiple,i.defaultValue,!0):ws(s,!!i.multiple,i.multiple?[]:"",!1))}s[Vi]=i}catch(v){we(e,e.return,v)}}break;case 6:if(Tt(t,e),Ht(e),n&4){if(e.stateNode===null)throw Error(j(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){we(e,e.return,v)}}break;case 3:if(Tt(t,e),Ht(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Mi(t.containerInfo)}catch(v){we(e,e.return,v)}break;case 4:Tt(t,e),Ht(e);break;case 13:Tt(t,e),Ht(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||($d=xe())),n&4&&kf(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(u=Be)||c,Tt(t,e),Be=u):Tt(t,e),Ht(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(z=e,c=e.child;c!==null;){for(d=z=c;z!==null;){switch(f=z,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ci(4,f,f.return);break;case 1:gs(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){we(n,r,v)}}break;case 5:gs(f,f.return);break;case 22:if(f.memoizedState!==null){Sf(d);continue}}h!==null?(h.return=f,z=h):Sf(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Bm("display",o))}catch(v){we(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){we(e,e.return,v)}}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:Tt(t,e),Ht(e),n&4&&kf(e);break;case 21:break;default:Tt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(pv(r)){var n=r;break e}r=r.return}throw Error(j(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Li(s,""),n.flags&=-33);var i=_f(e);wc(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=_f(e);yc(e,a,o);break;default:throw Error(j(161))}}catch(l){we(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tx(e,t,r){z=e,vv(e)}function vv(e,t,r){for(var n=(e.mode&1)!==0;z!==null;){var s=z,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Bo;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Be;a=Bo;var u=Be;if(Bo=o,(Be=l)&&!u)for(z=s;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?Tf(s):l!==null?(l.return=o,z=l):Tf(s);for(;i!==null;)z=i,vv(i),i=i.sibling;z=s,Bo=a,Be=u}Ef(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,z=i):Ef(e)}}function Ef(e){for(;z!==null;){var t=z;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||gl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Be)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:jt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&lf(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}lf(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Mi(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Be||t.flags&512&&vc(t)}catch(f){we(t,t.return,f)}}if(t===e){z=null;break}if(r=t.sibling,r!==null){r.return=t.return,z=r;break}z=t.return}}function Sf(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var r=t.sibling;if(r!==null){r.return=t.return,z=r;break}z=t.return}}function Tf(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{gl(4,t)}catch(l){we(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){we(t,s,l)}}var i=t.return;try{vc(t)}catch(l){we(t,i,l)}break;case 5:var o=t.return;try{vc(t)}catch(l){we(t,o,l)}}}catch(l){we(t,t.return,l)}if(t===e){z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,z=a;break}z=t.return}}var rx=Math.ceil,Ua=Sr.ReactCurrentDispatcher,Id=Sr.ReactCurrentOwner,wt=Sr.ReactCurrentBatchConfig,re=0,Ae=null,Se=null,Ne=0,st=0,vs=pn(0),Pe=0,Qi=null,Fn=0,vl=0,Ld=0,Pi=null,Xe=null,$d=0,Bs=1/0,cr=null,Fa=!1,bc=null,rn=null,Wo=!1,Jr=null,Ba=0,Ri=0,xc=null,pa=-1,ma=0;function Ke(){return re&6?xe():pa!==-1?pa:pa=xe()}function nn(e){return e.mode&1?re&2&&Ne!==0?Ne&-Ne:Mb.transition!==null?(ma===0&&(ma=tg()),ma):(e=ie,e!==0||(e=window.event,e=e===void 0?16:lg(e.type)),e):1}function Mt(e,t,r,n){if(50<Ri)throw Ri=0,xc=null,Error(j(185));mo(e,r,n),(!(re&2)||e!==Ae)&&(e===Ae&&(!(re&2)&&(vl|=r),Pe===4&&Ur(e,Ne)),rt(e,n),r===1&&re===0&&!(t.mode&1)&&(Bs=xe()+500,fl&&mn()))}function rt(e,t){var r=e.callbackNode;Mw(e,t);var n=Sa(e,e===Ae?Ne:0);if(n===0)r!==null&&Ih(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ih(r),t===1)e.tag===0?zb(Cf.bind(null,e)):Cg(Cf.bind(null,e)),Ib(function(){!(re&6)&&mn()}),r=null;else{switch(rg(n)){case 1:r=ld;break;case 4:r=Zm;break;case 16:r=Ea;break;case 536870912:r=eg;break;default:r=Ea}r=Sv(r,yv.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function yv(e,t){if(pa=-1,ma=0,re&6)throw Error(j(327));var r=e.callbackNode;if(Es()&&e.callbackNode!==r)return null;var n=Sa(e,e===Ae?Ne:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Wa(e,n);else{t=n;var s=re;re|=2;var i=bv();(Ae!==e||Ne!==t)&&(cr=null,Bs=xe()+500,$n(e,t));do try{ix();break}catch(a){wv(e,a)}while(!0);xd(),Ua.current=i,re=s,Se!==null?t=0:(Ae=null,Ne=0,t=Pe)}if(t!==0){if(t===2&&(s=Gu(e),s!==0&&(n=s,t=_c(e,s))),t===1)throw r=Qi,$n(e,0),Ur(e,n),rt(e,xe()),r;if(t===6)Ur(e,n);else{if(s=e.current.alternate,!(n&30)&&!nx(s)&&(t=Wa(e,n),t===2&&(i=Gu(e),i!==0&&(n=i,t=_c(e,i))),t===1))throw r=Qi,$n(e,0),Ur(e,n),rt(e,xe()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(j(345));case 2:En(e,Xe,cr);break;case 3:if(Ur(e,n),(n&130023424)===n&&(t=$d+500-xe(),10<t)){if(Sa(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ke(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=rc(En.bind(null,e,Xe,cr),t);break}En(e,Xe,cr);break;case 4:if(Ur(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-zt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=xe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rx(n/1960))-n,10<n){e.timeoutHandle=rc(En.bind(null,e,Xe,cr),n);break}En(e,Xe,cr);break;case 5:En(e,Xe,cr);break;default:throw Error(j(329))}}}return rt(e,xe()),e.callbackNode===r?yv.bind(null,e):null}function _c(e,t){var r=Pi;return e.current.memoizedState.isDehydrated&&($n(e,t).flags|=256),e=Wa(e,t),e!==2&&(t=Xe,Xe=r,t!==null&&kc(t)),e}function kc(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function nx(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Ut(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ur(e,t){for(t&=~Ld,t&=~vl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-zt(t),n=1<<r;e[r]=-1,t&=~n}}function Cf(e){if(re&6)throw Error(j(327));Es();var t=Sa(e,0);if(!(t&1))return rt(e,xe()),null;var r=Wa(e,t);if(e.tag!==0&&r===2){var n=Gu(e);n!==0&&(t=n,r=_c(e,n))}if(r===1)throw r=Qi,$n(e,0),Ur(e,t),rt(e,xe()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,En(e,Xe,cr),rt(e,xe()),null}function Dd(e,t){var r=re;re|=1;try{return e(t)}finally{re=r,re===0&&(Bs=xe()+500,fl&&mn())}}function Bn(e){Jr!==null&&Jr.tag===0&&!(re&6)&&Es();var t=re;re|=1;var r=wt.transition,n=ie;try{if(wt.transition=null,ie=1,e)return e()}finally{ie=n,wt.transition=r,re=t,!(re&6)&&mn()}}function zd(){st=vs.current,de(vs)}function $n(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Nb(r)),Se!==null)for(r=Se.return;r!==null;){var n=r;switch(yd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ja();break;case 3:Us(),de(et),de(We),Cd();break;case 5:Td(n);break;case 4:Us();break;case 13:de(pe);break;case 19:de(pe);break;case 10:_d(n.type._context);break;case 22:case 23:zd()}r=r.return}if(Ae=e,Se=e=sn(e.current,null),Ne=st=t,Pe=0,Qi=null,Ld=vl=Fn=0,Xe=Pi=null,Cn!==null){for(t=0;t<Cn.length;t++)if(r=Cn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}Cn=null}return e}function wv(e,t){do{var r=Se;try{if(xd(),da.current=Ma,za){for(var n=me.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}za=!1}if(Un=0,je=Te=me=null,Ti=!1,Ki=0,Id.current=null,r===null||r.return===null){Pe=1,Qi=t,Se=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Ne,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=pf(o);if(h!==null){h.flags&=-257,mf(h,o,a,i,t),h.mode&1&&ff(i,u,t),t=h,l=u;var g=t.updateQueue;if(g===null){var v=new Set;v.add(l),t.updateQueue=v}else g.add(l);break e}else{if(!(t&1)){ff(i,u,t),Md();break e}l=Error(j(426))}}else if(fe&&a.mode&1){var x=pf(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),mf(x,o,a,i,t),wd(Fs(l,a));break e}}i=l=Fs(l,a),Pe!==4&&(Pe=2),Pi===null?Pi=[i]:Pi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var w=rv(i,l,t);af(i,w);break e;case 1:a=l;var p=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(rn===null||!rn.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=nv(i,a,t);af(i,_);break e}}i=i.return}while(i!==null)}_v(r)}catch(k){t=k,Se===r&&r!==null&&(Se=r=r.return);continue}break}while(!0)}function bv(){var e=Ua.current;return Ua.current=Ma,e===null?Ma:e}function Md(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Ae===null||!(Fn&268435455)&&!(vl&268435455)||Ur(Ae,Ne)}function Wa(e,t){var r=re;re|=2;var n=bv();(Ae!==e||Ne!==t)&&(cr=null,$n(e,t));do try{sx();break}catch(s){wv(e,s)}while(!0);if(xd(),re=r,Ua.current=n,Se!==null)throw Error(j(261));return Ae=null,Ne=0,Pe}function sx(){for(;Se!==null;)xv(Se)}function ix(){for(;Se!==null&&!jw();)xv(Se)}function xv(e){var t=Ev(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?_v(e):Se=t,Id.current=null}function _v(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Xb(r,t),r!==null){r.flags&=32767,Se=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pe=6,Se=null;return}}else if(r=Yb(r,t,st),r!==null){Se=r;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Pe===0&&(Pe=5)}function En(e,t,r){var n=ie,s=wt.transition;try{wt.transition=null,ie=1,ox(e,t,r,n)}finally{wt.transition=s,ie=n}return null}function ox(e,t,r,n){do Es();while(Jr!==null);if(re&6)throw Error(j(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Uw(e,i),e===Ae&&(Se=Ae=null,Ne=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Wo||(Wo=!0,Sv(Ea,function(){return Es(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=wt.transition,wt.transition=null;var o=ie;ie=1;var a=re;re|=4,Id.current=null,ex(e,r),gv(r,e),Tb(ec),Ta=!!Zu,ec=Zu=null,e.current=r,tx(r),Aw(),re=a,ie=o,wt.transition=i}else e.current=r;if(Wo&&(Wo=!1,Jr=e,Ba=s),i=e.pendingLanes,i===0&&(rn=null),Iw(r.stateNode),rt(e,xe()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Fa)throw Fa=!1,e=bc,bc=null,e;return Ba&1&&e.tag!==0&&Es(),i=e.pendingLanes,i&1?e===xc?Ri++:(Ri=0,xc=e):Ri=0,mn(),null}function Es(){if(Jr!==null){var e=rg(Ba),t=wt.transition,r=ie;try{if(wt.transition=null,ie=16>e?16:e,Jr===null)var n=!1;else{if(e=Jr,Jr=null,Ba=0,re&6)throw Error(j(331));var s=re;for(re|=4,z=e.current;z!==null;){var i=z,o=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var c=z;switch(c.tag){case 0:case 11:case 15:Ci(8,c,i)}var d=c.child;if(d!==null)d.return=c,z=d;else for(;z!==null;){c=z;var f=c.sibling,h=c.return;if(fv(c),c===u){z=null;break}if(f!==null){f.return=h,z=f;break}z=h}}}var g=i.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}z=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,z=o;else e:for(;z!==null;){if(i=z,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ci(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,z=w;break e}z=i.return}}var p=e.current;for(z=p;z!==null;){o=z;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,z=y;else e:for(o=p;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:gl(9,a)}}catch(k){we(a,a.return,k)}if(a===o){z=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,z=_;break e}z=a.return}}if(re=s,mn(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(ll,e)}catch{}n=!0}return n}finally{ie=r,wt.transition=t}}return!1}function Pf(e,t,r){t=Fs(r,t),t=rv(e,t,1),e=tn(e,t,1),t=Ke(),e!==null&&(mo(e,1,t),rt(e,t))}function we(e,t,r){if(e.tag===3)Pf(e,e,r);else for(;t!==null;){if(t.tag===3){Pf(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(rn===null||!rn.has(n))){e=Fs(r,e),e=nv(t,e,1),t=tn(t,e,1),e=Ke(),t!==null&&(mo(t,1,e),rt(t,e));break}}t=t.return}}function ax(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ke(),e.pingedLanes|=e.suspendedLanes&r,Ae===e&&(Ne&r)===r&&(Pe===4||Pe===3&&(Ne&130023424)===Ne&&500>xe()-$d?$n(e,0):Ld|=r),rt(e,t)}function kv(e,t){t===0&&(e.mode&1?(t=No,No<<=1,!(No&130023424)&&(No=4194304)):t=1);var r=Ke();e=xr(e,t),e!==null&&(mo(e,t,r),rt(e,r))}function lx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),kv(e,r)}function ux(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(j(314))}n!==null&&n.delete(t),kv(e,r)}var Ev;Ev=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)Ze=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ze=!1,Qb(e,t,r);Ze=!!(e.flags&131072)}else Ze=!1,fe&&t.flags&1048576&&Pg(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;fa(e,t),e=t.pendingProps;var s=Ds(t,We.current);ks(t,r),s=Rd(null,t,n,e,s,r);var i=jd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(n)?(i=!0,Aa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ed(t),s.updater=ml,t.stateNode=s,s._reactInternals=t,uc(t,n,e,r),t=hc(null,t,n,!0,i,r)):(t.tag=0,fe&&i&&vd(t),He(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(fa(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=dx(n),e=jt(n,e),s){case 0:t=dc(null,t,n,e,r);break e;case 1:t=yf(null,t,n,e,r);break e;case 11:t=gf(null,t,n,e,r);break e;case 14:t=vf(null,t,n,jt(n.type,e),r);break e}throw Error(j(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),dc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),yf(e,t,n,s,r);case 3:e:{if(av(t),e===null)throw Error(j(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Ig(e,t),$a(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Fs(Error(j(423)),t),t=wf(e,t,n,r,s);break e}else if(n!==s){s=Fs(Error(j(424)),t),t=wf(e,t,n,r,s);break e}else for(at=en(t.stateNode.containerInfo.firstChild),lt=t,fe=!0,$t=null,r=Og(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(zs(),n===s){t=_r(e,t,r);break e}He(e,t,n,r)}t=t.child}return t;case 5:return Lg(t),e===null&&oc(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,tc(n,s)?o=null:i!==null&&tc(n,i)&&(t.flags|=32),ov(e,t),He(e,t,o,r),t.child;case 6:return e===null&&oc(t),null;case 13:return lv(e,t,r);case 4:return Sd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ms(t,null,n,r):He(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),gf(e,t,n,s,r);case 7:return He(e,t,t.pendingProps,r),t.child;case 8:return He(e,t,t.pendingProps.children,r),t.child;case 12:return He(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,le(Ia,n._currentValue),n._currentValue=o,i!==null)if(Ut(i.value,o)){if(i.children===s.children&&!et.current){t=_r(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=yr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),ac(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(j(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ac(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}He(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ks(t,r),s=bt(s),n=n(s),t.flags|=1,He(e,t,n,r),t.child;case 14:return n=t.type,s=jt(n,t.pendingProps),s=jt(n.type,s),vf(e,t,n,s,r);case 15:return sv(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),fa(e,t),t.tag=1,tt(n)?(e=!0,Aa(t)):e=!1,ks(t,r),tv(t,n,s),uc(t,n,s,r),hc(null,t,n,!0,e,r);case 19:return uv(e,t,r);case 22:return iv(e,t,r)}throw Error(j(156,t.tag))};function Sv(e,t){return Xm(e,t)}function cx(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,r,n){return new cx(e,t,r,n)}function Ud(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dx(e){if(typeof e=="function")return Ud(e)?1:0;if(e!=null){if(e=e.$$typeof,e===id)return 11;if(e===od)return 14}return 2}function sn(e,t){var r=e.alternate;return r===null?(r=yt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 6,631 bytes, line 41
41dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ga(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")Ud(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case as:return Dn(r.children,s,i,t);case sd:o=8,s|=8;break;case Nu:return e=yt(12,r,t,s|2),e.elementType=Nu,e.lanes=i,e;case Iu:return e=yt(13,r,t,s),e.elementType=Iu,e.lanes=i,e;case Lu:return e=yt(19,r,t,s),e.elementType=Lu,e.lanes=i,e;case Lm:return yl(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nm:o=10;break e;case Im:o=9;break e;case id:o=11;break e;case od:o=14;break e;case Dr:o=16,n=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=yt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Dn(e,t,r,n){return e=yt(7,e,n,t),e.lanes=r,e}function yl(e,t,r,n){return e=yt(22,e,n,t),e.elementType=Lm,e.lanes=r,e.stateNode={isHidden:!1},e}function fu(e,t,r){return e=yt(6,e,null,t),e.lanes=r,e}function pu(e,t,r){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hx(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gl(0),this.expirationTimes=Gl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fd(e,t,r,n,s,i,o,a,l){return e=new hx(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=yt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ed(i),e}function fx(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:os,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Tv(e){if(!e)return ln;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var r=e.type;if(tt(r))return Tg(e,r,t)}return t}function Cv(e,t,r,n,s,i,o,a,l){return e=Fd(r,n,!0,e,s,i,o,a,l),e.context=Tv(null),r=e.current,n=Ke(),s=nn(r),i=yr(n,s),i.callback=t??null,tn(r,i,s),e.current.lanes=s,mo(e,s,n),rt(e,n),e}function wl(e,t,r,n){var s=t.current,i=Ke(),o=nn(s);return r=Tv(r),t.context===null?t.context=r:t.pendingContext=r,t=yr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=tn(s,t,o),e!==null&&(Mt(e,s,o,i),ca(e,s,o)),o}function Va(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 Rf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Bd(e,t){Rf(e,t),(e=e.alternate)&&Rf(e,t)}function px(){return null}var Pv=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wd(e){this._internalRoot=e}bl.prototype.render=Wd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));wl(e,t,null,null)};bl.prototype.unmount=Wd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bn(function(){wl(null,e,null,null)}),t[br]=null}};function bl(e){this._internalRoot=e}bl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ig();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mr.length&&t!==0&&t<Mr[r].priority;r++);Mr.splice(r,0,e),r===0&&ag(e)}};function Vd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jf(){}function mx(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Va(o);i.call(u)}}var o=Cv(t,n,e,0,null,!1,!1,"",jf);return e._reactRootContainer=o,e[br]=o.current,Bi(e.nodeType===8?e.parentNode:e),Bn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Va(l);a.call(u)}}var l=Fd(e,0,!1,null,null,!1,!1,"",jf);return e._reactRootContainer=l,e[br]=l.current,Bi(e.nodeType===8?e.parentNode:e),Bn(function(){wl(t,l,r,n)}),l}function _l(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Va(o);a.call(l)}}wl(t,o,e,s)}else o=mx(r,t,e,s,n);return Va(o)}ng=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=mi(t.pendingLanes);r!==0&&(ud(t,r|1),rt(t,xe()),!(re&6)&&(Bs=xe()+500,mn()))}break;case 13:Bn(function(){var n=xr(e,1);if(n!==null){var s=Ke();Mt(n,e,1,s)}}),Bd(e,1)}};cd=function(e){if(e.tag===13){var t=xr(e,134217728);if(t!==null){var r=Ke();Mt(t,e,134217728,r)}Bd(e,134217728)}};sg=function(e){if(e.tag===13){var t=nn(e),r=xr(e,t);if(r!==null){var n=Ke();Mt(r,e,t,n)}Bd(e,t)}};ig=function(){return ie};og=function(e,t){var r=ie;try{return ie=e,t()}finally{ie=r}};Hu=function(e,t,r){switch(t){case"input":if(zu(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=hl(n);if(!s)throw Error(j(90));Dm(n),zu(n,s)}}}break;case"textarea":Mm(e,r);break;case"select":t=r.value,t!=null&&ws(e,!!r.multiple,t,!1)}};qm=Dd;Km=Bn;var gx={usingClientEntryPoint:!1,Events:[vo,ds,hl,Vm,Hm,Dd]},ui={findFiberByHostInstance:Tn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vx={bundleType:ui.bundleType,version:ui.version,rendererPackageName:ui.rendererPackageName,rendererConfig:ui.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Qm(e),e===null?null:e.stateNode},findFiberByHostInstance:ui.findFiberByHostInstance||px,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vo.isDisabled&&Vo.supportsFiber)try{ll=Vo.inject(vx),er=Vo}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gx;dt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vd(t))throw Error(j(200));return fx(e,t,null,r)};dt.createRoot=function(e,t){if(!Vd(e))throw Error(j(299));var r=!1,n="",s=Pv;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Fd(e,1,!1,null,null,r,!1,n,s),e[br]=t.current,Bi(e.nodeType===8?e.parentNode:e),new Wd(t)};dt.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=Qm(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return Bn(e)};dt.hydrate=function(e,t,r){if(!xl(t))throw Error(j(200));return _l(null,e,t,!0,r)};dt.hydrateRoot=function(e,t,r){if(!Vd(e))throw Error(j(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Pv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Cv(t,null,e,1,r??null,s,!1,i,o),e[br]=t.current,Bi(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new bl(t)};dt.render=function(e,t,r){if(!xl(t))throw Error(j(200));return _l(null,e,t,!1,r)};dt.unmountComponentAtNode=function(e){if(!xl(e))throw Error(j(40));return e._reactRootContainer?(Bn(function(){_l(null,null,e,!1,function(){e._reactRootContainer=null,e[br]=null})}),!0):!1};dt.unstable_batchedUpdates=Dd;dt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!xl(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return _l(e,t,r,!1,n)};dt.version="18.3.1-next-f1338f8080-20240426";function Rv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rv)}catch(e){console.error(e)}}Rv(),Rm.exports=dt;var wo=Rm.exports;const jv=gm(wo);var Av,Af=wo;Av=Af.createRoot,Af.hydrateRoot;const yx="modulepreload",wx=function(e){return"/"+e},Of={},Z=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=wx(l),l in Of)return;Of[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":yx,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},bx=1,xx=1e6;let mu=0;function _x(){return mu=(mu+1)%Number.MAX_SAFE_INTEGER,mu.toString()}const gu=new Map,Nf=e=>{if(gu.has(e))return;const t=setTimeout(()=>{gu.delete(e),ji({type:"REMOVE_TOAST",toastId:e})},xx);gu.set(e,t)},kx=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,bx)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Nf(r):e.toasts.forEach(n=>{Nf(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,905 bytes, line 41
41n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},va=[];let ya={toasts:[]};function ji(e){ya=kx(ya,e),va.forEach(t=>{t(ya)})}function Ex({...e}){const t=_x(),r=s=>ji({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>ji({type:"DISMISS_TOAST",toastId:t});return ji({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Sx(){const[e,t]=b.useState(ya);return b.useEffect(()=>(va.push(t),()=>{const r=va.indexOf(t);r>-1&&va.splice(r,1)}),[e]),{...e,toast:Ex,dismiss:r=>ji({type:"DISMISS_TOAST",toastId:r})}}function Ce(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function If(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ov(...e){return t=>{let r=!1;const n=e.map(s=>{const i=If(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():If(e[s],null)}}}}function Ft(...e){return b.useCallback(Ov(...e),e)}function Vj(e,t){const r=b.createContext(t),n=i=>{const{children:o,...a}=i,l=b.useMemo(()=>a,Object.values(a));return m.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function s(i){const o=b.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,s]}function kl(e,t=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const u=d=>{var w;const{scope:f,children:h,...g}=d,v=((w=f==null?void 0:f[e])==null?void 0:w[l])||a,x=b.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:x,children:h})};u.displayName=i+"Provider";function c(d,f){var v;const h=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,g=b.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,Tx(s,...t)]}function Tx(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Ha(e){const t=Px(e),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(jx);if(l){const u=l.props.children,c=a.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return m.jsx(t,{...o,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return m.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var Cx=Ha("Slot");function Px(e){const t=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=Ox(s),a=Ax(i,s.props);return s.type!==b.Fragment&&(a.ref=n?Ov(n,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nv=Symbol("radix.slottable");function Rx(e){const t=({children:r})=>m.jsx(m.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Nv,t}function jx(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nv}function Ax(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function Ox(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Nx(e){const t=e+"CollectionProvider",[r,n]=kl(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:w}=v,p=O.useRef(null),y=O.useRef(new Map).current;return m.jsx(s,{scope:x,itemMap:y,collectionRef:p,children:w})};o.displayName=t;const a=e+"CollectionSlot",l=Ha(a),u=O.forwardRef((v,x)=>{const{scope:w,children:p}=v,y=i(a,w),_=Ft(x,y.collectionRef);return m.jsx(l,{ref:_,children:p})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Ha(c),h=O.forwardRef((v,x)=>{const{scope:w,children:p,...y}=v,_=O.useRef(null),k=Ft(x,_),E=i(c,w);return O.useEffect(()=>(E.itemMap.set(_,{ref:_,...y}),()=>void E.itemMap.delete(_))),m.jsx(f,{[d]:"",ref:k,children:p})});h.displayName=c;function g(v){const x=i(e+"CollectionConsumer",v);return O.useCallback(()=>{const p=x.collectionRef.current;if(!p)return[];const y=Array.from(p.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((E,S)=>y.indexOf(E.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},g,n]}var Ix=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nt=Ix.reduce((e,t)=>{const r=Ha(`Primitive.${t}`),n=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Iv(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function un(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Lx(e,t=globalThis==null?void 0:globalThis.document){const r=un(e);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var $x="DismissableLayer",Ec="dismissableLayer.update",Dx="dismissableLayer.pointerDownOutside",zx="dismissableLayer.focusOutside",Lf,Lv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=b.useContext(Lv),[c,d]=b.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),g=Ft(t,S=>d(S)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(x),p=c?v.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,_=p>=w,k=Ux(S=>{const R=S.target,A=[...u.branches].some(N=>N.contains(R));!_||A||(s==null||s(S),o==null||o(S),S.defaultPrevented||a==null||a())},f),E=Fx(S=>{const R=S.target;[...u.branches].some(N=>N.contains(R))||(i==null||i(S),o==null||o(S),S.defaultPrevented||a==null||a())},f);return Lx(S=>{p===u.layers.size-1&&(n==null||n(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},f),b.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Lf=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),$f(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Lf)}},[c,f,r,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),$f())},[c,u]),b.useEffect(()=>{const S=()=>h({});return document.addEventListener(Ec,S),()=>document.removeEventListener(Ec,S)},[]),m.jsx(nt.div,{...l,ref:g,style:{pointerEvents:y?_?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,k.onPointerDownCapture)})});Hd.displayName=$x;var Mx="DismissableLayerBranch",$v=b.forwardRef((e,t)=>{const r=b.useContext(Lv),n=b.useRef(null),s=Ft(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),m.jsx(nt.div,{...e,ref:s})});$v.displayName=Mx;function Ux(e,t=globalThis==null?void 0:globalThis.document){const r=un(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Dv(Dx,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Fx(e,t=globalThis==null?void 0:globalThis.document){const r=un(e),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&Dv(zx,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function $f(){const e=new CustomEvent(Ec);document.dispatchEvent(e)}function Dv(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Iv(s,i):s.dispatchEvent(i)}var Bx=Hd,Wx=$v,cn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Vx="Portal",zv=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=b.useState(!1);cn(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?jv.createPortal(m.jsx(nt.div,{...n,ref:t}),o):null});zv.displayName=Vx;function Hx(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var qd=e=>{const{present:t,children:r}=e,n=qx(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=Ft(n.ref,Kx(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};qd.displayName="Presence";function qx(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=Hx(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Ho(n.current);i.current=a==="mounted"?u:"none"},[a]),cn(()=>{const u=n.current,c=s.current;if(c!==e){const f=i.current,h=Ho(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),cn(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const v=Ho(n.current).includes(h.animationName);if(h.target===t&&v&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=h=>{h.target===t&&(i.current=Ho(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ho(e){return(e==null?void 0:e.animationName)||"none"}function Kx(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Gx=Cm[" useInsertionEffect ".trim().toString()]||cn;function Jx({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=Qx({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=b.useRef(e!==void 0);b.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,n])}const u=b.useCallback(c=>{var d;if(a){const f=Yx(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else i(c)},[a,e,i,o]);return[l,u]}function Qx({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),i=b.useRef(t);return Gx(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function Yx(e){return typeof e=="function"}var Xx=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"}),Zx="VisuallyHidden",El=b.forwardRef((e,t)=>m.jsx(nt.span,{...e,ref:t,style:{...Xx,...e.style}}));El.displayName=Zx;var e_=El,Kd="ToastProvider",[Gd,t_,r_]=Nx("Toast"),[Mv,Hj]=kl("Toast",[r_]),[n_,Sl]=Mv(Kd),Uv=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Kd}\`. Expected non-empty \`string\`.`),m.jsx(Gd.Provider,{scope:t,children:m.jsx(n_,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>c(h=>h+1),[]),onToastRemove:b.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Uv.displayName=Kd;var Fv="ToastViewport",s_=["F8"],Sc="toast.viewportPause",Tc="toast.viewportResume",Bv=b.forwardRef((e,t)=>
41{const{__scopeToast:r,hotkey:n=s_,label:s="Notifications ({hotkey})",...i}=e,o=Sl(Fv,r),a=t_(r),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),f=Ft(t,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;b.useEffect(()=>{const x=w=>{var y;n.length!==0&&n.every(_=>w[_]||w.code===_)&&((y=d.current)==null||y.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),b.useEffect(()=>{const x=l.current,w=d.current;if(g&&x&&w){const p=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Sc);w.dispatchEvent(E),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Tc);w.dispatchEvent(E),o.isClosePausedRef.current=!1}},_=E=>{!x.contains(E.relatedTarget)&&y()},k=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",p),x.addEventListener("focusout",_),x.addEventListener("pointermove",p),x.addEventListener("pointerleave",k),window.addEventListener("blur",p),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",p),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",p),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",p),window.removeEventListener("focus",y)}}},[g,o.isClosePausedRef]);const v=b.useCallback(({tabbingDirection:x})=>{const p=a().map(y=>{const _=y.ref.current,k=[_,...v_(_)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?p.reverse():p).flat()},[a]);return b.useEffect(()=>{const x=d.current;if(x){const w=p=>{var k,E,S;const y=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!y){const R=document.activeElement,A=p.shiftKey;if(p.target===x&&A){(k=u.current)==null||k.focus();return}const $=v({tabbingDirection:A?"backwards":"forwards"}),V=$.findIndex(L=>L===R);vu($.slice(V+1))?p.preventDefault():A?(E=u.current)==null||E.focus():(S=c.current)==null||S.focus()}};return x.addEventListener("keydown",w),()=>x.removeEventListener("keydown",w)}},[a,v]),m.jsxs(Wx,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&m.jsx(Cc,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});vu(x)}}),m.jsx(Gd.Slot,{scope:r,children:m.jsx(nt.ol,{tabIndex:-1,...i,ref:f})}),g&&m.jsx(Cc,{ref:c,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});vu(x)}})]})});Bv.displayName=Fv;var Wv="ToastFocusProxy",Cc=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Sl(Wv,r);return m.jsx(El,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Cc.displayName=Wv;var bo="Toast",i_="toast.swipeStart",o_="toast.swipeMove",a_="toast.swipeCancel",l_="toast.swipeEnd",Vv=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Jx({prop:n,defaultProp:s??!0,onChange:i,caller:bo});return m.jsx(qd,{present:r||a,children:m.jsx(d_,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:un(e.onPause),onResume:un(e.onResume),onSwipeStart:Ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ce(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:Ce(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:Ce(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)})})})});Vv.displayName=bo;var[u_,c_]=Mv(bo,{onClose(){}}),d_=b.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...g}=e,v=Sl(bo,r),[x,w]=b.useState(null),p=Ft(t,L=>w(L)),y=b.useRef(null),_=b.useRef(null),k=s||v.duration,E=b.useRef(0),S=b.useRef(k),R=b.useRef(0),{onToastAdd:A,onToastRemove:N}=v,B=un(()=>{var ee;(x==null?void 0:x.contains(document.activeElement))&&((ee=v.viewport)==null||ee.focus()),o()}),$=b.useCallback(L=>{!L||L===1/0||(window.clearTimeout(R.current),E.current=new Date().getTime(),R.current=window.setTimeout(B,L))},[B]);b.useEffect(()=>{const L=v.viewport;if(L){const ee=()=>{$(S.current),u==null||u()},W=()=>{const G=new Date().getTime()-E.current;S.current=S.current-G,window.clearTimeout(R.current),l==null||l()};return L.addEventListener(Sc,W),L.addEventListener(Tc,ee),()=>{L.removeEventListener(Sc,W),L.removeEventListener(Tc,ee)}}},[v.viewport,k,l,u,$]),b.useEffect(()=>{i&&!v.isClosePausedRef.current&&$(k)},[i,k,v.isClosePausedRef,$]),b.useEffect(()=>(A(),()=>N()),[A,N]);const V=b.useMemo(()=>x?Yv(x):null,[x]);return v.viewport?m.jsxs(m.Fragment,{children:[V&&m.jsx(h_,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),m.jsx(u_,{scope:r,onClose:B,children:wo.createPortal(m.jsx(Gd.ItemSlot,{scope:r,children:m.jsx(Bx,{asChild:!0,onEscapeKeyDown:Ce(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||B(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(nt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...g,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ce(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:Ce(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:Ce(e.onPointerMove,L=>{if(!y.current)return;const ee=L.clientX-y.current.x,W=L.clientY-y.current.y,G=!!_.current,C=["left","right"].includes(v.swipeDirection),P=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,D=C?P(0,ee):0,J=C?0:P(0,W),U=L.pointerType==="touch"?10:2,Y={x:D,y:J},te={originalEvent:L,delta:Y};G?(_.current=Y,qo(o_,d,te,{discrete:!1})):Df(Y,v.swipeDirection,U)?(_.current=Y,qo(i_,c,te,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(ee)>U||Math.abs(W)>U)&&(y.current=null)}),onPointerUp:Ce(e.onPointerUp,L=>{const ee=_.current,W=L.target;if(W.hasPointerCapture(L.pointerId)&&W.releasePointerCapture(L.pointerId),_.current=null,y.current=null,ee){const G=L.currentTarget,C={originalEvent:L,delta:ee};Df(ee,v.swipeDirection,v.swipeThreshold)?qo(l_,h,C,{discrete:!0}):qo(a_,f,C,{discrete:!0}),G.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),h_=e=>{const{__scopeToast:t,children:r,...n}=e,s=Sl(bo,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return m_(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:m.jsx(zv,{asChild:!0,children:m.jsx(El,{...n,children:i&&m.jsxs(m.Fragment,{children:[s.label," ",r]})})})},f_="ToastTitle",Hv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return m.jsx(nt.div,{...n,ref:t})});Hv.displayName=f_;var p_="ToastDescription",qv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return m.jsx(nt.div,{...n,ref:t})});qv.displayName=p_;var Kv="ToastAction",Gv=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?m.jsx(Qv,{altText:r,asChild:!0,children:m.jsx(Jd,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Kv}\`. Expected non-empty \`string\`.`),null)});Gv.displayName=Kv;var Jv="ToastClose",Jd=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=c_(Jv,r);return m.jsx(Qv,{asChild:!0,children:m.jsx(nt.button,{type:"button",...n,ref:t,onClick:Ce(e.onClick,s.onClose)})})});Jd.displayName=Jv;var Qv=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return m.jsx(nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function Yv(e){const t=[];
vendor: 8,270 bytes, lines 41-121
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),g_(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Yv(n))}}),t}function qo(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Iv(s,i):s.dispatchEvent(i)}var Df=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function m_(e=()=>{}){const t=un(e);cn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function g_(e){return e.nodeType===e.ELEMENT_NODE}function v_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function vu(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var y_=Uv,Xv=Bv,Zv=Vv,ey=Hv,ty=qv,ry=Gv,ny=Jd;function sy(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=sy(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function iy(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=sy(e))&&(n&&(n+=" "),n+=t);return n}const zf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mf=iy,oy=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Mf(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=zf(c)||zf(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...i,...a}[v]):{...i,...a}[v]===x})?[...u,d,f]:u},[]);return Mf(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const w_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ay=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var b_={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const x_=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...b_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ay("lucide",s),...a},[...o.map(([u,c])=>b.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const _t=(e,t)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(x_,{ref:i,iconNode:t,className:ay(`lucide-${w_(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const __=_t("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const Me=_t("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const yu=_t("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const k_=_t("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const E_=_t("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const Uf=_t("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const S_=_t("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const T_=_t("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const C_=_t("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const Ff=_t("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const P_=_t("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const Qd=_t("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,226 bytes, line 121
121],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yd="-",R_=e=>{const t=A_(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Yd);return a[0]===""&&a.length!==1&&a.shift(),ly(a,t)||j_(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},ly=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?ly(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Yd);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Bf=/^\[(.+)\]$/,j_=e=>{if(Bf.test(e)){const t=Bf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},A_=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return N_(Object.entries(e.classGroups),r).forEach(([i,o])=>{Pc(o,n,i,t)}),n},Pc=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Wf(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(O_(s)){Pc(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Pc(o,Wf(t,i),r,n)})})},Wf=(e,t)=>{let r=e;return t.split(Yd).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},O_=e=>e.isThemeGetter,N_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,I_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},uy="!",L_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let x=0;x<a.length;x++){let w=a[x];if(u===0){if(w===s&&(n||a.slice(x,x+i)===t)){l.push(a.slice(c,x)),c=x+i;continue}if(w==="/"){d=x;continue}}w==="["?u++:w==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(uy),g=h?f.substring(1):f,v=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:o}):o},$_=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},D_=e=>({cache:I_(e.cacheSize),parseClassName:L_(e),...R_(e)}),z_=/\s+/,M_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(z_);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let g=!!h,v=n(g?f.substring(0,h):f);if(!v){if(!g){a=u+(a.length>0?" "+a:a);continue}if(v=n(f),!v){a=u+(a.length>0?" "+a:a);continue}g=!1}const x=$_(c).join(":"),w=d?x+uy:x,p=w+v;if(i.includes(p))continue;i.push(p);const y=s(v,g);for(let _=0;_<y.length;++_){const k=y[_];i.push(w+k)}a=u+(a.length>0?" "+a:a)}return a};function U_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=cy(t))&&(n&&(n+=" "),n+=r);return n}const cy=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=cy(e[n]))&&(r&&(r+=" "),r+=t);return r};function F_(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return r=D_(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=M_(l,r);return s(l,c),c}return function(){return i(U_.apply(null,arguments))}}const ue=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},dy=/^\[(?:([a-z-]+):)?(.+)\]$/i,B_=/^\d+\/\d+$/,W_=new Set(["px","full","screen"]),V_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H_=/\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$/,q_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,K_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=e=>Ss(e)||W_.has(e)||B_.test(e),Ir=e=>Gs(e,"length",rk),Ss=e=>!!e&&!Number.isNaN(Number(e)),wu=e=>Gs(e,"number",Ss),ci=e=>!!e&&Number.isInteger(Number(e)),J_=e=>e.endsWith("%")&&Ss(e.slice(0,-1)),Q=e=>dy.test(e),Lr=e=>V_.test(e),Q_=new Set(["length","size","percentage"]),Y_=e=>Gs(e,Q_,hy),X_=e=>Gs(e,"position",hy),Z_=new Set(["image","url"]),ek=e=>Gs(e,Z_,sk),tk=e=>Gs(e,"",nk),di=()=>!0,Gs=(e,t,r)=>{const n=dy.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},rk=e=>H_.test(e)&&!q_.test(e),hy=()=>!1,nk=e=>K_.test(e),sk=e=>G_.test(e),ik=()=>{const e=ue("colors"),t=ue("spacing"),r=ue("blur"),n=ue("brightness"),s=ue("borderColor"),i=ue("borderRadius"),o=ue("borderSpacing"),a=ue("borderWidth"),l=ue("contrast"),u=ue("grayscale"),c=ue("hueRotate"),d=ue("invert"),f=ue("gap"),h=ue("gradientColorStops"),g=ue("gradientColorStopPositions"),v=ue("inset"),x=ue("margin"),w=ue("opacity"),p=ue("padding"),y=ue("saturate"),_=ue("scale"),k=ue("sepia"),E=ue("skew"),S=ue("space"),R=ue("translate"),A=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Q,t],$=()=>[Q,t],V=()=>["",ar,Ir],L=()=>["auto",Ss,Q],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",Q],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Ss,Q];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[ar,Ir],blur:["none","",Lr,Q],brightness:J(),borderColor:[e],borderRadius:["none","","full",Lr,Q],borderSpacing:$(),borderWidth:V(),contrast:J(),grayscale:P(),hueRotate:J(),invert:P(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[J_,Ir],inset:B(),margin:B(),opacity:J(),padding:$(),saturate:J(),scale:J(),sepia:P(),skew:J(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Lr]}],"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:[...ee(),Q]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ci,Q]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",ci,Q]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",ci,Q]},Q]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[ci,Q]},Q]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Lr]},Lr]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Lr,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wu]}],"font-family":[{font:[di]}],"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",Q]}],"line-clamp":[{"line-clamp":["none",Ss,wu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,Ir]}],"underline-offset":[{"underline-offset":["auto",ar,Q]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),X_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Y_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ek]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,172 bytes, line 121
121],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[ar,Q]}],"outline-w":[{outline:[ar,Ir]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ar,Ir]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Lr,tk]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Lr,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ci,Q]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],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",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 121
121],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",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ar,Ir,wu]}],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"]}}},ok=F_(ik);function nr(...e){return ok(iy(e))}const ak=y_,fy=b.forwardRef(({className:e,...t},r)=>m.jsx(Xv,{ref:r,className:nr("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}));fy.displayName=Xv.displayName;const lk=oy("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"}}),py=b.forwardRef(({className:e,variant:t,...r},n)=>m.jsx(Zv,{ref:n,className:nr(lk({variant:t}),e),...r}));py.displayName=Zv.displayName;const uk=b.forwardRef(({className:e,...t},r)=>m.jsx(ry,{ref:r,className:nr("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}));uk.displayName=ry.displayName;const my=b.forwardRef(({className:e,...t},r)=>m.jsx(ny,{ref:r,className:nr("absolute right-2 top-2 rounded-md p-1 text-foreground
121/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(Qd,{className:"h-4 w-4"})}));my.displayName=ny.displayName;const gy=b.forwardRef(({className:e,...t},r)=>m.jsx(ey,{ref:r,className:nr("text-sm font-semibold",e),...t}));gy.displayName=ey.displayName;const vy=b.forwardRef(({className:e,...t},r)=>m.jsx(ty,{ref:r,className:nr("text-sm opacity-90",e),...t}));vy.displayName=ty.displayName;function ck(){const{toasts:e}=Sx();return m.jsxs(ak,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return m.jsxs(py,{...i,children:[m.jsxs("div",{className:"grid gap-1",children:[r&&m.jsx(gy,{children:r}),n&&m.jsx(vy,{children:n})]}),s,m.jsx(my,{})]},t)}),m.jsx(fy,{})]})}var Vf=["light","dark"],dk="(prefers-color-scheme: dark)",hk=b.createContext(void 0),fk={setTheme:e=>{},themes:[]},pk=()=>{var e;return(e=b.useContext(hk))!=null?e:fk};b.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?Vf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(g,v=!1,x=!0)=>{let w=o?o[g]:g,p=v?g+"|| ''":`'${w}'`,y="";return s&&x&&!v&&Vf.includes(g)&&(y+=`d.style.colorScheme = '${g}';
121`),r==="class"?v||w?y+=`c.add(${p})`:y+="null":w&&(y+=`d[s](n,${p})`),y},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${dk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var mk=e=>{switch(e){case"success":return yk;case"info":return bk;case"warning":return wk;case"error":return xk;default:return null}},gk=Array(12).fill(0),vk=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},gk.map((r,n)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),yk=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),wk=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.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"})),bk=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),xk=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),_k=O.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"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kk=()=>{let[e,t]=O.useState(document.hidden);return O.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Rc=1,Ek=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:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Rc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>
121this.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)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],O.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(Tk(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Rc++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ye=new Ek,Sk=(e,t)=>{let r=(t==null?void 0:t.id)||Rc++;return Ye.addToast({title:e,...t,id:r}),r},Tk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ck=Sk,Pk=()=>Ye.toasts,Rk=()=>Ye.getActiveToasts();Object.assign(Ck,{success:Ye.success,info:Ye.info,warning:Ye.warning,error:Ye.error,custom:Ye.custom,message:Ye.message,promise:Ye.promise,dismiss:Ye.dismiss,loading:Ye.loading},{getHistory:Pk,getToasts:Rk});function jk(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}jk(`: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;
121left: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}
121: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%);
121--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%)} 122`);function Ko(e){return e.label!==void 0}var Ak=3,Ok="32px",Nk="16px",Hf=4e3,Ik=356,Lk=14,$k=20,Dk=200;function Ct(...e){return e.filter(Boolean).join(" ")}function zk(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var Mk=e=>{var t,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:g,interacting:v,setHeights:x,visibleToasts:w,heights:p,index:y,toasts:_,expanded:k,removeToast:E,defaultRichColors:S,closeButton:R,style:A,cancelButtonStyle:N,actionButtonStyle:B,className:$="",descriptionClassName:V="",duration:L,position:ee,gap:W,loadingIcon:G,expandByDefault:C,classNames:P,icons:D,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:U}=e,[Y,te]=O.useState(null),[ke,Le]=O.useState(null),[se,qn]=O.useState(!1),[Cr,vn]=O.useState(!1),[Pr,Kn]=O.useState(!1),[Rr,Eo]=O.useState(!1),[zl,So]=O.useState(!1),[Ml,ei]=O.useState(0),[Gn,mh]=O.useState(0),ti=O.useRef(h.duration||L||Hf),gh=O.useRef(null),yn=O.useRef(null),D0=y===0,z0=y+1<=w,ft=h.type,Jn=h.dismissible!==!1,M0=h.className||"",U0=h.descriptionClassName||"",To=O.useMemo(()=>p.findIndex(H=>H.toastId===h.id)||0,[p,h.id]),F0=O.useMemo(()=>{var H;return(H=h.closeButton)!=null?H:R},[h.closeButton,R]),vh=O.useMemo(()=>h.duration||L||Hf,[h.duration,L]),Ul=O.useRef(0),Qn=O.useRef(0),yh=O.useRef(0),Yn=O.useRef(null),[B0,W0]=ee.split("-"),wh=O.useMemo(()=>p.reduce((H,oe,he)=>he>=To?H:H+oe.height,0),[p,To]),bh=kk(),V0=h.invert||f,Fl=ft==="loading";Qn.current=O.useMemo(()=>To*W+wh,[To,wh]),O.useEffect(()=>{ti.current=vh},[vh]),O.useEffect(()=>{qn(!0)},[]),O.useEffect(()=>{let H=yn.current;if(H){let oe=H.getBoundingClientRect().height;return mh(oe),x(he=>[{toastId:h.id,height:oe,position:h.position},...he]),()=>x(he=>he.filter(kt=>kt.toastId!==h.id))}},[x,h.id]),O.useLayoutEffect(()=>{if(!se)return;let H=yn.current,oe=H.style.height;H.style.height="auto";let he=H.getBoundingClientRect().height;H.style.height=oe,mh(he),x(kt=>kt.find(Et=>Et.toastId===h.id)?kt.map(Et=>Et.toastId===h.id?{...Et,height:he}:Et):[{toastId:h.id,height:he,position:h.position},...kt])},[se,h.title,h.description,x,h.id]);let jr=O.useCallback(()=>{vn(!0),ei(Qn.current),x(H=>H.filter(oe=>oe.toastId!==h.id)),setTimeout(()=>{E(h)},Dk)},[h,E,x,Qn]);O.useEffect(()=>{if(h.promise&&ft==="loading"||h.duration===1/0||h.type==="loading")return;let H;return k||v||U&&bh?(()=>{if(yh.current<Ul.current){let oe=new Date().getTime()-Ul.current;ti.current=ti.current-oe}
122yh.current=new Date().getTime()})():ti.current!==1/0&&(Ul.current=new Date().getTime(),H=setTimeout(()=>{var oe;(oe=h.onAutoClose)==null||oe.call(h,h),jr()},ti.current)),()=>clearTimeout(H)},[k,v,h,ft,U,bh,jr]),O.useEffect(()=>{h.delete&&jr()},[jr,h.delete]);function H0(){var H,oe,he;return D!=null&&D.loading?O.createElement("div",{className:Ct(P==null?void 0:P.loader,(H=h==null?void 0:h.classNames)==null?void 0:H.loader,"sonner-loader"),"data-visible":ft==="loading"},D.loading):G?O.createElement("div",{className:Ct(P==null?void 0:P.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":ft==="loading"},G):O.createElement(vk,{className:Ct(P==null?void 0:P.loader,(he=h==null?void 0:h.classNames)==null?void 0:he.loader),visible:ft==="loading"})}return O.createElement("li",{tabIndex:0,ref:yn,className:Ct($,M0,P==null?void 0:P.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[ft],(r=h==null?void 0:h.classNames)==null?void 0:r[ft]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:S,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":zl,"data-removed":Cr,"data-visible":z0,"data-y-position":B0,"data-x-position":W0,"data-index":y,"data-front":D0,"data-swiping":Pr,"data-dismissible":Jn,"data-type":ft,"data-invert":V0,"data-swipe-out":Rr,"data-swipe-direction":ke,"data-expanded":!!(k||C&&se),style:{"--index":y,"--toasts-before":y,"--z-index":_.length-y,"--offset":`${Cr?Ml:Qn.current}px`,"--initial-height":C?"auto":`${Gn}px`,...A,...h.style},onDragEnd:()=>{Kn(!1),te(null),Yn.current=null},onPointerDown:H=>{Fl||!Jn||(gh.current=new Date,ei(Qn.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(Kn(!0),Yn.current={x:H.clientX,y:H.clientY}))},onPointerUp:()=>{var H,oe,he,kt;if(Rr||!Jn)return;Yn.current=null;let Et=Number(((H=yn.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ar=Number(((oe=yn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),wn=new Date().getTime()-((he=gh.current)==null?void 0:he.getTime()),St=Y==="x"?Et:Ar,Or=Math.abs(St)/wn;
122if(Math.abs(St)>=$k||Or>.11){ei(Qn.current),(kt=h.onDismiss)==null||kt.call(h,h),Le(Y==="x"?Et>0?"right":"left":Ar>0?"down":"up"),jr(),Eo(!0),So(!1);return}Kn(!1),te(null)},onPointerMove:H=>{var oe,he,kt,Et;if(!Yn.current||!Jn||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let Ar=H.clientY-Yn.current.y,wn=H.clientX-Yn.current.x,St=(he=e.swipeDirections)!=null?he:zk(ee);!Y&&(Math.abs(wn)>1||Math.abs(Ar)>1)&&te(Math.abs(wn)>Math.abs(Ar)?"x":"y");let Or={x:0,y:0};Y==="y"?(St.includes("top")||St.includes("bottom"))&&(St.includes("top")&&Ar<0||St.includes("bottom")&&Ar>0)&&(Or.y=Ar):Y==="x"&&(St.includes("left")||St.includes("right"))&&(St.includes("left")&&wn<0||St.includes("right")&&wn>0)&&(Or.x=wn),(Math.abs(Or.x)>0||Math.abs(Or.y)>0)&&So(!0),(kt=yn.current)==null||kt.style.setProperty("--swipe-amount-x",`${Or.x}px`),(Et=yn.current)==null||Et.style.setProperty("--swipe-amount-y",`${Or.y}px`)}},F0&&!h.jsx?O.createElement("button",{"aria-label":J,"data-disabled":Fl,"data-close-button":!0,onClick:Fl||!Jn?()=>{}:()=>{var H;jr(),(H=h.onDismiss)==null||H.call(h,h)},className:Ct(P==null?void 0:P.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=D==null?void 0:D.close)!=null?i:_k):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:O.createElement(O.Fragment,null,ft||h.icon||h.promise?O.createElement("div",{"data-icon":"",className:Ct(P==null?void 0:P.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||H0():null,h.type!=="loading"?h.icon||(D==null?void 0:D[ft])||mk(ft):null):null,O.createElement("div",{"data-content":"",className:Ct(P==null?void 0:P.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},O.createElement("div",{"data-title":"",className:Ct(P==null?void 0:P.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?O.createElement("div",{"data-description":"",className:Ct(V,U0,P==null?void 0:P.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&Ko(h.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||N,onClick:H=>{var oe,he;Ko(h.cancel)&&Jn&&((he=(oe=h.cancel).onClick)==null||he.call(oe,H),jr())},className:Ct(P==null?void 0:P.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&Ko(h.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||B,onClick:H=>{var oe,he;Ko(h.action)&&((he=(oe=h.action).onClick)==null||he.call(oe,H),!H.defaultPrevented&&jr())},className:Ct(P==null?void 0:P.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function qf(){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 Uk(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?Nk:Ok;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var Fk=b.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:g=Ak,toastOptions:v,dir:x=qf(),gap:w=Lk,loadingIcon:p,icons:y,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=e,[E,S]=O.useState([]),R=O.useMemo(()=>Array.from(new Set([n].concat(E.filter(U=>U.position).map(U=>U.position)))),[E,n]),[A,N]=O.useState([]),[B,$]=O.useState(!1),[V,L]=O.useState(!1),[ee,W]=O.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
122k":"light"),G=O.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=O.useRef(null),D=O.useRef(!1),J=O.useCallback(U=>{S(Y=>{var te;return(te=Y.find(ke=>ke.id===U.id))!=null&&te.delete||Ye.dismiss(U.id),Y.filter(({id:ke})=>ke!==U.id)})},[]);return O.useEffect(()=>Ye.subscribe(U=>{if(U.dismiss){S(Y=>Y.map(te=>te.id===U.id?{...te,delete:!0}:te));return}setTimeout(()=>{jv.flushSync(()=>{S(Y=>{let te=Y.findIndex(ke=>ke.id===U.id);return te!==-1?[...Y.slice(0,te),{...Y[te],...U},...Y.slice(te+1)]:[U,...Y]})})})}),[]),O.useEffect(()=>{if(c!=="system"){W(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:Y})=>{W(Y?"dark":"light")})}catch{U.addListener(({matches:te})=>{try{W(te?"dark":"light")}catch(ke){console.error(ke)}})}},[c]),O.useEffect(()=>{E.length<=1&&$(!1)},[E]),O.useEffect(()=>{let U=Y=>{var te,ke;s.every(Le=>Y[Le]||Y.code===Le)&&($(!0),(te=G.current)==null||te.focus()),Y.code==="Escape"&&(document.activeElement===G.current||(ke=G.current)!=null&&ke.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),O.useEffect(()=>{if(G.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,D.current=!1)}},[G.current]),O.createElement("section",{ref:t,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((U,Y)=>{var te;let[ke,Le]=U.split("-");return E.length?O.createElement("ol",{key:U,dir:x==="auto"?qf():x,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":ke,"data-lifted":B&&E.length>1&&!i,"data-x-position":Le,style:{"--front-toast-height":`${((te=A[0])==null?void 0:te.height)||0}px`,"--width":`${Ik}px`,"--gap":`${w}px`,...h,...Uk(l,u)},onBlur:se=>{D.current&&!se.currentTarget.contains(se.relatedTarget)&&(D.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||D.current||(D.current=!0,P.current=se.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{V||$(!1)},onDragEnd:()=>$(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},E.filter(se=>!se.position&&Y===0||se.position===U).map((se,qn)=>{var Cr,vn;return O.createElement(Mk,{key:se.id,icons:y,index:qn,toast:se,defaultRichColors:d,duration:(Cr=v==null?void 0:v.duration)!=null?Cr:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(vn=v==null?void 0:v.closeButton)!=null?vn:o,interacting:V,position:U,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:J,toasts:E.filter(Pr=>Pr.position==se.position),heights:A.filter(Pr=>Pr.position==se.position),setHeights:N,expandByDefault:i,gap:w,loadingIcon:p,expanded:B,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const Bk=({...e})=>{const{theme:t="system"}=pk();return m.jsx(Fk,{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})},Wk=["top","right","bottom","left"],dn=Math.min,it=Math.max,qa=Math.round,Go=Math.floor,rr=e=>({x:e,y:e}),Vk={left:"right",right:"left",bottom:"top",top:"bottom"},Hk={start:"end",end:"start"};function jc(e,t,r){return it(e,dn(t,r))}function kr(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function Js(e){return e.split("-")[1]}function Xd(e){return e==="x"?"y":"x"}function Zd(e){return e==="y"?"height":"width"}const qk=new Set(["top","bottom"]);function Zt(e){return qk.has(Er(e))?"y":"x"}function eh(e){return Xd(Zt(e))}function Kk(e,t,r){r===void 0&&(r=!1);const n=Js(e),s=eh(e),i=Zd(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ka(o)),[o,Ka(o)]}function Gk(e){const t=Ka(e);return[Ac(e),t,Ac(t)]}function Ac(e){return e.replace(/start|end/g,t=>Hk[t])}const Kf=["left","right"],Gf=["right","left"],Jk=["top","bottom"],Qk=["bottom","top"];function Yk(e,t,r){switch(e){case"top":case"bottom":return r?t?Gf:Kf:t?Kf:Gf;
vendor: 11,003 bytes, line 122
122case"left":case"right":return t?Jk:Qk;default:return[]}}function Xk(e,t,r,n){const s=Js(e);let i=Yk(Er(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Ac)))),i}function Ka(e){return e.replace(/left|right|bottom|top/g,t=>Vk[t])}function Zk(e){return{top:0,right:0,bottom:0,left:0,...e}}function yy(e){return typeof e!="number"?Zk(e):{top:e,right:e,bottom:e,left:e}}function Ga(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Jf(e,t,r){let{reference:n,floating:s}=e;const i=Zt(t),o=eh(t),a=Zd(o),l=Er(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Js(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const eE=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=Jf(u,n,l),f=n,h={},g=0;for(let v=0;v<a.length;v++){const{name:x,fn:w}=a[v],{x:p,y,data:_,reset:k}=await w({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=p??c,d=y??d,h={...h,[x]:{...h[x],..._}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:c,y:d}=Jf(u,f,l)),v=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function Yi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=kr(t,e),g=yy(h),x=a[f?d==="floating"?"reference":"floating":d],w=Ga(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),p=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},k=Ga(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:y,strategy:l}):p);return{top:(w.top-k.top+g.top)/_.y,bottom:(k.bottom-w.bottom+g.bottom)/_.y,left:(w.left-k.left+g.left)/_.x,right:(k.right-w.right+g.right)/_.x}}const tE=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=kr(e,t)||{};if(u==null)return{};const d=yy(c),f={x:r,y:n},h=eh(s),g=Zd(h),v=await o.getDimensions(u),x=h==="y",w=x?"top":"left",p=x?"bottom":"right",y=x?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[h]-f[h]-i.floating[g],k=f[h]-i.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let S=E?E[y]:0;(!S||!await(o.isElement==null?void 0:o.isElement(E)))&&(S=a.floating[y]||i.floating[g]);const R=_/2-k/2,A=S/2-v[g]/2-1,N=dn(d[w],A),B=dn(d[p],A),$=N,V=S-v[g]-B,L=S/2-v[g]/2+R,ee=jc($,L,V),W=!l.arrow&&Js(s)!=null&&L!==ee&&i.reference[g]/2-(L<$?N:B)-v[g]/2<0,G=W?L<$?L-$:L-V:0;return{[h]:f[h]+G,data:{[h]:ee,centerOffset:L-ee-G,...W&&{alignmentOffset:G}},reset:W}}}),rE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...x}=kr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=Er(s),p=Zt(a),y=Er(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=f||(y||!v?[Ka(a)]:Gk(a)),E=g!=="none";!f&&E&&k.push(...Xk(a,v,g,_));const S=[a,...k],R=await Yi(t,x),A=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&A.push(R[w]),d){const L=Kk(s,o,_);A.push(R[L[0]],R[L[1]])}if(N=[...N,{placement:s,overflows:A}],!A.every(L=>L<=0)){var B,$;const L=(((B=i.flip)==null?void 0:B.index)||0)+1,ee=S[L];if(ee&&(!(d==="alignment"?p!==Zt(ee):!1)||N.every(C=>C.overflows[0]>0&&Zt(C.placement)===p)))return{data:{index:L,overflows:N},reset:{placement:ee}};let W=($=N.filter(G=>G.overflows[0]<=0).sort((G,C)=>G.overflows[1]-C.overflows[1])[0])==null?void 0:$.placement;if(!W)switch(h){case"bestFit":{var V;const G=(V=N.filter(C=>{if(E){const P=Zt(C.placement);return P===p||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,D)=>P+D,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:V[0];G&&(W=G);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function Qf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yf(e){return Wk.some(t=>e[t]>=0)}const nE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=kr(e,t);switch(n){case"referenceHidden":{const i=await Yi(t,{...s,elementContext:"reference"}),o=Qf(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Yf(o)}}}case"escaped":{const i=await Yi(t,{...s,altBoundary:!0}),o=Qf(i,r.floating);return{data:{escapedOffsets:o,escaped:Yf(o)}}}default:return{}}}}},wy=new Set(["left","top"]);async function sE(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Er(r),a=Js(r),l=Zt(r)==="y",u=wy.has(o)?-1:1,c=i&&l?-1:1,d=kr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const iE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await sE(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},oE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:w,y:p}=x;return{x:w,y:p}}},...l}=kr(e,t),u={x:r,y:n},c=await Yi(t,l),d=Zt(Er(s)),f=Xd(d);let h=u[f],g=u[d];if(i){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",p=h+c[x],y=h-c[w];h=jc(p,h,y)}if(o){const x=d==="y"?"top":"left",w=d==="y"?"bottom":"right",p=g+c[x],y=g-c[w];g=jc(p,g,y)}const v=a.fn({...t,[f]:h,[d]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:i,[d]:o}}}}}},aE=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=kr(e,t),c={x:r,y:n},d=Zt(s),f=Xd(d);let h=c[f],g=c[d];const v=kr(a,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=f==="y"?"height":"width",_=i.reference[f]-i.floating[y]+x.mainAxis,k=i.reference[f]+i.reference[y]-x.mainAxis;h<_?h=_:h>k&&(h=k)}if(u){var w,p;const y=f==="y"?"width":"height",_=wy.has(Er(s)),k=i.reference[d]-i.floating[y]+(_&&((w=o.offset)==null?void 0:w[d])||0)+(_?0:x.crossAxis),E=i.reference[d]+i.reference[y]+(_?0:((p=o.offset)==null?void 0:p[d])||0)-(_?x.crossAxis:0);g<k?g=k:g>E&&(g=E)}return{[f]:h,[d]:g}}}},lE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=kr(e,t),c=await Yi(t,u),d=Er(s),f=Js(s),h=Zt(s)==="y",{width:g,height:v}=i.floating;let x,w;d==="top"||d==="bottom"?(x=d,w=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=d,x=f==="end"?"top":"bottom");const p=v-c.top-c.bottom,y=g-c.left-c.right,_=dn(v-c[x],p),k=dn(g-c[w],y),E=!t.middlewareData.shift;let S=_,R=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=p),E&&!f){const N=it(c.left,0),B=it(c.right,0),$=it(c.top,0),V=it(c.bottom,0);h?R=g-2*(N!==0||B!==0?N+B:it(c.left,c.right)):S=v-2*($!==0||V!==0?$+V:it(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:S});const A=await o.getDimensions(a.floating);return g!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function Tl(){return typeof window<"u"}function Qs(e){return by(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(by(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function by(e){return Tl()?e instanceof Node||e instanceof ut(e).Node:!1}function Bt(e){return Tl()?e instanceof Element||e instanceof ut(e).Element:!1}function sr(e){return Tl()?e instanceof HTMLElement||e instanceof ut(e).HTMLElement:!1}function Xf(e){return!Tl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot}const uE=new Set(["inline","contents"]);function xo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!uE.has(s)}const cE=new Set(["table","td","th"]);function dE(e){return cE.has(Qs(e))}const hE=[":popover-open",":modal"];function Cl(e){return hE.some(t=>{try{return e.matches(t)}catch{return!1}})}const fE=["transform","translate","scale","rotate","perspective"],pE=["transform","translate","scale","rotate","perspective","filter"],mE=["paint","layout","strict","content"];function th(e){const t=rh(),r=Bt(e)?Wt(e):e;return fE.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||pE.some(n=>(r.willChange||"").includes(n))||mE.some(n=>(r.contain||"").includes(n))}function gE(e){let t=hn(e);for(;sr(t)&&!Ws(t);){if(th(t))return t;if(Cl(t))return null;t=hn(t)}return null}function rh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vE=new Set(["html","body","#document"]);function Ws(e){return vE.has(Qs(e))}function Wt(e){return ut(e).getComputedStyle(e)}function Pl(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hn(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xf(e)&&e.host||ir(e);return Xf(t)?t.host:t}function xy(e){const t=hn(e);return Ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:sr(t)&&xo(t)?t:xy(t)}function Xi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=xy(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=ut(s);if(i){const a=Oc(o);
vendor: 1,887 bytes, line 122
122return t.concat(o,o.visualViewport||[],xo(s)?s:[],a&&r?Xi(a):[])}return t.concat(s,Xi(s,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _y(e){const t=Wt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=sr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=qa(r)!==i||qa(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function nh(e){return Bt(e)?e:e.contextElement}function Ts(e){const t=nh(e);if(!sr(t))return rr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=_y(t);let o=(i?qa(r.width):r.width)/n,a=(i?qa(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const yE=rr(0);function ky(e){const t=ut(e);return!rh()||!t.visualViewport?yE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wE(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ut(e)?!1:t}function Wn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=nh(e);let o=rr(1);t&&(n?Bt(n)&&(o=Ts(n)):o=Ts(e));const a=wE(i,r,n)?ky(i):rr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const f=ut(i),h=n&&Bt(n)?ut(n):n;let g=f,v=Oc(g);for(;v&&n&&h!==g;){const x=Ts(v),w=v.getBoundingClientRect(),p=Wt(v),y=w.left+(v.clientLeft+parseFloat(p.paddingLeft))*x.x,_=w.top+(v.clientTop+parseFloat(p.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=_,g=ut(v),v=Oc(g)}}return Ga({width:c,height:d,x:l,y:u})}function sh(e,t){const r=Pl(e).scrollLeft;return t?t.left+r:Wn(ir(e)).left+r}function Ey(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:sh(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function bE(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=ir(n),a=t?Cl(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=rr(1);const c=rr(0),d=sr(n);
vendor: 11,881 bytes, line 122
122if((d||!d&&!i)&&((Qs(n)!=="body"||xo(o))&&(l=Pl(n)),sr(n))){const h=Wn(n);u=Ts(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=o&&!d&&!i?Ey(o,l,!0):rr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function xE(e){return Array.from(e.getClientRects())}function _E(e){const t=ir(e),r=Pl(e),n=e.ownerDocument.body,s=it(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=it(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+sh(e);const a=-r.scrollTop;return Wt(n).direction==="rtl"&&(o+=it(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function kE(e,t){const r=ut(e),n=ir(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=rh();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const EE=new Set(["absolute","fixed"]);function SE(e,t){const r=Wn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=sr(e)?Ts(e):rr(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Zf(e,t,r){let n;if(t==="viewport")n=kE(e,r);else if(t==="document")n=_E(ir(e));else if(Bt(t))n=SE(t,r);else{const s=ky(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ga(n)}function Sy(e,t){const r=hn(e);return r===t||!Bt(r)||Ws(r)?!1:Wt(r).position==="fixed"||Sy(r,t)}function TE(e,t){const r=t.get(e);if(r)return r;let n=Xi(e,[],!1).filter(a=>Bt(a)&&Qs(a)!=="body"),s=null;const i=Wt(e).position==="fixed";let o=i?hn(e):e;for(;Bt(o)&&!Ws(o);){const a=Wt(o),l=th(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&EE.has(s.position)||xo(o)&&!l&&Sy(e,o))?n=n.filter(c=>c!==o):s=a,o=hn(o)}return t.set(e,n),n}function CE(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Cl(t)?[]:TE(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=Zf(t,c,s);return u.top=it(d.top,u.top),u.right=dn(d.right,u.right),u.bottom=dn(d.bottom,u.bottom),u.left=it(d.left,u.left),u},Zf(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PE(e){const{width:t,height:r}=_y(e);return{width:t,height:r}}function RE(e,t,r){const n=sr(t),s=ir(t),i=r==="fixed",o=Wn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=rr(0);function u(){l.x=sh(s)}if(n||!n&&!i)if((Qs(t)!=="body"||xo(s))&&(a=Pl(t)),n){const h=Wn(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?Ey(s,a):rr(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function bu(e){return Wt(e).position==="static"}function ep(e,t){if(!sr(e)||Wt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ir(e)===r&&(r=r.ownerDocument.body),r}function Ty(e,t){const r=ut(e);if(Cl(e))return r;if(!sr(e)){let s=hn(e);for(;s&&!Ws(s);){if(Bt(s)&&!bu(s))return s;s=hn(s)}return r}let n=ep(e,t);for(;n&&dE(n)&&bu(n);)n=ep(n,t);return n&&Ws(n)&&bu(n)&&!th(n)?r:n||gE(e)||r}const jE=async function(e){const t=this.getOffsetParent||Ty,r=this.getDimensions,n=await r(e.floating);return{reference:RE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function AE(e){return Wt(e).direction==="rtl"}const OE={convertOffsetParentRelativeRectToViewportRelativeRect:bE,getDocumentElement:ir,getClippingRect:CE,getOffsetParent:Ty,getElementRects:jE,getClientRects:xE,getDimensions:PE,getScale:Ts,isElement:Bt,isRTL:AE};function Cy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NE(e,t){let r=null,n;const s=ir(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const g=Go(d),v=Go(s.clientWidth-(c+f)),x=Go(s.clientHeight-(d+h)),w=Go(c),y={rootMargin:-g+"px "+-v+"px "+-x+"px "+-w+"px",threshold:it(0,dn(1,l))||1};let _=!0;function k(E){const S=E[0].intersectionRatio;if(S!==l){if(!_)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!Cy(u,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(k,{...y,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,y)}r.observe(e)}return o(!0),i}function IE(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=nh(e),c=s||i?[...u?Xi(u):[],...Xi(t)]:[];c.forEach(w=>{s&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const d=u&&a?NE(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(w=>{let[p]=w;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let g,v=l?Wn(e):null;l&&x();function x(){const w=Wn(e);v&&!Cy(v,w)&&r(),v=w,g=requestAnimationFrame(x)}return r(),()=>{var w;c.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const LE=iE,$E=oE,DE=rE,zE=lE,ME=nE,tp=tE,UE=aE,FE=(e,t,r)=>{const n=new Map,s={platform:OE,...r},i={...s.platform,_c:n};return eE(e,t,{...s,platform:i})};var BE=typeof document<"u",WE=function(){},wa=BE?b.useLayoutEffect:WE;function Ja(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ja(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!Ja(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rp(e,t){const r=Py(e);return Math.round(t*r)/r}function xu(e){const t=b.useRef(e);return wa(()=>{t.current=e}),t}function VE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(n);Ja(f,n)||h(n);const[g,v]=b.useState(null),[x,w]=b.useState(null),p=b.useCallback(C=>{C!==E.current&&(E.current=C,v(C))},[]),y=b.useCallback(C=>{C!==S.current&&(S.current=C,w(C))},[]),_=i||g,k=o||x,E=b.useRef(null),S=b.useRef(null),R=b.useRef(c),A=l!=null,N=xu(l),B=xu(s),$=xu(u),V=b.useCallback(()=>{if(!E.current||!S.current)return;const C={placement:t,strategy:r,middleware:f};B.current&&(C.platform=B.current),FE(E.current,S.current,C).then(P=>{const D={...P,isPositioned:$.current!==!1};L.current&&!Ja(R.current,D)&&(R.current=D,wo.flushSync(()=>{d(D)}))})},[f,t,r,B,$]);wa(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const L=b.useRef(!1);wa(()=>(L.current=!0,()=>{L.current=!1}),[]),wa(()=>{if(_&&(E.current=_),k&&(S.current=k),_&&k){if(N.current)return N.current(_,k,V);V()}},[_,k,V,N,A]);const ee=b.useMemo(()=>({reference:E,floating:S,setReference:p,setFloating:y}),[p,y]),W=b.useMemo(()=>({reference:_,floating:k}),[_,k]),G=b.useMemo(()=>{const C={position:r,left:0,top:0};if(!W.floating)return C;const P=rp(W.floating,c.x),D=rp(W.floating,c.y);return a?{...C,transform:"translate("+P+"px, "+D+"px)",...Py(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:D}},[r,a,W.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:V,refs:ee,elements:W,floatingStyles:G}),[c,V,ee,W,G])}const HE=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?tp({element:n.current,padding:s}).fn(r):{}:n?tp({element:n,padding:s}).fn(r):{}}}},qE=(e,t)=>({...LE(e),options:[e,t]}),KE=(e,t)=>({...$E(e),options:[e,t]}),GE=(e,t)=>({...UE(e),options:[e,t]}),JE=(e,t)=>({...DE(e),options:[e,t]}),QE=(e,t)=>({...zE(e),options:[e,t]}),YE=(e,t)=>({...ME(e),options:[e,t]}),XE=(e,t)=>({...HE(e),options:[e,t]});var ZE="Arrow",Ry=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return m.jsx(nt.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ry.displayName=ZE;var e1=Ry;function t1(e){const[t,r]=b.useState(void 0);return cn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var jy="Popper",[Ay,Oy]=kl(jy),[qj,Ny]=Ay(jy),Iy="PopperAnchor",Ly=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=Ny(Iy,r),o=b.useRef(null),a=Ft(t,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.jsx(nt.div,{...s,ref:a})});Ly.displayName=Iy;var ih="PopperContent",[r1,n1]=Ay(ih),$y=b.forwardRef((e,t)=>{var se,qn,Cr,vn,Pr,Kn;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,x=Ny(ih,r),[w,p]=b.useState(null),y=Ft(t,Rr=>p(Rr)),[_,k]=b.useState(null),E=t1(_),S=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,A=n+(i!=="center"?"-"+i:""),N=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(u)?u:[u],$=B.length>0,V={padding:N,boundary:B.filter(i1),altBoundary:$},{refs:L,floatingStyles:ee,placement:W,isPositioned:G,middlewareData:C}=VE({strategy:"fixed",placement:A,whileElementsMounted:(...Rr)=>IE(...Rr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[qE({mainAxis:s+R,alignmentAxis:o}),l&&KE({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?GE():void 0,...V}),l&&JE({...V}),QE({...V,apply:({elements:Rr,rects:Eo,availableWidth:zl,availableHeight:So})=>{const{width:Ml,height:ei}=Eo.reference,Gn=Rr.floating.style;Gn.setProperty("--radix-popper-available-width",`${zl}px`),Gn.setProperty("--radix-popper-available-height",`${So}px`),Gn.setProperty("--radix-popper-anchor-width",`${Ml}px`),Gn.setProperty("--radix-popper-anchor-height",`${ei}px`)}}),_&&XE({element:_,padding:a}),o1({arrowWidth:S,arrowHeight:R}),f&&YE({strategy:"referenceHidden",...V})]}),[P,D]=My(W),J=un(g);cn(()=>{G&&(J==null||J())},[G,J]);const U=(se=C.arrow)==null?void 0:se.x,Y=(qn=C.arrow)==null?void 0:qn.y,te=((Cr=C.arrow)==null?void 0:Cr.centerOffset)!==0,[ke,Le]=b.useState();return cn(()=>{w&&Le(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:G?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ke,"--radix-popper-transform-origin":[(vn=C.transformOrigin)==null?void 0:vn.x,(Pr=C.transformOrigin)==null?void 0:Pr.y].join(" "),...((Kn=C.hide)==null?void 0:Kn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(r1,{scope:r,placedSide:P,onArrowChange:k,arrowX:U,arrowY:Y,shouldHideArrow:te,children:m.jsx(nt.div,{"data-side":P,"data-align":D,...v,ref:y,style:{...v.style,animation:G?void 0:"none"}})})})});$y.displayName=ih;var Dy="PopperArrow",s1={top:"bottom",right:"left",bottom:"top",left:"r
122ight"},zy=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=n1(Dy,n),o=s1[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(e1,{...s,ref:r,style:{...s.style,display:"block"}})})});zy.displayName=Dy;function i1(e){return e!==null}var o1=e=>({name:"transformOrigin",options:e,fn(t){var x,w,p;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=My(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,h=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let g="",v="";return u==="bottom"?(g=o?d:`${f}px`,v=`${-l}px`):u==="top"?(g=o?d:`${f}px`,v=`${n.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=o?d:`${h}px`):u==="left"&&(g=`${n.floating.width+l}px`,v=o?d:`${h}px`),{data:{x:g,y:v}}}});function My(e){const[t,r="center"]=e.split("-");return[t,r]}var a1=Ly,l1=$y,u1=zy,[Rl,Kj]=kl("Tooltip",[Oy]),oh=Oy(),Uy="TooltipProvider",c1=700,np="tooltip.open",[d1,Fy]=Rl(Uy),By=e=>{const{__scopeTooltip:t,delayDuration:r=c1,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(d1,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};By.displayName=Uy;var Wy="Tooltip",[Gj,jl]=Rl(Wy),Nc="TooltipTrigger",h1=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=jl(Nc,r),i=Fy(Nc,r),o=oh(r),a=b.useRef(null),l=Ft(t,a,s.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(a1,{asChild:!0,...o,children:m.jsx(nt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Ce(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ce(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Ce(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Ce(e.onBlur,s.onClose),onClick:Ce(e.onClick,s.onClose)})})});h1.displayName=Nc;var f1="TooltipPortal",[Jj,p1]=Rl(f1,{forceMount:void 0}),Vs="TooltipContent",Vy=b.forwardRef((e,t)=>{const r=p1(Vs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=jl(Vs,e.__scopeTooltip);return m.jsx(qd,{present:n||o.open,children:o.disableHoverableContent?m.jsx(Hy,{side:s,...i,ref:t}):m.jsx(m1,{side:s,...i,ref:t})})}),m1=b.forwardRef((e,t)=>{const r=jl(Vs,e.__scopeTooltip),n=Fy(Vs,e.__scopeTooltip),s=b.useRef(null),i=Ft(t,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((g,v)=>{const x=g.currentTarget,w={x:g.clientX,y:g.clientY},p=b1(w,x.getBoundingClientRect()),y=x1(w,p),_=_1(v.getBoundingClientRect()),k=E1([...y,..._]);a(k),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&c){const g=x=>h(x,c),v=x=>h(x,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",v)}}},[l,c,h,f]),b.useEffect(()=>{if(o){const g=v=>{const x=v.target,w={x:v.clientX,y:v.clientY},p=(l==null?void 0:l.contains(x))||(c==null?void 0:c.contains(x)),y=!k1(w,o);p?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,o,u,f]),m.jsx(Hy,{...e,ref:i})}),[g1,v1]=Rl(Wy,{isInside:!1}),y1=Rx("TooltipContent"),Hy=b.forwardRef((e,t)=>
122{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=jl(Vs,r),u=oh(r),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(np,c),()=>document.removeEventListener(np,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(Hd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:m.jsxs(l1,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(y1,{children:n}),m.jsx(g1,{scope:r,isInside:!0,children:m.jsx(e_,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Vy.displayName=Vs;var qy="TooltipArrow",w1=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=oh(r);return v1(qy,r).isInside?null:m.jsx(u1,{...s,...n,ref:t})});w1.displayName=qy;function b1(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function x1(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function _1(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function k1(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,c=a.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function E1(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),S1(t)}function S1(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var T1=By,Ky=Vy;const C1=T1,P1=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Ky,{ref:n,sideOffset:t,className:nr("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));P1.displayName=Ky.displayName;var Al=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(){}},Ol=typeof window>"u"||"Deno"in globalThis;function At(){}function R1(e,t){return typeof e=="function"?e(t):e}function j1(e){return typeof e=="number"&&e>=0&&e!==1/0}function A1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ic(e,t){return typeof e=="function"?e(t):e}function O1(e,t){return typeof e=="function"?e(t):e}function sp(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==ah(o,t.options))return!1}else if(!eo(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function ip(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Zi(t.options.mutationKey)!==Zi(i))return!1}else if(!eo(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function ah(e,t){return((t==null?void 0:t.queryKeyHashFn)||Zi)(e)}function Zi(e){return JSON.stringify(e,(t,r)=>Lc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>eo(e[r],t[r])):!1}function Gy(e,t){if(e===t)return e;const r=op(e)&&op(t);if(r||Lc(e)&&Lc(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const d=r?c:i[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=Gy(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function op(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lc(e){if(!ap(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!ap(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ap(e){return Object.prototype.toString.call(e)==="[object Object]"}function N1(e){return new Promise(t=>{setTimeout(t,e)})}function I1(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Gy(e,t):t}function L1(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function $1(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var lh=Symbol();function Jy(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var jn,Wr,Ps,lm,D1=(lm=class extends Al{constructor(){super();ne(this,jn);ne(this,Wr);ne(this,Ps);q(this,Ps,t=>{if(!Ol&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,Wr)||this.setEventListener(T(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Wr))==null||t.call(this),q(this,Wr,void 0))}setEventListener(t){var r;q(this,Ps,t),(r=T(this,Wr))==null||r.call(this),q(this,Wr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,jn)!==t&&(q(this,jn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,912 bytes, line 122
122this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,jn)=="boolean"?T(this,jn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jn=new WeakMap,Wr=new WeakMap,Ps=new WeakMap,lm),Qy=new D1,Rs,Vr,js,um,z1=(um=class extends Al{constructor(){super();ne(this,Rs,!0);ne(this,Vr);ne(this,js);q(this,js,t=>{if(!Ol&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){T(this,Vr)||this.setEventListener(T(this,js))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Vr))==null||t.call(this),q(this,Vr,void 0))}setEventListener(t){var r;q(this,js,t),(r=T(this,Vr))==null||r.call(this),q(this,Vr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Rs)!==t&&(q(this,Rs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,Rs)}},Rs=new WeakMap,Vr=new WeakMap,js=new WeakMap,um),Qa=new z1;function M1(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function U1(e){return Math.min(1e3*2**e,3e4)}function Yy(e){return(e??"online")==="online"?Qa.isOnline():!0}var Xy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _u(e){return e instanceof Xy}function Zy(e){let t=!1,r=0,n=!1,s;const i=M1(),o=v=>{var x;n||(f(new Xy(v)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Qy.isFocused()&&(e.networkMode==="always"||Qa.isOnline())&&e.canRun(),c=()=>Yy(e.networkMode)&&e.canRun(),d=v=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,v),s==null||s(),i.resolve(v))},f=v=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,v),s==null||s(),i.reject(v))},h=()=>new Promise(v=>{var x;s=w=>{(n||u())&&v(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;s=void 0,n||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(n)return;let v;const x=r===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(d).catch(w=>{var E;if(n)return;const p=e.retry??(Ol?0:3),y=e.retryDelay??U1,_=typeof y=="function"?y(r,w):y,k=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,w);if(t||!k){f(w);return}r++,(E=e.onFail)==null||E.call(e,r,w),N1(_).then(()=>u()?void 0:h()).then(()=>{t?f(w):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),i)}}var F1=e=>setTimeout(e,0);function B1(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=F1;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var qe=B1(),An,cm,e0=(cm=class{constructor(){ne(this,An)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),j1(this.gcTime)&&q(this,An,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ol?1/0:5*60*1e3))}clearGcTimeout(){T(this,An)&&(clearTimeout(T(this,An)),q(this,An,void 0))}},An=new WeakMap,cm),As,On,mt,Nn,Fe,ho,In,Nt,ur,dm,W1=(dm=class extends e0{constructor(t){super();ne(this,Nt);ne(this,As);ne(this,On);ne(this,mt);ne(this,Nn);ne(this,Fe);ne(this,ho);ne(this,In);q(this,In,!1),q(this,ho,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Nn,t.client),q(this,mt,T(this,Nn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,As,H1(this.options)),this.state=t.state??T(this,As),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Fe))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ho),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,mt).remove(this)}setData(t,r){const n=I1(this.state.data,t,this.options);return $e(this,Nt,ur).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){$e(this,Nt,ur).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=T(this,Fe))==null?void 0:n.promise;return(s=T(this,Fe))==null||s.cancel(t),r?r.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,As))}isActive(){return this.observers.some(t=>O1(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lh||this.state.dataUpdateCount+this.state.errorUpdate
122Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ic(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:!A1(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Fe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Fe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,Fe)&&(T(this,In)?T(this,Fe).cancel({revert:!0}):T(this,Fe).cancelRetry()),this.scheduleGc()),T(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Nt,ur).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,Fe))return T(this,Fe).continueRetry(),T(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(q(this,In,!0),n.signal)})},i=()=>{const f=Jy(this.options,r),g=(()=>{const v={client:T(this,Nn),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return q(this,In,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,Nn),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),q(this,On,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&$e(this,Nt,ur).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,v,x;_u(f)&&f.silent||$e(this,Nt,ur).call(this,{type:"error",error:f}),_u(f)||((g=(h=T(this,mt).config).onError)==null||g.call(h,f,this),(x=(v=T(this,mt).config).onSettled)==null||x.call(v,this.state.data,f,this)),this.scheduleGc()};return q(this,Fe,Zy({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,g,v,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(w){l(w);return}(g=(h=T(this,mt).config).onSuccess)==null||g.call(h,f,this),(x=(v=T(this,mt).config).onSettled)==null||x.call(v,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{$e(this,Nt,ur).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{$e(this,Nt,ur).call(this,{type:"pause"})},onContinue:()=>{$e(this,Nt,ur).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,Fe).start()}},As=new WeakMap,On=new WeakMap,mt=new WeakMap,Nn=new WeakMap,Fe=new WeakMap,ho=new WeakMap,In=new WeakMap,Nt=new WeakSet,ur=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...V1(n.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,On,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return _u(s)&&s.revert&&T(this,On)?{...T(this,On),fetchStatus:"idle"}
vendor: 4,595 bytes, line 122
122:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,mt).notify({query:this,type:"updated",action:t})})},dm);function V1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function H1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Gt,hm,q1=(hm=class extends Al{constructor(t={}){super();ne(this,Gt);this.config=t,q(this,Gt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??ah(s,r);let o=this.get(i);return o||(o=new W1({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){T(this,Gt).has(t.queryHash)||(T(this,Gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,Gt).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,Gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Gt).get(t)}getAll(){return[...T(this,Gt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>sp(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>sp(t,n)):r}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gt=new WeakMap,hm),Jt,Ve,Ln,Qt,$r,fm,K1=(fm=class extends e0{constructor(t){super();ne(this,Qt);ne(this,Jt);ne(this,Ve);ne(this,Ln);this.mutationId=t.mutationId,q(this,Ve,t.mutationCache),q(this,Jt,[]),this.state=t.state||G1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Jt).includes(t)||(T(this,Jt).push(t),this.clearGcTimeout(),T(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,Jt,T(this,Jt).filter(r=>r!==t)),this.scheduleGc(),T(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Jt).length||(this.state.status==="pending"?this.scheduleGc():T(this,Ve).remove(this))}continue(){var t;return((t=T(this,Ln))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,d,f,h,g,v,x,w,p,y,_,k,E,S,R;const r=()=>{$e(this,Qt,$r).call(this,{type:"continue"})};q(this,Ln,Zy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,N)=>{$e(this,Qt,$r).call(this,{type:"failed",failureCount:A,error:N})},onPause:()=>{$e(this,Qt,$r).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Ve).canRun(this)}));const n=this.state.status==="pending",s=!T(this,Ln).canStart();try{if(n)r();else{$e(this,Qt,$r).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=T(this,Ve).config).onMutate)==null?void 0:o.call(i,t,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));N!==this.state.context&&$e(this,Qt,$r).call(this,{type:"pending",context:N,variables:t,isPaused:s})}const A=await T(this,Ln).start();return await((c=(u=T(this,Ve).config).onSuccess)==null?void 0:c.call(u,A,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,t,this.state.context)),await((g=(h=T(this,Ve).config).onSettled)==null?void 0:g.call(h,A,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,A,null,t,this.state.context)),$e(this,Qt,$r).call(this,{type:"success",data:A}),A}catch(A){try{throw await((p=(w=T(this,Ve).config).onError)==null?void 0:p.call(w,A,t,this.state.context,this)),await((_=(y=this.options).onError)==null?void 0:_.call(y,A,t,this.state.context)),await((E=(k=T(this,Ve).config).onSettled)==null?void 0:E.
122call(k,void 0,A,this.state.variables,this.state.context,this)),await((R=(S=this.options).onSettled)==null?void 0:R.call(S,void 0,A,t,this.state.context)),A}finally{$e(this,Qt,$r).call(this,{type:"error",error:A})}}finally{T(this,Ve).runNext(this)}}},Jt=new WeakMap,Ve=new WeakMap,Ln=new WeakMap,Qt=new WeakSet,$r=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qe.batch(()=>{T(this,Jt).forEach(n=>{n.onMutationUpdate(t)}),T(this,Ve).notify({mutation:this,type:"updated",action:t})})},fm);function G1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mr,It,fo,pm,J1=(pm=class extends Al{constructor(t={}){super();ne(this,mr);ne(this,It);ne(this,fo);this.config=t,q(this,mr,new Set),q(this,It,new Map),q(this,fo,0)}build(t,r,n){const s=new K1({mutationCache:this,mutationId:++Co(this,fo)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){T(this,mr).add(t);const r=Jo(t);if(typeof r=="string"){const n=T(this,It).get(r);n?n.push(t):T(this,It).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,mr).delete(t)){const r=Jo(t);if(typeof r=="string"){const n=T(this,It).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&T(this,It).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Jo(t);if(typeof r=="string"){const n=T(this,It).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Jo(t);if(typeof r=="string"){const s=(n=T(this,It).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qe.batch(()=>{T(this,mr).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,mr).clear(),T(this,It).clear()})}getAll(){return Array.from(T(this,mr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ip(r,n))}findAll(t={}){return this.getAll().filter(r=>ip(t,r))}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 122
122r.state.isPaused);return qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(At))))}},mr=new WeakMap,It=new WeakMap,fo=new WeakMap,pm);function Jo(e){var t;return(t=e.options.scope)==null?void 0:t.id}function lp(e){return{onFetch:(t,r)=>{var c,d,f,h,g;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const x=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},w=Jy(t.options,t.fetchOptions),p=async(y,_,k)=>{if(v)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const S=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return x(B),B})(),R=await w(S),{maxPages:A}=t.options,N=k?$1:L1;return{pages:N(y.pages,R,A),pageParams:N(y.pageParams,_,A)}};if(s&&i.length){const y=s==="backward",_=y?Q1:up,k={pages:i,pageParams:o},E=_(n,k);a=await p(k,E,y)}else{const y=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:up(n,a);if(l>0&&_==null)break;a=await p(a,_),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function up(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Q1(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ve,Hr,qr,Os,Ns,Kr,Is,Ls,mm,Y1=(mm=class{constructor(e={}){ne(this,ve);ne(this,Hr);ne(this,qr);ne(this,Os);ne(this,Ns);ne(this,Kr);ne(this,Is);ne(this,Ls);q(this,ve,e.queryCache||new q1),q(this,Hr,e.mutationCache||new J1),q(this,qr,e.defaultOptions||{}),q(this,Os,new Map),q(this,Ns,new Map),q(this,Kr,0)}mount(){Co(this,Kr)._++,T(this,Kr)===1&&(q(this,Is,Qy.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ve).onFocus())})),q(this,Ls,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ve).onOnline())})))}unmount(){var e,t;Co(this,Kr)._--,T(this,Kr)===0&&((e=T(this,Is))==null||e.call(this),q(this,Is,void 0),(t=T(this,Ls))==null||t.call(this),q(this,Ls,void 0))}isFetching(e){return T(this,ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Hr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,ve).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ic(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,ve).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=T(this,ve).get(n.queryHash),i=s==null?void 0:s.state.data,o=R1(t,i);if(o!==void 0)return T(this,ve).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return qe.batch(()=>T(this,ve).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,ve);qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,ve);return qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qe.batch(()=>T(this,ve).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(At).catch(At)}invalidateQueries(e,t={}){return qe.batch(()=>(T(this,ve).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=qe.batch(()=>T(this,ve).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(At)),s.state.fetchStatus==="paused"?Promise.resolve():i}
122));return Promise.all(n).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,ve).build(this,t);return r.isStaleByTime(Ic(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=lp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=lp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qa.isOnline()?T(this,Hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,ve)}getMutationCache(){return T(this,Hr)}getDefaultOptions(){return T(this,qr)}setDefaultOptions(e){q(this,qr,e)}setQueryDefaults(e,t){T(this,Os).set(Zi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Os).values()],r={};return t.forEach(n=>{eo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,Ns).set(Zi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Ns).values()],r={};return t.forEach(n=>{eo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ah(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===lh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,ve).clear(),T(this,Hr).clear()}},ve=new WeakMap,Hr=new WeakMap,qr=new WeakMap,Os=new WeakMap,Ns=new WeakMap,Kr=new WeakMap,Is=new WeakMap,Ls=new WeakMap,mm),X1=b.createContext(void 0),Z1=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(X1.Provider,{value:e,children:t}));/** 123 * @remix-run/router v1.23.3 124 * 125 * Copyright (c) Remix Software Inc. 126 * 127 * This source code is licensed under the MIT license found in the 128 * LICENSE.md file in the root directory of this source tree. 129 * 130 * @license MIT 131 */function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},to.apply(null,arguments)}var Qr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Qr||(Qr={}));const cp="popstate";function eS(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return $c("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Ya(s)}return rS(t,r,null,e)}function _e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tS(){return Math.random().toString(36).substr(2,8)}function dp(e,t){return{usr:e.state,key:e.key,idx:t}}function $c(e,t,r,n){return r===void 0&&(r=null),to({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ys(t):t,{state:r,key:t&&t.key||n||tS()})}function Ya(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ys(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function rS(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Qr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(to({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=Qr.Pop;let x=c(),w=x==null?null:x-u;u=x,l&&l({action:a,location:v.location,delta:w})}function f(x,w){a=Qr.Push;let p=$c(v.location,x,w);u=c()+1;let y=dp(p,u),_=v.createHref(p);try{o.pushState(y,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}i&&l&&l({action:a,location:v.location,delta:1})}function h(x,w){a=Qr.Replace;let p=$c(v.location,x,w);u=c();let y=dp(p,u),_=v.createHref(p);o.replaceState(y,"",_),i&&l&&l({action:a,location:v.location,delta:0})}function g(x){let w=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof x=="str
131ing"?x:Ya(x);return p=p.replace(/ $/,"%20"),_e(w,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,w)}let v={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(cp,d),l=x,()=>{s.removeEventListener(cp,d),l=null}},createHref(x){return t(s,x)},createURL:g,encodeLocation(x){let w=g(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:h,go(x){return o.go(x)}};return v}var hp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(hp||(hp={}));function nS(e,t,r){return r===void 0&&(r="/"),sS(e,t,r,!1)}function sS(e,t,r,n){let s=typeof t=="string"?Ys(t):t,i=ch(s.pathname||"/",r);if(i==null)return null;let o=t0(e);iS(o);let a=null,l=gS(i);for(let u=0;a==null&&u<o.length;++u)a=pS(o[u],l,n);return a}function t0(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(_e(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=on([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(_e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),t0(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:hS(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of r0(i.path))s(i,o,l)}),t}function r0(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=r0(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function iS(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:fS(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const oS=/^:[\w-]+$/,aS=3,lS=2,uS=1,cS=10,dS=-2,fp=e=>e==="*";function hS(e,t){let r=e.split("/"),n=r.length;return r.some(fp)&&(n+=dS),t&&(n+=lS),r.filter(s=>!fp(s)).reduce((s,i)=>s+(oS.test(i)?aS:i===""?uS:cS),n)}function fS(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function pS(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=pp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=pp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 4,345 bytes, lines 131-140
131Object.assign(s,d.params),o.push({params:s,pathname:on([i,d.pathname]),pathnameBase:xS(on([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=on([i,d.pathnameBase]))}return o}function pp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=mS(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let v=a[d]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const g=a[d];return h&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function mS(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),uh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function gS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return uh(!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 ch(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const vS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yS=e=>vS.test(e);function wS(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ys(e):e,i;if(r)if(yS(r))i=r;else{if(r.includes("//")){let o=r;r=n0(r),uh(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?i=mp(r.substring(1),"/"):i=mp(r,t)}else i=t;return{pathname:i,search:_S(n),hash:kS(s)}}function mp(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ku(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function bS(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function dh(e,t){let r=bS(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function hh(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ys(e):(s=to({},e),_e(!s.pathname||!s.pathname.includes("?"),ku("?","pathname","search",s)),_e(!s.pathname||!s.pathname.includes("#"),ku("#","pathname","hash",s)),_e(!s.search||!s.search.includes("#"),ku("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=wS(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const n0=e=>e.replace(/\/\/+/g,"/"),on=e=>n0(e.join("/")),xS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_S=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ES(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const s0=["post","put","patch","delete"];new Set(s0);const SS=["get",...s0];new Set(SS);/** 132 * React Router v6.30.4 133 * 134 * Copyright (c) Remix Software Inc. 135 * 136 * This source code is licensed under the MIT license found in the 137 * LICENSE.md file in the root directory of this source tree. 138 * 139 * @license MIT 140 */function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
vendor: 5,153 bytes, line 140
140).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ro.apply(null,arguments)}const fh=b.createContext(null),TS=b.createContext(null),gn=b.createContext(null),Nl=b.createContext(null),Tr=b.createContext({outlet:null,matches:[],isDataRoute:!1}),i0=b.createContext(null);function CS(e,t){let{relative:r}=t===void 0?{}:t;Xs()||_e(!1);let{basename:n,navigator:s}=b.useContext(gn),{hash:i,pathname:o,search:a}=a0(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:on([n,o])),s.createHref({pathname:l,search:a,hash:i})}function Xs(){return b.useContext(Nl)!=null}function Vt(){return Xs()||_e(!1),b.useContext(Nl).location}function o0(e){b.useContext(gn).static||b.useLayoutEffect(e)}function _o(){let{isDataRoute:e}=b.useContext(Tr);return e?US():PS()}function PS(){Xs()||_e(!1);let e=b.useContext(fh),{basename:t,future:r,navigator:n}=b.useContext(gn),{matches:s}=b.useContext(Tr),{pathname:i}=Vt(),o=JSON.stringify(dh(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return o0(()=>{a.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=hh(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:on([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,i,e])}function Qj(){let{matches:e}=b.useContext(Tr),t=e[e.length-1];return t?t.params:{}}function a0(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=b.useContext(gn),{matches:s}=b.useContext(Tr),{pathname:i}=Vt(),o=JSON.stringify(dh(s,n.v7_relativeSplatPath));return b.useMemo(()=>hh(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function RS(e,t){return jS(e,t)}function jS(e,t,r,n){Xs()||_e(!1);let{navigator:s}=b.useContext(gn),{matches:i}=b.useContext(Tr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Vt(),c;if(t){var d;let x=typeof t=="string"?Ys(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||_e(!1),c=x}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=nS(e,{pathname:h}),v=LS(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:on([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:on([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return t&&v?b.createElement(Nl.Provider,{value:{location:ro({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Qr.Pop}},v):v}function AS(){let e=MS(),t=ES(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const OS=b.createElement(AS,null);class NS extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(Tr.Provider,{value:this.props.routeContext},b.createElement(i0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function IS(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(fh);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Tr.Provider,{value:t},n)}function LS(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||_e(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,g=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let h,g=!1,v=null,x=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,v=d.route.errorElement||OS,l&&(u<0&&f===0?(g=!0,x=null):u===f&&(g=!0,x=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,f+1)),p=()=>{let y;return h?y=v:g?y=x:d.route.Component?y=b.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=c,b.createElement(IS,{match:d,routeC
140ontext:{outlet:c,matches:w,isDataRoute:r!=null},children:y})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(NS,{location:r.location,revalidation:r.revalidation,component:v,error:h,children:p(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):p()},null)}var l0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(l0||{}),Xa=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}(Xa||{});function $S(e){let t=b.useContext(fh);return t||_e(!1),t}function DS(e){let t=b.useContext(TS);return t||_e(!1),t}function zS(e){let t=b.useContext(Tr);return t||_e(!1),t}function u0(e){let t=zS(),r=t.matches[t.matches.length-1];return r.route.id||_e(!1),r.route.id}function MS(){var e;let t=b.useContext(i0),r=DS(Xa.UseRouteError),n=u0(Xa.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function US(){let{router:e}=$S(l0.UseNavigateStable),t=u0(Xa.UseNavigateStable),r=b.useRef(!1);return o0(()=>{r.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ro({fromRouteId:t},i)))},[e,t])}function FS(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Yj(e){let{to:t,replace:r,state:n,relative:s}=e;Xs()||_e(!1);let{future:i,static:o}=b.useContext(gn),{matches:a}=b.useContext(Tr),{pathname:l}=Vt(),u=_o(),c=hh(t,dh(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(c);return b.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:s}),[u,d,s,r,n]),null}function K(e){_e(!1)}function BS(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Qr.Pop,navigator:i,static:o=!1,future:a}=e;Xs()&&_e(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:ro({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ys(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:g="default"}=n,v=b.useMemo(()=>{let x=ch(c,l);return x==null?null:{location:{pathname:x,search:d,hash:f,state:h,key:g},navigationType:s}},[l,c,d,f,h,g,s]);return v==null?null:b.createElement(gn.Provider,{value:u},b.createElement(Nl.Provider,{children:r,value:v}))}function WS(e){let{children:t,location:r}=e;return RS(Dc(t),r)}new Promise(()=>{});function Dc(e,t){t===void 0&&(t=[]);let r=[];return b.Children.forEach(e,(n,s)=>{if(!b.isValidElement(n))return;let i=[...t,s];if(n.type===b.Fragment){r.push.apply(r,Dc(n.props.children,i));return}n.type!==K&&_e(!1),!n.props.index||!n.props.children||_e(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Dc(n.props.children,i)),r.push(o)}),r}/** 141 * React Router DOM v6.30.4 142 * 143 * Copyright (c) Remix Software Inc. 144 * 145 * This source code is licensed under the MIT license found in the 146 * LICENSE.md file in the root directory of this source tree. 147 * 148 * @license MIT 149 */function zc(){return zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zc.apply(null,arguments)}function VS(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qS(e,t){return e.button===0&&(!t||t==="_self")&&!HS(e)}function Mc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function KS(e,t){let r=Mc(e);return t&&t.forEach((n,s)=>
149{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const GS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],JS="6";try{window.__reactRouterVersion=JS}catch{}const QS="startTransition",gp=Cm[QS];function YS(e){let{basename:t,children:r,future:n,window:s}=e,i=b.useRef();i.current==null&&(i.current=eS({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=b.useCallback(d=>{u&&gp?gp(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>FS(n),[n]),b.createElement(BS,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const XS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c0=b.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,f=VS(t,GS),{basename:h}=b.useContext(gn),g,v=!1;if(typeof u=="string"&&ZS.test(u)&&(g=u,XS))try{let y=new URL(window.location.href),_=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=ch(_.pathname,h);_.origin===y.origin&&k!=null?u=k+_.search+_.hash:v=!0}catch{}let x=CS(u,{relative:s}),w=eT(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function p(y){n&&n(y),y.defaultPrevented||w(y)}return b.createElement("a",zc({},f,{href:g||x,onClick:v||i?n:p,ref:r,target:l}))});var vp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vp||(vp={}));var yp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yp||(yp={}));function eT(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=_o(),u=Vt(),c=a0(e,{relative:o});return b.useCallback(d=>{if(qS(d,r)){d.preventDefault();let f=n!==void 0?n:Ya(u)===Ya(c);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,n,s,r,e,i,o,a])}function Xj(e){let t=b.useRef(Mc(e)),r=b.useRef(!1),n=Vt(),s=b.useMemo(()=>KS(n.search,r.current?null:t.current),[n.search]),i=_o(),o=b.useCallback((a,l)=>{const u=Mc(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,o]}const tT="https://www.wise-ed.ai",rT={title:"Wise Ed â AI mentor za uÄenje osnovne in srednje Å¡ole",description:"Wise Ed je slovenski sistem za uÄenje in organizacijo uÄenja. Otroka vodi do razumevanja snovi po slovenskem uÄnem naÄrtu, od 5. razreda OÅ do 4. letnika SÅ .",path:"/",locale:"sl_SI"},nT={"/pl":{title:"Wise Ed â AI korepetytor do nauki dla klas 4â8",description:"Wise Ed to system nauki i organizacji nauki, który prowadzi dziecko do zrozumienia materiaÅu, a nie do gotowych odpowiedzi. Wszystkie przedmioty dla klas 4â8, zgodnie z podstawÄ
programowÄ
.",path:"/pl",locale:"pl_PL"},"/pl/lp1":{title:"Wise Ed â Lepszy sposób nauki dla Twojego dziecka",description:"Poznaj lepszy sposób nauki: zamiast godzin przy zeszytach â zrozumienie materiaÅu i samodzielnoÅÄ dziecka. Sprawdź, ile kosztuje CiÄ obecny
149sposób nauki.",path:"/pl/lp1",locale:"pl_PL"},"/pl/e8-lp1":{title:"Wise Ed â Przygotowanie do egzaminu ósmoklasisty",description:"Wise Ed wykrywa braki w wiedzy i prowadzi dziecko krok po kroku przez przygotowanie do egzaminu ósmoklasisty.",path:"/pl/e8-lp1",locale:"pl_PL"},"/pl/checkout":{title:"Wise Ed â Bezpieczne zamówienie",description:"Wybierz pakiet Wise Ed i zacznij już dziÅ. Bezpieczna pÅatnoÅÄ przez Stripe.",path:"/pl/checkout",locale:"pl_PL"},"/pl/thank-you":{title:"Wise Ed â DziÄkujemy za zamówienie",description:"DziÄkujemy za zamówienie Wise Ed. Wszystkie informacje o dostÄpie wyÅlemy na Twój adres e-mail.",path:"/pl/thank-you",locale:"pl_PL"},"/pl/poradnik":{title:"Wise Ed â Darmowy poradnik dla rodziców",description:"Pobierz darmowy poradnik Wise Ed: jak wspieraÄ dziecko w nauce i organizacji nauki, bez nerwów i bez gotowych odpowiedzi.",path:"/pl/poradnik",locale:"pl_PL"},"/pl/grupa":{title:"Wise Ed â Prywatna grupa rodziców i nauczycieli",description:"DoÅÄ cz do zamkniÄtej grupy rodziców i nauczycieli Wise Ed, w której nasi nauczyciele odpowiadajÄ na pytania i dzielÄ siÄ materiaÅami.",path:"/pl/grupa",locale:"pl_PL"},"/pl/privacy":{title:"Wise Ed â Polityka prywatnoÅci",description:"Polityka prywatnoÅci Wise Ed dla rynku polskiego â zasady przetwarzania danych osobowych zgodnie z RODO.",path:"/pl/privacy",locale:"pl_PL"},"/pl/policy":{title:"Wise Ed â Polityka prywatnoÅci",description:"Polityka prywatnoÅci Wise Ed dla rynku polskiego â zasady przetwarzania danych osobowych zgodnie z RODO.",path:"/pl/policy",locale:"pl_PL"},"/pl/cookies":{title:"Wise Ed â Polityka cookies",description:"Polityka cookies Wise Ed dla rynku polskiego.",path:"/pl/cookies",locale:"pl_PL"},"/pl/cookie-policy":{title:"Wise Ed â Polityka cookies",description:"Polityka cookies Wise Ed dla rynku polskiego.",path:"/pl/cookie-policy",locale:"pl_PL"},"/it":{title:"Wise Ed â Mentor AI per lo studio, dalla secondaria alle superiori",description:"Wise Ed è il sistema di studio e organizzazione che guida il ragazzo alla comprensione, non alle soluzioni pronte. Tutte le materie, secondo il programma scolastico.",path:"/it",locale:"it_IT"},"/it-home":{title:"Wise Ed Italia â Il metodo di studio che mancava",description:"Compiti, simulazioni interrogazioni e verifiche senza stress: Ed accompagna tuo figlio passo dopo passo, materia per materia, secondo il programma scolastico italiano.",path:"/it-home",locale:"it_IT"},"/it/lp-s":{title:"Wise Ed â Questionario studenti",description:"Scopri in 2 minuti come studi oggi e ricevi consigli personalizzati più la mappa degli studenti Wise Ed in Italia.",path:"/it/lp-s",locale:"it_IT"},"/it/lp-p":{title:"Wise Ed â Questionario genitori",description:"Scopri in 2 minuti come sostenere davvero tuo figlio nello studio e ricevi la guida gratuita di Wise Ed.",path:"/it/lp-p",locale:"it_IT"},"/it/cookies":{title:"Wise Ed â Cookie Policy",description:"Cookie Policy di Wise Ed per il mercato italiano.",path:"/it/cookies",locale:"it_IT"}};function bn(e,t,r){let n=document.head.querySelector(`meta[${e}="${t}"]`);n||(n=document.createElement("meta"),n.setAttribute(e,t),document.head.appendChild(n)),n.setAttribute("content",r)}function sT(e){var t;document.title=e.title,bn("name","description",e.description),bn("property","og:title",e.title),bn("property","og:description",e.description),bn("property","og:locale",e.locale),bn("property","og:url",`${tT}${e.path}`),bn("name","twitter:title",e.title),bn("name","twitter:description",e.description),(t=document.head.querySelector('link[rel="canonical"]'))==null||t.remove()}const iT=()=>{const{pathname:e}=Vt();return b.useEffect(()=>{const t=e.replace(/\/+$/,"")||"/";sT(nT[t]??rT)},[e]),null},oT=oy("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-primary text-primary-foreground font-semibold text-base tracking-wide hover:bg-primary/90 animate-pulse-glow rounded-lg shadow-lg transition-all duration-300 hover:scale-105"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d0=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?Cx:"button";return m.jsx(o,{className:nr(oT({variant:t,size:r,className:e})),ref:i,...s})});d0.displayName="Button";const aT="/assets/professor-lisa-KwByOQB7.jpg",wp="vidalytics_embed_m9smt2sBYSb9Hrx4",lT=487,uT=({onRevealBelowFold:e})=>{const t=b.useRef(!1);return b.useEffect(()=>{const r="vidalytics-script";if(!document.getElementById(r)){const i=document.createElement("script");i.id=r,i.type="text/javascript",i.innerHTML=` 150 (function (v, i, d, a, l, y, t, c, s) { 151 y='_'+d.toLowerCase();c=d+'L';if(!v[d]){v[d]={};}if(!v[c]){v[c]={};}if(!v[y]){v[y]={};}var vl='Loader',vli=v[y][vl],vsl=v[c][vl+'Script'],vlf=v[c][vl+'Loaded'],ve='Embed'; 152 if(!vsl){vsl=function(u,cb){ 153 if(t){cb();return;}s=i.createElement("script");s.type="text/javascript";s.async=1;s.src=u; 154 if(s.readyState){s.onreadystatechange=function(){if(s.readyState==="loaded"||s.readyState=="complete"){s.onreadystatechange=null;vlf=1;cb();}};}else{s.onload=function(){vlf=1;cb();};} 155 i.getElementsByTagName("head")[0].appendChild(s); 156 };} 157 vsl(l+'loader.min.js',function(){if(!vli){var vlc=v[c][vl];vli=new vlc();}vli.loadScript(l+'player.min.js',function(){var vec=v[d][ve];t=new vec();t.run(a);});}); 158 })(window, document, 'Vidalytics', '${wp}', 'https://fast.vidalytics.com/embeds/8HV_yHgW/m9smt2sBYSb9Hrx4/'); 159 `,document.head.appendChild(i)}const n="vidalytics-player-helper";if(!document.getElementById(n)){const i=document.createElement("script");i.id=n,i.innerHTML=` 160 !function(v,a,p,i){ 161 v.getVidalyticsPlayer=function(n){v[a]=v[a]||{};v[a][p]=v[a][p]||{};var d=v[a][p][n]=v[a][p][n]||{}; 162 return new Promise(function(e){if(d[i])return void e(d[i]);var t; 163 Object.defineProperty(d,i,{get:function(){return t},set:function(i){t=i;e(i)}})})}; 164 }(window,'_vidalytics','embeds','player'); 165 `,document.head.appendChild(i)}const s=()=>
165{if(!window.getVidalyticsPlayer){setTimeout(s,500);return}window.getVidalyticsPlayer(wp).then(i=>{i&&i.on("timeupdate",()=>{t.current||i.currentTime()>=lT&&(t.current=!0,e==null||e())})})};s()},[e]),m.jsxs("section",{className:"relative flex flex-col items-center justify-start px-4 pt-10 md:pt-14 pb-8 overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",style:{contain:"strict"},children:m.jsx("div",{className:"w-[600px] h-[600px] rounded-full bg-primary/5 blur-[120px]"})}),m.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto text-center space-y-8",children:[m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden border-2 border-[#c4f600] shrink-0",children:m.jsx("img",{src:aT,alt:"Profesorica Lisa",loading:"lazy",decoding:"async",width:900,height:900,className:"w-full h-full object-cover"})}),m.jsxs("p",{className:"tracking-widest uppercase text-[10px] text-[#c2f202] font-light italic flex items-center gap-2",children:[m.jsxs("span",{className:"relative flex h-2 w-2",children:[m.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[#c2f202] opacity-75"}),m.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[#c2f202]"})]}),m.jsx("span",{className:"animate-pulse",children:"MAG. PROF. LISA VONÄINA SVETUJE!"})]})]}),m.jsxs("h1",{className:"font-display text-4xl md:text-6xl lg:text-7xl font-black leading-tight text-white",children:["V Å¡oli jih"," ",m.jsx("span",{style:{color:"#ccfe00"},children:"ne uÄijo"}),","," ","kako se uÄiti"]}),m.jsx("p",{className:"text-lg md:text-xl max-w-2xl mx-auto leading-relaxed text-white",children:"Å olski sistem zahteva veliko, razloži pa le snov. V videu si oglejte, zakaj je 2000 slovenskih Å¡olarjev s pomoÄjo te metode konÄno naÅ¡lo motivacijo za uÄenje."}),m.jsx("div",{className:"relative max-w-3xl mx-auto mt-8",children:m.jsx("div",{className:"rounded-xl overflow-hidden border-glow glow-gold",children:m.jsx("div",{id:"vidalytics_embed_m9smt2sBYSb9Hrx4",style:{width:"100%",position:"relative",paddingTop:"56.25%"}})})})]})]})},cT=["Ustvari uÄni naÄrt, ki je prilagojen predmetu, Äasu do testa, interesu in tvojemu cilju.","Z zapiski, kvizi, vajami, podcasti in uÄnimi karticami do boljÅ¡ih ocen.","PomoÄ 24/7. Tvoj AI mentor, ki snov razloži na tvoj naÄin v pogovorni obliki.","Manj stresa, veÄ uspeha. Do boljÅ¡ih rezultatov na bolj organiziran naÄin."],dT=({text:e,index:t})=>{const r=b.useRef(null);return b.useEffect(()=>{const n=r.current;if(!n)return;const s=new IntersectionObserver(([i])=>{i.isIntersecting&&(n.style.opacity="1",n.style.transform="translateY(0)",s.unobserve(n))},{threshold:.3});return s.observe(n),()=>s.disconnect()},[]),m.jsxs("div",{ref:r,style:{opacity:0,transform:"translateY(40px)",transition:`opacity 1s ease-in-out ${t*.15}s, transform 1s ease-in-out ${t*.15}s`},className:"flex items-center gap-4 md:gap-6",children:[m.jsx("div",{className:"shrink-0 text-3xl md:text-5xl",role:"img","aria-label":"bullet",children:["ð¯","ð","ð¤","ð"][t]}),m.jsx("p",{className:"text-lg font-montserrat font-semibold text-white leading-snug",children:e})]})},hT=()=>
165m.jsx("section",{id:"benefits-section",className:"py-12 md:py-20 px-4",children:m.jsxs("div",{className:"max-w-4xl mx-auto",children:[m.jsxs("div",{className:"text-center mb-12 md:mb-16",children:[m.jsxs("h2",{className:"font-display text-3xl md:text-5xl font-bold mb-4",children:["Kaj pridobite z ",m.jsx("span",{className:"text-[#c4f600]",children:"Wise Ed"}),"?"]}),m.jsx("p",{className:"text-white text-lg max-w-xl mx-auto",children:"Prva pametna aplikacija za personalizirano uÄenje, ki uÄencem poda vsebino in strategijo, kako se uÄiti â hitro, uÄinkovito, spodbudno."}),m.jsx("p",{className:"text-sm max-w-xl mx-auto mt-2 text-[#c4f600]",children:"*uÄno snov so pripravljali profesorji v skladu z uÄnimi naÄrti"})]}),m.jsx("div",{className:"p-6 md:p-10 rounded-2xl bg-white/10 backdrop-blur-sm border border-white/20 border-l-4 border-l-[#c4f600] shadow-lg",children:m.jsx("div",{className:"space-y-6 md:space-y-8",children:cT.map((e,t)=>m.jsx(dT,{text:e,index:t},t))})})]})}),vi=[{name:"Mojca",role:"Mama srednjeÅ¡olca",quote:"Moj sin je imel vedno težave z motivacijo. Z Wise Ed prviÄ vidim, da ima veselje do uÄenja. Brez joka in stresa pred testom.",stars:5},{name:"Nejc",role:"6. razred",quote:"Rakun Ed mi pomaga vsak dan. PrviÄ sem dobil petko pri naravoslovju!",stars:5},{name:"Gregor",role:"OÄe gimnazijke",quote:"HÄerka konÄno razume, kako se uÄiti. Wise Ed ni samo aplikacija, je kot domaÄi uÄitelj, ki jo zna posluÅ¡ati in razumeti ter snov prilagoditi njenim potrebam.",stars:5}],h0=({t:e,index:t,className:r=""})=>{const n=b.useRef(null);return b.useEffect(()=>{const s=n.current;if(!s)return;const i=new IntersectionObserver(([o])=>{o.isIntersecting?s.classList.add("testimonial-focus"):s.classList.remove("testimonial-focus")},{threshold:.6});return i.observe(s),()=>i.disconnect()},[]),m.jsxs("div",{ref:n,className:`p-8 rounded-2xl bg-white/10 backdrop-blur-sm border border-white/15 flex flex-col shadow-lg transition-all duration-500 ease-out scale-[0.97] opacity-80 [&.testimonial-focus]:scale-100 [&.testimonial-focus]:opacity-100 [&.testimonial-focus]:border-white/50 [&.testimonial-focus]:shadow-[0_0_30px_rgba(255,255,255,0.08)] ${r}`,children:[m.jsx("div",{className:"flex gap-1 mb-4",children:Array.from({length:e.stars}).map((s,i)=>m.jsx(P_,{className:"w-4 h-4 fill-primary text-primary"},i))}),m.jsxs("p",{className:"text-foreground leading-relaxed mb-6 flex-1",children:['"',e.quote,'"']}),m.jsxs("div",{children:[m.jsx("p",{className:"font-semibold text-foreground",children:e.name}),m.jsx("p",{className:"text-sm text-muted-foreground",children:e.role})]})]})},fT=()=>{const e=b.useRef(null),[t,r]=b.useState(0),n=i=>{var u;const o=e.current;if(!o)return;const a=((u=o.firstElementChild)==null?void 0:u.clientWidth)||0;o.scrollTo({left:i*(a+24),behavior:"smooth"}),r(i)},s=()=>{var u;const i=e.current;if(!i)return;const o=((u=i.firstElementChild)==null?void 0:u.clientWidth)||0,l=Math.round(i.scrollLeft/(o+24));r(Math.min(l,vi.length-1))};return m.jsxs("div",{className:"md:hidden",children:[m.jsx("div",{ref:e,onScroll:s,className:"flex gap-6 overflow-x-auto snap-x snap-mandatory scrollbar-hide pb-4 -mx-4 px-4",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:vi.map((i,o)=>m.jsx("div",{className:"snap-start shrink-0 w-[85vw] max-w-[340px]",children:m.jsx(h0,{t:i,index:o,className:"h-full"})},o))}),m.jsxs("div",{className:"flex items-center justify-center gap-4 mt-4",children:[m.jsx("button",{onClick:()=>n(Math.max(0,t-1)),className:"p-2 rounded-full bg-white/10 border border-white/20 text-white",children:m.jsx(k_,{className:"w-5 h-5"})}),m.jsx("div",{className:"flex gap-2",children:vi.map((i,o)=>m.jsx("button",{onClick:()=>n(o),className:`w-2 h-2 rounded-full transition-all ${o===t?"bg-[#c4f600] w-6":"bg-white/30"}`},o))}),m.jsx("button",{onClick:()=>n(Math.min(vi.length-1,t+1)),className:"p-2 rounded-full bg-white/10 border border-white/20 text-white",children:m.jsx(E_,{className:"w-5 h-5"})})]})]})},pT=()=>m.jsx("section",{className:"py-12 md:py-16 px-4",children:m.jsxs("div",{className:"max-w-5xl mx-auto",children:[m.jsxs("div",{className:"text-center mb-16",children:[m.jsx("h2",{className:"font-display text-3xl md:text-5xl font-bold mb-4",children:"Kako Wise Ed spreminja uÄenje doma?"}),m.jsx("p",{className:"text-[#c4f600] text-lg",children:"Zgodbe govorijo zase."})]}),m.jsx("div",{className:"hidden md:grid md:grid-cols-3 gap-6",children:vi.map((e,t)=>m.jsx(h0,{t:e,index:t},t))}),m.jsx(fT,{})]})}),bp=({children:e,className:t,...r})=>m.jsxs("button",{...r,className:nr("group relative inline-flex w-full items-center gap-3 overflow-hidden rounded-2xl bg-[#0A1A4A] px-2 py-2 pr-4 transition-all duration-300 ease-out","shadow-[4px_4px_10px_rgba(0,0,0,0.35),-3px_-3px_10px_rgba(255,255,255,0.08)]","hover:shadow-[inset_3px_3px_8px_rgba(0,0,0,0.35),inset_-2px_-2px_8px_rgba(255,255,255,0.06),0_0_22px_rgba(196,246,0,0.18)]","active:shadow-[inset_4px_4px_10px_rgba(0,0,0,0.4),inset_-3px_-3px_10px_rgba(255,255,255,0.05)]",t),children:[m.jsx("span",{className:"absolute left-2 top-2 bottom-2 z-0 w-10 rounded-xl bg-[#C4F600] transition-[width] duration-[450ms] ease-in-out group-hover:w-[calc(100%-16px)]"}),m.jsx("span",{className:nr("relative z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#C4F600] transition-transform duration-300 ease-out","shadow-[inset_1px_1px_3px_rgba(255,255,255,0.45),inset_-2px_-2px_4px_rgba(0,0,0,0.15)]"),children:m.jsx(__,{className:"relative z-10 h-5 w-5 text-black transition-transform duration-300 group-hover:translate-x-0.5",strokeWidth:2.5})}),m.jsx("span",{className:"relative z-10 flex-1 whitespace-nowrap text-center text-base font-bold text-white transition-colors duration-[450ms] ease-in-out group-hover:text-black",children:e})]}),mT=({checkoutSource:e,npzMode:t})=>{const r=_o(),n=e?`&source=${encodeURIComponent(e)}`:"";return m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 max-w-3xl mx-auto mt-10",children:[m.jsxs("div",{className:"relative rounded-2xl border border-white/15 bg-white/5 backdrop-blur-sm p-6 md:p-8 flex flex-col md:order-1",children:[m.jsx("h3",{className:"font-display text-xl font-bold text-white text-center",children:"MeseÄni"}),m.jsx("p",{className:"text-white/60 text-sm mt-1 text-center",children:"ObraÄunano meseÄno"}),m.jsx("div",{className:"mt-6 text-center",children:m.jsxs("span",{className:"text-white text-4xl font-bold",children:["29,9â¬",m.jsx("span",{className:"text-[70%]",children:"/mesec"})]})}),m.jsx(bp,{className:"mt-8 h-auto py-3",onClick:()=>r(`/checkout?plan=monthly${n}`),children:"ZaÄni zdaj!"}),m.jsxs("ul",{className:"mt-6 space-y-3 text-white/80 text-sm flex-1 text-left",children:[m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Personalizirane uÄne poti"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Zapiski, miselni vzorci, podkasti"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"UÄne kartice, kvizi, poskusni testi"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"TakojÅ¡nje povratne informacije o napredku"})]})]})]}),m.jsxs("div",{id:t?"npz-priprave":void 0,className:"relative rounded-2xl border border-[#c4f600]/40 bg-white/5 backdrop-blur-sm p-6 md:p-8 flex flex-col shadow-[0_0_30px_-5px_rgba(196,246,0,0.15)] order-first md:order-2 scroll-mt-24",children:[m.jsxs("div",{className:"absolute -top-3.5 left-1/2 -translate-x-1/2 bg-[#c4f600] text-[#002a85] text-xs font-bold px-4 py-1 rounded-full flex items-center gap-1 whitespace-nowrap",children:[m.jsx(Ff,{className:"w-3 h-3"})," Äasovno omejena akcija!"]}),m.jsx("h3",{className:"font-display text-xl font-bold text-white text-center",children:t?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-[#c4f600]",children:"NPZ"})," priprave"]}):"Letni Premium"}),m.jsx("p",{className:"text-white/60 text-sm mt-1 text-center",children:"ObraÄunano letno"}),m.jsxs("div",{className:"mt-6 text-center",children:[m.jsxs("span",{className:"text-white text-4xl font-bold",children:["8,33â¬",m.jsx("span",{className:"text-[70%]",children:"/mesec"})]}),m.jsxs("p",{className:"text-white/50 text-xs mt-1",children:[m.jsx("span",{className:"line-through text-white/40 mr-1",children:"249,90â¬"}),m.jsx("span",{className:"text-[#c4f600] font-semibold",children:"99,90â¬"}),m.jsx("span",{className:"text-[70%]",children:"/leto"})]})]}),m.jsx(bp,{className:"mt-8 h-auto py-3",onClick:()=>r(`/checkout?plan=yearly${n}`),children:"Izkoristi AKCIJO!"}),m.jsx("ul",{className:"mt-6 space-y-3 text-white/80 text-sm flex-1 text-left",children:t?m.jsxs(m.Fragment,{children:[m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Vse na aplikaciji Wise Ed (vsi predmeti in orodja) za sprotno delo"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Vsa vsebina teÄajev Razturi NPZ (videorazlage, vaje, nasveti, webinarji)"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Stare NPZ pole za vajo"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Razlage reÅ¡itev starih NPZ pol"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Vabila na brezplaÄne webinarje o NPZ-jih v živo tekom leta"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"1:1 akademski posvet"})]})]}):m.jsxs(m.Fragment,{children:[m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Vse iz meseÄnega paketa"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Prednostni dostop do novosti"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Dostop do dodatnih delavnic in webinarjev (v živo)"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"1:1 akademski posvet (v živo)"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Neomejena uporaba aplikacije"})]}),m.jsxs("li",{className:"flex items-start gap-2",children:[m.jsx(Me,{className:"w-4 h-4 text-[#c4f600] mt-0.5 shrink-0"})," ",m.jsx("span",{children:"GRATIS: Video o uÄnih metodah"})]}),m.jsxs("li",{className:"flex items-start gap-2 font-semibold text-[#c4f600]",children:[m.jsx(Ff,{className:"w-4 h-4 mt-0.5 shrink-0"})," ",m.jsx("span",{children:"Prihranite 72% vs. meseÄni paket"})]})]})})]})]})},gT=({checkoutSource:e,npzMode:t})=>(_o(),m.jsxs("section",{id:"final-cta-section",className:"py-12 md:py-16 px-4 relative overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:m.jsx("div",{className:"w-[500px] h-[500px] rounded-full bg-primary/5 blur-[100px]"})}),m.jsxs("div",{className:"relative z-10 max-w-2xl mx-auto text-center space-y-8",children:[m.jsxs("h2",{className:"font-display text-3xl md:text-5xl font-bold leading-tight",children:["Pomagajte otroku pri ",m.jsx("span",{style:{color:"#c4f600"},children:"uÄinkovitejÅ¡em uÄenju!"})," ð"]}),m.jsx("p",{className:"text-white text-lg leading-relaxed",children:"Zakaj bi plaÄevali 25 ⬠ali veÄ za eno samo uro inÅ¡trukcij, ko pa ima lahko vaÅ¡ otrok pametnega mentorja na voljo 24 ur na dan, 7 dni v tednu?"}),m.jsxs("div",{className:"w-full max-w-xl mx-auto border border-[#c4f600]/40 bg-[#c4f600]/10 backdrop-blur-sm rounded-xl px-6 py-4 text-center",children:[m.jsx("p",{className:"text-[#c4f600] font-bold text-sm md:text-base",children:"ð¥ Early bird: 12-meseÄni Wise Ed Premium dostop"}),m.jsx("p",{className:"text-white/80 text-xs md:text-sm mt-[5px]",children:"(VkljuÄuje vse predmete, AI mentorja Eda, personalizirane uÄne poti in priprave na teste)"})]}),m.jsx(mT,{checkoutSource:e,npzMode:t}),m.jsx("p",{className:"text-white text-xs mt-8",children:"ð Varno plaÄilo prek Stripe ⢠Akcija je Äasovn
165o omejena"})]})]})),vT=()=>{const[e,t]=b.useState(!1);return m.jsxs("main",{className:"min-h-screen relative overflow-hidden",style:{background:"linear-gradient(165deg, #001a5e 0%, #002a85 15%, #001d66 30%, #003399 45%, #001a5e 60%, #002a85 75%, #00174d 90%, #002a85 100%)"},children:[m.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 hidden md:block",style:{contain:"strict"},children:[m.jsx("div",{className:"absolute top-[10%] left-[5%] w-[500px] h-[500px] rounded-full bg-[#00103d] opacity-[0.00] blur-[120px]"}),m.jsx("div",{className:"absolute top-[35%] right-[0%] w-[600px] h-[400px] rounded-full bg-[#000d33] opacity-[0.00] blur-[150px]"}),m.jsx("div",{className:"absolute top-[55%] left-[20%] w-[400px] h-[400px] rounded-full bg-[#001040] opacity-[0.00] blur-[130px]"}),m.jsx("div",{className:"absolute top-[80%] right-[15%] w-[500px] h-[500px] rounded-full bg-[#00103d] opacity-[0.00] blur-[140px]"}),m.jsx("div",{className:"absolute top-[5%] right-[30%] w-[300px] h-[300px] rounded-full bg-[#001850] opacity-[0.00] blur-[100px]"})]}),m.jsxs("div",{className:"relative z-10",children:[m.jsx(uT,{onRevealBelowFold:()=>t(!0)}),m.jsxs("div",{className:`transition-all duration-[1500ms] ease-in-out ${e?"opacity-100 blur-0 translate-y-0":"opacity-0 blur-md translate-y-6 pointer-events-none max-h-0 overflow-hidden"}`,children:[m.jsxs("div",{className:"flex flex-col items-center text-center pb-8",children:[m.jsxs("div",{className:"mb-6 flex flex-col items-center gap-0",children:[m.jsx(yu,{className:"w-6 h-6 text-[#c4f600] animate-bounce",style:{animationDelay:"0s"}}),m.jsx(yu,{className:"w-6 h-6 text-[#c4f600] animate-bounce -mt-3",style:{animationDelay:"0.15s"}}),m.jsx(yu,{className:"w-6 h-6 text-[#c4f600] animate-bounce -mt-3",style:{animationDelay:"0.3s"}})]}),m.jsx(d0,{variant:"hero",size:"lg",className:"h-14 px-10 text-lg",onClick:()=>{var r;return(r=document.getElementById("benefits-section"))==null?void 0:r.scrollIntoView({behavior:"smooth"})},children:"Odkrijte otrokov potencial!"}),m.jsx("p",{className:"text-sm mt-3 text-white",children:"ð
ð¼ââï¸ UÄenje brez stresa · Zanesljiva vsebina"})]}),m.jsx(hT,{}),m.jsx(pT,{}),m.jsx(gT,{})]})]})]})},yT=1,wT="7cd9061f-7b16-4134-8460-1d93b5ec3ecf",bT="727d2760-19ca-443e-b8ba-396fc82c38ae",xT="/__l5e/assets-v1/7cd9061f-7b16-4134-8460-1d93b5ec3ecf/Logo_White-1.png",_T="a/v1/727d2760-19ca-443e-b8ba-396fc82c38ae/7cd9061f-7b16-4134-8460-1d93b5ec3ecf/Logo_White-1.png",kT="Logo_White-1.png",ET=17735,ST="image/png",TT="2026-07-28T09:35:54Z",CT={version:yT,asset_id:wT,project_id:bT,url:xT,r2_key:_T,original_filename:kT,size:ET,content_type:ST,created_at:TT};function PT(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const RT=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class ph extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class jT extends ph{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class xp extends ph{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class _p extends ph{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Uc;(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"})(Uc||(Uc={}));class AT{constructor(t,{headers:r={},customFetch:n,region:s=Uc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=RT(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return PT(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const g=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,g.searchParams.set("forceFunctionRegion",h));let v;const x=!!a&&Object.keys(a).some(E=>E.toLowerCase()==="content-type");u&&!x?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",v=u):typeof u=="string"?(f["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(f["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=u;let w=c;d&&(o=new AbortController,i=setTimeout(()=>
165o.abort(),d),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const p=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:v,signal:w}).catch(E=>{throw new jT(E)}),y=p.headers.get("x-relay-error");if(y&&y==="true")throw new xp(p);if(!p.ok)throw new _p(p);let _=((s=p.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return _==="application/json"?k=yield p.json():_==="application/octet-stream"||_==="application/pdf"?k=yield p.blob():_==="text/event-stream"?k=p:_==="multipart/form-data"?k=yield p.formData():k=yield p.text(),{data:k,error:null,response:p}}catch(a){return{data:null,error:a,response:a instanceof _p||a instanceof xp?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const f0=3,kp=e=>Math.min(1e3*2**e,3e4),OT=[520,503],p0=["GET","HEAD","OPTIONS"];var Ep=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Sp(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function NT(e,t,r,n){return!(!n||r>=f0||!p0.includes(e)||!OT.includes(t))}var IT=class{constructor(e){var t,r,n,s,i;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=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!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 r=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 o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const u={};r.headers.forEach((d,f)=>{u[f]=d}),o>0&&(u["X-Retry-Count"]=String(o));let c;try{c=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!p0.includes(r.method))throw d;if(r.retryEnabled&&o<f0){const f=kp(o);o++,await Sp(f,r.signal);continue}throw d}if(NT(r.method,c.status,o,r.retryEnabled)){var a,l;const d=(a=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:kp(o);await c.text(),o++,await Sp(f,r.signal);continue}return await r.processResponse(c)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",c="";const d=o==null?void 0:o.cause;if(d){var f,h,g,v;const p=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",y=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 166 167Caused by: ${(v=d==null?void 0:d.name)!==null&&v!==void 0?v:"Error"}: ${p}
167`,y&&(l+=` (${y})`),d!=null&&d.stack&&(l+=` 168${d.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const w=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((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)",w>this.urlLengthLimit&&(u+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const f=await e.text();if(f!=="")if(t.headers.get("Accept")==="text/csv")n=f;else if(t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))n=f;else try{n=JSON.parse(f)}catch{if(r={message:f},n=null,t.shouldThrowOnError)throw new Ep({message:f,details:"",hint:"",code:""})}}const c=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.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&&(s=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const c=await e.text();try{r=JSON.parse(c),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&c===""?(i=204,o="No Content"):r={message:c}}if(r&&t.shouldThrowOnError)throw new Ep(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},LT=class extends IT{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Tp=new RegExp("[,()]");var ns=class extends LT{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Tp.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Tp.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
168r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},$T=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new ns({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1680){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new ns({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new ns({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ns({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ns({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function no(e){"@babel/helpers - typeof";return no=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},no(e)}function DT(e,t){if(no(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(no(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zT(e){var t=DT(e,"string");return no(t)=="symbol"?t:t+""}function MT(e,t,r){return(t=zT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Qo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cp(Object(r),!0).forEach(function(n){MT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var UT=class m0{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const g=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",g,{once:!0}),l(u,Qo(Qo({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",g)})}return l(u,Qo(Qo({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new $T(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 m0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=n&&Object.values(r).some(c);d?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,g])=>g!==void 0).map(([h,g])=>[h,Array.isArray(g)?`{${g.join(",")}}`:`${g}
168`]).forEach(([h,g])=>{l.searchParams.append(h,g)})):(a="POST",u=r);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new ns({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class FT{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.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 s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 169 170Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const BT="2.110.0",WT=`realtime-js/${BT}`,VT="1.0.0",g0="2.0.0",HT=g0,qT=1e4,KT=100,Fr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},v0={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Fc={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class GT{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
170let g=new DataView(h),v=0;g.setUint8(v++,this.KINDS.userBroadcastPush),g.setUint8(v++,l.length),g.setUint8(v++,a.length),g.setUint8(v++,o.length),g.setUint8(v++,u.length),g.setUint8(v++,d.length),g.setUint8(v++,r),Array.from(l,w=>g.setUint8(v++,w.charCodeAt(0))),Array.from(a,w=>g.setUint8(v++,w.charCodeAt(0))),Array.from(o,w=>g.setUint8(v++,w.charCodeAt(0))),Array.from(u,w=>g.setUint8(v++,w.charCodeAt(0))),Array.from(d,w=>g.setUint8(v++,w.charCodeAt(0)));var x=new Uint8Array(h.byteLength+n.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(n),h.byteLength),x.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+i));l=l+i;const d=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,g={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(g.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ae;(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"})(ae||(ae={}));const Pp=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=JT(o,e,t,s),i),{}):{}},JT=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?y0(i,o):Bc(o)},y0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return ZT(t,r)}switch(e){case ae.bool:return QT(t);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return YT(t);case ae.json:case ae.jsonb:return XT(t);case ae.timestamp:return eC(t);case ae.abstime:case ae.date:case ae.daterange:case ae.int4range:case ae.int8range:case ae.money:case ae.reltime:case ae.text:case ae.time:case ae.timestamptz:case ae.timetz:case ae.tsrange:case ae.tstzrange:return Bc(t);default:return Bc(t)}},Bc=e=>e,QT=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},YT=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},XT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},ZT=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>y0(t,a))}return e},eC=e=>typeof e=="string"?e.replace(" ","T"):e,w0=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 Ai=e=>typeof e=="function"?e:function(){return e},tC=typeof self<"u"?self:null,ss=typeof window<"u"?window:null,Kt=tC||ss||globalThis,rC="2.0.0",nC=1e4,sC=1e3,Yt={connecting:0,open:1,closing:2,closed:3},Qe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},dr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Wc={longpoll:"longpoll",websocket:"websocket"},iC={complete:4},Vc="base64url.bearer.phx.",Yo=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 170
170oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},b0=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))}},oC=class{constructor(e,t,r){this.state=Qe.closed,this.topic=e,this.params=Ai(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Yo(this,dr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new b0(()=>{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(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Qe.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Qe.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=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 Yo(this,dr.leave,Ai({}),this.timeout).send(),this.state=Qe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(dr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Qe.closed,this.bindings=[]}onClose(e){this.on(dr.close,e)}onError(e){return this.on(dr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Yo(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Qe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(dr.close,"leave")},r=new Yo(this,dr.leave,Ai({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Qe.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===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}},Za=class{static request(e,t,r,n,s,i,o){if(Kt.XDomainRequest){let a=new Kt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(Kt.XMLHttpRequest){let a=new Kt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(Kt.fetch&&Kt.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Kt.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===iC.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},aC=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},Zn=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Vc)&&(this.authToken=atob(t[1].slice(Vc.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=Yt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Wc.websocket),"$1/"+Wc.longpoll)}endpointURL(){return Za.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Yt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Yt.open||this.readyState===Yt.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Yt.open,this.onopen({}),this.poll();break;
170case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=aC(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(` 171`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=Yt.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Za.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},lC=class yi{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=yi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=yi.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=yi.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return yi.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(v=>v.phx_ref),f=c.metas.map(v=>v.phx_ref),h=u.metas.filter(v=>f.indexOf(v.phx_ref)<0),g=c.metas.filter(v=>d.indexOf(v.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),g.length>0&&(a[l]=this.clone(c),a[l].metas=g)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Xo={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+i.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(i),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,661 bytes, line 171
171switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let u=r.decode(e.slice(o,o+i));o=o+i;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let c=r.decode(e.slice(a,a+i));a=a+i;let d=r.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:dr.reply,payload:h}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},uC=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||nC,this.transport=t.transport||Kt.WebSocket||Zn,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Kt&&Kt.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Xo.encode.bind(Xo),this.defaultDecoder=Xo.decode.bind(Xo),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!==Zn?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ss&&ss.addEventListener&&(ss.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ss.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),ss.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=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Ai(t.params||{}),this.endPoint=`${e}/${Wc.websocket}`,this.vsn=t.vsn||rC,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new b0(()=>{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 Zn}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=Za.appendParams(Za.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ai(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Zn?this.connectWithFallback(Zn,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case Zn:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Vc}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),sC,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Yt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 171
171triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(dr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Yt.connecting:return"connecting";case Yt.open:return"open";case Yt.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new oC(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Oi{constructor(t,r){const n=dC(r);this.presence=new lC(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=Oi.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Oi.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Oi.transformState(this.presence.state)}static transformState(t){return t=cC(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=ba(s),r},{})}static onJoinPayload(t,r,n){const s=Rp(r),i=ba(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Rp(r),i=ba(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function ba(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function cC(e){return JSON.parse(JSON.stringify(e))}function dC(e){return(e==null?void 0:e.events)&&{events:e.events}}function Rp(e){return e!=null&&e.metas?ba(e):[]}var jp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(jp||(jp={}));class hC{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Oi(this.channel.channelAdapter,r)}}function fC(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
171if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class pC{constructor(t,r,n){const s=mC(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>KT){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Fr.joined}isJoined(){return this.state===Fr.joined}isJoining(){return this.state===Fr.joining}isClosed(){return this.state===Fr.closed}isLeaving(){return this.state===Fr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function mC(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const gC=/[,()"\\]/,vC=e=>gC.test(e)||e!==e.trim(),yC=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Ap=e=>{const t=e===null?"null":String(e);return vC(t)?yC(t):t},wC=e=>e===null?"null":String(e),bC=(e,t)=>{if(e==="in"){const r=Array.isArray(t)?t:[t];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(s=>Ap(s)).join(",")})`}return e==="is"?`is.${wC(t)}`:`${e}.${Ap(t)}`};class xC{constructor(){this.filters=[]}add(t,r,n,s=!1){const i=s?"not.":"";return this.filters.push(`${t}=${i}${bC(r,n)}`),this}eq(t,r){return this.add(t,"eq",r)}neq(t,r){return this.add(t,"neq",r)}gt(t,r){return this.add(t,"gt",r)}gte(t,r){return this.add(t,"gte",r)}lt(t,r){return this.add(t,"lt",r)}lte(t,r){return this.add(t,"lte",r)}in(t,r){return this.add(t,"in",r)}like(t,r){return this.add(t,"like",r)}ilike(t,r){return this.add(t,"ilike",r)}match(t,r){return this.add(t,"match",r)}imatch(t,r){return this.add(t,"imatch",r)}is(t,r){return this.add(t,"is",r)}isDistinct(t,r){return this.add(t,"isdistinct",r)}not(t,r,n){return this.add(t,r,n,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Op;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Op||(Op={}));var ys;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ys||(ys={}));var hr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(hr||(hr={}));class Ni{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new pC(this.socket.socketAdapter,t,this.params),this.presence=new hC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=w0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[ys.PRESENCE]&&this.bindings[ys.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(hr.CHANNEL_ERROR,fC(h))}),this._onClose(()=>t==null?void 0:t(hr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(hr.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
171).receive("error",h=>{this.state=Fr.errored;const g=Object.values(h).join(", ")||"error";t==null||t(hr.CHANNEL_ERROR,new Error(g,{cause:h}))}).receive("timeout",()=>{t==null||t(hr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[a];if(h&&h.event===u&&Ni.isFilterValueEqual(h.schema,c)&&Ni.isFilterValueEqual(h.table,d)&&Ni.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Fr.errored,r==null||r(hr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Fr.errored&&r&&r(hr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===ys.PRESENCE||t===ys.POSTGRES_CHANGES;if(s&&i)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,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=r instanceof ArrayBuffer||ArrayBuffer.isView(r),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?r:JSON.stringify(r)},u=await this._fetchWithTimeout(a.toString(),l,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let c=u.statusText;try{const d=await u.json();c=d.error||d.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
171in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=r==null?void 0:r.filter;(i instanceof xC||typeof i=="object"&&i!==null&&typeof i.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:i.build()}));const o=this.channelAdapter.on(t,n),a={type:s,filter:r,callback:n,ref:o};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,g=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=r.ids)===null||o===void 0?void 0:o.includes(h))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=r==null?void 0:r.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=v0;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Pp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Pp(t.columns,t.old_record)),r}}class _C{constructor(t,r){this.socket=new uC(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Fc.connecting}isDisconnecting(){return this.socket.connectionState()==Fc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Np={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},kC=[1e3,2e3,5e3,1e4],EC=1e4;function SC(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function TC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return SC()}const CC=` 172 addEventListener("message", (e) => { 173 if (e.data.event === "start") { 174 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 175 } 176 });`;class PC{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
176,this.ref=0,this.serializer=new GT,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new _C(t,s),this.httpEndpoint=w0(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Fc.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Ni(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
176this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:WT};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(v0.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([CC],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,c,d,f,h;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const g={};g.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:qT,g.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Np.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Np.HEARTBEAT_INTERVAL),g.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:FT.getWebSocketConstructor(),g.params=t==null?void 0:t.params,g.logger=t==null?void 0:t.logger,g.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),g.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:TC(),g.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:p=>kC[p-1]||EC;let v,x;const w=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:HT;switch(w){case VT:v=(p,y)=>y(JSON.stringify(p)),x=(p,y)=>y(JSON.parse(p));break;case g0:v=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${g.vsn}`)}if(g.vsn=w,g.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:v,g.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:x,g.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,g.params=Object.assign(Object.assign({},g.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,g.autoSendHeartbeat=!this.worker}return g}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
176var so=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function RC(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function jC(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 AC(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=RC(e.baseUrl,n,s),l=await jC(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,g=h==null?void 0:h.error;throw new so((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Zo(e){return e.join("�")}var OC=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Zo(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Zo(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Zo(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Zo(e.namespace)}`}),!0}catch(t){if(t instanceof so&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof so&&r.status===409)return;throw r}}};function es(e){return e.join("�")}var NC=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${es(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${es(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${es(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${es(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/${es(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/${es(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof so&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof so&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},IC=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=AC({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new OC(this.client,t),this.tableOps=new NC(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)}
176async 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)}};function io(e){"@babel/helpers - typeof";return io=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},io(e)}function LC(e,t){if(io(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(io(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $C(e){var t=LC(e,"string");return io(t)=="symbol"?t:t+""}function DC(e,t,r){return(t=$C(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ip(Object(r),!0).forEach(function(n){DC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Il=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Ll(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Hc=class extends Il{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return F({},super.toJSON())}},x0=class extends Il{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function el(e,t,r){const n=F({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function zC(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const MC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),UC=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)},qc=e=>{if(Array.isArray(e))return e.map(r=>qc(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=qc(n)}),t},FC=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Lp=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},BC=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Hc(Lp(o),i,a,n))}).catch(()=>{const o=i+"";t(new Hc(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new x0(Lp(e),e,n))},WC=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return F(F({},s),r);if(UC(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=el(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),F(F({},s),r)};async function hi(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,WC(t,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>BC(u,l,n,o))})}function _0(e="storage"){return{get:async(t,r,n,s)=>hi(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>hi(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>hi(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>hi(t,"HEAD",r,F(F({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>hi(t,"DELETE",r,s,i,n,e)}}const VC=_0("storage"),{get:oo,post:Ot,put:Kc,head:HC,remove:ao}=VC,ot=_0("vectors");var Zs=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=zC(t),this.fetch=MC(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=el(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ll(r))return{data:null,error:r};throw r}}};let k0;k0=Symbol.toStringTag;var qC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[k0]="StreamDownloadBuilder",this.promise=null}
176then(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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ll(t))return{data:null,error:t};throw t}}};let E0;E0=Symbol.toStringTag;var KC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[E0]="BlobDownloadBuilder",this.promise=null}asStream(){return new qC(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(Ll(t))return{data:null,error:t};throw t}}};const Eu={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},$p={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var GC=class extends Zs{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=F(F({},$p),n);let a=F(F({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[f,h]of Object.entries(n.headers))a=el(a,f,h);const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),d=await(e=="PUT"?Kc:Ot)(s.fetch,`${s.url}/object/${c}`,i,F({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=F(F({},$p),n);let c=F(F({},s.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),d&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(d))):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType,d&&(c["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[f,h]of Object.entries(n.headers))c=el(c,f,h);return{path:i,fullPath:(await Kc(s.fetch,a.toString(),l,F({headers:c},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=F({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Ot(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new Il("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Ot(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
176stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Ot(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Ot(n.fetch,`${n.url}/object/sign/${s}`,F({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Ot(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>F(F({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>oo(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new KC(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>qc(await oo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await HC(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Ll(s)){var n;const i=s instanceof Hc?s.status:s instanceof x0?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await ao(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=n._getFinalPath(e),i=new URLSearchParams;t!=null&&t.transformations&&i.set("transformations","true");const o=i.toString();return await ao(n.fetch,`${n.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:n.headers},r)})}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=t!=null&&t.sortBy?F(F({},Eu.sortBy),t.sortBy):Eu.sortBy,i=F(F(F({},Eu),t),{},{sortBy:s,prefix:e||""});return await Ot(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=F({},e);return await Ot(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}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("qual
176ity",t.quality.toString()),e}};const JC="2.110.0",ko={"X-Client-Info":`storage-js/${JC}`};var QC=class extends Zs{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=F(F({},ko),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await oo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await oo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Ot(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Kc(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Ot(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ao(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;t!=null&&t.transformations&&s.set("transformations","true");const i=s.toString();return await ao(n.fetch,`${n.url}/cdn/${e}${i?`?${i}`:""}`,{},{headers:n.headers},r)})}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():""}},YC=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=F(F({},ko),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ot(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await oo(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ao(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!FC(e))throw new Il("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new IC({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},XC=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=F(F({},ko),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await ot.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await ot.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},ZC=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=F(F({},ko),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await ot.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");
176if(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 ot.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await ot.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 ot.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},eP=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=F(F({},ko),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},tP=class extends eP{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new rP(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},rP=class extends XC{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new nP(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},nP=class extends ZC{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},sP=class extends QC{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new GC(this.url,this.headers,e,this.fetch)}get vectors(){return new tP(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new YC(this.url+"/iceberg",this.headers,this.fetch)}};function $l(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}
176const S0="2.110.0",fr=30*1e3,wi=3,Su=wi*fr,iP=2*fr,oP="http://localhost:9999",aP="supabase.auth.token",lP={"X-Client-Info":`gotrue-js/${S0}`},Gc="X-Supabase-Api-Version",T0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},uP=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,cP=10*60*1e3;class lo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function I(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class dP extends lo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function hP(e){return I(e)&&e.name==="AuthApiError"}class Dt extends lo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class or extends lo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Re extends or{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ea(e){return I(e)&&e.name==="AuthSessionMissingError"}class ts extends or{constructor(){super("Auth session or user missing","AuthInvalidToken
176ResponseError",500,void 0)}}class ta extends or{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ra extends or{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function fP(e){return I(e)&&e.name==="AuthImplicitGrantRedirectError"}class Dp extends or{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class pP extends or{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 Jc extends or{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function zp(e){return I(e)&&e.name==="AuthRetryableFetchError"}class Mp extends or{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function mP(e){return I(e)&&e.name==="AuthRefreshDiscardedError"}class Up extends or{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class tl extends or{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const rl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Fp=` 177\r=`.split(""),gP=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Fp.length;t+=1)e[Fp[t].charCodeAt(0)]=-2;for(let t=0;t<rl.length;t+=1)e[rl[t].charCodeAt(0)]=t;return e})();function Bp(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(rl[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(rl[n]),t.queuedBits-=6}}function C0(e,t,r){const n=gP[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Wp(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{wP(o,n,r)};for(let o=0;o<e.length;o+=1)C0(e.charCodeAt(o),s,i);return t.join("")}function vP(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 yP(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}vP(n,t)}}function wP(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Cs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)C0(e.charCodeAt(s),r,n);return new Uint8Array(t)}function bP(e){const t=[];return yP(e,r=>t.push(r)),new Uint8Array(t)}function Rn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Bp(s,r,n)),Bp(null,r,n),t.join("")}function xP(e){return Math.round(Date.now()/1e3)+e}function _P(){return Symbol("auth-callback")}const Ue=()=>typeof window<"u"&&typeof document<"u",xn={tested:!1,writable:!1},P0=()=>
177{if(!Ue())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xn.tested)return xn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),xn.tested=!0,xn.writable=!0}catch{xn.tested=!0,xn.writable=!1}return xn.writable};function kP(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const R0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),EP=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",is=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Pt=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},be=async(e,t)=>{await e.removeItem(t)};class Dl{constructor(){this.promise=new Dl.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Dl.promiseConstructor=Promise;function na(e){const t=e.split(".");if(t.length!==3)throw new tl("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!uP.test(t[n]))throw new tl("JWT not in base64url format");return{header:JSON.parse(Wp(t[0])),payload:JSON.parse(Wp(t[1])),signature:Cs(t[2]),raw:{header:t[0],payload:t[1]}}}async function SP(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function TP(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function CP(e){return("0"+e.toString(16)).substr(-2)}function PP(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,CP).join("")}async function RP(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function jP(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await RP(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _n(e,t,r=!1){const n=PP();let s=n;r&&(s+="/recovery"),await is(e,`${t}-code-verifier`,s);const i=await jP(n);return[i,n===i?"plain":"s256"]}const AP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function OP(e){const t=e.headers.get(Gc);if(!t||!t.match(AP))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function NP(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 IP(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 LP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function lr(e){if(!LP.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Rt(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Tu(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function $P(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
177if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Vp(e){return JSON.parse(JSON.stringify(e))}const Sn=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},DP=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Hp(e){var t;if(!EP(e))throw new Jc(Sn(e),0);if(DP.includes(e.status))throw new Jc(Sn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Dt(Sn(i),i)}let n;const s=OP(e);if(s&&s.getTime()>=T0["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Up(Sn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Re}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new Up(Sn(r),e.status,r.weak_password.reasons);throw new dP(Sn(r),e.status||500,n)}const zP=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function M(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Gc]||(i[Gc]=T0["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await MP(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function MP(e,t,r,n,s,i){const o=zP(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new Jc(Sn(l),0)}if(a.ok||await Hp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Hp(l)}}function pt(e){var t;let r=null;BP(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=xP(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function qp(e){const t=pt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Br(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function UP(e){return{data:e,error:null}}function FP(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=$l(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function Kp(e){return e}function BP(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Cu=["global","local","others"];class WP{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=R0(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=Cu[0]){if(Cu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Cu.join(", ")}`);try{return await M(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await M(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Br})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=$l(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await M(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:FP,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(I(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await M(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Br})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await M(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Kp});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1770&&(h.forEach(g=>{const v=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(I(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){lr(t);try{return await M(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Br})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){lr(t);try{return await M(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Br})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){lr(t);try{return await M(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Br})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){lr(t.userId);try{const{data:r,error:n}=await M(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _deleteFactor(t){lr(t.userId),lr(t.id);try{return{data:await M(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await M(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Kp});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const v=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(I(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await M(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await M(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await M(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await M(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await M(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await M(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(I(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await M(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await M(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await M(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await M(this.fetch,"DELET
177E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Rt(this.experimental),lr(t.userId);try{return await M(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Rt(this.experimental),lr(t.userId),lr(t.passkeyId);try{return await M(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}}function Gp(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&P0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class VP extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function HP(){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 j0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function qP(e){return parseInt(e,16)}function KP(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function GP(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 178`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=j0(e.address),g=c?`${c}://${n}`:n,v=e.statement?`${e.statement} 179`:"",x=`${g} wants you to sign in with your Ethereum account: 180${h} 181 182${v}`;let w=`URI: ${d} 183Version: ${f} 184Chain ID: ${r}${o?` 185Nonce: ${o}`:""} 186Issued At: ${i.toISOString()}`;if(s&&(w+=` 187Expiration Time: ${s.toISOString()}`),a&&(w+=` 188Not Before: ${a.toISOString()}`),l&&(w+=` 189Request ID: ${l}`),u){let p=` 190Resources:`;for(const y of u){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);p+=` 191- ${y}`}w+=p}return`${x} 192${w}`}class Ee extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class nl extends Ee{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function JP({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ee({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ee({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ee({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ee({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 Ee({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ee({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ee({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ee({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(A0(o)){if(i.rp.id!==o)return new Ee({message:`The RP ID "${i.rp.id}
192" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ee({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ee({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 Ee({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 Ee({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function QP({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ee({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ee({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(A0(n)){if(r.rpId!==n)return new Ee({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ee({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ee({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 Ee({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class YP{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Qc=new YP;function Jp(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=$l(e,["challenge","user","excludeCredentials"]),i=Cs(t).buffer,o=Object.assign(Object.assign({},r),{id:Cs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Cs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Qp(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=$l(e,["challenge","allowCredentials"]),s=Cs(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Cs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Yp(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Rn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Rn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Xp(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Rn(new Uint8Array(s.authenticatorData)),clientDataJSON:Rn(new Uint8Array(s.clientDataJSON)),signature:Rn(new Uint8Array(s.signature)),userHandle:s.userHandle?Rn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function A0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function sl(){var e,t;return!!(Ue()&&"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 O0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new nl("Browser returned unexpected credential type",t)}:{data:null,error:new nl("Empty credential response",t)}}
192catch(t){return{data:null,error:JP({error:t,options:e})}}}async function N0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new nl("Browser returned unexpected credential type",t)}:{data:null,error:new nl("Empty credential response",t)}}catch(t){return{data:null,error:QP({error:t,options:e})}}}const XP={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},ZP={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function il(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=il(a,o):n[i]=il(o)}else n[i]=o}return n}function eR(e,t){return il(XP,e,t||{})}function tR(e,t){return il(ZP,e,t||{})}class rR{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??Qc.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=n;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,g=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${g}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=eR(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await O0({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=tR(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await N0(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return I(a)?{data:null,error:a}:{data:null,error:new Dt("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new lo("rpId is required for WebAuthn authentication")};try{if(!sl())return{data:null,error:new Dt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return I(o)?{data:null,error:o}:{data:null,error:new Dt("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new lo("rpId is required for WebAuthn registration")};try{if(!sl())return{data:null,error:new Dt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return I(o)?{data:null,error:o}:{data:null,error:new Dt("Unexpected error in register",o)}}}}HP();const nR={url:oP,storageKey:aP,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:lP,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},rs={};class uo{get jwks(){var t,r;return(r=(t=rs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){rs[this.storageKey]=Object.assign(Object.assign({},rs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=rs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){rs[this.storageKey]=Object.assign(Object.assign({},rs[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},nR),t);if(this.storageKey=i.storageKey,this.instanceID=(r=uo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,uo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Ue()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(n=i.experimental)!==null&&n!==void 0?n:{},this.admin=new WP({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=R0(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new rR(this)}
192,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:P0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Gp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Gp(this.memoryStorage)),Ue()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${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()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Ue()&&(r=kP(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ue()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),fP(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return I(r)?this._returnResult({error:r}):this._returnResult({error:new Dt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:pt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(I(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,g=null;this.flowType==="pkce"&&([h,g]=await _n(this.storage,this.storageKey)),i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:g},xform:pt})}else if("phone"in t){const{phone:c,password:d,options:f}=t;i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:pt})}else throw new ta("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await be(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await M(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:qp})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await M(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:qp})}else throw new ta("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new ts;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,c,d,f;let h,g;if("message"in t)h=t.message,g=t.signature;else{const{chain:v,wallet:x,statement:w,options:p}=t;let y;if(Ue())if(typeof x=="object")y=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")y=A.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 x!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=x}const _=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),k=await y.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=j0(k[0]);
192let S=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const A=await y.request({method:"eth_chainId"});S=qP(A)}const R={domain:_.host,address:E,statement:w,uri:_.href,version:"1",chainId:S,nonce:(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=p==null?void 0:p.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=p==null?void 0:p.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=p==null?void 0:p.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=p==null?void 0:p.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=GP(R),g=await y.request({method:"personal_sign",params:[KP(h),E]})}try{const{data:v,error:x}=await M(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:g},!((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:pt});if(x)throw x;if(!v||!v.session||!v.user){const w=new ts;return this._returnResult({data:{user:null,session:null},error:w})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(I(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,c,d,f,h;let g,v;if("message"in t)g=t.message,v=t.signature;else{const{chain:x,wallet:w,statement:p,options:y}=t;let _;if(Ue())if(typeof w=="object")_=w;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.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 w!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=w}const k=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),p?{statement:p}:null));let S;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")S=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)S=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)g=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),v=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((d=(c=y==null?void 0:y.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...y.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(` 193`);const E=await _.signMessage(new TextEncoder().encode(g),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=E}}try{const{data:x,error:w}=await M(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Rn(v)},!((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:pt});if(w)throw w;if(!x||!x.session||!x.user){const p=new ts;return this._returnResult({data:{user:null,session:null},error:p})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:w})}
193catch(x){if(I(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await Pt(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new pP;const{data:i,error:o}=await M(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:pt});if(await be(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ts;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await M(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:pt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new ts;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await _n(this.storage,this.storageKey));const{error:d}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new ta("You must provide either an email or phone number.")}catch(a){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await M(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:pt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await _n(this.storage,this.storageKey));const u=await M(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:UP});return!((i=u.data)===null||i===void 0)&&i.url&&Ue()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Re;const{error:s}=await M(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(I(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t;let o=null,a=null;this.flowType==="pkce"&&([o,a]=await _n(this.storage,this.storageKey));const{error:l}=await M(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}
193,code_challenge:o,code_challenge_method:a},redirectTo:i==null?void 0:i.emailRedirectTo});return l&&await be(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await M(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new ta("You must provide either an email or phone number and a type")}catch(r){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Pt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Su:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Pt(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Tu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=$P(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const a=await Pt(this.storage,this.storageKey);if(a&&a.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await M(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Br}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Re}:await M(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Br})})}catch(r){if(I(r))return ea(r)&&(await this._removeSession(),await be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Re;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await _n(this.storage,this.storageKey));const{data:u,error:c}=await M(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Br});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Re;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=na(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(I(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Re;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!Ue())throw new ra("No browser detected.");
193if(t.error||t.error_description||t.error_code)throw new ra(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Dp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ra("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Dp("No code detected.");const{data:y,error:_}=await this._exchangeCodeForSession(t.code);if(_)throw _;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:y.session,redirectType:(n=y.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:c}=t;if(!o||!l||!a||!c)throw new ra("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;u&&(h=parseInt(u));const g=h-d;g*1e3<=fr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${f}s`);const v=h-f;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,h,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,h,d);const{data:x,error:w}=await this._getUser(o);if(w)throw w;const p={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:c,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:p,redirectType:t.type},error:null})}catch(s){if(I(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await Pt(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!ea(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(hP(a)&&(a.status===404||a.status===401||a.status===403)||ea(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=_P(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),ea(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await _n(this.storage,this.storageKey,!0));try{return await M(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await M(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Ue()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(I(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,d=await M(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:pt}),{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 ts}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await be(this.storage,`${this.storageKey}-code-verifier`),I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
193return await M(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await TP(async s=>(s>0&&await SP(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await M(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:pt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&zp(i)&&Date.now()+o-n<fr})}catch(n){if(this._debug(r,"error",n),I(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Ue()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Pt(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Pt(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await is(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Tu()}else if(s&&!s.user&&!s.user){const o=await Pt(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await be(this.storage,this.storageKey+"-user"),await is(this.storage,this.storageKey,s)):s.user=Tu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Su;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Su}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(mP(o)?this._debug(n,"refresh discarded by commit guard",o):this._debug(n,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Re;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Dl;const i=await Pt(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Re;const l=await Pt(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const f={data:null,error:new Mp};return this.refreshingDeferred.resolve(f),f}const c=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==c){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, und
193oing write"),await be(this.storage,this.storageKey),this.userStorage&&await be(this.userStorage,this.storageKey+"-user");const f={data:null,error:new Mp};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(d),d}catch(i){if(this._debug(s,"error",i),I(i)){const o={data:null,error:i};if(!zp(i)){const a=await Pt(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+iP},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await be(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await is(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Vp(s);await is(this.storage,this.storageKey,i)}else{const s=Vp(r);await is(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await be(this.storage,this.storageKey),await be(this.storage,this.storageKey+"-code-verifier"),await be(this.storage,this.storageKey+"-user"),this.userStorage&&await be(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ue()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),fr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${fr}ms, refresh threshold is ${wi} ticks`),s<=wi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof VP)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${fr}ms, refresh threshold is ${wi} ticks`),s<=wi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ue()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
193{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await _n(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await M(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await M(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Yp(t.webauthn.credential_response):Xp(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:u}=await M(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:u}))})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=await M(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Jp(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Qp(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:h}=na(t);let g=null;h.aal&&(g=h.aal);let v=g;const{data:{user:x},error:w}=await this.getUser(t);if(w)return this._returnResult({data:null,error:w});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(v="aal2");const y=h.amr||[];return{data:{currentLevel:g,nextLevel:v,currentAuthenticationMethods:y},error:null}}catch(h){if(I(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
193=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=na(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await M(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Re})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Re});const o=await M(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Re});const o=await M(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await M(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Re})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await M(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Re})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+cP>s)return n;const{data:i,error:o}=await M(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:g}
193=await this.getSession();if(g||!h.session)return this._returnResult({data:null,error:g});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=na(n);if(!(r!=null&&r.allowExpired))try{NP(i.exp)}catch(h){throw new tl(h instanceof Error?h.message:"JWT validation failed")}const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const c=IP(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,bP(`${a}.${l}`)))throw new tl("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;Rt(this.experimental);try{if(!sl())return this._returnResult({data:null,error:new Dt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Qp(i.options),l=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Qc.createNewAbortSignal(),{data:u,error:c}=await N0({publicKey:a,signal:l});if(c||!u)return this._returnResult({data:null,error:c??new Dt("WebAuthn ceremony failed",null)});const d=Xp(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(I(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var r,n;Rt(this.experimental);try{if(!sl())return this._returnResult({data:null,error:new Dt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=Jp(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Qc.createNewAbortSignal(),{data:l,error:u}=await O0({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Dt("WebAuthn ceremony failed",null)});const c=Yp(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:c})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Rt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Re});const{data:s,error:i}=await M(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Rt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Re});const{data:i,error:o}=await M(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Rt(this.experimental);try{const{data:n,error:s}=await M(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){Rt(this.experimental);try{const{data:r,error:n}=await M(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:pt});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Rt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Re});const{data:s,error:i}=await M(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Rt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Re});const{data:i,error:o}=await M(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Rt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Re});const{error:i}
193=await M(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}}uo.nextInstanceID={};const sR=uo,iR="2.110.0";let bi="",ol;if(typeof Deno<"u"){var Pu;bi="deno",ol=(Pu=Deno.version)===null||Pu===void 0?void 0:Pu.deno}else if(typeof document<"u")bi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")bi="react-native";else{var Ru;bi="node",ol=typeof process<"u"?(Ru=process.version)===null||Ru===void 0?void 0:Ru.replace(/^v/,""):void 0}const I0=[`runtime=${bi}`];ol&&I0.push(`runtime-version=${ol}`);const oR={"X-Client-Info":`supabase-js/${iR}; ${I0.join("; ")}`},aR={headers:oR},lR={schema:"public"},uR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},cR={},dR={enabled:!1,respectSamplingDecision:!0};function hR(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,[])).next())})}let ju=null;const fR="@opentelemetry/api";function pR(){return ju===null&&(ju=import(fR).catch(()=>null)),ju}function mR(){return hR(this,void 0,void 0,function*(){try{const e=yield pR();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function gR(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,i]=t;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function vR(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(yR(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function yR(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function wR(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function co(e){"@babel/helpers - typeof";return co=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},co(e)}function bR(e,t){if(co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(co(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xR(e){var t=bR(e,"string");return co(t)=="symbol"?t:t+""}function _R(e,t,r){return(t=xR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(r),!0).forEach(function(n){_R(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const kR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),ER=()=>Headers,SR=(e,t,r,n,s)=>{const i=kR(n),o=ER(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,u=a?wR(t):null;return async(c,d)=>{var f;const h=(f=await r())!==null&&f!==void 0?f:e;let g=new o(d==null?void 0:d.headers);if(g.has("apikey")||g.set("apikey",e),g.has("Authorization")||g.set("Authorization",`Bearer ${h}`),u){const v=await TR(c,u,l);v&&(v.traceparent&&!g.has("traceparent")&&g.set("traceparent",v.traceparent),v.tracestate&&!g.has("tracestate")&&g.set("tracestate",v.tracestate),v.baggage&&!g.has("baggage")&&g.set("baggage",v.baggage))}return i(c,ye(ye({},d),{},{headers:g}))}};async function TR(e,t,r){if(!vR(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const n=await mR();if(!n||!n.traceparent)return null;if(r){const s=gR(n.traceparent);if(s&&!s.isSampled)return null}return n}function em(e){return typeof e=="boolean"?{enabled:e}:e}function CR(e){return e.endsWith("/")?e:e+"/"}function PR(e,t){var r,n,s,i,o,a;const{db:l,auth:u,realtime:c,global:d}=e,{db:f,auth:h,realtime:g,global:v}=t,x=em(e.tracePropagation),w=em(t.tracePropagation),p={db:ye(ye({},f),l),auth:ye(ye({},h),u),realtime:ye(ye({},g),c),storage:{},global:ye(ye(ye({},v),d),{},{headers:ye(ye({},(r=v==null?void 0:v.headers)!==null&&r!==void 0?r:{}),(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=x==null?void 0:x.enabled)!==null&&i!==void 0?i:w==null?void 0:w.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=x==null?void 0:x.respectSamplingDecision)!==null&&a!==void 0?a:w==null?void 0:w.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function RR(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
193if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(CR(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var jR=class extends sR{constructor(e){super(e)}},AR=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=RR(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:lR,realtime:cR,auth:ye(ye({},uR),{},{storageKey:o}),global:aR,tracePropagation:dR},l=PR(r??{},a);if(this.settings=l,this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=SR(t,e,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(ye({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},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 UT(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new sP(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new AT(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,lockAcquireTimeout:d,skipAutoInitialize:f},h,g){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new jR({url:this.authUrl.href,headers:ye(ye({},v),h),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,fetch:g,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new PC(this.realtimeUrl.href,ye(ye({},e),{},{params:ye(ye({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const OR=(e,t,r)=>new AR(e,t,r);function NR(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}NR()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
193ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function IR(){var x,w;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(p=>e===p||e.endsWith("."+p)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((w=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:w[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^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&&a.test(l)?[l]:o?["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,y,_)=>new Promise(k=>{const E=f();let S=!1,R;const A=$=>{S||(S=!0,clearTimeout(R),window.removeEventListener("message",N),k($))},N=$=>{if(u.indexOf($.origin)<0)return;const V=$.data;V&&V.type===c&&V.requestId===E&&A(V)};window.addEventListener("message",N);const B={type:p,requestId:E,projectId:s,key:y};_!==void 0&&(B.value=_);for(const $ of u)window.parent.postMessage(B,$);R=setTimeout(()=>A(null),d)});let g=!0;const v=250;return{getItem:async p=>{let y=await h("lovable-preview-auth:get",p);return!y&&g&&(await new Promise(_=>setTimeout(_,v)),y=await h("lovable-preview-auth:get",p)),g=!1,y&&y.ok&&typeof y.value=="string"?y.value===""?(localStorage.removeItem(p),null):y.value:localStorage.getItem(p)},setItem:(p,y)=>(localStorage.setItem(p,y),h("lovable-preview-auth:set",p,y).then(_=>{_&&_.ok&&typeof _.value=="string"&&localStorage.getItem(p)===y&&(_.value===""?localStorage.removeItem(p):localStorage.setItem(p,_.value))})),removeItem:p=>(localStorage.removeItem(p),h("lovable-preview-auth:remove",p).then(()=>{}))}}const LR="https://rhktaqswmxqzeobuexez.supabase.co",$R="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJoa3RhcXN3bXhxemVvYnVleGV6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI4Nzc1NzgsImV4cCI6MjA4ODQ1MzU3OH0.bsXVNjPsA7zWrWh7XwqbblAGSAEXvUqqHItTcdYpgWI",DR=OR(LR,$R,{auth:{storage:IR(),persistSession:!0,autoRefreshToken:!0}}),zR="https://rhktaqswmxqzeobuexez.supabase.co",MR="PL",tm=()=>{if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"||e.endsWith(".lovableproject.com")||/^id-preview--.+\.lovable\.app$/.test(e)||/^preview--.+\.lovable\.app$/.test(e)},UR=({children:e})=>{const[t,r]=b.useState(()=>tm()?"allowed":"checking");return b.useEffect(()=>{if(tm())return;let n=!1;const s=new AbortController;return(async()=>{var o;let i={};try{const{data:a}=await DR.auth.getSession(),l=(o=a.session)==null?void 0:o.access_token;l&&(i={Authorization:`Bearer ${l}`})}catch{}try{const a=await fetch(`${zR}/functions/v1/geo-country`,{signal:s.signal,headers:{"Content-Type":"application/json",...i}});if(!a.ok)throw new Error("geo check failed");const l=await a.json();if(n)return;r(l!=null&&l.adminBypass||(l==null?void 0:l.country)===MR?"allowed":"blocked")}catch{n||r("blocked")}})(),()=>{n=!0,s.abort()}},[]),t==="allowed"?m.jsx(m.Fragment,{children:e}):m.jsx("main",{className:"min-h-screen flex items-center justify-center px-6 py-16 relative overflow-hidden",style:{background:"linear-gradient(165deg, #001a5e 0%, #002a85 15%, #001d66 30%, #003399 45%, #001a5e 60%, #002a85 75%, #00174d 90%, #002a85 100%)"},children:m.jsxs("div",{className:"relative z-10 w-full max-w-xl rounded-3xl border border-primary/25 bg-card/40 backdrop-blur-xl p-8 md:p-12 text-center shadow-[0_30px_80px_-30px_rgba(0,0,0,0.7)]",children:[m.jsx("img",{src:CT.url,alt:"Wise Ed",className:"mx-auto h-8 w-auto"}),t==="checking"?m.jsxs(m.Fragment,{children:[m.jsx(T_,{className:"mx-auto mt-8 h-8 w-8 animate-spin text-primary"}),m.jsx("p",{className:"mt-6 text-base text-muted-foreground",children:"Sprawdzamy TwojÄ
lokalizacjÄâ¦"})]}):m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mt-8 inl
193ine-flex h-16 w-16 items-center justify-center rounded-2xl border border-primary/30 bg-primary/10",children:m.jsx(S_,{className:"h-8 w-8 text-primary"})}),m.jsx("h1",{className:"mt-6 font-display text-2xl md:text-3xl font-bold text-foreground leading-tight",children:"Ta strona jest dostÄpna tylko z Polski"}),m.jsx("p",{className:"mt-4 text-base leading-relaxed text-muted-foreground",children:"Ta wersja Wise Ed jest przeznaczona wyÅÄ
cznie dla osób odwiedzajÄ
cych stronÄ z Polski. WyglÄ
da na to, że ÅÄ
czysz siÄ z innego kraju, dlatego nie możemy pokazaÄ Ci tej strony."}),m.jsx("p",{className:"mt-4 text-sm leading-relaxed text-muted-foreground",children:"JesteÅ w Polsce i widzisz ten komunikat? Prawdopodobnie masz wÅÄ
czony VPN lub sieÄ firmowÄ
â wyÅÄ
cz go i odÅwież stronÄ."}),m.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row items-center justify-center gap-3",children:[m.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"w-full sm:w-auto rounded-full bg-primary px-6 py-3 text-sm font-bold text-primary-foreground transition hover:brightness-110",children:"Spróbuj ponownie"}),m.jsx("a",{href:"mailto:[email protected]",className:"w-full sm:w-auto rounded-full border border-border/50 px-6 py-3 text-sm font-semibold text-foreground transition-colors hover:bg-foreground
193/5",children:"Napisz do nas"})]})]})]})})},FR={"/":"/pl","/checkout":"/pl/checkout"},BR="/pl",WR=e=>e==="/pl"||e.startsWith("/pl/"),VR=e=>{const t=e.length>1&&e.endsWith("/")?e.slice(0,-1):e;return FR[t]??null},HR="/it",qR={"/":"/it","/cookies":"/it/cookies","/pl/cookies":"/it/cookies"},L0=e=>e==="/it"||e==="/it-home"||e.startsWith("/it/"),KR=e=>{const t=e.length>1&&e.endsWith("/")?e.slice(0,-1):e;return L0(t)?t:qR[t]??HR},GR=/bot|crawler|spider|slurp|preview/i,JR="https://get.geojs.io/v1/ip/country.json",rm="geoCountry",nm="marketBannerDismissed",sm={PL:{text:"JesteÅ w Polsce?",cta:"Wersja polska â",close:"Zamknij"},IT:{text:"Sei in Italia?",cta:"Versione italiana â",close:"Chiudi"}},QR=()=>{const{pathname:e}=Vt(),[t,r]=b.useState(()=>{try{return sessionStorage.getItem(rm)}catch{return null}}),[n,s]=b.useState(()=>{try{return localStorage.getItem(nm)==="1"}catch{return!1}});if(b.useEffect(()=>{if(t||n||typeof navigator<"u"&&GR.test(navigator.userAgent))return;const l=new AbortController,u=setTimeout(()=>l.abort(),2500);return fetch(JR,{signal:l.signal}).then(c=>c.ok?c.json():Promise.reject()).then(c=>{if(c!=null&&c.country){try{sessionStorage.setItem(rm,c.country)}catch{}r(c.country)}}).catch(()=>{}).finally(()=>clearTimeout(u)),()=>{clearTimeout(u),l.abort()}},[t,n]),n||!t||!sm[t]||WR(e)||L0(e)||e.startsWith("/admin"))return null;const i=t==="PL"?VR(e)??BR:KR(e),o=sm[t],a=()=>{try{localStorage.setItem(nm,"1")}catch{}s(!0)};return m.jsx("div",{className:"fixed bottom-4 left-1/2 z-[60] -translate-x-1/2 w-[calc(100%-2rem)] max-w-md",children:m.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-primary/30 bg-card/90 backdrop-blur-md px-4 py-3 shadow-lg",children:[m.jsx("span",{className:"text-sm text-foreground",children:o.text}),m.jsx(c0,{to:i,className:"ml-auto rounded-full bg-primary px-4 py-2 text-sm font-bold text-primary-foreground transition hover:brightness-110",children:o.cta}),m.jsx("button",{type:"button",onClick:a,"aria-label":o.close,className:"text-muted-foreground hover:text-foreground",children:m.jsx(Qd,{className:"h-4 w-4"})})]})})},$0="wiseed_cookie_consent_v1",im=()=>{try{const e=localStorage.getItem($0);return e?JSON.parse(e):null}catch{return null}},YR=()=>{window.dispatchEvent(new Event("wiseed:open-cookie-preferences"))},Au={sl:{title:"PiÅ¡kotki na Wise Ed",body:"Uporabljamo piÅ¡kotke za delovanje strani, analitiko in oglaÅ¡evanje. Nujno potrebni piÅ¡kotki so vedno aktivni, ostale lahko sami izberete.",policy:"Politika piÅ¡kotkov",accept:"Sprejmi vse",reject:"Samo nujni",settings:"Nastavitve",save:"Shrani izbiro",prefTitle:"Nastavitve piÅ¡kotkov",cats:{necessary:["Nujno potrebni","Potrebni za osnovno delovanje strani. Vedno aktivni."],functional:["Funkcionalni","Shranjujejo vaÅ¡e nastavitve in izboljÅ¡ajo uporabniÅ¡ko izkuÅ¡njo."],analytics:["AnalitiÄni","Pomagajo nam razumeti, kako uporabljate stran."],marketing:["MarketinÅ¡ki","OmogoÄajo merjenje in prikaz relevantnih oglasov."]}},pl:{title:"Pliki cookie w Wise Ed",body:"Używamy plików cookie do dziaÅania strony, analityki i reklam. NiezbÄdne pliki cookie sÄ
zawsze aktywne, pozostaÅe wybierasz sam.",policy:"Polityka cookie",accept:"AkceptujÄ wszystkie",reject:"Tylko niezbÄdne",settings:"Ustawienia",save:"Zapisz wybór",prefTitle:"Ustawienia plików cookie",cats:{necessary:["NiezbÄdne","Konieczne do podstawowego dziaÅania strony. Zawsze aktywne."],functional:["Funkcjonalne","ZapamiÄtujÄ
Twoje preferencje i poprawiajÄ
wygodÄ korzystania."],analytics:["Analityczne","PomagajÄ
nam zrozumieÄ, jak korzystasz ze strony."],marketing:["Marketingowe","UmożliwiajÄ
mierzenie i wyÅwietlanie trafnych reklam."]}},it:{title:"Cookie su Wise Ed",body:"Utilizziamo i cookie per il funzionamento del sito, l'analisi e la pubblicità . I cookie necessari sono sempre attivi, mentre puoi scegliere gli altri.",policy:"Politica sui cookie",accept:"Accetta tutti",reject:"Solo necessari",settings:"Impostazioni",save:"Salva la scelta",prefTitle:"Impostazioni dei cookie",cats:{necessary:["Necessari","Indispensabili per il funzionamento di base del sito. Sempre attivi."],functional:["Funzionali","Ricordano le tue preferenze e migliorano l'esperienza."],analytics:["Analitici","Ci aiutano a capire come utilizzi il sito."],marketing:["Mar
193keting","Permettono di misurare e mostrare pubblicità più rilevante."]}}},XR=()=>{const e=Vt(),t=e.pathname==="/pl"||e.pathname.startsWith("/pl/"),r=e.pathname==="/it"||e.pathname==="/it-home"||e.pathname.startsWith("/it/"),n=r?Au.it:t?Au.pl:Au.sl,s=r?"/it/cookies":t?"/pl/cookies":"/cookies",[i,o]=b.useState(!1),[a,l]=b.useState(!1),[u,c]=b.useState({functional:!0,analytics:!0,marketing:!0});b.useEffect(()=>{im()||o(!0);const h=()=>{const g=im();g&&c({functional:g.functional,analytics:g.analytics,marketing:g.marketing}),l(!0),o(!0)};return window.addEventListener("wiseed:open-cookie-preferences",h),()=>window.removeEventListener("wiseed:open-cookie-preferences",h)},[]);const d=h=>{const g={necessary:!0,...h,date:new Date().toISOString()};try{localStorage.setItem($0,JSON.stringify(g))}catch{}window.dispatchEvent(new CustomEvent("wiseed:cookie-consent",{detail:g})),o(!1),l(!1)};if(!i)return m.jsx("button",{type:"button","aria-label":n.settings,title:n.settings,onClick:YR,className:"fixed bottom-4 left-4 z-[90] inline-flex h-11 w-11 items-center justify-center rounded-full border border-primary/30 bg-card/90 text-primary shadow-lg backdrop-blur-xl transition hover:bg-primary/15",children:m.jsx(Uf,{className:"h-5 w-5"})});const f=({checked:h,onChange:g,disabled:v})=>m.jsx("button",{type:"button",role:"switch","aria-checked":h,disabled:v,onClick:()=>g==null?void 0:g(!h),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${h?"bg-primary":"bg-muted"} ${v?"opacity-60 cursor-not-allowed":""}`,children:m.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-background transition-transform ${h?"left-[1.375rem]":"left-0.5"}`})});return m.jsx("div",{className:"fixed inset-x-0 bottom-0 z-[100] p-3 sm:p-5",children:m.jsxs("div",{className:"mx-auto max-w-3xl rounded-3xl border border-primary/25 bg-card/90 backdrop-blur-xl shadow-2xl p-5 sm:p-7",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/15 text-primary",children:m.jsx(Uf,{className:"h-5 w-5"})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h2",{className:"font-display text-lg font-bold text-foreground",children:a?n.prefTitle:n.title}),m.jsxs("p",{className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:[n.body," ",m.jsx(c0,{to:s,className:"text-primary hover:underline",children:n.policy})]})]}),a&&m.jsx("button",{type:"button","aria-label":"Close",onClick:()=>l(!1),className:"text-muted-foreground hover:text-foreground",children:m.jsx(Qd,{className:"h-5 w-5"})})]}),a&&m.jsx("div",{className:"mt-5 space-y-3",children:[["necessary",!0,void 0,!0],["functional",u.functional,h=>c(g=>({...g,functional:h}))],["analytics",u.analytics,h=>c(g=>({...g,analytics:h}))],["marketing",u.marketing,h=>c(g=>({...g,marketing:h}))]].map(([h,g,v,x])=>{const[w,p]=n.cats[h];return m.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-2xl border border-border/40 bg-background/40 p-4",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-semibold text-foreground",children:w}),m.jsx("p",{className:"text-xs text-muted-foreground",children:p})]}),m.jsx(f,{checked:g,onChange:v,disabled:x})]},h)})}),m.jsxs("div",{className:"mt-5 flex flex-col sm:flex-row gap-3 sm:justify-end",children:[!a&&m.jsxs("button",{type:"button",onClick:()=>l(!0),className:"inline-flex items-center justify-center gap-2 rounded-full border border-border/50 px-5 py-3 text-sm font-semibold text-foreground hover:bg-foreground
193/5 transition-colors",children:[m.jsx(C_,{className:"h-4 w-4"}),n.settings]}),m.jsx("button",{type:"button",onClick:()=>d({functional:!1,analytics:!1,marketing:!1}),className:"rounded-full border border-border/50 px-5 py-3 text-sm font-semibold text-foreground hover:bg-foreground/5 transition-colors",children:n.reject}),a?m.jsx("button",{type:"button",onClick:()=>d(u),className:"rounded-full bg-primary px-6 py-3 text-sm font-bold text-primary-foreground hover:brightness-110 transition",children:n.save}):m.jsx("button",{type:"button",onClick:()=>d({functional:!0,analytics:!0,marketing:!0}),className:"rounded-full bg-primary px-6 py-3 text-sm font-bold text-primary-foreground hover:brightness-110 transition",children:n.accept})]})]})})},ZR="yfkyilaju1",ej="yg3h69zli0",tj=e=>e.startsWith("/pl")?ej:e.startsWith("/it")?null:ZR,rj=()=>{const{pathname:e}=Vt(),t=b.useRef(new Set);return b.useEffect(()=>{const r=tj(e);if(!r||t.current.has(r))return;const n=document.createElement("script");return n.async=!0,n.src=`https://www.clarity.ms/tag/${r}`,n.dataset.clarityId=r,document.head.appendChild(n),function(s,i,o,a,l,u,c){var d;s[o]=s[o]||function(){(s[o].q=s[o].q||[]).push(arguments)},u=i.createElement(a),u.async=!0,u.src="https://www.clarity.ms/tag/"+l,c=i.getElementsByTagName(a)[0],(d=c.parentNode)==null||d.insertBefore(u,c)}(window,document,"clarity","script",r),t.current.add(r),()=>{n.parentNode&&n.parentNode.removeChild(n)}},[e]),null},nj="G-ZYMXJ56G10",sj="G-32YR389C8V",om=e=>e.startsWith("/pl")?sj:e.startsWith("/it")?null:nj,ij=()=>{const{pathname:e}=Vt(),t=b.useRef(null),r=b.useRef(new Set);return b.useEffect(()=>{const n=om(e),s=t.current;if(t.current=n,n===s)return;if(s){const o=document.querySelector(`script[src*="${s}"]`);o!=null&&o.parentNode&&o.parentNode.removeChild(o)}if(!n)return;if(!window.gtag){let o=function(...a){window.dataLayer.push(a)};window.dataLayer=window.dataLayer||[],window.gtag=o}if(!document.querySelector(`script[src*="${n}"]`)){const o=document.createElement("script");o.async=!0,o.src=`https://www.googletagmanager.com/gtag/js?id=${n}`,document.head.appendChild(o)}r.current.has(n)||(window.gtag("js",new Date),window.gtag("config",n),r.current.add(n))},[e]),b.useEffect(()=>{const n=om(e);!n||!window.gtag||window.gtag("event","page_view",{page_path:e,send_to:n})},[e]),null},oj=b.lazy(()=>Z(()=>import("./Checkout-CG_70QWA.js"),__vite__mapDeps([0,1,2,3,4,5]))),aj=b.lazy(()=>Z(()=>import("./ThankYou-Ch-Vho9S.js"),__vite__mapDeps([6,7]))),lj=b.lazy(()=>Z(()=>import("./PlThankYou-21t2vQ25.js"),__vite__mapDeps([8,7]))),uj=b.lazy(()=>Z(()=>import("./ThankYou2a-DEoSKWf7.js"),__vite__mapDeps([9,7]))),cj=b.lazy(()=>Z(()=>import("./Questionnaire1-P4nrgSYD.js"),__vite__mapDeps([10,2,11]))),dj=b.lazy(()=>Z(()=>import("./Questionnaire1a-CPRGEVZC.js"),__vite__mapDeps([12,2,11]))),hj=b.lazy(()=>Z(()=>import("./Optin1-DT4uW1R8.js"),__vite__mapDeps([13,2]))),fj=b.lazy(()=>Z(()=>import("./Start1a-a8HA9TsD.js"),__vite__mapDeps([14,15,16,17]))),pj=b.lazy(()=>Z(()=>import("./QuizPlatform-DAWwVtP7.js"),__vite__mapDeps([18,19,20,16,17]))),mj=b.lazy(()=>Z(()=>import("./It-BPJfaG2G.js"),__vite__mapDeps([21,19,20,22,23,24,16,25,26]))),gj=b.lazy(()=>Z(()=>import("./ItLpS-33s31JGs.js"),__vite__mapDeps([27,20,28,29]))),vj=b.lazy(()=>Z(()=>import("./ItLpP-C8_BtBR0.js"),__vite__mapDeps([30,20,31,29]))),yj=b.lazy(()=>Z(()=>import("./ItHome-B9kBLfKZ.js"),__vite__mapDeps([32,19,20,33,24,16,28,17,26,5]))),wj=b.lazy(()=>Z(()=>import("./Test-DAFHdZqK.js"),__vite__mapDeps([34,22,35,19,20,23,24,16,25,26,17]))),bj=b.lazy(()=>Z(()=>import("./Pl-DVIj4Qym.js"),__vite__mapDeps([36,20,19,35,24,37,16,25,26,17]))),xj=b.lazy(()=>Z(()=>import("./PlLp1-BPcYxJoy.js"),__vite__mapDeps([38,2,35,19,20,16,25,26]))),_j=b.lazy(()=>Z(()=>import("./PlCheckout-DTU9MPRK.js"),__vite__mapDeps([39,2,3,4,5]))),kj=b.lazy(()=>Z(()=>import("./PlPoradnik-B3wYngEz.js"),__vite__mapDeps([40,4,41,42,43]))),Ej=b.lazy(()=>Z(()=>import("./PlGrupa-CyRwWv09.js"),__vite__mapDeps([44,4,43,31]))),Sj=b.lazy(()=>Z(()=>import("./Rezultat1-W-G5a7z0.js"),[])),Tj=b.lazy(()=>Z(()=>import("./Rezultat2-Bg6gVzAH.js"),__vite__mapDeps([45,22]))),Cj=b.lazy(()=>Z(()=>import("./Rezultat3-DS_YM93A.js"),[])),Pj=b.lazy(()=>Z(()=>import("./FreeGuide-4hq5mUn-.js"),__vite__mapDeps([46,2,4,15,41]))),Rj=b.lazy(()=>Z(()=>import("./MediaKit-IgwX4M8p.js"),__vite__mapDeps([47,19,20,48,22,23,41,42]))),jj=b.lazy(()=>Z(()=>import("./Kontakt-6EtKezT5.js"),__vite__mapDeps([49,19,20,42,31]))),am=b.lazy(()=>Z(()=>import("./PlPrivacy-D4xh_hoa.js"),__vite__mapDeps([50,19,20,51,42]))),sa=b.lazy(()=>Z(()=>import("./CookiePolicy-CaNu1fE9.js"),__vite__mapDeps([52,19,20]))),Aj=b.lazy(()=>Z(()=>import("./Article-BJP6lpPq.js"),__vite__mapDeps([53,19,20,48,43]))),Oj=b.lazy(()=>Z(()=>import("./Vsl2-nPyVumIQ.js"),__vite__mapDeps([54,55,51,26,15]))),Nj=b.lazy(()=>Z(()=>import("./Vsl2b-BMAkrND8.js"),__vite__mapDeps([56,55,15]))),Ij=b.lazy(()=>Z(()=>import("./EmailVsl1-2gYN-fjB.js"),[])),Lj=b.lazy(()=>Z(()=>import("./ThankYou2b-DaRaEL0u.js"),__vite__mapDeps([57,7]))),$j=b.lazy(()=>Z(()=>
193import("./Admin-DKJ1wyJ4.js"),__vite__mapDeps([58,48]))),Dj=b.lazy(()=>Z(()=>import("./EarlyBird-Dr86bxhE.js"),__vite__mapDeps([59,20,1,60,33]))),zj=b.lazy(()=>Z(()=>import("./NpzLp1-DYXrGLAK.js"),__vite__mapDeps([61,20,1,60,33]))),Mj=b.lazy(()=>Z(()=>import("./PlE8Lp1-BQ3Siykp.js"),__vite__mapDeps([62,20,37,1,33]))),Uj=b.lazy(()=>Z(()=>import("./NotFound-vdgCx5-0.js"),[])),Fj=new Y1,Bj=()=>m.jsx(Z1,{client:Fj,children:m.jsxs(C1,{children:[m.jsx(ck,{}),m.jsx(Bk,{}),m.jsxs(YS,{children:[m.jsx(QR,{}),m.jsx(XR,{}),m.jsx(rj,{}),m.jsx(ij,{}),m.jsx(iT,{}),m.jsx(b.Suspense,{fallback:m.jsx("div",{className:"min-h-screen bg-background"}),children:m.jsxs(WS,{children:[m.jsx(K,{path:"/",element:m.jsx(wj,{})}),m.jsx(K,{path:"/test",element:m.jsx(pj,{})}),m.jsx(K,{path:"/it",element:m.jsx(mj,{})}),m.jsx(K,{path:"/it/lp-s",element:m.jsx(gj,{})}),m.jsx(K,{path:"/it/lp-p",element:m.jsx(vj,{})}),m.jsx(K,{path:"/it-home",element:m.jsx(yj,{})}),m.jsx(K,{path:"/pl",element:m.jsx(bj,{})}),m.jsx(K,{path:"/pl/lp1",element:m.jsx(xj,{})}),m.jsx(K,{path:"/pl/e8-lp1",element:m.jsx(UR,{children:m.jsx(Mj,{})})}),m.jsx(K,{path:"/pl/checkout",element:m.jsx(_j,{})}),m.jsx(K,{path:"/pl/thank-you",element:m.jsx(lj,{})}),m.jsx(K,{path:"/pl/poradnik",element:m.jsx(kj,{})}),m.jsx(K,{path:"/pl/grupa",element:m.jsx(Ej,{})}),m.jsx(K,{path:"/vsl-1",element:m.jsx(vT,{})}),m.jsx(K,{path:"/email-vsl-1",element:m.jsx(Ij,{})}),m.jsx(K,{path:"/vsl-2a",element:m.jsx(Oj,{})}),m.jsx(K,{path:"/vsl-2b",element:m.jsx(Nj,{})}),m.jsx(K,{path:"/checkout",element:m.jsx(oj,{})}),m.jsx(K,{path:"/thank-you",element:m.jsx(aj,{})}),m.jsx(K,{path:"/thank-you-2a",element:m.jsx(uj,{})}),m.jsx(K,{path:"/thank-you-2b",element:m.jsx(Lj,{})}),m.jsx(K,{path:"/vprasalnik-1",element:m.jsx(cj,{})}),m.jsx(K,{path:"/vprasalnik-1a",element:m.jsx(dj,{})}),m.jsx(K,{path:"/optin-1",element:m.jsx(hj,{})}),m.jsx(K,{path:"/start-1a",element:m.jsx(fj,{})}),m.jsx(K,{path:"/rezultat-1",element:m.jsx(Sj,{})}),m.jsx(K,{path:"/rezultat-2",element:m.jsx(Tj,{})}),m.jsx(K,{path:"/rezultat-3",element:m.jsx(Cj,{})}),m.jsx(K,{path:"/free-guide",element:m.jsx(Pj,{})}),m.jsx(K,{path:"/media-kit",element:m.jsx(Rj,{})}),m.jsx(K,{path:"/kontakt",element:m.jsx(jj,{})}),m.jsx(K,{path:"/early-bird",element:m.jsx(Dj,{})}),m.jsx(K,{path:"/npz-lp1",element:m.jsx(zj,{})}),m.jsx(K,{path:"/pl/privacy",element:m.jsx(am,{})}),m.jsx(K,{path:"/pl/policy",element:m.jsx(am,{})}),m.jsx(K,{path:"/cookies",element:m.jsx(sa,{})}),m.jsx(K,{path:"/it/cookies",element:m.jsx(sa,{})}),m.jsx(K,{path:"/pl/cookies",element:m.jsx(sa,{})}),m.jsx(K,{path:"/pl/cookie-policy",element:m.jsx(sa,{})}),m.jsx(K,{path:"/clanki/:slug",element:m.jsx(Aj,{})}),m.jsx(K,{path:"/admin",element:m.jsx($j,{})}),m.jsx(K,{path:"*",element:m.jsx(Uj,{})})]})})]})]})});Av(document.getElementById("root")).render(m.jsx(Bj,{}));export{__ as A,d0 as B,k_ as C,Hd as D,Uf as E,gT as F,YR as G,C_ as H,Qj as I,hT as J,aT as K,T_ as L,uT as M,Yj as N,bp as O,nt as P,Cm as R,Ff as S,pT as T,Qd as X,Xj as a,_o as b,E_ as c,kl as d,nr as e,Vt as f,_t as g,Me as h,P_ as i,m as j,oy as k,CT as l,yu as m,cn as n,un as o,Ft as p,Ce as q,b as r,DR as s,qd as t,Sx as u,Vj as v,Jx as w,zv as x,Ha as y,c0 as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.