PageSourceSearch

https://nd-apps.lovable.app/assets/index-CAY8fGJO.js

js nd-apps.lovable.app collected 2026-10-03 03:33:43 UTC 550,457 bytes, 230 lines download raw bytes

vendor: 5,691 bytes, lines 1-9
1var Th=e=>{throw TypeError(e)};var zl=(e,t,r)=>t.has(e)||Th("Cannot "+r);var C=(e,t,r)=>(zl(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?Th("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),V=(e,t,r,n)=>(zl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ie=(e,t,r)=>(zl(e,t,"access private method"),r);var _o=(e,t,r,n)=>({set _(s){V(e,t,s,r)},get _(){return C(e,t,n)}});function mw(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 hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fm={exports:{}},nl={},pm={exports:{}},Y={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var uo=Symbol.for("react.element"),gw=Symbol.for("react.portal"),vw=Symbol.for("react.fragment"),yw=Symbol.for("react.strict_mode"),ww=Symbol.for("react.profiler"),bw=Symbol.for("react.provider"),xw=Symbol.for("react.context"),Sw=Symbol.for("react.forward_ref"),_w=Symbol.for("react.suspense"),Ew=Symbol.for("react.memo"),kw=Symbol.for("react.lazy"),Rh=Symbol.iterator;function Cw(e){return e===null||typeof e!="object"?null:(e=Rh&&e[Rh]||e["@@iterator"],typeof e=="function"?e:null)}var mm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gm=Object.assign,vm={};function qs(e,t,r){this.props=e,this.context=t,this.refs=vm,this.updater=r||mm}qs.prototype.isReactComponent={};qs.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")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ym(){}ym.prototype=qs.prototype;function rd(e,t,r){this.props=e,this.context=t,this.refs=vm,this.updater=r||mm}var nd=rd.prototype=new ym;nd.constructor=rd;gm(nd,qs.prototype);nd.isPureReactComponent=!0;var Ph=Array.isArray,wm=Object.prototype.hasOwnProperty,sd={current:null},bm={key:!0,ref:!0,__self:!0,__source:!0};function xm(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)wm.call(t,n)&&!bm.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:uo,type:e,key:i,ref:o,props:s,_owner:sd.current}}function Tw(e,t){return{$$typeof:uo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function id(e){return typeof e=="object"&&e!==null&&e.$$typeof===uo}function Rw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ah=/\/+/g;function Hl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rw(""+e.key):t.toString(36)}function na(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 uo:case gw:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Hl(o,0):n,Ph(s)?(r="",e!=null&&(r=e.replace(Ah,"$&/")+"/"),na(s,t,r,"",function(u){return u})):s!=null&&(id(s)&&(s=Tw(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ah,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Ph(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Hl(i,a);o+=na(i,t,r,l,s)}else if(l=Cw(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Hl(i,a++),o+=na(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 Eo(e,t,r){if(e==null)return e;var n=[],s=0;return na(e,n,"","",function(i){return t.call(r,i,s++)}),n}function Pw(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 Ve={current:null},sa={transition:null},Aw={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:sa,ReactCurrentOwner:sd};function Sm(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,448 bytes, lines 9-25
9Y.Children={map:Eo,forEach:function(e,t,r){Eo(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Eo(e,function(){t++}),t},toArray:function(e){return Eo(e,function(t){return t})||[]},only:function(e){if(!id(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=qs;Y.Fragment=vw;Y.Profiler=ww;Y.PureComponent=rd;Y.StrictMode=yw;Y.Suspense=_w;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Aw;Y.act=Sm;Y.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=gm({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=sd.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)wm.call(t,l)&&!bm.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:uo,type:e.type,key:s,ref:i,props:n,_owner:o}};Y.createContext=function(e){return e={$$typeof:xw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:bw,_context:e},e.Consumer=e};Y.createElement=xm;Y.createFactory=function(e){var t=xm.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:Sw,render:e}};Y.isValidElement=id;Y.lazy=function(e){return{$$typeof:kw,_payload:{_status:-1,_result:e},_init:Pw}};Y.memo=function(e,t){return{$$typeof:Ew,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=sa.transition;sa.transition={};try{e()}finally{sa.transition=t}};Y.unstable_act=Sm;Y.useCallback=function(e,t){return Ve.current.useCallback(e,t)};Y.useContext=function(e){return Ve.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};Y.useEffect=function(e,t){return Ve.current.useEffect(e,t)};Y.useId=function(){return Ve.current.useId()};Y.useImperativeHandle=function(e,t,r){return Ve.current.useImperativeHandle(e,t,r)};Y.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return Ve.current.useMemo(e,t)};Y.useReducer=function(e,t,r){return Ve.current.useReducer(e,t,r)};Y.useRef=function(e){return Ve.current.useRef(e)};Y.useState=function(e){return Ve.current.useState(e)};Y.useSyncExternalStore=function(e,t,r){return Ve.current.useSyncExternalStore(e,t,r)};Y.useTransition=function(){return Ve.current.useTransition()};Y.version="18.3.1";pm.exports=Y;var b=pm.exports;const N=hm(b),od=mw({__proto__:null,default:N},[b]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Ow=b,Nw=Symbol.for("react.element"),jw=Symbol.for("react.fragment"),Iw=Object.prototype.hasOwnProperty,Lw=Ow.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$w={key:!0,ref:!0,__self:!0,__source:!0};function _m(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)Iw.call(t,n)&&!$w.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:Nw,type:e,key:i,ref:o,props:s,_owner:Lw.current}}nl.Fragment=jw;nl.jsx=_m;nl.jsxs=_m;fm.exports=nl;var S=fm.exports,Em={exports:{}},ct={},km={exports:{}},Cm={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(T,R){var L=T.length;T.push(R);e:for(;0<L;){var K=L-1>>>1,U=T[K];if(0<s(U,R))T[K]=R,T[L]=U,L=K;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],L=T.pop();if(L!==R){T[0]=L;e:for(var K=0,U=T.length,J=U>>>1;K<J;){var Z=2*(K+1)-1,be=T[Z],je=Z+1,re=T[je];if(0>s(be,L))je<U&&0>s(re,be)?(T[K]=re,T[je]=L,K=je):(T[K]=be,T[Z]=L,K=Z);else if(je<U&&0>s(re,L))T[K]=re,T[je]=L,K=je;else break e}}return R}function s(T,R){var L=T.sortIndex-R.sortIndex;return L!==0?L:T.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,y=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(T){for(var R=r(u);R!==null;){if(R.callback===null)n(u);else if(R.startTime<=T)n(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=r(u)}}function x(T){if(p=!1,v(T),!y)if(r(l)!==null)y=!0,H(_);else{var R=r(u);R!==null&&q(x,R.startTime-T)}}function _(T,R){y=!1,p&&(p=!1,g(P),P=-1),h=!0;var L=f;try{for(v(R),d=r(l);d!==null&&(!(d.expirationTime>R)||T&&!z());){var K=d.callback;
vendor: 9,152 bytes, lines 25-34
25if(typeof K=="function"){d.callback=null,f=d.priorityLevel;var U=K(d.expirationTime<=R);R=e.unstable_now(),typeof U=="function"?d.callback=U:d===r(l)&&n(l),v(R)}else n(l);d=r(l)}if(d!==null)var J=!0;else{var Z=r(u);Z!==null&&q(x,Z.startTime-R),J=!1}return J}finally{d=null,f=L,h=!1}}var E=!1,k=null,P=-1,O=5,j=-1;function z(){return!(e.unstable_now()-j<O)}function D(){if(k!==null){var T=e.unstable_now();j=T;var R=!0;try{R=k(!0,T)}finally{R?Q():(E=!1,k=null)}}else E=!1}var Q;if(typeof m=="function")Q=function(){m(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,X=I.port2;I.port1.onmessage=D,Q=function(){X.postMessage(null)}}else Q=function(){w(D,0)};function H(T){k=T,E||(E=!0,Q())}function q(T,R){P=w(function(){T(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,H(_))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var L=f;f=R;try{return T()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var L=f;f=T;try{return R()}finally{f=L}},e.unstable_scheduleCallback=function(T,R,L){var K=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?K+L:K):L=K,T){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=L+U,T={id:c++,callback:R,priorityLevel:T,startTime:L,expirationTime:U,sortIndex:-1},L>K?(T.sortIndex=L,t(u,T),r(l)===null&&T===r(u)&&(p?(g(P),P=-1):p=!0,q(x,L-K))):(T.sortIndex=U,t(l,T),y||h||(y=!0,H(_))),T},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(T){var R=f;return function(){var L=f;f=R;try{return T.apply(this,arguments)}finally{f=L}}}})(Cm);km.exports=Cm;var Dw=km.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var Mw=b,ut=Dw;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Tm=new Set,Ni={};function Dn(e,t){Ds(e,t),Ds(e+"Capture",t)}function Ds(e,t){for(Ni[e]=t,e=0;e<t.length;e++)Tm.add(t[e])}var fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lu=Object.prototype.hasOwnProperty,Fw=/^[: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]*$/,Oh={},Nh={};function Uw(e){return Lu.call(Nh,e)?!0:Lu.call(Oh,e)?!1:Fw.test(e)?Nh[e]=!0:(Oh[e]=!0,!1)}function Bw(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 zw(e,t,r,n){if(t===null||typeof t>"u"||Bw(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 qe(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 Ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ne[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ne[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ne[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ne[e]=new qe(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){Ne[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ne[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ne[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ne[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ne[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ad=/[\-:]([a-z])/g;function ld(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ad,ld);Ne[t]=new qe(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(ad,ld);Ne[t]=new qe(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(ad,ld);Ne[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ne[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ne.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ne[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ud(e,t,r,n){var s=Ne.hasOwnProperty(t)?Ne[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zw(t,r,s,n)&&(r=null),n||s===null?Uw(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 br=Mw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ko=Symbol.for("react.element"),is=Symbol.for("react.portal"),os=Symbol.for("react.fragment"),cd=Symbol.for("react.strict_mode"),$u=Symbol.for("react.profiler"),Rm=Symbol.for("react.provider"),Pm=Symbol.for("react.context"),dd=Symbol.for("react.forward_ref"),Du=Symbol.for("react.suspense"),Mu=Symbol.for("react.suspense_list"),hd=Symbol.for("react.memo"),jr=Symbol.for("react.lazy"),Am=Symbol.for("react.offscreen"),jh=Symbol.iterator;function ri(e){return e===null||typeof e!="object"?null:(e=jh&&e[jh]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,Wl;function fi(e){if(Wl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Wl=t&&t[1]||""}return`
34`+Wl+e}var Vl=!1;function ql(e,t){if(!e||Vl)return"";Vl=!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()}}
vendor: 16,008 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Vl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?fi(e):""}function Hw(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 Fu(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 os:return"Fragment";case is:return"Portal";case $u:return"Profiler";case cd:return"StrictMode";case Du:return"Suspense";case Mu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Pm:return(e.displayName||"Context")+".Consumer";case Rm:return(e._context.displayName||"Context")+".Provider";case dd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hd:return t=e.displayName||null,t!==null?t:Fu(e.type)||"Memo";case jr:t=e._payload,e=e._init;try{return Fu(e(t))}catch{}}return null}function Ww(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 Fu(t);case 8:return t===cd?"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 tn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Om(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vw(e){var t=Om(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 Co(e){e._valueTracker||(e._valueTracker=Vw(e))}function Nm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Om(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 Uu(e,t){var r=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ih(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=tn(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 jm(e,t){t=t.checked,t!=null&&ud(e,"checked",t,!1)}function Bu(e,t){jm(e,t);var r=tn(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")?zu(e,t.type,r):t.hasOwnProperty("defaultValue")&&zu(e,t.type,tn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lh(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 zu(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 ys(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=""+tn(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 Hu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $h(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(A(92));if(pi(r)){if(1<r.length)throw Error(A(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:tn(r)}}function Im(e,t){var r=tn(t.value),n=tn(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 Dh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Lm(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 Wu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Lm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var To,$m=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(To=To||document.createElement("div"),To.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=To.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ji(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var wi={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},qw=["Webkit","ms","Moz","O"];Object.keys(wi).forEach(function(e){qw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wi[t]=wi[e]})});function Dm(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||wi.hasOwnProperty(e)&&wi[e]?(""+t).trim():t+"px"}function Mm(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Dm(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Kw=me({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 Vu(e,t){if(t){if(Kw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function qu(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 Ku=null;function fd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gu=null,ws=null,bs=null;function Mh(e){if(e=fo(e)){if(typeof Gu!="function")throw Error(A(280));var t=e.stateNode;t&&(t=ll(t),Gu(e.stateNode,e.type,t))}}function Fm(e){ws?bs?bs.push(e):bs=[e]:ws=e}function Um(){if(ws){var e=ws,t=bs;if(bs=ws=null,Mh(e),t)for(e=0;e<t.length;e++)Mh(t[e])}}function Bm(e,t){return e(t)}function zm(){}var Kl=!1;function Hm(e,t,r){if(Kl)return e(t,r);Kl=!0;try{return Bm(e,t,r)}finally{Kl=!1,(ws!==null||bs!==null)&&(zm(),Um())}}function Ii(e,t){var r=e.stateNode;if(r===null)return null;var n=ll(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(A(231,t,typeof r));return r}var Qu=!1;if(fr)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 Gw(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 bi=!1,Sa=null,_a=!1,Ju=null,Qw={onError:function(e){bi=!0,Sa=e}};function Jw(e,t,r,n,s,i,o,a,l){bi=!1,Sa=null,Gw.apply(Qw,arguments)}function Yw(e,t,r,n,s,i,o,a,l){if(Jw.apply(this,arguments),bi){if(bi){var u=Sa;bi=!1,Sa=null}else throw Error(A(198));_a||(_a=!0,Ju=u)}}function Mn(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 Wm(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 Fh(e){if(Mn(e)!==e)throw Error(A(188))}function Xw(e){var t=e.alternate;if(!t){if(t=Mn(e),t===null)throw Error(A(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Fh(s),e;if(i===n)return Fh(s),t;i=i.sibling}throw Error(A(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(A(189))}}if(r.alternate!==n)throw Error(A(190))}if(r.tag!==3)throw Error(A(188));return r.stateNode.current===r?e:t}function Vm(e){return e=Xw(e),e!==null?qm(e):null}function qm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qm(e);if(t!==null)return t;e=e.sibling}return null}var Km=ut.unstable_scheduleCallback,Uh=ut.unstable_cancelCallback,Zw=ut.unstable_shouldYield,eb=ut.unstable_requestPaint,we=ut.unstable_now,tb=ut.unstable_getCurrentPriorityLevel,pd=ut.unstable_ImmediatePriority,Gm=ut.unstable_UserBlockingPriority,Ea=ut.unstable_NormalPriority,rb=ut.unstable_LowPriority,Qm=ut.unstable_IdlePriority,sl=null,Yt=null;function nb(e){if(Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(sl,e,void 0,(e.current.flags&128)===128)}catch{}}var jt=Math.clz32?Math.clz32:ob,sb=Math.log,ib=Math.LN2;function ob(e){return e>>>=0,e===0?32:31-(sb(e)/ib|0)|0}var Ro=64,Po=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 ka(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-jt(t),s=1<<r,n|=e[r],t&=~s;return n}function ab(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 lb(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-jt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=ab(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Yu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jm(){var e=Ro;return Ro<<=1,!(Ro&4194240)&&(Ro=64),e}function Gl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function co(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=r}function ub(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-jt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function md(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-jt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ne=0;function Ym(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xm,gd,Zm,eg,tg,Xu=!1,Ao=[],Kr=null,Gr=null,Qr=null,Li=new Map,$i=new Map,Lr=[],cb="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 Bh(e,t){switch(e){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$i.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=fo(t),t!==null&&gd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function db(e,t,r,n,s){switch(t){case"focusin":return Kr=si(Kr,e,t,r,n,s),!0;case"dragenter":return Gr=si(Gr,e,t,r,n,s),!0;case"mouseover":return Qr=si(Qr,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Li.set(i,si(Li.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,$i.set(i,si($i.get(i)||null,e,t,r,n,s)),!0}return!1}function rg(e){var t=yn(e.target);if(t!==null){var r=Mn(t);
vendor: 12,570 bytes, line 37
37if(r!==null){if(t=r.tag,t===13){if(t=Wm(r),t!==null){e.blockedOn=t,tg(e.priority,function(){Zm(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 ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Zu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ku=n,r.target.dispatchEvent(n),Ku=null}else return t=fo(r),t!==null&&gd(t),e.blockedOn=r,!1;t.shift()}return!0}function zh(e,t,r){ia(e)&&r.delete(t)}function hb(){Xu=!1,Kr!==null&&ia(Kr)&&(Kr=null),Gr!==null&&ia(Gr)&&(Gr=null),Qr!==null&&ia(Qr)&&(Qr=null),Li.forEach(zh),$i.forEach(zh)}function ii(e,t){e.blockedOn===t&&(e.blockedOn=null,Xu||(Xu=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,hb)))}function Di(e){function t(s){return ii(s,e)}if(0<Ao.length){ii(Ao[0],e);for(var r=1;r<Ao.length;r++){var n=Ao[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Kr!==null&&ii(Kr,e),Gr!==null&&ii(Gr,e),Qr!==null&&ii(Qr,e),Li.forEach(t),$i.forEach(t),r=0;r<Lr.length;r++)n=Lr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Lr.length&&(r=Lr[0],r.blockedOn===null);)rg(r),r.blockedOn===null&&Lr.shift()}var xs=br.ReactCurrentBatchConfig,Ca=!0;function fb(e,t,r,n){var s=ne,i=xs.transition;xs.transition=null;try{ne=1,vd(e,t,r,n)}finally{ne=s,xs.transition=i}}function pb(e,t,r,n){var s=ne,i=xs.transition;xs.transition=null;try{ne=4,vd(e,t,r,n)}finally{ne=s,xs.transition=i}}function vd(e,t,r,n){if(Ca){var s=Zu(e,t,r,n);if(s===null)su(e,t,n,Ta,r),Bh(e,n);else if(db(s,e,t,r,n))n.stopPropagation();else if(Bh(e,n),t&4&&-1<cb.indexOf(e)){for(;s!==null;){var i=fo(s);if(i!==null&&Xm(i),i=Zu(e,t,r,n),i===null&&su(e,t,n,Ta,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else su(e,t,n,null,r)}}var Ta=null;function Zu(e,t,r,n){if(Ta=null,e=fd(n),e=yn(e),e!==null)if(t=Mn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Wm(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 Ta=e,null}function ng(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(tb()){case pd:return 1;case Gm:return 4;case Ea:case rb:return 16;case Qm:return 536870912;default:return 16}default:return 16}}var Wr=null,yd=null,oa=null;function sg(){if(oa)return oa;var e,t=yd,r=t.length,n,s="value"in Wr?Wr.value:Wr.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 oa=s.slice(e,1<n?1-n:void 0)}function aa(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 Oo(){return!0}function Hh(){return!1}function dt(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)?Oo:Hh,this.isPropagationStopped=Hh,this}return me(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=Oo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),t}var Ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wd=dt(Ks),ho=me({},Ks,{view:0,detail:0}),mb=dt(ho),Ql,Jl,oi,il=me({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bd,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"?(Ql=e.screenX-oi.screenX,Jl=e.screenY-oi.screenY):Jl=Ql=0,oi=e),Ql)},movementY:function(e){return"movementY"in e?e.movementY:Jl}}),Wh=dt(il),gb=me({},il,{dataTransfer:0}),vb=dt(gb),yb=me({},ho,{relatedTarget:0}),Yl=dt(yb),wb=me({},Ks,{animationName:0,elapsedTime:0,pseudoElement:0}),bb=dt(wb),xb=me({},Ks,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sb=dt(xb),_b=me({},Ks,{data:0}),Vh=dt(_b),Eb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kb={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"},Cb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cb[e])?!!t[e]:!1}function bd(){return Tb}var Rb=me({},ho,{key:function(e){if(e.key){var t=Eb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=aa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bd,charCode:function(e){return e.type==="keypress"?aa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?aa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pb=dt(Rb),Ab=me({},il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qh=dt(Ab),Ob=me({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bd}),Nb=dt(Ob),jb=me({},Ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ib=dt(jb),Lb=me({},il,{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}),$b=dt(Lb),Db=[9,13,27,32],xd=fr&&"CompositionEvent"in window,xi=null;fr&&"documentMode"in document&&(xi=document.documentMode);var Mb=fr&&"TextEvent"in window&&!xi,ig=fr&&(!xd||xi&&8<xi&&11>=xi),Kh=" ",Gh=!1;function og(e,t){switch(e){case"keyup":return Db.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ag(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function Fb(e,t){switch(e){case"compositionend":return ag(t);case"keypress":return t.which!==32?null:(Gh=!0,Kh);case"textInput":return e=t.data,e===Kh&&Gh?null:e;default:return null}}function Ub(e,t){if(as)return e==="compositionend"||!xd&&og(e,t)?(e=sg(),oa=yd=Wr=null,as=!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 ig&&t.locale!=="ko"?null:t.data;default:return null}}var Bb={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 Qh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bb[e.type]:t==="textarea"}function lg(e,t,r,n){Fm(n),t=Ra(t,"onChange"),0<t.length&&(r=new wd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Si=null,Mi=null;function zb(e){wg(e,0)}function ol(e){var t=cs(e);if(Nm(t))return e}function Hb(e,t){if(e==="change")return t}var ug=!1;if(fr){var Xl;if(fr){var Zl="oninput"in document;if(!Zl){var Jh=document.createElement("div");Jh.setAttribute("oninput","return;"),Zl=typeof Jh.oninput=="function"}Xl=Zl}else Xl=!1;ug=Xl&&(!document.documentMode||9<document.documentMode)}function Yh(){Si&&(Si.detachEvent("onpropertychange",cg),Mi=Si=null)}function cg(e){if(e.propertyName==="value"&&ol(Mi)){var t=[];lg(t,Mi,e,fd(e)),Hm(zb,t)}}function Wb(e,t,r){e==="focusin"?(Yh(),Si=t,Mi=r,Si.attachEvent("onpropertychange",cg)):e==="focusout"&&Yh()}function Vb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ol(Mi)}function qb(e,t){if(e==="click")return ol(t)}function Kb(e,t){if(e==="input"||e==="change")return ol(t)}function Gb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:Gb;function Fi(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Lu.call(t,s)||!Lt(e[s],t[s]))return!1}return!0}function Xh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zh(e,t){var r=Xh(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=Xh(r)}}function dg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hg(){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 Sd(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 Qb(e){var t=hg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&dg(r.ownerDocument.documentElement,r)){if(n!==null&&Sd(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=Zh(r,i);var o=Zh(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 Jb=fr&&"documentMode"in document&&11>=document.documentMode,ls=null,ec=null,_i=null,tc=!1;function ef(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;tc||ls==null||ls!==xa(n)||(n=ls,"selectionStart"in n&&Sd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),_i&&Fi(_i,n)||(_i=n,n=Ra(ec,"onSelect"),0<n.length&&(t=new wd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ls)))}function No(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var us={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},eu={},fg={};fr&&(fg=document.createElement("div").style,"AnimationEvent"in window||(delete us.animationend.animation,delete us.animationiteration.animation,delete us.animationstart.animation),"TransitionEvent"in window||delete us.transitionend.transition);function al(e){if(eu[e])return eu[e];if(!us[e])return e;var t=us[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in fg)return eu[e]=t[r];return e}var pg=al("animationend"),mg=al("animationiteration"),gg=al("animationstart"),vg=al("transitionend"),yg=new Map,tf="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 on(e,t){yg.set(e,t),Dn(t,[e])}for(var tu=0;tu<tf.length;tu++){var ru=tf[tu],Yb=ru.toLowerCase(),Xb=ru[0].toUpperCase()+ru.slice(1);on(Yb,"on"+Xb)}on(pg,"onAnimationEnd");on(mg,"onAnimationIteration");on(gg,"onAnimationStart");on("dblclick","onDoubleClick");on("focusin","onFocus");on("focusout","onBlur");on(vg,"onTransitionEnd");Ds("onMouseEnter",["mouseout","mouseover"]);Ds("onMouseLeave",["mouseout","mouseover"]);Ds("onPointerEnter",["pointerout","pointerover"]);Ds("onPointerLeave",["pointerout","pointerover"]);Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dn("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(" "),Zb=new Set("cancel close invalid load scroll toggle".split(" ").concat(gi));function rf(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Yw(n,t,void 0,e),e.currentTarget=null}function wg(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;rf(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;rf(s,a,u),i=l}}}if(_a)throw e=Ju,_a=!1,Ju=null,e}function le(e,t){var r=t[oc];r===void 0&&(r=t[oc]=new Set);var n=e+"__bubble";r.has(n)||(bg(t,e,2,!1),r.add(n))}function nu(e,t,r){var n=0;t&&(n|=4),bg(r,e,n,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function Ui(e){if(!e[jo]){e[jo]=!0,Tm.forEach(function(r){r!=="selectionchange"&&(Zb.has(r)||nu(r,!1,e),nu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,nu("selectionchange",!1,t))}}function bg(e,t,r,n){switch(ng(t)){case 1:var s=fb;break;case 4:s=pb;break;default:s=vd}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: 22,735 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=yn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Hm(function(){var u=i,c=fd(r),d=[];e:{var f=yg.get(e);if(f!==void 0){var h=wd,y=e;switch(e){case"keypress":if(aa(r)===0)break e;case"keydown":case"keyup":h=Pb;break;case"focusin":y="focus",h=Yl;break;case"focusout":y="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=Wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Nb;break;case pg:case mg:case gg:h=bb;break;case vg:h=Ib;break;case"scroll":h=mb;break;case"wheel":h=$b;break;case"copy":case"cut":case"paste":h=Sb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=qh}var p=(t&4)!==0,w=!p&&e==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var m=u,v;m!==null;){v=m;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,g!==null&&(x=Ii(m,g),x!=null&&p.push(Bi(m,x,v)))),w)break;m=m.return}0<p.length&&(f=new h(f,y,null,r,c),d.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Ku&&(y=r.relatedTarget||r.fromElement)&&(yn(y)||y[pr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=r.relatedTarget||r.toElement,h=u,y=y?yn(y):null,y!==null&&(w=Mn(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(p=Wh,x="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(p=qh,x="onPointerLeave",g="onPointerEnter",m="pointer"),w=h==null?f:cs(h),v=y==null?f:cs(y),f=new p(x,m+"leave",h,r,c),f.target=w,f.relatedTarget=v,x=null,yn(c)===u&&(p=new p(g,m+"enter",y,r,c),p.target=v,p.relatedTarget=w,x=p),w=x,h&&y)t:{for(p=h,g=y,m=0,v=p;v;v=Vn(v))m++;for(v=0,x=g;x;x=Vn(x))v++;for(;0<m-v;)p=Vn(p),m--;for(;0<v-m;)g=Vn(g),v--;for(;m--;){if(p===g||g!==null&&p===g.alternate)break t;p=Vn(p),g=Vn(g)}p=null}else p=null;h!==null&&nf(d,f,h,p,!1),y!==null&&w!==null&&nf(d,w,y,p,!0)}}e:{if(f=u?cs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=Hb;else if(Qh(f))if(ug)_=Kb;else{_=Vb;var E=Wb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=qb);if(_&&(_=_(e,u))){lg(d,_,r,c);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&zu(f,"number",f.value)}switch(E=u?cs(u):window,e){case"focusin":(Qh(E)||E.contentEditable==="true")&&(ls=E,ec=u,_i=null);break;case"focusout":_i=ec=ls=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,ef(d,r,c);break;case"selectionchange":if(Jb)break;case"keydown":case"keyup":ef(d,r,c)}var k;if(xd)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else as?og(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(ig&&r.locale!=="ko"&&(as||P!=="onCompositionStart"?P==="onCompositionEnd"&&as&&(k=sg()):(Wr=c,yd="value"in Wr?Wr.value:Wr.textContent,as=!0)),E=Ra(u,P),0<E.length&&(P=new Vh(P,e,null,r,c),d.push({event:P,listeners:E}),k?P.data=k:(k=ag(r),k!==null&&(P.data=k)))),(k=Mb?Fb(e,r):Ub(e,r))&&(u=Ra(u,"onBeforeInput"),0<u.length&&(c=new Vh("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=k))}wg(d,t)})}function Bi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ra(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ii(e,r),i!=null&&n.unshift(Bi(e,i,s)),i=Ii(e,t),i!=null&&n.push(Bi(e,i,s))),e=e.return}return n}function Vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nf(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=Ii(r,i),l!=null&&o.unshift(Bi(r,l,a))):s||(l=Ii(r,i),l!=null&&o.push(Bi(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var ex=/\r\n?/g,tx=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(ex,`
38`).replace(tx,"")}function Io(e,t,r){if(t=sf(t),sf(e)!==t&&r)throw Error(A(425))}function Pa(){}var rc=null,nc=null;function sc(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 ic=typeof setTimeout=="function"?setTimeout:void 0,rx=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,nx=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(sx)}:ic;function sx(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),Di(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Di(t)}function Jr(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 af(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 Gs=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Gs,zi="__reactProps$"+Gs,pr="__reactContainer$"+Gs,oc="__reactEvents$"+Gs,ix="__reactListeners$"+Gs,ox="__reactHandles$"+Gs;function yn(e){var t=e[Gt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pr]||r[Gt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=af(e);e!==null;){if(r=e[Gt])return r;e=af(e)}return t}e=r,r=e.parentNode}return null}function fo(e){return e=e[Gt]||e[pr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function ll(e){return e[zi]||null}var ac=[],ds=-1;function an(e){return{current:e}}function ue(e){0>ds||(e.current=ac[ds],ac[ds]=null,ds--)}function oe(e,t){ds++,ac[ds]=e.current,e.current=t}var rn={},Fe=an(rn),Xe=an(!1),An=rn;function Ms(e,t){var r=e.type.contextTypes;if(!r)return rn;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 Ze(e){return e=e.childContextTypes,e!=null}function Aa(){ue(Xe),ue(Fe)}function lf(e,t,r){if(Fe.current!==rn)throw Error(A(168));oe(Fe,t),oe(Xe,r)}function xg(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(A(108,Ww(e)||"Unknown",s));return me({},r,n)}function Oa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rn,An=Fe.current,oe(Fe,e),oe(Xe,Xe.current),!0}function uf(e,t,r){var n=e.stateNode;if(!n)throw Error(A(169));r?(e=xg(e,t,An),n.__reactInternalMemoizedMergedChildContext=e,ue(Xe),ue(Fe),oe(Fe,e)):ue(Xe),oe(Xe,r)}var lr=null,ul=!1,ou=!1;function Sg(e){lr===null?lr=[e]:lr.push(e)}function ax(e){ul=!0,Sg(e)}function ln(){if(!ou&&lr!==null){ou=!0;var e=0,t=ne;try{var r=lr;for(ne=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}lr=null,ul=!1}catch(s){throw lr!==null&&(lr=lr.slice(e+1)),Km(pd,ln),s}finally{ne=t,ou=!1}}return null}var hs=[],fs=0,Na=null,ja=0,pt=[],mt=0,On=null,cr=1,dr="";function pn(e,t){hs[fs++]=ja,hs[fs++]=Na,Na=e,ja=t}function _g(e,t,r){pt[mt++]=cr,pt[mt++]=dr,pt[mt++]=On,On=e;var n=cr;e=dr;var s=32-jt(n)-1;n&=~(1<<s),r+=1;var i=32-jt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,cr=1<<32-jt(t)+s|r<<s|n,dr=i+e}else cr=1<<i|r<<s|n,dr=e}function _d(e){e.return!==null&&(pn(e,1),_g(e,1,0))}function Ed(e){for(;e===Na;)Na=hs[--fs],hs[fs]=null,ja=hs[--fs],hs[fs]=null;for(;e===On;)On=pt[--mt],pt[mt]=null,dr=pt[--mt],pt[mt]=null,cr=pt[--mt],pt[mt]=null}var at=null,ot=null,de=!1,Nt=null;function Eg(e,t){var r=gt(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 cf(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,at=e,ot=Jr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=On!==null?{id:cr,overflow:dr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=gt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,at=e,ot=null,!0):!1;default:return!1}}function lc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uc(e){if(de){var t=ot;if(t){var r=t;if(!cf(e,t)){if(lc(e))throw Error(A(418));t=Jr(r.nextSibling);var n=at;t&&cf(e,t)?Eg(n,r):(e.flags=e.flags&-4097|2,de=!1,at=e)}}else{if(lc(e))throw Error(A(418));e.flags=e.flags&-4097|2,de=!1,at=e}}}function df(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function Lo(e){if(e!==at)return!1;if(!de)return df(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!sc(e.type,e.memoizedProps)),t&&(t=ot)){if(lc(e))throw kg(),Error(A(418));for(;t;)Eg(e,t),t=Jr(t.nextSibling)}if(df(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ot=Jr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ot=null}}else ot=at?Jr(e.stateNode.nextSibling):null;return!0}function kg(){for(var e=ot;e;)e=Jr(e.nextSibling)}function Fs(){ot=at=null,de=!1}function kd(e){Nt===null?Nt=[e]:Nt.push(e)}var lx=br.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(A(309));var n=r.stateNode}if(!n)throw Error(A(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(A(284));if(!r._owner)throw Error(A(290,e))}return e}function $o(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hf(e){var t=e._init;return t(e._payload)}function Cg(e){function t(g,m){if(e){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function r(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=en(g,m),g.index=0,g.sibling=null,g}function i(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=2,m):v):(g.flags|=2,m)):(g.flags|=1048576,m)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,v,x){return m===null||m.tag!==6?(m=fu(v,g.mode,x),m.return=g,m):(m=s(m,v),m.return=g,m)}function l(g,m,v,x){var _=v.type;return _===os?c(g,m,v.props.children,x,v.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===jr&&hf(_)===m.type)?(x=s(m,v.props),x.ref=ai(g,m,v),x.return=g,x):(x=pa(v.type,v.key,v.props,null,g.mode,x),x.ref=ai(g,m,v),x.return=g,x)}function u(g,m,v,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=pu(v,g.mode,x),m.return=g,m):(m=s(m,v.children||[]),m.return=g,m)}function c(g,m,v,x,_){return m===null||m.tag!==7?(m=Pn(v,g.mode,x,_),m.return=g,m):(m=s(m,v),m.return=g,m)}function d(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=fu(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ko:return v=pa(m.type,m.key,m.props,null,g.mode,v),v.ref=ai(g,null,m),v.return=g,v;case is:return m=pu(m,g.mode,v),m.return=g,m;case jr:var x=m._init;return d(g,x(m._payload),v)}if(pi(m)||ri(m))return m=Pn(m,g.mode,v,null),m.return=g,m;$o(g,m)}return null}function f(g,m,v,x){var _=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return _!==null?null:a(g,m,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ko:return v.key===_?l(g,m,v,x):null;case is:return v.key===_?u(g,m,v,x):null;case jr:return _=v._init,f(g,m,_(v._payload),x)}if(pi(v)||ri(v))return _!==null?null:c(g,m,v,x,null);$o(g,v)}return null}function h(g,m,v,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(v)||null,a(m,g,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ko:return g=g.get(x.key===null?v:x.key)||null,l(m,g,x,_);case is:return g=g.get(x.key===null?v:x.key)||null,u(m,g,x,_);case jr:var E=x._init;return h(g,m,v,E(x._payload),_)}if(pi(x)||ri(x))return g=g.get(v)||null,c(m,g,x,_,null);$o(m,x)}return null}function y(g,m,v,x){for(var _=null,E=null,k=m,P=m=0,O=null;k!==null&&P<v.length;P++){k.index>P?(O=k,k=null):O=k.sibling;var j=f(g,k,v[P],x);if(j===null){k===null&&(k=O);break}e&&k&&j.alternate===null&&t(g,k),m=i(j,m,P),E===null?_=j:E.sibling=j,E=j,k=O}if(P===v.length)return r(g,k),de&&pn(g,P),_;if(k===null){for(;P<v.length;P++)k=d(g,v[P],x),k!==null&&(m=i(k,m,P),E===null?_=k:E.sibling=k,E=k);return de&&pn(g,P),_}for(k=n(g,k);P<v.length;P++)O=h(k,g,P,v[P],x),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?P:O.key),m=i(O,m,P),E===null?_=O:E.sibling=O,E=O);return e&&k.forEach(function(z){return t(g,z)}),de&&pn(g,P),_}function p(g,m,v,x){var _=ri(v);if(typeof _!="function")throw Error(A(150));if(v=_.call(v),v==null)throw Error(A(151));for(var E=_=null,k=m,P=m=0,O=null,j=v.next();k!==null&&!j.done;P++,j=v.next()){k.index>P?(O=k,k=null):O=k.sibling;var z=f(g,k,j.value,x);if(z===null){k===null&&(k=O);break}e&&k&&z.alternate===null&&t(g,k),m=i(z,m,P),E===null?_=z:E.sibling=z,E=z,k=O}if(j.done)return r(g,k),de&&pn(g,P),_;if(k===null){for(;!j.done;P++,j=v.next())j=d(g,j.value,x),j!==null&&(m=i(j,m,P),E===null?_=j:E.sibling=j,E=j);return de&&pn(g,P),_}for(k=n(g,k);!j.done;P++,j=v.next())j=h(k,g,P,j.value,x),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),m=i(j,m,P),E===null?_=j:E.sibling=j,E=j);return e&&k.forEach(function(D){return t(g,D)}),de&&pn(g,P),_}function w(g,m,v,x){if(typeof v=="object"&&v!==null&&v.type===os&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ko:e:{for(var _=v.key,E=m;E!==null;){if(E.key===_){if(_=v.type,_===os){if(E.tag===7){r(g,E.sibling),m=s(E,v.props.children),m.return=g,g=m;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===jr&&hf(_)===E.type){r(g,E.sibling),m=s(E,v.props),m.ref=ai(g,E,v),m.return=g,g=m;break e}r(g,E);break}else t(g,E);E=E.sibling}v.type===os?(m=Pn(v.props.children,g.mode,x,v.key),m.return=g,g=m):(x=pa(v.type,v.key,v.props,null,g.mode,x),x.ref=ai(g,m,v),x.return=g,g=x)}return o(g);case is:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){r(g,m.sibling),m=s(m,v.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else t(g,m);m=m.sibling}m=pu(v,g.mode,x),m.return=g,g=m}return o(g);case jr:return E=v._init,w(g,m,E(v._payload),x)}if(pi(v))return y(g,m,v,x);if(ri(v))return p(g,m,v,x);$o(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(r(g,m.sibling),m=s(m,v),m.return=g,g=m):(r(g,m),m=fu(v,g.mode,x),m.return=g,g=m),o(g)):r(g,m)}return w}var Us=Cg(!0),Tg=Cg(!1),Ia=an(null),La=null,ps=null,Cd=null;function Td(){Cd=ps=La=null}function Rd(e){var t=Ia.current;ue(Ia),e._currentValue=t}function cc(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 Ss(e,t){La=e,Cd=ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(Cd!==e)if(e={context:e,memoizedValue:t,next:null},ps===null){if(La===null)throw Error(A(308));ps=e,La.dependencies={lanes:0,firstContext:e}}else ps=ps.next=e;return t}var wn=null;function Pd(e){wn===null?wn=[e]:wn.push(e)}function Rg(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Pd(t)):(r.next=s.next,s.next=r),t.interleaved=r,mr(e,n)}function mr(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 Ir=!1;function Ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pg(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 hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,mr(e,r)}return s=n.interleaved,s===null?(t.next=t,Pd(n)):(t.next=s.next,s.next=t),n.interleaved=t,mr(e,r)}function la(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,md(e,r)}}function ff(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;Ir=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,p=a;switch(f=t,h=r,p.tag){case 1:if(y=p.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=me({},d,f);break e;case 2:Ir=!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);jn|=o,e.lanes=o,e.memoizedState=d}}function pf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(A(191,s));s.call(n)}}}var po={},Xt=an(po),Hi=an(po),Wi=an(po);function bn(e){if(e===po)throw Error(A(174));return e}function Od(e,t){switch(oe(Wi,t),oe(Hi,e),oe(Xt,po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wu(t,e)}ue(Xt),oe(Xt,t)}function Bs(){ue(Xt),ue(Hi),ue(Wi)}function Ag(e){bn(Wi.current);var t=bn(Xt.current),r=Wu(t,e.type);t!==r&&(oe(Hi,e),oe(Xt,r))}function Nd(e){Hi.current===e&&(ue(Xt),ue(Hi))}var fe=an(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 jd(){for(var e=0;e<au.length;e++)au[e]._workInProgressVersionPrimary=null;au.length=0}var ua=br.ReactCurrentDispatcher,lu=br.ReactCurrentBatchConfig,Nn=0,pe=null,Ee=null,Ce=null,Ma=!1,Ei=!1,Vi=0,ux=0;function Le(){throw Error(A(321))}function Id(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Lt(e[r],t[r]))return!1;return!0}function Ld(e,t,r,n,s,i){if(Nn=i,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ua.current=e===null||e.memoizedState===null?fx:px,e=r(n,s),Ei){i=0;do{if(Ei=!1,Vi=0,25<=i)throw Error(A(301));i+=1,Ce=Ee=null,t.updateQueue=null,ua.current=mx,e=r(n,s)}while(Ei)}if(ua.current=Fa,t=Ee!==null&&Ee.next!==null,Nn=0,Ce=Ee=pe=null,Ma=!1,t)throw Error(A(300));return e}function $d(){var e=Vi!==0;return Vi=0,e}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?pe.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function wt(){if(Ee===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Ce===null?pe.memoizedState:Ce.next;if(t!==null)Ce=t,Ee=e;else{if(e===null)throw Error(A(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Ce===null?pe.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function qi(e,t){return typeof t=="function"?t(e):t}function uu(e){var t=wt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var n=Ee,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((Nn&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,pe.lanes|=c,jn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Lt(n,t.memoizedState)||(Ye=!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,pe.lanes|=i,jn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function cu(e){var t=wt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Lt(i,t.memoizedState)||(Ye=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Og(){}function Ng(e,t){var r=pe,n=wt(),s=t(),i=!Lt(n.memoizedState,s);if(i&&(n.memoizedState=s,Ye=!0),n=n.queue,Dd(Lg.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ce!==null&&Ce.memoizedState.tag&1){if(r.flags|=2048,Ki(9,Ig.bind(null,r,n,s,t),void 0,null),Te===null)throw Error(A(349));Nn&30||jg(r,t,s)}return s}function jg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ig(e,t,r,n){t.value=r,t.getSnapshot=n,$g(t)&&Dg(e)}function Lg(e,t,r){return r(function(){$g(t)&&Dg(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lt(e,r)}catch{return!0}}function Dg(e){var t=mr(e,1);t!==null&&It(t,e,1,-1)}function mf(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:e},t.queue=e,e=e.dispatch=hx.bind(null,pe,e),[t.memoizedState,e]}function Ki(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.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 Mg(){return wt().memoizedState}function ca(e,t,r,n){var s=zt();pe.flags|=e,s.memoizedState=Ki(1|t,r,void 0,n===void 0?null:n)}function cl(e,t,r,n){var s=wt();n=n===void 0?null:n;var i=void 0;if(Ee!==null){var o=Ee.memoizedState;if(i=o.destroy,n!==null&&Id(n,o.deps)){s.memoizedState=Ki(t,r,i,n);return}}pe.flags|=e,s.memoizedState=Ki(1|t,r,i,n)}function gf(e,t){return ca(8390656,8,e,t)}function Dd(e,t){return cl(2048,8,e,t)}function Fg(e,t){return cl(4,2,e,t)}function Ug(e,t){return cl(4,4,e,t)}function Bg(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 zg(e,t,r){return r=r!=null?r.concat([e]):null,cl(4,4,Bg.bind(null,t,e),r)}function Md(){}function Hg(e,t){var r=wt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Id(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Wg(e,t){var r=wt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Id(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Vg(e,t,r){return Nn&21?(Lt(r,t)||(r=Jm(),pe.lanes|=r,jn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ye=!0),e.memoizedState=r)}function cx(e,t){var r=ne;ne=r!==0&&4>r?r:4,e(!0);var n=lu.transition;lu.transition={};try{e(!1),t()}finally{ne=r,lu.transition=n}}function qg(){return wt().memoizedState}function dx(e,t,r){var n=Zr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Kg(e))Gg(t,r);else if(r=Rg(e,t,r,n),r!==null){var s=He();It(r,e,n,s),Qg(r,t,n)}}function hx(e,t,r){var n=Zr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Kg(e))Gg(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,Lt(a,o)){var l=t.interleaved;l===null?(s.next=s,Pd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Rg(e,t,s,n),r!==null&&(s=He(),It(r,e,n,s),Qg(r,t,n))}}function Kg(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Gg(e,t){Ei=Ma=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Qg(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,md(e,r)}}var Fa={readContext:yt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},fx={readContext:yt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:gf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ca(4194308,4,Bg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ca(4194308,4,e,t)},useInsertionEffect:function(e,t){return ca(4,2,e,t)},useMemo:function(e,t){var r=zt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=zt();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=dx.bind(null,pe,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:mf,useDebugValue:Md,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=mf(!1),t=e[0];return e=cx.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pe,s=zt();if(de){if(r===void 0)throw Error(A(407));r=r()}else{if(r=t(),Te===null)throw Error(A(349));Nn&30||jg(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,gf(Lg.bind(null,n,i,e),[e]),n.flags|=2048,Ki(9,Ig.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=zt(),t=Te.identifierPrefix;if(de){var r=dr,n=cr;r=(n&~(1<<32-jt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Vi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ux++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},px={readContext:yt,useCallback:Hg,useContext:yt,useEffect:Dd,useImperativeHandle:zg,useInsertionEffect:Fg,useLayoutEffect:Ug,useMemo:Wg,useReducer:uu,useRef:Mg,useState:function(){return uu(qi)},useDebugValue:Md,useDeferredValue:function(e){var t=wt();return Vg(t,Ee.memoizedState,e)},useTransition:function(){var e=uu(qi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:Ng,useId:qg,unstable_isNewReconciler:!1},mx={readContext:yt,useCallback:Hg,useContext:yt,useEffect:Dd,useImperativeHandle:zg,useInsertionEffect:Fg,useLayoutEffect:Ug,useMemo:Wg,useReducer:cu,useRef:Mg,useState:function(){return cu(qi)},useDebugValue:Md,useDeferredValue:function(e){var t=wt();return Ee===null?t.memoizedState=e:Vg(t,Ee.memoizedState,e)},useTransition:function(){var e=cu(qi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:Ng,useId:qg,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function dc(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:me({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var dl={isMounted:function(e){return(e=e._reactInternals)?Mn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=He(),s=Zr(e),i=hr(n,s);i.payload=t,r!=null&&(i.callback=r),t=Yr(e,i,s),t!==null&&(It(t,e,s,n),la(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=He(),s=Zr(e),i=hr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Yr(e,i,s),t!==null&&(It(t,e,s,n),la(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=He(),n=Zr(e),s=hr(r,n);s.tag=2,t!=null&&(s.callback=t),t=Yr(e,s,n),t!==null&&(It(t,e,n,r),la(t,e,n))}};function vf(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 Jg(e,t,r){var n=!1,s=rn,i=t.contextType;return typeof i=="object"&&i!==null?i=yt(i):(s=Ze(t)?An:Fe.current,n=t.contextTypes,i=(n=n!=null)?Ms(e,s):rn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function yf(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&&dl.enqueueReplaceState(t,t.state,null)}function hc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Ad(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=yt(i):(i=Ze(t)?An:Fe.current,s.context=Ms(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(dc(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&&dl.enqueueReplaceState(s,s.state,null),$a(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function zs(e,t){try{var r="",n=t;do r+=Hw(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function du(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function fc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var gx=typeof WeakMap=="function"?WeakMap:Map;function Yg(e,t,r){r=hr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ba||(Ba=!0,_c=n),fc(e,t)},r}function Xg(e,t,r){r=hr(-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(){fc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){fc(e,t),typeof n!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function wf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new gx;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 bf(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 xf(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=hr(-1,1),t.tag=2,Yr(r,t,1))),r.lanes|=1),e)}var vx=br.ReactCurrentOwner,Ye=!1;function Be(e,t,r,n){t.child=e===null?Tg(t,null,r,n):Us(t,e.child,r,n)}function Sf(e,t,r,n,s){r=r.render;var i=t.ref;return Ss(t,s),n=Ld(e,t,r,n,i,s),r=$d(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gr(e,t,s)):(de&&r&&_d(t),t.flags|=1,Be(e,t,n,s),t.child)}function _f(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!qd(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Zg(e,t,i,n,s)):(e=pa(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 gr(e,t,s)}return t.flags|=1,e=en(i,n),e.ref=t.ref,e.return=t,t.child=e}function Zg(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Fi(i,n)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,gr(e,t,s)}return pc(e,t,r,n,s)}function ev(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(gs,nt),nt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(gs,nt),nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,oe(gs,nt),nt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,oe(gs,nt),nt|=n;return Be(e,t,s,r),t.child}function tv(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 40
40function pc(e,t,r,n,s){var i=Ze(r)?An:Fe.current;return i=Ms(t,i),Ss(t,s),r=Ld(e,t,r,n,i,s),n=$d(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gr(e,t,s)):(de&&n&&_d(t),t.flags|=1,Be(e,t,r,s),t.child)}function Ef(e,t,r,n,s){if(Ze(r)){var i=!0;Oa(t)}else i=!1;if(Ss(t,s),t.stateNode===null)da(e,t),Jg(t,r,n),hc(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=yt(u):(u=Ze(r)?An:Fe.current,u=Ms(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)&&yf(t,o,n,u),Ir=!1;var f=t.memoizedState;o.state=f,$a(t,n,o,s),l=t.memoizedState,a!==n||f!==l||Xe.current||Ir?(typeof c=="function"&&(dc(t,r,c,n),l=t.memoizedState),(a=Ir||vf(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,Pg(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ct(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=yt(l):(l=Ze(r)?An:Fe.current,l=Ms(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)&&yf(t,o,n,l),Ir=!1,f=t.memoizedState,o.state=f,$a(t,n,o,s);var y=t.memoizedState;a!==d||f!==y||Xe.current||Ir?(typeof h=="function"&&(dc(t,r,h,n),y=t.memoizedState),(u=Ir||vf(t,r,u,n,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),o.props=n,o.state=y,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return mc(e,t,r,n,i,s)}function mc(e,t,r,n,s,i){tv(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&uf(t,r,!1),gr(e,t,i);n=t.stateNode,vx.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Us(t,e.child,null,i),t.child=Us(t,null,a,i)):Be(e,t,a,i),t.memoizedState=n.state,s&&uf(t,r,!0),t.child}function rv(e){var t=e.stateNode;t.pendingContext?lf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lf(e,t.context,!1),Od(e,t.containerInfo)}function kf(e,t,r,n,s){return Fs(),kd(s),t.flags|=256,Be(e,t,r,n),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0};function vc(e){return{baseLanes:e,cachePool:null,transitions:null}}function nv(e,t,r){var n=t.pendingProps,s=fe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(fe,s&1),e===null)return uc(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=pl(o,n,0,null),e=Pn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=vc(r),t.memoizedState=gc,e):Fd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return yx(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=en(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=en(a,i):(i=Pn(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?vc(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=gc,n}return i=e.child,e=i.sibling,n=en(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 Fd(e,t){return t=pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Do(e,t,r,n){return n!==null&&kd(n),Us(t,e.child,null,r),e=Fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yx(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=du(Error(A(422))),Do(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=pl({mode:"visible",children:n.children},s,0,null),i=Pn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Us(t,e.child,null,o),t.child.memoizedState=vc(o),t.memoizedState=gc,i);if(!(t.mode&1))return Do(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(A(419)),n=du(i,n,void 0),Do(e,t,o,n)}if(a=(o&e.childLanes)!==0,Ye||a){if(n=Te,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mr(e,s),It(n,e,s,-1))}return Vd(),n=du(Error(A(421))),Do(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Ox.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,ot=Jr(s.nextSibling),at=t,de=!0,Nt=null,e!==null&&(pt[mt++]=cr,pt[mt++]=dr,pt[mt++]=On,cr=e.id,dr=e.overflow,On=t),t=Fd(t,n.children),t.flags|=4096,t)}function Cf(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),cc(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 sv(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Be(e,t,n.children,r),n=fe.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&&Cf(e,r,t);else if(e.tag===19)Cf(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(oe(fe,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 da(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,r=en(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=en(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wx(e,t,r){switch(t.tag){case 3:rv(t),Fs();break;case 5:Ag(t);break;case 1:Ze(t.type)&&Oa(t);break;case 4:Od(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;oe(Ia,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(oe(fe,fe.current&1),t.flags|=128,null):r&t.child.childLanes?nv(e,t,r):(oe(fe,fe.current&1),e=gr(e,t,r),e!==null?e.sibling:null);oe(fe,fe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return sv(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(fe,fe.current),n)break;return null;case 22:case 23:return t.lanes=0,ev(e,t,r)}return gr(e,t,r)}var iv,yc,ov,av;iv=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}};yc=function(){};ov=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,bn(Xt.current);var i=null;switch(r){case"input":s=Uu(e,s),n=Uu(e,n),i=[];break;case"select":s=me({},s,{value:void 0}),n=me({},n,{value:void 0}),i=[];break;case"textarea":s=Hu(e,s),n=Hu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Pa)}Vu(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"&&(Ni.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"&&(Ni.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};av=function(e,t,r,n){r!==n&&(t.flags|=4)};function li(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function $e(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 bx(e,t,r){var n=t.pendingProps;switch(Ed(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return Ze(t.type)&&Aa(),$e(t),null;case 3:return n=t.stateNode,Bs(),ue(Xe),ue(Fe),jd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Lo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nt!==null&&(Cc(Nt),Nt=null))),yc(e,t),$e(t),null;case 5:Nd(t);var s=bn(Wi.current);if(r=t.type,e!==null&&t.stateNode!=null)ov(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(A(166));return $e(t),null}if(e=bn(Xt.current),Lo(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Gt]=t,n[zi]=i,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<gi.length;s++)le(gi[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":Ih(n,i),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},le("invalid",n);break;case"textarea":$h(n,i),le("invalid",n)}Vu(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Io(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Io(n.textContent,a,e),s=["children",""+a]):Ni.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&le("scroll",n)}switch(r){case"input":Co(n),Lh(n,i,!0);break;case"textarea":Co(n),Dh(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Pa)}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=Lm(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[Gt]=t,e[zi]=n,iv(e,t,!1,!1),t.stateNode=e;e:{switch(o=qu(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<gi.length;s++)le(gi[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":Ih(e,n),s=Uu(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=me({},n,{value:void 0}),le("invalid",e);break;case"textarea":$h(e,n),s=Hu(e,n),le("invalid",e);break;default:s=n}Vu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Mm(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&$m(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ji(e,l):typeof l=="number"&&ji(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ni.hasOwnProperty(i)?l!=null&&i==="onScroll"&&le("scroll",e):l!=null&&ud(e,i,l,o))}switch(r){case"input":Co(e),Lh(e,n,!1);break;case"textarea":Co(e),Dh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+tn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?ys(e,!!n.multiple,i,!1):n.defaultValue!=null&&ys(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Pa)}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 $e(t),null;case 6:if(e&&t.stateNode!=null)av(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(A(166));if(r=bn(Wi.current),bn(Xt.current),Lo(t)){if(n=t.stateNode,r=t.memoizedProps,n[Gt]=t,(i=n.nodeValue!==r)&&(e=at,e!==null))switch(e.tag){case 3:Io(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Io(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Gt]=t,t.stateNode=n}return $e(t),null;case 13:if(ue(fe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&ot!==null&&t.mode&1&&!(t.flags&128))kg(),Fs(),t.flags|=98560,i=!1;else if(i=Lo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(A(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(A(317));i[Gt]=t}else Fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else Nt!==null&&(Cc(Nt),Nt=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||fe.current&1?ke===0&&(ke=3):Vd())),t.updateQueue!==null&&(t.flags|=4),$e(t),null);case 4:return Bs(),yc(e,t),e===null&&Ui(t.stateNode.containerInfo),$e(t),null;case 10:return Rd(t.type._context),$e(t),null;case 17:return Ze(t.type)&&Aa(),$e(t),null;case 19:if(ue(fe),i=t.memoizedState,i===null)return $e(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)li(i,!1);else{if(ke!==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 oe(fe,fe.current&1|2),t.child}e=e.sibling}i.tail!==null&&we()>Hs&&(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&&!de)return $e(t),null}else 2*we()-i.renderingStartTime>Hs&&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=we(),t.sibling=null,r=fe.current,oe(fe,n?r&1|2:r&1),t):($e(t),null);case 22:case 23:return Wd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?nt&1073741824&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function xx(e,t){switch(Ed(t),t.tag){case 1:return Ze(t.type)&&Aa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bs(),ue(Xe),ue(Fe),jd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nd(t),null;case 13:if(ue(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(fe),null;case 4:return Bs(),null;case 10:return Rd(t.type._context),null;case 22:case 23:return Wd(),null;case 24:return null;default:return null}}var Mo=!1,Me=!1,Sx=typeof WeakSet=="function"?WeakSet:Set,$=null;function ms(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ye(e,t,n)}else r.current=null}function wc(e,t,r){try{r()}catch(n){ye(e,t,n)}}var Tf=!1;function _x(e,t){if(rc=Ca,e=hg(),Sd(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(nc={focusedElem:e,selectionRange:r},Ca=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,w=y.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:Ct(t.type,p),w);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(x){ye(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return y=Tf,Tf=!1,y}function ki(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&&wc(t,r,i)}s=s.next}while(s!==n)}}function hl(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 bc(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 lv(e){var t=e.alternate;t!==null&&(e.alternate=null,lv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gt],delete t[zi],delete t[oc],delete t[ix],delete t[ox])),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 uv(e){return e.tag===5||e.tag===3||e.tag===4}function Rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uv(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 xc(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=Pa));else if(n!==4&&(e=e.child,e!==null))for(xc(e,t,r),e=e.sibling;e!==null;)xc(e,t,r),e=e.sibling}function Sc(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(Sc(e,t,r),e=e.sibling;e!==null;)Sc(e,t,r),e=e.sibling}var Ae=null,Ot=!1;function Rr(e,t,r){for(r=r.child;r!==null;)cv(e,t,r),r=r.sibling}function cv(e,t,r){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(sl,r)}catch{}switch(r.tag){case 5:Me||ms(r,t);case 6:var n=Ae,s=Ot;Ae=null,Rr(e,t,r),Ae=n,Ot=s,Ae!==null&&(Ot?(e=Ae,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ae.removeChild(r.stateNode));break;case 18:Ae!==null&&(Ot?(e=Ae,r=r.stateNode,e.nodeType===8?iu(e.parentNode,r):e.nodeType===1&&iu(e,r),Di(e)):iu(Ae,r.stateNode));break;case 4:n=Ae,s=Ot,Ae=r.stateNode.containerInfo,Ot=!0,Rr(e,t,r),Ae=n,Ot=s;break;case 0:case 11:case 14:case 15:if(!Me&&(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)&&wc(r,t,o),s=s.next}while(s!==n)}Rr(e,t,r);break;case 1:if(!Me&&(ms(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ye(r,t,a)}Rr(e,t,r);break;case 21:Rr(e,t,r);break;case 22:r.mode&1?(Me=(n=Me)||r.memoizedState!==null,Rr(e,t,r),Me=n):Rr(e,t,r);break;default:Rr(e,t,r)}}function Pf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Sx),t.forEach(function(n){var s=Nx.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function _t(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ae=a.stateNode,Ot=!1;break e;case 3:Ae=a.stateNode.containerInfo,Ot=!0;break e;case 4:Ae=a.stateNode.containerInfo,Ot=!0;break e}a=a.return}if(Ae===null)throw Error(A(160));cv(i,o,s),Ae=null,Ot=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ye(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)dv(t,e),t=t.sibling}function dv(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_t(t,e),Ut(e),n&4){try{ki(3,e,e.return),hl(3,e)}catch(p){ye(e,e.return,p)}try{ki(5,e,e.return)}catch(p){ye(e,e.return,p)}}break;case 1:_t(t,e),Ut(e),n&512&&r!==null&&ms(r,r.return);break;case 5:if(_t(t,e),Ut(e),n&512&&r!==null&&ms(r,r.return),e.flags&32){var s=e.stateNode;try{ji(s,"")}catch(p){ye(e,e.return,p)}}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&&jm(s,i),qu(a,o);var u=qu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Mm(s,d):c==="dangerouslySetInnerHTML"?$m(s,d):c==="children"?ji(s,d):ud(s,c,d,u)}switch(a){case"input":Bu(s,i);break;case"textarea":Im(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?ys(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?ys(s,!!i.multiple,i.defaultValue,!0):ys(s,!!i.multiple,i.multiple?[]:"",!1))}s[zi]=i}catch(p){ye(e,e.return,p)}}break;case 6:if(_t(t,e),Ut(e),n&4){if(e.stateNode===null)throw Error(A(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(p){ye(e,e.return,p)}}break;case 3:if(_t(t,e),Ut(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Di(t.containerInfo)}catch(p){ye(e,e.return,p)}break;case 4:_t(t,e),Ut(e);break;case 13:_t(t,e),Ut(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(zd=we())),n&4&&Pf(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Me=(u=Me)||c,_t(t,e),Me=u):_t(t,e),Ut(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for($=e,c=e.child;c!==null;){for(d=$=c;$!==null;){switch(f=$,h=f.child,f.tag){case 0:case 11:case 14:case 15:ki(4,f,f.return);break;case 1:ms(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(p){ye(n,r,p)}}break;case 5:ms(f,f.return);break;case 22:if(f.memoizedState!==null){Of(d);continue}}h!==null?(h.return=f,$=h):Of(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=Dm("display",o))}catch(p){ye(e,e.return,p)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(p){ye(e,e.return,p)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_t(t,e),Ut(e),n&4&&Pf(e);break;case 21:break;default:_t(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(uv(r)){var n=r;break e}r=r.return}throw Error(A(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ji(s,""),n.flags&=-33);var i=Rf(e);Sc(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Rf(e);xc(e,a,o);break;default:throw Error(A(161))}}catch(l){ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ex(e,t,r){$=e,hv(e)}function hv(e,t,r){for(var n=(e.mode&1)!==0;$!==null;){var s=$,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Mo;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Me;a=Mo;var u=Me;if(Mo=o,(Me=l)&&!u)for($=s;$!==null;)o=$,l=o.child,o.tag===22&&o.memoizedState!==null?Nf(s):l!==null?(l.return=o,$=l):Nf(s);for(;i!==null;)$=i,hv(i),i=i.sibling;$=s,Mo=a,Me=u}Af(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,$=i):Af(e)}}function Af(e){for(;$!==null;){var t=$;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Me||hl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Me)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Ct(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&pf(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}pf(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&&Di(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}Me||t.flags&512&&bc(t)}catch(f){ye(t,t.return,f)}}if(t===e){$=null;break}if(r=t.sibling,r!==null){r.return=t.return,$=r;break}$=t.return}}function Of(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$=r;break}$=t.return}}function Nf(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{hl(4,t)}catch(l){ye(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ye(t,s,l)}}var i=t.return;try{bc(t)}catch(l){ye(t,i,l)}break;case 5:var o=t.return;try{bc(t)}catch(l){ye(t,o,l)}}}catch(l){ye(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var kx=Math.ceil,Ua=br.ReactCurrentDispatcher,Ud=br.ReactCurrentOwner,vt=br.ReactCurrentBatchConfig,ee=0,Te=null,Se=null,Oe=0,nt=0,gs=an(0),ke=0,Gi=null,jn=0,fl=0,Bd=0,Ci=null,Je=null,zd=0,Hs=1/0,ir=null,Ba=!1,_c=null,Xr=null,Fo=!1,Vr=null,za=0,Ti=0,Ec=null,ha=-1,fa=0;function He(){return ee&6?we():ha!==-1?ha:ha=we()}function Zr(e){return e.mode&1?ee&2&&Oe!==0?Oe&-Oe:lx.transition!==null?(fa===0&&(fa=Jm()),fa):(e=ne,e!==0||(e=window.event,e=e===void 0?16:ng(e.type)),e):1}function It(e,t,r,n){if(50<Ti)throw Ti=0,Ec=null,Error(A(185));co(e,r,n),(!(ee&2)||e!==Te)&&(e===Te&&(!(ee&2)&&(fl|=r),ke===4&&$r(e,Oe)),et(e,n),r===1&&ee===0&&!(t.mode&1)&&(Hs=we()+500,ul&&ln()))}function et(e,t){var r=e.callbackNode;lb(e,t);var n=ka(e,e===Te?Oe:0);if(n===0)r!==null&&Uh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Uh(r),t===1)e.tag===0?ax(jf.bind(null,e)):Sg(jf.bind(null,e)),nx(function(){!(ee&6)&&ln()}),r=null;else{switch(Ym(n)){case 1:r=pd;break;case 4:r=Gm;break;case 16:r=Ea;break;case 536870912:r=Qm;break;default:r=Ea}r=bv(r,fv.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function fv(e,t){if(ha=-1,fa=0,ee&6)throw Error(A(327));var r=e.callbackNode;if(_s()&&e.callbackNode!==r)return null;var n=ka(e,e===Te?Oe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ha(e,n);else{t=n;var s=ee;ee|=2;var i=mv();(Te!==e||Oe!==t)&&(ir=null,Hs=we()+500,Rn(e,t));do try{Rx();break}catch(a){pv(e,a)}while(!0);Td(),Ua.current=i,ee=s,Se!==null?t=0:(Te=null,Oe=0,t=ke)}if(t!==0){if(t===2&&(s=Yu(e),s!==0&&(n=s,t=kc(e,s))),t===1)throw r=Gi,Rn(e,0),$r(e,n),et(e,we()),r;if(t===6)$r(e,n);else{if(s=e.current.alternate,!(n&30)&&!Cx(s)&&(t=Ha(e,n),t===2&&(i=Yu(e),i!==0&&(n=i,t=kc(e,i))),t===1))throw r=Gi,Rn(e,0),$r(e,n),et(e,we()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(A(345));case 2:mn(e,Je,ir);break;case 3:if($r(e,n),(n&130023424)===n&&(t=zd+500-we(),10<t)){if(ka(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){He(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ic(mn.bind(null,e,Je,ir),t);break}mn(e,Je,ir);break;case 4:if($r(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-jt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=we()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kx(n/1960))-n,10<n){e.timeoutHandle=ic(mn.bind(null,e,Je,ir),n);break}mn(e,Je,ir);break;case 5:mn(e,Je,ir);break;default:throw Error(A(329))}}}return et(e,we()),e.callbackNode===r?fv.bind(null,e):null}function kc(e,t){var r=Ci;return e.current.memoizedState.isDehydrated&&(Rn(e,t).flags|=256),e=Ha(e,t),e!==2&&(t=Je,Je=r,t!==null&&Cc(t)),e}function Cc(e){Je===null?Je=e:Je.push.apply(Je,e)}function Cx(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(!Lt(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 $r(e,t){for(t&=~Bd,t&=~fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-jt(t),n=1<<r;e[r]=-1,t&=~n}}function jf(e){if(ee&6)throw Error(A(327));_s();var t=ka(e,0);if(!(t&1))return et(e,we()),null;var r=Ha(e,t);if(e.tag!==0&&r===2){var n=Yu(e);n!==0&&(t=n,r=kc(e,n))}if(r===1)throw r=Gi,Rn(e,0),$r(e,t),et(e,we()),r;if(r===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,mn(e,Je,ir),et(e,we()),null}function Hd(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(Hs=we()+500,ul&&ln())}}function In(e){Vr!==null&&Vr.tag===0&&!(ee&6)&&_s();var t=ee;ee|=1;var r=vt.transition,n=ne;try{if(vt.transition=null,ne=1,e)return e()}finally{ne=n,vt.transition=r,ee=t,!(ee&6)&&ln()}}function Wd(){nt=gs.current,ue(gs)}function Rn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,rx(r)),Se!==null)for(r=Se.return;r!==null;){var n=r;switch(Ed(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Aa();break;case 3:Bs(),ue(Xe),ue(Fe),jd();break;case 5:Nd(n);break;case 4:Bs();break;case 13:ue(fe);break;case 19:ue(fe);break;case 10:Rd(n.type._context);break;case 22:case 23:Wd()}r=r.return}if(Te=e,Se=e=en(e.current,null),Oe=nt=t,ke=0,Gi=null,Bd=fl=jn=0,Je=Ci=null,wn!==null){for(t=0;t<wn.length;t++)if(r=wn[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}wn=null}return e}function pv(e,t){do{var r=Se;try{if(Td(),ua.current=Fa,Ma){for(var n=pe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ma=!1}if(Nn=0,Ce=Ee=pe=null,Ei=!1,Vi=0,Ud.current=null,r===null||r.return===null){ke=1,Gi=t,Se=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Oe,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=bf(o);if(h!==null){h.flags&=-257,xf(h,o,a,i,t),h.mode&1&&wf(i,u,t),t=h,l=u;var y=t.updateQueue;if(y===null){var p=new Set;p.add(l),t.updateQueue=p}else y.add(l);break e}else{if(!(t&1)){wf(i,u,t),Vd();break e}l=Error(A(426))}}else if(de&&a.mode&1){var w=bf(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),xf(w,o,a,i,t),kd(zs(l,a));break e}}i=l=zs(l,a),ke!==4&&(ke=2),Ci===null?Ci=[i]:Ci.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=Yg(i,l,t);ff(i,g);break e;case 1:a=l;var m=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Xr===null||!Xr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=Xg(i,a,t);ff(i,x);break e}}i=i.return}while(i!==null)}vv(r)}catch(_){t=_,Se===r&&r!==null&&(Se=r=r.return);continue}break}while(!0)}function mv(){var e=Ua.current;return Ua.current=Fa,e===null?Fa:e}function Vd(){(ke===0||ke===3||ke===2)&&(ke=4),Te===null||!(jn&268435455)&&!(fl&268435455)||$r(Te,Oe)}function Ha(e,t){var r=ee;ee|=2;var n=mv();(Te!==e||Oe!==t)&&(ir=null,Rn(e,t));do try{Tx();break}catch(s){pv(e,s)}while(!0);if(Td(),ee=r,Ua.current=n,Se!==null)throw Error(A(261));return Te=null,Oe=0,ke}function Tx(){for(;Se!==null;)gv(Se)}function Rx(){for(;Se!==null&&!Zw();)gv(Se)}function gv(e){var t=wv(e.alternate,e,nt);e.memoizedProps=e.pendingProps,t===null?vv(e):Se=t,Ud.current=null}function vv(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=xx(r,t),r!==null){r.flags&=32767,Se=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,Se=null;return}}else if(r=bx(r,t,nt),r!==null){Se=r;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);ke===0&&(ke=5)}function mn(e,t,r){var n=ne,s=vt.transition;try{vt.transition=null,ne=1,Px(e,t,r,n)}finally{vt.transition=s,ne=n}return null}function Px(e,t,r,n){do _s();while(Vr!==null);if(ee&6)throw Error(A(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(ub(e,i),e===Te&&(Se=Te=null,Oe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fo||(Fo=!0,bv(Ea,function(){return _s(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=vt.transition,vt.transition=null;var o=ne;ne=1;var a=ee;ee|=4,Ud.current=null,_x(e,r),dv(r,e),Qb(nc),Ca=!!rc,nc=rc=null,e.current=r,Ex(r),eb(),ee=a,ne=o,vt.transition=i}else e.current=r;if(Fo&&(Fo=!1,Vr=e,za=s),i=e.pendingLanes,i===0&&(Xr=null),nb(r.stateNode),et(e,we()),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(Ba)throw Ba=!1,e=_c,_c=null,e;return za&1&&e.tag!==0&&_s(),i=e.pendingLanes,i&1?e===Ec?Ti++:(Ti=0,Ec=e):Ti=0,ln(),null}function _s(){if(Vr!==null){var e=Ym(za),t=vt.transition,r=ne;try{if(vt.transition=null,ne=16>e?16:e,Vr===null)var n=!1;else{if(e=Vr,Vr=null,za=0,ee&6)throw Error(A(331));var s=ee;for(ee|=4,$=e.current;$!==null;){var i=$,o=i.child;if($.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var c=$;switch(c.tag){case 0:case 11:case 15:ki(8,c,i)}var d=c.child;if(d!==null)d.return=c,$=d;else for(;$!==null;){c=$;var f=c.sibling,h=c.return;if(lv(c),c===u){$=null;break}if(f!==null){f.return=h,$=f;break}$=h}}}var y=i.alternate;if(y!==null){var p=y.child;if(p!==null){y.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}$=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,$=o;else e:for(;$!==null;){if(i=$,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ki(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,$=g;break e}$=i.return}}var m=e.current;for($=m;$!==null;){o=$;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,$=v;else e:for(o=m;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:hl(9,a)}}catch(_){ye(a,a.return,_)}if(a===o){$=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,$=x;break e}$=a.return}}if(ee=s,ln(),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(sl,e)}catch{}n=!0}return n}finally{ne=r,vt.transition=t}}return!1}function If(e,t,r){t=zs(r,t),t=Yg(e,t,1),e=Yr(e,t,1),t=He(),e!==null&&(co(e,1,t),et(e,t))}function ye(e,t,r){if(e.tag===3)If(e,e,r);else for(;t!==null;){if(t.tag===3){If(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Xr===null||!Xr.has(n))){e=zs(r,e),e=Xg(t,e,1),t=Yr(t,e,1),e=He(),t!==null&&(co(t,1,e),et(t,e));break}}t=t.return}}function Ax(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&r,Te===e&&(Oe&r)===r&&(ke===4||ke===3&&(Oe&130023424)===Oe&&500>we()-zd?Rn(e,0):Bd|=r),et(e,t)}function yv(e,t){t===0&&(e.mode&1?(t=Po,Po<<=1,!(Po&130023424)&&(Po=4194304)):t=1);var r=He();e=mr(e,t),e!==null&&(co(e,t,r),et(e,r))}function Ox(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),yv(e,r)}function Nx(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(A(314))}n!==null&&n.delete(t),yv(e,r)}var wv;wv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)Ye=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ye=!1,wx(e,t,r);Ye=!!(e.flags&131072)}else Ye=!1,de&&t.flags&1048576&&_g(t,ja,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;da(e,t),e=t.pendingProps;var s=Ms(t,Fe.current);Ss(t,r),s=Ld(null,t,n,e,s,r);var i=$d();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,Ze(n)?(i=!0,Oa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ad(t),s.updater=dl,t.stateNode=s,s._reactInternals=t,hc(t,n,e,r),t=mc(null,t,n,!0,i,r)):(t.tag=0,de&&i&&_d(t),Be(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(da(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=Ix(n),e=Ct(n,e),s){case 0:t=pc(null,t,n,e,r);break e;case 1:t=Ef(null,t,n,e,r);break e;case 11:t=Sf(null,t,n,e,r);break e;case 14:t=_f(null,t,n,Ct(n.type,e),r);break e}throw Error(A(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ct(n,s),pc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ct(n,s),Ef(e,t,n,s,r);case 3:e:{if(rv(t),e===null)throw Error(A(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Pg(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=zs(Error(A(423)),t),t=kf(e,t,n,r,s);break e}else if(n!==s){s=zs(Error(A(424)),t),t=kf(e,t,n,r,s);break e}else for(ot=Jr(t.stateNode.containerInfo.firstChild),at=t,de=!0,Nt=null,r=Tg(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Fs(),n===s){t=gr(e,t,r);break e}Be(e,t,n,r)}t=t.child}return t;case 5:return Ag(t),e===null&&uc(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,sc(n,s)?o=null:i!==null&&sc(n,i)&&(t.flags|=32),tv(e,t),Be(e,t,o,r),t.child;case 6:return e===null&&uc(t),null;case 13:return nv(e,t,r);case 4:return Od(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Us(t,null,n,r):Be(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ct(n,s),Sf(e,t,n,s,r);case 7:return Be(e,t,t.pendingProps,r),t.child;case 8:return Be(e,t,t.pendingProps.children,r),t.child;case 12:return Be(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,oe(Ia,n._currentValue),n._currentValue=o,i!==null)if(Lt(i.value,o)){if(i.children===s.children&&!Xe.current){t=gr(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=hr(-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),cc(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(A(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),cc(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}Be(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ss(t,r),s=yt(s),n=n(s),t.flags|=1,Be(e,t,n,r),t.child;case 14:return n=t.type,s=Ct(n,t.pendingProps),s=Ct(n.type,s),_f(e,t,n,s,r);case 15:return Zg(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ct(n,s),da(e,t),t.tag=1,Ze(n)?(e=!0,Oa(t)):e=!1,Ss(t,r),Jg(t,n,s),hc(t,n,s,r),mc(null,t,n,!0,e,r);case 19:return sv(e,t,r);case 22:return ev(e,t,r)}throw Error(A(156,t.tag))};function bv(e,t){return Km(e,t)}function jx(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 gt(e,t,r,n){return new jx(e,t,r,n)}function qd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ix(e){if(typeof e=="function")return qd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dd)return 11;if(e===hd)return 14}return 2}function en(e,t){var r=e.alternate;return r===null?(r=gt(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: 8,997 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function pa(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")qd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case os:return Pn(r.children,s,i,t);case cd:o=8,s|=8;break;case $u:return e=gt(12,r,t,s|2),e.elementType=$u,e.lanes=i,e;case Du:return e=gt(13,r,t,s),e.elementType=Du,e.lanes=i,e;case Mu:return e=gt(19,r,t,s),e.elementType=Mu,e.lanes=i,e;case Am:return pl(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rm:o=10;break e;case Pm:o=9;break e;case dd:o=11;break e;case hd:o=14;break e;case jr:o=16,n=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=gt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Pn(e,t,r,n){return e=gt(7,e,n,t),e.lanes=r,e}function pl(e,t,r,n){return e=gt(22,e,n,t),e.elementType=Am,e.lanes=r,e.stateNode={isHidden:!1},e}function fu(e,t,r){return e=gt(6,e,null,t),e.lanes=r,e}function pu(e,t,r){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lx(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 Kd(e,t,r,n,s,i,o,a,l){return e=new Lx(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=gt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ad(i),e}function $x(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:is,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function xv(e){if(!e)return rn;e=e._reactInternals;e:{if(Mn(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var r=e.type;if(Ze(r))return xg(e,r,t)}return t}function Sv(e,t,r,n,s,i,o,a,l){return e=Kd(r,n,!0,e,s,i,o,a,l),e.context=xv(null),r=e.current,n=He(),s=Zr(r),i=hr(n,s),i.callback=t??null,Yr(r,i,s),e.current.lanes=s,co(e,s,n),et(e,n),e}function ml(e,t,r,n){var s=t.current,i=He(),o=Zr(s);return r=xv(r),t.context===null?t.context=r:t.pendingContext=r,t=hr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Yr(s,t,o),e!==null&&(It(e,s,o,i),la(e,s,o)),o}function Wa(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 Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Gd(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function Dx(){return null}var _v=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qd(e){this._internalRoot=e}gl.prototype.render=Qd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));ml(e,t,null,null)};gl.prototype.unmount=Qd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;In(function(){ml(null,e,null,null)}),t[pr]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=eg();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Lr.length&&t!==0&&t<Lr[r].priority;r++);Lr.splice(r,0,e),r===0&&rg(e)}};function Jd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $f(){}function Mx(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Wa(o);i.call(u)}}var o=Sv(t,n,e,0,null,!1,!1,"",$f);return e._reactRootContainer=o,e[pr]=o.current,Ui(e.nodeType===8?e.parentNode:e),In(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Wa(l);a.call(u)}}var l=Kd(e,0,!1,null,null,!1,!1,"",$f);return e._reactRootContainer=l,e[pr]=l.current,Ui(e.nodeType===8?e.parentNode:e),In(function(){ml(t,l,r,n)}),l}function yl(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=Wa(o);a.call(l)}}ml(t,o,e,s)}else o=Mx(r,t,e,s,n);return Wa(o)}Xm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=mi(t.pendingLanes);r!==0&&(md(t,r|1),et(t,we()),!(ee&6)&&(Hs=we()+500,ln()))}break;case 13:In(function(){var n=mr(e,1);if(n!==null){var s=He();It(n,e,1,s)}}),Gd(e,1)}};gd=function(e){if(e.tag===13){var t=mr(e,134217728);if(t!==null){var r=He();It(t,e,134217728,r)}Gd(e,134217728)}};Zm=function(e){if(e.tag===13){var t=Zr(e),r=mr(e,t);if(r!==null){var n=He();It(r,e,t,n)}Gd(e,t)}};eg=function(){return ne};tg=function(e,t){var r=ne;try{return ne=e,t()}finally{ne=r}};Gu=function(e,t,r){switch(t){case"input":if(Bu(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=ll(n);if(!s)throw Error(A(90));Nm(n),Bu(n,s)}}}break;case"textarea":Im(e,r);break;case"select":t=r.value,t!=null&&ys(e,!!r.multiple,t,!1)}};Bm=Hd;zm=In;var Fx={usingClientEntryPoint:!1,Events:[fo,cs,ll,Fm,Um,Hd]},ui={findFiberByHostInstance:yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ux={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:br.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vm(e),e===null?null:e.stateNode},findFiberByHostInstance:ui.findFiberByHostInstance||Dx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uo.isDisabled&&Uo.supportsFiber)try{sl=Uo.inject(Ux),Yt=Uo}catch{}}ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fx;ct.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jd(t))throw Error(A(200));return $x(e,t,null,r)};ct.createRoot=function(e,t){if(!Jd(e))throw Error(A(299));var r=!1,n="",s=_v;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Kd(e,1,!1,null,null,r,!1,n,s),e[pr]=t.current,Ui(e.nodeType===8?e.parentNode:e),new Qd(t)};ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=Vm(t),e=e===null?null:e.stateNode,e};ct.flushSync=function(e){return In(e)};ct.hydrate=function(e,t,r){if(!vl(t))throw Error(A(200));return yl(null,e,t,!0,r)};ct.hydrateRoot=function(e,t,r){if(!Jd(e))throw Error(A(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=_v;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Sv(t,null,e,1,r??null,s,!1,i,o),e[pr]=t.current,Ui(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 gl(t)};ct.render=function(e,t,r){if(!vl(t))throw Error(A(200));return yl(null,e,t,!1,r)};ct.unmountComponentAtNode=function(e){if(!vl(e))throw Error(A(40));return e._reactRootContainer?(In(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[pr]=null})}),!0):!1};ct.unstable_batchedUpdates=Hd;ct.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!vl(r))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return yl(e,t,r,!1,n)};ct.version="18.3.1-next-f1338f8080-20240426";function Ev(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ev)}catch(e){console.error(e)}}Ev(),Em.exports=ct;var mo=Em.exports;const kv=hm(mo);
40var Cv,Df=mo;Cv=Df.createRoot,Df.hydrateRoot;const Bx=1,zx=1e6;let mu=0;function Hx(){return mu=(mu+1)%Number.MAX_SAFE_INTEGER,mu.toString()}const gu=new Map,Mf=e=>{if(gu.has(e))return;const t=setTimeout(()=>{gu.delete(e),Ri({type:"REMOVE_TOAST",toastId:e})},zx);gu.set(e,t)},Wx=(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?Mf(r):e.toasts.forEach(n=>{Mf(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ma=[];let ga={toasts:[]};function Ri(e){ga=Wx(ga,e),ma.forEach(t=>{t(ga)})}function Vx({...e}){const t=Hx(),r=s=>Ri({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Ri({type:"DISMISS_TOAST",toastId:t});return Ri({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Tv(){const[e,t]=b.useState(ga);return b.useEffect(()=>(ma.push(t),()=>{const r=ma.indexOf(t);r>-1&&ma.splice(r,1)}),[e]),{...e,toast:Vx,dismiss:r=>Ri({type:"DISMISS_TOAST",toastId:r})}}function he(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 Ff(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rv(...e){return t=>{let r=!1;const n=e.map(s=>{const i=Ff(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():Ff(e[s],null)}}}}function We(...e){return b.useCallback(Rv(...e),e)}function qx(e,t){const r=b.createContext(t),n=i=>{const{children:o,...a}=i,l=b.useMemo(()=>a,Object.values(a));return S.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 go(e,t=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const u=d=>{var g;const{scope:f,children:h,...y}=d,p=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,w=b.useMemo(()=>y,Object.values(y));return S.jsx(p.Provider,{value:w,children:h})};u.displayName=i+"Provider";function c(d,f){var p;const h=((p=f==null?void 0:f[e])==null?void 0:p[l])||a,y=b.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,Kx(s,...t)]}function Kx(...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 Qi(e){const t=Qx(e),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(Yx);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 S.jsx(t,{...o,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return S.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var Gx=Qi("Slot");function Qx(e){const t=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=Zx(s),a=Xx(i,s.props);return s.type!==b.Fragment&&(a.ref=n?Rv(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 Pv=Symbol("radix.slottable");function Jx(e){const t=({children:r})=>S.jsx(S.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Pv,t}function Yx(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pv}function Xx(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}
vendor: 9,308 bytes, line 40
40:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function Zx(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 eS(e){const t=e+"CollectionProvider",[r,n]=go(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:w,children:g}=p,m=N.useRef(null),v=N.useRef(new Map).current;return S.jsx(s,{scope:w,itemMap:v,collectionRef:m,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=Qi(a),u=N.forwardRef((p,w)=>{const{scope:g,children:m}=p,v=i(a,g),x=We(w,v.collectionRef);return S.jsx(l,{ref:x,children:m})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Qi(c),h=N.forwardRef((p,w)=>{const{scope:g,children:m,...v}=p,x=N.useRef(null),_=We(w,x),E=i(c,g);return N.useEffect(()=>(E.itemMap.set(x,{ref:x,...v}),()=>void E.itemMap.delete(x))),S.jsx(f,{[d]:"",ref:_,children:m})});h.displayName=c;function y(p){const w=i(e+"CollectionConsumer",p);return N.useCallback(()=>{const m=w.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,k)=>v.indexOf(E.ref.current)-v.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,n]}var tS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=tS.reduce((e,t)=>{const r=Qi(`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),S.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Av(e,t){e&&mo.flushSync(()=>e.dispatchEvent(t))}function er(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 rS(e,t=globalThis==null?void 0:globalThis.document){const r=er(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 nS="DismissableLayer",Tc="dismissableLayer.update",sS="dismissableLayer.pointerDownOutside",iS="dismissableLayer.focusOutside",Uf,Ov=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wl=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=b.useContext(Ov),[c,d]=b.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),y=We(t,k=>d(k)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(w),m=c?p.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,x=m>=g,_=aS(k=>{const P=k.target,O=[...u.branches].some(j=>j.contains(P));!x||O||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),E=lS(k=>{const P=k.target;[...u.branches].some(j=>j.contains(P))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return rS(k=>{m===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),b.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Uf=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Bf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Uf)}},[c,f,r,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Bf())},[c,u]),b.useEffect(()=>{const k=()=>h({});return document.addEventListener(Tc,k),()=>document.removeEventListener(Tc,k)},[]),S.jsx(_e.div,{...l,ref:y,style:{pointerEvents:v?x?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,E.onFocusCapture),onBlurCapture:he(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,_.onPointerDownCapture)})});wl.displayName=nS;var oS="DismissableLayerBranch",Nv=b.forwardRef((e,t)=>{const r=b.useContext(Ov),n=b.useRef(null),s=We(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),S.jsx(_e.div,{...e,ref:s})});Nv.displayName=oS;function aS(e,t=globalThis==null?void 0:globalThis.document){const r=er(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){jv(sS,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 lS(e,t=globalThis==null?void 0:globalThis.document){const r=er(e),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&jv(iS,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 Bf(){const e=new CustomEvent(Tc);document.dispatchEvent(e)}function jv(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?Av(s,i):s.dispatchEvent(i)}var uS=wl,cS=Nv,vr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},dS="Portal",Yd=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=b.useState(!1);vr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?kv.createPortal(S.jsx(_e.div,{...n,ref:t}),o):null});Yd.displayName=dS;function hS(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var Qs=e=>{const{present:t,children:r}=e,n=fS(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=We(n.ref,pS(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};Qs.displayName="Presence";function fS(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=hS(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Bo(n.current);i.current=a==="mounted"?u:"none"},[a]),vr(()=>{const u=n.current,c=s.current;if(c!==e){const f=i.current,h=Bo(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]),vr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const p=Bo(n.current).includes(h.animationName);if(h.target===t&&p&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=h=>{h.target===t&&(i.current=Bo(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 Bo(e){return(e==null?void 0:e.animationName)||"none"}function pS(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 mS=od[" useInsertionEffect ".trim().toString()]||vr;function Iv({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=gS({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=vS(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 gS({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),i=b.useRef(t);return mS(()=>{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 vS(e){return typeof e=="function"}var yS=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"}),wS="VisuallyHidden",bl=b.forwardRef((e,t)=>
40S.jsx(_e.span,{...e,ref:t,style:{...yS,...e.style}}));bl.displayName=wS;var bS=bl,Xd="ToastProvider",[Zd,xS,SS]=eS("Toast"),[Lv,RA]=go("Toast",[SS]),[_S,xl]=Lv(Xd),$v=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 \`${Xd}\`. Expected non-empty \`string\`.`),S.jsx(Zd.Provider,{scope:t,children:S.jsx(_S,{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})})};$v.displayName=Xd;var Dv="ToastViewport",ES=["F8"],Rc="toast.viewportPause",Pc="toast.viewportResume",Mv=b.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=ES,label:s="Notifications ({hotkey})",...i}=e,o=xl(Dv,r),a=xS(r),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),f=We(t,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;b.useEffect(()=>{const w=g=>{var v;n.length!==0&&n.every(x=>g[x]||g.code===x)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),b.useEffect(()=>{const w=l.current,g=d.current;if(y&&w&&g){const m=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Rc);g.dispatchEvent(E),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Pc);g.dispatchEvent(E),o.isClosePausedRef.current=!1}},x=E=>{!w.contains(E.relatedTarget)&&v()},_=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",m),w.addEventListener("focusout",x),w.addEventListener("pointermove",m),w.addEventListener("pointerleave",_),window.addEventListener("blur",m),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",m),w.removeEventListener("focusout",x),w.removeEventListener("pointermove",m),w.removeEventListener("pointerleave",_),window.removeEventListener("blur",m),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const p=b.useCallback(({tabbingDirection:w})=>{const m=a().map(v=>{const x=v.ref.current,_=[x,...DS(x)];return w==="forwards"?_:_.reverse()});return(w==="forwards"?m.reverse():m).flat()},[a]);return b.useEffect(()=>{const w=d.current;if(w){const g=m=>{var _,E,k;const v=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!v){const P=document.activeElement,O=m.shiftKey;if(m.target===w&&O){(_=u.current)==null||_.focus();return}const D=p({tabbingDirection:O?"backwards":"forwards"}),Q=D.findIndex(I=>I===P);vu(D.slice(Q+1))?m.preventDefault():O?(E=u.current)==null||E.focus():(k=c.current)==null||k.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,p]),S.jsxs(cS,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&S.jsx(Ac,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});vu(w)}}),S.jsx(Zd.Slot,{scope:r,children:S.jsx(_e.ol,{tabIndex:-1,...i,ref:f})}),y&&S.jsx(Ac,{ref:c,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});vu(w)}})]})});Mv.displayName=Dv;var Fv="ToastFocusProxy",Ac=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=xl(Fv,r);return S.jsx(bl,{"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()}})});Ac.displayName=Fv;var vo="Toast",kS="toast.swipeStart",CS="toast.swipeMove",TS="toast.swipeCancel",RS="toast.swipeEnd",Uv=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Iv({prop:n,defaultProp:s??!0,onChange:i,caller:vo});return S.jsx(Qs,{present:r||a,children:S.jsx(OS,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:er(e.onPause),onResume:er(e.onResume),onSwipeStart:he(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(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:he(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:he(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)})})})});Uv.displayName=vo;var[PS,AS]=Lv(vo,{onClose(){}}),OS=b.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=e,p=xl(vo,r),[w,g]=b.useState(null),m=We(t,I=>g(I)),v=b.useRef(null),x=b.useRef(null),_=s||p.duration,E=b.useRef(0),k=b.useRef(_),P=b.useRef(0),{onToastAdd:O,onToastRemove:j}=p,z=er(()=>{var X;(w==null?void 0:w.contains(document.activeElement))&&((X=p.viewport)==null||X.focus()),o()}),D=b.useCallback(I=>{!I||I===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(z,I))},[z]);b.useEffect(()=>{const I=p.viewport;if(I){const X=()=>{D(k.current),u==null||u()},H=()=>{const q=new Date().getTime()-E.current;k.current=k.current-q,window.clearTimeout(P.current),l==null||l()};return I.addEventListener(Rc,H),I.addEventListener(Pc,X),()=>{I.removeEventListener(Rc,H),I.removeEventListener(Pc,X)}}},[p.viewport,_,l,u,D]),b.useEffect(()=>{i&&!p.isClosePausedRef.current&&D(_)},[i,_,p.isClosePausedRef,D]),b.useEffect(()=>(O(),()=>j()),[O,j]);const Q=b.useMemo(()=>w?Kv(w):null,[w]);return p.viewport?S.jsxs(S.Fragment,{children:[Q&&S.jsx(NS,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),S.jsx(PS,{scope:r,onClose:z,children:mo.createPortal(S.jsx(Zd.ItemSlot,{scope:r,children:S.jsx(uS,{asChild:!0,onEscapeKeyDown:he(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||z(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:S.jsx(_e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:he(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:he(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:he(e.onPointerMove,I=>{if(!v.current)return;const X=I.clientX-v.current.x,H=I.clientY-v.current.y,q=!!x.current,T=["left","right"].includes(p.swipeDirection),R=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,L=T?R(0,X):0,K=T?0:R(0,H),U=I.pointerType==="touch"?10:2,J={x:L,y:K},Z={originalEvent:I,delta:J};q?(x.current=J,zo(CS,d,Z,{discrete:!1})):zf(J,p.swipeDirection,U)?(x.current=J,zo(kS,c,Z,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(X)>U||Math.abs(H)>U)&&(v.current=null)}),onPointerUp:he(e.onPointerUp,I=>{const X=x.current,H=I.target;if(H.hasPointerCapture(I.pointerId)&&H.releasePointerCapture(I.pointerId),x.current=null,v.current=null,X){const q=I.currentTarget,T={originalEvent:I,delta:X};zf(X,p.swipeDirection,p.swipeThreshold)?zo(RS,h,T,{discrete:!0}):zo(TS,f,T,{discrete:!0}),q.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),NS=e=>{const{__scopeToast:t,children:r,...n}=e,s=xl(vo,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return LS(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:S.jsx(Yd,{asChild:!0,children:S.jsx(bl,{...n,children:i&&S.jsxs(S.Fragment,{children:[s.label," ",r]})})})},jS="ToastTitle",Bv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return S.jsx(_e.div,{...n,ref:t})});Bv.displayName=jS;var IS="ToastDescription",zv=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return S.jsx(_e.div,{...n,ref:t})});zv.displayName=IS;var Hv="ToastAction",Wv=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?S.jsx(qv,{altText:r,asChild:!0,children:S.jsx(eh,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hv}\`. Expected non-empty \`string\`.`),null)});Wv.displayName=Hv;var Vv="ToastClose",eh=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=AS(Vv,r);return S.jsx(qv,{asChild:!0,children:S.jsx(_e.button,{type:"button",...n,ref:t,onClick:he(e.onClick,s.onClose)})})});eh.displayName=Vv;var qv=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return S.jsx(_e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function Kv(e){const t=[];
vendor: 3,823 bytes, lines 40-60
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),$S(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(...Kv(n))}}),t}function zo(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?Av(s,i):s.dispatchEvent(i)}var zf=(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 LS(e=()=>{}){const t=er(e);vr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function $S(e){return e.nodeType===e.ELEMENT_NODE}function DS(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 MS=$v,Gv=Mv,Qv=Uv,Jv=Bv,Yv=zv,Xv=Wv,Zv=eh;function ey(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=ey(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ty(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ey(e))&&(n&&(n+=" "),n+=t);return n}const Hf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wf=ty,th=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Wf(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=Hf(c)||Hf(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(y=>{let[p,w]=y;return Array.isArray(w)?w.includes({...i,...a}[p]):{...i,...a}[p]===w})?[...u,d,f]:u},[]);return Wf(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const FS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ry=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var US={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const BS=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,...US,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ry("lucide",s),...a},[...o.map(([u,c])=>b.createElement(u,c)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Mt=(e,t)=>
60{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(BS,{ref:i,iconNode:t,className:ry(`lucide-${FS(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const zS=Mt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const HS=Mt("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const WS=Mt("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const VS=Mt("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const ny=Mt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const qS=Mt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const KS=Mt("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const GS=Mt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const QS=Mt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const JS=Mt("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"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const sy=Mt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 115
115],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rh="-",YS=e=>{const t=ZS(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(rh);return a[0]===""&&a.length!==1&&a.shift(),iy(a,t)||XS(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},iy=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?iy(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(rh);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Vf=/^\[(.+)\]$/,XS=e=>{if(Vf.test(e)){const t=Vf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ZS=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return t_(Object.entries(e.classGroups),r).forEach(([i,o])=>{Oc(o,n,i,t)}),n},Oc=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:qf(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(e_(s)){Oc(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Oc(o,qf(t,i),r,n)})})},qf=(e,t)=>{let r=e;return t.split(rh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},e_=e=>e.isThemeGetter,t_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,r_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},oy="!",n_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(n||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(g==="/"){d=w;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(oy),y=h?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:p}};return r?a=>r({className:a,parseClassName:o}):o},s_=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},i_=e=>({cache:r_(e.cacheSize),parseClassName:n_(e),...YS(e)}),o_=/\s+/,a_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(o_);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let y=!!h,p=n(y?f.substring(0,h):f);if(!p){if(!y){a=u+(a.length>0?" "+a:a);continue}if(p=n(f),!p){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=s_(c).join(":"),g=d?w+oy:w,m=g+p;if(i.includes(m))continue;i.push(m);const v=s(p,y);for(let x=0;x<v.length;++x){const _=v[x];i.push(g+_)}a=u+(a.length>0?" "+a:a)}return a};function l_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ay(t))&&(n&&(n+=" "),n+=r);return n}const ay=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ay(e[n]))&&(r&&(r+=" "),r+=t);return r};function u_(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return r=i_(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=a_(l,r);return s(l,c),c}return function(){return i(l_.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ly=/^\[(?:([a-z-]+):)?(.+)\]$/i,c_=/^\d+\/\d+$/,d_=new Set(["px","full","screen"]),h_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,f_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,m_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Es(e)||d_.has(e)||c_.test(e),Pr=e=>Js(e,"length",E_),Es=e=>!!e&&!Number.isNaN(Number(e)),yu=e=>Js(e,"number",Es),ci=e=>!!e&&Number.isInteger(Number(e)),v_=e=>e.endsWith("%")&&Es(e.slice(0,-1)),G=e=>ly.test(e),Ar=e=>h_.test(e),y_=new Set(["length","size","percentage"]),w_=e=>Js(e,y_,uy),b_=e=>Js(e,"position",uy),x_=new Set(["image","url"]),S_=e=>Js(e,x_,C_),__=e=>Js(e,"",k_),di=()=>!0,Js=(e,t,r)=>{const n=ly.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},E_=e=>f_.test(e)&&!p_.test(e),uy=()=>!1,k_=e=>m_.test(e),C_=e=>g_.test(e),T_=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),s=ae("borderColor"),i=ae("borderRadius"),o=ae("borderSpacing"),a=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),c=ae("hueRotate"),d=ae("invert"),f=ae("gap"),h=ae("gradientColorStops"),y=ae("gradientColorStopPositions"),p=ae("inset"),w=ae("margin"),g=ae("opacity"),m=ae("padding"),v=ae("saturate"),x=ae("scale"),_=ae("sepia"),E=ae("skew"),k=ae("space"),P=ae("translate"),O=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",G,t],D=()=>[G,t],Q=()=>["",nr,Pr],I=()=>["auto",Es,G],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",G],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[Es,G];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[nr,Pr],blur:["none","",Ar,G],brightness:K(),borderColor:[e],borderRadius:["none","","full",Ar,G],borderSpacing:D(),borderWidth:Q(),contrast:K(),grayscale:R(),hueRotate:K(),invert:R(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[v_,Pr],inset:z(),margin:z(),opacity:K(),padding:D(),saturate:K(),scale:K(),sepia:R(),skew:K(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[Ar]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),G]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ci,G]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",ci,G]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",ci,G]},G]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[ci,G]},G]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[Ar]},Ar]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ar,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yu]}],"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",G]}],"line-clamp":[{"line-clamp":["none",Es,yu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nr,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nr,Pr]}],"underline-offset":[{"underline-offset":["auto",nr,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),b_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",w_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},S_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}
vendor: 5,172 bytes, line 115
115],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:H()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[nr,G]}],"outline-w":[{outline:[nr,Pr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[nr,Pr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ar,__]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ar,G]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"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":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[ci,G]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",G]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 115
115],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nr,Pr,yu]}],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"]}}},R_=u_(T_);function Ke(...e){return R_(ty(e))}const P_=MS,cy=b.forwardRef(({className:e,...t},r)=>S.jsx(Gv,{ref:r,className:Ke("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}));cy.displayName=Gv.displayName;const A_=th("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"}}),dy=b.forwardRef(({className:e,variant:t,...r},n)=>S.jsx(Qv,{ref:n,className:Ke(A_({variant:t}),e),...r}));dy.displayName=Qv.displayName;const O_=b.forwardRef(({className:e,...t},r)=>S.jsx(Xv,{ref:r,className:Ke("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}));O_.displayName=Xv.displayName;const hy=b.forwardRef(({className:e,...t},r)=>S.jsx(Zv,{ref:r,className:Ke("absolute right-2 top-2 rounded-md p-1 text-foreground
115/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:S.jsx(sy,{className:"h-4 w-4"})}));hy.displayName=Zv.displayName;const fy=b.forwardRef(({className:e,...t},r)=>S.jsx(Jv,{ref:r,className:Ke("text-sm font-semibold",e),...t}));fy.displayName=Jv.displayName;const py=b.forwardRef(({className:e,...t},r)=>S.jsx(Yv,{ref:r,className:Ke("text-sm opacity-90",e),...t}));py.displayName=Yv.displayName;function N_(){const{toasts:e}=Tv();return S.jsxs(P_,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return S.jsxs(dy,{...i,children:[S.jsxs("div",{className:"grid gap-1",children:[r&&S.jsx(fy,{children:r}),n&&S.jsx(py,{children:n})]}),s,S.jsx(hy,{})]},t)}),S.jsx(cy,{})]})}var Kf=["light","dark"],j_="(prefers-color-scheme: dark)",I_=b.createContext(void 0),L_={setTheme:e=>{},themes:[]},$_=()=>{var e;return(e=b.useContext(I_))!=null?e:L_};b.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?Kf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,p=!1,w=!0)=>{let g=o?o[y]:y,m=p?y+"|| ''":`'${g}'`,v="";return s&&w&&!p&&Kf.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),r==="class"?p||g?v+=`c.add(${m})`:v+="null":g&&(v+=`d[s](n,${m})`),v},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${j_}',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 D_=e=>{switch(e){case"success":return U_;case"info":return z_;case"warning":return B_;case"error":return H_;default:return null}},M_=Array(12).fill(0),F_=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},M_.map((r,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),U_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),B_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),H_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),W_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),V_=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Nc=1,q_=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 115
115{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:Nc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
115this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],N.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(G_(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)||Nc++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Qe=new q_,K_=(e,t)=>{let r=(t==null?void 0:t.id)||Nc++;return Qe.addToast({title:e,...t,id:r}),r},G_=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Q_=K_,J_=()=>Qe.toasts,Y_=()=>Qe.getActiveToasts();Object.assign(Q_,{success:Qe.success,info:Qe.info,warning:Qe.warning,error:Qe.error,custom:Qe.custom,message:Qe.message,promise:Qe.promise,dismiss:Qe.dismiss,loading:Qe.loading},{getHistory:J_,getToasts:Y_});function X_(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))}X_(`: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;
115left: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}
115: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%);
115--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%)}
116`);function Ho(e){return e.label!==void 0}var Z_=3,e1="32px",t1="16px",Gf=4e3,r1=356,n1=14,s1=20,i1=200;function Et(...e){return e.filter(Boolean).join(" ")}function o1(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var a1=e=>{var t,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:y,interacting:p,setHeights:w,visibleToasts:g,heights:m,index:v,toasts:x,expanded:_,removeToast:E,defaultRichColors:k,closeButton:P,style:O,cancelButtonStyle:j,actionButtonStyle:z,className:D="",descriptionClassName:Q="",duration:I,position:X,gap:H,loadingIcon:q,expandByDefault:T,classNames:R,icons:L,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:U}=e,[J,Z]=N.useState(null),[be,je]=N.useState(null),[re,Fn]=N.useState(!1),[Sr,un]=N.useState(!1),[_r,Un]=N.useState(!1),[Er,bo]=N.useState(!1),[Ml,xo]=N.useState(!1),[Fl,ei]=N.useState(0),[Bn,xh]=N.useState(0),ti=N.useRef(h.duration||I||Gf),Sh=N.useRef(null),cn=N.useRef(null),ow=v
vendor: 1,665 bytes, line 116
116===0,aw=v+1<=g,ht=h.type,zn=h.dismissible!==!1,lw=h.className||"",uw=h.descriptionClassName||"",So=N.useMemo(()=>m.findIndex(W=>W.toastId===h.id)||0,[m,h.id]),cw=N.useMemo(()=>{var W;return(W=h.closeButton)!=null?W:P},[h.closeButton,P]),_h=N.useMemo(()=>h.duration||I||Gf,[h.duration,I]),Ul=N.useRef(0),Hn=N.useRef(0),Eh=N.useRef(0),Wn=N.useRef(null),[dw,hw]=X.split("-"),kh=N.useMemo(()=>m.reduce((W,se,ce)=>ce>=So?W:W+se.height,0),[m,So]),Ch=V_(),fw=h.invert||f,Bl=ht==="loading";Hn.current=N.useMemo(()=>So*H+kh,[So,kh]),N.useEffect(()=>{ti.current=_h},[_h]),N.useEffect(()=>{Fn(!0)},[]),N.useEffect(()=>{let W=cn.current;if(W){let se=W.getBoundingClientRect().height;return xh(se),w(ce=>[{toastId:h.id,height:se,position:h.position},...ce]),()=>w(ce=>ce.filter(bt=>bt.toastId!==h.id))}},[w,h.id]),N.useLayoutEffect(()=>{if(!re)return;let W=cn.current,se=W.style.height;W.style.height="auto";let ce=W.getBoundingClientRect().height;W.style.height=se,xh(ce),w(bt=>bt.find(xt=>xt.toastId===h.id)?bt.map(xt=>xt.toastId===h.id?{...xt,height:ce}:xt):[{toastId:h.id,height:ce,position:h.position},...bt])},[re,h.title,h.description,w,h.id]);let kr=N.useCallback(()=>{un(!0),ei(Hn.current),w(W=>W.filter(se=>se.toastId!==h.id)),setTimeout(()=>{E(h)},i1)},[h,E,w,Hn]);N.useEffect(()=>{if(h.promise&&ht==="loading"||h.duration===1/0||h.type==="loading")return;let W;return _||p||U&&Ch?(()=>{if(Eh.current<Ul.current){let se=new Date().getTime()-Ul.current;ti.current=ti.current-se}Eh.current=new Date().getTime()})():ti.current!==1/0&&(Ul.current=new Date().getTime(),W=setTimeout(()=>{var se;(se=h.onAutoClose)==null||se.call(h,h),kr()},ti.current)),()=>clearTimeout(W)}
116,[_,p,h,ht,U,Ch,kr]),N.useEffect(()=>{h.delete&&kr()},[kr,h.delete]);function pw(){var W,se,ce;return L!=null&&L.loading?N.createElement("div",{className:Et(R==null?void 0:R.loader,(W=h==null?void 0:h.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":ht==="loading"},L.loading):q?N.createElement("div",{className:Et(R==null?void 0:R.loader,(se=h==null?void 0:h.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":ht==="loading"},q):N.createElement(F_,{className:Et(R==null?void 0:R.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader),visible:ht==="loading"})}return N.createElement("li",{tabIndex:0,ref:cn,className:Et(D,lw,R==null?void 0:R.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[ht],(r=h==null?void 0:h.classNames)==null?void 0:r[ht]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:k,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":re,"data-promise":!!h.promise,"data-swiped":Ml,"data-removed":Sr,"data-visible":aw,"data-y-position":dw,"data-x-position":hw,"data-index":v,"data-front":ow,"data-swiping":_r,"data-dismissible":zn,"data-type":ht,"data-invert":fw,"data-swipe-out":Er,"data-swipe-direction":be,"data-expanded":!!(_||T&&re),style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${Sr?Fl:Hn.current}px`,"--initial-height":T?"auto":`${Bn}px`,...O,...h.style},onDragEnd:()=>{Un(!1),Z(null),Wn.current=null},onPointerDown:W=>{Bl||!zn||(Sh.current=new Date,ei(Hn.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(Un(!0),Wn.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,se,ce,bt;if(Er||!zn)return;Wn.current=null;let xt=Number(((W=cn.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Cr=Number(((se=cn.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-((ce=Sh.current)==null?void 0:ce.getTime()),St=J==="x"?xt:Cr,Tr=Math.abs(St)/dn;if(Math.abs(St)>=s1||Tr>.11){ei(Hn.current),(bt=h.onDismiss)==null||bt.call(h,h),je(J==="x"?xt>0?"right":"left":Cr>0?"down":"up"),kr(),bo(!0),xo(!1);return}Un(!1),Z(null)},onPointerMove:W=>{var se,ce,bt,xt;if(!Wn.current||!zn||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;let Cr=W.clientY-Wn.current.y,dn=W.clientX-Wn.current.x,St=(ce=e.swipeDirections)!=null?ce:o1(X);!J&&(Math.abs(dn)>1||Math.abs(Cr)>1)&&Z(Math.abs(dn)>Math.abs(Cr)?"x":"y");let Tr={x:0,y:0};J==="y"?(St.includes("top")||St.includes("bottom"))&&(St.includes("top")&&Cr<0||St.includes("bottom")&&Cr>0)&&(Tr.y=Cr):J==="x"&&(St.includes("left")||St.includes("right"))&&(St.includes("left")&&dn<0||St.includes("right")&&dn>0)&&(Tr.x=dn),(Math.abs(Tr.x)>0||Math.abs(Tr.y)>0)&&xo(!0),(bt=cn.current)==null||bt.style.setProperty("--swipe-amount-x",`${Tr.x}px`),(xt=cn.current)==null||xt.style.setProperty("--swipe-amount-y",`${Tr.y}px`)}},cw&&!h.jsx?N.createElement("button",{"aria-label":K,"data-disabled":Bl,"data-close-button":!0,onClick:Bl||!zn?()=>{}:()=>{var W;kr(),(W=h.onDismiss)==null||W.call(h,h)},className:Et(R==null?void 0:R.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=L==null?void 0:L.close)!=null?i:W_):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:N.createElement(N.Fragment,null,ht||h.icon||h.promise?N.createElement("div",{"data-icon":"",className:Et(R==null?void 0:R.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||pw():null,h.type!=="loading"?h.icon||(L==null?void 0:L[ht])||D_(ht):null):null,N.createElement("div",{"data-content":"",className:Et(R==null?void 0:R.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:Et(R==null?void 0:R.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?N.createElement("div",{"data-description":"",className:Et(Q,uw,R==null?void 0:R.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&&Ho(h.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:W=>{var se,ce;Ho(h.cancel)&&zn&&((ce=(se=h.cancel).onClick)==null||ce.call(se,W),kr())},className:Et(R==null?void 0:R.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&&Ho(h.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:W=>{var se,ce;Ho(h.action)&&((ce=(se=h.action).onClick)==null||ce.call(se,W),!W.defaultPrevented&&kr())},className:Et(R==null?void 0:R.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 l1(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?t1:e1;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 u1=b.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:y=Z_,toastOptions:p,dir:w=Qf(),gap:g=n1,loadingIcon:m,icons:v,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:_}=e,[E,k]=N.useState([]),P=N.useMemo(()=>Array.from(new Set([n].concat(E.filter(U=>U.position).map(U=>U.position)))),[E,n]),[O,j]=N.useState([]),[z,D]=N.useState(!1),[Q,I]=N.useState(!1),[X,H]=N.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
116k":"light"),q=N.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=N.useRef(null),L=N.useRef(!1),K=N.useCallback(U=>{k(J=>{var Z;return(Z=J.find(be=>be.id===U.id))!=null&&Z.delete||Qe.dismiss(U.id),J.filter(({id:be})=>be!==U.id)})},[]);return N.useEffect(()=>Qe.subscribe(U=>{if(U.dismiss){k(J=>J.map(Z=>Z.id===U.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{kv.flushSync(()=>{k(J=>{let Z=J.findIndex(be=>be.id===U.id);return Z!==-1?[...J.slice(0,Z),{...J[Z],...U},...J.slice(Z+1)]:[U,...J]})})})}),[]),N.useEffect(()=>{if(c!=="system"){H(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:J})=>{H(J?"dark":"light")})}catch{U.addListener(({matches:Z})=>{try{H(Z?"dark":"light")}catch(be){console.error(be)}})}},[c]),N.useEffect(()=>{E.length<=1&&D(!1)},[E]),N.useEffect(()=>{let U=J=>{var Z,be;s.every(je=>J[je]||J.code===je)&&(D(!0),(Z=q.current)==null||Z.focus()),J.code==="Escape"&&(document.activeElement===q.current||(be=q.current)!=null&&be.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),N.useEffect(()=>{if(q.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,L.current=!1)}},[q.current]),N.createElement("section",{ref:t,"aria-label":`${x} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((U,J)=>{var Z;let[be,je]=U.split("-");return E.length?N.createElement("ol",{key:U,dir:w==="auto"?Qf():w,tabIndex:-1,ref:q,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":be,"data-lifted":z&&E.length>1&&!i,"data-x-position":je,style:{"--front-toast-height":`${((Z=O[0])==null?void 0:Z.height)||0}px`,"--width":`${r1}px`,"--gap":`${g}px`,...h,...l1(l,u)},onBlur:re=>{L.current&&!re.currentTarget.contains(re.relatedTarget)&&(L.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L.current||(L.current=!0,R.current=re.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Q||D(!1)},onDragEnd:()=>D(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},E.filter(re=>!re.position&&J===0||re.position===U).map((re,Fn)=>{var Sr,un;return N.createElement(a1,{key:re.id,icons:v,index:Fn,toast:re,defaultRichColors:d,duration:(Sr=p==null?void 0:p.duration)!=null?Sr:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:y,closeButton:(un=p==null?void 0:p.closeButton)!=null?un:o,interacting:Q,position:U,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:K,toasts:E.filter(_r=>_r.position==re.position),heights:O.filter(_r=>_r.position==re.position),setHeights:j,expandByDefault:i,gap:g,loadingIcon:m,expanded:z,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const c1=({...e})=>{const{theme:t="system"}=$_();return S.jsx(u1,{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})};var d1=od[" useId ".trim().toString()]||(()=>{}),h1=0;function wu(e){const[t,r]=b.useState(d1());return vr(()=>{e||r(n=>n??String(h1++))},[e]),e||(t?`radix-${t}`:"")}const f1=["top","right","bottom","left"],nn=Math.min,st=Math.max,Va=Math.round,Wo=Math.floor,Zt=e=>({x:e,y:e}
vendor: 11,921 bytes, line 116
116),p1={left:"right",right:"left",bottom:"top",top:"bottom"},m1={start:"end",end:"start"};function jc(e,t,r){return st(e,nn(t,r))}function yr(e,t){return typeof e=="function"?e(t):e}function wr(e){return e.split("-")[0]}function Ys(e){return e.split("-")[1]}function nh(e){return e==="x"?"y":"x"}function sh(e){return e==="y"?"height":"width"}const g1=new Set(["top","bottom"]);function Jt(e){return g1.has(wr(e))?"y":"x"}function ih(e){return nh(Jt(e))}function v1(e,t,r){r===void 0&&(r=!1);const n=Ys(e),s=ih(e),i=sh(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=qa(o)),[o,qa(o)]}function y1(e){const t=qa(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>m1[t])}const Jf=["left","right"],Yf=["right","left"],w1=["top","bottom"],b1=["bottom","top"];function x1(e,t,r){switch(e){case"top":case"bottom":return r?t?Yf:Jf:t?Jf:Yf;case"left":case"right":return t?w1:b1;default:return[]}}function S1(e,t,r,n){const s=Ys(e);let i=x1(wr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Ic)))),i}function qa(e){return e.replace(/left|right|bottom|top/g,t=>p1[t])}function _1(e){return{top:0,right:0,bottom:0,left:0,...e}}function my(e){return typeof e!="number"?_1(e):{top:e,right:e,bottom:e,left:e}}function Ka(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 Xf(e,t,r){let{reference:n,floating:s}=e;const i=Jt(t),o=ih(t),a=sh(o),l=wr(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(Ys(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const E1=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}=Xf(u,n,l),f=n,h={},y=0;for(let p=0;p<a.length;p++){const{name:w,fn:g}=a[p],{x:m,y:v,data:x,reset:_}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=m??c,d=v??d,h={...h,[w]:{...h[w],...x}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:c,y:d}=Xf(u,f,l)),p=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function Ji(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}=yr(t,e),y=my(h),w=a[f?d==="floating"?"reference":"floating":d],g=Ka(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),m=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},_=Ka(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-_.top+y.top)/x.y,bottom:(_.bottom-g.bottom+y.bottom)/x.y,left:(g.left-_.left+y.left)/x.x,right:(_.right-g.right+y.right)/x.x}}const k1=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}=yr(e,t)||{};if(u==null)return{};const d=my(c),f={x:r,y:n},h=ih(s),y=sh(h),p=await o.getDimensions(u),w=h==="y",g=w?"top":"left",m=w?"bottom":"right",v=w?"clientHeight":"clientWidth",x=i.reference[y]+i.reference[h]-f[h]-i.floating[y],_=f[h]-i.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=E?E[v]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=a.floating[v]||i.floating[y]);const P=x/2-_/2,O=k/2-p[y]/2-1,j=nn(d[g],O),z=nn(d[m],O),D=j,Q=k-p[y]-z,I=k/2-p[y]/2+P,X=jc(D,I,Q),H=!l.arrow&&Ys(s)!=null&&I!==X&&i.reference[y]/2-(I<D?j:z)-p[y]/2<0,q=H?I<D?I-D:I-Q:0;return{[h]:f[h]+q,data:{[h]:X,centerOffset:I-X-q,...H&&{alignmentOffset:q}},reset:H}}}),C1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...w}=yr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=wr(s),m=Jt(a),v=wr(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(v||!p?[qa(a)]:y1(a)),E=y!=="none";!f&&E&&_.push(...S1(a,p,y,x));const k=[a,..._],P=await Ji(t,w),O=[];let j=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&O.push(P[g]),d){const I=v1(s,o,x);O.push(P[I[0]],P[I[1]])}if(j=[...j,{placement:s,overflows:O}],!O.every(I=>I<=0)){var z,D;const I=(((z=i.flip)==null?void 0:z.index)||0)+1,X=k[I];if(X&&(!(d==="alignment"?m!==Jt(X):!1)||j.every(T=>T.overflows[0]>0&&Jt(T.placement)===m)))return{data:{index:I,overflows:j},reset:{placement:X}};let H=(D=j.filter(q=>q.overflows[0]<=0).sort((q,T)=>q.overflows[1]-T.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(h){case"bestFit":{var Q;const q=(Q=j.filter(T=>{if(E){const R=Jt(T.placement);return R===m||R==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:Q[0];q&&(H=q);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function Zf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ep(e){return f1.some(t=>e[t]>=0)}const T1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=yr(e,t);switch(n){case"referenceHidden":{const i=await Ji(t,{...s,elementContext:"reference"}),o=Zf(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ep(o)}}}case"escaped":{const i=await Ji(t,{...s,altBoundary:!0}),o=Zf(i,r.floating);return{data:{escapedOffsets:o,escaped:ep(o)}}}default:return{}}}}},gy=new Set(["left","top"]);async function R1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=wr(r),a=Ys(r),l=Jt(r)==="y",u=gy.has(o)?-1:1,c=i&&l?-1:1,d=yr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const P1=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 R1(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}}}}},A1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:g,y:m}=w;return{x:g,y:m}}},...l}=yr(e,t),u={x:r,y:n},c=await Ji(t,l),d=Jt(wr(s)),f=nh(d);let h=u[f],y=u[d];if(i){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=h+c[w],v=h-c[g];h=jc(m,h,v)}if(o){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",m=y+c[w],v=y-c[g];y=jc(m,y,v)}const p=a.fn({...t,[f]:h,[d]:y});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:i,[d]:o}}}}}},O1=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}=yr(e,t),c={x:r,y:n},d=Jt(s),f=nh(d);let h=c[f],y=c[d];const p=yr(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const v=f==="y"?"height":"width",x=i.reference[f]-i.floating[v]+w.mainAxis,_=i.reference[f]+i.reference[v]-w.mainAxis;h<x?h=x:h>_&&(h=_)}if(u){var g,m;const v=f==="y"?"width":"height",x=gy.has(wr(s)),_=i.reference[d]-i.floating[v]+(x&&((g=o.offset)==null?void 0:g[d])||0)+(x?0:w.crossAxis),E=i.reference[d]+i.reference[v]+(x?0:((m=o.offset)==null?void 0:m[d])||0)-(x?w.crossAxis:0);y<_?y=_:y>E&&(y=E)}return{[f]:h,[d]:y}}}},N1=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}=yr(e,t),c=await Ji(t,u),d=wr(s),f=Ys(s),h=Jt(s)==="y",{width:y,height:p}=i.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,w=f==="end"?"top":"bottom");const m=p-c.top-c.bottom,v=y-c.left-c.right,x=nn(p-c[w],m),_=nn(y-c[g],v),E=!t.middlewareData.shift;let k=x,P=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=m),E&&!f){const j=st(c.left,0),z=st(c.right,0),D=st(c.top,0),Q=st(c.bottom,0);h?P=y-2*(j!==0||z!==0?j+z:st(c.left,c.right)):k=p-2*(D!==0||Q!==0?D+Q:st(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:k});const O=await o.getDimensions(a.floating);return y!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function Sl(){return typeof window<"u"}function Xs(e){return vy(e)?(e.nodeName||"").toLowerCase():"#document"}function lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rr(e){var t;return(t=(vy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vy(e){return Sl()?e instanceof Node||e instanceof lt(e).Node:!1}function $t(e){return Sl()?e instanceof Element||e instanceof lt(e).Element:!1}function tr(e){return Sl()?e instanceof HTMLElement||e instanceof lt(e).HTMLElement:!1}function tp(e){return!Sl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot}const j1=new Set(["inline","contents"]);function yo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!j1.has(s)}const I1=new Set(["table","td","th"]);function L1(e){return I1.has(Xs(e))}const $1=[":popover-open",":modal"];function _l(e){return $1.some(t=>{try{return e.matches(t)}catch{return!1}})}const D1=["transform","translate","scale","rotate","perspective"],M1=["transform","translate","scale","rotate","perspective","filter"],F1=["paint","layout","strict","content"];function oh(e){const t=ah(),r=$t(e)?Dt(e):e;return D1.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)||M1.some(n=>(r.willChange||"").includes(n))||F1.some(n=>(r.contain||"").includes(n))}function U1(e){let t=sn(e);for(;tr(t)&&!Ws(t);){if(oh(t))return t;if(_l(t))return null;t=sn(t)}return null}function ah(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const B1=new Set(["html","body","#document"]);function Ws(e){return B1.has(Xs(e))}function Dt(e){return lt(e).getComputedStyle(e)}function El(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sn(e){if(Xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tp(e)&&e.host||rr(e);return tp(t)?t.host:t}function yy(e){const t=sn(e);return Ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:tr(t)&&yo(t)?t:yy(t)}function Yi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=yy(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=lt(s);if(i){const a=Lc(o);
vendor: 5,412 bytes, line 116
116return t.concat(o,o.visualViewport||[],yo(s)?s:[],a&&r?Yi(a):[])}return t.concat(s,Yi(s,[],r))}function Lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wy(e){const t=Dt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=tr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Va(r)!==i||Va(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function lh(e){return $t(e)?e:e.contextElement}function ks(e){const t=lh(e);if(!tr(t))return Zt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=wy(t);let o=(i?Va(r.width):r.width)/n,a=(i?Va(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const z1=Zt(0);function by(e){const t=lt(e);return!ah()||!t.visualViewport?z1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==lt(e)?!1:t}function Ln(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=lh(e);let o=Zt(1);t&&(n?$t(n)&&(o=ks(n)):o=ks(e));const a=H1(i,r,n)?by(i):Zt(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=lt(i),h=n&&$t(n)?lt(n):n;let y=f,p=Lc(y);for(;p&&n&&h!==y;){const w=ks(p),g=p.getBoundingClientRect(),m=Dt(p),v=g.left+(p.clientLeft+parseFloat(m.paddingLeft))*w.x,x=g.top+(p.clientTop+parseFloat(m.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=v,u+=x,y=lt(p),p=Lc(y)}}return Ka({width:c,height:d,x:l,y:u})}function uh(e,t){const r=El(e).scrollLeft;return t?t.left+r:Ln(rr(e)).left+r}function xy(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:uh(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function W1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=rr(n),a=t?_l(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Zt(1);const c=Zt(0),d=tr(n);if((d||!d&&!i)&&((Xs(n)!=="body"||yo(o))&&(l=El(n)),tr(n))){const h=Ln(n);u=ks(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=o&&!d&&!i?xy(o,l,!0):Zt(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 V1(e){return Array.from(e.getClientRects())}function q1(e){const t=rr(e),r=El(e),n=e.ownerDocument.body,s=st(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=st(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+uh(e);const a=-r.scrollTop;return Dt(n).direction==="rtl"&&(o+=st(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function K1(e,t){const r=lt(e),n=rr(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=ah();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const G1=new Set(["absolute","fixed"]);function Q1(e,t){const r=Ln(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=tr(e)?ks(e):Zt(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 rp(e,t,r){let n;if(t==="viewport")n=K1(e,r);else if(t==="document")n=q1(rr(e));else if($t(t))n=Q1(t,r);else{const s=by(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ka(n)}function Sy(e,t){const r=sn(e);return r===t||!$t(r)||Ws(r)?!1:Dt(r).position==="fixed"||Sy(r,t)}function J1(e,t){const r=t.get(e);if(r)return r;let n=Yi(e,[],!1).filter(a=>$t(a)&&Xs(a)!=="body"),s=null;const i=Dt(e).position==="fixed";let o=i?sn(e):e;for(;$t(o)&&!Ws(o);){const a=Dt(o),l=oh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&G1.has(s.position)||yo(o)&&!l&&Sy(e,o))?n=n.filter(c=>c!==o):s=a,o=sn(o)}return t.set(e,n),n}function Y1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?_l(t)?[]:J1(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=rp(t,c,s);return u.top=st(d.top,u.top),u.right=nn(d.right,u.right),u.bottom=nn(d.bottom,u.bottom),u.left=st(d.left,u.left),u},rp(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function X1(e){const{width:t,height:r}=wy(e);return{width:t,height:r}}function Z1(e,t,r){const n=tr(t),s=rr(t),i=r==="fixed",o=Ln(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Zt(0);function u(){l.x=uh(s)}if(n||!n&&!i)if((Xs(t)!=="body"||yo(s))&&(a=El(t)),n){const h=Ln(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?xy(s,a):Zt(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 Dt(e).position==="static"}function np(e,t){if(!tr(e)||Dt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rr(e)===r&&(r=r.ownerDocument.body),r}function _y(e,t){const r=lt(e);if(_l(e))return r;if(!tr(e)){let s=sn(e);for(;s&&!Ws(s);){if($t(s)&&!bu(s))return s;s=sn(s)}return r}let n=np(e,t);for(;n&&L1(n)&&bu(n);)n=np(n,t);return n&&Ws(n)&&bu(n)&&!oh(n)?r:n||U1(e)||r}const eE=async function(e){const t=this.getOffsetParent||_y,r=this.getDimensions,n=await r(e.floating);return{reference:Z1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function tE(e){return Dt(e).direction==="rtl"}const rE={convertOffsetParentRelativeRectToViewportRelativeRect:W1,getDocumentElement:rr,getClippingRect:Y1,getOffsetParent:_y,getElementRects:eE,getClientRects:V1,getDimensions:X1,get
vendor: 10,182 bytes, line 116
116Scale:ks,isElement:$t,isRTL:tE};function Ey(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=rr(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 y=Wo(d),p=Wo(s.clientWidth-(c+f)),w=Wo(s.clientHeight-(d+h)),g=Wo(c),v={rootMargin:-y+"px "+-p+"px "+-w+"px "+-g+"px",threshold:st(0,nn(1,l))||1};let x=!0;function _(E){const k=E[0].intersectionRatio;if(k!==l){if(!x)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Ey(u,e.getBoundingClientRect())&&o(),x=!1}try{r=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,v)}r.observe(e)}return o(!0),i}function sE(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=lh(e),c=s||i?[...u?Yi(u):[],...Yi(t)]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?nE(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(g=>{let[m]=g;m&&m.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let y,p=l?Ln(e):null;l&&w();function w(){const g=Ln(e);p&&!Ey(p,g)&&r(),p=g,y=requestAnimationFrame(w)}return r(),()=>{var g;c.forEach(m=>{s&&m.removeEventListener("scroll",r),i&&m.removeEventListener("resize",r)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const iE=P1,oE=A1,aE=C1,lE=N1,uE=T1,sp=k1,cE=O1,dE=(e,t,r)=>{const n=new Map,s={platform:rE,...r},i={...s.platform,_c:n};return E1(e,t,{...s,platform:i})};var hE=typeof document<"u",fE=function(){},va=hE?b.useLayoutEffect:fE;function Ga(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(!Ga(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)&&!Ga(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ip(e,t){const r=ky(e);return Math.round(t*r)/r}function xu(e){const t=b.useRef(e);return va(()=>{t.current=e}),t}function pE(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);Ga(f,n)||h(n);const[y,p]=b.useState(null),[w,g]=b.useState(null),m=b.useCallback(T=>{T!==E.current&&(E.current=T,p(T))},[]),v=b.useCallback(T=>{T!==k.current&&(k.current=T,g(T))},[]),x=i||y,_=o||w,E=b.useRef(null),k=b.useRef(null),P=b.useRef(c),O=l!=null,j=xu(l),z=xu(s),D=xu(u),Q=b.useCallback(()=>{if(!E.current||!k.current)return;const T={placement:t,strategy:r,middleware:f};z.current&&(T.platform=z.current),dE(E.current,k.current,T).then(R=>{const L={...R,isPositioned:D.current!==!1};I.current&&!Ga(P.current,L)&&(P.current=L,mo.flushSync(()=>{d(L)}))})},[f,t,r,z,D]);va(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[u]);const I=b.useRef(!1);va(()=>(I.current=!0,()=>{I.current=!1}),[]),va(()=>{if(x&&(E.current=x),_&&(k.current=_),x&&_){if(j.current)return j.current(x,_,Q);Q()}},[x,_,Q,j,O]);const X=b.useMemo(()=>({reference:E,floating:k,setReference:m,setFloating:v}),[m,v]),H=b.useMemo(()=>({reference:x,floating:_}),[x,_]),q=b.useMemo(()=>{const T={position:r,left:0,top:0};if(!H.floating)return T;const R=ip(H.floating,c.x),L=ip(H.floating,c.y);return a?{...T,transform:"translate("+R+"px, "+L+"px)",...ky(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:L}},[r,a,H.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:Q,refs:X,elements:H,floatingStyles:q}),[c,Q,X,H,q])}const mE=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?sp({element:n.current,padding:s}).fn(r):{}:n?sp({element:n,padding:s}).fn(r):{}}}},gE=(e,t)=>({...iE(e),options:[e,t]}),vE=(e,t)=>({...oE(e),options:[e,t]}),yE=(e,t)=>({...cE(e),options:[e,t]}),wE=(e,t)=>({...aE(e),options:[e,t]}),bE=(e,t)=>({...lE(e),options:[e,t]}),xE=(e,t)=>({...uE(e),options:[e,t]}),SE=(e,t)=>({...mE(e),options:[e,t]});var _E="Arrow",Cy=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return S.jsx(_e.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=_E;var EE=Cy;function kE(e){const[t,r]=b.useState(void 0);return vr(()=>{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 Ty="Popper",[Ry,Py]=go(Ty),[PA,Ay]=Ry(Ty),Oy="PopperAnchor",Ny=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=Ay(Oy,r),o=b.useRef(null),a=We(t,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.jsx(_e.div,{...s,ref:a})});Ny.displayName=Oy;var ch="PopperContent",[CE,TE]=Ry(ch),jy=b.forwardRef((e,t)=>{var re,Fn,Sr,un,_r,Un;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...p}=e,w=Ay(ch,r),[g,m]=b.useState(null),v=We(t,Er=>m(Er)),[x,_]=b.useState(null),E=kE(x),k=(E==null?void 0:E.width)??0,P=(E==null?void 0:E.height)??0,O=n+(i!=="center"?"-"+i:""),j=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},z=Array.isArray(u)?u:[u],D=z.length>0,Q={padding:j,boundary:z.filter(PE),altBoundary:D},{refs:I,floatingStyles:X,placement:H,isPositioned:q,middlewareData:T}=pE({strategy:"fixed",placement:O,whileElementsMounted:(...Er)=>sE(...Er,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[gE({mainAxis:s+P,alignmentAxis:o}),l&&vE({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?yE():void 0,...Q}),l&&wE({...Q}),bE({...Q,apply:({elements:Er,rects:bo,availableWidth:Ml,availableHeight:xo})=>{const{width:Fl,height:ei}=bo.reference,Bn=Er.floating.style;Bn.setProperty("--radix-popper-available-width",`${Ml}px`),Bn.setProperty("--radix-popper-available-height",`${xo}px`),Bn.setProperty("--radix-popper-anchor-width",`${Fl}px`),Bn.setProperty("--radix-popper-anchor-height",`${ei}px`)}}),x&&SE({element:x,padding:a}),AE({arrowWidth:k,arrowHeight:P}),f&&xE({strategy:"referenceHidden",...Q})]}),[R,L]=$y(H),K=er(y);vr(()=>{q&&(K==null||K())},[q,K]);const U=(re=T.arrow)==null?void 0:re.x,J=(Fn=T.arrow)==null?void 0:Fn.y,Z=((Sr=T.arrow)==null?void 0:Sr.centerOffset)!==0,[be,je]=b.useState();return vr(()=>{g&&je(window.getComputedStyle(g).zIndex)},[g]),S.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:q?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(un=T.transformOrigin)==null?void 0:un.x,(_r=T.transformOrigin)==null?void 0:_r.y].join(" "),...((Un=T.hide)==null?void 0:Un.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(CE,{scope:r,placedSide:R,onArrowChange:_,arrowX:U,arrowY:J,shouldHideArrow:Z,children:S.jsx(_e.div,{"data-side":R,"data-align":L,...p,ref:v,style:{...p.style,animation:q?void 0:"none"}})})})});jy.displayName=ch;var Iy="PopperArrow",RE={top:"bottom",right:"left",bottom:"top",left:"right"},Ly=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=TE(Iy,n),o=RE[i.placedSide];return S.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:S.jsx(EE,{...s,ref:r,style:{...s.style,display:"block"}})})});Ly.displayName=Iy;function PE(e){return e!==null}var AE=e=>({name:"transformOrigin",options:e,fn(t){var w,g,m;const{placement:r,rects:n,middlewareData:s}=t,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=$y(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,h=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let y="",p="";return u==="bottom"?(y=o?d:`${f}px`,p=`${-l}px`):u==="top"?(y=o?d:`${f}px`,p=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,p=o?d:`${h}px`):u==="left"&&(y=`${n.floating.width+l}px`,p=o?d:`${h}px`),{data:{x:y,y:p}}}});function $y(e){const[t,r="center"]=e.split("-");return[t,r]}var OE=Ny,NE=jy,jE=Ly,[kl,AA]=go("Tooltip",[Py]),dh=Py(),Dy="TooltipProvider",IE=700,op="tooltip.open",[LE,My]=kl(Dy),Fy=e=>{const{__scopeTooltip:t,delayDuration:r=IE,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)},[]),S.jsx(LE,{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(()=>
vendor: 4,219 bytes, line 116
116o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};Fy.displayName=Dy;var Uy="Tooltip",[OA,Cl]=kl(Uy),$c="TooltipTrigger",$E=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Cl($c,r),i=My($c,r),o=dh(r),a=b.useRef(null),l=We(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]),S.jsx(OE,{asChild:!0,...o,children:S.jsx(_e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:he(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:he(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:he(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:he(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:he(e.onBlur,s.onClose),onClick:he(e.onClick,s.onClose)})})});$E.displayName=$c;var DE="TooltipPortal",[NA,ME]=kl(DE,{forceMount:void 0}),Vs="TooltipContent",By=b.forwardRef((e,t)=>{const r=ME(Vs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Cl(Vs,e.__scopeTooltip);return S.jsx(Qs,{present:n||o.open,children:o.disableHoverableContent?S.jsx(zy,{side:s,...i,ref:t}):S.jsx(FE,{side:s,...i,ref:t})})}),FE=b.forwardRef((e,t)=>{const r=Cl(Vs,e.__scopeTooltip),n=My(Vs,e.__scopeTooltip),s=b.useRef(null),i=We(t,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((y,p)=>{const w=y.currentTarget,g={x:y.clientX,y:y.clientY},m=WE(g,w.getBoundingClientRect()),v=VE(g,m),x=qE(p.getBoundingClientRect()),_=GE([...v,...x]);a(_),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&c){const y=w=>h(w,c),p=w=>h(w,l);return l.addEventListener("pointerleave",y),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",y),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),b.useEffect(()=>{if(o){const y=p=>{const w=p.target,g={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),v=!KE(g,o);m?f():v&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,c,o,u,f]),S.jsx(zy,{...e,ref:i})}),[UE,BE]=kl(Uy,{isInside:!1}),zE=Jx("TooltipContent"),zy=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Cl(Vs,r),u=dh(r),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(op,c),()=>document.removeEventListener(op,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]),S.jsx(wl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:S.jsxs(NE,{"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:[S.jsx(zE,{children:n}),S.jsx(UE,{scope:r,isInside:!0,children:S.jsx(bS,{id:l.contentId,role:"tooltip",children:s||n})})]})})});By.displayName=Vs;var Hy="TooltipArrow",HE=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=dh(r);return BE(Hy,r).isInside?null:S.jsx(jE,{...s,...n,ref:t})});HE.displayName=Hy;function WE(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 VE(e,t,r=5){const n=[];
116switch(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 qE(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 KE(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 GE(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),QE(t)}function QE(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 JE=Fy,Wy=By;const YE=JE,XE=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>S.jsx(Wy,{ref:n,sideOffset:t,className:Ke("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}));XE.displayName=Wy.displayName;var Tl=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(){}},Rl=typeof window>"u"||"Deno"in globalThis;function Tt(){}function ZE(e,t){return typeof e=="function"?e(t):e}function ek(e){return typeof e=="number"&&e>=0&&e!==1/0}function tk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dc(e,t){return typeof e=="function"?e(t):e}function rk(e,t){return typeof e=="function"?e(t):e}function ap(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==hh(o,t.options))return!1}else if(!Zi(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 lp(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Xi(t.options.mutationKey)!==Xi(i))return!1}else if(!Zi(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function hh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xi)(e)}function Xi(e){return JSON.stringify(e,(t,r)=>Mc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Zi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Zi(e[r],t[r])):!1}function Vy(e,t){if(e===t)return e;const r=up(e)&&up(t);if(r||Mc(e)&&Mc(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]=Vy(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function up(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mc(e){if(!cp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!cp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cp(e){return Object.prototype.toString.call(e)==="[object Object]"}function nk(e){return new Promise(t=>{setTimeout(t,e)})}function sk(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Vy(e,t):t}function ik(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function ok(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var fh=Symbol();function qy(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Sn,Fr,Ps,sm,ak=(sm=class extends Tl{constructor(){super();te(this,Sn);te(this,Fr);te(this,Ps);V(this,Ps,t=>{if(!Rl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,Fr)||this.setEventListener(C(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Fr))==null||t.call(this),V(this,Fr,void 0))}setEventListener(t){var r;V(this,Ps,t),(r=C(this,Fr))==null||r.call(this),V(this,Fr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,Sn)!==t&&(V(this,Sn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,912 bytes, line 116
116this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,Sn)=="boolean"?C(this,Sn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sn=new WeakMap,Fr=new WeakMap,Ps=new WeakMap,sm),Ky=new ak,As,Ur,Os,im,lk=(im=class extends Tl{constructor(){super();te(this,As,!0);te(this,Ur);te(this,Os);V(this,Os,t=>{if(!Rl&&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(){C(this,Ur)||this.setEventListener(C(this,Os))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Ur))==null||t.call(this),V(this,Ur,void 0))}setEventListener(t){var r;V(this,Os,t),(r=C(this,Ur))==null||r.call(this),V(this,Ur,t(this.setOnline.bind(this)))}setOnline(t){C(this,As)!==t&&(V(this,As,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,As)}},As=new WeakMap,Ur=new WeakMap,Os=new WeakMap,im),Qa=new lk;function uk(){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 ck(e){return Math.min(1e3*2**e,3e4)}function Gy(e){return(e??"online")==="online"?Qa.isOnline():!0}var Qy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Su(e){return e instanceof Qy}function Jy(e){let t=!1,r=0,n=!1,s;const i=uk(),o=p=>{var w;n||(f(new Qy(p)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ky.isFocused()&&(e.networkMode==="always"||Qa.isOnline())&&e.canRun(),c=()=>Gy(e.networkMode)&&e.canRun(),d=p=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,p),s==null||s(),i.resolve(p))},f=p=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,p),s==null||s(),i.reject(p))},h=()=>new Promise(p=>{var w;s=g=>{(n||u())&&p(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var p;s=void 0,n||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(n)return;let p;const w=r===0?e.initialPromise:void 0;try{p=w??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(d).catch(g=>{var E;if(n)return;const m=e.retry??(Rl?0:3),v=e.retryDelay??ck,x=typeof v=="function"?v(r,g):v,_=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,g);if(t||!_){f(g);return}r++,(E=e.onFail)==null||E.call(e,r,g),nk(x).then(()=>u()?void 0:h()).then(()=>{t?f(g):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():h().then(y),i)}}var dk=e=>setTimeout(e,0);function hk(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=dk;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 ze=hk(),_n,om,Yy=(om=class{constructor(){te(this,_n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ek(this.gcTime)&&V(this,_n,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rl?1/0:5*60*1e3))}clearGcTimeout(){C(this,_n)&&(clearTimeout(C(this,_n)),V(this,_n,void 0))}},_n=new WeakMap,om),Ns,En,ft,kn,De,ao,Cn,Pt,sr,am,fk=(am=class extends Yy{constructor(t){super();te(this,Pt);te(this,Ns);te(this,En);te(this,ft);te(this,kn);te(this,De);te(this,ao);te(this,Cn);V(this,Cn,!1),V(this,ao,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,kn,t.client),V(this,ft,C(this,kn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Ns,mk(this.options)),this.state=t.state??C(this,Ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,De))==null?void 0:t.promise}setOptions(t){this.options={...C(this,ao),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,ft).remove(this)}setData(t,r){const n=sk(this.state.data,t,this.options);return Ie(this,Pt,sr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ie(this,Pt,sr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=C(this,De))==null?void 0:n.promise;return(s=C(this,De))==null||s.cancel(t),r?r.then(Tt).catch(Tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Ns))}isActive(){return this.observers.some(t=>rk(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fh||this.state.dataUpdateCount+this.state.errorUpdate
116Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dc(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:!tk(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,De))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,De))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,ft).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,De)&&(C(this,Cn)?C(this,De).cancel({revert:!0}):C(this,De).cancelRetry()),this.scheduleGc()),C(this,ft).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ie(this,Pt,sr).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(C(this,De))return C(this,De).continueRetry(),C(this,De).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(V(this,Cn,!0),n.signal)})},i=()=>{const f=qy(this.options,r),y=(()=>{const p={client:C(this,kn),queryKey:this.queryKey,meta:this.meta};return s(p),p})();return V(this,Cn,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,kn),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),V(this,En,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Ie(this,Pt,sr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,y,p,w;Su(f)&&f.silent||Ie(this,Pt,sr).call(this,{type:"error",error:f}),Su(f)||((y=(h=C(this,ft).config).onError)==null||y.call(h,f,this),(w=(p=C(this,ft).config).onSettled)==null||w.call(p,this.state.data,f,this)),this.scheduleGc()};return V(this,De,Jy({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,y,p,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(y=(h=C(this,ft).config).onSuccess)==null||y.call(h,f,this),(w=(p=C(this,ft).config).onSettled)==null||w.call(p,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Ie(this,Pt,sr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Ie(this,Pt,sr).call(this,{type:"pause"})},onContinue:()=>{Ie(this,Pt,sr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,De).start()}},Ns=new WeakMap,En=new WeakMap,ft=new WeakMap,kn=new WeakMap,De=new WeakMap,ao=new WeakMap,Cn=new WeakMap,Pt=new WeakSet,sr=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,...pk(n.data,this.options),fetchMeta:t.meta??null};case"success":return V(this,En,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 Su(s)&&s.revert&&C(this,En)?{...C(this,En),fetchStatus:"idle"}
vendor: 4,308 bytes, line 116
116:{...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),ze.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,ft).notify({query:this,type:"updated",action:t})})},am);function pk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function mk(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 Wt,lm,gk=(lm=class extends Tl{constructor(t={}){super();te(this,Wt);this.config=t,V(this,Wt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??hh(s,r);let o=this.get(i);return o||(o=new fk({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){C(this,Wt).has(t.queryHash)||(C(this,Wt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,Wt).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,Wt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Wt).get(t)}getAll(){return[...C(this,Wt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ap(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ap(t,n)):r}notify(t){ze.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wt=new WeakMap,lm),Vt,Ue,Tn,qt,Or,um,vk=(um=class extends Yy{constructor(t){super();te(this,qt);te(this,Vt);te(this,Ue);te(this,Tn);this.mutationId=t.mutationId,V(this,Ue,t.mutationCache),V(this,Vt,[]),this.state=t.state||yk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Vt).includes(t)||(C(this,Vt).push(t),this.clearGcTimeout(),C(this,Ue).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,Vt,C(this,Vt).filter(r=>r!==t)),this.scheduleGc(),C(this,Ue).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Vt).length||(this.state.status==="pending"?this.scheduleGc():C(this,Ue).remove(this))}continue(){var t;return((t=C(this,Tn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,d,f,h,y,p,w,g,m,v,x,_,E,k,P;const r=()=>{Ie(this,qt,Or).call(this,{type:"continue"})};V(this,Tn,Jy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,j)=>{Ie(this,qt,Or).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{Ie(this,qt,Or).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Ue).canRun(this)}));const n=this.state.status==="pending",s=!C(this,Tn).canStart();try{if(n)r();else{Ie(this,qt,Or).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=C(this,Ue).config).onMutate)==null?void 0:o.call(i,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&Ie(this,qt,Or).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const O=await C(this,Tn).start();return await((c=(u=C(this,Ue).config).onSuccess)==null?void 0:c.call(u,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((y=(h=C(this,Ue).config).onSettled)==null?void 0:y.call(h,O,null,this.state.variables,this.state.context,this)),await((w=(p=this.options).onSettled)==null?void 0:w.call(p,O,null,t,this.state.context)),Ie(this,qt,Or).
116call(this,{type:"success",data:O}),O}catch(O){try{throw await((m=(g=C(this,Ue).config).onError)==null?void 0:m.call(g,O,t,this.state.context,this)),await((x=(v=this.options).onError)==null?void 0:x.call(v,O,t,this.state.context)),await((E=(_=C(this,Ue).config).onSettled)==null?void 0:E.call(_,void 0,O,this.state.variables,this.state.context,this)),await((P=(k=this.options).onSettled)==null?void 0:P.call(k,void 0,O,t,this.state.context)),O}finally{Ie(this,qt,Or).call(this,{type:"error",error:O})}}finally{C(this,Ue).runNext(this)}}},Vt=new WeakMap,Ue=new WeakMap,Tn=new WeakMap,qt=new WeakSet,Or=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),ze.batch(()=>{C(this,Vt).forEach(n=>{n.onMutationUpdate(t)}),C(this,Ue).notify({mutation:this,type:"updated",action:t})})},um);function yk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ur,At,lo,cm,wk=(cm=class extends Tl{constructor(t={}){super();te(this,ur);te(this,At);te(this,lo);this.config=t,V(this,ur,new Set),V(this,At,new Map),V(this,lo,0)}build(t,r,n){const s=new vk({mutationCache:this,mutationId:++_o(this,lo)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){C(this,ur).add(t);const r=Vo(t);if(typeof r=="string"){const n=C(this,At).get(r);n?n.push(t):C(this,At).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,ur).delete(t)){const r=Vo(t);if(typeof r=="string"){const n=C(this,At).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&C(this,At).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Vo(t);if(typeof r=="string"){const n=C(this,At).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=Vo(t);if(typeof r=="string"){const s=(n=C(this,At).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(){ze.batch(()=>{C(this,ur).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,ur).clear(),C(this,At).clear()})}getAll(){return Array.from(C(this,ur))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>lp(r,n))}findAll(t={}){return this.getAll().filter(r=>lp(t,r))}notify(t){ze.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 116
116r.state.isPaused);return ze.batch(()=>Promise.all(t.map(r=>r.continue().catch(Tt))))}},ur=new WeakMap,At=new WeakMap,lo=new WeakMap,cm);function Vo(e){var t;return(t=e.options.scope)==null?void 0:t.id}function dp(e){return{onFetch:(t,r)=>{var c,d,f,h,y;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=qy(t.options,t.fetchOptions),m=async(v,x,_)=>{if(p)return Promise.reject();if(x==null&&v.pages.length)return Promise.resolve(v);const k=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:x,direction:_?"backward":"forward",meta:t.options.meta};return w(z),z})(),P=await g(k),{maxPages:O}=t.options,j=_?ok:ik;return{pages:j(v.pages,P,O),pageParams:j(v.pageParams,x,O)}};if(s&&i.length){const v=s==="backward",x=v?bk:hp,_={pages:i,pageParams:o},E=x(n,_);a=await m(_,E,v)}else{const v=e??i.length;do{const x=l===0?o[0]??n.initialPageParam:hp(n,a);if(l>0&&x==null)break;a=await m(a,x),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var p,w;return(w=(p=t.options).persister)==null?void 0:w.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function hp(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 bk(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 ge,Br,zr,js,Is,Hr,Ls,$s,dm,xk=(dm=class{constructor(e={}){te(this,ge);te(this,Br);te(this,zr);te(this,js);te(this,Is);te(this,Hr);te(this,Ls);te(this,$s);V(this,ge,e.queryCache||new gk),V(this,Br,e.mutationCache||new wk),V(this,zr,e.defaultOptions||{}),V(this,js,new Map),V(this,Is,new Map),V(this,Hr,0)}mount(){_o(this,Hr)._++,C(this,Hr)===1&&(V(this,Ls,Ky.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onFocus())})),V(this,$s,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onOnline())})))}unmount(){var e,t;_o(this,Hr)._--,C(this,Hr)===0&&((e=C(this,Ls))==null||e.call(this),V(this,Ls,void 0),(t=C(this,$s))==null||t.call(this),V(this,$s,void 0))}isFetching(e){return C(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Br).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,ge).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,ge).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Dc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,ge).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=C(this,ge).get(n.queryHash),i=s==null?void 0:s.state.data,o=ZE(t,i);if(o!==void 0)return C(this,ge).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return ze.batch(()=>C(this,ge).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,ge).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,ge);ze.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,ge);return ze.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ze.batch(()=>C(this,ge).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Tt).catch(Tt)}invalidateQueries(e,t={}){return ze.batch(()=>(C(this,ge).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=ze.batch(()=>C(this,ge).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Tt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
116));return Promise.all(n).then(Tt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,ge).build(this,t);return r.isStaleByTime(Dc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tt).catch(Tt)}fetchInfiniteQuery(e){return e.behavior=dp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tt).catch(Tt)}ensureInfiniteQueryData(e){return e.behavior=dp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qa.isOnline()?C(this,Br).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ge)}getMutationCache(){return C(this,Br)}getDefaultOptions(){return C(this,zr)}setDefaultOptions(e){V(this,zr,e)}setQueryDefaults(e,t){C(this,js).set(Xi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,js).values()],r={};return t.forEach(n=>{Zi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,Is).set(Xi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Is).values()],r={};return t.forEach(n=>{Zi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,zr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hh(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===fh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,zr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,ge).clear(),C(this,Br).clear()}},ge=new WeakMap,Br=new WeakMap,zr=new WeakMap,js=new WeakMap,Is=new WeakMap,Hr=new WeakMap,Ls=new WeakMap,$s=new WeakMap,dm),Sk=b.createContext(void 0),_k=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),S.jsx(Sk.Provider,{value:e,children:t}));/**
117 * @remix-run/router v1.23.0
118 *
119 * Copyright (c) Remix Software Inc.
120 *
121 * This source code is licensed under the MIT license found in the
122 * LICENSE.md file in the root directory of this source tree.
123 *
124 * @license MIT
125 */function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ja.apply(this,arguments)}var qr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(qr||(qr={}));const fp="popstate";function Ek(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return Fc("",{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:Zy(s)}return Ck(t,r,null,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kk(){return Math.random().toString(36).substr(2,8)}function pp(e,t){return{usr:e.state,key:e.key,idx:t}}function Fc(e,t,r,n){return r===void 0&&(r=null),Ja({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pl(t):t,{state:r,key:t&&t.key||n||kk()})}function Zy(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 Pl(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 Ck(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(Ja({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=qr.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:p.location,delta:g})}function f(w,g){a=qr.Push;let m=Fc(p.location,w,g);u=c()+1;let v=pp(m,u),x=p.createHref(m);try{o.pushState(v,"",x)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(x)}i&&l&&l({action:a,location:p.location,delta:1})}function h(w,g){a=qr.Replace;let m=Fc(p.location,w,g);u=c();let v=pp(m,u),x=p.createHref(m);o.replaceState(v,"",x),i&&l&&l({action:a,location:p.location,delta:0})}function y(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof w=="string"?w:Zy(w);return m=m.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let p={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(fp,d),l=w,()=>{s.removeEventListener(fp,d),l=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let g=y(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(w){return o.go(w)}};return p}var mp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mp||(mp={}));function Tk(e,t,r){return r===void 0&&(r="/"),Rk(e,t,r,!1)}function Rk(e,t,r,n){let s=typeof t=="string"?Pl(t):t,i=r0(s.pathname||"/",r);if(i==null)return null;let o=e0(e);Pk(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=Uk(i);a=Mk(o[l],u,n)}return a}function e0(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("/")&&(tt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
125id. 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=Cs([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(tt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),e0(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:$k(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 t0(i.path))s(i,o,l)}),t}function t0(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=t0(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 Pk(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Dk(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ak=/^:[\w-]+$/,Ok=3,Nk=2,jk=1,Ik=10,Lk=-2,gp=e=>e==="*";function $k(e,t){let r=e.split("/"),n=r.length;return r.some(gp)&&(n+=Lk),t&&(n+=Nk),r.filter(s=>!gp(s)).reduce((s,i)=>s+(Ak.test(i)?Ok:i===""?jk:Ik),n)}function Dk(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 Mk(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=vp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=vp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 4,131 bytes, lines 125-134
125Object.assign(s,d.params),o.push({params:s,pathname:Cs([i,d.pathname]),pathnameBase:Bk(Cs([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Cs([i,d.pathnameBase]))}return o}function vp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Fk(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 p=a[d]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const y=a[d];return h&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Fk(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Xy(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 Uk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xy(!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 r0(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 Cs=e=>e.join("/").replace(/\/\/+/g,"/"),Bk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function zk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const n0=["post","put","patch","delete"];new Set(n0);const Hk=["get",...n0];new Set(Hk);/**
126 * React Router v6.30.1
127 *
128 * Copyright (c) Remix Software Inc.
129 *
130 * This source code is licensed under the MIT license found in the
131 * LICENSE.md file in the root directory of this source tree.
132 *
133 * @license MIT
134 */function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ya.apply(this,arguments)}const Wk=b.createContext(null),Vk=b.createContext(null),s0=b.createContext(null),Al=b.createContext(null),Ol=b.createContext({outlet:null,matches:[],isDataRoute:!1}),i0=b.createContext(null);function ph(){return b.useContext(Al)!=null}function o0(){return ph()||tt(!1),b.useContext(Al).location}function qk(e,t){return Kk(e,t)}function Kk(e,t,r,n){ph()||tt(!1);let{navigator:s}=b.useContext(s0),{matches:i}=b.useContext(Ol),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=o0(),c;if(t){var d;let w=typeof t=="string"?Pl(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||tt(!1),c=w}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=Tk(e,{pathname:h}),p=Xk(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Cs([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Cs([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return t&&p?b.createElement(Al.Provider,{value:{location:Ya({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:qr.Pop}},p):p}function Gk(){let e=rC(),t=zk(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 
134Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const Qk=b.createElement(Gk,null);class Jk 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(Ol.Provider,{value:this.props.routeContext},b.createElement(i0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yk(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(Wk);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Ol.Provider,{value:t},n)}function Xk(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||tt(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,y=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let h,y=!1,p=null,w=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,p=d.route.errorElement||Qk,l&&(u<0&&f===0?(y=!0,w=null):u===f&&(y=!0,w=d.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),m=()=>{let v;return h?v=p:y?v=w:d.route.Component?v=b.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,b.createElement(Yk,{match:d,routeContext:{outlet:c,matches:g,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(Jk,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var Uc=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}(Uc||{});function Zk(e){let t=b.useContext(Vk);return t||tt(!1),t}function eC(e){let t=b.useContext(Ol);return t||tt(!1),t}function tC(e){let t=eC(),r=t.matches[t.matches.length-1];return r.route.id||tt(!1),r.route.id}function rC(){var e;let t=b.useContext(i0),r=Zk(Uc.UseRouteError),n=tC(Uc.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function nC(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Bc(e){tt(!1)}function sC(e){let{basename:t="/",children:r=null,location:n,navigationType:s=qr.Pop,navigator:i,static:o=!1,future:a}=e;ph()&&tt(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Ya({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Pl(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:y="default"}=n,p=b.useMemo(()=>{let w=r0(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:y},navigationType:s}},[l,c,d,f,h,y,s]);return p==null?null:b.createElement(s0.Provider,{value:u},b.createElement(Al.Provider,{children:r,value:p}))}function iC(e){let{children:t,location:r}=e;return qk(zc(t),r)}new Promise(()=>{});
134function zc(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,zc(n.props.children,i));return}n.type!==Bc&&tt(!1),!n.props.index||!n.props.children||tt(!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=zc(n.props.children,i)),r.push(o)}),r}/**
135 * React Router DOM v6.30.1
136 *
137 * Copyright (c) Remix Software Inc.
138 *
139 * This source code is licensed under the MIT license found in the
140 * LICENSE.md file in the root directory of this source tree.
141 *
142 * @license MIT
143 */const oC="6";try{window.__reactRouterVersion=oC}catch{}const aC="startTransition",yp=od[aC];function lC(e){let{basename:t,children:r,future:n,window:s}=e,i=b.useRef();i.current==null&&(i.current=Ek({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&&yp?yp(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>nC(n),[n]),b.createElement(sC,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var wp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wp||(wp={}));var bp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bp||(bp={}));const xp=[{name:"Art of Glow",link:"https://apps.apple.com/us/app/art-of-glow/id387680399",categories:["Other"],description:"Relaxing, creative drawing app",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!0},{name:"Bookshare",link:"https://www.bookshare.org/",categories:["Reading"],description:"Accessible audio and e-book library that can be customized your reading experience with assistive reading features that remove reading barriers (Over 1.4 M titles)",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!1},{name:"Boom Learning",link:"http://wow.boomlearning.com",categories:["Reading","Writing","Social Emotional Supports","Other"],description:"This platform supercharges a teacher's effectiveness by providing instant feedback, personalized assignments, and detailed reports",ageGroups:["Elementary","Middle School","High School"],isFree:!1},{name:"Breathe, Think, Do",link:"https://apps.apple.com/us/app/breathe-think-do-with-sesame/id721853597",categories:["Social Emotional Supports"],description:"Teaches problem solving, self-control, planning and task persistence with a Sesame Street friend",ageGroups:["Preschool","Elementary"],isFree:!0},{name:"Byrdseed TV",link:"https://www.byrdseed.tv/",categories:["Reading","Writing","Math","Other"],description:"A library of lessons, projects, and investigations that teachers can use directly with their advanced students",ageGroups:["Elementary","Middle School"],isFree:!1},{name:"Fiveable",link:"https://fiveable.me/",categories:["Reading","Note Taking"],description:"Resources and live reviews for AP courses",ageGroups:["High School"],isFree:!0},{name:"Flippity",link:"https://www.flippity.net/",categories:["Other"],description:"A free resource for teachers that allows for the creation of quizzes, flash cards, presentations, memory games, word searches, and more.",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!0},{name:"Focus Friend",link:"https://www.yourfocusfriend.com/",categories:["Executive Functioning"],description:"Gamified focus timer app",ageGroups:["Middle School","High School","Adult"],isFree:!0},{name:"Genio Notes",link:"https://genio.co/",categories:["Note Taking"],description:"AI-powered study and note-taking tool.",ageGroups:["College","Adult"],isFree:!1},{name:"Granola",link:"https://www.granola.ai/",categories:["Note Taking"],description:"AI-powered tool to organize and summarize meeting notes.",ageGroups:["Adult"],isFree:!1},{name:"Headspace",link:"https://www.headspace.com/",categories:["Social Emotional Supports"],description:"The leading everyday mental health companion, helping people care for their minds anytime, anywhere",ageGroups:["Middle School","High School","Adult"],isFree:!1},{name:"Hoopla",link:"https://www.hoopladigital.com/",categories:["Reading"],description:"Streaming media (eBooks, audiobooks, movies) from local libraries.",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!0},{name:"Kami",link:"https://www.kamiapp.com/",categories:["Other"],description:"An all-in-one platform that turns any resource into interactive, accessible learning experiences with insights and intentional AI, proven to save teachers time and improve outcomes",ageGroups:["Elementary","Middle School","High School","College"],isFree:!0},{name:"KDRAP",link:"https://readingacceleration.com/",categories:["Reading"],description:"Improves reading performance by teaching children the physical act of reading",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!1},{name:"Learning Ally",link:"https://learningally.org/",categories:["Reading"],description:"Audiobooks for students with reading challenges.",ageGroups:["Preschool","Elementary","Middle School","High School","College","Adult"],isFree:!1},{name:"Lexia",link:"https://www.lexialearning.com/",categories:["Reading"],description:"Reading-based solutions that help schools connect educator knowledge with practical classroom instruction to accelerate literacy gains.",ageGroups:["Elementary"],isFree:!1},{name:"Magic Tools (Goblin Tools)",link:"http://www.goblin.tools/",categories:["Executive Functioning"],description:"A collection of small, simple tools, for when things feel too big or complicated",ageGroups:["Middle School","High School","Adult"],isFree:null},{name:"Magpie Literacy",link:"https://www.magpie.org/",categories:["Reading"],description:"Research-based K-8 digital literacy tools to help master the foundational reading skills needed to become strong, confident readers",ageGroups:["Elementary"],isFree:!1},{name:"Math Antics",link:"https://mathantics.com/",categories:["Math"],description:"Engaging video lessons on various basic math topics for 3rd thru 8th graders",ageGroups:["Elementary","Middle School"],isFree:!0},{name:"Modmath",link:"https://www.modmath.com/",categories:["Math"],description:"An assistive technology for math that helps students with dyslexia, dysgraphia, and other learning differences write and solve math problems using digital graph paper.",ageGroups:["Middle School"],isFree:!1},{name:"Mystery Writing",link:"https://writing.mysteryscience.com/",categories:["Reading","Writing"],description:"An interactive open-and-go writing and reading curriculum that engages students and builds their confidence as writers",ageGroups:["Elementary"],isFree:!1},{name:"Napkin",link:"http://www.napkin.ai/",categories:["Executive Functioning"],description:"Helps students make visual
143s and organize information in helpful ways.",ageGroups:["Middle School","High School","Adult"],isFree:!1},{name:"Newsela",link:"https://newsela.com/",categories:["Reading","Other"],description:"Research-backed, engaging, differentiated content and AI-powered tools that save educators time and support every student.",ageGroups:["Elementary","Middle School","High School"],isFree:!0},{name:"Notability",link:"https://notability.com/",categories:["Writing","Math","Note Taking"],description:"Note-taking app that transcribes, summarizes, creates quizzes, flashcards, and more",ageGroups:["Middle School","High School","Adult"],isFree:!1},{name:"NotebookLM",link:"https://notebooklm.google/",categories:["Other"],description:'A research and note-taking online tool that uses Google Gemini, that assists users in interacting with documents—a "virtual research assistant"',ageGroups:["High School","College","Adult"],isFree:!0},{name:"RAZ Plus",link:"https://www.raz-plus.com/about-raz-plus/",categories:["Reading","Writing"],description:"A library of practical K-5 resources with equal instructional emphasis on foundational skills and reading comprehension",ageGroups:["Elementary","Middle School","High School"],isFree:!1},{name:"Read&Write for Google Chrome",link:"https://chrome.google.com/webstore",categories:["Reading","Writing","Note Taking"],description:"Provides personalized support to make documents, web pages and common file types more accessible; designed to help everyone engage with digital content in a way that suits their abilities and learning styles.",ageGroups:["Elementary","Middle School","High School"],isFree:!0},{name:"Readability",link:"https://www.readabilitytutor.com/",categories:["Reading"],description:"For students K-6th grade to help improve fluency, comprehension and vocabulary by providing independent reading practice as a student reads aloud",ageGroups:["Elementary","Middle School"],isFree:!1},{name:"Renzulli Learning",link:"https://renzullilearning.com/en",categories:["Reading","Writing","Math","Other"],description:"A research-driven interactive online system that empowers students through student-centered, personalized, project-centered environment",ageGroups:["Elementary","Middle School"],isFree:!1},{name:"Self Control",link:"https://selfcontrolapp.com/",categories:["Executive Functioning","Other"],description:"Application that blocks access to distracting websites",ageGroups:["High School","Adult"],isFree:!0},{name:"SLP Everyday Speech",link:"https://everydayspeech.com/",categories:["Social Emotional Supports"],description:"A social skills curriculum with video modeling, games, and worksheets that help students build the skills they need to thrive.",ageGroups:["Preschool","Elementary","Middle School","High School"],isFree:!1},{name:"Starfall",link:"https://www.starfall.com/h/",categories:["Reading","Writing","Math","Social Emotional Supports"],description:"A free learning platform with untimed, multisensory interactive games that allow children to see, hear, and touch as they learn; especially effective for emergent readers and children with special needs.",ageGroups:["Elementary"],isFree:!1},{name:"Synthesis Tutor",link:"https://www.synthesis.com/tutor",categories:["Math"],description:"Standard K-5 math curriculum with a multisensory experience leveraging new technology and hands on fun",ageGroups:["Middle School","High School"],isFree:!1},{name:"TeachersPayTeachers",link:"http://teacherspayteachers.com",categories:["Reading","Writing","Social Emotional Supports","Other"],description:"Marketplace for PreK-12 resources, powered by a community of educators",ageGroups:["Preschool","Elementary","Middle School","High School"],isFree:!1},{name:"The Amazing Generation",link:"https://www.anxiousgeneration.com/book/amazinggeneration",categories:["Other"],description:"A handbook for kids about living a happy and exciting life that isn't hijacked by a smartphone—packed with surprising facts, a graphic novel, interactive challenges, and secrets tech leaders don't want kids to know",ageGroups:["Elementary"],isFree:!1},{name:"Think3d!",link:"https://think3dus.org/",categories:["Other"],description:"Teaches spatial reasoning skills in science, technology, engineering, and math that inspires innovative thinking and problem solving through engineering design challenges based in origami and paper engineering",ageGroups:["High School","Adult"],isFree:!1},{name:"Todoist",link:"https://www.todoist.com/",categories:["Executive Functioning"],description:"Task management and to-do list application.",ageGroups:["High School","Adult"],isFree:!0},{name:"Vooks",link:"https://www.vooks.com/",categories:["Reading"],description:"A kid-safe, ad-free streaming library of read-aloud animated storybooks, curated for kids ranging from 2 to 8 years old",ageGroups:["Preschool","Elementary"],isFree:!1},{name:"Waking Up",link:"https://www.wakingup.com/",categories:["Social Emotional Supports"],description:"Meditation and mindfulness course by Sam Harris.",ageGroups:["Adult"],isFree:!1},{name:"Wispr Flow",link:"https://wisprflow.ai/",categories:["Writing"],description:"A voice-to-text AI that turns speech into clear, polished writing in every app",ageGroups:["High School","College","Adult"],isFree:!1},{name:"Writing Wizard",link:"https://lescapadou.com/wp/en/writing-wizard-app/",categories:["Writing"],description:"Help children learn how to trace letters, numbers, and words through a fun system carefully designed to maintain motivation",ageGroups:["Elementary"],isFree:!1}],uC=["Reading","Math","Writing","Executive Functioning","Social Emotional Supports","Note Taking","Other"],cC=["Preschool","Elementary","Middle School","High School","College","Adult"],dC=th("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function hC({className:e,variant:t,...r}){return S.jsx("div",{className:Ke(dC({variant:t}),e),...r})}const Sp={Reading:"bg-cat-reading/15 text-cat-reading border-cat-reading/30",Writing:"bg-cat-writing/15 text-cat-writing border-cat-writing/30",Math:"bg-cat-math/15 text-cat-math border-cat-math/30","Note Taking":"bg-cat-note-taking/15 text-cat-note-taking border-cat-note-taking/30","Social Emotional Supports":"bg-cat-social/15 text-cat-social border-cat-social/30","Executive Functioning":"bg-cat-exec/15 text-cat-exec border-cat-exec/30",Other:"bg-cat-other/15 text-cat-other border-cat-other/30"};function fC({category:e}){const t=Sp[e]??Sp.Other;return S.jsx(hC,{variant:"outline",className:`text-xs font-medium ${t}`,children:e})}function pC({app:e}){return S.jsxs("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"group block rounded-xl border border-border bg-card p-5 transition-all duration-200 hover:shadow-lg hover:shadow-
143primary/5 hover:-translate-y-0.5 hover:border-primary/30",children:[S.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[S.jsx("h3",{className:"font-serif text-lg font-semibold text-card-foreground group-hover:text-primary transition-colors leading-tight",children:e.name}),S.jsx(qS,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0 mt-1"})]}),S.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4 line-clamp-3",children:e.description}),S.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:e.categories.map(t=>S.jsx(fC,{category:t},t))}),S.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[S.jsx("span",{children:e.ageGroups.join(", ")}),e.isFree===!0&&S.jsx("span",{className:"font-semibold text-primary",children:"Free"}),e.isFree===!1&&S.jsx("span",{className:"text-muted-foreground",children:"Paid"})]})]})}const mC=th("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),mh=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?Gx:"button";return S.jsx(o,{className:Ke(mC({variant:t,size:r,className:e})),ref:i,...s})});mh.displayName="Button";const gC={Reading:zS,Math:VS,Writing:QS,"Executive Functioning":WS,"Social Emotional Supports":KS,"Note Taking":HS,Other:ny};function vC({search:e,onSearchChange:t,selectedCategories:r,onToggleCategory:n,selectedAgeGroups:s,onToggleAgeGroup:i,freeOnly:o,onToggleFree:a,resultCount:l,totalCount:u}){const c=e||r.length>0||s.length>0||o;return S.jsxs("div",{className:"space-y-5",children:[S.jsxs("div",{children:[S.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wider",children:"Category"}),S.jsx("div",{className:"flex flex-wrap gap-2",children:uC.map(d=>{const f=gC[d]??ny;return S.jsxs("button",{onClick:()=>n(d),className:`text-sm px-3 py-1.5 rounded-full border transition-all inline-flex items-center gap-1.5 ${r.includes(d)?"bg-primary text-primary-foreground border-primary":"bg-card text-muted-foreground border-border hover:border-primary/40 hover:text-foreground"}`,children:[S.jsx(f,{className:"w-3.5 h-3.5"}),d]},d)})})]}),S.jsxs("div",{children:[S.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wider",children:"Age Group"}),S.jsx("div",{className:"flex flex-wrap gap-2",children:cC.map(d=>S.jsx("button",{onClick:()=>i(d),className:`text-sm px-3 py-1.5 rounded-full border transition-all ${s.includes(d)?"bg-primary text-primary-foreground border-primary":"bg-card text-muted-foreground border-border hover:border-primary/40 hover:text-foreground"}`,children:d},d))})]}),S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("button",{onClick:a,className:`text-sm px-3 py-1.5 rounded-full border transition-all ${o?"bg-primary text-primary-foreground border-primary":"bg-card text-muted-foreground border-border hover:border-primary/40 hover:text-foreground"}`,children:"Free only"}),S.jsxs("div",{className:"flex items-center gap-3",children:[c&&S.jsx(mh,{variant:"ghost",size:"sm",onClick:()=>
vendor: 5,350 bytes, line 143
143{t(""),r.forEach(n),s.forEach(i),o&&a()},className:"text-xs text-muted-foreground",children:"Clear all"}),S.jsxs("span",{className:"text-sm text-muted-foreground",children:[l," of ",u," tools"]})]})]})]})}var _u="focusScope.autoFocusOnMount",Eu="focusScope.autoFocusOnUnmount",_p={bubbles:!1,cancelable:!0},yC="FocusScope",a0=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=b.useState(null),u=er(s),c=er(i),d=b.useRef(null),f=We(t,p=>l(p)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let p=function(v){if(h.paused||!a)return;const x=v.target;a.contains(x)?d.current=x:Nr(d.current,{select:!0})},w=function(v){if(h.paused||!a)return;const x=v.relatedTarget;x!==null&&(a.contains(x)||Nr(d.current,{select:!0}))},g=function(v){if(document.activeElement===document.body)for(const _ of v)_.removedNodes.length>0&&Nr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),m.disconnect()}}},[n,a,h.paused]),b.useEffect(()=>{if(a){kp.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(_u,_p);a.addEventListener(_u,u),a.dispatchEvent(g),g.defaultPrevented||(wC(EC(l0(a)),{select:!0}),document.activeElement===p&&Nr(a))}return()=>{a.removeEventListener(_u,u),setTimeout(()=>{const g=new CustomEvent(Eu,_p);a.addEventListener(Eu,c),a.dispatchEvent(g),g.defaultPrevented||Nr(p??document.body,{select:!0}),a.removeEventListener(Eu,c),kp.remove(h)},0)}}},[a,u,c,h]);const y=b.useCallback(p=>{if(!r&&!n||h.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(w&&g){const m=p.currentTarget,[v,x]=bC(m);v&&x?!p.shiftKey&&g===x?(p.preventDefault(),r&&Nr(v,{select:!0})):p.shiftKey&&g===v&&(p.preventDefault(),r&&Nr(x,{select:!0})):g===m&&p.preventDefault()}},[r,n,h.paused]);return S.jsx(_e.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});a0.displayName=yC;function wC(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Nr(n,{select:t}),document.activeElement!==r)return}function bC(e){const t=l0(e),r=Ep(t,e),n=Ep(t.reverse(),e);return[r,n]}function l0(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 Ep(e,t){for(const r of e)if(!xC(r,{upTo:t}))return r}function xC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function SC(e){return e instanceof HTMLInputElement&&"select"in e}function Nr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&SC(e)&&t&&e.select()}}var kp=_C();function _C(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Cp(e,t),e.unshift(t)},remove(t){var r;e=Cp(e,t),(r=e[0])==null||r.resume()}}}function Cp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function EC(e){return e.filter(t=>t.tagName!=="A")}var ku=0;function kC(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tp()),document.body.insertAdjacentElement("beforeend",e[1]??Tp()),ku++,()=>{ku===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ku--}},[])}function Tp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qt=function(){return Qt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Qt.apply(this,arguments)};function u0(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}function CC(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ya="right-scroll-bar-position",wa="width-before-scroll-bar",TC="with-scroll-bars-hidden",RC="--removed-body-scroll-bar-size";function Cu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PC(e,t){var r=b.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var AC=typeof window<"u"?b.useLayoutEffect:b.useEffect,Rp=new WeakMap;function OC(e,t){var r=PC(null,function(n){return e.forEach(function(s){return Cu(s,n)})});return AC(function(){var n=Rp.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;
vendor: 4,196 bytes, lines 143-158
143s.forEach(function(a){i.has(a)||Cu(a,null)}),i.forEach(function(a){s.has(a)||Cu(a,o)})}Rp.set(r,e)},[e]),r}function NC(e){return e}function jC(e,t){t===void 0&&(t=NC);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var c=o;o=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),r}}}};return s}function IC(e){e===void 0&&(e={});var t=jC(null);return t.options=Qt({async:!0,ssr:!1},e),t}var c0=function(e){var t=e.sideCar,r=u0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Qt({},r))};c0.isSideCarExport=!0;function LC(e,t){return e.useMedium(t),c0}var d0=IC(),Tu=function(){},Nl=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:Tu,onWheelCapture:Tu,onTouchMoveCapture:Tu}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,y=e.noIsolation,p=e.inert,w=e.allowPinchZoom,g=e.as,m=g===void 0?"div":g,v=e.gapMode,x=u0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,E=OC([r,t]),k=Qt(Qt({},x),s);return b.createElement(b.Fragment,null,c&&b.createElement(_,{sideCar:d0,removeScrollBar:u,shards:d,noRelative:h,noIsolation:y,inert:p,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:v}),o?b.cloneElement(b.Children.only(a),Qt(Qt({},k),{ref:E})):b.createElement(m,Qt({},k,{className:l,ref:E}),a))});Nl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nl.classNames={fullWidth:wa,zeroRight:ya};var $C=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$C();return t&&e.setAttribute("nonce",t),e}function MC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var UC=function(){var e=0,t=null;return{add:function(r){e==0&&(t=DC())&&(MC(t,r),FC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},BC=function(){var e=UC();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},h0=function(){var e=BC(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},zC={left:0,top:0,right:0,gap:0},Ru=function(e){return parseInt(e||"",10)||0},HC=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Ru(r),Ru(n),Ru(s)]},WC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zC;var t=HC(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},VC=h0(),Ts="data-scroll-locked",qC=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),`
144  .`.concat(TC,` {
145   overflow: hidden `).concat(n,`;
146   padding-right: `).concat(a,"px ").concat(n,`;
147  }
148  body[`).concat(Ts,`] {
149    overflow: hidden `).concat(n,`;
150    overscroll-behavior: contain;
151    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
152    padding-left: `.concat(s,`px;
153    padding-top: `).concat(i,`px;
154    padding-right: `).concat(o,`px;
155    margin-left:0;
156    margin-top:0;
157    margin-right: `).concat(a,"px ").concat(n,`;
158    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
158")].filter(Boolean).join(""),`
159  }
160  
161  .`).concat(ya,` {
162    right: `).concat(a,"px ").concat(n,`;
163  }
164  
165  .`).concat(wa,` {
166    margin-right: `).concat(a,"px ").concat(n,`;
167  }
168  
169  .`).concat(ya," .").concat(ya,` {
170    right: 0 `).concat(n,`;
171  }
172  
173  .`).concat(wa," .").concat(wa,` {
174    margin-right: 0 `).concat(n,`;
175  }
176  
177  body[`).concat(Ts,`] {
178    `).concat(RC,": ").concat(a,`px;
179  }
180`)},Pp=function(){var e=parseInt(document.body.getAttribute(Ts)||"0",10);return isFinite(e)?e:0},KC=function(){b.useEffect(function(){return document.body.setAttribute(Ts,(Pp()+1).toString()),function(){var e=Pp()-1;e<=0?document.body.removeAttribute(Ts):document.body.setAttribute(Ts,e.toString())}},[])},GC=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;KC();var i=b.useMemo(function(){return WC(s)},[s]);return b.createElement(VC,{styles:qC(i,!t,s,r?"":"!important")})},Hc=!1;if(typeof window<"u")try{var qo=Object.defineProperty({},"passive",{get:function(){return Hc=!0,!0}});window.addEventListener("test",qo,qo),window.removeEventListener("test",qo,qo)}catch{Hc=!1}var qn=Hc?{passive:!1}:!1,QC=function(e){return e.tagName==="TEXTAREA"},f0=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!QC(e)&&r[t]==="visible")},JC=function(e){return f0(e,"overflowY")},YC=function(e){return f0(e,"overflowX")},Ap=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=p0(e,n);if(s){var i=m0(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},XC=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ZC=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},p0=function(e,t){return e==="v"?JC(t):YC(t)},m0=function(e,t){return e==="v"?XC(t):ZC(t)},eT=function(e,t){return e==="h"&&t==="rtl"?-1:1},tT=function(e,t,r,n,s){var i=eT(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,c=o>0,d=0,f=0;do{if(!a)break;var h=m0(e,a),y=h[0],p=h[1],w=h[2],g=p-w-i*y;(y||g)&&p0(e,a)&&(d+=g,f+=y);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(Math.abs(d)<1||!s)||!c&&(Math.abs(f)<1||!s))&&(u=!0),u},Ko=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Op=function(e){return[e.deltaX,e.deltaY]},Np=function(e){return e&&"current"in e?e.current:e},rT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nT=function(e){return`
181  .block-interactivity-`.concat(e,` {pointer-events: none;}
182  .allow-interactivity-`).concat(e,` {pointer-events: all;}
183`)},sT=0,Kn=[];function iT(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),s=b.useState(sT++)[0],i=b.useState(h0)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=CC([e.lockRef.current],(e.shards||[]).map(Np),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var g=Ko(p),m=r.current,v="deltaX"in p?p.deltaX:m[0]-g[0],x="deltaY"in p?p.deltaY:m[1]-g[1],_,E=p.target,k=Math.abs(v)>Math.abs(x)?"h":"v";if("touches"in p&&k==="h"&&E.type==="range")return!1;var P=Ap(k,E);if(!P)return!0;if(P?_=k:(_=k==="v"?"h":"v",P=Ap(k,E)),!P)return!1;if(!n.current&&"changedTouches"in p&&(v||x)&&(n.current=_),!_)return!0;var O=n.current||_;return tT(O,w,p,O==="h"?v:x,!0)},[]),l=b.useCallback(function(p){var w=p;if(!(!Kn.length||Kn[Kn.length-1]!==i)){var g="deltaY"in w?Op(w):Ko(w),m=t.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&rT(_.delta,g)})[0];if(m&&m.should){w.cancelable&&w.preventDefault();return}
vendor: 4,333 bytes, line 183
183if(!m){var v=(o.current.shards||[]).map(Np).filter(Boolean).filter(function(_){return _.contains(w.target)}),x=v.length>0?a(w,v[0]):!o.current.noIsolation;x&&w.cancelable&&w.preventDefault()}}},[]),u=b.useCallback(function(p,w,g,m){var v={name:p,delta:w,target:g,should:m,shadowParent:oT(g)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(x){return x!==v})},1)},[]),c=b.useCallback(function(p){r.current=Ko(p),n.current=void 0},[]),d=b.useCallback(function(p){u(p.type,Op(p),p.target,a(p,e.lockRef.current))},[]),f=b.useCallback(function(p){u(p.type,Ko(p),p.target,a(p,e.lockRef.current))},[]);b.useEffect(function(){return Kn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,qn),document.addEventListener("touchmove",l,qn),document.addEventListener("touchstart",c,qn),function(){Kn=Kn.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,qn),document.removeEventListener("touchmove",l,qn),document.removeEventListener("touchstart",c,qn)}},[]);var h=e.removeScrollBar,y=e.inert;return b.createElement(b.Fragment,null,y?b.createElement(i,{styles:nT(s)}):null,h?b.createElement(GC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aT=LC(d0,iT);var g0=b.forwardRef(function(e,t){return b.createElement(Nl,Qt({},e,{ref:t,sideCar:aT}))});g0.classNames=Nl.classNames;var lT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gn=new WeakMap,Go=new WeakMap,Qo={},Pu=0,v0=function(e){return e&&(e.host||v0(e.parentNode))},uT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=v0(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},cT=function(e,t,r,n){var s=uT(t,Array.isArray(e)?e:[e]);Qo[r]||(Qo[r]=new WeakMap);var i=Qo[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(n),y=h!==null&&h!=="false",p=(Gn.get(f)||0)+1,w=(i.get(f)||0)+1;Gn.set(f,p),i.set(f,w),o.push(f),p===1&&y&&Go.set(f,!0),w===1&&f.setAttribute(r,"true"),y||f.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),a.clear(),Pu++,function(){o.forEach(function(d){var f=Gn.get(d)-1,h=i.get(d)-1;Gn.set(d,f),i.set(d,h),f||(Go.has(d)||d.removeAttribute(n),Go.delete(d)),h||d.removeAttribute(r)}),Pu--,Pu||(Gn=new WeakMap,Gn=new WeakMap,Go=new WeakMap,Qo={})}},dT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=lT(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),cT(n,s,r,"aria-hidden")):function(){return null}},jl="Dialog",[y0,jA]=go(jl),[hT,Ft]=y0(jl),w0=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=b.useRef(null),l=b.useRef(null),[u,c]=Iv({prop:n,defaultProp:s??!1,onChange:i,caller:jl});return S.jsx(hT,{scope:t,triggerRef:a,contentRef:l,contentId:wu(),titleId:wu(),descriptionId:wu(),open:u,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:o,children:r})};w0.displayName=jl;var b0="DialogTrigger",fT=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ft(b0,r),i=We(t,s.triggerRef);return S.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":yh(s.open),...n,ref:i,onClick:he(e.onClick,s.onOpenToggle)})});fT.displayName=b0;var gh="DialogPortal",[pT,x0]=y0(gh,{forceMount:void 0}),S0=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Ft(gh,t);return S.jsx(pT,{scope:t,forceMount:r,children:b.Children.map(n,o=>S.jsx(Qs,{present:r||i.open,children:S.jsx(Yd,{asChild:!0,container:s,children:o})}))})};S0.displayName=gh;var Xa="DialogOverlay",_0=b.forwardRef((e,t)=>{const r=x0(Xa,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Ft(Xa,e.__scopeDialog);return i.modal?S.jsx(Qs,{present:n||i.open,children:S.jsx(gT,{...s,ref:t})}):null});_0.displayName=Xa;var mT=Qi("DialogOverlay.RemoveScroll"),gT=b.forwardRef((e,t)=>
vendor: 4,628 bytes, lines 183-187
183{const{__scopeDialog:r,...n}=e,s=Ft(Xa,r);return S.jsx(g0,{as:mT,allowPinchZoom:!0,shards:[s.contentRef],children:S.jsx(_e.div,{"data-state":yh(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),$n="DialogContent",E0=b.forwardRef((e,t)=>{const r=x0($n,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Ft($n,e.__scopeDialog);return S.jsx(Qs,{present:n||i.open,children:i.modal?S.jsx(vT,{...s,ref:t}):S.jsx(yT,{...s,ref:t})})});E0.displayName=$n;var vT=b.forwardRef((e,t)=>{const r=Ft($n,e.__scopeDialog),n=b.useRef(null),s=We(t,r.contentRef,n);return b.useEffect(()=>{const i=n.current;if(i)return dT(i)},[]),S.jsx(k0,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault())})}),yT=b.forwardRef((e,t)=>{const r=Ft($n,e.__scopeDialog),n=b.useRef(!1),s=b.useRef(!1);return S.jsx(k0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),k0=b.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Ft($n,r),l=b.useRef(null),u=We(t,l);return kC(),S.jsxs(S.Fragment,{children:[S.jsx(a0,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:S.jsx(wl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":yh(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(wT,{titleId:a.titleId}),S.jsx(xT,{contentRef:l,descriptionId:a.descriptionId})]})]})}),vh="DialogTitle",C0=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ft(vh,r);return S.jsx(_e.h2,{id:s.titleId,...n,ref:t})});C0.displayName=vh;var T0="DialogDescription",R0=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ft(T0,r);return S.jsx(_e.p,{id:s.descriptionId,...n,ref:t})});R0.displayName=T0;var P0="DialogClose",A0=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ft(P0,r);return S.jsx(_e.button,{type:"button",...n,ref:t,onClick:he(e.onClick,()=>s.onOpenChange(!1))})});A0.displayName=P0;function yh(e){return e?"open":"closed"}var O0="DialogTitleWarning",[IA,N0]=qx(O0,{contentName:$n,titleName:vh,docsSlug:"dialog"}),wT=({titleId:e})=>{const t=N0(O0),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
184
185If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
186
187For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},bT="DialogDescriptionWarning",xT=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${N0(bT).contentName}}.`;return b.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ST=w0,_T=S0,j0=_0,I0=E0,L0=C0,$0=R0,ET=A0;const kT=ST,CT=_T,D0=b.forwardRef(({className:e,...t},r)=>S.jsx(j0,{ref:r,className:Ke("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));D0.displayName=j0.displayName;const M0=b.forwardRef(({className:e,children:t,...r},n)=>S.jsxs(CT,{children:[S.jsx(D0,{}),S.jsxs(I0,{ref:n,className:Ke("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
187nded-lg",e),...r,children:[t,S.jsxs(ET,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[S.jsx(sy,{className:"h-4 w-4"}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));M0.displayName=I0.displayName;const F0=({className:e,...t})=>S.jsx("div",{className:Ke("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});F0.displayName="DialogHeader";const U0=b.forwardRef(({className:e,...t},r)=>S.jsx(L0,{ref:r,className:Ke("text-lg font-semibold leading-none tracking-tight",e),...t}));U0.displayName=L0.displayName;const B0=b.forwardRef(({className:e,...t},r)=>S.jsx($0,{ref:r,className:Ke("text-sm text-muted-foreground",e),...t}));B0.displayName=$0.displayName;const z0=b.forwardRef(({className:e,type:t,...r},n)=>S.jsx("input",{type:t,className:Ke("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));z0.displayName="Input";function TT(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 wh extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class PT extends wh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class jp extends wh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Ip extends wh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Wc;(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"})(Wc||(Wc={}));class AT{constructor(t,{headers:r={},customFetch:n,region:s=Wc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=RT(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return TT(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const y=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,y.searchParams.set("forceFunctionRegion",h));let p;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",p=u):typeof u=="string"?(f["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(f["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let w=c;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const g=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:p,signal:w}).catch(_=>{throw new PT(_)}),m=g.headers.get("x-relay-error");if(m&&m==="true")throw new jp(g);if(!g.ok)throw new Ip(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return v==="application/json"?x=yield g.json():v==="application/octet-stream"||v==="application/pdf"?x=yield g.blob():v==="text/event-stream"?x=g:v==="multipart/form-data"?x=yield g.formData():x=yield g.text(),{data:x,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof Ip||a instanceof jp?a.context:void 0}}finally{i&&clearTimeout(i)}})}}
187var OT=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},NT=class{constructor(e){var t,r,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,u=i.status,c=i.statusText;if(i.ok){var d,f;if(r.method!=="HEAD"){var h;const w=await i.text();w===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?a=w:a=JSON.parse(w))}const y=(d=r.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),p=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&p&&p.length>1&&(l=parseInt(p[1])),r.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await i.text();try{o=JSON.parse(y),Array.isArray(o)&&i.status===404&&(a=[],o=null,u=200,c="OK")}catch{i.status===404&&y===""?(u=204,c="No Content"):o={message:y}}if(o&&r.shouldThrowOnError)throw new OT(o)}return{error:o,data:a,count:l,status:u,statusText:c}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",u="";const c=i==null?void 0:i.cause;if(c){var d,f,h,y;const g=(d=c==null?void 0:c.message)!==null&&d!==void 0?d:"",m=(f=c==null?void 0:c.code)!==null&&f!==void 0?f:"";a=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,a+=`
188
189Caused by: ${(y=c==null?void 0:c.name)!==null&&y!==void 0?y:"Error"}: ${g}`,m&&(a+=` (${m})`),c!=null&&c.stack&&(a+=`
190${c.stack}`)}else{var p;a=(p=i==null?void 0:i.stack)!==null&&p!==void 0?p:""}const w=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",l="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((c==null?void 0:c.name)==="HeadersOverflowError"||(c==null?void 0:c.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",l="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(l+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:u},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},jT=class extends NT{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}
190explain({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 Lp=new RegExp("[,()]");var ts=class extends jT{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"&&Lp.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"&&Lp.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},IT=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new ts({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1900){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new ts({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new ts({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ts({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ts({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function eo(e){"@babel/helpers - typeof";return eo=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},eo(e)}function LT(e,t){if(eo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $T(e){var t=LT(e,"string");return eo(t)=="symbol"?t:t+""}function DT(e,t,r){return(t=$T(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $p(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 Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$p(Object(r),!0).forEach(function(n){DT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var MT=class H0{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,u)=>{const c=new AbortController,d=setTimeout(()=>c.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(d),a(l,u);const h=()=>{clearTimeout(d),c.abort()};return f.addEventListener("abort",h,{once:!0}),a(l,Jo(Jo({},u),{},{signal:c.signal})).finally(()=>{clearTimeout(d),f.removeEventListener("abort",h)})}return a(l,Jo(Jo({},u),{},{signal:c.signal})).finally(()=>clearTimeout(d))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new IT(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new H0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=n&&Object.values(r).some(c);d?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,y])=>y!==void 0).map(([h,y])=>[h,Array.isArray(y)?`{${y.join(",")}}`:`${y}
190`]).forEach(([h,y])=>{l.searchParams.append(h,y)})):(a="POST",u=r);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new ts({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class FT{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
191import ws from "ws"
192new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
193
194Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const UT="2.101.1",BT=`realtime-js/${UT}`,zT="1.0.0",W0="2.0.0",HT=W0,WT=1e4,VT=100,Dr={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"},Vc={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class qT{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);
194let y=new DataView(h),p=0;y.setUint8(p++,this.KINDS.userBroadcastPush),y.setUint8(p++,l.length),y.setUint8(p++,a.length),y.setUint8(p++,o.length),y.setUint8(p++,u.length),y.setUint8(p++,d.length),y.setUint8(p++,r),Array.from(l,g=>y.setUint8(p++,g.charCodeAt(0))),Array.from(a,g=>y.setUint8(p++,g.charCodeAt(0))),Array.from(o,g=>y.setUint8(p++,g.charCodeAt(0))),Array.from(u,g=>y.setUint8(p++,g.charCodeAt(0))),Array.from(d,g=>y.setUint8(p++,g.charCodeAt(0)));var w=new Uint8Array(h.byteLength+n.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(n),h.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+i));l=l+i;const d=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,y={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ie;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ie||(ie={}));const Dp=(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]=KT(o,e,t,s),i),{}):{}},KT=(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)?q0(i,o):qc(o)},q0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return YT(t,r)}switch(e){case ie.bool:return GT(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return QT(t);case ie.json:case ie.jsonb:return JT(t);case ie.timestamp:return XT(t);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return qc(t);default:return qc(t)}},qc=e=>e,GT=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},QT=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},JT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},YT=(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=>q0(t,a))}return e},XT=e=>typeof e=="string"?e.replace(" ","T"):e,K0=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 Pi=e=>typeof e=="function"?e:function(){return e},ZT=typeof self<"u"?self:null,rs=typeof window<"u"?window:null,Ht=ZT||rs||globalThis,eR="2.0.0",tR=1e4,rR=1e3,Kt={connecting:0,open:1,closing:2,closed:3},Ge={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},or={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Kc={longpoll:"longpoll",websocket:"websocket"},nR={complete:4},Gc="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 194
194oks=[],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})}},G0=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))}},sR=class{constructor(e,t,r){this.state=Ge.closed,this.topic=e,this.params=Pi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Yo(this,or.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new G0(()=>{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=Ge.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ge.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=Ge.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=Ge.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,or.leave,Pi({}),this.timeout).send(),this.state=Ge.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(or.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=Ge.closed,this.bindings=[]}onClose(e){this.on(or.close,e)}onError(e){return this.on(or.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=Ge.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(or.close,"leave")},r=new Yo(this,or.leave,Pi({}),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=Ge.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===Ge.closed}isErrored(){return this.state===Ge.errored}isJoined(){return this.state===Ge.joined}isJoining(){return this.state===Ge.joining}isLeaving(){return this.state===Ge.leaving}},Za=class{static request(e,t,r,n,s,i,o){if(Ht.XDomainRequest){let a=new Ht.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(Ht.XMLHttpRequest){let a=new Ht.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(Ht.fetch&&Ht.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),Ht.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===nR.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)}`}},iR=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)},Qn=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Gc)&&(this.authToken=atob(t[1].slice(Gc.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=Kt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Kc.websocket),"$1/"+Kc.longpoll)}endpointURL(){return Za.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Kt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Kt.open||this.readyState===Kt.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=Kt.open,this.onopen({}),this.poll();break;
194case 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=iR(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(`
195`),()=>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=Kt.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)}},oR=class vi{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=vi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=vi.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=vi.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 vi.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(p=>p.phx_ref),f=c.metas.map(p=>p.phx_ref),h=u.metas.filter(p=>f.indexOf(p.phx_ref)<0),y=c.metas.filter(p=>d.indexOf(p.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),y.length>0&&(a[l]=this.clone(c),a[l].metas=y)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},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,595 bytes, line 195
195switch(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:or.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}}},aR=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||tR,this.transport=t.transport||Ht.WebSocket||Qn,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Ht&&Ht.sessionStorage,this.establishedConnections=0,this.defaultEncoder=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!==Qn?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;rs&&rs.addEventListener&&(rs.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),rs.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),rs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,s,i)=>{console.log(`${n}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Pi(t.params||{}),this.endPoint=`${e}/${Kc.websocket}`,this.vsn=t.vsn||eR,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new G0(()=>{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 Qn}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=Pi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Qn?this.connectWithFallback(Qn,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 Qn:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Gc}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),rR,"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===Kt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
195triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(or.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Kt.connecting:return"connecting";case Kt.open:return"open";case Kt.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 sR(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 Ai{constructor(t,r){const n=uR(r);this.presence=new oR(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=Ai.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Ai.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ai.transformState(this.presence.state)}static transformState(t){return t=lR(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=ba(s),r},{})}static onJoinPayload(t,r,n){const s=Mp(r),i=ba(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Mp(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 lR(e){return JSON.parse(JSON.stringify(e))}function uR(e){return(e==null?void 0:e.events)&&{events:e.events}}function Mp(e){return e!=null&&e.metas?ba(e):[]}var Fp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Fp||(Fp={}));class cR{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Ai(this.channel.channelAdapter,r)}}class dR{constructor(t,r,n){const s=hR(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>VT){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===Dr.joined}isJoined(){return this.state===Dr.joined}isJoining(){return this.state===Dr.joining}isClosed(){return this.state===Dr.closed}isLeaving(){return this.state===Dr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function hR(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Up;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Up||(Up={}));var vs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(vs||(vs={}));var ar;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ar||(ar={}));class Oi{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 dR(this.socket.socketAdapter,t,this.params),this.presence=new cR(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=K0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[vs.PRESENCE]&&this.bindings[vs.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(ar.CHANNEL_ERROR,h)}),this._onClose(()=>t==null?void 0:t(ar.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(ar.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
195).receive("error",h=>{this.state=Dr.errored,t==null||t(ar.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ar.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&&Oi.isFilterValueEqual(h.schema,c)&&Oi.isFilterValueEqual(h.table,d)&&Oi.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Dr.errored,r==null||r(ar.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Dr.errored&&r&&r(ar.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===vs.PRESENCE||t===vs.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("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
195in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=r.ids)===null||o===void 0?void 0:o.includes(h))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=r==null?void 0:r.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=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=Dp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Dp(t.columns,t.old_record)),r}}class fR{constructor(t,r){this.socket=new aR(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()==Vc.connecting}isDisconnecting(){return this.socket.connectionState()==Vc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const pR={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},mR=[1e3,2e3,5e3,1e4],gR=1e4,vR=`
196  addEventListener("message", (e) => {
197    if (e.data.event === "start") {
198      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
199    }
200  });`;class yR{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={}
200,this.ref=0,this.serializer=new qT,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new fR(t,s),this.httpEndpoint=K0(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
201
202To use Realtime in Node.js, you need to provide a WebSocket implementation:
203
204Option 1: Use Node.js 22+ which has native WebSocket support
205Option 2: Install and provide the "ws" package:
206
207  npm install ws
208
209  import ws from "ws"
210  const client = new RealtimeClient(url, {
211    ...options,
212    transport: ws
213  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Vc.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 Oi(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:BT};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([vR],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,c;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const d={};
213d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:WT,d.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:pR.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:FT.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:p=>mR[p-1]||gR;let f,h;const y=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:HT;switch(y){case zT:f=(p,w)=>w(JSON.stringify(p)),h=(p,w)=>w(JSON.parse(p));break;case W0:f=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=y,d.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,d.decode=(c=t==null?void 0:t.decode)!==null&&c!==void 0?c:h,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var to=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 wR(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 bR(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 xR(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=wR(e.baseUrl,n,s),l=await bR(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,y=h==null?void 0:h.error;throw new to((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Zo(e){return e.join("�")}var SR=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 to&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof to&&r.status===409)return;throw r}}};function Jn(e){return e.join("�")}var _R=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/${Jn(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/${Jn(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/${Jn(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/${Jn(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/${Jn(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/${Jn(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof to&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof to&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},ER=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=xR({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new SR(this.client,t),this.tableOps=new _R(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)}
213async 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)}},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}};function Ll(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Qc=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{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Q0=class extends Il{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const kR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),CR=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)},Jc=e=>{if(Array.isArray(e))return e.map(r=>Jc(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]=Jc(n)}),t},TR=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function ro(e){"@babel/helpers - typeof";return ro=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},ro(e)}function RR(e,t){if(ro(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PR(e){var t=RR(e,"string");return ro(t)=="symbol"?t:t+""}function AR(e,t,r){return(t=PR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bp(Object(r),!0).forEach(function(n){AR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const zp=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},OR=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Qc(zp(o),i,a,n))}).catch(()=>{const o=i+"";t(new Qc(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new Q0(zp(e),e,n))},NR=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!n?B(B({},s),r):(CR(n)?(s.headers=B({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),B(B({},s),r))};async function hi(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,NR(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=>OR(u,l,n,o))})}function J0(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,B(B({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>hi(t,"DELETE",r,s,i,n,e)}}const jR=J0("storage"),{get:no,post:Rt,put:Yc,head:IR,remove:bh}=jR,it=J0("vectors");var Zs=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=kR(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=B(B({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ll(r))return{data:null,error:r};throw r}}},LR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ll(t))return{data:null,error:t};throw t}}};let Y0;Y0=Symbol.toStringTag;var $R=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Y0]="BlobDownloadBuilder",this.promise=null}asStream(){return new LR(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 DR={limit:100,offset:0,sortBy:{column:"name",order:"asc"}}
213,Hp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var MR=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=B(B({},Hp),n);let a=B(B({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=B(B({},a),n.headers));const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),d=await(e=="PUT"?Yc:Rt)(s.fetch,`${s.url}/object/${c}`,i,B({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=B(B({},Hp),n),c=B(B({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{path:i,fullPath:(await Yc(s.fetch,a.toString(),l,{headers:c})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=B({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Rt(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 Rt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
213stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Rt(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 Rt(n.fetch,`${n.url}/object/sign/${s}`,B({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"",l=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${n.url}${l}${a}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Rt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(o=>B(B({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>no(this.fetch,`${this.url}/${n}/${o}${i}`,{headers:this.headers,noResolveJson:!0},r);return new $R(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Jc(await no(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await IR(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 Qc?s.status:s instanceof Q0?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await bh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=B(B(B({},DR),t),{},{prefix:e||""});return await Rt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=B({},e);return await Rt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const FR="2.101.1",wo={"X-Client-Info":`storage-js/${FR}`};var UR=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=B(B({},wo),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await no(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await no(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Rt(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 Yc(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 Rt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await bh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},BR=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},wo),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Rt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
213{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 no(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await bh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!TR(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 ER({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}}}}})}},zR=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},wo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await it.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await it.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},HR=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},wo),{},{"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 it.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},WR=class extends Zs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},wo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await it.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},VR=class extends WR{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new qR(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)}},qR=class extends zR{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}
213async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new KR(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},KR=class extends HR{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},GR=class extends UR{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new MR(this.url,this.headers,e,this.fetch)}get vectors(){return new VR(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new BR(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}const X0="2.101.1",ns=30*1e3,Xc=3,Au=Xc*ns,QR="http://localhost:9999",JR="supabase.auth.token",YR={"X-Client-Info":`gotrue-js/${X0}`},Zc="X-Supabase-Api-Version",Z0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},XR=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ZR=10*60*1e3;class so extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class eP extends so{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function tP(e){return M(e)&&e.name==="AuthApiError"}class vn extends so{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class xr extends so{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class rt extends xr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ou(e){return M(e)&&e.name==="AuthSessionMissingError"}class Yn extends xr{constructor(){super("Auth session or user missing","AuthInvalidToken
213ResponseError",500,void 0)}}class ea extends xr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ta extends xr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function rP(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class Wp extends xr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class nP extends xr{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 ed extends xr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Nu(e){return M(e)&&e.name==="AuthRetryableFetchError"}class Vp extends xr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class td extends xr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const el="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),qp=` 	
214\r=`.split(""),sP=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<qp.length;t+=1)e[qp[t].charCodeAt(0)]=-2;for(let t=0;t<el.length;t+=1)e[el[t].charCodeAt(0)]=t;return e})();function Kp(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(el[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(el[n]),t.queuedBits-=6}}function ew(e,t,r){const n=sP[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 Gp(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{aP(o,n,r)};for(let o=0;o<e.length;o+=1)ew(e.charCodeAt(o),s,i);return t.join("")}function iP(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 oP(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}iP(n,t)}}function aP(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 Rs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)ew(e.charCodeAt(s),r,n);return new Uint8Array(t)}function lP(e){const t=[];return oP(e,r=>t.push(r)),new Uint8Array(t)}function xn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Kp(s,r,n)),Kp(null,r,n),t.join("")}function uP(e){return Math.round(Date.now()/1e3)+e}function cP(){return Symbol("auth-callback")}const Pe=()=>typeof window<"u"&&typeof document<"u",hn={tested:!1,writable:!1},tw=()=>{if(!Pe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(hn.tested)return hn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),hn.tested=!0,hn.writable=!0}catch{hn.tested=!0,hn.writable=!1}return hn.writable};function dP(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
214h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const rw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hP=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ss=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},fn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Re=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 ra(e){const t=e.split(".");if(t.length!==3)throw new td("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!XR.test(t[n]))throw new td("JWT not in base64url format");return{header:JSON.parse(Gp(t[0])),payload:JSON.parse(Gp(t[1])),signature:Rs(t[2]),raw:{header:t[0],payload:t[1]}}}async function fP(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function pP(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 mP(e){return("0"+e.toString(16)).substr(-2)}function gP(){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,mP).join("")}async function vP(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 yP(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 vP(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Xn(e,t,r=!1){const n=gP();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await ss(e,`${t}-code-verifier`,s);const i=await yP(n);return[i,n===i?"plain":"s256"]}const wP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function bP(e){const t=e.headers.get(Zc);if(!t||!t.match(wP))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function xP(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 SP(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 _P=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Zn(e){if(!_P.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ju(){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 EP(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Qp(e){return JSON.parse(JSON.stringify(e))}const gn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),kP=[502,503,504];async function Jp(e){var t;if(!hP(e))throw new ed(gn(e),0);if(kP.includes(e.status))throw new ed(gn(e),e.status);let r;try{r=await e.json()}catch(i){throw new vn(gn(i),i)}let n;const s=bP(e);if(s&&s.getTime()>=Z0["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 Vp(gn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new rt}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)=>
214i&&typeof o=="string",!0))throw new Vp(gn(r),e.status,r.weak_password.reasons);throw new eP(gn(r),e.status||500,n)}const CP=(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 F(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Zc]||(i[Zc]=Z0["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 TP(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 TP(e,t,r,n,s,i){const o=CP(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new ed(gn(l),0)}if(a.ok||await Jp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Jp(l)}}function kt(e){var t;let r=null;AP(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=uP(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Yp(e){const t=kt(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 Mr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function RP(e){return{data:e,error:null}}function PP(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 Xp(e){return e}function AP(e){return e.access_token&&e.refresh_token&&e.expires_in}const Iu=["global","local","others"];class OP{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=rw(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,r=Iu[0]){if(Iu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Iu.join(", ")}`);try{return await F(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await F(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Mr})}catch(n){if(M(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 F(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:PP,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(M(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await F(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Mr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await F(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:Xp});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>
2140&&(h.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Zn(t);try{return await F(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Mr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Zn(t);try{return await F(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Mr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Zn(t);try{return await F(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Mr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Zn(t.userId);try{const{data:r,error:n}=await F(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Zn(t.userId),Zn(t.id);try{return{data:await F(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await F(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:Xp});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await F(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await F(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await F(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await F(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(M(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await F(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await F(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await F(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await F(this.fetch,"DELET
214E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}}function Zp(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Bt={debug:!!(globalThis&&tw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class nw extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class em extends nw{}async function NP(e,t,r){Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new em(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Bt.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(n.signal.aborted)return Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Bt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new em(`Lock "${e}" was released because another request stole it`)}throw i}}function jP(){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 sw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function IP(e){return parseInt(e,16)}function LP(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function $P(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(`
215`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=sw(e.address),y=c?`${c}://${n}`:n,p=e.statement?`${e.statement}
216`:"",w=`${y} wants you to sign in with your Ethereum account:
217${h}
218
219${p}`;let g=`URI: ${d}
220Version: ${f}
221Chain ID: ${r}${o?`
222Nonce: ${o}`:""}
223Issued At: ${i.toISOString()}`;if(s&&(g+=`
224Expiration Time: ${s.toISOString()}`),a&&(g+=`
225Not Before: ${a.toISOString()}`),l&&(g+=`
226Request ID: ${l}`),u){let m=`
227Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);m+=`
228- ${v}`}g+=m}return`${w}
229${g}`}
229class xe extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class tl extends xe{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function DP({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 xe({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 xe({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 xe({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 xe({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 xe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new xe({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 xe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new xe({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(iw(o)){if(i.rp.id!==o)return new xe({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new xe({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 xe({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 xe({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 xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function MP({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 xe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new xe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(iw(n)){if(r.rpId!==n)return new xe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new xe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new xe({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 xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class FP{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 UP=new FP;function BP(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=Rs(t).buffer,o=Object.assign(Object.assign({},r),{id:Rs(r.id).buffer}),a=Object.assign(Object.assign({}
229,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:Rs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function zP(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=Rs(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:Rs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function HP(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:xn(new Uint8Array(e.response.attestationObject)),clientDataJSON:xn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function WP(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:xn(new Uint8Array(s.authenticatorData)),clientDataJSON:xn(new Uint8Array(s.clientDataJSON)),signature:xn(new Uint8Array(s.signature)),userHandle:s.userHandle?xn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function iw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function tm(){var e,t;return!!(Pe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function VP(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new tl("Browser returned unexpected credential type",t)}:{data:null,error:new tl("Empty credential response",t)}}catch(t){return{data:null,error:DP({error:t,options:e})}}}async function qP(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new tl("Browser returned unexpected credential type",t)}:{data:null,error:new tl("Empty credential response",t)}}catch(t){return{data:null,error:MP({error:t,options:e})}}}const KP={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},GP={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function rl(...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]=rl(a,o):n[i]=rl(o)}else n[i]=o}return n}function QP(e,t){return rl(KP,e,t||{})}function JP(e,t){return rl(GP,e,t||{})}class YP{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??UP.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=n;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,y=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${y}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=QP(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await VP({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=JP(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await qP(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new vn("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 so("rpId is required for WebAuthn authentication")};try{if(!tm())return{data:null,error:new vn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new vn("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 so("rpId is required for WebAuthn registration")};try{if(!tm())return{data:null,error:new vn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new vn("Unexpected error in register",o)}}}}jP();const XP={url:QR,storageKey:JR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:YR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function rm(e,t,r){return await r()}const es={};class io{get jwks(){var t,r;return(r=(t=es[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){es[this.storageKey]=Object.assign(Object.assign({},es[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=es[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){es[this.storageKey]=Object.assign(Object.assign({},es[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({}
229,XP),t);if(this.storageKey=i.storageKey,this.instanceID=(r=io.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,io.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Pe()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new OP({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=rw(i.fetch),this.lock=i.lock||rm,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&Pe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=NP:this.lock=rm,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 YP(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:tw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Zp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Zp(this.memoryStorage)),Pe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${X0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Pe()&&(r=dP(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Pe()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),rP(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return M(r)?this._returnResult({error:r}):this._returnResult({error:new vn("Unexpected error during initialization",r)}
229)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await F(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:kt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Xn(this.storage,this.storageKey)),i=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:y},xform:kt})}else if("phone"in t){const{phone:c,password:d,options:f}=t;i=await F(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:kt})}else throw new ea("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Re(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 Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await F(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:Yp})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await F(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:Yp})}else throw new ea("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 Yn;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,c,d,f;let h,y;if("message"in t)h=t.message,y=t.signature;else{const{chain:p,wallet:w,statement:g,options:m}=t;let v;if(Pe())if(typeof w=="object")v=w;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")v=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const x=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),_=await v.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=sw(_[0]);let k=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const O=await v.request({method:"eth_chainId"});k=IP(O)}const P={domain:x.host,address:E,statement:g,uri:x.href,version:"1",chainId:k,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=$P(P),y=await v.request({method:"personal_sign",params:[LP(h),E]})}try{const{data:p,error:w}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:kt});if(w)throw w;if(!p||!p.session||!p.user){const g=new Yn;return this._returnResult({data:{user:null,session:null},error:g})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:w})}catch(p){if(M(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,c,d,f,h;let y,p;if("message"in t)y=t.message,p=t.signature;else{const{chain:w,wallet:g,statement:m,options:v}=t;let x;
229if(Pe())if(typeof g=="object")x=g;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"))x=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 g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=g}const _=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const E=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),m?{statement:m}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)y=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),p=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${_.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((d=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
230`);const E=await x.signMessage(new TextEncoder().encode(y),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=E}}try{const{data:w,error:g}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:xn(p)},!((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:kt});if(g)throw g;if(!w||!w.session||!w.user){const m=new Yn;return this._returnResult({data:{user:null,session:null},error:m})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:g})}catch(w){if(M(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await fn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new nP;const{data:i,error:o}=await F(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:kt});if(await Re(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Yn;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await F(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:kt}),{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 Yn;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Xn(this.storage,this.storageKey));const{error:d}=await F(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 F(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 ea("You must provide either an email or phone number.")}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await F(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:kt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Xn(this.storage,this.storageKey));const u=await F(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:RP});return!((i=u.data)===null||i===void 0)&&i.url&&Pe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new rt;const{error:s}=await F(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(M(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t,{error:o}=await F(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await F(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 ea("You must provide either an email or phone number and a type")}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await fn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
230id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Au:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await fn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=ju()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=EP(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Mr}):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 rt}:await F(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:Mr})})}catch(r){if(M(r))return Ou(r)&&(await this._removeSession(),await Re(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new rt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Xn(this.storage,this.storageKey));const{data:u,error:c}=await F(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:Mr});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 Re(this.storage,`${this.storageKey}-code-verifier`),M(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new rt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=ra(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(M(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new rt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Pe())throw new ta("No browser detected.");
230if(t.error||t.error_description||t.error_code)throw new ta(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 Wp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ta("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 Wp("No code detected.");const{data:m,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=t;if(!i||!a||!o||!u)throw new ta("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=ns&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const y=f-d;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,c);const{data:p,error:w}=await this._getUser(i);if(w)throw w;const g={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(n){if(M(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await fn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Ou(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&&!(tP(a)&&(a.status===404||a.status===401||a.status===403)||Ou(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Re(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=cP(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Xn(this.storage,this.storageKey,!0));try{return await F(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 Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await F(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Pe()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(M(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,d=await F(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:kt}),{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 Yn}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
230return await F(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await pP(async s=>(s>0&&await fP(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await F(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:kt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Nu(i)&&Date.now()+o-n<ns})}catch(n){if(this._debug(r,"error",n),M(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Pe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await fn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await fn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ss(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:ju()}else if(s&&!s.user&&!s.user){const o=await fn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Re(this.storage,this.storageKey+"-user"),await ss(this.storage,this.storageKey,s)):s.user=ju()}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()<Au;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Au}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Nu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new rt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Dl;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new rt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),M(i)){const o={data:null,error:i};return Nu(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Re(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 ss(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Qp(s);await ss(this.storage,this.storageKey,i)}else{const s=Qp(r);await ss(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Re(this.storage,this.storageKey),await Re(this.storage,this.storageKey+"-code-verifier"),await Re(this.storage,this.storageKey+"-user"),this.userStorage&&await Re(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Pe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
230catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ns);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/ns);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ns}ms, refresh threshold is ${Xc} ticks`),s<=Xc&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof nw)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Pe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Xn(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 F(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await F(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?HP(t.webauthn.credential_response):WP(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await F(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await F(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:BP(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:zP(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:h}=ra(t);let y=null;h.aal&&(y=h.aal);let p=y;const{data:{user:w},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(x=>x.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(p="aal2");const v=h.amr||[];return{data:{currentLevel:y,nextLevel:p,currentAuthenticationMethods:v},error:null}}catch(h){if(M(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
230=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}=ra(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 F(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 rt})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new rt});const o=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new rt});const o=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await F(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 rt})})}catch(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await F(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 rt})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+ZR>s)return n;const{data:i,error:o}=await F(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:y}
230=await this.getSession();if(y||!h.session)return this._returnResult({data:null,error:y});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=ra(n);r!=null&&r.allowExpired||xP(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const c=SP(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,lP(`${a}.${l}`)))throw new td("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}}io.nextInstanceID={};const ZP=io,eA="2.101.1";let yi="";typeof Deno<"u"?yi="deno":typeof document<"u"?yi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?yi="react-native":yi="node";const tA={"X-Client-Info":`supabase-js-${yi}/${eA}`},rA={headers:tA},nA={schema:"public"},sA={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},iA={};function oo(e){"@babel/helpers - typeof";return oo=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},oo(e)}function oA(e,t){if(oo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aA(e){var t=oA(e,"string");return oo(t)=="symbol"?t:t+""}function lA(e,t,r){return(t=aA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nm(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 ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nm(Object(r),!0).forEach(function(n){lA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const uA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),cA=()=>Headers,dA=(e,t,r)=>{const n=uA(r),s=cA();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,ve(ve({},o),{},{headers:u}))}};function hA(e){return e.endsWith("/")?e:e+"/"}function fA(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:ve(ve({},l),s),auth:ve(ve({},u),i),realtime:ve(ve({},c),o),storage:{},global:ve(ve(ve({},d),a),{},{headers:ve(ve({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function pA(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(hA(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var mA=class extends ZP{constructor(e){super(e)}},gA=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=pA(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:nA,realtime:iA,auth:ve(ve({},sA),{},{storageKey:o}),global:rA},l=fA(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=dA(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ve({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new MT(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 GR(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)}
230channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new mA({url:this.authUrl.href,headers:ve(ve({},f),c),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new yR(this.realtimeUrl.href,ve(ve({},e),{},{params:ve(ve({},{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 vA=(e,t,r)=>new gA(e,t,r);function yA(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}yA()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const wA="https://txixrcbnpxjfeobmscqs.supabase.co",bA="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InR4aXhyY2JucHhqZmVvYm1zY3FzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ4OTUzNTEsImV4cCI6MjA5MDQ3MTM1MX0.Jh_LQajcjYh1vc4fgrGzdnXZJKZ6U7uOhcIeJIPDNfI",xA=vA(wA,bA,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),SA=({open:e,onSuccess:t})=>{const[r,n]=b.useState(""),[s,i]=b.useState(!1),[o,a]=b.useState("");Tv();const l=c=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c),u=async c=>{if(c.preventDefault(),a(""),!l(r)){a("Please enter a valid email address.");return}i(!0);try{const{data:d,error:f}=await xA.functions.invoke("subscribe-mailchimp",{body:{email:r}});if(f)throw f;if(d!=null&&d.error)throw new Error(d.error);localStorage.setItem("eb_email_submitted","true"),t()}catch(d){console.error("Subscription error:",d),a("Something went wrong. Please try again.")}finally{i(!1)}};return S.jsx(kT,{open:e,onOpenChange:()=>{},children:S.jsxs(M0,{className:"sm:max-w-md [&>button]:hidden",onPointerDownOutside:c=>c.preventDefault(),onEscapeKeyDown:c=>c.preventDefault(),children:[S.jsxs(F0,{className:"text-center sm:text-center",children:[S.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:S.jsx(JS,{className:"h-6 w-6 text-primary"})}),S.jsx(U0,{className:"text-xl font-serif",children:"Unlock the Full Directory"}),S.jsxs(B0,{className:"text-sm leading-relaxed mt-2",children:["Enter your email to continue browsing and unlock"," ",S.jsx("strong",{children:"additional tools and resources"})," from"," ",S.jsx("a",{href:"https://www.explainingbrains.com",target:"_blank",rel:"noopener noreferrer",className:"underline text-primary hover:text-primary/80",children:"ExplainingBrains.com"}),"."]})]}),S.jsxs("form",{onSubmit:u,className:"mt-4 space-y-3",children:[S.jsxs("div",{className:"relative",children:[S.jsx(GS,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),S.jsx(z0,{type:"email",placeholder:"[email protected]",value:r,onChange:c=>{n(c.target.value),a("")},className:"pl-10",autoFocus:!0})]}),o&&S.jsx("p",{className:"text-sm text-destructive",children:o}),S.jsx(mh,{type:"submit",className:"w-full",disabled:s,children:s?"Subscribing…":"Continue"}),S.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"We respect your privacy. Unsubscribe anytime."})]})]})})},_A=()=>{const[e,t]=b.useState(""),[r,n]=b.useState([]),[s,i]=b.useState([]),[o,a]=b.useState(!1),[l,u]=b.useState(()=>{const h=localStorage.getItem("eb_email_submitted")==="true",y=localStorage.getItem("eb_email_gate_shown")==="true";return!h&&y});b.useEffect(()=>{if(localStorage.getItem("eb_email_submitted")==="true"||l)return;const y=setTimeout(()=>{localStorage.getItem("eb_email_submitted")!=="true"&&(localStorage.setItem("eb_email_gate_shown","true"),u(!0))},45*1e3);return()=>clearTimeout(y)},[l]);const c=h=>n(y=>y.includes(h)?y.filter(p=>p!==h):[...y,h]),d=h=>i(y=>y.includes(h)?y.filter(p=>p!==h):[...y,h]),f=b.useMemo(()=>xp.filter(h=>{if(e){const y=e.toLowerCase();if(!(h.name.toLowerCase().includes(y)||h.description.toLowerCase().includes(y)||h.categories.some(w=>w.toLowerCase().includes(y))))return!1}return!(r.length>0&&!h.categories.some(y=>r.includes(y))||s.length>0&&!h.ageGroups.some(y=>s.includes(y))||o&&h.isFree!==!0)}),[e,r,s,o]);return S.jsxs("div",{className:"min-h-screen bg-background",children:[S.jsx(SA,{open:l,onSuccess:()=>u(!1)}),S.jsxs("header",{className:"relative overflow-hidden bg-white",children:[S.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[S.jsx("div",{className:"absolute -top-24 -right-24 w-96 h-96 rounded-full bg-primary/5 blur-3xl"}),S.jsx("div",{className:"absolute -bottom-32 -left-16 w-80 h-80 rounded-full bg-accent/5 blur-3xl"})]}),S.jsxs("div",{className:"relative max-w-6xl mx-auto px-4 sm:px-6 py-16 sm:py-24 text-center",children:[S.jsx("p",{className:"text-sm sm:text-base font-medium tracking-widest uppercase text-muted-foreground mb-4",children:"Apps & Tools for Neurodivergent Learners"}),S.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-serif font-bold leading-tight max-w-3xl mx-auto",children:[S.jsx("span",{style:{color:"#05848f"},children:"Find tools that fit"}),S.jsx("br",{}),S.jsx("span",{style:{color:"#E6656F"},children:"your unique brain."})]}),S.jsx("p",{className:"mt-6 text-base sm:text-lg text-muted-foreground max-w-xl mx-auto leading-relaxed",children:"A curated directory for psychologists and educators helping neurodivergent students thrive."}),S.jsxs("div",{className:"mt-6 text-sm text-muted-foreground",children:["Curated by"," ",S.jsx("a",{href:"http://www.explainingbrains.com",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-primary transition-colors",children:"ExplainingBrains.com"})]})]})]}),S.jsxs("main",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-8",children:[S.jsx(vC,{search:e,onSearchChange:t,selectedCategories:r,onToggleCategory:c,selectedAgeGroups:s,onToggleAgeGroup:d,freeOnly:o,onToggleFree:()=>a(h=>!h),resultCount:f.length,totalCount:xp.length}),S.jsx("div",{className:"mt-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(h=>S.jsx(pC,{app:h},h.name))}),f.length===0&&S.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[S.jsx("p",{className:"text-lg",children:"No tools match your filters."}),S.jsx("p",{className:"text-sm mt-1",children:"Try adjusting your search or filters."})]})]})]})},EA=()=>{const e=o0();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),S.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:S.jsxs("div",{className:"text-center",children:[S.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),S.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),S.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},kA=new xk,CA=()=>S.jsx(_k,{client:kA,children:S.jsxs(YE,{children:[S.jsx(N_,{}),S.jsx(c1,{}),S.jsx(lC,{children:S.jsxs(iC,{children:[S.jsx(Bc,{path:"/",element:S.jsx(_A,{})}),S.jsx(Bc,{path:"*",element:S.jsx(EA,{})})]})})]})});Cv(document.getElementById("root")).render(S.jsx(CA,{}));

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.