PageSourceSearch

https://maestro-sound-showcase.lovable.app/assets/index-CkQrDkSH.js

js maestro-sound-showcase.lovable.app collected 2026-10-03 03:32:07 UTC 565,001 bytes, 206 lines download raw bytes

vendor: 6,255 bytes, lines 1-9
1var Op=e=>{throw TypeError(e)};var du=(e,t,n)=>t.has(e)||Op("Cannot "+n);var R=(e,t,n)=>(du(e,t,"read from private field"),n?n.call(e):t.get(e)),pe=(e,t,n)=>t.has(e)?Op("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Z=(e,t,n,r)=>(du(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(du(e,t,"access private method"),n);var ba=(e,t,n,r)=>({set _(o){Z(e,t,o,n)},get _(){return R(e,t,r)}});function F1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function U1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Sv={exports:{}},uc={},_v={exports:{}},ae={};/**
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 na=Symbol.for("react.element"),z1=Symbol.for("react.portal"),B1=Symbol.for("react.fragment"),W1=Symbol.for("react.strict_mode"),V1=Symbol.for("react.profiler"),H1=Symbol.for("react.provider"),K1=Symbol.for("react.context"),q1=Symbol.for("react.forward_ref"),G1=Symbol.for("react.suspense"),Q1=Symbol.for("react.memo"),Y1=Symbol.for("react.lazy"),jp=Symbol.iterator;function X1(e){return e===null||typeof e!="object"?null:(e=jp&&e[jp]||e["@@iterator"],typeof e=="function"?e:null)}var Ev={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cv=Object.assign,kv={};function ks(e,t,n){this.props=e,this.context=t,this.refs=kv,this.updater=n||Ev}ks.prototype.isReactComponent={};ks.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")};ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tv(){}Tv.prototype=ks.prototype;function Qf(e,t,n){this.props=e,this.context=t,this.refs=kv,this.updater=n||Ev}var Yf=Qf.prototype=new Tv;Yf.constructor=Qf;Cv(Yf,ks.prototype);Yf.isPureReactComponent=!0;var Ip=Array.isArray,Pv=Object.prototype.hasOwnProperty,Xf={current:null},Rv={key:!0,ref:!0,__self:!0,__source:!0};function Av(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Pv.call(t,r)&&!Rv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:na,type:e,key:s,ref:i,props:o,_owner:Xf.current}}function J1(e,t){return{$$typeof:na,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Jf(e){return typeof e=="object"&&e!==null&&e.$$typeof===na}function Z1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dp=/\/+/g;function fu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Z1(""+e.key):t.toString(36)}function tl(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case na:case z1:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+fu(i,0):r,Ip(o)?(n="",e!=null&&(n=e.replace(Dp,"$&/")+"/"),tl(o,t,n,"",function(c){return c})):o!=null&&(Jf(o)&&(o=J1(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Dp,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Ip(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+fu(s,a);i+=tl(s,t,n,l,o)}else if(l=X1(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+fu(s,a++),i+=tl(s,t,n,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Sa(e,t,n){if(e==null)return e;var r=[],o=0;return tl(e,r,"","",function(s){return t.call(n,s,o++)}),r}function e_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},nl={transition:null},t_={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:nl,ReactCurrentOwner:Xf};function Nv(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,480 bytes, lines 9-25
9ae.Children={map:Sa,forEach:function(e,t,n){Sa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Sa(e,function(){t++}),t},toArray:function(e){return Sa(e,function(t){return t})||[]},only:function(e){if(!Jf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=ks;ae.Fragment=B1;ae.Profiler=V1;ae.PureComponent=Qf;ae.StrictMode=W1;ae.Suspense=G1;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t_;ae.act=Nv;ae.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Cv({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Xf.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Pv.call(t,l)&&!Rv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:na,type:e.type,key:o,ref:s,props:r,_owner:i}};ae.createContext=function(e){return e={$$typeof:K1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:H1,_context:e},e.Consumer=e};ae.createElement=Av;ae.createFactory=function(e){var t=Av.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:q1,render:e}};ae.isValidElement=Jf;ae.lazy=function(e){return{$$typeof:Y1,_payload:{_status:-1,_result:e},_init:e_}};ae.memo=function(e,t){return{$$typeof:Q1,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=nl.transition;nl.transition={};try{e()}finally{nl.transition=t}};ae.unstable_act=Nv;ae.useCallback=function(e,t){return dt.current.useCallback(e,t)};ae.useContext=function(e){return dt.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};ae.useEffect=function(e,t){return dt.current.useEffect(e,t)};ae.useId=function(){return dt.current.useId()};ae.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return dt.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};ae.useRef=function(e){return dt.current.useRef(e)};ae.useState=function(e){return dt.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return dt.current.useTransition()};ae.version="18.3.1";_v.exports=ae;var f=_v.exports;const j=bv(f),Zf=F1({__proto__:null,default:j},[f]);/**
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 n_=f,r_=Symbol.for("react.element"),o_=Symbol.for("react.fragment"),s_=Object.prototype.hasOwnProperty,i_=n_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a_={key:!0,ref:!0,__self:!0,__source:!0};function Ov(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)s_.call(t,r)&&!a_.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:r_,type:e,key:s,ref:i,props:o,_owner:i_.current}}uc.Fragment=o_;uc.jsx=Ov;uc.jsxs=Ov;Sv.exports=uc;var x=Sv.exports,jv={exports:{}},Nt={},Iv={exports:{}},Dv={};/**
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,P){var $=T.length;T.push(P);e:for(;0<$;){var q=$-1>>>1,z=T[q];if(0<o(z,P))T[q]=P,T[$]=z,$=q;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var P=T[0],$=T.pop();if($!==P){T[0]=$;e:for(var q=0,z=T.length,Q=z>>>1;q<Q;){var Y=2*(q+1)-1,me=T[Y],ce=Y+1,F=T[ce];if(0>o(me,$))ce<z&&0>o(F,me)?(T[q]=F,T[ce]=$,q=ce):(T[q]=me,T[Y]=$,q=Y);else if(ce<z&&0>o(F,$))T[q]=F,T[ce]=$,q=ce;else break e}}return P}function o(T,P){var $=T.sortIndex-P.sortIndex;return $!==0?$:T.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],u=1,d=null,h=3,p=!1,b=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(T){for(var P=n(c);P!==null;){if(P.callback===null)r(c);else if(P.startTime<=T)r(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=n(c)}}function S(T){if(m=!1,g(T),!b)if(n(l)!==null)b=!0,L(_);else{var P=n(c);P!==null&&U(S,P.startTime-T)}}function _(T,P){b=!1,m&&(m=!1,y(k),k=-1),p=!0;var $=h;try{for(g(P),d=n(l);d!==null&&(!(d.expirationTime>P)||T&&!O());){var q=d.callback;
vendor: 9,152 bytes, lines 25-34
25if(typeof q=="function"){d.callback=null,h=d.priorityLevel;var z=q(d.expirationTime<=P);P=e.unstable_now(),typeof z=="function"?d.callback=z:d===n(l)&&r(l),g(P)}else r(l);d=n(l)}if(d!==null)var Q=!0;else{var Y=n(c);Y!==null&&U(S,Y.startTime-P),Q=!1}return Q}finally{d=null,h=$,p=!1}}var C=!1,E=null,k=-1,N=5,A=-1;function O(){return!(e.unstable_now()-A<N)}function D(){if(E!==null){var T=e.unstable_now();A=T;var P=!0;try{P=E(!0,T)}finally{P?B():(C=!1,E=null)}}else C=!1}var B;if(typeof v=="function")B=function(){v(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,H=I.port2;I.port1.onmessage=D,B=function(){H.postMessage(null)}}else B=function(){w(D,0)};function L(T){E=T,C||(C=!0,B())}function U(T,P){k=w(function(){T(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){b||p||(b=!0,L(_))},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"):N=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var P=3;break;default:P=h}var $=h;h=P;try{return T()}finally{h=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,P){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var $=h;h=T;try{return P()}finally{h=$}},e.unstable_scheduleCallback=function(T,P,$){var q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?q+$:q):$=q,T){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=$+z,T={id:u++,callback:P,priorityLevel:T,startTime:$,expirationTime:z,sortIndex:-1},$>q?(T.sortIndex=$,t(c,T),n(l)===null&&T===n(c)&&(m?(y(k),k=-1):m=!0,U(S,$-q))):(T.sortIndex=z,t(l,T),b||p||(b=!0,L(_))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var P=h;return function(){var $=h;h=P;try{return T.apply(this,arguments)}finally{h=$}}}})(Dv);Iv.exports=Dv;var l_=Iv.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 c_=f,At=l_;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Mv=new Set,Ci={};function So(e,t){ms(e,t),ms(e+"Capture",t)}function ms(e,t){for(Ci[e]=t,e=0;e<t.length;e++)Mv.add(t[e])}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fd=Object.prototype.hasOwnProperty,u_=/^[: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]*$/,Mp={},Lp={};function d_(e){return fd.call(Lp,e)?!0:fd.call(Mp,e)?!1:u_.test(e)?Lp[e]=!0:(Mp[e]=!0,!1)}function f_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function h_(e,t,n,r){if(t===null||typeof t>"u"||f_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ft(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ft(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){Ye[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(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(eh,th);Ye[t]=new ft(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(eh,th);Ye[t]=new ft(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(eh,th);Ye[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function nh(e,t,n,r){var o=Ye.hasOwnProperty(t)?Ye[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(h_(t,n,o,r)&&(n=null),r||o===null?d_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Jn=c_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_a=Symbol.for("react.element"),$o=Symbol.for("react.portal"),Fo=Symbol.for("react.fragment"),rh=Symbol.for("react.strict_mode"),hd=Symbol.for("react.profiler"),Lv=Symbol.for("react.provider"),$v=Symbol.for("react.context"),oh=Symbol.for("react.forward_ref"),pd=Symbol.for("react.suspense"),md=Symbol.for("react.suspense_list"),sh=Symbol.for("react.memo"),dr=Symbol.for("react.lazy"),Fv=Symbol.for("react.offscreen"),$p=Symbol.iterator;function Ks(e){return e===null||typeof e!="object"?null:(e=$p&&e[$p]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,hu;function ri(e){if(hu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);hu=t&&t[1]||""}return`
34`+hu+e}var pu=!1;function mu(e,t){if(!e||pu)return"";pu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}
vendor: 4,297 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
35`),s=r.stack.split(`
36`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
37`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{pu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ri(e):""}function p_(e){switch(e.tag){case 5:return ri(e.type);case 16:return ri("Lazy");case 13:return ri("Suspense");case 19:return ri("SuspenseList");case 0:case 2:case 15:return e=mu(e.type,!1),e;case 11:return e=mu(e.type.render,!1),e;case 1:return e=mu(e.type,!0),e;default:return""}}function gd(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 Fo:return"Fragment";case $o:return"Portal";case hd:return"Profiler";case rh:return"StrictMode";case pd:return"Suspense";case md:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $v:return(e.displayName||"Context")+".Consumer";case Lv:return(e._context.displayName||"Context")+".Provider";case oh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sh:return t=e.displayName||null,t!==null?t:gd(e.type)||"Memo";case dr:t=e._payload,e=e._init;try{return gd(e(t))}catch{}}return null}function m_(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 gd(t);case 8:return t===rh?"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 Ir(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g_(e){var t=Uv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ea(e){e._valueTracker||(e._valueTracker=g_(e))}function zv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function El(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 vd(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ir(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bv(e,t){t=t.checked,t!=null&&nh(e,"checked",t,!1)}function yd(e,t){Bv(e,t);var n=Ir(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wd(e,t.type,n):t.hasOwnProperty("defaultValue")&&wd(e,t.type,Ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}
vendor: 12,440 bytes, line 37
37function Up(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wd(e,t,n){(t!=="number"||El(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var oi=Array.isArray;function Yo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ir(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function xd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(oi(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ir(n)}}function Wv(e,t){var n=Ir(t.value),r=Ir(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Bp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Vv(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 bd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ca,Hv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ca=Ca||document.createElement("div"),Ca.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ca.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ki(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ci={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},v_=["Webkit","ms","Moz","O"];Object.keys(ci).forEach(function(e){v_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ci[t]=ci[e]})});function Kv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ci.hasOwnProperty(e)&&ci[e]?(""+t).trim():t+"px"}function qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Kv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var y_=Te({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 Sd(e,t){if(t){if(y_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function _d(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 Ed=null;function ih(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cd=null,Xo=null,Jo=null;function Wp(e){if(e=sa(e)){if(typeof Cd!="function")throw Error(M(280));var t=e.stateNode;t&&(t=mc(t),Cd(e.stateNode,e.type,t))}}function Gv(e){Xo?Jo?Jo.push(e):Jo=[e]:Xo=e}function Qv(){if(Xo){var e=Xo,t=Jo;if(Jo=Xo=null,Wp(e),t)for(e=0;e<t.length;e++)Wp(t[e])}}function Yv(e,t){return e(t)}function Xv(){}var gu=!1;function Jv(e,t,n){if(gu)return e(t,n);gu=!0;try{return Yv(e,t,n)}finally{gu=!1,(Xo!==null||Jo!==null)&&(Xv(),Qv())}}function Ti(e,t){var n=e.stateNode;if(n===null)return null;var r=mc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var kd=!1;if(Kn)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){kd=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{kd=!1}function w_(e,t,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ui=!1,Cl=null,kl=!1,Td=null,x_={onError:function(e){ui=!0,Cl=e}};function b_(e,t,n,r,o,s,i,a,l){ui=!1,Cl=null,w_.apply(x_,arguments)}function S_(e,t,n,r,o,s,i,a,l){if(b_.apply(this,arguments),ui){if(ui){var c=Cl;ui=!1,Cl=null}else throw Error(M(198));kl||(kl=!0,Td=c)}}function _o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Zv(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 Vp(e){if(_o(e)!==e)throw Error(M(188))}function __(e){var t=e.alternate;if(!t){if(t=_o(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Vp(o),e;if(s===r)return Vp(o),t;s=s.sibling}throw Error(M(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(M(189))}}if(n.alternate!==r)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function ey(e){return e=__(e),e!==null?ty(e):null}function ty(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ty(e);if(t!==null)return t;e=e.sibling}return null}var ny=At.unstable_scheduleCallback,Hp=At.unstable_cancelCallback,E_=At.unstable_shouldYield,C_=At.unstable_requestPaint,Ie=At.unstable_now,k_=At.unstable_getCurrentPriorityLevel,ah=At.unstable_ImmediatePriority,ry=At.unstable_UserBlockingPriority,Tl=At.unstable_NormalPriority,T_=At.unstable_LowPriority,oy=At.unstable_IdlePriority,dc=null,Tn=null;function P_(e){if(Tn&&typeof Tn.onCommitFiberRoot=="function")try{Tn.onCommitFiberRoot(dc,e,void 0,(e.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:N_,R_=Math.log,A_=Math.LN2;function N_(e){return e>>>=0,e===0?32:31-(R_(e)/A_|0)|0}var ka=64,Ta=4194304;function si(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 Pl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=si(a):(s&=i,s!==0&&(r=si(s)))}else i=n&~o,i!==0?r=si(i):s!==0&&(r=si(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-on(t),o=1<<n,r|=e[n],t&=~o;return r}function O_(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 j_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-on(s),a=1<<i,l=o[i];l===-1?(!(a&n)||a&r)&&(o[i]=O_(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Pd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function sy(){var e=ka;return ka<<=1,!(ka&4194240)&&(ka=64),e}function vu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ra(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-on(t),e[t]=n}function I_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-on(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-on(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ge=0;function iy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ay,ch,ly,cy,uy,Rd=!1,Pa=[],Cr=null,kr=null,Tr=null,Pi=new Map,Ri=new Map,pr=[],D_="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 Kp(e,t){switch(e){case"focusin":case"focusout":Cr=null;break;case"dragenter":case"dragleave":kr=null;break;case"mouseover":case"mouseout":Tr=null;break;case"pointerover":case"pointerout":Pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Gs(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=sa(t),t!==null&&ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function M_(e,t,n,r,o){switch(t){case"focusin":return Cr=Gs(Cr,e,t,n,r,o),!0;case"dragenter":return kr=Gs(kr,e,t,n,r,o),!0;case"mouseover":return Tr=Gs(Tr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Pi.set(s,Gs(Pi.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Ri.set(s,Gs(Ri.get(s)||null,e,t,n,r,o)),!0}return!1}function dy(e){var t=Zr(e.target);if(t!==null){var n=_o(t);if(n!==null){if(t=n.tag,t===13){if(t=Zv(n),t!==null){e.blockedOn=t,uy(e.priority,function(){ly(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ad(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ed=r,n.target.dispatchEvent(r),Ed=null}else return t=sa(n),t!==null&&ch(t),e.blockedOn=n,!1;t.shift()}return!0}function qp(e,t,n){rl(e)&&n.delete(t)}function L_(){Rd=!1,Cr!==null&&rl(Cr)&&(Cr=null),kr!==null&&rl(kr)&&(kr=null),Tr!==null&&rl(Tr)&&(Tr=null),Pi.forEac
vendor: 8,846 bytes, line 37
37h(qp),Ri.forEach(qp)}function Qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Rd||(Rd=!0,At.unstable_scheduleCallback(At.unstable_NormalPriority,L_)))}function Ai(e){function t(o){return Qs(o,e)}if(0<Pa.length){Qs(Pa[0],e);for(var n=1;n<Pa.length;n++){var r=Pa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Cr!==null&&Qs(Cr,e),kr!==null&&Qs(kr,e),Tr!==null&&Qs(Tr,e),Pi.forEach(t),Ri.forEach(t),n=0;n<pr.length;n++)r=pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pr.length&&(n=pr[0],n.blockedOn===null);)dy(n),n.blockedOn===null&&pr.shift()}var Zo=Jn.ReactCurrentBatchConfig,Rl=!0;function $_(e,t,n,r){var o=ge,s=Zo.transition;Zo.transition=null;try{ge=1,uh(e,t,n,r)}finally{ge=o,Zo.transition=s}}function F_(e,t,n,r){var o=ge,s=Zo.transition;Zo.transition=null;try{ge=4,uh(e,t,n,r)}finally{ge=o,Zo.transition=s}}function uh(e,t,n,r){if(Rl){var o=Ad(e,t,n,r);if(o===null)Tu(e,t,r,Al,n),Kp(e,r);else if(M_(o,e,t,n,r))r.stopPropagation();else if(Kp(e,r),t&4&&-1<D_.indexOf(e)){for(;o!==null;){var s=sa(o);if(s!==null&&ay(s),s=Ad(e,t,n,r),s===null&&Tu(e,t,r,Al,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Tu(e,t,r,null,n)}}var Al=null;function Ad(e,t,n,r){if(Al=null,e=ih(r),e=Zr(e),e!==null)if(t=_o(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Zv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Al=e,null}function fy(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(k_()){case ah:return 1;case ry:return 4;case Tl:case T_:return 16;case oy:return 536870912;default:return 16}default:return 16}}var Sr=null,dh=null,ol=null;function hy(){if(ol)return ol;var e,t=dh,n=t.length,r,o="value"in Sr?Sr.value:Sr.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return ol=o.slice(e,1<r?1-r:void 0)}function sl(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 Ra(){return!0}function Gp(){return!1}function Ot(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ra:Gp,this.isPropagationStopped=Gp,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ra)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ra)},persist:function(){},isPersistent:Ra}),t}var Ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fh=Ot(Ts),oa=Te({},Ts,{view:0,detail:0}),U_=Ot(oa),yu,wu,Ys,fc=Te({},oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hh,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!==Ys&&(Ys&&e.type==="mousemove"?(yu=e.screenX-Ys.screenX,wu=e.screenY-Ys.screenY):wu=yu=0,Ys=e),yu)},movementY:function(e){return"movementY"in e?e.movementY:wu}}),Qp=Ot(fc),z_=Te({},fc,{dataTransfer:0}),B_=Ot(z_),W_=Te({},oa,{relatedTarget:0}),xu=Ot(W_),V_=Te({},Ts,{animationName:0,elapsedTime:0,pseudoElement:0}),H_=Ot(V_),K_=Te({},Ts,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q_=Ot(K_),G_=Te({},Ts,{data:0}),Yp=Ot(G_),Q_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},X_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X_[e])?!!t[e]:!1}function hh(){return J_}var Z_=Te({},oa,{key:function(e){if(e.key){var t=Q_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hh,charCode:function(e){return e.type==="keypress"?sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eE=Ot(Z_),tE=Te({},fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xp=Ot(tE),nE=Te({},oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hh}),rE=Ot(nE),oE=Te({},Ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),sE=Ot(oE),iE=Te({},fc,{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}),aE=Ot(iE),lE=[9,13,27,32],ph=Kn&&"CompositionEvent"in window,di=null;Kn&&"documentMode"in document&&(di=document.documentMode);var cE=Kn&&"TextEvent"in window&&!di,py=Kn&&(!ph||di&&8<di&&11>=di),Jp=" ",Zp=!1;function my(e,t){switch(e){case"keyup":return lE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Uo=!1;function uE(e,t){switch(e){case"compositionend":return gy(t);case"keypress":return t.which!==32?null:(Zp=!0,Jp);case"textInput":return e=t.data,e===Jp&&Zp?null:e;default:return null}}function dE(e,t){if(Uo)return e==="compositionend"||!ph&&my(e,t)?(e=hy(),ol=dh=Sr=null,Uo=!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 py&&t.locale!=="ko"?null:t.data;default:return null}}var fE={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 em(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fE[e.type]:t==="textarea"}function vy(e,t,n,r){Gv(r),t=Nl(t,"onChange"),0<t.length&&(n=new fh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fi=null,Ni=null;function hE(e){Py(e,0)}function hc(e){var t=Wo(e);if(zv(t))return e}function pE(e,t){if(e==="change")return t}var yy=!1;if(Kn){var bu;if(Kn){var Su="oninput"in document;if(!Su){var tm=document.createElement("div");tm.setAttribute("oninput","return;"),Su=typeof tm.oninput=="function"}bu=Su}else bu=!1;yy=bu&&(!document.documentMode||9<document.documentMode)}function nm(){fi&&(fi.detachEvent("onpropertychange",wy),Ni=fi=null)}function wy(e){if(e.propertyName==="value"&&hc(Ni)){var t=[];vy(t,Ni,e,ih(e)),Jv(hE,t)}}
vendor: 5,253 bytes, line 37
37function mE(e,t,n){e==="focusin"?(nm(),fi=t,Ni=n,fi.attachEvent("onpropertychange",wy)):e==="focusout"&&nm()}function gE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hc(Ni)}function vE(e,t){if(e==="click")return hc(t)}function yE(e,t){if(e==="input"||e==="change")return hc(t)}function wE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:wE;function Oi(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!fd.call(t,o)||!an(e[o],t[o]))return!1}return!0}function rm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function om(e,t){var n=rm(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rm(n)}}function xy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function by(){for(var e=window,t=El();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=El(e.document)}return t}function mh(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 xE(e){var t=by(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xy(n.ownerDocument.documentElement,n)){if(r!==null&&mh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=om(n,s);var i=om(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bE=Kn&&"documentMode"in document&&11>=document.documentMode,zo=null,Nd=null,hi=null,Od=!1;function sm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Od||zo==null||zo!==El(r)||(r=zo,"selectionStart"in r&&mh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hi&&Oi(hi,r)||(hi=r,r=Nl(Nd,"onSelect"),0<r.length&&(t=new fh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zo)))}function Aa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bo={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},_u={},Sy={};Kn&&(Sy=document.createElement("div").style,"AnimationEvent"in window||(delete Bo.animationend.animation,delete Bo.animationiteration.animation,delete Bo.animationstart.animation),"TransitionEvent"in window||delete Bo.transitionend.transition);function pc(e){if(_u[e])return _u[e];if(!Bo[e])return e;var t=Bo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Sy)return _u[e]=t[n];return e}var _y=pc("animationend"),Ey=pc("animationiteration"),Cy=pc("animationstart"),ky=pc("transitionend"),Ty=new Map,im="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 $r(e,t){Ty.set(e,t),So(t,[e])}for(var Eu=0;Eu<im.length;Eu++){var Cu=im[Eu],SE=Cu.toLowerCase(),_E=Cu[0].toUpperCase()+Cu.slice(1);$r(SE,"on"+_E)}$r(_y,"onAnimationEnd");$r(Ey,"onAnimationIteration");$r(Cy,"onAnimationStart");$r("dblclick","onDoubleClick");$r("focusin","onFocus");$r("focusout","onBlur");$r(ky,"onTransitionEnd");ms("onMouseEnter",["mouseout","mouseover"]);ms("onMouseLeave",["mouseout","mouseover"]);ms("onPointerEnter",["pointerout","pointerover"]);ms("onPointerLeave",["pointerout","pointerover"]);So("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37So("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));So("onBeforeInput",["compositionend","keypress","textInput","paste"]);So("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));So("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));So("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ii="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(" "),EE=new Set("cancel close invalid load scroll toggle".split(" ").concat(ii));function am(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,S_(r,t,void 0,e),e.currentTarget=null}function Py(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;am(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;am(o,a,c),s=l}}}if(kl)throw e=Td,kl=!1,Td=null,e}function be(e,t){var n=t[Ld];n===void 0&&(n=t[Ld]=new Set);var r=e+"__bubble";n.has(r)||(Ry(t,e,2,!1),n.add(r))}function ku(e,t,n){var r=0;t&&(r|=4),Ry(n,e,r,t)}var Na="_reactListening"+Math.random().toString(36).slice(2);function ji(e){if(!e[Na]){e[Na]=!0,Mv.forEach(function(n){n!=="selectionchange"&&(EE.has(n)||ku(n,!1,e),ku(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Na]||(t[Na]=!0,ku("selectionchange",!1,t))}}function Ry(e,t,n,r){switch(fy(t)){case 1:var o=$_;break;case 4:o=F_;break;default:o=uh}n=o.bind(null,t,n,e),o=void 0,!kd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Tu(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Zr(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}Jv(function(){var c=s,u=ih(n),d=[];e:{var h=Ty.get(e);if(h!==void 0){var p=fh,b=e;switch(e){case"keypress":if(sl(n)===0)break e;case"keydown":case"keyup":p=eE;break;case"focusin":b="focus",p=xu;break;case"focusout":b="blur",p=xu;break;case"beforeblur":case"afterblur":p=xu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Qp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=B_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=rE;break;case _y:case Ey:case Cy:p=H_;break;case ky:p=sE;break;case"scroll":p=U_;break;case"wheel":p=aE;break;case"copy":case"cut":case"paste":p=q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xp}var m=(t&4)!==0,w=!m&&e==="scroll",y=m?h!==null?h+"Capture":null:h;m=[];for(var v=c,g;v!==null;){g=v;var S=g.stateNode;if(g.tag===5&&S!==null&&(g=S,y!==null&&(S=Ti(v,y),S!=null&&m.push(Ii(v,S,g)))),w)break;v=v.return}0<m.length&&(h=new p(h,b,null,n,u),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Ed&&(b=n.relatedTarget||n.fromElement)&&(Zr(b)||b[qn]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(b=n.relatedTarget||n.toElement,p=c,b=b?Zr(b):null,b!==null&&(w=_o(b),b!==w||b.tag!==5&&b.tag!==6)&&(b=null)):(p=null,b=c),p!==b)){if(m=Qp,S="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Xp,S="onPointerLeave",y="onPointerEnter",v="pointer"),w=p==null?h:Wo(p),g=b==null?h:Wo(b),h=new m(S,v+"leave",p,n,u),h.target=w,h.relatedTarget=g,S=null,Zr(u)===c&&(m=new m(y,v+"enter",b,n,u),m.target=g,m.relatedTarget=w,S=m),w=S,p&&b)t:{for(m=p,y=b,v=0,g=m;g;g=To(g))v++;for(g=0,S=y;S;S=To(S))g++;for(;0<v-g;)m=To(m),v--;for(;0<g-v;)y=To(y),g--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=To(m),y=To(y)}m=null}else m=null;p!==null&&lm(d,h,p,m,!1),b!==null&&w!==null&&lm(d,w,b,m,!0)}}
vendor: 4,734 bytes, lines 37-38
37e:{if(h=c?Wo(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=pE;else if(em(h))if(yy)_=yE;else{_=gE;var C=mE}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=vE);if(_&&(_=_(e,c))){vy(d,_,n,u);break e}C&&C(e,h,c),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&wd(h,"number",h.value)}switch(C=c?Wo(c):window,e){case"focusin":(em(C)||C.contentEditable==="true")&&(zo=C,Nd=c,hi=null);break;case"focusout":hi=Nd=zo=null;break;case"mousedown":Od=!0;break;case"contextmenu":case"mouseup":case"dragend":Od=!1,sm(d,n,u);break;case"selectionchange":if(bE)break;case"keydown":case"keyup":sm(d,n,u)}var E;if(ph)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Uo?my(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(py&&n.locale!=="ko"&&(Uo||k!=="onCompositionStart"?k==="onCompositionEnd"&&Uo&&(E=hy()):(Sr=u,dh="value"in Sr?Sr.value:Sr.textContent,Uo=!0)),C=Nl(c,k),0<C.length&&(k=new Yp(k,e,null,n,u),d.push({event:k,listeners:C}),E?k.data=E:(E=gy(n),E!==null&&(k.data=E)))),(E=cE?uE(e,n):dE(e,n))&&(c=Nl(c,"onBeforeInput"),0<c.length&&(u=new Yp("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}Py(d,t)})}function Ii(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Ti(e,n),s!=null&&r.unshift(Ii(e,s,o)),s=Ti(e,t),s!=null&&r.push(Ii(e,s,o))),e=e.return}return r}function To(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lm(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=Ti(n,s),l!=null&&i.unshift(Ii(n,l,a))):o||(l=Ti(n,s),l!=null&&i.push(Ii(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var CE=/\r\n?/g,kE=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(CE,`
38`).replace(kE,"")}function Oa(e,t,n){if(t=cm(t),cm(e)!==t&&n)throw Error(M(425))}function Ol(){}var jd=null,Id=null;function Dd(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 Md=typeof setTimeout=="function"?setTimeout:void 0,TE=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,PE=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(RE)}:Md;function RE(e){setTimeout(function(){throw e})}function Pu(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ai(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ai(t)}function Pr(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 dm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ps=Math.random().toString(36).slice(2),En="__reactFiber$"+Ps,Di="__reactProps$"+Ps,qn="__reactContainer$"+Ps,Ld="__reactEvents$"+Ps,AE="__reactListeners$"+Ps,NE="__reactHandles$"+Ps;function Zr(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=dm(e);e!==null;){if(n=e[En])return n;e=dm(e)}return t}e=n,n=e.parentNode}return null}function sa(e){return e=e[En]||e[qn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function mc(e){return e[Di]||null}var $d=[],Vo=-1;function Fr(e){return{current:e}}function Se(e){0>Vo||(e.current=$d[Vo],$d[Vo]=null,Vo--)}function we(e,t){Vo++,$d[Vo]=e.current,e.current=t}var Dr={},ot=Fr(Dr),xt=Fr(!1),fo=Dr;function gs(e,t){var n=e.type.contextTypes;if(!n)return Dr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function bt(e){return e=e.childContextTypes,e!=null}function jl(){Se(xt),Se(ot)}function fm(e,t,n){if(ot.current!==Dr)throw Error(M(168));we(ot,t),we(xt,n)}
vendor: 18,208 bytes, line 38
38function Ay(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(M(108,m_(e)||"Unknown",o));return Te({},n,r)}function Il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,fo=ot.current,we(ot,e),we(xt,xt.current),!0}function hm(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=Ay(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,Se(xt),Se(ot),we(ot,e)):Se(xt),we(xt,n)}var zn=null,gc=!1,Ru=!1;function Ny(e){zn===null?zn=[e]:zn.push(e)}function OE(e){gc=!0,Ny(e)}function Ur(){if(!Ru&&zn!==null){Ru=!0;var e=0,t=ge;try{var n=zn;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zn=null,gc=!1}catch(o){throw zn!==null&&(zn=zn.slice(e+1)),ny(ah,Ur),o}finally{ge=t,Ru=!1}}return null}var Ho=[],Ko=0,Dl=null,Ml=0,Mt=[],Lt=0,ho=null,Wn=1,Vn="";function Qr(e,t){Ho[Ko++]=Ml,Ho[Ko++]=Dl,Dl=e,Ml=t}function Oy(e,t,n){Mt[Lt++]=Wn,Mt[Lt++]=Vn,Mt[Lt++]=ho,ho=e;var r=Wn;e=Vn;var o=32-on(r)-1;r&=~(1<<o),n+=1;var s=32-on(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Wn=1<<32-on(t)+o|n<<o|r,Vn=s+e}else Wn=1<<s|n<<o|r,Vn=e}function gh(e){e.return!==null&&(Qr(e,1),Oy(e,1,0))}function vh(e){for(;e===Dl;)Dl=Ho[--Ko],Ho[Ko]=null,Ml=Ho[--Ko],Ho[Ko]=null;for(;e===ho;)ho=Mt[--Lt],Mt[Lt]=null,Vn=Mt[--Lt],Mt[Lt]=null,Wn=Mt[--Lt],Mt[Lt]=null}var Pt=null,Tt=null,_e=!1,rn=null;function jy(e,t){var n=$t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pm(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pt=e,Tt=Pr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pt=e,Tt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ho!==null?{id:Wn,overflow:Vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pt=e,Tt=null,!0):!1;default:return!1}}function Fd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ud(e){if(_e){var t=Tt;if(t){var n=t;if(!pm(e,t)){if(Fd(e))throw Error(M(418));t=Pr(n.nextSibling);var r=Pt;t&&pm(e,t)?jy(r,n):(e.flags=e.flags&-4097|2,_e=!1,Pt=e)}}else{if(Fd(e))throw Error(M(418));e.flags=e.flags&-4097|2,_e=!1,Pt=e}}}function mm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pt=e}function ja(e){if(e!==Pt)return!1;if(!_e)return mm(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Dd(e.type,e.memoizedProps)),t&&(t=Tt)){if(Fd(e))throw Iy(),Error(M(418));for(;t;)jy(e,t),t=Pr(t.nextSibling)}if(mm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Tt=Pr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Tt=null}}else Tt=Pt?Pr(e.stateNode.nextSibling):null;return!0}function Iy(){for(var e=Tt;e;)e=Pr(e.nextSibling)}function vs(){Tt=Pt=null,_e=!1}function yh(e){rn===null?rn=[e]:rn.push(e)}var jE=Jn.ReactCurrentBatchConfig;function Xs(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var r=n.stateNode}if(!r)throw Error(M(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function Ia(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gm(e){var t=e._init;return t(e._payload)}function Dy(e){function t(y,v){if(e){var g=y.deletions;g===null?(y.deletions=[v],y.flags|=16):g.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function o(y,v){return y=Or(y,v),y.index=0,y.sibling=null,y}function s(y,v,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<v?(y.flags|=2,v):g):(y.flags|=2,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,g,S){return v===null||v.tag!==6?(v=Mu(g,y.mode,S),v.return=y,v):(v=o(v,g),v.return=y,v)}function l(y,v,g,S){var _=g.type;return _===Fo?u(y,v,g.props.children,S,g.key):v!==null&&(v.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===dr&&gm(_)===v.type)?(S=o(v,g.props),S.ref=Xs(y,v,g),S.return=y,S):(S=fl(g.type,g.key,g.props,null,y.mode,S),S.ref=Xs(y,v,g),S.return=y,S)}function c(y,v,g,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==g.containerInfo||v.stateNode.implementation!==g.implementation?(v=Lu(g,y.mode,S),v.return=y,v):(v=o(v,g.children||[]),v.return=y,v)}function u(y,v,g,S,_){return v===null||v.tag!==7?(v=co(g,y.mode,S,_),v.return=y,v):(v=o(v,g),v.return=y,v)}function d(y,v,g){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Mu(""+v,y.mode,g),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _a:return g=fl(v.type,v.key,v.props,null,y.mode,g),g.ref=Xs(y,null,v),g.return=y,g;case $o:return v=Lu(v,y.mode,g),v.return=y,v;case dr:var S=v._init;return d(y,S(v._payload),g)}if(oi(v)||Ks(v))return v=co(v,y.mode,g,null),v.return=y,v;Ia(y,v)}return null}function h(y,v,g,S){var _=v!==null?v.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:a(y,v,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case _a:return g.key===_?l(y,v,g,S):null;case $o:return g.key===_?c(y,v,g,S):null;case dr:return _=g._init,h(y,v,_(g._payload),S)}if(oi(g)||Ks(g))return _!==null?null:u(y,v,g,S,null);Ia(y,g)}return null}function p(y,v,g,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(g)||null,a(v,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case _a:return y=y.get(S.key===null?g:S.key)||null,l(v,y,S,_);case $o:return y=y.get(S.key===null?g:S.key)||null,c(v,y,S,_);case dr:var C=S._init;return p(y,v,g,C(S._payload),_)}if(oi(S)||Ks(S))return y=y.get(g)||null,u(v,y,S,_,null);Ia(v,S)}return null}function b(y,v,g,S){for(var _=null,C=null,E=v,k=v=0,N=null;E!==null&&k<g.length;k++){E.index>k?(N=E,E=null):N=E.sibling;var A=h(y,E,g[k],S);if(A===null){E===null&&(E=N);break}e&&E&&A.alternate===null&&t(y,E),v=s(A,v,k),C===null?_=A:C.sibling=A,C=A,E=N}if(k===g.length)return n(y,E),_e&&Qr(y,k),_;if(E===null){for(;k<g.length;k++)E=d(y,g[k],S),E!==null&&(v=s(E,v,k),C===null?_=E:C.sibling=E,C=E);return _e&&Qr(y,k),_}for(E=r(y,E);k<g.length;k++)N=p(E,y,k,g[k],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?k:N.key),v=s(N,v,k),C===null?_=N:C.sibling=N,C=N);return e&&E.forEach(function(O){return t(y,O)}),_e&&Qr(y,k),_}function m(y,v,g,S){var _=Ks(g);if(typeof _!="function")throw Error(M(150));if(g=_.call(g),g==null)throw Error(M(151));for(var C=_=null,E=v,k=v=0,N=null,A=g.next();E!==null&&!A.done;k++,A=g.next()){E.index>k?(N=E,E=null):N=E.sibling;var O=h(y,E,A.value,S);if(O===null){E===null&&(E=N);break}e&&E&&O.alternate===null&&t(y,E),v=s(O,v,k),C===null?_=O:C.sibling=O,C=O,E=N}if(A.done)return n(y,E),_e&&Qr(y,k),_;if(E===null){for(;!A.done;k++,A=g.next())A=d(y,A.value,S),A!==null&&(v=s(A,v,k),C===null?_=A:C.sibling=A,C=A);return _e&&Qr(y,k),_}for(E=r(y,E);!A.done;k++,A=g.next())A=p(E,y,k,A.value,S),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?k:A.key),v=s(A,v,k),C===null?_=A:C.sibling=A,C=A);return e&&E.forEach(function(D){return t(y,D)}),_e&&Qr(y,k),_}function w(y,v,g,S){if(typeof g=="object"&&g!==null&&g.type===Fo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case _a:e:{for(var _=g.key,C=v;C!==null;){if(C.key===_){if(_=g.type,_===Fo){if(C.tag===7){n(y,C.sibling),v=o(C,g.props.children),v.return=y,y=v;break e}}else if(C.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===dr&&gm(_)===C.type){n(y,C.sibling),v=o(C,g.props),v.ref=Xs(y,C,g),v.return=y,y=v;break e}n(y,C);break}else t(y,C);C=C.sibling}g.type===Fo?(v=co(g.props.children,y.mode,S,g.key),v.return=y,y=v):(S=fl(g.type,g.key,g.props,null,y.mode,S),S.ref=Xs(y,v,g),S.return=y,y=S)}return i(y);case $o:e:{for(C=g.key;v!==null;){if(v.key===C)if(v.tag===4&&v.stateNode.containerInfo===g.containerInfo&&v.stateNode.implementation===g.implementation){n(y,v.sibling),v=o(v,g.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=Lu(g,y.mode,S),v.return=y,y=v}return i(y);case dr:return C=g._init,w(y,v,C(g._payload),S)}if(oi(g))return b(y,v,g,S);if(Ks(g))return m(y,v,g,S);Ia(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,v!==null&&v.tag===6?(n(y,v.sibling),v=o(v,g),v.return=y,y=v):(n(y,v),v=Mu(g,y.mode,S),v.return=y,y=v),i(y)):n(y,v)}return w}var ys=Dy(!0),My=Dy(!1),Ll=Fr(null),$l=null,qo=null,wh=null;function xh(){wh=qo=$l=null}function bh(e){var t=Ll.current;Se(Ll),e._currentValue=t}function zd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function es(e,t){$l=e,wh=qo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wt=!0),e.firstContext=null)}function Wt(e){var t=e._currentValue;if(wh!==e)if(e={context:e,memoizedValue:t,next:null},qo===null){if($l===null)throw Error(M(308));qo=e,$l.dependencies={lanes:0,firstContext:e}}else qo=qo.next=e;return t}var eo=null;function Sh(e){eo===null?eo=[e]:eo.push(e)}function Ly(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Sh(t)):(n.next=o.next,o.next=n),t.interleaved=n,Gn(e,r)}function Gn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function _h(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $y(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Gn(e,n)}return o=r.interleaved,o===null?(t.next=t,Sh(r)):(t.next=o.next,o.next=t),r.interleaved=t,Gn(e,n)}function il(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lh(e,n)}}function vm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fl(e,t,n,r){var o=e.updateQueue;fr=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,m=a;switch(h=t,p=n,m.tag){case 1:if(b=m.payload,typeof b=="function"){d=b.call(p,d,h);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=m.payload,h=typeof b=="function"?b.call(p,d,h):b,h==null)break e;d=Te({},d,h);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);mo|=i,e.lanes=i,e.memoizedState=d}}function ym(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(M(191,o));o.call(r)}}}var ia={},Pn=Fr(ia),Mi=Fr(ia),Li=Fr(ia);function to(e){if(e===ia)throw Error(M(174));return e}function Eh(e,t){switch(we(Li,t),we(Mi,e),we(Pn,ia),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=bd(t,e)}Se(Pn),we(Pn,t)}function ws(){Se(Pn),Se(Mi),Se(Li)}function Fy(e){to(Li.current);var t=to(Pn.current),n=bd(t,e.type);t!==n&&(we(Mi,e),we(Pn,n))}function Ch(e){Mi.current===e&&(Se(Pn),Se(Mi))}var Ce=Fr(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Au=[];function kh(){for(var e=0;e<Au.length;e++)Au[e]._workInProgressVersionPrimary=null;Au.length=0}var al=Jn.ReactCurrentDispatcher,Nu=Jn.ReactCurrentBatchConfig,po=0,ke=null,$e=null,He=null,zl=!1,pi=!1,$i=0,IE=0;function et(){throw Error(M(321))}function Th(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!an(e[n],t[n]))return!1;return!0}function Ph(e,t,n,r,o,s){if(po=s,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,al.current=e===null||e.memoizedState===null?$E:FE,e=n(r,o),pi){s=0;do{if(pi=!1,$i=0,25<=s)throw Error(M(301));s+=1,He=$e=null,t.updateQueue=null,al.current=UE,e=n(r,o)}while(pi)}if(al.current=Bl,t=$e!==null&&$e.next!==null,po=0,He=$e=ke=null,zl=!1,t)throw Error(M(300));return e}function Rh(){var e=$i!==0;return $i=0,e}function xn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?ke.memoizedState=He=e:He=He.next=e,He}function Vt(){if($e===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=He===null?ke.memoizedState:He.next;if(t!==null)He=t,$e=e;else{if(e===null)throw Error(M(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},He===null?ke.memoizedState=He=e:He=He.next=e}return He}function Fi(e,t){return typeof t=="function"?t(e):t}function Ou(e){var t=Vt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=$e,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((po&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=r):l=l.next=d,ke.lanes|=u,mo|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,an(r,t.memoizedState)||(wt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,ke.lanes|=s,mo|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ju(e){var t=Vt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);an(s,t.memoizedState)||(wt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Uy(){}function zy(e,t){var n=ke,r=Vt(),o=t(),s=!an(r.memoizedState,o);if(s&&(r.memoizedState=o,wt=!0),r=r.queue,Ah(Vy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||He!==null&&He.memoizedState.tag&1){if(n.flags|=2048,Ui(9,Wy.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(M(349));po&30||By(n,t,o)}return o}function By(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wy(e,t,n,r){t.value=n,t.getSnapshot=r,Hy(t)&&Ky(e)}function Vy(e,t,n){return n(function(){Hy(t)&&Ky(e)})}function Hy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!an(e,n)}catch{return!0}}function Ky(e){var t=Gn(e,1);t!==null&&sn(t,e,1,-1)}function wm(e){var t=xn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:e},t.queue=e,e=e.dispatch=LE.bind(null,ke,e),[t.memoizedState,e]}function Ui(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function qy(){return Vt().memoizedState}function ll(e,t,n,r){var o=xn();ke.flags|=e,o.memoizedState=Ui(1|t,n,void 0,r===void 0?null:r)}function vc(e,t,n,r){var o=Vt();r=r===void 0?null:r;var s=void 0;if($e!==null){var i=$e.memoizedState;if(s=i.destroy,r!==null&&Th(r,i.deps)){o.memoizedState=Ui(t,n,s,r);return}}ke.flags|=e,o.memoizedState=Ui(1|t,n,s,r)}function xm(e,t){return ll(8390656,8,e,t)}
vendor: 4,305 bytes, line 38
38function Ah(e,t){return vc(2048,8,e,t)}function Gy(e,t){return vc(4,2,e,t)}function Qy(e,t){return vc(4,4,e,t)}function Yy(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 Xy(e,t,n){return n=n!=null?n.concat([e]):null,vc(4,4,Yy.bind(null,t,e),n)}function Nh(){}function Jy(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Th(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zy(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Th(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function e0(e,t,n){return po&21?(an(n,t)||(n=sy(),ke.lanes|=n,mo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n)}function DE(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Nu.transition;Nu.transition={};try{e(!1),t()}finally{ge=n,Nu.transition=r}}function t0(){return Vt().memoizedState}function ME(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},n0(e))r0(t,n);else if(n=Ly(e,t,n,r),n!==null){var o=ut();sn(n,e,r,o),o0(n,t,r)}}function LE(e,t,n){var r=Nr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(n0(e))r0(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,an(a,i)){var l=t.interleaved;l===null?(o.next=o,Sh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Ly(e,t,o,r),n!==null&&(o=ut(),sn(n,e,r,o),o0(n,t,r))}}function n0(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function r0(e,t){pi=zl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function o0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lh(e,n)}}var Bl={readContext:Wt,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},$E={readContext:Wt,useCallback:function(e,t){return xn().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:xm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ll(4194308,4,Yy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ll(4194308,4,e,t)},useInsertionEffect:function(e,t){return ll(4,2,e,t)},useMemo:function(e,t){var n=xn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ME.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=xn();return e={current:e},t.memoizedState=e},useState:wm,useDebugValue:Nh,useDeferredValue:function(e){return xn().memoizedState=e},useTransition:function(){var e=wm(!1),t=e[0];return e=DE.bind(null,e[1]),xn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=xn();if(_e){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),qe===null)throw Error(M(349));po&30||By(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,xm(Vy.bind(null,r,s,e),[e]),r.flags|=2048,Ui(9,Wy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=xn(),t=qe.identifierPrefix;if(_e){var n=Vn,r=Wn;n=(r&~(1<<32-on(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$i++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=IE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},FE={readContext:Wt,useCallback:Jy,useContext:Wt,useEffect:Ah,useImperativeHandle:Xy,useInsertionEffect:Gy,useLayoutEffect:Qy,useMemo:Zy,useReducer:Ou,useRef:qy,useState:function(){return Ou(Fi)},useDebugValue:Nh,useDeferredValue:function(e){var t=Vt();return e0(t,$e.memoizedState,e)},useTransition:function(){var e=Ou(Fi)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Uy,useSyncExternalStore:zy,useId:t0,unstable_isNewReconciler:!1},UE={readContext:Wt,useCallback:Jy,useContext:Wt,useEffect:Ah,useImperativeHandle:Xy,useInsertionEffect:Gy,useLayoutEffect:Qy,useMemo:Zy,useReducer:ju,useRef:qy,use
vendor: 5,962 bytes, lines 38-40
38State:function(){return ju(Fi)},useDebugValue:Nh,useDeferredValue:function(e){var t=Vt();return $e===null?t.memoizedState=e:e0(t,$e.memoizedState,e)},useTransition:function(){var e=ju(Fi)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Uy,useSyncExternalStore:zy,useId:t0,unstable_isNewReconciler:!1};function Xt(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={isMounted:function(e){return(e=e._reactInternals)?_o(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ut(),o=Nr(e),s=Hn(r,o);s.payload=t,n!=null&&(s.callback=n),t=Rr(e,s,o),t!==null&&(sn(t,e,o,r),il(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ut(),o=Nr(e),s=Hn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Rr(e,s,o),t!==null&&(sn(t,e,o,r),il(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ut(),r=Nr(e),o=Hn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Rr(e,o,r),t!==null&&(sn(t,e,r,n),il(t,e,r))}};function bm(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Oi(n,r)||!Oi(o,s):!0}function s0(e,t,n){var r=!1,o=Dr,s=t.contextType;return typeof s=="object"&&s!==null?s=Wt(s):(o=bt(t)?fo:ot.current,r=t.contextTypes,s=(r=r!=null)?gs(e,o):Dr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Sm(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yc.enqueueReplaceState(t,t.state,null)}function Wd(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},_h(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Wt(s):(s=bt(t)?fo:ot.current,o.context=gs(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Bd(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&yc.enqueueReplaceState(o,o.state,null),Fl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function xs(e,t){try{var n="",r=t;do n+=p_(r),r=r.return;while(r);var o=n}catch(s){o=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Iu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zE=typeof WeakMap=="function"?WeakMap:Map;function i0(e,t,n){n=Hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,ef=r),Vd(e,t)},n}function a0(e,t,n){n=Hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Vd(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Vd(e,t),typeof r!="function"&&(Ar===null?Ar=new Set([this]):Ar.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function _m(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zE;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=tC.bind(null,e,t,n),t.then(e,e))}function Em(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 Cm(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Hn(-1,1),t.tag=2,Rr(n,t,1))),n.lanes|=1),e)}var BE=Jn.ReactCurrentOwner,wt=!1;function lt(e,t,n,r){t.child=e===null?My(t,null,n,r):ys(t,e.child,n,r)}function km(e,t,n,r,o){n=n.render;var s=t.ref;return es(t,o),r=Ph(e,t,n,r,s,o),n=Rh(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qn(e,t,o)):(_e&&n&&gh(t),t.flags|=1,lt(e,t,r,o),t.child)}function Tm(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Fh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,l0(e,t,s,r,o)):(e=fl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Oi,n(i,r)&&e.ref===t.ref)return Qn(e,t,o)}return t.flags|=1,e=Or(s,r),e.ref=t.ref,e.return=t,t.child=e}function l0(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Oi(s,r)&&e.ref===t.ref)if(wt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(wt=!0);else return t.lanes=e.lanes,Qn(e,t,o)}return Hd(e,t,n,r,o)}function c0(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Qo,Ct),Ct|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Qo,Ct),Ct|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(Qo,Ct),Ct|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(Qo,Ct),Ct|=r;return lt(e,t,o,n),t.child}function u0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 6,545 bytes, line 40
40function Hd(e,t,n,r,o){var s=bt(n)?fo:ot.current;return s=gs(t,s),es(t,o),n=Ph(e,t,n,r,s,o),r=Rh(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qn(e,t,o)):(_e&&r&&gh(t),t.flags|=1,lt(e,t,n,o),t.child)}function Pm(e,t,n,r,o){if(bt(n)){var s=!0;Il(t)}else s=!1;if(es(t,o),t.stateNode===null)cl(e,t),s0(t,n,r),Wd(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Wt(c):(c=bt(n)?fo:ot.current,c=gs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Sm(t,i,r,c),fr=!1;var h=t.memoizedState;i.state=h,Fl(t,r,i,o),l=t.memoizedState,a!==r||h!==l||xt.current||fr?(typeof u=="function"&&(Bd(t,n,u,r),l=t.memoizedState),(a=fr||bm(t,n,a,r,h,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$y(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Xt(t.type,a),i.props=c,d=t.pendingProps,h=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Wt(l):(l=bt(n)?fo:ot.current,l=gs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Sm(t,i,r,l),fr=!1,h=t.memoizedState,i.state=h,Fl(t,r,i,o);var b=t.memoizedState;a!==d||h!==b||xt.current||fr?(typeof p=="function"&&(Bd(t,n,p,r),b=t.memoizedState),(c=fr||bm(t,n,c,r,h,b,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,b,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,b,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),i.props=r,i.state=b,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Kd(e,t,n,r,s,o)}function Kd(e,t,n,r,o,s){u0(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&hm(t,n,!1),Qn(e,t,s);r=t.stateNode,BE.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ys(t,e.child,null,s),t.child=ys(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,o&&hm(t,n,!0),t.child}function d0(e){var t=e.stateNode;t.pendingContext?fm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fm(e,t.context,!1),Eh(e,t.containerInfo)}function Rm(e,t,n,r,o){return vs(),yh(o),t.flags|=256,lt(e,t,n,r),t.child}var qd={dehydrated:null,treeContext:null,retryLane:0};function Gd(e){return{baseLanes:e,cachePool:null,transitions:null}}function f0(e,t,n){var r=t.pendingProps,o=Ce.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),we(Ce,o&1),e===null)return Ud(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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=bc(i,r,0,null),e=co(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Gd(n),t.memoizedState=qd,e):Oh(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return WE(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Or(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=Or(a,s):(s=co(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Gd(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=qd,r}return s=e.child,e=s.sibling,r=Or(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Oh(e,t){return t=bc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Da(e,t,n,r){return r!==null&&yh(r),ys(t,e.child,null,n),e=Oh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WE(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Iu(Error(M(422))),Da(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=bc({mode:"visible",children:r.children},o,0,null),s=co(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&ys(t,e.child,null,i),t.child.memoizedState=Gd(i),t.memoizedState=qd,s);if(!(t.mode&1))return Da(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(M(419)),r=Iu(s,r,void 0),Da(e,t,i,r)}if(a=(i&e.childLanes)!==0,wt||a){if(r=qe,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Gn(e,o),sn(r,e,o,-1))}return $h(),r=Iu(Error(M(421))),Da(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=nC.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,Tt=Pr(o.nextSibling),Pt=t,_e=!0,rn=null,e!==null&&(Mt[Lt++
vendor: 6,379 bytes, line 40
40]=Wn,Mt[Lt++]=Vn,Mt[Lt++]=ho,Wn=e.id,Vn=e.overflow,ho=t),t=Oh(t,r.children),t.flags|=4096,t)}function Am(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zd(e.return,t,n)}function Du(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function h0(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=Ce.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Am(e,n,t);else if(e.tag===19)Am(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Ce,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Du(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ul(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Du(t,!0,n,null,s);break;case"together":Du(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=Or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function VE(e,t,n){switch(t.tag){case 3:d0(t),vs();break;case 5:Fy(t);break;case 1:bt(t.type)&&Il(t);break;case 4:Eh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;we(Ll,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Ce,Ce.current&1),t.flags|=128,null):n&t.child.childLanes?f0(e,t,n):(we(Ce,Ce.current&1),e=Qn(e,t,n),e!==null?e.sibling:null);we(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return h0(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),we(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,c0(e,t,n)}return Qn(e,t,n)}var p0,Qd,m0,g0;p0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qd=function(){};m0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,to(Pn.current);var s=null;switch(n){case"input":o=vd(e,o),r=vd(e,r),s=[];break;case"select":o=Te({},o,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":o=xd(e,o),r=xd(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ol)}Sd(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ci.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ci.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&be("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};g0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Js(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function HE(e,t,n){var r=t.pendingProps;switch(vh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(t),null;case 1:return bt(t.type)&&jl(),tt(t),null;case 3:return r=t.stateNode,ws(),Se(xt),Se(ot),kh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,rn!==null&&(rf(rn),rn=null))),Qd(e,t),tt(t),null;case 5:Ch(t);var o=to(Li.current);if(n=t.type,e!==null&&t.stateNode!=null)m0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return tt(t),null}if(e=to(Pn.current),ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[En]=t,r[Di]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(o=0;o<ii.length;o++)be(ii[o],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Fp(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":zp(r,s),be("invalid",r)}Sd(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];
vendor: 32,436 bytes, line 40
40i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Oa(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Oa(r.textContent,a,e),o=["children",""+a]):Ci.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&be("scroll",r)}switch(n){case"input":Ea(r),Up(r,s,!0);break;case"textarea":Ea(r),Bp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ol)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Vv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[En]=t,e[Di]=r,p0(e,t,!1,!1),t.stateNode=e;e:{switch(i=_d(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("load",e),o=r;break;case"video":case"audio":for(o=0;o<ii.length;o++)be(ii[o],e);o=r;break;case"source":be("error",e),o=r;break;case"img":case"image":case"link":be("error",e),be("load",e),o=r;break;case"details":be("toggle",e),o=r;break;case"input":Fp(e,r),o=vd(e,r),be("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Te({},r,{value:void 0}),be("invalid",e);break;case"textarea":zp(e,r),o=xd(e,r),be("invalid",e);break;default:o=r}Sd(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?qv(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Hv(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ki(e,l):typeof l=="number"&&ki(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ci.hasOwnProperty(s)?l!=null&&s==="onScroll"&&be("scroll",e):l!=null&&nh(e,s,l,i))}switch(n){case"input":Ea(e),Up(e,r,!1);break;case"textarea":Ea(e),Bp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ir(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Yo(e,!!r.multiple,s,!1):r.defaultValue!=null&&Yo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ol)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return tt(t),null;case 6:if(e&&t.stateNode!=null)g0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(M(166));if(n=to(Li.current),to(Pn.current),ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(s=r.nodeValue!==n)&&(e=Pt,e!==null))switch(e.tag){case 3:Oa(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Oa(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return tt(t),null;case 13:if(Se(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&Tt!==null&&t.mode&1&&!(t.flags&128))Iy(),vs(),t.flags|=98560,s=!1;else if(s=ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(M(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(M(317));s[En]=t}else vs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;tt(t),s=!1}else rn!==null&&(rf(rn),rn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ce.current&1?Ue===0&&(Ue=3):$h())),t.updateQueue!==null&&(t.flags|=4),tt(t),null);case 4:return ws(),Qd(e,t),e===null&&ji(t.stateNode.containerInfo),tt(t),null;case 10:return bh(t.type._context),tt(t),null;case 17:return bt(t.type)&&jl(),tt(t),null;case 19:if(Se(Ce),s=t.memoizedState,s===null)return tt(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Js(s,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ul(e),i!==null){for(t.flags|=128,Js(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Ce,Ce.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ie()>bs&&(t.flags|=128,r=!0,Js(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ul(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Js(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return tt(t),null}else 2*Ie()-s.renderingStartTime>bs&&n!==1073741824&&(t.flags|=128,r=!0,Js(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ie(),t.sibling=null,n=Ce.current,we(Ce,r?n&1|2:n&1),t):(tt(t),null);case 22:case 23:return Lh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ct&1073741824&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function KE(e,t){switch(vh(t),t.tag){case 1:return bt(t.type)&&jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ws(),Se(xt),Se(ot),kh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ch(t),null;case 13:if(Se(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ce),null;case 4:return ws(),null;case 10:return bh(t.type._context),null;case 22:case 23:return Lh(),null;case 24:return null;default:return null}}var Ma=!1,rt=!1,qE=typeof WeakSet=="function"?WeakSet:Set,W=null;function Go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Yd(e,t,n){try{n()}catch(r){je(e,t,r)}}var Nm=!1;function GE(e,t){if(jd=Rl,e=by(),mh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===o&&(a=i),h===s&&++u===r&&(l=i),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Id={focusedElem:e,selectionRange:n},Rl=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var m=b.memoizedProps,w=b.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Xt(t.type,m),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(S){je(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return b=Nm,Nm=!1,b}function mi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Yd(t,n,s)}o=o.next}while(o!==r)}}function wc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function v0(e){var t=e.alternate;t!==null&&(e.alternate=null,v0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Di],delete t[Ld],delete t[AE],delete t[NE])),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 y0(e){return e.tag===5||e.tag===3||e.tag===4}function Om(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||y0(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 Jd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ol));else if(r!==4&&(e=e.child,e!==null))for(Jd(e,t,n),e=e.sibling;e!==null;)Jd(e,t,n),e=e.sibling}function Zd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zd(e,t,n),e=e.sibling;e!==null;)Zd(e,t,n),e=e.sibling}var Ge=null,tn=!1;function or(e,t,n){for(n=n.child;n!==null;)w0(e,t,n),n=n.sibling}function w0(e,t,n){if(Tn&&typeof Tn.onCommitFiberUnmount=="function")try{Tn.onCommitFiberUnmount(dc,n)}catch{}switch(n.tag){case 5:rt||Go(n,t);case 6:var r=Ge,o=tn;Ge=null,or(e,t,n),Ge=r,tn=o,Ge!==null&&(tn?(e=Ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&(tn?(e=Ge,n=n.stateNode,e.nodeType===8?Pu(e.parentNode,n):e.nodeType===1&&Pu(e,n),Ai(e)):Pu(Ge,n.stateNode));break;case 4:r=Ge,o=tn,Ge=n.stateNode.containerInfo,tn=!0,or(e,t,n),Ge=r,tn=o;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Yd(n,t,i),o=o.next}while(o!==r)}or(e,t,n);break;case 1:if(!rt&&(Go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){je(n,t,a)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,or(e,t,n),rt=r):or(e,t,n);break;default:or(e,t,n)}}function jm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qE),t.forEach(function(r){var o=rC.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Ge=a.stateNode,tn=!1;break e;case 3:Ge=a.stateNode.containerInfo,tn=!0;break e;case 4:Ge=a.stateNode.containerInfo,tn=!0;break e}a=a.return}if(Ge===null)throw Error(M(160));w0(s,i,o),Ge=null,tn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){je(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)x0(t,e),t=t.sibling}function x0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),yn(e),r&4){try{mi(3,e,e.return),wc(3,e)}catch(m){je(e,e.return,m)}try{mi(5,e,e.return)}catch(m){je(e,e.return,m)}}break;case 1:qt(t,e),yn(e),r&512&&n!==null&&Go(n,n.return);break;case 5:if(qt(t,e),yn(e),r&512&&n!==null&&Go(n,n.return),e.flags&32){var o=e.stateNode;try{ki(o,"")}catch(m){je(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Bv(o,s),_d(a,i);var c=_d(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?qv(o,d):u==="dangerouslySetInnerHTML"?Hv(o,d):u==="children"?ki(o,d):nh(o,u,d,c)}switch(a){case"input":yd(o,s);break;case"textarea":Wv(o,s);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Yo(o,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?Yo(o,!!s.multiple,s.defaultValue,!0):Yo(o,!!s.multiple,s.multiple?[]:"",!1))}o[Di]=s}catch(m){je(e,e.return,m)}}break;case 6:if(qt(t,e),yn(e),r&4){if(e.stateNode===null)throw Error(M(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){je(e,e.return,m)}}break;case 3:if(qt(t,e),yn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ai(t.containerInfo)}catch(m){je(e,e.return,m)}break;case 4:qt(t,e),yn(e);break;case 13:qt(t,e),yn(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Dh=Ie())),r&4&&jm(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(c=rt)||u,qt(t,e),rt=c):qt(t,e),yn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(W=e,u=e.child;u!==null;){for(d=W=u;W!==null;){switch(h=W,p=h.child,h.tag){case 0:case 11:case 14:case 15:mi(4,h,h.return);break;case 1:Go(h,h.return);var b=h.stateNode;if(typeof b.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(m){je(r,n,m)}}break;case 5:Go(h,h.return);break;case 22:if(h.memoizedState!==null){Dm(d);continue}}p!==null?(p.return=h,W=p):Dm(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Kv("display",i))}catch(m){je(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){je(e,e.return,m)}}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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:qt(t,e),yn(e),r&4&&jm(e);break;case 21:break;default:qt(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(y0(n)){var r=n;break e}n=n.return}throw Error(M(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ki(o,""),r.flags&=-33);var s=Om(e);Zd(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Om(e);Jd(e,a,i);break;default:throw Error(M(161))}}catch(l){je(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QE(e,t,n){W=e,b0(e)}function b0(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var o=W,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ma;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||rt;a=Ma;var c=rt;if(Ma=i,(rt=l)&&!c)for(W=o;W!==null;)i=W,l=i.child,i.tag===22&&i.memoizedState!==null?Mm(o):l!==null?(l.return=i,W=l):Mm(o);for(;s!==null;)W=s,b0(s),s=s.sibling;W=o,Ma=a,rt=c}Im(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,W=s):Im(e)}}function Im(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||wc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Xt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ym(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ym(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Ai(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}rt||t.flags&512&&Xd(t)}catch(h){je(t,t.return,h)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Dm(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Mm(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wc(4,t)}catch(l){je(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){je(t,o,l)}}var s=t.return;try{Xd(t)}catch(l){je(t,s,l)}break;case 5:var i=t.return;try{Xd(t)}catch(l){je(t,i,l)}}}catch(l){je(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var YE=Math.ceil,Wl=Jn.ReactCurrentDispatcher,jh=Jn.ReactCurrentOwner,zt=Jn.ReactCurrentBatchConfig,fe=0,qe=null,Me=null,Qe=0,Ct=0,Qo=Fr(0),Ue=0,zi=null,mo=0,xc=0,Ih=0,gi=null,vt=null,Dh=0,bs=1/0,$n=null,Vl=!1,ef=null,Ar=null,La=!1,_r=null,Hl=0,vi=0,tf=null,ul=-1,dl=0;function ut(){return fe&6?Ie():ul!==-1?ul:ul=Ie()}function Nr(e){return e.mode&1?fe&2&&Qe!==0?Qe&-Qe:jE.transition!==null?(dl===0&&(dl=sy()),dl):(e=ge,e!==0||(e=window.event,e=e===void 0?16:fy(e.type)),e):1}function sn(e,t,n,r){if(50<vi)throw vi=0,tf=null,Error(M(185));ra(e,n,r),(!(fe&2)||e!==qe)&&(e===qe&&(!(fe&2)&&(xc|=n),Ue===4&&mr(e,Qe)),St(e,r),n===1&&fe===0&&!(t.mode&1)&&(bs=Ie()+500,gc&&Ur()))}function St(e,t){var n=e.callbackNode;j_(e,t);var r=Pl(e,e===qe?Qe:0);if(r===0)n!==null&&Hp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Hp(n),t===1)e.tag===0?OE(Lm.bind(null,e)):Ny(Lm.bind(null,e)),PE(function(){!(fe&6)&&Ur()}),n=null;else{switch(iy(r)){case 1:n=ah;break;case 4:n=ry;break;case 16:n=Tl;break;case 536870912:n=oy;break;default:n=Tl}n=R0(n,S0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function S0(e,t){if(ul=-1,dl=0,fe&6)throw Error(M(327));var n=e.callbackNode;if(ts()&&e.callbackNode!==n)return null;var r=Pl(e,e===qe?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Kl(e,r);else{t=r;var o=fe;fe|=2;var s=E0();(qe!==e||Qe!==t)&&($n=null,bs=Ie()+500,lo(e,t));do try{ZE();break}catch(a){_0(e,a)}while(!0);xh(),Wl.current=s,fe=o,Me!==null?t=0:(qe=null,Qe=0,t=Ue)}if(t!==0){if(t===2&&(o=Pd(e),o!==0&&(r=o,t=nf(e,o))),t===1)throw n=zi,lo(e,0),mr(e,r),St(e,Ie()),n;if(t===6)mr(e,r);else{if(o=e.current.alternate,!(r&30)&&!XE(o)&&(t=Kl(e,r),t===2&&(s=Pd(e),s!==0&&(r=s,t=nf(e,s))),t===1))throw n=zi,lo(e,0),mr(e,r),St(e,Ie()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(M(345));case 2:Yr(e,vt,$n);break;case 3:if(mr(e,r),(r&130023424)===r&&(t=Dh+500-Ie(),10<t)){if(Pl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Md(Yr.bind(null,e,vt,$n),t);break}Yr(e,vt,$n);break;case 4:if(mr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-on(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YE(r/1960))-r,10<r){e.timeoutHandle=Md(Yr.bind(null,e,vt,$n),r);break}Yr(e,vt,$n);break;case 5:Yr(e,vt,$n);break;default:throw Error(M(329))}}}return St(e,Ie()),e.callbackNode===n?S0.bind(null,e):null}function nf(e,t){var n=gi;return e.current.memoizedState.isDehydrated&&(lo(e,t).flags|=256),e=Kl(e,t),e!==2&&(t=vt,vt=n,t!==null&&rf(t)),e}function rf(e){vt===null?vt=e:vt.push.apply(vt,e)}function XE(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!an(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function mr(e,t){for(t&=~Ih,t&=~xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-on(t),r=1<<n;e[n]=-1,t&=~r}}function Lm(e){if(fe&6)throw Error(M(327));ts();var t=Pl(e,0);if(!(t&1))return St(e,Ie()),null;var n=Kl(e,t);if(e.tag!==0&&n===2){var r=Pd(e);r!==0&&(t=r,n=nf(e,r))}if(n===1)throw n=zi,lo(e,0),mr(e,t),St(e,Ie()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yr(e,vt,$n),St(e,Ie()),null}function Mh(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(bs=Ie()+500,gc&&Ur())}}function go(e){_r!==null&&_r.tag===0&&!(fe&6)&&ts();var t=fe;fe|=1;var n=zt.transition,r=ge;try{if(zt.transition=null,ge=1,e)return e()}finally{ge=r,zt.transition=n,fe=t,!(fe&6)&&Ur()}}function Lh(){Ct=Qo.current,Se(Qo)}function lo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TE(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(vh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jl();break;case 3:ws(),Se(xt),Se(ot),kh();break;case 5:Ch(r);break;case 4:ws();break;case 13:Se(Ce);break;case 19:Se(Ce);break;case 10:bh(r.type._context);break;case 22:case 23:Lh()}n=n.return}if(qe=e,Me=e=Or(e.current,null),Qe=Ct=t,Ue=0,zi=null,Ih=xc=mo=0,vt=gi=null,eo!==null){for(t=0;t<eo.length;t++)if(n=eo[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}eo=null}return e}function _0(e,t){do{var n=Me;try{if(xh(),al.current=Bl,zl){for(var r=ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}zl=!1}if(po=0,He=$e=ke=null,pi=!1,$i=0,jh.current=null,n===null||n.return===null){Ue=1,zi=t,Me=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Em(i);if(p!==null){p.flags&=-257,Cm(p,i,a,s,t),p.mode&1&&_m(s,c,t),t=p,l=c;var b=t.updateQueue;if(b===null){var m=new Set;m.add(l),t.updateQueue=m}else b.add(l);break e}else{if(!(t&1)){_m(s,c,t),$h();break e}l=Error(M(426))}}else if(_e&&a.mode&1){var w=Em(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Cm(w,i,a,s,t),yh(xs(l,a));break e}}s=l=xs(l,a),Ue!==4&&(Ue=2),gi===null?gi=[s]:gi.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=i0(s,l,t);vm(s,y);break e;case 1:a=l;var v=s.type,g=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ar===null||!Ar.has(g)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=a0(s,a,t);vm(s,S);break e}}s=s.return}while(s!==null)}k0(n)}catch(_){t=_,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function E0(){var e=Wl.current;return Wl.current=Bl,e===null?Bl:e}function $h(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),qe===null||!(mo&268435455)&&!(xc&268435455)||mr(qe,Qe)}function Kl(e,t){var n=fe;fe|=2;var r=E0();(qe!==e||Qe!==t)&&($n=null,lo(e,t));do try{JE();break}catch(o){_0(e,o)}while(!0);if(xh(),fe=n,Wl.current=r,Me!==null)throw Error(M(261));return qe=null,Qe=0,Ue}function JE(){for(;Me!==null;)C0(Me)}function ZE(){for(;Me!==null&&!E_();)C0(Me)}function C0(e){var t=P0(e.alternate,e,Ct);e.memoizedProps=e.pendingProps,t===null?k0(e):Me=t,jh.current=null}function k0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KE(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,Me=null;return}}else if(n=HE(n,t,Ct),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Ue===0&&(Ue=5)}function Yr(e,t,n){var r=ge,o=zt.transition;try{zt.transition=null,ge=1,eC(e,t,n,r)}finally{zt.transition=o,ge=r}return null}function eC(e,t,n,r){do ts();while(_r!==null);if(fe&6)throw Error(M(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(I_(e,s),e===qe&&(Me=qe=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||La||(La=!0,R0(Tl,function(){return ts(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=zt.transition,zt.transition=null;var i=ge;ge=1;var a=fe;fe|=4,jh.current=null,GE(e,n),x0(n,e),xE(Id),Rl=!!jd,Id=jd=null,e.current=n,QE(n),C_(),fe=a,ge=i,zt.transition=s}else e.current=n;if(La&&(La=!1,_r=e,Hl=o),s=e.pendingLanes,s===0&&(Ar=null),P_(n.stateNode),St(e,Ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Vl)throw Vl=!1,e=ef,ef=null,e;return Hl&1&&e.tag!==0&&ts(),s=e.pendingLanes,s&1?e===tf?vi++:(vi=0,tf=e):vi=0,Ur(),null}function ts(){if(_r!==null){var e=iy(Hl),t=zt.transition,n=ge;try{if(zt.transition=null,ge=16>e?16:e,_r===null)var r=!1;else{if(e=_r,_r=null,Hl=0,fe&6)throw Error(M(331));var o=fe;for(fe|=4,W=e.current;W!==null;){var s=W,i=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var u=W;switch(u.tag){case 0:case 11:case 15:mi(8,u,s)}var d=u.child;if(d!==null)d.return=u,W=d;else for(;W!==null;){u=W;var h=u.sibling,p=u.return;if(v0(u),u===c){W=null;break}if(h!==null){h.return=p,W=h;break}W=p}}}var b=s.alternate;if(b!==null){var m=b.child;if(m!==null){b.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}W=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,W=i;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:mi(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,W=y;break e}W=s.return}}var v=e.current;for(W=v;W!==null;){i=W;var g=i.child;if(i.subtreeFlags&2064&&g!==null)g.return=i,W=g;else e:for(i=v;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:wc(9,a)}}catch(_){je(a,a.return,_)}if(a===i){W=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,W=S;break e}W=a.return}}if(fe=o,Ur(),Tn&&typeof Tn.onPostCommitFiberRoot=="function")try{Tn.onPostCommitFiberRoot(dc,e)}catch{}r=!0}return r}finally{ge=n,zt.transition=t}}return!1}function $m(e,t,n){t=xs(n,t),t=i0(e,t,1),e=Rr(e,t,1),t=ut(),e!==null&&(ra(e,1,t),St(e,t))}function je(e,t,n){if(e.tag===3)$m(e,e,n);else for(;t!==null;){if(t.tag===3){$m(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ar===null||!Ar.has(r))){e=xs(n,e),e=a0(t,e,1),t=Rr(t,e,1),e=ut(),t!==null&&(ra(t,1,e),St(t,e));break}}t=t.return}}function tC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Qe&n)===n&&(Ue===4||Ue===3&&(Qe&130023424)===Qe&&500>Ie()-Dh?lo(e,0):Ih|=n),St(e,t)}function T0(e,t){t===0&&(e.mode&1?(t=Ta,Ta<<=1,!(Ta&130023424)&&(Ta=4194304)):t=1);var n=ut();e=Gn(e,t),e!==null&&(ra(e,t,n),St(e,n))}function nC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),T0(e,n)}function rC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),T0(e,n)}var P0;P0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wt=!1,VE(e,t,n);wt=!!(e.flags&131072)}else wt=!1,_e&&t.flags&1048576&&Oy(t,Ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var o=gs(t,ot.current);es(t,n),o=Ph(null,t,r,e,o,n);var s=Rh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(r)?(s=!0,Il(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,_h(t),o.updater=yc,t.stateNode=o,o._reactInternals=t,Wd(t,r,e,n),t=Kd(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&gh(t),lt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=sC(r),e=Xt(r,e),o){case 0:t=Hd(null,t,r,e,n);break e;case 1:t=Pm(null,t,r,e,n);break e;case 11:t=km(null,t,r,e,n);break e;case 14:t=Tm(null,t,r,Xt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),Hd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),Pm(e,t,r,o,n);case 3:e:{if(d0(t),e===null)throw Error(M(387));r=t.pendingProps,s=t.memoizedState,o=s.element,$y(e,t),Fl(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=xs(Error(M(423)),t),t=Rm(e,t,r,n,o);break e}else if(r!==o){o=xs(Error(M(424)),t),t=Rm(e,t,r,n,o);break e}else for(Tt=Pr(t.stateNode.containerInfo.firstChild),Pt=t,_e=!0,rn=null,n=My(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vs(),r===o){t=Qn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return Fy(t),e===null&&Ud(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Dd(r,o)?i=null:s!==null&&Dd(r,s)&&(t.flags|=32),u0(e,t),lt(e,t,i,n),t.child;case 6:return e===null&&Ud(t),null;case 13:return f0(e,t,n);case 4:return Eh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ys(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),km(e,t,r,o,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,we(Ll,r._currentValue),r._currentValue=i,s!==null)if(an(s.value,i)){if(s.children===o.children&&!xt.current){t=Qn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Hn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),zd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(M(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),zd(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}lt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,es(t,n),o=Wt(o),r=r(o),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,o=Xt(r,t.pendingProps),o=Xt(r.type,o),Tm(e,t,r,o,n);case 15:return l0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),cl(e,t),t.tag=1,bt(r)?(e=!0,Il(t)):e=!1,es(t,n),s0(t,r,o),Wd(t,r,o,n),Kd(null,t,r,!0,e,n);case 19:return h0(e,t,n);case 22:return c0(e,t,n)}throw Error(M(156,t.tag))};function R0(e,t){return ny(e,t)}function oC(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,n,r){return new oC(e,t,n,r)}function Fh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sC(e){if(typeof e=="function")return Fh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oh)return 11;if(e===sh)return 14}return 2}function Or(e,t){var n=e.alternate;return n===null?(n=$t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 9,138 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function fl(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Fh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Fo:return co(n.children,o,s,t);case rh:i=8,o|=8;break;case hd:return e=$t(12,n,t,o|2),e.elementType=hd,e.lanes=s,e;case pd:return e=$t(13,n,t,o),e.elementType=pd,e.lanes=s,e;case md:return e=$t(19,n,t,o),e.elementType=md,e.lanes=s,e;case Fv:return bc(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lv:i=10;break e;case $v:i=9;break e;case oh:i=11;break e;case sh:i=14;break e;case dr:i=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=$t(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function co(e,t,n,r){return e=$t(7,e,r,t),e.lanes=n,e}function bc(e,t,n,r){return e=$t(22,e,r,t),e.elementType=Fv,e.lanes=n,e.stateNode={isHidden:!1},e}function Mu(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function Lu(e,t,n){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iC(e,t,n,r,o){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=vu(0),this.expirationTimes=vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Uh(e,t,n,r,o,s,i,a,l){return e=new iC(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=$t(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_h(s),e}function aC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function A0(e){if(!e)return Dr;e=e._reactInternals;e:{if(_o(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(bt(n))return Ay(e,n,t)}return t}function N0(e,t,n,r,o,s,i,a,l){return e=Uh(n,r,!0,e,o,s,i,a,l),e.context=A0(null),n=e.current,r=ut(),o=Nr(n),s=Hn(r,o),s.callback=t??null,Rr(n,s,o),e.current.lanes=o,ra(e,o,r),St(e,r),e}function Sc(e,t,n,r){var o=t.current,s=ut(),i=Nr(o);return n=A0(n),t.context===null?t.context=n:t.pendingContext=n,t=Hn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rr(o,t,i),e!==null&&(sn(e,o,i,s),il(e,o,i)),i}function ql(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 Fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zh(e,t){Fm(e,t),(e=e.alternate)&&Fm(e,t)}function lC(){return null}var O0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bh(e){this._internalRoot=e}_c.prototype.render=Bh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));Sc(e,t,null,null)};_c.prototype.unmount=Bh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;go(function(){Sc(null,e,null,null)}),t[qn]=null}};function _c(e){this._internalRoot=e}_c.prototype.unstable_scheduleHydration=function(e){if(e){var t=cy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pr.length&&t!==0&&t<pr[n].priority;n++);pr.splice(n,0,e),n===0&&dy(e)}};function Wh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Um(){}function cC(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=ql(i);s.call(c)}}var i=N0(t,r,e,0,null,!1,!1,"",Um);return e._reactRootContainer=i,e[qn]=i.current,ji(e.nodeType===8?e.parentNode:e),go(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=ql(l);a.call(c)}}var l=Uh(e,0,!1,null,null,!1,!1,"",Um);return e._reactRootContainer=l,e[qn]=l.current,ji(e.nodeType===8?e.parentNode:e),go(function(){Sc(t,l,n,r)}),l}function Cc(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=ql(i);a.call(l)}}Sc(t,i,e,o)}else i=cC(n,t,e,o,r);return ql(i)}ay=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=si(t.pendingLanes);n!==0&&(lh(t,n|1),St(t,Ie()),!(fe&6)&&(bs=Ie()+500,Ur()))}break;case 13:go(function(){var r=Gn(e,1);if(r!==null){var o=ut();sn(r,e,1,o)}}),zh(e,1)}};ch=function(e){if(e.tag===13){var t=Gn(e,134217728);if(t!==null){var n=ut();sn(t,e,134217728,n)}zh(e,134217728)}};ly=function(e){if(e.tag===13){var t=Nr(e),n=Gn(e,t);if(n!==null){var r=ut();sn(n,e,t,r)}zh(e,t)}};cy=function(){return ge};uy=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};Cd=function(e,t,n){switch(t){case"input":if(yd(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=mc(r);if(!o)throw Error(M(90));zv(r),yd(r,o)}}}break;case"textarea":Wv(e,n);break;case"select":t=n.value,t!=null&&Yo(e,!!n.multiple,t,!1)}};Yv=Mh;Xv=go;var uC={usingClientEntryPoint:!1,Events:[sa,Wo,mc,Gv,Qv,Mh]},Zs={findFiberByHostInstance:Zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dC={bundleType:Zs.bundleType,version:Zs.version,rendererPackageName:Zs.rendererPackageName,rendererConfig:Zs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ey(e),e===null?null:e.stateNode},findFiberByHostInstance:Zs.findFiberByHostInstance||lC,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 $a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$a.isDisabled&&$a.supportsFiber)try{dc=$a.inject(dC),Tn=$a}catch{}}Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uC;Nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wh(t))throw Error(M(200));return aC(e,t,null,n)};Nt.createRoot=function(e,t){if(!Wh(e))throw Error(M(299));var n=!1,r="",o=O0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Uh(e,1,!1,null,null,n,!1,r,o),e[qn]=t.current,ji(e.nodeType===8?e.parentNode:e),new Bh(t)};Nt.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(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=ey(t),e=e===null?null:e.stateNode,e};Nt.flushSync=function(e){return go(e)};Nt.hydrate=function(e,t,n){if(!Ec(t))throw Error(M(200));return Cc(null,e,t,!0,n)};Nt.hydrateRoot=function(e,t,n){if(!Wh(e))throw Error(M(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=O0;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=N0(t,null,e,1,n??null,o,!1,s,i),e[qn]=t.current,ji(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new _c(t)};Nt.render=function(e,t,n){if(!Ec(t))throw Error(M(200));return Cc(null,e,t,!1,n)};Nt.unmountComponentAtNode=function(e){if(!Ec(e))throw Error(M(40));return e._reactRootContainer?(go(function(){Cc(null,null,e,!1,function(){e._reactRootContainer=null,e[qn]=null})}),!0):!1};Nt.unstable_batchedUpdates=Mh;Nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ec(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Cc(e,t,n,!1,r)};Nt.version="18.3.1-next-f1338f8080-20240426";function j0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j0)}catch(e){console.error(e)}}
40j0(),jv.exports=Nt;var Ft=jv.exports;const I0=bv(Ft);var D0,zm=Ft;D0=zm.createRoot,zm.hydrateRoot;const fC=1,hC=1e6;let $u=0;function pC(){return $u=($u+1)%Number.MAX_SAFE_INTEGER,$u.toString()}const Fu=new Map,Bm=e=>{if(Fu.has(e))return;const t=setTimeout(()=>{Fu.delete(e),yi({type:"REMOVE_TOAST",toastId:e})},hC);Fu.set(e,t)},mC=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,fC)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Bm(n):e.toasts.forEach(r=>{Bm(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},hl=[];let pl={toasts:[]};function yi(e){pl=mC(pl,e),hl.forEach(t=>{t(pl)})}function wn({...e}){const t=pC(),n=o=>yi({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>yi({type:"DISMISS_TOAST",toastId:t});return yi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function gC(){const[e,t]=f.useState(pl);return f.useEffect(()=>(hl.push(t),()=>{const n=hl.indexOf(t);n>-1&&hl.splice(n,1)}),[e]),{...e,toast:wn,dismiss:n=>yi({type:"DISMISS_TOAST",toastId:n})}}function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Wm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function M0(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Wm(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Wm(e[o],null)}}}}function de(...e){return f.useCallback(M0(...e),e)}function vC(e,t){const n=f.createContext(t),r=s=>{const{children:i,...a}=s,l=f.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function On(e,t=[]){let n=[];function r(s,i){const a=f.createContext(i),l=n.length;n=[...n,i];const c=d=>{var y;const{scope:h,children:p,...b}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,w=f.useMemo(()=>b,Object.values(b));return x.jsx(m.Provider,{value:w,children:p})};c.displayName=s+"Provider";function u(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,b=f.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>f.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,yC(o,...t)]}function yC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ss(e){const t=xC(e),n=f.forwardRef((r,o)=>{const{children:s,...i}=r,a=f.Children.toArray(s),l=a.find(bC);if(l){const c=l.props.children,u=a.map(d=>d===l?f.Children.count(c)>1?f.Children.only(null):f.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...i,ref:o,children:f.isValidElement(c)?f.cloneElement(c,void 0,u):null})}return x.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var wC=Ss("Slot");function xC(e){const t=f.forwardRef((n,r)=>{const{children:o,...s}=n;if(f.isValidElement(o)){const i=_C(o),a=SC(s,o.props);return o.type!==f.Fragment&&(a.ref=r?M0(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var L0=Symbol("radix.slottable");function $0(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=L0,t}function bC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===L0}function SC(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}
vendor: 9,301 bytes, line 40
40:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function _C(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kc(e){const t=e+"CollectionProvider",[n,r]=On(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:w,children:y}=m,v=j.useRef(null),g=j.useRef(new Map).current;return x.jsx(o,{scope:w,itemMap:g,collectionRef:v,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Ss(a),c=j.forwardRef((m,w)=>{const{scope:y,children:v}=m,g=s(a,y),S=de(w,g.collectionRef);return x.jsx(l,{ref:S,children:v})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ss(u),p=j.forwardRef((m,w)=>{const{scope:y,children:v,...g}=m,S=j.useRef(null),_=de(w,S),C=s(u,y);return j.useEffect(()=>(C.itemMap.set(S,{ref:S,...g}),()=>void C.itemMap.delete(S))),x.jsx(h,{[d]:"",ref:_,children:v})});p.displayName=u;function b(m){const w=s(e+"CollectionConsumer",m);return j.useCallback(()=>{const v=w.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((C,E)=>g.indexOf(C.ref.current)-g.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},b,r]}var EC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],X=EC.reduce((e,t)=>{const n=Ss(`Primitive.${t}`),r=f.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function F0(e,t){e&&Ft.flushSync(()=>e.dispatchEvent(t))}function Ht(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function CC(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kC="DismissableLayer",of="dismissableLayer.update",TC="dismissableLayer.pointerDownOutside",PC="dismissableLayer.focusOutside",Vm,U0=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),aa=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=f.useContext(U0),[u,d]=f.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),b=de(t,E=>d(E)),m=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(w),v=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,_=AC(E=>{const k=E.target,N=[...c.branches].some(A=>A.contains(k));!S||N||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},h),C=NC(E=>{const k=E.target;[...c.branches].some(A=>A.contains(k))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},h);return CC(E=>{v===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),f.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Vm=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Hm(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vm)}},[u,h,n,c]),f.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Hm())},[u,c]),f.useEffect(()=>{const E=()=>p({});return document.addEventListener(of,E),()=>document.removeEventListener(of,E)},[]),x.jsx(X.div,{...l,ref:b,style:{pointerEvents:g?S?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,C.onFocusCapture),onBlurCapture:K(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,_.onPointerDownCapture)})});aa.displayName=kC;var RC="DismissableLayerBranch",z0=f.forwardRef((e,t)=>{const n=f.useContext(U0),r=f.useRef(null),o=de(t,r);return f.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(X.div,{...e,ref:o})});z0.displayName=RC;function AC(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){B0(TC,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NC(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e),r=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!r.current&&B0(PC,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hm(){const e=new CustomEvent(of);document.dispatchEvent(e)}function B0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?F0(o,s):o.dispatchEvent(s)}var OC=aa,jC=z0,Xe=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},IC="Portal",Tc=f.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=f.useState(!1);Xe(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?I0.createPortal(x.jsx(X.div,{...r,ref:t}),i):null});Tc.displayName=IC;function DC(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Eo=e=>{const{present:t,children:n}=e,r=MC(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=de(r.ref,LC(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};Eo.displayName="Presence";function MC(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,l]=DC(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Fa(r.current);s.current=a==="mounted"?c:"none"},[a]),Xe(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,p=Fa(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Xe(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const m=Fa(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=p=>{p.target===t&&(s.current=Fa(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Fa(e){return(e==null?void 0:e.animationName)||"none"}function LC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $C=Zf[" useInsertionEffect ".trim().toString()]||Xe;function vo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=FC({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} 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.`),u.current=a},[a,r])}const c=f.useCallback(u=>{var d;if(a){const h=UC(u)?u(e):u;h!==e&&((d=i.current)==null||d.call(i,h))}else s(u)},[a,e,s,i]);return[l,c]}function FC({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),s=f.useRef(t);return $C(()=>{s.current=t},[t]),f.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function UC(e){return typeof e=="function"}var W0=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"}),zC="VisuallyHidden",Pc=f.forwardRef((e,t)=>
40x.jsx(X.span,{...e,ref:t,style:{...W0,...e.style}}));Pc.displayName=zC;var BC=Pc,Vh="ToastProvider",[Hh,WC,VC]=kc("Toast"),[V0,UM]=On("Toast",[VC]),[HC,Rc]=V0(Vh),H0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=f.useState(null),[c,u]=f.useState(0),d=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Vh}\`. Expected non-empty \`string\`.`),x.jsx(Hh.Provider,{scope:t,children:x.jsx(HC,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:f.useCallback(()=>u(p=>p+1),[]),onToastRemove:f.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:i})})};H0.displayName=Vh;var K0="ToastViewport",KC=["F8"],sf="toast.viewportPause",af="toast.viewportResume",q0=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=KC,label:o="Notifications ({hotkey})",...s}=e,i=Rc(K0,n),a=WC(n),l=f.useRef(null),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null),h=de(t,d,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;f.useEffect(()=>{const w=y=>{var g;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),f.useEffect(()=>{const w=l.current,y=d.current;if(b&&w&&y){const v=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(sf);y.dispatchEvent(C),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(af);y.dispatchEvent(C),i.isClosePausedRef.current=!1}},S=C=>{!w.contains(C.relatedTarget)&&g()},_=()=>{w.contains(document.activeElement)||g()};return w.addEventListener("focusin",v),w.addEventListener("focusout",S),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",_),window.addEventListener("blur",v),window.addEventListener("focus",g),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",_),window.removeEventListener("blur",v),window.removeEventListener("focus",g)}}},[b,i.isClosePausedRef]);const m=f.useCallback(({tabbingDirection:w})=>{const v=a().map(g=>{const S=g.ref.current,_=[S,...sk(S)];return w==="forwards"?_:_.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return f.useEffect(()=>{const w=d.current;if(w){const y=v=>{var _,C,E;const g=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!g){const k=document.activeElement,N=v.shiftKey;if(v.target===w&&N){(_=c.current)==null||_.focus();return}const D=m({tabbingDirection:N?"backwards":"forwards"}),B=D.findIndex(I=>I===k);Uu(D.slice(B+1))?v.preventDefault():N?(C=c.current)==null||C.focus():(E=u.current)==null||E.focus()}};return w.addEventListener("keydown",y),()=>w.removeEventListener("keydown",y)}},[a,m]),x.jsxs(jC,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&x.jsx(lf,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Uu(w)}}),x.jsx(Hh.Slot,{scope:n,children:x.jsx(X.ol,{tabIndex:-1,...s,ref:h})}),b&&x.jsx(lf,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Uu(w)}})]})});q0.displayName=K0;var G0="ToastFocusProxy",lf=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Rc(G0,n);return x.jsx(Pc,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});lf.displayName=G0;var la="Toast",qC="toast.swipeStart",GC="toast.swipeMove",QC="toast.swipeCancel",YC="toast.swipeEnd",Q0=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a,l]=vo({prop:r,defaultProp:o??!0,onChange:s,caller:la});return x.jsx(Eo,{present:n||a,children:x.jsx(ZC,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Ht(e.onPause),onResume:Ht(e.onResume),onSwipeStart:K(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:K(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:K(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:K(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Q0.displayName=la;var[XC,JC]=V0(la,{onClose(){}}),ZC=f.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...b}=e,m=Rc(la,n),[w,y]=f.useState(null),v=de(t,I=>y(I)),g=f.useRef(null),S=f.useRef(null),_=o||m.duration,C=f.useRef(0),E=f.useRef(_),k=f.useRef(0),{onToastAdd:N,onToastRemove:A}=m,O=Ht(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=m.viewport)==null||H.focus()),i()}),D=f.useCallback(I=>{!I||I===1/0||(window.clearTimeout(k.current),C.current=new Date().getTime(),k.current=window.setTimeout(O,I))},[O]);f.useEffect(()=>{const I=m.viewport;if(I){const H=()=>{D(E.current),c==null||c()},L=()=>{const U=new Date().getTime()-C.current;E.current=E.current-U,window.clearTimeout(k.current),l==null||l()};return I.addEventListener(sf,L),I.addEventListener(af,H),()=>{I.removeEventListener(sf,L),I.removeEventListener(af,H)}}},[m.viewport,_,l,c,D]),f.useEffect(()=>{s&&!m.isClosePausedRef.current&&D(_)},[s,_,m.isClosePausedRef,D]),f.useEffect(()=>(N(),()=>A()),[N,A]);const B=f.useMemo(()=>w?nw(w):null,[w]);return m.viewport?x.jsxs(x.Fragment,{children:[B&&x.jsx(ek,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),x.jsx(XC,{scope:n,onClose:O,children:Ft.createPortal(x.jsx(Hh.ItemSlot,{scope:n,children:x.jsx(OC,{asChild:!0,onEscapeKeyDown:K(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||O(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(X.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...b,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:K(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:K(e.onPointerDown,I=>{I.button===0&&(g.current={x:I.clientX,y:I.clientY})}),onPointerMove:K(e.onPointerMove,I=>{if(!g.current)return;const H=I.clientX-g.current.x,L=I.clientY-g.current.y,U=!!S.current,T=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=T?P(0,H):0,q=T?0:P(0,L),z=I.pointerType==="touch"?10:2,Q={x:$,y:q},Y={originalEvent:I,delta:Q};U?(S.current=Q,Ua(GC,d,Y,{discrete:!1})):Km(Q,m.swipeDirection,z)?(S.current=Q,Ua(qC,u,Y,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(H)>z||Math.abs(L)>z)&&(g.current=null)}),onPointerUp:K(e.onPointerUp,I=>{const H=S.current,L=I.target;if(L.hasPointerCapture(I.pointerId)&&L.releasePointerCapture(I.pointerId),S.current=null,g.current=null,H){const U=I.currentTarget,T={originalEvent:I,delta:H};Km(H,m.swipeDirection,m.swipeThreshold)?Ua(YC,p,T,{discrete:!0}):Ua(QC,h,T,{discrete:!0}),U.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),ek=e=>{const{__scopeToast:t,children:n,...r}=e,o=Rc(la,t),[s,i]=f.useState(!1),[a,l]=f.useState(!1);return rk(()=>i(!0)),f.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Tc,{asChild:!0,children:x.jsx(Pc,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},tk="ToastTitle",Y0=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(X.div,{...r,ref:t})});Y0.displayName=tk;var nk="ToastDescription",X0=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(X.div,{...r,ref:t})});X0.displayName=nk;var J0="ToastAction",Z0=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(tw,{altText:n,asChild:!0,children:x.jsx(Kh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${J0}\`. Expected non-empty \`string\`.`),null)});Z0.displayName=J0;var ew="ToastClose",Kh=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=JC(ew,n);return x.jsx(tw,{asChild:!0,children:x.jsx(X.button,{type:"button",...r,ref:t,onClick:K(e.onClick,o.onClose)})})});Kh.displayName=ew;var tw=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(X.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function nw(e){const t=[];
vendor: 6,644 bytes, lines 40-104
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ok(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...nw(r))}}),t}function Ua(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?F0(o,s):o.dispatchEvent(s)}var Km=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function rk(e=()=>{}){const t=Ht(e);Xe(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ok(e){return e.nodeType===e.ELEMENT_NODE}function sk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Uu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ik=H0,rw=q0,ow=Q0,sw=Y0,iw=X0,aw=Z0,lw=Kh;function cw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=cw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function uw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=cw(e))&&(r&&(r+=" "),r+=t);return r}const qm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Gm=uw,qh=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Gm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=qm(u)||qm(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...p}=u;return Object.entries(p).every(b=>{let[m,w]=b;return Array.isArray(w)?w.includes({...s,...a}[m]):{...s,...a}[m]===w})?[...c,d,h]:c},[]);return Gm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const ak=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var lk={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 ck=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>f.createElement("svg",{ref:l,...lk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:dw("lucide",o),...a},[...i.map(([c,u])=>f.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const dn=(e,t)=>{const n=f.forwardRef(({className:r,...o},s)=>f.createElement(ck,{ref:s,iconNode:t,className:dw(`lucide-${ak(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const uk=dn("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
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 dk=dn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 fw=dn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 fk=dn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 hk=dn("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
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 pk=dn("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
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 mk=dn("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 gk=dn("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
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 vk=dn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
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 yk=dn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
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 hw=dn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gh="-",wk=e=>{const t=bk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Gh);return a[0]===""&&a.length!==1&&a.shift(),pw(a,t)||xk(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},pw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Gh);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Qm=/^\[(.+)\]$/,xk=e=>{if(Qm.test(e)){const t=Qm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bk=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return _k(Object.entries(e.classGroups),n).forEach(([s,i])=>{cf(i,r,s,t)}),r},cf=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ym(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Sk(o)){cf(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{cf(i,Ym(t,s),n,r)})})},Ym=(e,t)=>{let n=e;
vendor: 4,751 bytes, line 115
115return t.split(Gh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Sk=e=>e.isThemeGetter,_k=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,Ek=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},mw="!",Ck=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,d;for(let w=0;w<a.length;w++){let y=a[w];if(c===0){if(y===o&&(r||a.slice(w,w+s)===t)){l.push(a.slice(u,w)),u=w+s;continue}if(y==="/"){d=w;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),p=h.startsWith(mw),b=p?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:i}):i},kk=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Tk=e=>({cache:Ek(e.cacheSize),parseClassName:Ck(e),...wk(e)}),Pk=/\s+/,Rk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(Pk);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let b=!!p,m=r(b?h.substring(0,p):h);if(!m){if(!b){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}b=!1}const w=kk(u).join(":"),y=d?w+mw:w,v=y+m;if(s.includes(v))continue;s.push(v);const g=o(m,b);for(let S=0;S<g.length;++S){const _=g[S];s.push(y+_)}a=c+(a.length>0?" "+a:a)}return a};function Ak(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gw(t))&&(r&&(r+=" "),r+=n);return r}const gw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gw(e[r]))&&(n&&(n+=" "),n+=t);return n};function Nk(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Tk(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Rk(l,n);return o(l,u),u}return function(){return s(Ak.apply(null,arguments))}}const xe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},vw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ok=/^\d+\/\d+$/,jk=new Set(["px","full","screen"]),Ik=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dk=/\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$/,Mk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$k=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dn=e=>ns(e)||jk.has(e)||Ok.test(e),sr=e=>Rs(e,"length",Kk),ns=e=>!!e&&!Number.isNaN(Number(e)),zu=e=>Rs(e,"number",ns),ei=e=>!!e&&Number.isInteger(Number(e)),Fk=e=>e.endsWith("%")&&ns(e.slice(0,-1)),ne=e=>vw.test(e),ir=e=>Ik.test(e),Uk=new Set(["length","size","percentage"]),zk=e=>Rs(e,Uk,yw),Bk=e=>Rs(e,"position",yw),Wk=new Set(["image","url"]),Vk=e=>Rs(e,Wk,Gk),Hk=e=>Rs(e,"",qk),ti=()=>!0,Rs=(e,t,n)=>{const r=vw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Kk=e=>Dk.test(e)&&!Mk.test(e),yw=()=>!1,qk=e=>Lk.test(e),Gk=e=>$k.test(e),Qk=()=>{const e=xe("colors"),t=xe("spacing"),n=xe("blur"),r=xe("brightness"),o=xe("borderColor"),s=xe("borderRadius"),i=xe("borderSpacing"),a=xe("borderWidth"),l=xe("contrast"),c=xe("grayscale"),u=xe("hueRotate"),d=xe("invert"),h=xe("gap"),p=xe("gradientColorStops"),b=xe("gradientColorStopPositions"),m=xe("inset"),w=xe("margin"),y=xe("opacity"),v=xe("padding"),g=xe("saturate"),S=xe("scale"),_=xe("sepia"),C=xe("skew"),E=xe("space"),k=xe("translate"),N=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",ne,t],D=()=>[ne,t],B=()=>["",Dn,sr],I=()=>["auto",ns,ne],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],U=()=>["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"],P=()=>["","0",ne],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[ns,ne];return{cacheSize:500,separator:":",theme:{colors:[ti],spacing:[Dn,sr],blur:["none","",ir,ne],brightness:q(),borderColor:[e],borderRadius:["n
115one","","full",ir,ne],borderSpacing:D(),borderWidth:B(),contrast:q(),grayscale:P(),hueRotate:q(),invert:P(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Fk,sr],inset:O(),margin:O(),opacity:q(),padding:D(),saturate:q(),scale:q(),sepia:P(),skew:q(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[ir]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...H(),ne]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ei,ne]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",ei,ne]}],"grid-cols":[{"grid-cols":[ti]}],"col-start-end":[{col:["auto",{span:["full",ei,ne]},ne]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ti]}],"row-start-end":[{row:["auto",{span:[ei,ne]},ne]}],"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",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[ir]},ir]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ir,sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zu]}],"font-family":[{font:[ti]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ne]}],"line-clamp":[{"line-clamp":["none",ns,zu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dn,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dn,sr]}],"underline-offset":[{"underline-offset":["auto",Dn,ne]}],"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",ne]}],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",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),Bk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Vk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
115],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[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":[y]}],"border-style":[{border:[...L(),"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":[y]}
vendor: 4,467 bytes, line 115
115],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Dn,ne]}],"outline-w":[{outline:[Dn,sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Dn,sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ir,Hk]}],"shadow-color":[{shadow:[ti]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ir,ne]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ei,ne]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],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",ne]}],"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"]}],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",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dn,sr,zu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
115none"]}]},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"]}}},Yk=Nk(Qk);function le(...e){return Yk(uw(e))}const Xk=ik,ww=f.forwardRef(({className:e,...t},n)=>x.jsx(rw,{ref:n,className:le("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}));ww.displayName=rw.displayName;const Jk=qh("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"}}),xw=f.forwardRef(({className:e,variant:t,...n},r)=>x.jsx(ow,{ref:r,className:le(Jk({variant:t}),e),...n}));xw.displayName=ow.displayName;const Zk=f.forwardRef(({className:e,...t},n)=>x.jsx(aw,{ref:n,className:le("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Zk.displayName=aw.displayName;const bw=f.forwardRef(({className:e,...t},n)=>x.jsx(lw,{ref:n,className:le("absolute right-2 top-2 rounded-md p-1 text-foreground
115/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(hw,{className:"h-4 w-4"})}));bw.displayName=lw.displayName;const Sw=f.forwardRef(({className:e,...t},n)=>x.jsx(sw,{ref:n,className:le("text-sm font-semibold",e),...t}));Sw.displayName=sw.displayName;const _w=f.forwardRef(({className:e,...t},n)=>x.jsx(iw,{ref:n,className:le("text-sm opacity-90",e),...t}));_w.displayName=iw.displayName;function eT(){const{toasts:e}=gC();return x.jsxs(Xk,{children:[e.map(function({id:t,title:n,description:r,action:o,...s}){return x.jsxs(xw,{...s,children:[x.jsxs("div",{className:"grid gap-1",children:[n&&x.jsx(Sw,{children:n}),r&&x.jsx(_w,{children:r})]}),o,x.jsx(bw,{})]},t)}),x.jsx(ww,{})]})}var Xm=["light","dark"],tT="(prefers-color-scheme: dark)",nT=f.createContext(void 0),rT={setTheme:e=>{},themes:[]},oT=()=>{var e;return(e=f.useContext(nT))!=null?e:rT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,attrs:a,nonce:l})=>{let c=s==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=o?Xm.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(b,m=!1,w=!0)=>{let y=i?i[b]:b,v=m?b+"|| ''":`'${y}'`,g="";return o&&w&&!m&&Xm.includes(b)&&(g+=`d.style.colorScheme = '${b}';`),n==="class"?m||y?g+=`c.add(${v})`:g+="null":y&&(g+=`d[s](n,${v})`),g},p=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${tT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${c?"":"else{"+h(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(s,!1,!1)};}${d}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var sT=e=>{switch(e){case"success":return lT;case"info":return uT;case"warning":return cT;case"error":return dT;default:return null}},iT=Array(12).fill(0),aT=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},iT.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),lT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),cT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.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"})),uT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),dT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),fT=j.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"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hT=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};
115return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},uf=1,pT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:uf++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
115this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async l=>{if(s=["resolve",l],j.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(gT(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||uf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},gt=new pT,mT=(e,t)=>{let n=(t==null?void 0:t.id)||uf++;return gt.addToast({title:e,...t,id:n}),n},gT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vT=mT,yT=()=>gt.toasts,wT=()=>gt.getActiveToasts(),za=Object.assign(vT,{success:gt.success,info:gt.info,warning:gt.warning,error:gt.error,custom:gt.custom,message:gt.message,promise:gt.promise,dismiss:gt.dismiss,loading:gt.loading},{getHistory:yT,getToasts:wT});function xT(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}xT(`: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 Ba(e){return e.label!==void 0}var bT=3,ST="32px",_T="16px",Jm=4e3,ET=356,CT=14,kT=20,TT=200;function Gt(...e){return e.filter(Boolean).join(" ")}function PT(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var RT=e=>{var t,n,r,o,s,i,a,l,c,u,d;let{invert:h,toast:p,unstyled:b,interacting:m,setHeights:w,visibleToasts:y,heights:v,index:g,toasts:S,expanded:_,removeToast:C,defaultRichColors:E,closeButton:k,style:N,cancelButtonStyle:A,actionButtonStyle:O,className:D="",descriptionClassName:B="",duration:I,position:H,gap:L,loadingIcon:U,expandByDefault:T,classNames:P,icons:$,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:z}=e,[Q,Y]=j.useState(null),[me,ce]=j.useState(null),[F,oe]=j.useState(!1),[he,V]=j.useState(!1),[re,J]=j.useState(!1),[Ee,Pe]=j.useState(!1),[ht,st]=j.useState(!1),[hn,er]=j.useState(0),[pn,Kt]=j.useState(0),mn=j.useRef(p.duration||I||Jm),Vr=j.useRef(null),gn=j.useRef(null),va=g===0,au=g+1<=y,pt=p.type,Et=p.dismissible!==!1,tr=p.className||"",Hr=p.descriptionClassName||"",Kr=j.useMemo(()=>v.findIndex(G=>G.toastId===p.id)||0,[v,p.id]),vn=j.useMemo(()=>{var G;return(G=p.closeButton)!=null?G:k},[p.closeButton,k]),zs=j.useMemo(()=>p.duration||I||Jm,[p.duration,I]),Bs=j.useRef(0),nr=j.useRef(0),ko=j.useRef(0),In=j.useRef(null),[lu,ya]=H.split("-"),wa=j.useMemo(()=>v.reduce((G,te,se)=>se>=Kr?G:G+te.height,0),[v,Kr]),xa=hT(),cu=p.invert||h,De=pt==="loading";nr.current=j.useMemo(()=>Kr*L+wa,[Kr,wa]),j.useEffect(()=>{mn.current=zs},[zs]),j.useEffect(()=>{oe(!0)},[]),j.useEffect(()=>{let G=gn.current;if(G){let te=G.getBoundingClientRect().height;return Kt(te),w(se=>[{toastId:p.id,height:te,position:p.position},...se]),()=>w(se=>se.filter(Ae=>Ae.toastId!==p.id))}},[w,p.id]),j.useLayoutEffect(()=>{if(!F)return;let G=gn.current,te=G.style.height;G.style.height="auto";let se=G.getBoundingClientRect().height;G.style.height=te,Kt(se),w(Ae=>Ae.find(Be=>Be.toastId===p.id)?Ae.map(Be=>Be.toastId===p.id?{...Be,height:se}:Be):[{toastId:p.id,height:se,position:p.position},...Ae])},[F,p.title,p.description,w,p.id]);let Re=j.useCallback(()=>{V(!0),er(nr.current),w(G=>G.filter(te=>te.toastId!==p.id)),setTimeout(()=>{C(p)},TT)},[p,C,w,nr]);j.useEffect(()=>{if(p.promise&&pt==="loading"||p.duration===1/0||p.type==="loading")return;let G;return _||m||z&&xa?(()=>{if(ko.current<Bs.current){let te=new Date().getTime()-Bs.current;mn.current=mn.current-te}
116ko.current=new Date().getTime()})():mn.current!==1/0&&(Bs.current=new Date().getTime(),G=setTimeout(()=>{var te;(te=p.onAutoClose)==null||te.call(p,p),Re()},mn.current)),()=>clearTimeout(G)},[_,m,p,pt,z,xa,Re]),j.useEffect(()=>{p.delete&&Re()},[Re,p.delete]);function it(){var G,te,se;return $!=null&&$.loading?j.createElement("div",{className:Gt(P==null?void 0:P.loader,(G=p==null?void 0:p.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":pt==="loading"},$.loading):U?j.createElement("div",{className:Gt(P==null?void 0:P.loader,(te=p==null?void 0:p.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":pt==="loading"},U):j.createElement(aT,{className:Gt(P==null?void 0:P.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader),visible:pt==="loading"})}return j.createElement("li",{tabIndex:0,ref:gn,className:Gt(D,tr,P==null?void 0:P.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[pt],(n=p==null?void 0:p.classNames)==null?void 0:n[pt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":F,"data-promise":!!p.promise,"data-swiped":ht,"data-removed":he,"data-visible":au,"data-y-position":lu,"data-x-position":ya,"data-index":g,"data-front":va,"data-swiping":re,"data-dismissible":Et,"data-type":pt,"data-invert":cu,"data-swipe-out":Ee,"data-swipe-direction":me,"data-expanded":!!(_||T&&F),style:{"--index":g,"--toasts-before":g,"--z-index":S.length-g,"--offset":`${he?hn:nr.current}px`,"--initial-height":T?"auto":`${pn}px`,...N,...p.style},onDragEnd:()=>{J(!1),Y(null),In.current=null},onPointerDown:G=>{De||!Et||(Vr.current=new Date,er(nr.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(J(!0),In.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,te,se,Ae;if(Ee||!Et)return;In.current=null;let Be=Number(((G=gn.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ve=Number(((te=gn.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((se=Vr.current)==null?void 0:se.getTime()),Ne=Q==="x"?Be:ve,We=Math.abs(Ne)/Je;if(Math.abs(Ne)>=kT||We>.11){er(nr.current),(Ae=p.onDismiss)==null||Ae.call(p,p),ce(Q==="x"?Be>0?"right":"left":ve>0?"down":"up"),Re(),Pe(!0),st(!1);return}J(!1),Y(null)},onPointerMove:G=>{var te,se,Ae,Be;if(!In.current||!Et||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;let ve=G.clientY-In.current.y,Je=G.clientX-In.current.x,Ne=(se=e.swipeDirections)!=null?se:PT(H);!Q&&(Math.abs(Je)>1||Math.abs(ve)>1)&&Y(Math.abs(Je)>Math.abs(ve)?"x":"y");let We={x:0,y:0};Q==="y"?(Ne.includes("top")||Ne.includes("bottom"))&&(Ne.includes("top")&&ve<0||Ne.includes("bottom")&&ve>0)&&(We.y=ve):Q==="x"&&(Ne.includes("left")||Ne.includes("right"))&&(Ne.includes("left")&&Je<0||Ne.includes("right")&&Je>0)&&(We.x=Je),(Math.abs(We.x)>0||Math.abs(We.y)>0)&&st(!0),(Ae=gn.current)==null||Ae.style.setProperty("--swipe-amount-x",`${We.x}px`),(Be=gn.current)==null||Be.style.setProperty("--swipe-amount-y",`${We.y}px`)}},vn&&!p.jsx?j.createElement("button",{"aria-label":q,"data-disabled":De,"data-close-button":!0,onClick:De||!Et?()=>{}:()=>{var G;Re(),(G=p.onDismiss)==null||G.call(p,p)},className:Gt(P==null?void 0:P.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(s=$==null?void 0:$.close)!=null?s:fT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:j.createElement(j.Fragment,null,pt||p.icon||p.promise?j.createElement("div",{"data-icon":"",className:Gt(P==null?void 0:P.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||it():null,p.type!=="loading"?p.icon||($==null?void 0:$[pt])||sT(pt):null):null,j.createElement("div",{"data-content":"",className:Gt(P==null?void 0:P.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Gt(P==null?void 0:P.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?j.createElement("div",{"data-description":"",className:Gt(B,Hr,P==null?void 0:P.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&Ba(p.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:G=>{var te,se;
116Ba(p.cancel)&&Et&&((se=(te=p.cancel).onClick)==null||se.call(te,G),Re())},className:Gt(P==null?void 0:P.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&Ba(p.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||O,onClick:G=>{var te,se;Ba(p.action)&&((se=(te=p.action).onClick)==null||se.call(te,G),!G.defaultPrevented&&Re())},className:Gt(P==null?void 0:P.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function Zm(){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 AT(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?_T:ST;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=a:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var NT=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:p,visibleToasts:b=bT,toastOptions:m,dir:w=Zm(),gap:y=CT,loadingIcon:v,icons:g,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[C,E]=j.useState([]),k=j.useMemo(()=>Array.from(new Set([r].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,r]),[N,A]=j.useState([]),[O,D]=j.useState(!1),[B,I]=j.useState(!1),[H,L]=j.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=j.useRef(null),T=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=j.useRef(null),$=j.useRef(!1),q=j.useCallback(z=>{E(Q=>{var Y;return(Y=Q.find(me=>me.id===z.id))!=null&&Y.delete||gt.dismiss(z.id),Q.filter(({id:me})=>me!==z.id)})},[]);return j.useEffect(()=>gt.subscribe(z=>{if(z.dismiss){E(Q=>Q.map(Y=>Y.id===z.id?{...Y,delete:!0}:Y));return}setTimeout(()=>{I0.flushSync(()=>{E(Q=>{let Y=Q.findIndex(me=>me.id===z.id);return Y!==-1?[...Q.slice(0,Y),{...Q[Y],...z},...Q.slice(Y+1)]:[z,...Q]})})})}),[]),j.useEffect(()=>{if(u!=="system"){L(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:Q})=>{L(Q?"dark":"light")})}catch{z.addListener(({matches:Y})=>
vendor: 5,123 bytes, line 116
116{try{L(Y?"dark":"light")}catch(me){console.error(me)}})}},[u]),j.useEffect(()=>{C.length<=1&&D(!1)},[C]),j.useEffect(()=>{let z=Q=>{var Y,me;o.every(ce=>Q[ce]||Q.code===ce)&&(D(!0),(Y=U.current)==null||Y.focus()),Q.code==="Escape"&&(document.activeElement===U.current||(me=U.current)!=null&&me.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[o]),j.useEffect(()=>{if(U.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,$.current=!1)}},[U.current]),j.createElement("section",{ref:t,"aria-label":`${S} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((z,Q)=>{var Y;let[me,ce]=z.split("-");return C.length?j.createElement("ol",{key:z,dir:w==="auto"?Zm():w,tabIndex:-1,ref:U,className:a,"data-sonner-toaster":!0,"data-theme":H,"data-y-position":me,"data-lifted":O&&C.length>1&&!s,"data-x-position":ce,style:{"--front-toast-height":`${((Y=N[0])==null?void 0:Y.height)||0}px`,"--width":`${ET}px`,"--gap":`${y}px`,...p,...AT(l,c)},onBlur:F=>{$.current&&!F.currentTarget.contains(F.relatedTarget)&&($.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||$.current||($.current=!0,P.current=F.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{B||D(!1)},onDragEnd:()=>D(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},C.filter(F=>!F.position&&Q===0||F.position===z).map((F,oe)=>{var he,V;return j.createElement(RT,{key:F.id,icons:g,index:oe,toast:F,defaultRichColors:d,duration:(he=m==null?void 0:m.duration)!=null?he:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:b,closeButton:(V=m==null?void 0:m.closeButton)!=null?V:i,interacting:B,position:z,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:q,toasts:C.filter(re=>re.position==F.position),heights:N.filter(re=>re.position==F.position),setHeights:A,expandByDefault:s,gap:y,loadingIcon:v,expanded:O,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const OT=({...e})=>{const{theme:t="system"}=oT();return x.jsx(NT,{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 jT=Zf[" useId ".trim().toString()]||(()=>{}),IT=0;function jr(e){const[t,n]=f.useState(jT());return Xe(()=>{e||n(r=>r??String(IT++))},[e]),e||(t?`radix-${t}`:"")}const DT=["top","right","bottom","left"],Mr=Math.min,kt=Math.max,Gl=Math.round,Wa=Math.floor,Rn=e=>({x:e,y:e}),MT={left:"right",right:"left",bottom:"top",top:"bottom"},LT={start:"end",end:"start"};function df(e,t,n){return kt(e,Mr(t,n))}function Yn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function As(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Yh(e){return e==="y"?"height":"width"}const $T=new Set(["top","bottom"]);function kn(e){return $T.has(Xn(e))?"y":"x"}function Xh(e){return Qh(kn(e))}function FT(e,t,n){n===void 0&&(n=!1);const r=As(e),o=Xh(e),s=Yh(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ql(i)),[i,Ql(i)]}function UT(e){const t=Ql(e);return[ff(e),t,ff(t)]}function ff(e){return e.replace(/start|end/g,t=>LT[t])}const eg=["left","right"],tg=["right","left"],zT=["top","bottom"],BT=["bottom","top"];function WT(e,t,n){switch(e){case"top":case"bottom":return n?t?tg:eg:t?eg:tg;case"left":case"right":return t?zT:BT;default:return[]}}function VT(e,t,n,r){const o=As(e);let s=WT(Xn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ff)))),s}function Ql(e){return e.replace(/left|right|bottom|top/g,t=>MT[t])}function HT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ew(e){return typeof e!="number"?HT(e):{top:e,right:e,bottom:e,left:e}}function Yl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ng(e,t,n){let{reference:r,floating:o}=e;const s=kn(t),i=Xh(t),a=Yh(i),l=Xn(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(As(t)){case"start":p[i]-=h*(n&&c?-1:1);break;case"end":p[i]+=h*(n&&c?-1:1);break}return p}
vendor: 10,031 bytes, line 116
116const KT=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=ng(c,r,l),h=r,p={},b=0;for(let m=0;m<a.length;m++){const{name:w,fn:y}=a[m],{x:v,y:g,data:S,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=v??u,d=g??d,p={...p,[w]:{...p[w],...S}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(c=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:u,y:d}=ng(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}};async function Bi(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Yn(t,e),b=Ew(p),w=a[h?d==="floating"?"reference":"floating":d],y=Yl(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},_=Yl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-_.top+b.top)/S.y,bottom:(_.bottom-y.bottom+b.bottom)/S.y,left:(y.left-_.left+b.left)/S.x,right:(_.right-y.right+b.right)/S.x}}const qT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Yn(e,t)||{};if(c==null)return{};const d=Ew(u),h={x:n,y:r},p=Xh(o),b=Yh(p),m=await i.getDimensions(c),w=p==="y",y=w?"top":"left",v=w?"bottom":"right",g=w?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[p]-h[p]-s.floating[b],_=h[p]-s.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=C?C[g]:0;(!E||!await(i.isElement==null?void 0:i.isElement(C)))&&(E=a.floating[g]||s.floating[b]);const k=S/2-_/2,N=E/2-m[b]/2-1,A=Mr(d[y],N),O=Mr(d[v],N),D=A,B=E-m[b]-O,I=E/2-m[b]/2+k,H=df(D,I,B),L=!l.arrow&&As(o)!=null&&I!==H&&s.reference[b]/2-(I<D?A:O)-m[b]/2<0,U=L?I<D?I-D:I-B:0;return{[p]:h[p]+U,data:{[p]:H,centerOffset:I-H-U,...L&&{alignmentOffset:U}},reset:L}}}),GT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...w}=Yn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Xn(o),v=kn(a),g=Xn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=h||(g||!m?[Ql(a)]:UT(a)),C=b!=="none";!h&&C&&_.push(...VT(a,m,b,S));const E=[a,..._],k=await Bi(t,w),N=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&N.push(k[y]),d){const I=FT(o,i,S);N.push(k[I[0]],k[I[1]])}if(A=[...A,{placement:o,overflows:N}],!N.every(I=>I<=0)){var O,D;const I=(((O=s.flip)==null?void 0:O.index)||0)+1,H=E[I];if(H&&(!(d==="alignment"?v!==kn(H):!1)||A.every(T=>T.overflows[0]>0&&kn(T.placement)===v)))return{data:{index:I,overflows:A},reset:{placement:H}};let L=(D=A.filter(U=>U.overflows[0]<=0).sort((U,T)=>U.overflows[1]-T.overflows[1])[0])==null?void 0:D.placement;if(!L)switch(p){case"bestFit":{var B;const U=(B=A.filter(T=>{if(C){const P=kn(T.placement);return P===v||P==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(P=>P>0).reduce((P,$)=>P+$,0)]).sort((T,P)=>T[1]-P[1])[0])==null?void 0:B[0];U&&(L=U);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function rg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function og(e){return DT.some(t=>e[t]>=0)}const QT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Yn(e,t);switch(r){case"referenceHidden":{const s=await Bi(t,{...o,elementContext:"reference"}),i=rg(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:og(i)}}}case"escaped":{const s=await Bi(t,{...o,altBoundary:!0}),i=rg(s,n.floating);return{data:{escapedOffsets:i,escaped:og(i)}}}default:return{}}}}},Cw=new Set(["left","top"]);async function YT(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Xn(n),a=As(n),l=kn(n)==="y",c=Cw.has(i)?-1:1,u=s&&l?-1:1,d=Yn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const XT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await YT(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},JT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=Yn(e,t),c={x:n,y:r},u=await Bi(t,l),d=kn(Xn(o)),h=Qh(d);let p=c[h],b=c[d];if(s){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+u[w],g=p-u[y];p=df(v,p,g)}if(i){const w=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+u[w],g=b-u[y];b=df(v,b,g)}const m=a.fn({...t,[h]:p,[d]:b});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[d]:i}}}}}},ZT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Yn(e,t),u={x:n,y:r},d=kn(o),h=Qh(d);let p=u[h],b=u[d];const m=Yn(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=h==="y"?"height":"width",S=s.reference[h]-s.floating[g]+w.mainAxis,_=s.reference[h]+s.reference[g]-w.mainAxis;p<S?p=S:p>_&&(p=_)}if(c){var y,v;const g=h==="y"?"width":"height",S=Cw.has(Xn(o)),_=s.reference[d]-s.floating[g]+(S&&((y=i.offset)==null?void 0:y[d])||0)+(S?0:w.crossAxis),C=s.reference[d]+s.reference[g]+(S?0:((v=i.offset)==null?void 0:v[d])||0)-(S?w.crossAxis:0);b<_?b=_:b>C&&(b=C)}return{[h]:p,[d]:b}}}},eP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Yn(e,t),u=await Bi(t,c),d=Xn(o),h=As(o),p=kn(o)==="y",{width:b,height:m}=s.floating;let w,y;d==="top"||d==="bottom"?(w=d,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,w=h==="end"?"top":"bottom");const v=m-u.top-u.bottom,g=b-u.left-u.right,S=Mr(m-u[w],v),_=Mr(b-u[y],g),C=!t.middlewareData.shift;let E=S,k=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=v),C&&!h){const A=kt(u.left,0),O=kt(u.right,0),D=kt(u.top,0),B=kt(u.bottom,0);p?k=b-2*(A!==0||O!==0?A+O:kt(u.left,u.right)):E=m-2*(D!==0||B!==0?D+B:kt(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:E});const N=await i.getDimensions(a.floating);return b!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ac(){return typeof window<"u"}function Ns(e){return kw(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jn(e){var t;return(t=(kw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kw(e){return Ac()?e instanceof Node||e instanceof Rt(e).Node:!1}function ln(e){return Ac()?e instanceof Element||e instanceof Rt(e).Element:!1}function An(e){return Ac()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function sg(e){return!Ac()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}const tP=new Set(["inline","contents"]);function ca(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tP.has(o)}const nP=new Set(["table","td","th"]);function rP(e){return nP.has(Ns(e))}const oP=[":popover-open",":modal"];function Nc(e){return oP.some(t=>{try{return e.matches(t)}catch{return!1}})}const sP=["transform","translate","scale","rotate","perspective"],iP=["transform","translate","scale","rotate","perspective","filter"],aP=["paint","layout","strict","content"];function Jh(e){const t=Zh(),n=ln(e)?cn(e):e;return sP.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||iP.some(r=>(n.willChange||"").includes(r))||aP.some(r=>(n.contain||"").includes(r))}function lP(e){let t=Lr(e);for(;An(t)&&!_s(t);){if(Jh(t))return t;if(Nc(t))return null;t=Lr(t)}return null}function Zh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cP=new Set(["html","body","#document"]);function _s(e){return cP.has(Ns(e))}function cn(e){return Rt(e).getComputedStyle(e)}function Oc(e){return ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Lr(e){if(Ns(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sg(e)&&e.host||jn(e);return sg(t)?t.host:t}function Tw(e){const t=Lr(e);return _s(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&ca(t)?t:Tw(t)}function Wi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Tw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=hf(i);
vendor: 4,772 bytes, line 116
116return t.concat(i,i.visualViewport||[],ca(o)?o:[],a&&n?Wi(a):[])}return t.concat(o,Wi(o,[],n))}function hf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pw(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=An(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Gl(n)!==s||Gl(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ep(e){return ln(e)?e:e.contextElement}function rs(e){const t=ep(e);if(!An(t))return Rn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Pw(t);let i=(s?Gl(n.width):n.width)/r,a=(s?Gl(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const uP=Rn(0);function Rw(e){const t=Rt(e);return!Zh()||!t.visualViewport?uP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function yo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ep(e);let i=Rn(1);t&&(r?ln(r)&&(i=rs(r)):i=rs(e));const a=dP(s,n,r)?Rw(s):Rn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=Rt(s),p=r&&ln(r)?Rt(r):r;let b=h,m=hf(b);for(;m&&r&&p!==b;){const w=rs(m),y=m.getBoundingClientRect(),v=cn(m),g=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,S=y.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,d*=w.y,l+=g,c+=S,b=Rt(m),m=hf(b)}}return Yl({width:u,height:d,x:l,y:c})}function tp(e,t){const n=Oc(e).scrollLeft;return t?t.left+n:yo(jn(e)).left+n}function Aw(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:tp(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function fP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=jn(r),a=t?Nc(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Rn(1);const u=Rn(0),d=An(r);if((d||!d&&!s)&&((Ns(r)!=="body"||ca(i))&&(l=Oc(r)),An(r))){const p=yo(r);c=rs(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const h=i&&!d&&!s?Aw(i,l,!0):Rn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function hP(e){return Array.from(e.getClientRects())}function pP(e){const t=jn(e),n=Oc(e),r=e.ownerDocument.body,o=kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+tp(e);const a=-n.scrollTop;return cn(r).direction==="rtl"&&(i+=kt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function mP(e,t){const n=Rt(e),r=jn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Zh();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}const gP=new Set(["absolute","fixed"]);function vP(e,t){const n=yo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=An(e)?rs(e):Rn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function ig(e,t,n){let r;if(t==="viewport")r=mP(e,n);else if(t==="document")r=pP(jn(e));else if(ln(t))r=vP(t,n);else{const o=Rw(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yl(r)}function Nw(e,t){const n=Lr(e);return n===t||!ln(n)||_s(n)?!1:cn(n).position==="fixed"||Nw(n,t)}function yP(e,t){const n=t.get(e);if(n)return n;let r=Wi(e,[],!1).filter(a=>ln(a)&&Ns(a)!=="body"),o=null;const s=cn(e).position==="fixed";let i=s?Lr(e):e;for(;ln(i)&&!_s(i);){const a=cn(i),l=Jh(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&gP.has(o.position)||ca(i)&&!l&&Nw(e,i))?r=r.filter(u=>u!==i):o=a,i=Lr(i)}return t.set(e,r),r}function wP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Nc(t)?[]:yP(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=ig(t,u,o);return c.top=kt(d.top,c.top),c.right=Mr(d.right,c.right),c.bottom=Mr(d.bottom,c.bottom),c.left=kt(d.left,c.left),c},ig(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xP(e){const{width:t,height:n}=Pw(e);return{width:t,height:n}}function bP(e,t,n){const r=An(t),o=jn(t),s=n==="fixed",i=yo(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Rn(0);function c(){l.x=tp(o)}if(r||!r&&!s)if((Ns(t)!=="body"||ca(o))&&(a=Oc(t)),r){const p=yo(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?Aw(o,a):Rn(0),d=i.left+a.scrollLeft-l.x-u.x,h=i.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function Bu(e){return cn(e).position==="static"}function ag(e,t){if(!An(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return jn(e)===n&&(n=n.ownerDocument.body),n}function Ow(e,t){const n=Rt(e);
vendor: 9,129 bytes, line 116
116if(Nc(e))return n;if(!An(e)){let o=Lr(e);for(;o&&!_s(o);){if(ln(o)&&!Bu(o))return o;o=Lr(o)}return n}let r=ag(e,t);for(;r&&rP(r)&&Bu(r);)r=ag(r,t);return r&&_s(r)&&Bu(r)&&!Jh(r)?n:r||lP(e)||n}const SP=async function(e){const t=this.getOffsetParent||Ow,n=this.getDimensions,r=await n(e.floating);return{reference:bP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _P(e){return cn(e).direction==="rtl"}const EP={convertOffsetParentRelativeRectToViewportRelativeRect:fP,getDocumentElement:jn,getClippingRect:wP,getOffsetParent:Ow,getElementRects:SP,getClientRects:hP,getDimensions:xP,getScale:rs,isElement:ln,isRTL:_P};function jw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CP(e,t){let n=null,r;const o=jn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(a||t(),!h||!p)return;const b=Wa(d),m=Wa(o.clientWidth-(u+h)),w=Wa(o.clientHeight-(d+p)),y=Wa(u),g={rootMargin:-b+"px "+-m+"px "+-w+"px "+-y+"px",threshold:kt(0,Mr(1,l))||1};let S=!0;function _(C){const E=C[0].intersectionRatio;if(E!==l){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!jw(c,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(_,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,g)}n.observe(e)}return i(!0),s}function kP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ep(e),u=o||s?[...c?Wi(c):[],...Wi(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=c&&a?CP(c,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let b,m=l?yo(e):null;l&&w();function w(){const y=yo(e);m&&!jw(m,y)&&n(),m=y,b=requestAnimationFrame(w)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(b)}}const TP=XT,PP=JT,RP=GT,AP=eP,NP=QT,lg=qT,OP=ZT,jP=(e,t,n)=>{const r=new Map,o={platform:EP,...n},s={...o.platform,_c:r};return KT(e,t,{...o,platform:s})};var IP=typeof document<"u",DP=function(){},ml=IP?f.useLayoutEffect:DP;function Xl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Xl(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cg(e,t){const n=Iw(e);return Math.round(t*n)/n}function Wu(e){const t=f.useRef(e);return ml(()=>{t.current=e}),t}function MP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);Xl(h,r)||p(r);const[b,m]=f.useState(null),[w,y]=f.useState(null),v=f.useCallback(T=>{T!==C.current&&(C.current=T,m(T))},[]),g=f.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),S=s||b,_=i||w,C=f.useRef(null),E=f.useRef(null),k=f.useRef(u),N=l!=null,A=Wu(l),O=Wu(o),D=Wu(c),B=f.useCallback(()=>{if(!C.current||!E.current)return;const T={placement:t,strategy:n,middleware:h};O.current&&(T.platform=O.current),jP(C.current,E.current,T).then(P=>{const $={...P,isPositioned:D.current!==!1};I.current&&!Xl(k.current,$)&&(k.current=$,Ft.flushSync(()=>{d($)}))})},[h,t,n,O,D]);ml(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[c]);const I=f.useRef(!1);ml(()=>(I.current=!0,()=>{I.current=!1}),[]),ml(()=>{if(S&&(C.current=S),_&&(E.current=_),S&&_){if(A.current)return A.current(S,_,B);B()}},[S,_,B,A,N]);const H=f.useMemo(()=>({reference:C,floating:E,setReference:v,setFloating:g}),[v,g]),L=f.useMemo(()=>({reference:S,floating:_}),[S,_]),U=f.useMemo(()=>{const T={position:n,left:0,top:0};if(!L.floating)return T;const P=cg(L.floating,u.x),$=cg(L.floating,u.y);return a?{...T,transform:"translate("+P+"px, "+$+"px)",...Iw(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:$}},[n,a,L.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:B,refs:H,elements:L,floatingStyles:U}),[u,B,H,L,U])}const LP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lg({element:r.current,padding:o}).fn(n):{}:r?lg({element:r,padding:o}).fn(n):{}}}},$P=(e,t)=>({...TP(e),options:[e,t]}),FP=(e,t)=>({...PP(e),options:[e,t]}),UP=(e,t)=>({...OP(e),options:[e,t]}),zP=(e,t)=>({...RP(e),options:[e,t]}),BP=(e,t)=>({...AP(e),options:[e,t]}),WP=(e,t)=>({...NP(e),options:[e,t]}),VP=(e,t)=>({...LP(e),options:[e,t]});var HP="Arrow",Dw=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return x.jsx(X.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dw.displayName=HP;var KP=Dw;function Mw(e){const[t,n]=f.useState(void 0);return Xe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var np="Popper",[Lw,jc]=On(np),[qP,$w]=Lw(np),Fw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return x.jsx(qP,{scope:t,anchor:r,onAnchorChange:o,children:n})};Fw.displayName=np;var Uw="PopperAnchor",zw=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=$w(Uw,n),i=f.useRef(null),a=de(t,i);return f.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:x.jsx(X.div,{...o,ref:a})});zw.displayName=Uw;var rp="PopperContent",[GP,QP]=Lw(rp),Bw=f.forwardRef((e,t)=>{var F,oe,he,V,re,J;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...m}=e,w=$w(rp,n),[y,v]=f.useState(null),g=de(t,Ee=>v(Ee)),[S,_]=f.useState(null),C=Mw(S),E=(C==null?void 0:C.width)??0,k=(C==null?void 0:C.height)??0,N=r+(s!=="center"?"-"+s:""),A=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(c)?c:[c],D=O.length>0,B={padding:A,boundary:O.filter(XP),altBoundary:D},{refs:I,floatingStyles:H,placement:L,isPositioned:U,middlewareData:T}=MP({strategy:"fixed",placement:N,whileElementsMounted:(...Ee)=>kP(...Ee,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[$P({mainAxis:o+k,alignmentAxis:i}),l&&FP({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?UP():void 0,...B}),l&&zP({...B}),BP({...B,apply:({elements:Ee,rects:Pe,availableWidth:ht,availableHeight:st})=>{const{width:hn,height:er}=Pe.reference,pn=Ee.floating.style;pn.setProperty("--radix-popper-available-width",`${ht}px`),pn.setProperty("--radix-popper-available-height",`${st}px`),pn.setProperty("--radix-popper-anchor-width",`${hn}px`),pn.setProperty("--radix-popper-anchor-height",`${er}px`)}}),S&&VP({element:S,padding:a}),JP({arrowWidth:E,arrowHeight:k}),h&&WP({strategy:"referenceHidden",...B})]}),[P,$]=Hw(L),q=Ht(b);Xe(()=>{U&&(q==null||q())},[U,q]);const z=(F=T.arrow)==null?void 0:F.x,Q=(oe=T.arrow)==null?void 0:oe.y,Y=((he=T.arrow)==null?void 0:he.centerOffset)!==0,[me,ce]=f.useState();return Xe(()=>{y&&ce(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(V=T.transformOrigin)==null?void 0:V.x,(re=T.transformOrigin)==null?void 0:re.y].join(" "),...((J=T.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(GP,{scope:n,placedSide:P,onArrowChange:_,arrowX:z,arrowY:Q,shouldHideArrow:Y,children:x.jsx(X.div,{"data-side":P,"data-align":$,...m,ref:g,style:{...m.style,animation:U?void 0:"none"}})})})});Bw.displayName=rp;var Ww="PopperArrow",YP={top:"bottom",right:"left",bottom:"top",left:"r
116ight"},Vw=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=QP(Ww,r),i=YP[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(KP,{...o,ref:n,style:{...o.style,display:"block"}})})});Vw.displayName=Ww;function XP(e){return e!==null}var JP=e=>({name:"transformOrigin",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:o}=t,i=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=Hw(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,p=(((v=o.arrow)==null?void 0:v.y)??0)+l/2;let b="",m="";return c==="bottom"?(b=i?d:`${h}px`,m=`${-l}px`):c==="top"?(b=i?d:`${h}px`,m=`${r.floating.height+l}px`):c==="right"?(b=`${-l}px`,m=i?d:`${p}px`):c==="left"&&(b=`${r.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:b,y:m}}}});function Hw(e){const[t,n="center"]=e.split("-");return[t,n]}var ZP=Fw,Kw=zw,qw=Bw,Gw=Vw,[Ic,zM]=On("Tooltip",[jc]),op=jc(),Qw="TooltipProvider",eR=700,ug="tooltip.open",[tR,Yw]=Ic(Qw),Xw=e=>{const{__scopeTooltip:t,delayDuration:n=eR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=f.useRef(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),x.jsx(tR,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};Xw.displayName=Qw;var Jw="Tooltip",[BM,Dc]=Ic(Jw),pf="TooltipTrigger",nR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Dc(pf,n),s=Yw(pf,n),i=op(n),a=f.useRef(null),l=de(t,a,o.onTriggerChange),c=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(Kw,{asChild:!0,...i,children:x.jsx(X.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:K(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});nR.displayName=pf;var rR="TooltipPortal",[WM,oR]=Ic(rR,{forceMount:void 0}),Es="TooltipContent",Zw=f.forwardRef((e,t)=>{const n=oR(Es,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Dc(Es,e.__scopeTooltip);return x.jsx(Eo,{present:r||i.open,children:i.disableHoverableContent?x.jsx(ex,{side:o,...s,ref:t}):x.jsx(sR,{side:o,...s,ref:t})})}),sR=f.forwardRef((e,t)=>{const n=Dc(Es,e.__scopeTooltip),r=Yw(Es,e.__scopeTooltip),o=f.useRef(null),s=de(t,o),[i,a]=f.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,h=f.useCallback(()=>{a(null),d(!1)},[d]),p=f.useCallback((b,m)=>{const w=b.currentTarget,y={x:b.clientX,y:b.clientY},v=uR(y,w.getBoundingClientRect()),g=dR(y,v),S=fR(m.getBoundingClientRect()),_=pR([...g,...S]);a(_),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&u){const b=w=>p(w,u),m=w=>p(w,l);return l.addEventListener("pointerleave",b),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",m)}}},[l,u,p,h]),f.useEffect(()=>{if(i){const b=m=>{const w=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),g=!hR(y,i);v?h():g&&(h(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,u,i,c,h]),x.jsx(ex,{...e,ref:s})}),[iR,aR]=Ic(Jw,{isInside:!1}),lR=$0("TooltipContent"),ex=f.forwardRef((e,t)=>
116{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Dc(Es,n),c=op(n),{onClose:u}=l;return f.useEffect(()=>(document.addEventListener(ug,u),()=>document.removeEventListener(ug,u)),[u]),f.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),x.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:x.jsxs(qw,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(lR,{children:r}),x.jsx(iR,{scope:n,isInside:!0,children:x.jsx(BC,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Zw.displayName=Es;var tx="TooltipArrow",cR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=op(n);return aR(tx,n).isInside?null:x.jsx(Gw,{...o,...r,ref:t})});cR.displayName=tx;function uR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function hR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,d=l.x,h=l.y;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(o=!o)}return o}function pR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mR(t)}function mR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gR=Xw,nx=Zw;const vR=gR,yR=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(nx,{ref:r,sideOffset:t,className:le("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));yR.displayName=nx.displayName;var Mc=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(){}},Lc=typeof window>"u"||"Deno"in globalThis;function Jt(){}function wR(e,t){return typeof e=="function"?e(t):e}function xR(e){return typeof e=="number"&&e>=0&&e!==1/0}function bR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mf(e,t){return typeof e=="function"?e(t):e}function SR(e,t){return typeof e=="function"?e(t):e}function dg(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==sp(i,t.options))return!1}else if(!Hi(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function fg(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Vi(t.options.mutationKey)!==Vi(s))return!1}else if(!Hi(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Vi)(e)}function Vi(e){return JSON.stringify(e,(t,n)=>gf(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Hi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Hi(e[n],t[n])):!1}function rx(e,t){if(e===t)return e;const n=hg(e)&&hg(t);if(n||gf(e)&&gf(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<i;u++){const d=n?u:s[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=rx(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function hg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gf(e){if(!pg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!pg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pg(e){return Object.prototype.toString.call(e)==="[object Object]"}function _R(e){return new Promise(t=>{setTimeout(t,e)})}function ER(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rx(e,t):t}function CR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function kR(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ip=Symbol();function ox(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ip?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var no,vr,as,hv,TR=(hv=class extends Mc{constructor(){super();pe(this,no);pe(this,vr);pe(this,as);Z(this,as,t=>{if(!Lc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,vr)||this.setEventListener(R(this,as))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,vr))==null||t.call(this),Z(this,vr,void 0))}setEventListener(t){var n;Z(this,as,t),(n=R(this,vr))==null||n.call(this),Z(this,vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,no)!==t&&(Z(this,no,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,912 bytes, line 116
116this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,no)=="boolean"?R(this,no):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},no=new WeakMap,vr=new WeakMap,as=new WeakMap,hv),sx=new TR,ls,yr,cs,pv,PR=(pv=class extends Mc{constructor(){super();pe(this,ls,!0);pe(this,yr);pe(this,cs);Z(this,cs,t=>{if(!Lc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,yr)||this.setEventListener(R(this,cs))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,yr))==null||t.call(this),Z(this,yr,void 0))}setEventListener(t){var n;Z(this,cs,t),(n=R(this,yr))==null||n.call(this),Z(this,yr,t(this.setOnline.bind(this)))}setOnline(t){R(this,ls)!==t&&(Z(this,ls,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,ls)}},ls=new WeakMap,yr=new WeakMap,cs=new WeakMap,pv),Jl=new PR;function RR(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function AR(e){return Math.min(1e3*2**e,3e4)}function ix(e){return(e??"online")==="online"?Jl.isOnline():!0}var ax=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Vu(e){return e instanceof ax}function lx(e){let t=!1,n=0,r=!1,o;const s=RR(),i=m=>{var w;r||(h(new ax(m)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sx.isFocused()&&(e.networkMode==="always"||Jl.isOnline())&&e.canRun(),u=()=>ix(e.networkMode)&&e.canRun(),d=m=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,m),o==null||o(),s.resolve(m))},h=m=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,m),o==null||o(),s.reject(m))},p=()=>new Promise(m=>{var w;o=y=>{(r||c())&&m(y)},(w=e.onPause)==null||w.call(e)}).then(()=>{var m;o=void 0,r||(m=e.onContinue)==null||m.call(e)}),b=()=>{if(r)return;let m;const w=n===0?e.initialPromise:void 0;try{m=w??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var C;if(r)return;const v=e.retry??(Lc?0:3),g=e.retryDelay??AR,S=typeof g=="function"?g(n,y):g,_=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!_){h(y);return}n++,(C=e.onFail)==null||C.call(e,n,y),_R(S).then(()=>c()?void 0:p()).then(()=>{t?h(y):b()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?b():p().then(b),s)}}var NR=e=>setTimeout(e,0);function OR(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=NR;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var ct=OR(),ro,mv,cx=(mv=class{constructor(){pe(this,ro)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xR(this.gcTime)&&Z(this,ro,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Lc?1/0:5*60*1e3))}clearGcTimeout(){R(this,ro)&&(clearTimeout(R(this,ro)),Z(this,ro,void 0))}},ro=new WeakMap,mv),us,oo,It,so,nt,ea,io,Zt,Mn,gv,jR=(gv=class extends cx{constructor(t){super();pe(this,Zt);pe(this,us);pe(this,oo);pe(this,It);pe(this,so);pe(this,nt);pe(this,ea);pe(this,io);Z(this,io,!1),Z(this,ea,t.defaultOptions),this.setOptions(t.options),this.observers=[],Z(this,so,t.client),Z(this,It,R(this,so).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,us,DR(this.options)),this.state=t.state??R(this,us),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,nt))==null?void 0:t.promise}setOptions(t){this.options={...R(this,ea),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,It).remove(this)}setData(t,n){const r=ER(this.state.data,t,this.options);return Ze(this,Zt,Mn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,Zt,Mn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=R(this,nt))==null?void 0:r.promise;return(o=R(this,nt))==null||o.cancel(t),n?n.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,us))}isActive(){return this.observers.some(t=>SR(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ip||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 116
116Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>mf(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:!bR(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,nt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,nt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,It).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,nt)&&(R(this,io)?R(this,nt).cancel({revert:!0}):R(this,nt).cancelRetry()),this.scheduleGc()),R(this,It).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Zt,Mn).call(this,{type:"invalidate"})}
vendor: 6,523 bytes, line 116
116fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,nt))return R(this,nt).continueRetry(),R(this,nt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Z(this,io,!0),r.signal)})},s=()=>{const h=ox(this.options,n),b=(()=>{const m={client:R(this,so),queryKey:this.queryKey,meta:this.meta};return o(m),m})();return Z(this,io,!1),this.options.persister?this.options.persister(h,b,this):h(b)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,so),state:this.state,fetchFn:s};return o(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),Z(this,oo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Ze(this,Zt,Mn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var p,b,m,w;Vu(h)&&h.silent||Ze(this,Zt,Mn).call(this,{type:"error",error:h}),Vu(h)||((b=(p=R(this,It).config).onError)==null||b.call(p,h,this),(w=(m=R(this,It).config).onSettled)==null||w.call(m,this.state.data,h,this)),this.scheduleGc()};return Z(this,nt,lx({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,b,m,w;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){l(y);return}(b=(p=R(this,It).config).onSuccess)==null||b.call(p,h,this),(w=(m=R(this,It).config).onSettled)==null||w.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{Ze(this,Zt,Mn).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Ze(this,Zt,Mn).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Zt,Mn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,nt).start()}},us=new WeakMap,oo=new WeakMap,It=new WeakMap,so=new WeakMap,nt=new WeakMap,ea=new WeakMap,io=new WeakMap,Zt=new WeakSet,Mn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...IR(r.data,this.options),fetchMeta:t.meta??null};case"success":return Z(this,oo,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Vu(o)&&o.revert&&R(this,oo)?{...R(this,oo),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,It).notify({query:this,type:"updated",action:t})})},gv);function IR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ix(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function DR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var bn,vv,MR=(vv=class extends Mc{constructor(t={}){super();pe(this,bn);this.config=t,Z(this,bn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??sp(o,n);let i=this.get(s);return i||(i=new jR({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){R(this,bn).has(t.queryHash)||(R(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,bn).get(t)}getAll(){return[...R(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>dg(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,vv),Sn,at,ao,_n,lr,yv,LR=(yv=class extends cx{constructor(t){super();pe(this,_n);pe(this,Sn);pe(this,at);pe(this,ao);this.mutationId=t.mutationId,Z(this,at,t.mutationCache),Z(this,Sn,[]),this.state=t.state||$R(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Sn).includes(t)||(R(this,Sn).push(t),this.clearGcTimeout(),R(this,at).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,Sn,R(this,Sn).filter(n=>n!==t)),this.scheduleGc(),R(this,at).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():R(this,at).remove(this))}continue(){var t;return((t=R(this,ao))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,l,c,u,d,h,p,b,m,w,y,v,g,S,_,C,E,k;const n=()=>{Ze(this,_n,lr).call(this,{type:"continue"})};Z(this,ao,lx({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,A)=>{Ze(this,_n,lr).call(this,{type:"failed",failureCount:N,error:A})},onPause:()=>{Ze(this,_n,lr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,at).canRun(this)}));const r=this.state.status==="pending",o=!R(this,ao).canStart();try{if(r)n();else{Ze(this,_n,lr).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=R(this,at).config).onMutate)==null?void 0:i.call(s,t,this));
116const A=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));A!==this.state.context&&Ze(this,_n,lr).call(this,{type:"pending",context:A,variables:t,isPaused:o})}const N=await R(this,ao).start();return await((u=(c=R(this,at).config).onSuccess)==null?void 0:u.call(c,N,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,N,t,this.state.context)),await((b=(p=R(this,at).config).onSettled)==null?void 0:b.call(p,N,null,this.state.variables,this.state.context,this)),await((w=(m=this.options).onSettled)==null?void 0:w.call(m,N,null,t,this.state.context)),Ze(this,_n,lr).call(this,{type:"success",data:N}),N}catch(N){try{throw await((v=(y=R(this,at).config).onError)==null?void 0:v.call(y,N,t,this.state.context,this)),await((S=(g=this.options).onError)==null?void 0:S.call(g,N,t,this.state.context)),await((C=(_=R(this,at).config).onSettled)==null?void 0:C.call(_,void 0,N,this.state.variables,this.state.context,this)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,N,t,this.state.context)),N}finally{Ze(this,_n,lr).call(this,{type:"error",error:N})}}finally{R(this,at).runNext(this)}}},Sn=new WeakMap,at=new WeakMap,ao=new WeakMap,_n=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ct.batch(()=>{R(this,Sn).forEach(r=>{r.onMutationUpdate(t)}),R(this,at).notify({mutation:this,type:"updated",action:t})})},yv);function $R(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,en,ta,wv,FR=(wv=class extends Mc{constructor(t={}){super();pe(this,Bn);pe(this,en);pe(this,ta);this.config=t,Z(this,Bn,new Set),Z(this,en,new Map),Z(this,ta,0)}build(t,n,r){const o=new LR({mutationCache:this,mutationId:++ba(this,ta)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){R(this,Bn).add(t);const n=Va(t);if(typeof n=="string"){const r=R(this,en).get(n);r?r.push(t):R(this,en).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Bn).delete(t)){const n=Va(t);if(typeof n=="string"){const r=R(this,en).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&R(this,en).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Va(t);if(typeof n=="string"){const r=R(this,en).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Va(t);if(typeof n=="string"){const o=(r=R(this,en).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>
vendor: 4,362 bytes, line 116
116{R(this,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Bn).clear(),R(this,en).clear()})}getAll(){return Array.from(R(this,Bn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>fg(n,r))}findAll(t={}){return this.getAll().filter(n=>fg(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(Jt))))}},Bn=new WeakMap,en=new WeakMap,ta=new WeakMap,wv);function Va(e){var t;return(t=e.options.scope)==null?void 0:t.id}function mg(e){return{onFetch:(t,n)=>{var u,d,h,p,b;const r=t.options,o=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const w=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=ox(t.options,t.fetchOptions),v=async(g,S,_)=>{if(m)return Promise.reject();if(S==null&&g.pages.length)return Promise.resolve(g);const E=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return w(O),O})(),k=await y(E),{maxPages:N}=t.options,A=_?kR:CR;return{pages:A(g.pages,k,N),pageParams:A(g.pageParams,S,N)}};if(o&&s.length){const g=o==="backward",S=g?UR:gg,_={pages:s,pageParams:i},C=S(r,_);a=await v(_,C,g)}else{const g=e??s.length;do{const S=l===0?i[0]??r.initialPageParam:gg(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<g)}return a};t.options.persister?t.fetchFn=()=>{var m,w;return(w=(m=t.options).persister)==null?void 0:w.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function gg(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function UR(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Oe,wr,xr,ds,fs,br,hs,ps,xv,zR=(xv=class{constructor(e={}){pe(this,Oe);pe(this,wr);pe(this,xr);pe(this,ds);pe(this,fs);pe(this,br);pe(this,hs);pe(this,ps);Z(this,Oe,e.queryCache||new MR),Z(this,wr,e.mutationCache||new FR),Z(this,xr,e.defaultOptions||{}),Z(this,ds,new Map),Z(this,fs,new Map),Z(this,br,0)}mount(){ba(this,br)._++,R(this,br)===1&&(Z(this,hs,sx.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,Oe).onFocus())})),Z(this,ps,Jl.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,Oe).onOnline())})))}unmount(){var e,t;ba(this,br)._--,R(this,br)===0&&((e=R(this,hs))==null||e.call(this),Z(this,hs,void 0),(t=R(this,ps))==null||t.call(this),Z(this,ps,void 0))}isFetching(e){return R(this,Oe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,wr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,Oe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,Oe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(mf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,Oe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=R(this,Oe).get(r.queryHash),s=o==null?void 0:o.state.data,i=wR(t,s);if(i!==void 0)return R(this,Oe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>R(this,Oe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,Oe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,Oe);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,Oe);return ct.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ct.batch(()=>R(this,Oe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return ct.batch(()=>(R(this,Oe).findAll(e).forEach(n=>
116{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ct.batch(()=>R(this,Oe).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Jt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,Oe).build(this,t);return n.isStaleByTime(mf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=mg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=mg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Jl.isOnline()?R(this,wr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Oe)}getMutationCache(){return R(this,wr)}getDefaultOptions(){return R(this,xr)}setDefaultOptions(e){Z(this,xr,e)}setQueryDefaults(e,t){R(this,ds).set(Vi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,ds).values()],n={};return t.forEach(r=>{Hi(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,fs).set(Vi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,fs).values()],n={};return t.forEach(r=>{Hi(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,xr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sp(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===ip&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,Oe).clear(),R(this,wr).clear()}},Oe=new WeakMap,wr=new WeakMap,xr=new WeakMap,ds=new WeakMap,fs=new WeakMap,br=new WeakMap,hs=new WeakMap,ps=new WeakMap,xv),BR=f.createContext(void 0),WR=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(BR.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 Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ki.apply(this,arguments)}var Er;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Er||(Er={}));const vg="popstate";function VR(e){e===void 0&&(e={});function t(r,o){let{pathname:s,search:i,hash:a}=r.location;return vf("",{pathname:s,search:i,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:dx(o)}return KR(t,n,null,e)}function ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ux(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HR(){return Math.random().toString(36).substr(2,8)}function yg(e,t){return{usr:e.state,key:e.key,idx:t}}function vf(e,t,n,r){return n===void 0&&(n=null),Ki({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Os(t):t,{state:n,key:t&&t.key||r||HR()})}function dx(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Os(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function KR(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,a=Er.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(Ki({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}
vendor: 3,539 bytes, line 125
125function d(){a=Er.Pop;let w=u(),y=w==null?null:w-c;c=w,l&&l({action:a,location:m.location,delta:y})}function h(w,y){a=Er.Push;let v=vf(m.location,w,y);c=u()+1;let g=yg(v,c),S=m.createHref(v);try{i.pushState(g,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function p(w,y){a=Er.Replace;let v=vf(m.location,w,y);c=u();let g=yg(v,c),S=m.createHref(v);i.replaceState(g,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function b(w){let y=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof w=="string"?w:dx(w);return v=v.replace(/ $/,"%20"),ze(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return a},get location(){return e(o,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(vg,d),l=w,()=>{o.removeEventListener(vg,d),l=null}},createHref(w){return t(o,w)},createURL:b,encodeLocation(w){let y=b(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(w){return i.go(w)}};return m}var wg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wg||(wg={}));function qR(e,t,n){return n===void 0&&(n="/"),GR(e,t,n,!1)}function GR(e,t,n,r){let o=typeof t=="string"?Os(t):t,s=px(o.pathname||"/",n);if(s==null)return null;let i=fx(e);QR(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=iA(s);a=oA(i[l],c,r)}return a}function fx(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(s,i,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(ze(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=uo([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(ze(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),fx(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:nA(c,s.index),routesMeta:u})};return e.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let l of hx(s.path))o(s,i,l)}),t}function hx(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=hx(r.join("/")),a=[];return a.push(...i.map(l=>l===""?s:[s,l].join("/"))),o&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function QR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:rA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const YR=/^:[\w-]+$/,XR=3,JR=2,ZR=1,eA=10,tA=-2,xg=e=>e==="*";function nA(e,t){let n=e.split("/"),r=n.length;return n.some(xg)&&(r+=tA),t&&(r+=JR),n.filter(o=>!xg(o)).reduce((o,s)=>o+(YR.test(s)?XR:s===""?ZR:eA),r)}function rA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function oA(e,t,n){let{routesMeta:r}=e,o={},s="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=bg({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=bg({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 6,356 bytes, lines 125-134
125Object.assign(o,d.params),i.push({params:o,pathname:uo([s,d.pathname]),pathnameBase:fA(uo([s,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(s=uo([s,d.pathnameBase]))}return i}function bg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sA(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:p}=u;if(h==="*"){let m=a[d]||"";i=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const b=a[d];return p&&!b?c[h]=void 0:c[h]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}function sA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ux(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function iA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ux(!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 px(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function aA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Os(e):e;return{pathname:n?n.startsWith("/")?n:lA(n,t):t,search:hA(r),hash:pA(o)}}function lA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Hu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function cA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function uA(e,t){let n=cA(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function dA(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Os(e):(o=Ki({},e),ze(!o.pathname||!o.pathname.includes("?"),Hu("?","pathname","search",o)),ze(!o.pathname||!o.pathname.includes("#"),Hu("#","pathname","hash",o)),ze(!o.search||!o.search.includes("#"),Hu("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,a;if(i==null)a=n;else{let d=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=aA(o,a),c=i&&i!=="/"&&i.endsWith("/"),u=(s||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const uo=e=>e.join("/").replace(/\/\/+/g,"/"),fA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function mA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const mx=["post","put","patch","delete"];new Set(mx);const gA=["get",...mx];new Set(gA);/**
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 qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qi.apply(this,arguments)}const ap=f.createContext(null),vA=f.createContext(null),$c=f.createContext(null),Fc=f.createContext(null),js=f.createContext({outlet:null,matches:[],isDataRoute:!1}),gx=f.createContext(null);function Uc(){return f.useContext(Fc)!=null}function lp(){return Uc()||ze(!1),f.useContext(Fc).location}function vx(e){f.useContext($c).static||f.useLayoutEffect(e)}function yA(){let{isDataRoute:e}=f.useContext(js);return e?NA():wA()}function wA(){Uc()||ze(!1);let e=f.useContext(ap),{basename:t,future:n,navigator:r}=f.useContext($c),{matches:o}=f.useContext(js),{pathname:s}=lp(),i=JSON.stringify(uA(o,n.v7_relativeSplatPath)),a=f.useRef(!1);return vx(()=>{a.current=!0}),f.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=dA(c,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:uo([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,s,e])}function xA(e,t){return bA(e,t)}function bA(e,t,n,r){Uc()||ze(!1);let{navigator:o}=f.useContext($c),{matches:s}=f.useContext(js),i=s[s.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=lp(),u;if(t){var d;let w=typeof t=="string"?Os(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||ze(!1),u=w}else u=c;let h=u.pathname||"/",p=h;if(l!=="/"){let w=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=qR(e,{pathname:p}),m=kA(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:uo([l,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:uo([l,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&m?f.createElement(Fc.Provider,{value:{location:qi({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Er.Pop}},m):m}function SA(){let e=AA(),t=mA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application 
134Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const _A=f.createElement(SA,null);class EA extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(js.Provider,{value:this.props.routeContext},f.createElement(gx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function CA(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(ap);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(js.Provider,{value:t},r)}function kA(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let u=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||ze(!1),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<i.length;u++){let d=i[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:p}=n,b=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||b){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((u,d,h)=>{let p,b=!1,m=null,w=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||_A,l&&(c<0&&h===0?(b=!0,w=null):c===h&&(b=!0,w=d.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,h+1)),v=()=>{let g;return p?g=m:b?g=w:d.route.Component?g=f.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=u,f.createElement(CA,{match:d,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:g})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?f.createElement(EA,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var yx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yx||{}),Zl=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}(Zl||{});function TA(e){let t=f.useContext(ap);return t||ze(!1),t}function PA(e){let t=f.useContext(vA);return t||ze(!1),t}function RA(e){let t=f.useContext(js);return t||ze(!1),t}function wx(e){let t=RA(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function AA(){var e;let t=f.useContext(gx),n=PA(Zl.UseRouteError),r=wx(Zl.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function NA(){let{router:e}=TA(yx.UseNavigateStable),t=wx(Zl.UseNavigateStable),n=f.useRef(!1);return vx(()=>{n.current=!0}),f.useCallback(function(o,s){s===void 0&&(s={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,qi({fromRouteId:t},s)))},[e,t])}function OA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function gl(e){ze(!1)}function jA(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Er.Pop,navigator:s,static:i=!1,future:a}=e;Uc()&&ze(!1);let l=t.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:l,navigator:s,static:i,future:qi({v7_relativeSplatPath:!1},a)}),[l,a,s,i]);typeof r=="string"&&(r=Os(r));
134let{pathname:u="/",search:d="",hash:h="",state:p=null,key:b="default"}=r,m=f.useMemo(()=>{let w=px(u,l);return w==null?null:{location:{pathname:w,search:d,hash:h,state:p,key:b},navigationType:o}},[l,u,d,h,p,b,o]);return m==null?null:f.createElement($c.Provider,{value:c},f.createElement(Fc.Provider,{children:n,value:m}))}function IA(e){let{children:t,location:n}=e;return xA(yf(t),n)}new Promise(()=>{});function yf(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let s=[...t,o];if(r.type===f.Fragment){n.push.apply(n,yf(r.props.children,s));return}r.type!==gl&&ze(!1),!r.props.index||!r.props.children||ze(!1);let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=yf(r.props.children,s)),n.push(i)}),n}/**
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 DA="6";try{window.__reactRouterVersion=DA}catch{}const MA="startTransition",Sg=Zf[MA];function LA(e){let{basename:t,children:n,future:r,window:o}=e,s=f.useRef();s.current==null&&(s.current=VR({window:o,v5Compat:!0}));let i=s.current,[a,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},u=f.useCallback(d=>{c&&Sg?Sg(()=>l(d)):l(d)},[l,c]);return f.useLayoutEffect(()=>i.listen(u),[i,u]),f.useEffect(()=>OA(r),[r]),f.createElement(jA,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var _g;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_g||(_g={}));var Eg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Eg||(Eg={}));const $A="modulepreload",FA=function(e){return"/"+e},Cg={},ua=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=FA(l),l in Cg)return;Cg[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":$A,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},UA=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>ua(async()=>{const{default:r}=await Promise.resolve().then(()=>Is);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class cp extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class zA extends cp{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class kg extends cp{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Tg extends cp{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var wf;(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"})(wf||(wf={}));var BA=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}
143return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class WA{constructor(t,{headers:n={},customFetch:r,region:o=wf.Any}={}){this.url=t,this.headers=n,this.region=o,this.fetch=UA(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return BA(this,void 0,void 0,function*(){try{const{headers:o,method:s,body:i}=n;let a={},{region:l}=n;l||(l=this.region);const c=new URL(`${this.url}/${t}`);l&&l!=="any"&&(a["x-region"]=l,c.searchParams.set("forceFunctionRegion",l));let u;i&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=i):typeof i=="string"?(a["Content-Type"]="text/plain",u=i):typeof FormData<"u"&&i instanceof FormData?u=i:(a["Content-Type"]="application/json",u=JSON.stringify(i)));const d=yield this.fetch(c.toString(),{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),o),body:u}).catch(m=>{throw new zA(m)}),h=d.headers.get("x-relay-error");if(h&&h==="true")throw new kg(d);if(!d.ok)throw new Tg(d);let p=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),b;return p==="application/json"?b=yield d.json():p==="application/octet-stream"?b=yield d.blob():p==="text/event-stream"?b=d:p==="multipart/form-data"?b=yield d.formData():b=yield d.text(),{data:b,error:null,response:d}}catch(o){return{data:null,error:o,response:o instanceof Tg||o instanceof kg?o.context:void 0}}})}}var yt={},up={},zc={},da={},Bc={},Wc={},VA=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Cs=VA();const HA=Cs.fetch,xx=Cs.fetch.bind(Cs),bx=Cs.Headers,KA=Cs.Request,qA=Cs.Response,Is=Object.freeze(Object.defineProperty({__proto__:null,Headers:bx,Request:KA,Response:qA,default:xx,fetch:HA},Symbol.toStringTag,{value:"Module"})),GA=U1(Is);var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});let QA=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
143de=t.code}};Vc.default=QA;var Sx=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wc,"__esModule",{value:!0});const YA=Sx(GA),XA=Sx(Vc);let JA=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=YA.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=Object.assign({},this.headers),this.headers[t]=n,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let o=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var i,a,l;let c=null,u=null,d=null,h=s.status,p=s.statusText;if(s.ok){if(this.method!=="HEAD"){const y=await s.text();y===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=y:u=JSON.parse(y))}const m=(i=this.headers.Prefer)===null||i===void 0?void 0:i.match(/count=(exact|planned|estimated)/),w=(a=s.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");m&&w&&w.length>1&&(d=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(c={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,d=null,h=406,p="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const m=await s.text();try{c=JSON.parse(m),Array.isArray(c)&&s.status===404&&(u=[],c=null,h=200,p="OK")}catch{s.status===404&&m===""?(h=204,p="No Content"):c={message:m}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,h=200,p="OK"),c&&this.shouldThrowOnError)throw new XA.default(c)}return{error:c,data:u,count:d,status:h,statusText:p}});return this.shouldThrowOnError||(o=o.catch(s=>{var i,a,l;return{error:{message:`${(i=s==null?void 0:s.name)!==null&&i!==void 0?i:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),o.then(t,n)}returns(){return this}overrideTypes(){return this}};Wc.default=JA;var ZA=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bc,"__esModule",{value:!0});const eN=ZA(Wc);let tN=class extends eN.default{select(t){let n=!1;const r=(t??"*").split("").map(o=>/\s/.test(o)&&!n?"":(o==='"'&&(n=!n),o)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:o,referencedTable:s=o}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(o,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:o=r}={}){const s=typeof o>"u"?"offset":`${o}.offset`,i=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
143explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:o=!1,wal:s=!1,format:i="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,o?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`,i==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};Bc.default=tN;var nN=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(da,"__esModule",{value:!0});const rN=nN(Bc);let oN=class extends rN.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(o=>typeof o=="string"&&new RegExp("[,()]").test(o)?`"${o}"`:`${o}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:o}={}){let s="";o==="plain"?s="pl":o==="phrase"?s="ph":o==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const o=r?`${r}.or`:"or";return this.url.searchParams.append(o,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};da.default=oN;var sN=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0});const ni=sN(da);let iN=class{constructor(t,{headers:n={},schema:r,fetch:o}){this.url=t,this.headers=n,this.schema=r,this.fetch=o}select(t,{head:n=!1,count:r}={}){const o=n?"HEAD":"GET";let s=!1;const i=(t??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",i),r&&(this.headers.Prefer=`count=${r}`),new ni.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const o="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),r||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(t)){const i=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(i.length>
1430){const a=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ni.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:o,defaultToNull:s=!0}={}){const i="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),o&&a.push(`count=${o}`),s||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const l=t.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new ni.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",o=[];return this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),this.headers.Prefer=o.join(","),new ni.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new ni.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};zc.default=iN;var Hc={},Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.version=void 0;Kc.version="0.0.0-automated";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.DEFAULT_HEADERS=void 0;const aN=Kc;Hc.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${aN.version}`};var _x=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(up,"__esModule",{value:!0});const lN=_x(zc),cN=_x(da),uN=Hc;let dN=class Ex{constructor(t,{headers:n={},schema:r,fetch:o}={}){this.url=t,this.headers=Object.assign(Object.assign({},uN.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=o}from(t){const n=new URL(`${this.url}/${t}`);return new lN.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Ex(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:o=!1,count:s}={}){let i;const a=new URL(`${this.url}/rpc/${t}`);let l;r||o?(i=r?"HEAD":"GET",Object.entries(n).filter(([u,d])=>d!==void 0).map(([u,d])=>[u,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([u,d])=>{a.searchParams.append(u,d)})):(i="POST",l=n);const c=Object.assign({},this.headers);return s&&(c.Prefer=`count=${s}`),new cN.default({method:i,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};up.default=dN;var Ds=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});yt.PostgrestError=yt.PostgrestBuilder=yt.PostgrestTransformBuilder=yt.PostgrestFilterBuilder=yt.PostgrestQueryBuilder=yt.PostgrestClient=void 0;const Cx=Ds(up);yt.PostgrestClient=Cx.default;const kx=Ds(zc);yt.PostgrestQueryBuilder=kx.default;const Tx=Ds(da);yt.PostgrestFilterBuilder=Tx.default;const Px=Ds(Bc);yt.PostgrestTransformBuilder=Px.default;const Rx=Ds(Wc);yt.PostgrestBuilder=Rx.default;const Ax=Ds(Vc);yt.PostgrestError=Ax.default;var fN=yt.default={PostgrestClient:Cx.default,PostgrestQueryBuilder:kx.default,PostgrestFilterBuilder:Tx.default,PostgrestTransformBuilder:Px.default,PostgrestBuilder:Rx.default,PostgrestError:Ax.default};const{PostgrestClient:hN,PostgrestQueryBuilder:QM,PostgrestFilterBuilder:YM,PostgrestTransformBuilder:XM,PostgrestBuilder:JM,PostgrestError:ZM}=fN;class pN{static dynamicRequire(t){try{return typeof process<"u"&&process.versions&&process.versions.node&&typeof require<"u"?require(t):null}catch{return null}}static detectEnvironment(){var t,n;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."};if(typeof process<"u"&&process.versions&&process.versions.node){const r=parseInt(process.versions.node.split(".")[0]);if(r>=22)try{if(typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};const o=this.dynamicRequire("undici");if(o&&o.WebSocket)return{type:"native",constructor:o.WebSocket};throw new Error("undici not available")}catch{return{type:"unsupported",error:`Node.js ${r} detected but native WebSocket not found.`,workaround:'Install the "ws" package or check your Node.js installation.'}}try{const o=this.dynamicRequire("ws");if(o)return{type:"ws",constructor:(n=o.WebSocket)!==null&&n!==void 0?n:o};throw new Error("ws package not available")}catch{return{type:"unsupported",error:`Node.js ${r} detected without WebSocket support.`,workaround:'Install the "ws" package: npm install ws'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
144
145Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const mN="2.15.0",gN=`realtime-js/${mN}`,vN="1.0.0",xf=1e4,yN=1e3,wN=100;var wi;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(wi||(wi={}));var Le;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Le||(Le={}));var nn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(nn||(nn={}));var bf;(function(e){e.websocket="websocket"})(bf||(bf={}));var Jr;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Jr||(Jr={}));class xN{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const o=n.getUint8(1),s=n.getUint8(2);let i=this.HEADER_LENGTH+2;const a=r.decode(t.slice(i,i+o));i=i+o;const l=r.decode(t.slice(i,i+s));i=i+s;const c=JSON.parse(r.decode(t.slice(i,t.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class Nx{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ye;(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"})(ye||(ye={}));const Pg=(e,t,n={})=>{var r;const o=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((s,i)=>(s[i]=bN(i,e,t,o),s),{})},bN=(e,t,n,r)=>{const o=t.find(a=>a.name===e),s=o==null?void 0:o.type,i=n[e];return s&&!r.includes(s)?Ox(s,i):Sf(i)},Ox=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return CN(t,n)}switch(e){case ye.bool:return SN(t);case ye.float4:case ye.float8:case ye.int2:case ye.int4:case ye.int8:case ye.numeric:case ye.oid:return _N(t);case ye.json:case ye.jsonb:return EN(t);case ye.timestamp:return kN(t);case ye.abstime:case ye.date:case ye.daterange:case ye.int4range:case ye.int8range:case ye.money:case ye.reltime:case ye.text:case ye.time:case ye.timestamptz:case ye.timetz:case ye.tsrange:case ye.tstzrange:return Sf(t);default:return Sf(t)}},Sf=e=>e,SN=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},_N=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 6,620 bytes, line 145
145if(!Number.isNaN(t))return t}return e},EN=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},CN=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const i=e.slice(1,n);try{s=JSON.parse("["+i+"]")}catch{s=i?i.split(","):[]}return s.map(a=>Ox(t,a))}return e},kN=e=>typeof e=="string"?e.replace(" ","T"):e,jx=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Ku{constructor(t,n,r={},o=xf){this.channel=t,this.event=n,this.payload=r,this.timeout=o,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Rg;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Rg||(Rg={}));class xi{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},o=>{const{onJoin:s,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=xi.syncState(this.state,o,s,i),this.pendingDiffs.forEach(l=>{this.state=xi.syncDiff(this.state,l,s,i)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},o=>{const{onJoin:s,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=xi.syncDiff(this.state,o,s,i),a())}),this.onJoin((o,s,i)=>{this.channel._trigger("presence",{event:"join",key:o,currentPresences:s,newPresences:i})}),this.onLeave((o,s,i)=>{this.channel._trigger("presence",{event:"leave",key:o,currentPresences:s,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,o){const s=this.cloneDeep(t),i=this.transformState(n),a={},l={};return this.map(s,(c,u)=>{i[c]||(l[c]=u)}),this.map(i,(c,u)=>{const d=s[c];if(d){const h=u.map(w=>w.presence_ref),p=d.map(w=>w.presence_ref),b=u.filter(w=>p.indexOf(w.presence_ref)<0),m=d.filter(w=>h.indexOf(w.presence_ref)<0);b.length>0&&(a[c]=b),m.length>0&&(l[c]=m)}else a[c]=u}),this.syncDiff(s,{joins:a,leaves:l},r,o)}static syncDiff(t,n,r,o){const{joins:s,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),o||(o=()=>{}),this.map(s,(a,l)=>{var c;const u=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),u.length>0){const d=t[a].map(p=>p.presence_ref),h=u.filter(p=>d.indexOf(p.presence_ref)<0);t[a].unshift(...h)}r(a,u,l)}),this.map(i,(a,l)=>{let c=t[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),t[a]=c,o(a,c,l),c.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const o=t[r];return"metas"in o?n[r]=o.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[r]=o,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ag;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Ag||(Ag={}));var bi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(bi||(bi={}));var Fn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Fn||(Fn={}));class dp{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Le.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Ku(this,nn.join,this.params,this.timeout),this.rejoinTimer=new Nx(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Le.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Le.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Le.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Le.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Le.errored,this.rejoinTimer.scheduleTimeout())}),this._on(nn.reply,{},(o,s)=>{this._trigger(this._replyEventName(s),o)}),this.presence=new xi(this),this.broadcastEndpointURL=jx(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,o;
145if(this.socket.isConnected()||this.socket.connect(),this.state==Le.closed){const{config:{broadcast:s,presence:i,private:a}}=this.params,l=(o=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&o!==void 0?o:[],c=!!this.bindings[bi.PRESENCE]&&this.bindings[bi.PRESENCE].length>0,u={},d={broadcast:s,presence:Object.assign(Object.assign({},i),{enabled:c}),postgres_changes:l,private:a};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(Fn.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(Fn.CLOSED)),this.updateJoinPayload(Object.assign({config:d},u)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:h})=>{var p;if(this.socket.setAuth(),h===void 0){t==null||t(Fn.SUBSCRIBED);return}else{const b=this.bindings.postgres_changes,m=(p=b==null?void 0:b.length)!==null&&p!==void 0?p:0,w=[];for(let y=0;y<m;y++){const v=b[y],{filter:{event:g,schema:S,table:_,filter:C}}=v,E=h&&h[y];if(E&&E.event===g&&E.schema===S&&E.table===_&&E.filter===C)w.push(Object.assign(Object.assign({},v),{id:E.id}));else{this.unsubscribe(),this.state=Le.errored,t==null||t(Fn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=w,t&&t(Fn.SUBSCRIBED);return}}).receive("error",h=>{this.state=Le.errored,t==null||t(Fn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Fn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Le.joined&&t===bi.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,n,r)}async send(t,n={}){var r,o;if(!this._canPush()&&t.type==="broadcast"){const{event:s,payload:i}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((o=c.body)===null||o===void 0?void 0:o.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var i,a,l;const c=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Le.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(nn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(o=>{r=new Ku(this,nn.leave,{},t),r.receive("ok",()=>{n(),o("ok")}).receive("timeout",()=>{n(),o("timed out")}).receive("error",()=>{o("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Le.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const o=new AbortController,s=setTimeout(()=>o.abort(),r),i=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:o.signal}));return clearTimeout(s),i}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let o=new Ku(this,t,n,r);return this._canPush()?o.send():this._addToPushBuffer(o),o}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>wN){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var o,s;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=nn;if(r&&[a,l,c,u].indexOf(i)>=0&&r!==this._joinRef())return;let h=this._onMessage(i,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(o=this.bindings.postgres_changes)===null||o===void 0||o.filter(p=>{var b,m,w;return((b=p.filter)===null||b===void 0?void 0:b.event)==="*"||((w=(m=p.filter)===null||m===void 0?void 0:m.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===i}).map(p=>p.callback(h,r)):(s=this.bindings[i])===null||s===void 0||s.filter(p=>{var b,m,w,y,v,g;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in p){const S=p.id,_=(b=p.filter)===null||b===void 0?void 0:b.event;return S&&((m=n.ids)===null||m===void 0?void 0:m.includes(S))&&(_==="*"||(_==null?void 0:_.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const S=(v=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return S==="*"||S===((g=n==null?void 0:n.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===i}).map(p=>{if(typeof h=="object"&&"ids"in h){const b=h.data,{schema:m,table:w,commit_timestamp:y,type:v,errors:g}=b;h=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:y,eventType:v,new:{},old:{},errors:g}),this._getPayloadRecords(b))}p.callback(h,r)})}_isClosed(){return this.state===Le.closed}_isJoined(){return this.state===Le.joined}_isJoining(){return this.state===Le.joining}_isLeaving(){return this.state===Le.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const o=t.toLocaleLowerCase(),s={type:o,filter:n,callback:r};return this.bindings[o]?this.bindings[o].push(s):this.bindings[o]=[s],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(o=>{var s;return!(((s=o.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===r&&dp.isEqual(o.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(nn.close,{},t)}_onError(t){this._on(nn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Le.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Pg(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Pg(t.columns,t.old_record)),n}}const Ng=()=>{},Ha={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},TN=[1e3,2e3,5e3,1e4],PN=1e4,RN=`
146  addEventListener("message", (e) => {
147    if (e.data.event === "start") {
148      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
149    }
150  });`;class AN{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=xf,this.transport=null,this.heartbeatIntervalMs=Ha.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ng,this.ref=0,this.reconnectTimer=null,this.logger=Ng,this.conn=null,this.sendBuffer=[],this.serializer
150=new xN,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=o=>{let s;return o?s=o:typeof fetch>"u"?s=(...i)=>ua(async()=>{const{default:a}=await Promise.resolve().then(()=>Is);return{default:a}},void 0).then(({default:a})=>a(...i)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):s=fetch,(...i)=>s(...i)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${bf.websocket}`,this.httpEndpoint=jx(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=pN.createWebSocket(this.endpointURL())}catch(t){throw this._setConnectionState("disconnected"),new Error(`WebSocket not available: ${t.message}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:vN}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},t?this.conn.close(t,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case wi.connecting:return Jr.Connecting;case wi.open:return Jr.Open;case wi.closing:return Jr.Closing;default:return Jr.Closed}}isConnected(){return this.connectionState()===Jr.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,o=this.getChannels().find(s=>s.topic===r);if(o)return o;{const s=new dp(`realtime:${t}`,n,this);return this.channels.push(s),s}}push(t){const{topic:n,event:r,payload:o,ref:s}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${s})`,o),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(yN,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Ha.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{n.topic==="phoenix"&&n.event==="phx_reply"&&this.heartbeatCallback(n.payload.status==="ok"?"ok":"error"),n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:o,payload:s,ref:i}
150=n,a=i?`(${i})`:"",l=s.status||"";this.log("receive",`${l} ${r} ${o} ${a}`.trim(),s),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(o,s,i)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(nn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",o=new URLSearchParams(n);return`${t}${r}${o}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([RN],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n;t?n=t:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const o={access_token:n,version:gN};n&&r.updateJoinPayload(o),r.joinedOnce&&r._isJoined()&&r._push(nn.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new Nx(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ha.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,o,s,i,a,l,c;if(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:xf,this.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:Ha.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:u=>TN[u-1]||PN,this.encode=(l=t==null?void 0:t.encode)!==null&&l!==void 0?l:(u,d)=>d(JSON.stringify(u)),this.decode=(c=t==null?void 0:t.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}
150class fp extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Ve(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class NN extends fp{constructor(t,n,r){super(t),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class _f extends fp{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var ON=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const Ix=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>ua(async()=>{const{default:r}=await Promise.resolve().then(()=>Is);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},jN=()=>ON(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield ua(()=>Promise.resolve().then(()=>Is),void 0)).Response:Response}),Ef=e=>{if(Array.isArray(e))return e.map(n=>Ef(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const o=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[o]=Ef(r)}),t},IN=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)};var Co=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const qu=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),DN=(e,t,n)=>Co(void 0,void 0,void 0,function*(){const r=yield jN();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(o=>{const s=e.status||500,i=(o==null?void 0:o.statusCode)||s+"";t(new NN(qu(o),s,i))}).catch(o=>{t(new _f(qu(o),o))}):t(new _f(qu(e),e))}),MN=(e,t,n,r)=>{const o={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?o:(IN(r)?(o.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),o.body=JSON.stringify(r)):o.body=r,Object.assign(Object.assign({},o),n))};function fa(e,t,n,r,o,s){return Co(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(n,MN(t,r,o,s)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>DN(l,a,r))})})}function ec(e,t,n,r){return Co(this,void 0,void 0,function*(){return fa(e,"GET",t,n,r)})}function Un(e,t,n,r,o){return Co(this,void 0,void 0,function*(){return fa(e,"POST",t,r,o,n)})}function Cf(e,t,n,r,o){return Co(this,void 0,void 0,function*(){return fa(e,"PUT",t,r,o,n)})}function LN(e,t,n,r){return Co(this,void 0,void 0,function*(){return fa(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function Dx(e,t,n,r,o){return Co(this,void 0,void 0,function*(){return fa(e,"DELETE",t,r,o,n)})}var mt=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const $N={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Og={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class FN{constructor(t,n={},r,o){this.url=t,this.headers=n,this.bucketId=r,this.fetch=Ix(o)}uploadOrUpdate(t,n,r,o){return mt(this,void 0,void 0,function*(){try{let s;const i=Object.assign(Object.assign({},Og),o);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(s=new FormData,s.append("cacheControl",i.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",r)):typeof FormData<"u"&&r instanceof FormData?(s=r,s.append("cacheControl",i.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),o!=null&&o.headers&&(a=Object.assign(Object.assign({},a),o.headers));const c=this._removeEmptyFolders(n),u=this._getFinalPath(c),d=yield(t=="PUT"?Cf:Un)(this.fetch,`${this.url}/object/${u}`,s,Object.assign({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:c,id:d.Id,fullPath:d.Key},error:null}}catch(s){if(Ve(s))return{data:null,error:s};throw s}})}upload(t,n,r){return mt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,o){return mt(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),i=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:Og.upsert},o),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const d=yield Cf(this.fetch,a.toString(),l,{headers:u});return{data:{path:s,fullPath:d.Key},error:null}}catch(l){if(Ve(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return mt(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const o=Object.assign({},this.headers);n!=null&&n.upsert&&(o["x-upsert"]="true");const s=yield Un(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:o}),i=new URL(this.url+s.url),a=i.searchParams.get("token");if(!a)throw new fp("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:a},error:null}}catch(r){if(Ve(r))return{data:null,error:r};throw r}})}update(t,n,r){return mt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return mt(this,void 0,void 0,function*(){try{return{data:yield Un(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(o){if(Ve(o))return{data:null,error:o};throw o}})}copy(t,n,r){return mt(this,void 0,void 0,function*(){try{return{data:{path:(yield Un(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(o){if(Ve(o))return{data:null,error:o};throw o}})}createSignedUrl(t,n,r){return mt(this,void 0,void 0,function*(){try{let o=this._getFinalPath(t),s=yield Un(this.fetch,`${this.url}/object/sign/${o}
150`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${i}`)},{data:s,error:null}}catch(o){if(Ve(o))return{data:null,error:o};throw o}})}createSignedUrls(t,n,r){return mt(this,void 0,void 0,function*(){try{const o=yield Un(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:o.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${s}`):null})),error:null}}catch(o){if(Ve(o))return{data:null,error:o};throw o}})}download(t,n){return mt(this,void 0,void 0,function*(){const o=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),i=s?`?${s}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield ec(this.fetch,`${this.url}/${o}/${a}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Ve(a))return{data:null,error:a};throw a}})}info(t){return mt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield ec(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Ef(r),error:null}}catch(r){if(Ve(r))return{data:null,error:r};throw r}})}exists(t){return mt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield LN(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(Ve(r)&&r instanceof _f){const o=r.originalError;if([400,404].includes(o==null?void 0:o.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),o=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&o.push(s);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&o.push(l);let c=o.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(t){return mt(this,void 0,void 0,function*(){try{return{data:yield Dx(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(Ve(n))return{data:null,error:n};throw n}})}list(t,n,r){return mt(this,void 0,void 0,function*(){try{const o=Object.assign(Object.assign(Object.assign({},$N),n),{prefix:t||""});return{data:yield Un(this.fetch,`${this.url}/object/list/${this.bucketId}`,o,{headers:this.headers},r),error:null}}catch(o){if(Ve(o))return{data:null,error:o};throw o}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const UN="2.10.4",zN={"X-Client-Info":`storage-js/${UN}`};var Po=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class BN{constructor(t,n={},r,o){const s=new URL(t);o!=null&&o.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href,this.headers=Object.assign(Object.assign({}
150,zN),n),this.fetch=Ix(r)}listBuckets(){return Po(this,void 0,void 0,function*(){try{return{data:yield ec(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Ve(t))return{data:null,error:t};throw t}})}getBucket(t){return Po(this,void 0,void 0,function*(){try{return{data:yield ec(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(Ve(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return Po(this,void 0,void 0,function*(){try{return{data:yield Un(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Ve(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return Po(this,void 0,void 0,function*(){try{return{data:yield Cf(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Ve(r))return{data:null,error:r};throw r}})}emptyBucket(t){return Po(this,void 0,void 0,function*(){try{return{data:yield Un(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Ve(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Po(this,void 0,void 0,function*(){try{return{data:yield Dx(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(Ve(n))return{data:null,error:n};throw n}})}}class WN extends BN{constructor(t,n={},r,o){super(t,n,r,o)}from(t){return new FN(this.url,this.headers,t,this.fetch)}}const VN="2.54.0";let ai="";typeof Deno<"u"?ai="deno":typeof document<"u"?ai="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ai="react-native":ai="node";const HN={"X-Client-Info":`supabase-js-${ai}/${VN}`},KN={headers:HN},qN={schema:"public"},GN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},QN={};var YN=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const XN=e=>{let t;return e?t=e:typeof fetch>"u"?t=xx:t=fetch,(...n)=>t(...n)},JN=()=>typeof Headers>"u"?bx:Headers,ZN=(e,t,n)=>{const r=XN(n),o=JN();return(s,i)=>YN(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let c=new o(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(s,Object.assign(Object.assign({},i),{headers:c}))})};var eO=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};function tO(e){return e.endsWith("/")?e:e+"/"}function nO(e,t){var n,r;const{db:o,auth:s,realtime:i,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:Object.assign(Object.assign({},l),o),auth:Object.assign(Object.assign({},c),s),realtime:Object.assign(Object.assign({},u),i),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>eO(this,void 0,void 0,function*(){return""})};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}const Mx="2.71.1",Mo=30*1e3,kf=3,Gu=kf*Mo,rO="http://localhost:9999",oO="supabase.auth.token",sO={"X-Client-Info":`gotrue-js/${Mx}`},Tf="X-Supabase-Api-Version",Lx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},iO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,aO=10*60*1e3;class hp extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ee(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class lO extends hp{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function cO(e){return ee(e)&&e.name==="AuthApiError"}class $x extends hp{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class zr extends hp{constructor(t,n,r,o){super(t,r,o),this.name=n,this.status=r}}class cr extends zr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function uO(e){return ee(e)&&e.name==="AuthSessionMissingError"}class Ka extends zr{constructor(){super("Auth session or user missing","AuthInvalidToken
150ResponseError",500,void 0)}}class qa extends zr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ga extends zr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function dO(e){return ee(e)&&e.name==="AuthImplicitGrantRedirectError"}class jg extends zr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Pf extends zr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Qu(e){return ee(e)&&e.name==="AuthRetryableFetchError"}class Ig extends zr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Rf extends zr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const tc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Dg=` 	
151\r=`.split(""),fO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Dg.length;t+=1)e[Dg[t].charCodeAt(0)]=-2;for(let t=0;t<tc.length;t+=1)e[tc[t].charCodeAt(0)]=t;return e})();function Mg(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(tc[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(tc[r]),t.queuedBits-=6}}function Fx(e,t,n){const r=fO[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Lg(e){const t=[],n=i=>{t.push(String.fromCodePoint(i))},r={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},s=i=>{mO(i,r,n)};for(let i=0;i<e.length;i+=1)Fx(e.charCodeAt(i),o,s);return t.join("")}function hO(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 pO(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const o=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|o)+65536,n+=1}hO(r,t)}}function mO(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function gO(e){const t=[],n={queue:0,queuedBits:0},r=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)Fx(e.charCodeAt(o),n,r);return new Uint8Array(t)}function vO(e){const t=[];return pO(e,n=>t.push(n)),new Uint8Array(t)}function yO(e){const t=[],n={queue:0,queuedBits:0},r=o=>{t.push(o)};return e.forEach(o=>Mg(o,n,r)),Mg(null,n,r),t.join("")}function wO(e){return Math.round(Date.now()/1e3)+e}function xO(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const Qt=()=>typeof window<"u"&&typeof document<"u",qr={tested:!1,writable:!1},Ux=()=>{if(!Qt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(qr.tested)return qr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),qr.tested=!0,qr.writable=!0}catch{qr.tested=!0,qr.writable=!1}return qr.writable};function bO(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((o,s)=>{t[s]=o})}catch{}return n.searchParams.forEach((r,o)=>{t[o]=r}),t}const zx=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>ua(async()=>{const{default:r}=await Promise.resolve().then(()=>Is);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},SO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Lo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Gr=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},ar=async(e,t)=>{await e.removeItem(t)};class qc{constructor(){this.promise=new qc.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}qc.promiseConstructor=Promise;function Yu(e){const t=e.split(".");if(t.length!==3)throw new Rf("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!iO.test(t[r]))throw new Rf("JWT not in base64url format");
151return{header:JSON.parse(Lg(t[0])),payload:JSON.parse(Lg(t[1])),signature:gO(t[2]),raw:{header:t[0],payload:t[1]}}}async function _O(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function EO(e,t){return new Promise((r,o)=>{(async()=>{for(let s=0;s<1/0;s++)try{const i=await e(s);if(!t(s,null,i)){r(i);return}}catch(i){if(!t(s,i)){o(i);return}}})()})}function CO(e){return("0"+e.toString(16)).substr(-2)}function kO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let o="";for(let s=0;s<56;s++)o+=n.charAt(Math.floor(Math.random()*r));return o}return crypto.getRandomValues(t),Array.from(t,CO).join("")}async function TO(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),o=new Uint8Array(r);return Array.from(o).map(s=>String.fromCharCode(s)).join("")}async function PO(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await TO(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ro(e,t,n=!1){const r=kO();let o=r;n&&(o+="/PASSWORD_RECOVERY"),await Lo(e,`${t}-code-verifier`,o);const s=await PO(r);return[s,r===s?"plain":"s256"]}const RO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function AO(e){const t=e.headers.get(Tf);if(!t||!t.match(RO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function NO(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 OO(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 jO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ao(e){if(!jO.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Xu(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function $g(e){return JSON.parse(JSON.stringify(e))}var IO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Xr=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),DO=[502,503,504];async function Fg(e){var t;if(!SO(e))throw new Pf(Xr(e),0);if(DO.includes(e.status))throw new Pf(Xr(e),e.status);let n;try{n=await e.json()}catch(s){throw new $x(Xr(s),s)}let r;const o=AO(e);if(o&&o.getTime()>=Lx["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Ig(Xr(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new cr}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0))throw new Ig(Xr(n),e.status,n.weak_password.reasons);throw new lO(Xr(n),e.status||500,r)}const MO=(e,t,n,r)=>{const o={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),o.body=JSON.stringify(r),Object.assign(Object.assign({},o),n))};async function ie(e,t,n,r){var o;const s=Object.assign({},r==null?void 0:r.headers);s[Tf]||(s[Tf]=Lx["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const i=(o=r==null?void 0:r.query)!==null&&o!==void 0?o:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await LO(e,t,n+a,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function LO(e,t,n,r,o,s){const i=MO(t,r,o,s);let a;try{a=await e(n,Object.assign({},i))}
151catch(l){throw console.error(l),new Pf(Xr(l),0)}if(a.ok||await Fg(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Fg(l)}}function Ln(e){var t;let n=null;zO(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=wO(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Ug(e){const t=Ln(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function gr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function $O(e){return{data:e,error:null}}function FO(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:o,verification_type:s}=e,i=IO(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:o,verification_type:s},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function UO(e){return e}function zO(e){return e.access_token&&e.refresh_token&&e.expires_in}const Ju=["global","local","others"];var BO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};class WO{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=zx(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n=Ju[0]){if(Ju.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ju.join(", ")}`);try{return await ie(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ee(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ie(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:gr})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=BO(t,["options"]),o=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(o.new_email=r==null?void 0:r.newEmail,delete o.newEmail),await ie(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:FO,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ee(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:gr})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,o,s,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await ie(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(o=t==null?void 0:t.perPage)===null||o===void 0?void 0:o.toString())!==null&&s!==void 0?s:""},xform:UO});if(u.error)throw u.error;const d=await u.json(),h=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);c[`${w}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ee(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){Ao(t);try{return await ie(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:gr})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Ao(t);try{return await ie(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:gr})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Ao(t);
151try{return await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:gr})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Ao(t.userId);try{const{data:n,error:r}=await ie(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:n,error:r}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Ao(t.userId),Ao(t.id);try{return{data:await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}}function zg(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function VO(){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)}}const No={debug:!!(globalThis&&Ux()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Bx extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class HO extends Bx{}async function KO(e,t,n){No.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),No.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async o=>{if(o){No.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await n()}finally{No.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw No.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new HO(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(No.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null,"  "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}VO();const qO={url:rO,storageKey:oO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:sO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Bg(e,t,n){return await n()}const Oo={};class Gi{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Gi.nextInstanceID,Gi.nextInstanceID+=1,this.instanceID>0&&Qt()&&console.warn("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.");const o=Object.assign(Object.assign({},qO),t);if(this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.persistSession=o.persistSession,this.storageKey=o.storageKey,this.autoRefreshToken=o.autoRefreshToken,this.admin=new WO({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=zx(o.fetch),this.lock=o.lock||Bg,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,o.lock?this.lock=o.lock:Qt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=KO:this.lock=Bg,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)},this.persistSession?(o.storage?this.storage=o.storage:Ux()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=zg(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=zg(this.memoryStorage)),Qt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=Oo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Oo[this.storageKey]=Object.assign(Object.assign({},Oo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Oo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Oo[this.storageKey]=Object.assign(Object.assign({},Oo[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Mx}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=bO(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),Qt()&&this.detectSessionInUrl&&r!=="none"){const{data:o,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),dO(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:i,redirectType:a}=o;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ee(n)?{error:n}:{error:new $x("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,o;try{const s=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(o=t==null?void 0:t.options)===null||o===void 0?void 0:o.captchaToken}},xform:Ln}),{data:i,error:a}=s;
151if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(ee(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var n,r,o;try{let s;if("email"in t){const{email:u,password:d,options:h}=t;let p=null,b=null;this.flowType==="pkce"&&([p,b]=await Ro(this.storage,this.storageKey)),s=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:b},xform:Ln})}else if("phone"in t){const{phone:u,password:d,options:h}=t;s=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(o=h==null?void 0:h.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Ln})}else throw new qa("You must provide either an email or phone number and a password");const{data:i,error:a}=s;
151if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(ee(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:i,options:a}=t;n=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Ug})}else if("phone"in t){const{phone:s,password:i,options:a}=t;n=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Ug})}else throw new qa("You must provide either an email or phone number and a password");const{data:r,error:o}=n;return o?{data:{user:null,session:null},error:o}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ka}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:o})}catch(n){if(ee(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,o,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,o,s,i,a,l,c,u,d,h,p;let b,m;if("message"in t)b=t.message,m=t.signature;else{const{chain:w,wallet:y,statement:v,options:g}=t;let S;if(Qt())if(typeof y=="object")S=y;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))S=C.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 y!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const _=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const C=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),v?{statement:v}:null));let E;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")E=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)E=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)b=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(o=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((s=g==null?void 0:g.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((i=g==null?void 0:g.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((c=g==null?void 0:g.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(u=g==null?void 0:g.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
152`);const C=await S.signMessage(new TextEncoder().encode(b),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=C}}try{const{data:w,error:y}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:yO(m)}
152,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Ln});if(y)throw y;return!w||!w.session||!w.user?{data:{user:null,session:null},error:new Ka}:(w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),{data:Object.assign({},w),error:y})}catch(w){if(ee(w))return{data:{user:null,session:null},error:w};throw w}}async _exchangeCodeForSession(t){const n=await Gr(this.storage,`${this.storageKey}-code-verifier`),[r,o]=(n??"").split("/");try{const{data:s,error:i}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Ln});if(await ar(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Ka}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:o??null}),error:i})}catch(s){if(ee(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:o,access_token:s,nonce:i}=t,a=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:o,access_token:s,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Ln}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ka}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(ee(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,o,s,i;try{if("email"in t){const{email:a,options:l}=t;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Ro(this.storage,this.storageKey));const{error:d}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(o=l==null?void 0:l.data)!==null&&o!==void 0?o:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new qa("You must provide either an email or phone number.")}catch(a){if(ee(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{let o,s;"options"in t&&(o=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:a}=await ie(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:o,xform:Ln});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(o){if(ee(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithSSO(t){var n,r,o;try{let s=null,i=null;return this.flowType==="pkce"&&([s,i]=await Ro(this.storage,this.storageKey)),await ie(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((o=t==null?void 0:t.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:i}),headers:this.headers,xform:$O})}catch(s){if(ee(s))return{data:null,error:s};throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new cr;const{error:o}=await ie(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:o}})}catch(t){if(ee(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:o,options:s}=t,{error:i}=await ie(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in t){const{phone:r,type:o,options:s}=t,{data:i,error:a}=await ie(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a}}throw new qa("You must provide either an email or phone number and a type")}catch(n){if(ee(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Gr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
152id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Gu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const i=await Gr(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=Xu()}if(this.storage.isServer&&t.user){let i=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,c,u)=>(!i&&c==="user"&&(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."),i=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,u))})}return{data:{session:t},error:null}}const{session:o,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:o},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:gr}):await this._useSession(async n=>{var r,o,s;const{data:i,error:a}=n;if(a)throw a;return!(!((r=i.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new cr}:await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(o=i.session)===null||o===void 0?void 0:o.access_token)!==null&&s!==void 0?s:void 0,xform:gr})})}catch(n){if(ee(n))return uO(n)&&(await this._removeSession(),await ar(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:o,error:s}=r;if(s)throw s;if(!o.session)throw new cr;const i=o.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Ro(this.storage,this.storageKey));const{data:c,error:u}=await ie(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:gr});if(u)throw u;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new cr;const n=Date.now()/1e3;let r=n,o=!0,s=null;const{payload:i}=Yu(t.access_token);if(i.exp&&(r=i.exp,o=r<=n),o){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;s={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(ee(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:i,error:a}=n;if(a)throw a;t=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new cr;const{session:o,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:o?{data:{user:o.user,session:o},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(ee(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!Qt())throw new Ga("No browser detected.");
152if(t.error||t.error_description||t.error_code)throw new Ga(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new jg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ga("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new jg("No code detected.");const{data:v,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:o,access_token:s,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=t;if(!s||!a||!i||!c)throw new Ga("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let h=u+d;l&&(h=parseInt(l));const p=h-u;p*1e3<=Mo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const b=h-d;u-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,h,u):u-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,h,u);const{data:m,error:w}=await this._getUser(s);if(w)throw w;const y={provider_token:r,provider_refresh_token:o,access_token:s,expires_in:d,expires_at:h,refresh_token:i,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:t.type},error:null}}catch(r){if(ee(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Gr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:o,error:s}=n;if(s)return{error:s};const i=(r=o.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(cO(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await ar(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=xO(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,o;try{const{data:{session:s},error:i}=n;if(i)throw i;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,o=null;this.flowType==="pkce"&&([r,o]=await Ro(this.storage,this.storageKey,!0));try{return await ie(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:o,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(ee(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:o}=await this._useSession(async s=>{var i,a,l,c,u;const{data:d,error:h}=s;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.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 ie(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(o)throw o;return Qt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(ee(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,o;const{data:s,error:i}=n;if(i)throw i;
152return await ie(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&o!==void 0?o:void 0})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await EO(async o=>(o>0&&await _O(200*Math.pow(2,o-1)),this._debug(n,"refreshing attempt",o),await ie(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ln})),(o,s)=>{const i=200*Math.pow(2,o);return s&&Qu(s)&&Date.now()+i-r<Mo})}catch(r){if(this._debug(n,"error",r),ee(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Qt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const o=await Gr(this.storage,this.storageKey);if(o&&this.userStorage){let i=await Gr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:o.user},await Lo(this.userStorage,this.storageKey+"-user",i)),o.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:Xu()}else if(o&&!o.user&&!o.user){const i=await Gr(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(o.user=i.user,await ar(this.storage,this.storageKey+"-user"),await Lo(this.storage,this.storageKey,o)):o.user=Xu()}if(this._debug(r,"session from storage",o),!this._isValidSession(o)){this._debug(r,"session is not valid"),o!==null&&await this._removeSession();return}const s=((n=o.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Gu;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${Gu}s`),s){if(this.autoRefreshToken&&o.refresh_token){const{error:i}=await this._callRefreshToken(o.refresh_token);i&&(console.error(i),Qu(i)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(o.access_token);!a&&(i!=null&&i.user)?(o.user=i.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(r,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(r,"error",o),console.error(o);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new cr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new qc;const{data:s,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!s.session)throw new cr;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const a={session:s.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(s){if(this._debug(o,"error",s),ee(s)){const i={session:null,error:s};return Qu(s)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(i),i}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,n,r=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(i),s.length>0){for(let a=0;a<s.length;a+=1)console.error(s[a]);throw s[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Lo(this.userStorage,this.storageKey+"-user",{user:n.user});const o=Object.assign({},n);delete o.user;const s=$g(o);await Lo(this.storage,this.storageKey,s)}else{const o=$g(n);await Lo(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),await ar(this.storage,this.storageKey),await ar(this.storage,this.storageKey+"-code-verifier"),await ar(this.storage,this.storageKey+"-user"),this.userStorage&&await ar(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
152try{t&&Qt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Mo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((r.expires_at*1e3-t)/Mo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Mo}ms, refresh threshold is ${kf} ticks`),o<=kf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Bx)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Qt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const o=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&o.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&o.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,i]=await Ro(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(i)}`});o.push(a.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);o.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&o.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:o,error:s}=n;return s?{data:null,error:s}:await ie(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,o;const{data:s,error:i}=n;if(i)return{data:null,error:i};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:c}=await ie(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(t.factorType==="totp"&&(!((o=l==null?void 0:l.totp)===null||o===void 0)&&o.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:o,error:s}=n;if(s)return{data:null,error:s};const{data:i,error:a}=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:a})})}catch(n){if(ee(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:o,error:s}=n;return s?{data:null,error:s}:await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ee(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],o=r.filter(i=>i.factor_type==="totp"&&i.status==="verified"),s=r.filter(i=>i.factor_type==="phone"&&i.status==="verified");return{data:{all:r,totp:o,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:o},error:s}=t;if(s)return{data:null,error:s};if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Yu(o.access_token);let a=null;i.aal&&(a=i.aal);let l=a;((r=(n=o.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=i.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const o=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+aO>o)return r;const{data:s,error:i}=await ie(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=o,r=s.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:b}
152=await this.getSession();if(b||!p.session)return{data:null,error:b};r=p.session.access_token}const{header:o,payload:s,signature:i,raw:{header:a,payload:l}}=Yu(r);n!=null&&n.allowExpired||NO(s.exp);const c=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:s,header:o,signature:i},error:null}}const u=OO(o.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,i,vO(`${a}.${l}`)))throw new Rf("Invalid JWT signature");return{data:{claims:s,header:o,signature:i},error:null}}catch(r){if(ee(r))return{data:null,error:r};throw r}}}Gi.nextInstanceID=0;const GO=Gi;class QO extends GO{constructor(t){super(t)}}var YO=function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class XO{constructor(t,n,r){var o,s,i;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=tO(t),l=new URL(a);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:qN,realtime:QN,auth:Object.assign(Object.assign({},GN),{storageKey:c}),global:KN},d=nO(r??{},u);this.storageKey=(o=d.auth.storageKey)!==null&&o!==void 0?o:"",this.headers=(s=d.global.headers)!==null&&s!==void 0?s:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(h,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=d.auth)!==null&&i!==void 0?i:{},this.headers,d.global.fetch),this.fetch=ZN(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new hN(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new WN(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new WA(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return YO(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:o,storageKey:s,flowType:i,lock:a,debug:l},c,u){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new QO({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),c),storageKey:s,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:o,flowType:i,lock:a,debug:l,fetch:u,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new AN(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const JO=(e,t,n)=>new XO(e,t,n);function ZO(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}ZO()&&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 N
152ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ej="https://rjicaqnmcpmvpnnbduds.supabase.co",tj="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJqaWNhcW5tY3BtdnBubmJkdWRzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM5NDM0ODMsImV4cCI6MjA2OTUxOTQ4M30.OBWrYu8q6CMDhcAOA7nF6gP1eMQO_mWZw58GyDZMwIw",jt=JO(ej,tj,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),nj=()=>{const[e,t]=f.useState([]),[n,r]=f.useState(!0),[o,s]=f.useState(null),i=async()=>{console.log("Fetching tracks...");try{const{data:h,error:p}=await jt.from("tracks").select("*").order("order_position",{ascending:!0});if(p)throw p;const b=await Promise.all((h||[]).map(async m=>{if(m.audio_filename){const{data:w}=jt.storage.from("tracks").getPublicUrl(m.audio_filename);return{...m,audioUrl:w.publicUrl}}return m}));console.log("Tracks fetched successfully:",b.length),t(b)}catch(h){console.error("Error fetching tracks:",h),wn({title:"Error",description:"Failed to load tracks",variant:"destructive"})}finally{r(!1)}},a=async h=>{var p;try{let b=null;if(h.audioUrl&&h.audioUrl.startsWith("blob:")){const C=await(await fetch(h.audioUrl)).blob(),E=`track-${Date.now()}.${C.type.split("/")[1]}`,{error:k}=await jt.storage.from("tracks").upload(E,C);if(k)throw k;b=E}const{data:m}=await jt.from("tracks").select("order_position").order("order_position",{ascending:!1}).limit(1),w=(((p=m==null?void 0:m[0])==null?void 0:p.order_position)||0)+1,{data:y,error:v}=await jt.from("tracks").insert([{prompt:h.prompt,audio_filename:b,model:h.model||"Maestro V1",order_position:w}]).select().single();if(v)throw v;let g;if(b){const{data:_}=jt.storage.from("tracks").getPublicUrl(b);g=_.publicUrl}const S={...y,audioUrl:g};t(_=>[..._,S].sort((C,E)=>(C.order_position||0)-(E.order_position||0))),wn({title:"Success",description:"Track added successfully"})}catch(b){console.error("Error adding track:",b),wn({title:"Error",description:"Failed to add track",variant:"destructive"})}},l=async h=>{try{const p=e.find(m=>m.id===h);if(p!=null&&p.audio_filename){const{error:m}=await jt.storage.from("tracks").remove([p.audio_filename]);m&&console.error("Error deleting audio file:",m)}const{error:b}=await jt.from("tracks").delete().eq("id",h);if(b)throw b;t(m=>m.filter(w=>w.id!==h)),wn({title:"Success",description:"Track deleted successfully"})}catch(p){console.error("Error deleting track:",p),wn({title:"Error",description:"Failed to delete track",variant:"destructive"})}},c=async(h,p)=>{try{const{error:b}=await jt.from("tracks").update(p).eq("id",h);if(b)throw b;t(m=>m.map(w=>w.id===h?{...w,...p}:w)),wn({title:"Success",description:"Track updated successfully"})}catch(b){console.error("Error updating track:",b),wn({title:"Error",description:"Failed to update track",variant:"destructive"})}},u=async h=>{try{t(h);const p=h.map((b,m)=>jt.from("tracks").update({order_position:m+1}).eq("id",b.id));await Promise.all(p),wn({title:"Success",description:"Track order updated successfully"})}catch(p){console.error("Error reordering tracks:",p),i(),wn({title:"Error",description:"Failed to update track order",variant:"destructive"})}};return f.useEffect(()=>{console.log("useTracks useEffect running..."),i();const h=jt.channel("tracks-changes").on("postgres_changes",{event:"*",schema:"public",table:"tracks"},m=>{console.log("Real-time update received:",m),i()}).subscribe(),p=()=>{document.hidden||(console.log("Tab became visible, refetching tracks..."),i())},b=()=>{console.log("Window focused, refetching tracks..."),i()};return document.addEventListener("visibilitychange",p),window.addEventListener("focus",b),()=>{jt.removeChannel(h),document.removeEventListener("visibilitychange",p),window.removeEventListener("focus",b)}},[]),{tracks:e,addTrack:a,removeTrack:l,updateTrack:c,reorderTracks:u,loading:n,currentPlayingId:o,setCurrentPlaying:h=>{s(h)}}},Wx=f.createContext(void 0),rj=({children:e})=>{console.log("TracksProvider rendering...");try{const t=nj();return console.log("TracksProvider got data:",t),x.jsx(Wx.Provider,{value:t,children:e})}catch(t){throw console.error("TracksProvider error:",t),t}},Gc=()=>{const e=f.useContext(Wx);if(e===void 0)throw new Error("useTracks must be used within a TracksProvider");return e},pp=qh("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"}}),Ut=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?wC:"button";return x.jsx(i,{className:le(pp({variant:t,size:n,className:e})),ref:s,...o})});Ut.displayName="Button";function nc(e,[t,n]){return Math.min(n,Math.max(t,e))}var oj=f.createContext(void 0);function Qc(e){const t=f.useContext(oj);return e||t||"ltr"}function Vx(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hx=["PageUp","PageDown"],Kx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],qx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ms="Slider",[Af,sj,ij]=kc(Ms),[Gx,eL]=On(Ms,[ij]),[aj,Yc]=Gx(Ms),Qx=f.forwardRef((e,t)=>
152{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:b,...m}=e,w=f.useRef(new Set),y=f.useRef(0),g=i==="horizontal"?lj:cj,[S=[],_]=vo({prop:u,defaultProp:c,onChange:O=>{var B;(B=[...w.current][y.current])==null||B.focus(),d(O)}}),C=f.useRef(S);function E(O){const D=pj(S,O);A(O,D)}function k(O){A(O,y.current)}function N(){const O=C.current[y.current];S[y.current]!==O&&h(S)}function A(O,D,{commit:B}={commit:!1}){const I=yj(s),H=wj(Math.round((O-r)/s)*s+r,I),L=nc(H,[r,o]);_((U=[])=>{const T=fj(U,L,D);if(vj(T,l*s)){y.current=T.indexOf(L);const P=String(T)!==String(U);return P&&B&&h(T),P?T:U}else return U})}return x.jsx(aj,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:y,thumbs:w.current,values:S,orientation:i,form:b,children:x.jsx(Af.Provider,{scope:e.__scopeSlider,children:x.jsx(Af.Slot,{scope:e.__scopeSlider,children:x.jsx(g,{"aria-disabled":a,"data-disabled":a?"":void 0,...m,ref:t,onPointerDown:K(m.onPointerDown,()=>{a||(C.current=S)}),min:r,max:o,inverted:p,onSlideStart:a?void 0:E,onSlideMove:a?void 0:k,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&A(r,0,{commit:!0}),onEndKeyDown:()=>!a&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:D})=>{if(!a){const H=Hx.includes(O.key)||O.shiftKey&&Kx.includes(O.key)?10:1,L=y.current,U=S[L],T=s*H*D;A(U+T,L,{commit:!0})}}})})})})});Qx.displayName=Ms;var[Yx,Xx]=Gx(Ms,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lj=f.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,h]=f.useState(null),p=de(t,g=>h(g)),b=f.useRef(void 0),m=Qc(o),w=m==="ltr",y=w&&!s||!w&&s;function v(g){const S=b.current||d.getBoundingClientRect(),_=[0,S.width],E=mp(_,y?[n,r]:[r,n]);return b.current=S,E(g-S.left)}return x.jsx(Yx,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:x.jsx(Jx,{dir:m,"data-orientation":"horizontal",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:g=>{const S=v(g.clientX);i==null||i(S)},onSlideMove:g=>{const S=v(g.clientX);a==null||a(S)},onSlideEnd:()=>{b.current=void 0,l==null||l()},onStepKeyDown:g=>{const _=qx[y?"from-left":"from-right"].includes(g.key);c==null||c({event:g,direction:_?-1:1})}})})}),cj=f.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=e,u=f.useRef(null),d=de(t,u),h=f.useRef(void 0),p=!o;function b(m){const w=h.current||u.current.getBoundingClientRect(),y=[0,w.height],g=mp(y,p?[r,n]:[n,r]);return h.current=w,g(m-w.top)}return x.jsx(Yx,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:x.jsx(Jx,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const w=b(m.clientY);s==null||s(w)},onSlideMove:m=>{const w=b(m.clientY);i==null||i(w)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:m=>{const y=qx[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:y?-1:1})}})})}),Jx=f.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=e,u=Yc(Ms,n);return x.jsx(X.span,{...c,ref:t,onKeyDown:K(e.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Hx.concat(Kx).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:K(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:K(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:K(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),s(d))})})}),Zx="SliderTrack",eb=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Yc(Zx,n);return x.jsx(X.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});
152eb.displayName=Zx;var Nf="SliderRange",tb=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Yc(Nf,n),s=Xx(Nf,n),i=f.useRef(null),a=de(t,i),l=o.values.length,c=o.values.map(h=>ob(h,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(X.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}})});tb.displayName=Nf;var Of="SliderThumb",nb=f.forwardRef((e,t)=>{const n=sj(e.__scopeSlider),[r,o]=f.useState(null),s=de(t,a=>o(a)),i=f.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return x.jsx(uj,{...e,ref:s,index:i})}),uj=f.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=Yc(Of,n),a=Xx(Of,n),[l,c]=f.useState(null),u=de(t,v=>c(v)),d=l?i.form||!!l.closest("form"):!0,h=Mw(l),p=i.values[r],b=p===void 0?0:ob(p,i.min,i.max),m=hj(r,i.values.length),w=h==null?void 0:h[a.size],y=w?mj(w,b,a.direction):0;return f.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${b}% + ${y}px)`},children:[x.jsx(Af.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(X.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":i.min,"aria-valuenow":p,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:u,style:p===void 0?{display:"none"}:e.style,onFocus:K(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&x.jsx(rb,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:p},r)]})});nb.displayName=Of;var dj="RadioBubbleInput",rb=f.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=f.useRef(null),s=de(o,r),i=Vx(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const d=new Event("input",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),x.jsx(X.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});rb.displayName=dj;function fj(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function ob(e,t,n){const s=100/(n-t)*(e-t);return nc(s,[0,100])}function hj(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function pj(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function mj(e,t,n){const r=e/2,s=mp([0,50],[0,r]);return(r-s(t)*n)*n}function gj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vj(e,t){if(t>0){const n=gj(e);return Math.min(...n)>=t}return!0}function mp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yj(e){return(String(e).split(".")[1]||"").length}function wj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var sb=Qx,xj=eb,bj=tb,Sj=nb;const ib=f.forwardRef(({className:e,...t},n)=>x.jsxs(sb,{ref:n,className:le("relative flex w-full touch-none select-none items-center",e),...t,children:[x.jsx(xj,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-gray-600",children:x.jsx(bj,{className:"absolute h-full bg-black"})}),x.jsx(Sj,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));ib.displayName=sb.displayName;const _j=({prompt:e,id:t})=>{const{tracks:n,currentPlayingId:r,setCurrentPlaying:o}=Gc(),[s,i]=f.useState(!1),[a,l]=f.useState(0),[c,u]=f.useState(0),[d,h]=f.useState(!1),[p,b]=f.useState(0),m=f.useRef(null),w=n.find(g=>g.id===t);f.useEffect(()=>{const g=m.current;if(!g)return;const S=()=>{l(g.duration||0)},_=()=>{d||u(g.currentTime)},C=()=>{i(!1),u(0),o(null)},E=()=>{i(!1),console.error("Error playing audio for track:",t)};return g.addEventListener("loadedmetadata",S),g.addEventListener("timeupdate",_),g.addEventListener("ended",C),g.addEventListener("error",E
152),()=>{g.removeEventListener("loadedmetadata",S),g.removeEventListener("timeupdate",_),g.removeEventListener("ended",C),g.removeEventListener("error",E)}},[t,d]),f.useEffect(()=>{if(r!==t&&s){const g=m.current;g&&(g.pause(),i(!1))}},[r,t,s]);const y=async()=>{const g=m.current;if(g)try{s?(g.pause(),i(!1),o(null)):(r&&r!==t&&o(null),await g.play(),i(!0),o(t))}catch(S){console.error("Error toggling audio playback:",S),i(!1),o(null)}},v=g=>{if(!isFinite(g))return"0:00";const S=Math.floor(g/60),_=Math.floor(g%60).toString().padStart(2,"0");return`${S}:${_}`};return x.jsxs("div",{className:"bg-[hsl(var(--track-card-bg))] rounded-xl p-6 flex flex-col items-center space-y-4 shadow-sm hover:shadow-md transition-shadow duration-300",children:[(w==null?void 0:w.audioUrl)&&x.jsx("audio",{ref:m,src:w.audioUrl,preload:"metadata"}),x.jsx("p",{className:"font-poppins text-[hsl(var(--track-prompt))] text-center text-sm leading-relaxed",children:e}),x.jsxs("div",{className:"w-full flex items-center gap-3",children:[x.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] tabular-nums",children:v(d?p:c)}),x.jsx(ib,{value:[d?p:c],min:0,max:a||0,step:.1,onValueChange:g=>{h(!0),b(g[0]??0)},onValueCommit:g=>{const S=g[0]??0;m.current&&(m.current.currentTime=S),u(S),h(!1)},className:"flex-1",disabled:!(w!=null&&w.audioUrl)||a===0}),x.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] tabular-nums",children:v(a)})]}),x.jsx(Ut,{onClick:y,size:"sm",disabled:!(w!=null&&w.audioUrl),className:"bg-black hover:bg-black/80 text-white rounded-full w-12 h-12 p-0 disabled:opacity-50 disabled:cursor-not-allowed",children:s?x.jsx(pk,{className:"w-4 h-4"}):x.jsx(mk,{className:"w-4 h-4 ml-0.5"})}),!(w!=null&&w.audioUrl)&&x.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))] text-center",children:"No audio file uploaded"})]})},Zu=({modelFilter:e,searchQuery:t})=>{const{tracks:n,loading:r}=Gc();let o=e?n.filter(s=>s.model===e):n;if(t&&t.trim()){const s=t.trim().toLowerCase();o=o.filter(i=>(i.prompt||"").toLowerCase().includes(s))}return r?x.jsx("div",{className:"container mx-auto px-6 py-12",children:x.jsx("div",{className:"text-center py-16",children:x.jsx("p",{className:"text-[hsl(var(--muted-foreground))]",children:"Loading tracks..."})})}):o.length===0?x.jsx("div",{className:"container mx-auto px-6 py-12",children:x.jsxs("div",{className:"text-center py-16",children:[x.jsx("h3",{className:"text-2xl font-medium text-[hsl(var(--muted-foreground))] mb-4",children:"No tracks available"}),x.jsx("p",{className:"text-[hsl(var(--muted-foreground))]",children:"Add your first track using the admin panel to get started."})]})}):x.jsx("div",{className:"container mx-auto px-6 py-12",children:x.jsx("div",{className:"grid grid-cols-1 gap-8",children:o.map(s=>x.jsx(_j,{id:s.id,prompt:s.prompt},s.id))})})};var ed="rovingFocusGroup.onEntryFocus",Ej={bubbles:!1,cancelable:!0},ha="RovingFocusGroup",[jf,ab,Cj]=kc(ha),[kj,lb]=On(ha,[Cj]),[Tj,Pj]=kj(ha),cb=f.forwardRef((e,t)=>x.jsx(jf.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(jf.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Rj,{...e,ref:t})})}));cb.displayName=ha;var Rj=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,h=f.useRef(null),p=de(t,h),b=Qc(s),[m,w]=vo({prop:i,defaultProp:a??null,onChange:l,caller:ha}),[y,v]=f.useState(!1),g=Ht(c),S=ab(n),_=f.useRef(!1),[C,E]=f.useState(0);return f.useEffect(()=>{const k=h.current;if(k)return k.addEventListener(ed,g),()=>k.removeEventListener(ed,g)},[g]),x.jsx(Tj,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(k=>w(k),[w]),onItemShiftTab:f.useCallback(()=>v(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:f.useCallback(()=>E(k=>k-1),[]),children:x.jsx(X.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{_.current=!0}),onFocus:K(e.onFocus,k=>{const N=!_.current;if(k.target===k.currentTarget&&N&&!y){const A=new CustomEvent(ed,Ej);if(k.currentTarget.dispatchEvent(A),!A.defaultPrevented){const O=S().filter(L=>L.focusable),D=O.find(L=>
vendor: 9,164 bytes, line 152
152L.active),B=O.find(L=>L.id===m),H=[D,B,...O].filter(Boolean).map(L=>L.ref.current);fb(H,u)}}_.current=!1}),onBlur:K(e.onBlur,()=>v(!1))})})}),ub="RovingFocusGroupItem",db=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=jr(),c=s||l,u=Pj(ub,n),d=u.currentTabStopId===c,h=ab(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:m}=u;return f.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),x.jsx(jf.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:x.jsx(X.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:K(e.onMouseDown,w=>{r?u.onItemFocus(c):w.preventDefault()}),onFocus:K(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:K(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const y=Oj(w,u.orientation,u.dir);if(y!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let g=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const S=g.indexOf(w.currentTarget);g=u.loop?jj(g,S+1):g.slice(S+1)}setTimeout(()=>fb(g))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});db.displayName=ub;var Aj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Oj(e,t,n){const r=Nj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Aj[r]}function fb(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ij=cb,Dj=db,Xc="Tabs",[Mj,tL]=On(Xc,[lb]),hb=lb(),[Lj,gp]=Mj(Xc),pb=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Qc(a),[d,h]=vo({prop:r,onChange:o,defaultProp:s??"",caller:Xc});return x.jsx(Lj,{scope:n,baseId:jr(),value:d,onValueChange:h,orientation:i,dir:u,activationMode:l,children:x.jsx(X.div,{dir:u,"data-orientation":i,...c,ref:t})})});pb.displayName=Xc;var mb="TabsList",gb=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=gp(mb,n),i=hb(n);return x.jsx(Ij,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:x.jsx(X.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});gb.displayName=mb;var vb="TabsTrigger",yb=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=gp(vb,n),a=hb(n),l=bb(i.baseId,r),c=Sb(i.baseId,r),u=r===i.value;return x.jsx(Dj,{asChild:!0,...a,focusable:!o,active:u,children:x.jsx(X.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:K(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:K(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(r)})})})});yb.displayName=vb;var wb="TabsContent",xb=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=gp(wb,n),l=bb(a.baseId,r),c=Sb(a.baseId,r),u=r===a.value,d=f.useRef(u);return f.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),x.jsx(Eo,{present:o||u,children:({present:h})=>x.jsx(X.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&s})})});xb.displayName=wb;function bb(e,t){return`${e}-trigger-${t}`}function Sb(e,t){return`${e}-content-${t}`}var $j=pb,_b=gb,Eb=yb,Cb=xb;const Fj=$j,kb=f.forwardRef(({className:e,...t},n)=>x.jsx(_b,{ref:n,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));kb.displayName=_b.displayName;const vl=f.forwardRef(({className:e,...t},n)=>x.jsx(Eb,{ref:n,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));vl.displayName=Eb.displayName;const yl=f.forwardRef(({className:e,...t},n)=>x.jsx(Cb,{ref:n,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));yl.displayName=Cb.displayName;const Qi=f.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:le("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:r,...n}));Qi.displayName="Input";const Uj=()=>{const[e,t]=f.useState("maestro-v1"),[n,r]=f.useState(!1),[o,s]=f.useState(""),[i,a]=f.useState(""),l=()=>{s(""),a(""),r(!1)},c=u=>{u.key==="Enter"?a(o.trim()):u.key==="Escape"&&l()};return x.jsxs("div",{className:"min-h-screen bg-background",children:[x.jsxs("nav",{className:"fixed top-0 left-0 right-0 w-full bg-black px-6 py-4 flex items-center justify-between z-50",children:[x.jsx("img",{src:"/lovable-uploads/9550ee62-78d5-46fc-b44c-802584374bb5.png",alt:"Beatoven AI",className:"h-8 md:h-12 w-auto"}),x.jsx(Ut,{variant:"outline",className:"bg-background text-foreground border-background hover:bg-muted",asChild:!0,children:x.jsx("a",{href:"https://sync.beatoven.ai/workspace",target:"_blank",rel:"noopener noreferrer",children:"Try now"})})]}),x.jsx("div",{className:"flex items-center justify-center py-24 pt-32",children:x.jsxs("div",{className:"text-center px-8 md:px-6",children:[x.jsxs("div",{className:"relative inline-block",children:[x.jsx("h1",{className:"sr-only",children:"maestro"}),x.jsx("img",{src:"/lovable-uploads/8a071181-74a2-4501-bbba-35c27de66b9a.png",alt:"maestro",className:"h-24 md:h-40 w-auto mx-auto"}),!n&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"md:hidden mt-4 flex justify-center",children:x.jsx(Ut,{variant:"ghost",size:"lg",onClick:()=>r(!0),className:"text-4xl font-light tracking-wide text-foreground px-0 h-auto bg-transparent hover:bg-transparent drop-shadow",children:"SHOWCASE"})}),x.jsx("div",{className:"hidden md:flex absolute inset-0 items-end justify-center pb-0 pointer-events-none",children:x.jsx(Ut,{variant:"ghost",size:"lg",onClick:()=>r(!0),className:"text-5xl font-light tracking-wide text-foreground px-0 h-auto bg-transparent hover:bg-transparent drop-shadow pointer-events-auto",children:"SHOWCASE"})})]})]}),n&&x.jsxs("div",{className:"mx-auto w-full max-w-xl flex items-center gap-2 mt-4",children:[x.jsx(Qi,{value:o,onChange:u=>s(u.target.value),onKeyDown:c,placeholder:"Search showcase...","aria-label":"Search showcase",autoFocus:!0}),x.jsx(Ut,{variant:"outline",onClick:l,"aria-label":"Clear search",children:x.jsx(hw,{className:"size-4"})})]})]})}),x.jsx("div",{className:"py-1",children:x.jsxs(Fj,{value:e,onValueChange:t,className:"w-full",children:[x.jsx("div",{className:"container mx-auto px-6",children:x.jsxs(kb,{className:"grid w-full max-w-lg mx-auto grid-cols-3 mb-8 [&>*]:border [&>*]:border-black",children:[x.jsxs(vl,{value:"maestro-v1",className:"text-[10px] sm:text-sm px-1 sm:px-3",children:[x.jsx("span",{className:"block sm:hidden",children:"v1"}),x.jsx("span",{className:"hidden sm:block",children:"maestro v1"})]}),x.jsxs(vl,{value:"maestro-finetuned",className:"text-[10px] sm:text-sm px-1 sm:px-3",children:[x.jsx("span",{className:"block sm:hidden",children:"fine-tuned"}),x.jsx("span",{className:"hidden sm:block",children:"maestro fine-tuned"})]}),x.jsxs(vl,{value:"maestro-sfx",className:"text-[10px] sm:text-sm px-1 sm:px-3",children:[x.jsx("span",{className:"block sm:hidden",children:"SFX"}),x.jsx("span",{className:"hidden sm:block",children:"maestro SFX"})]})]})}),x.jsx(yl,{value:"maestro-v1",children:x.jsx(Zu,{modelFilter:"maestro v1",searchQuery:i})}),x.jsxs(yl,{value:"maestro-finetuned",children:[x.jsx("div",{className:"container mx-auto px-6",children:x.jsx("p",{className:"text-center text-muted-foreground mb-8",children:"maestro fine-tuned with 300 Indian classical tracks"})}),x.jsx(Zu,{modelFilter:"maestro finetuned",searchQuery:i})]}),x.jsxs(yl,{value:"maestro-sfx",children:[x.jsx("div",{className:"container mx-auto px-6",children:x.jsx("p",{className:"text-center text-muted-foreground mb-8",children:"SFX generated 
152with upcoming maestro SFX model"})}),x.jsx(Zu,{modelFilter:"maestro SFX",searchQuery:i})]})]})}),x.jsx("footer",{className:"py-8 mt-16",children:x.jsx("div",{className:"container mx-auto px-6",children:x.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"© 2025 Beatoven.ai. All rights reserved."})})})]})};var zj="Label",Tb=f.forwardRef((e,t)=>x.jsx(X.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Tb.displayName=zj;var Pb=Tb;const Bj=qh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wl=f.forwardRef(({className:e,...t},n)=>x.jsx(Pb,{ref:n,className:le(Bj(),e),...t}));wl.displayName=Pb.displayName;const rc=f.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));rc.displayName="Card";const If=f.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:le("flex flex-col space-y-1.5 p-6",e),...t}));If.displayName="CardHeader";const Df=f.forwardRef(({className:e,...t},n)=>x.jsx("h3",{ref:n,className:le("text-2xl font-semibold leading-none tracking-tight",e),...t}));Df.displayName="CardTitle";const Mf=f.forwardRef(({className:e,...t},n)=>x.jsx("p",{ref:n,className:le("text-sm text-muted-foreground",e),...t}));Mf.displayName="CardDescription";const Lf=f.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:le("p-6 pt-0",e),...t}));Lf.displayName="CardContent";const Wj=f.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:le("flex items-center p-6 pt-0",e),...t}));Wj.displayName="CardFooter";var td=0;function Rb(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wg()),document.body.insertAdjacentElement("beforeend",e[1]??Wg()),td++,()=>{td===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),td--}},[])}function Wg(){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 nd="focusScope.autoFocusOnMount",rd="focusScope.autoFocusOnUnmount",Vg={bubbles:!1,cancelable:!0},Vj="FocusScope",vp=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=f.useState(null),c=Ht(o),u=Ht(s),d=f.useRef(null),h=de(t,m=>l(m)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let m=function(g){if(p.paused||!a)return;const S=g.target;a.contains(S)?d.current=S:ur(d.current,{select:!0})},w=function(g){if(p.paused||!a)return;const S=g.relatedTarget;S!==null&&(a.contains(S)||ur(d.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const _ of g)_.removedNodes.length>0&&ur(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,p.paused]),f.useEffect(()=>{if(a){Kg.add(p);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(nd,Vg);a.addEventListener(nd,c),a.dispatchEvent(y),y.defaultPrevented||(Hj(Yj(Ab(a)),{select:!0}),document.activeElement===m&&ur(a))}return()=>{a.removeEventListener(nd,c),setTimeout(()=>{const y=new CustomEvent(rd,Vg);a.addEventListener(rd,u),a.dispatchEvent(y),y.defaultPrevented||ur(m??document.body,{select:!0}),a.removeEventListener(rd,u),Kg.remove(p)},0)}}},[a,c,u,p]);const b=f.useCallback(m=>{if(!n&&!r||p.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(w&&y){const v=m.currentTarget,[g,S]=Kj(v);g&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&ur(g,{select:!0})):m.shiftKey&&y===g&&(m.preventDefault(),n&&ur(S,{select:!0})):y===v&&m.preventDefault()}},[n,r,p.paused]);return x.jsx(X.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});vp.displayName=Vj;function Hj(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ur(r,{select:t}),document.activeElement!==n)return}function Kj(e){const t=Ab(e),n=Hg(t,e),r=Hg(t.reverse(),e);return[n,r]}function Ab(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hg(e,t){for(const n of e)if(!qj(n,{upTo:t}))return n}function qj(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 Gj(e){return e instanceof HTMLInputElement&&"select"in e}function ur(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gj(e)&&t&&e.select()}}var Kg=Qj();function Qj(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qg(e,t),e.unshift(t)},remove(t){var n;e=qg(e,t),(n=e[0])==null||n.resume()}}}function qg(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yj(e){return e.filter(t=>t.tagName!=="A")}var Xj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jo=new WeakMap,Qa=new WeakMap,Ya={},od=0,Nb=function(e){return e&&(e.host||Nb(e.parentNode))},Jj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Nb(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Zj=function(e,t,n,r){var o=Jj(t,Array.isArray(e)?e:[e]);Ya[n]||(Ya[n]=new WeakMap);var s=Ya[n],i=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(r),b=p!==null&&p!=="false",m=(jo.get(h)||0)+1,w=(s.get(h)||0)+1;jo.set(h,m),s.set(h,w),i.push(h),m===1&&b&&Qa.set(h,!0),w===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};
vendor: 6,072 bytes, lines 152-167
152return u(t),a.clear(),od++,function(){i.forEach(function(d){var h=jo.get(d)-1,p=s.get(d)-1;jo.set(d,h),s.set(d,p),h||(Qa.has(d)||d.removeAttribute(r),Qa.delete(d)),p||d.removeAttribute(n)}),od--,od||(jo=new WeakMap,jo=new WeakMap,Qa=new WeakMap,Ya={})}},Ob=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Xj(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Zj(r,o,n,"aria-hidden")):function(){return null}},Cn=function(){return Cn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Cn.apply(this,arguments)};function jb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function eI(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var xl="right-scroll-bar-position",bl="width-before-scroll-bar",tI="with-scroll-bars-hidden",nI="--removed-body-scroll-bar-size";function sd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rI(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var oI=typeof window<"u"?f.useLayoutEffect:f.useEffect,Gg=new WeakMap;function sI(e,t){var n=rI(null,function(r){return e.forEach(function(o){return sd(o,r)})});return oI(function(){var r=Gg.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||sd(a,null)}),s.forEach(function(a){o.has(a)||sd(a,i)})}Gg.set(n,e)},[e]),n}function iI(e){return e}function aI(e,t){t===void 0&&(t=iI);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function lI(e){e===void 0&&(e={});var t=aI(null);return t.options=Cn({async:!0,ssr:!1},e),t}var Ib=function(e){var t=e.sideCar,n=jb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Cn({},n))};Ib.isSideCarExport=!0;function cI(e,t){return e.useMedium(t),Ib}var Db=lI(),id=function(){},Jc=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:id,onWheelCapture:id,onTouchMoveCapture:id}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,m=e.inert,w=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,S=jb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=sI([n,t]),E=Cn(Cn({},S),o);return f.createElement(f.Fragment,null,u&&f.createElement(_,{sideCar:Db,removeScrollBar:c,shards:d,noRelative:p,noIsolation:b,inert:m,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:g}),i?f.cloneElement(f.Children.only(a),Cn(Cn({},E),{ref:C})):f.createElement(v,Cn({},E,{className:l,ref:C}),a))});Jc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jc.classNames={fullWidth:bl,zeroRight:xl};var uI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uI();return t&&e.setAttribute("nonce",t),e}function fI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dI())&&(fI(t,n),hI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mI=function(){var e=pI();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mb=function(){var e=mI(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gI={left:0,top:0,right:0,gap:0},ad=function(e){return parseInt(e||"",10)||0},vI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ad(n),ad(r),ad(o)]},yI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gI;var t=vI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},wI=Mb(),os="data-scroll-locked",xI=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
153  .`.concat(tI,` {
154   overflow: hidden `).concat(r,`;
155   padding-right: `).concat(a,"px ").concat(r,`;
156  }
157  body[`).concat(os,`] {
158    overflow: hidden `).concat(r,`;
159    overscroll-behavior: contain;
160    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
161    padding-left: `.concat(o,`px;
162    padding-top: `).concat(s,`px;
163    padding-right: `).concat(i,`px;
164    margin-left:0;
165    margin-top:0;
166    margin-right: `).concat(a,"px ").concat(r,`;
167    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
167")].filter(Boolean).join(""),`
168  }
169  
170  .`).concat(xl,` {
171    right: `).concat(a,"px ").concat(r,`;
172  }
173  
174  .`).concat(bl,` {
175    margin-right: `).concat(a,"px ").concat(r,`;
176  }
177  
178  .`).concat(xl," .").concat(xl,` {
179    right: 0 `).concat(r,`;
180  }
181  
182  .`).concat(bl," .").concat(bl,` {
183    margin-right: 0 `).concat(r,`;
184  }
185  
186  body[`).concat(os,`] {
187    `).concat(nI,": ").concat(a,`px;
188  }
189`)},Qg=function(){var e=parseInt(document.body.getAttribute(os)||"0",10);return isFinite(e)?e:0},bI=function(){f.useEffect(function(){return document.body.setAttribute(os,(Qg()+1).toString()),function(){var e=Qg()-1;e<=0?document.body.removeAttribute(os):document.body.setAttribute(os,e.toString())}},[])},SI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;bI();var s=f.useMemo(function(){return yI(o)},[o]);return f.createElement(wI,{styles:xI(s,!t,o,n?"":"!important")})},$f=!1;if(typeof window<"u")try{var Xa=Object.defineProperty({},"passive",{get:function(){return $f=!0,!0}});window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{$f=!1}var Io=$f?{passive:!1}:!1,_I=function(e){return e.tagName==="TEXTAREA"},Lb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_I(e)&&n[t]==="visible")},EI=function(e){return Lb(e,"overflowY")},CI=function(e){return Lb(e,"overflowX")},Yg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$b(e,r);if(o){var s=Fb(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},TI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$b=function(e,t){return e==="v"?EI(t):CI(t)},Fb=function(e,t){return e==="v"?kI(t):TI(t)},PI=function(e,t){return e==="h"&&t==="rtl"?-1:1},RI=function(e,t,n,r,o){var s=PI(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,d=0,h=0;do{if(!a)break;var p=Fb(e,a),b=p[0],m=p[1],w=p[2],y=m-w-s*b;(b||y)&&$b(e,a)&&(d+=y,h+=b);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!o)||!u&&(Math.abs(h)<1||!o))&&(c=!0),c},Ja=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xg=function(e){return[e.deltaX,e.deltaY]},Jg=function(e){return e&&"current"in e?e.current:e},AI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},NI=function(e){return`
190  .block-interactivity-`.concat(e,` {pointer-events: none;}
191  .allow-interactivity-`).concat(e,` {pointer-events: all;}
192`)},OI=0,Do=[];function jI(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(OI++)[0],s=f.useState(Mb)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=eI([e.lockRef.current],(e.shards||[]).map(Jg),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Ja(m),v=n.current,g="deltaX"in m?m.deltaX:v[0]-y[0],S="deltaY"in m?m.deltaY:v[1]-y[1],_,C=m.target,E=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&C.type==="range")return!1;var k=Yg(E,C);if(!k)return!0;if(k?_=E:(_=E==="v"?"h":"v",k=Yg(E,C)),!k)return!1;if(!r.current&&"changedTouches"in m&&(g||S)&&(r.current=_),!_)return!0;var N=r.current||_;return RI(N,w,m,N==="h"?g:S,!0)},[]),l=f.useCallback(function(m){var w=m;if(!(!Do.length||Do[Do.length-1]!==s)){var y="deltaY"in w?Xg(w):Ja(w),v=t.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&AI(_.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}
vendor: 4,121 bytes, line 192
192if(!v){var g=(i.current.shards||[]).map(Jg).filter(Boolean).filter(function(_){return _.contains(w.target)}),S=g.length>0?a(w,g[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),c=f.useCallback(function(m,w,y,v){var g={name:m,delta:w,target:y,should:v,shadowParent:II(y)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(S){return S!==g})},1)},[]),u=f.useCallback(function(m){n.current=Ja(m),r.current=void 0},[]),d=f.useCallback(function(m){c(m.type,Xg(m),m.target,a(m,e.lockRef.current))},[]),h=f.useCallback(function(m){c(m.type,Ja(m),m.target,a(m,e.lockRef.current))},[]);f.useEffect(function(){return Do.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Io),document.addEventListener("touchmove",l,Io),document.addEventListener("touchstart",u,Io),function(){Do=Do.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Io),document.removeEventListener("touchmove",l,Io),document.removeEventListener("touchstart",u,Io)}},[]);var p=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(s,{styles:NI(o)}):null,p?f.createElement(SI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function II(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const DI=cI(Db,jI);var yp=f.forwardRef(function(e,t){return f.createElement(Jc,Cn({},e,{ref:t,sideCar:DI}))});yp.classNames=Jc.classNames;var MI=[" ","Enter","ArrowUp","ArrowDown"],LI=[" ","Enter"],wo="Select",[Zc,eu,$I]=kc(wo),[Ls,nL]=On(wo,[$I,jc]),tu=jc(),[FI,Br]=Ls(wo),[UI,zI]=Ls(wo),Ub=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:h,required:p,form:b}=e,m=tu(t),[w,y]=f.useState(null),[v,g]=f.useState(null),[S,_]=f.useState(!1),C=Qc(c),[E,k]=vo({prop:r,defaultProp:o??!1,onChange:s,caller:wo}),[N,A]=vo({prop:i,defaultProp:a,onChange:l,caller:wo}),O=f.useRef(null),D=w?b||!!w.closest("form"):!0,[B,I]=f.useState(new Set),H=Array.from(B).map(L=>L.props.value).join(";");return x.jsx(ZP,{...m,children:x.jsxs(FI,{required:p,scope:t,trigger:w,onTriggerChange:y,valueNode:v,onValueNodeChange:g,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:jr(),value:N,onValueChange:A,open:E,onOpenChange:k,dir:C,triggerPointerDownPosRef:O,disabled:h,children:[x.jsx(Zc.Provider,{scope:t,children:x.jsx(UI,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(L=>{I(U=>new Set(U).add(L))},[]),onNativeOptionRemove:f.useCallback(L=>{I(U=>{const T=new Set(U);return T.delete(L),T})},[]),children:n})}),D?x.jsxs(uS,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:N,onChange:L=>A(L.target.value),disabled:h,form:b,children:[N===void 0?x.jsx("option",{value:""}):null,Array.from(B)]},H):null]})})};Ub.displayName=wo;var zb="SelectTrigger",Bb=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=tu(n),i=Br(zb,n),a=i.disabled||r,l=de(t,i.onTriggerChange),c=eu(n),u=f.useRef("touch"),[d,h,p]=fS(m=>{const w=c().filter(g=>!g.disabled),y=w.find(g=>g.value===i.value),v=hS(w,m,y);v!==void 0&&i.onValueChange(v.value)}),b=m=>{a||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return x.jsx(Kw,{asChild:!0,...s,children:x.jsx(X.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":dS(i.value)?"":void 0,...o,ref:l,onClick:K(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&b(m)}),onPointerDown:K(o.onPointerDown,m=>{u.current=m.pointerType;const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:K(o.onKeyDown,m=>{const w=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(w&&m.key===" ")&&MI.includes(m.key)&&
vendor: 15,560 bytes, line 192
192(b(),m.preventDefault())})})})});Bb.displayName=zb;var Wb="SelectValue",Vb=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=Br(Wb,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,d=de(t,l.onValueNodeChange);return Xe(()=>{c(u)},[c,u]),x.jsx(X.span,{...a,ref:d,style:{pointerEvents:"none"},children:dS(l.value)?x.jsx(x.Fragment,{children:i}):s})});Vb.displayName=Wb;var BI="SelectIcon",Hb=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return x.jsx(X.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Hb.displayName=BI;var WI="SelectPortal",Kb=e=>x.jsx(Tc,{asChild:!0,...e});Kb.displayName=WI;var xo="SelectContent",qb=f.forwardRef((e,t)=>{const n=Br(xo,e.__scopeSelect),[r,o]=f.useState();if(Xe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Ft.createPortal(x.jsx(Gb,{scope:e.__scopeSelect,children:x.jsx(Zc.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),s):null}return x.jsx(Qb,{...e,ref:t})});qb.displayName=xo;var Yt=10,[Gb,Wr]=Ls(xo),VI="SelectContentImpl",HI=Ss("SelectContent.RemoveScroll"),Qb=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:w,...y}=e,v=Br(xo,n),[g,S]=f.useState(null),[_,C]=f.useState(null),E=de(t,F=>S(F)),[k,N]=f.useState(null),[A,O]=f.useState(null),D=eu(n),[B,I]=f.useState(!1),H=f.useRef(!1);f.useEffect(()=>{if(g)return Ob(g)},[g]),Rb();const L=f.useCallback(F=>{const[oe,...he]=D().map(J=>J.ref.current),[V]=he.slice(-1),re=document.activeElement;for(const J of F)if(J===re||(J==null||J.scrollIntoView({block:"nearest"}),J===oe&&_&&(_.scrollTop=0),J===V&&_&&(_.scrollTop=_.scrollHeight),J==null||J.focus(),document.activeElement!==re))return},[D,_]),U=f.useCallback(()=>L([k,g]),[L,k,g]);f.useEffect(()=>{B&&U()},[B,U]);const{onOpenChange:T,triggerPointerDownPosRef:P}=v;f.useEffect(()=>{if(g){let F={x:0,y:0};const oe=V=>{var re,J;F={x:Math.abs(Math.round(V.pageX)-(((re=P.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(V.pageY)-(((J=P.current)==null?void 0:J.y)??0))}},he=V=>{F.x<=10&&F.y<=10?V.preventDefault():g.contains(V.target)||T(!1),document.removeEventListener("pointermove",oe),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",he,{capture:!0})}}},[g,T,P]),f.useEffect(()=>{const F=()=>T(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[T]);const[$,q]=fS(F=>{const oe=D().filter(re=>!re.disabled),he=oe.find(re=>re.ref.current===document.activeElement),V=hS(oe,F,he);V&&setTimeout(()=>V.ref.current.focus())}),z=f.useCallback((F,oe,he)=>{const V=!H.current&&!he;(v.value!==void 0&&v.value===oe||V)&&(N(F),V&&(H.current=!0))},[v.value]),Q=f.useCallback(()=>g==null?void 0:g.focus(),[g]),Y=f.useCallback((F,oe,he)=>{const V=!H.current&&!he;(v.value!==void 0&&v.value===oe||V)&&O(F)},[v.value]),me=r==="popper"?Ff:Yb,ce=me===Ff?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:m,avoidCollisions:w}:{};return x.jsx(Gb,{scope:n,content:g,viewport:_,onViewportChange:C,itemRefCallback:z,selectedItem:k,onItemLeave:Q,itemTextRefCallback:Y,focusSelectedItem:U,selectedItemText:A,position:r,isPositioned:B,searchRef:$,children:x.jsx(yp,{as:HI,allowPinchZoom:!0,children:x.jsx(vp,{asChild:!0,trapped:v.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(o,F=>{var oe;(oe=v.trigger)==null||oe.focus({preventScroll:!0}),F.preventDefault()}),children:x.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:x.jsx(me,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:F=>F.preventDefault(),...y,...ce,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:K(y.onKeyDown,F=>{const oe=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!oe&&F.key.length===1&&q(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let V=D().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(F.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const re=F.target,J=V.indexOf(re);V=V.slice(J+1)}setTimeout(()=>L(V)),F.preventDefault()}})})})})})})});Qb.displayName=VI;var KI="SelectItemAlignedPosition",Yb=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Br(xo,n),i=Wr(xo,n),[a,l]=f.useState(null),[c,u]=f.useState(null),d=de(t,E=>u(E)),h=eu(n),p=f.useRef(!1),b=f.useRef(!0),{viewport:m,selectedItem:w,selectedItemText:y,focusSelectedItem:v}=i,g=f.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&w&&y){const E=s.trigger.getBoundingClientRect(),k=c.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),A=y.getBoundingClientRect();if(s.dir!=="rtl"){const re=A.left-k.left,J=N.left-re,Ee=E.left-J,Pe=E.width+Ee,ht=Math.max(Pe,k.width),st=window.innerWidth-Yt,hn=nc(J,[Yt,Math.max(Yt,st-ht)]);a.style.minWidth=Pe+"px",a.style.left=hn+"px"}else{const re=k.right-A.right,J=window.innerWidth-N.right-re,Ee=window.innerWidth-E.right-J,Pe=E.width+Ee,ht=Math.max(Pe,k.width),st=window.innerWidth-Yt,hn=nc(J,[Yt,Math.max(Yt,st-ht)]);a.style.minWidth=Pe+"px",a.style.right=hn+"px"}const O=h(),D=window.innerHeight-Yt*2,B=m.scrollHeight,I=window.getComputedStyle(c),H=parseInt(I.borderTopWidth,10),L=parseInt(I.paddingTop,10),U=parseInt(I.borderBottomWidth,10),T=parseInt(I.paddingBottom,10),P=H+L+B+T+U,$=Math.min(w.offsetHeight*5,P),q=window.getComputedStyle(m),z=parseInt(q.paddingTop,10),Q=parseInt(q.paddingBottom,10),Y=E.top+E.height/2-Yt,me=D-Y,ce=w.offsetHeight/2,F=w.offsetTop+ce,oe=H+L+F,he=P-oe;if(oe<=Y){const re=O.length>0&&w===O[O.length-1].ref.current;a.style.bottom="0px";const J=c.clientHeight-m.offsetTop-m.offsetHeight,Ee=Math.max(me,ce+(re?Q:0)+J+U),Pe=oe+Ee;a.style.height=Pe+"px"}else{const re=O.length>0&&w===O[0].ref.current;a.style.top="0px";const Ee=Math.max(Y,H+m.offsetTop+(re?z:0)+ce)+he;a.style.height=Ee+"px",m.scrollTop=oe-Y+m.offsetTop}a.style.margin=`${Yt}px 0`,a.style.minHeight=$+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,s.trigger,s.valueNode,a,c,m,w,y,s.dir,r]);Xe(()=>g(),[g]);const[S,_]=f.useState();Xe(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const C=f.useCallback(E=>{E&&b.current===!0&&(g(),v==null||v(),b.current=!1)},[g,v]);return x.jsx(GI,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:x.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:x.jsx(X.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Yb.displayName=KI;var qI="SelectPopperPosition",Ff=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yt,...s}=e,i=tu(n);return x.jsx(qw,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ff.displayName=qI;var[GI,wp]=Ls(xo,{}),Uf="SelectViewport",Xb=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Wr(Uf,n),i=wp(Uf,n),a=de(t,s.onViewportChange),l=f.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(Zc.Slot,{scope:n,children:x.jsx(X.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const b=window.innerHeight-Yt*2,m=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),y=Math.max(m,w);if(y<b){const v=y+p,g=Math.min(b,v),S=v-g;d.style.height=g+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Xb.displayName=Uf;var Jb="SelectGroup",[QI,YI]=Ls(Jb),XI=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=jr();return x.jsx(QI,{scope:n,id:o,children:x.jsx(X.div,{role:"group","aria-labelledby":o,...r,ref:t})})});XI.displayName=Jb;var Zb="SelectLabel",eS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=YI(Zb,n);return x.jsx(X.div,{id:o.id,...r,ref:t})});eS.displayName=Zb;var oc="SelectItem",[JI,tS]=Ls(oc),nS=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Br(oc,n),l=Wr(oc,n),c=a.value===r,[u,d]=f.useState(s??""),[h,p]=f.useState(!1),b=de(t,v=>{var g;return(g=l.itemRefCallback)==null?void 0:g.call(l,v,r,o)}),m=jr(),w=f.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(JI,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:f.useCallback(v=>{d(g=>g||((v==null?void 0:v.textContent)??"").trim())},[]),children:x.jsx(Zc.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:x.jsx(X.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:K(i.onFocus,()=>p(!0)),onBlur:K(i.onBlur,()=>p(!1)),onClick:K(i.onClick,()=>{w.current!=="mouse"&&y()}),onPointerUp:K(i.onPointerUp,()=>{w.current==="mouse"&&y()}),onPointerDown:K(i.onPointerDown,v=>{w.current=v.pointerType}),onPointerMove:K(i.onPointerMove,v=>{var g;w.current=v.pointerType,o?(g=l.onItemLeave)==null||g.call(l):w.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(i.onPointerLeave,v=>{var g;v.currentTarget===document.activeElement&&((g=l.onItemLeave)==null||g.call(l))}),onKeyDown:K(i.onKeyDown,v=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(LI.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});nS.displayName=oc;var li="SelectItemText",rS=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Br(li,n),a=Wr(li,n),l=tS(li,n),c=zI(li,n),[u,d]=f.useState(null),h=de(t,y=>d(y),l.onItemTextChange,y=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,b=f.useMemo(()=>x.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:w}=c;return Xe(()=>(m(b),()=>w(b)),[m,w,b]),x.jsxs(x.Fragment,{children:[x.jsx(X.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ft.createPortal(s.children,i.valueNode):null]})});rS.displayName=li;var oS="SelectItemIndicator",sS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tS(oS,n).isSelected?x.jsx(X.span,{"aria-hidden":!0,...r,ref:t}):null});sS.displayName=oS;var zf="SelectScrollUpButton",iS=f.forwardRef((e,t)=>{const n=Wr(zf,e.__scopeSelect),r=wp(zf,e.__scopeSelect),[o,s]=f.useState(!1),i=de(t,r.onScrollButtonChange);return Xe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(lS,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});iS.displayName=zf;var Bf="SelectScrollDownButton",aS=f.forwardRef((e,t)=>{const n=Wr(Bf,e.__scopeSelect),r=wp(Bf,e.__scopeSelect),[o,s]=f.useState(!1),i=de(t,r.onScrollButtonChange);return Xe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(lS,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});aS.displayName=Bf;var lS=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Wr("SelectScrollButton",n),i=f.useRef(null),a=eu(n),l=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Xe(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),x.jsx(X.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{l()})})}),ZI="SelectSeparator",cS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(X.div,{"aria-hidden":!0,...r,ref:t})});cS.displayName=ZI;var Wf="SelectArrow",eD=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tu(n),s=Br(Wf,n),i=Wr(Wf,n);return s.open&&i.position==="popper"?x.jsx(Gw,{...o,...r,ref:t}):null});eD.displayName=Wf;var tD="SelectBubbleInput",uS=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),s=de(r,o),i=Vx(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),x.jsx(X.select,{...n,style:{...W0,...n.style},ref:s,defaultValue:t})});uS.displayName=tD;function dS(e){return e===""||e===void 0}function fS(e){const t=Ht(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function hS(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=nD(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function nD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rD=Ub,pS=Bb,oD=Vb,sD=Hb,iD=Kb,mS=qb,aD=Xb,gS=eS,vS=nS,lD=rS,cD=sS,yS=iS,wS=aS,xS=cS;const uD=rD,dD=oD,bS=f.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(pS,{ref:r,className:le("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
192ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,x.jsx(sD,{asChild:!0,children:x.jsx(fw,{className:"h-4 w-4 opacity-50"})})]}));bS.displayName=pS.displayName;const SS=f.forwardRef(({className:e,...t},n)=>x.jsx(yS,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(fk,{className:"h-4 w-4"})}));SS.displayName=yS.displayName;const _S=f.forwardRef(({className:e,...t},n)=>x.jsx(wS,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(fw,{className:"h-4 w-4"})}));_S.displayName=wS.displayName;const ES=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>x.jsx(iD,{children:x.jsxs(mS,{ref:o,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[x.jsx(SS,{}),x.jsx(aD,{className:le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(_S,{})]})}));ES.displayName=mS.displayName;const fD=f.forwardRef(({className:e,...t},n)=>x.jsx(gS,{ref:n,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));fD.displayName=gS.displayName;const Sl=f.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(vS,{ref:r,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(cD,{children:x.jsx(dk,{className:"h-4 w-4"})})}),x.jsx(lD,{children:t})]}));Sl.displayName=vS.displayName;const hD=f.forwardRef(({className:e,...t},n)=>x.jsx(xS,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));hD.displayName=xS.displayName;var nu="Dialog",[CS,kS]=On(nu),[pD,fn]=CS(nu),TS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=f.useRef(null),l=f.useRef(null),[c,u]=vo({prop:r,defaultProp:o??!1,onChange:s,caller:nu});return x.jsx(pD,{scope:t,triggerRef:a,contentRef:l,contentId:jr(),titleId:jr(),descriptionId:jr(),open:c,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(d=>!d),[u]),modal:i,children:n})};TS.displayName=nu;var PS="DialogTrigger",RS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(PS,n),s=de(t,o.triggerRef);return x.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Sp(o.open),...r,ref:s,onClick:K(e.onClick,o.onOpenToggle)})});RS.displayName=PS;var xp="DialogPortal",[mD,AS]=CS(xp,{forceMount:void 0}),NS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=fn(xp,t);return x.jsx(mD,{scope:t,forceMount:n,children:f.Children.map(r,i=>x.jsx(Eo,{present:n||s.open,children:x.jsx(Tc,{asChild:!0,container:o,children:i})}))})};NS.displayName=xp;var sc="DialogOverlay",OS=f.forwardRef((e,t)=>{const n=AS(sc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=fn(sc,e.__scopeDialog);return s.modal?x.jsx(Eo,{present:r||s.open,children:x.jsx(vD,{...o,ref:t})}):null});OS.displayName=sc;var gD=Ss("DialogOverlay.RemoveScroll"),vD=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(sc,n);return x.jsx(yp,{as:gD,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(X.div,{"data-state":Sp(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bo="DialogContent",jS=f.forwardRef((e,t)=>
vendor: 4,144 bytes, lines 192-196
192{const n=AS(bo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=fn(bo,e.__scopeDialog);return x.jsx(Eo,{present:r||s.open,children:s.modal?x.jsx(yD,{...o,ref:t}):x.jsx(wD,{...o,ref:t})})});jS.displayName=bo;var yD=f.forwardRef((e,t)=>{const n=fn(bo,e.__scopeDialog),r=f.useRef(null),o=de(t,n.contentRef,r);return f.useEffect(()=>{const s=r.current;if(s)return Ob(s)},[]),x.jsx(IS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault())})}),wD=f.forwardRef((e,t)=>{const n=fn(bo,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return x.jsx(IS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),IS=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=fn(bo,n),l=f.useRef(null),c=de(t,l);return Rb(),x.jsxs(x.Fragment,{children:[x.jsx(vp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(aa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Sp(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(bD,{titleId:a.titleId}),x.jsx(_D,{contentRef:l,descriptionId:a.descriptionId})]})]})}),bp="DialogTitle",DS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(bp,n);return x.jsx(X.h2,{id:o.titleId,...r,ref:t})});DS.displayName=bp;var MS="DialogDescription",LS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(MS,n);return x.jsx(X.p,{id:o.descriptionId,...r,ref:t})});LS.displayName=MS;var $S="DialogClose",FS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn($S,n);return x.jsx(X.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});FS.displayName=$S;function Sp(e){return e?"open":"closed"}var US="DialogTitleWarning",[xD,zS]=vC(US,{contentName:bo,titleName:bp,docsSlug:"dialog"}),bD=({titleId:e})=>{const t=zS(US),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
193
194If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
195
196For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},SD="DialogDescriptionWarning",_D=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zS(SD).contentName}}.`;return f.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ED=TS,CD=RS,kD=NS,TD=OS,PD=jS,RD=DS,AD=LS,BS=FS,WS="AlertDialog",[ND,rL]=On(WS,[kS]),Zn=kS(),VS=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zn(t);return x.jsx(ED,{...r,...n,modal:!0})};VS.displayName=WS;var OD="AlertDialogTrigger",HS=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zn(n);return x.jsx(CD,{...o,...r,ref:t})});HS.displayName=OD;var jD="AlertDialogPortal",KS=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zn(t);return x.jsx(kD,{...r,...n})};KS.displayName=jD;var ID="AlertDialogOverlay",qS=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zn(n);return x.jsx(TD,{...o,...r,ref:t})});qS.displayName=ID;var ss="AlertDialogContent",[DD,MD]=ND(ss),LD=$0("AlertDialogContent"),GS=f.forwardRef((e,t)=>
196{const{__scopeAlertDialog:n,children:r,...o}=e,s=Zn(n),i=f.useRef(null),a=de(t,i),l=f.useRef(null);return x.jsx(xD,{contentName:ss,titleName:QS,docsSlug:"alert-dialog",children:x.jsx(DD,{scope:n,cancelRef:l,children:x.jsxs(PD,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:K(o.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[x.jsx(LD,{children:r}),x.jsx(FD,{contentRef:i})]})})})});GS.displayName=ss;var QS="AlertDialogTitle",YS=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zn(n);return x.jsx(RD,{...o,...r,ref:t})});YS.displayName=QS;var XS="AlertDialogDescription",JS=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zn(n);return x.jsx(AD,{...o,...r,ref:t})});JS.displayName=XS;var $D="AlertDialogAction",ZS=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zn(n);return x.jsx(BS,{...o,...r,ref:t})});ZS.displayName=$D;var e1="AlertDialogCancel",t1=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=MD(e1,n),s=Zn(n),i=de(t,o);return x.jsx(BS,{...s,...r,ref:i})});t1.displayName=e1;var FD=({contentRef:e})=>{const t=`\`${ss}\` requires a description for the component to be accessible for screen reader users.
197
198You can add a description to the \`${ss}\` by passing a \`${XS}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
199
200Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ss}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
201
202For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},UD=VS,zD=HS,BD=KS,n1=qS,r1=GS,o1=ZS,s1=t1,i1=YS,a1=JS;const WD=UD,VD=zD,HD=BD,l1=f.forwardRef(({className:e,...t},n)=>x.jsx(n1,{className:le("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,ref:n}));l1.displayName=n1.displayName;const c1=f.forwardRef(({className:e,...t},n)=>x.jsxs(HD,{children:[x.jsx(l1,{}),x.jsx(r1,{ref:n,className:le("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:rounded-lg",e),...t})]}));c1.displayName=r1.displayName;const u1=({className:e,...t})=>x.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});u1.displayName="AlertDialogHeader";const d1=({className:e,...t})=>x.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});d1.displayName="AlertDialogFooter";const f1=f.forwardRef(({className:e,...t},n)=>x.jsx(i1,{ref:n,className:le("text-lg font-semibold",e),...t}));f1.displayName=i1.displayName;const h1=f.forwardRef(({className:e,...t},n)=>x.jsx(a1,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));h1.displayName=a1.displayName;const p1=f.forwardRef(({className:e,...t},n)=>x.jsx(o1,{ref:n,className:le(pp(),e),...t}));p1.displayName=o1.displayName;const m1=f.forwardRef(({className:e,...t},n)=>x.jsx(s1,{ref:n,className:le(pp({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));m1.displayName=s1.displayName;function KD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const ru=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $s(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function _p(e){return"nodeType"in e}function _t(e){var t,n;return e?$s(e)?e:_p(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ep(e){const{Document:t}=_t(e);return e instanceof t}function pa(e){return $s(e)?!1:e instanceof _t(e).HTMLElement}function g1(e){return e instanceof _t(e).SVGElement}function Fs(e){return e?$s(e)?e.document:_p(e)?Ep(e)?e:pa(e)||g1(e)?e.ownerDocument:document:document:document}const Nn=ru?f.useLayoutEffect:f.useEffect;function Cp(e){const t=f.useRef(e);return Nn(()=>{t.current=e}),f.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function qD(){const e=f.useRef(null),t=f.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=f.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}
202function Yi(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return Nn(()=>{n.current!==e&&(n.current=e)},t),n}function ma(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ic(e){const t=Cp(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Vf(e){const t=f.useRef();return f.useEffect(()=>{t.current=e},[e]),t.current}let ld={};function ga(e,t){return f.useMemo(()=>{if(t)return t;const n=ld[e]==null?0:ld[e]+1;return ld[e]=n,e+"-"+n},[e,t])}function v1(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[l,c]of a){const u=s[l];u!=null&&(s[l]=u+e*c)}return s},{...t})}}const is=v1(1),Xi=v1(-1);function GD(e){return"clientX"in e&&"clientY"in e}function kp(e){if(!e)return!1;const{KeyboardEvent:t}=_t(e.target);return t&&e instanceof t}function QD(e){if(!e)return!1;const{TouchEvent:t}=_t(e.target);return t&&e instanceof t}function Hf(e){if(QD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return GD(e)?{x:e.clientX,y:e.clientY}:null}const Ji=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ji.Translate.toString(e),Ji.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Zg="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function YD(e){return e.matches(Zg)?e:e.querySelector(Zg)}const XD={display:"none"};function JD(e){let{id:t,value:n}=e;return j.createElement("div",{id:t,style:XD},n)}function ZD(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return j.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function e2(){const[e,t]=f.useState("");return{announce:f.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const y1=f.createContext(null);function t2(e){const t=f.useContext(y1);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function n2(){const[e]=f.useState(()=>new Set),t=f.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[f.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const r2={draggable:`
203    To pick up a draggable item, press the space bar.
204    While dragging, use the arrow keys to move the item.
205    Press space again to drop the item in its new position, or press escape to cancel.
206  `},o2={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function s2(e){let{announcements:t=o2,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=r2}=e;const{announce:s,announcement:i}=e2(),a=ga("DndLiveRegion"),[l,c]=f.useState(!1);if(f.useEffect(()=>{c(!0)},[]),t2(f.useMemo(()=>({onDragStart(d){let{active:h}=d;s(t.onDragStart({active:h}))},onDragMove(d){let{active:h,over:p}=d;t.onDragMove&&s(t.onDragMove({active:h,over:p}))},onDragOver(d){let{active:h,over:p}=d;s(t.onDragOver({active:h,over:p}))},onDragEnd(d){let{active:h,over:p}=d;s(t.onDragEnd({active:h,over:p}))},onDragCancel(d){let{active:h,over:p}=d;
206s(t.onDragCancel({active:h,over:p}))}}),[s,t])),!l)return null;const u=j.createElement(j.Fragment,null,j.createElement(JD,{id:r,value:o.draggable}),j.createElement(ZD,{id:a,announcement:i}));return n?Ft.createPortal(u,n):u}var Fe;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Fe||(Fe={}));function ac(){}function ev(e,t){return f.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function i2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const un=Object.freeze({x:0,y:0});function w1(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x1(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function a2(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function tv(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function b1(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function nv(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const l2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=nv(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=w1(nv(l),o);s.push({id:a,data:{droppableContainer:i,value:c}})}}return s.sort(x1)},c2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=tv(t),s=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=tv(l),u=o.reduce((h,p,b)=>h+w1(c[b],p),0),d=Number((u/4).toFixed(4));s.push({id:a,data:{droppableContainer:i,value:d}})}}return s.sort(x1)};function u2(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const l=t.width*t.height,c=e.width*e.height,u=i*a,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const d2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const l=u2(a,t);l>0&&o.push({id:i,data:{droppableContainer:s,value:l}})}}return o.sort(a2)};function f2(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function S1(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:un}function h2(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const p2=h2(1);function m2(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function g2(e,t,n){const r=m2(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=s?e.height/s:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const v2={ignoreTransform:!1};function Us(e,t){t===void 0&&(t=v2);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=_t(e).getComputedStyle(e);c&&(n=g2(n,c,u))}const{top:r,left:o,width:s,height:i,bottom:a,right:l}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:l}}function rv(e){return Us(e,{ignoreTransform:!0})}function y2(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function w2(e,t){return t===void 0&&(t=_t(e).getComputedStyle(e)),t.position==="fixed"}function x2(e,t){t===void 0&&(t=_t(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function ou(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Ep(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!pa(o)||g1(o)||n.includes(o))return n;const s=_t(e).getComputedStyle(o);
206return o!==e&&x2(o,s)&&n.push(o),w2(o,s)?n:r(o.parentNode)}return e?r(e):n}function _1(e){const[t]=ou(e,1);return t??null}function cd(e){return!ru||!e?null:$s(e)?e:_p(e)?Ep(e)||e===Fs(e).scrollingElement?window:pa(e)?e:null:null}function E1(e){return $s(e)?e.scrollX:e.scrollLeft}function C1(e){return $s(e)?e.scrollY:e.scrollTop}function Kf(e){return{x:E1(e),y:C1(e)}}var Ke;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ke||(Ke={}));function k1(e){return!ru||!e?!1:e===document.scrollingElement}function T1(e){const t={x:0,y:0},n=k1(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const b2={x:.2,y:.2};function S2(e,t,n,r,o){let{top:s,left:i,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=b2);const{isTop:c,isBottom:u,isLeft:d,isRight:h}=T1(e),p={x:0,y:0},b={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!c&&s<=t.top+m.height?(p.y=Ke.Backward,b.y=r*Math.abs((t.top+m.height-s)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Ke.Forward,b.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!h&&a>=t.right-m.width?(p.x=Ke.Forward,b.x=r*Math.abs((t.right-m.width-a)/m.width)):!d&&i<=t.left+m.width&&(p.x=Ke.Backward,b.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:b}}function _2(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function P1(e){return e.reduce((t,n)=>is(t,Kf(n)),un)}function E2(e){return e.reduce((t,n)=>t+E1(n),0)}function C2(e){return e.reduce((t,n)=>t+C1(n),0)}function k2(e,t){if(t===void 0&&(t=Us),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);_1(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const T2=[["x",["left","right"],E2],["y",["top","bottom"],C2]];class Tp{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ou(n),o=P1(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of T2)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=o[s]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Si{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function P2(e){const{EventTarget:t}=_t(e);return e instanceof t?e:Fs(e)}function ud(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Dt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Dt||(Dt={}));function ov(e){e.preventDefault()}function R2(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ue||(ue={}));const R1={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},A2=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class Pp{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Si(Fs(n)),this.windowListeners=new Si(_t(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&k2(r),n(un)}handleKeyDown(t){if(kp(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=R1,coordinateGetter:i=A2,scrollBehavior:a="smooth"}
206=o,{code:l}=t;if(s.end.includes(l)){this.handleEnd(t);return}if(s.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:un;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const h=Xi(d,u),p={x:0,y:0},{scrollableAncestors:b}=r.current;for(const m of b){const w=t.code,{isTop:y,isRight:v,isLeft:g,isBottom:S,maxScroll:_,minScroll:C}=T1(m),E=_2(m),k={x:Math.min(w===ue.Right?E.right-E.width/2:E.right,Math.max(w===ue.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(w===ue.Down?E.bottom-E.height/2:E.bottom,Math.max(w===ue.Down?E.top:E.top+E.height/2,d.y))},N=w===ue.Right&&!v||w===ue.Left&&!g,A=w===ue.Down&&!S||w===ue.Up&&!y;if(N&&k.x!==d.x){const O=m.scrollLeft+h.x,D=w===ue.Right&&O<=_.x||w===ue.Left&&O>=C.x;if(D&&!h.y){m.scrollTo({left:O,behavior:a});return}D?p.x=m.scrollLeft-O:p.x=w===ue.Right?m.scrollLeft-_.x:m.scrollLeft-C.x,p.x&&m.scrollBy({left:-p.x,behavior:a});break}else if(A&&k.y!==d.y){const O=m.scrollTop+h.y,D=w===ue.Down&&O<=_.y||w===ue.Up&&O>=C.y;if(D&&!h.x){m.scrollTo({top:O,behavior:a});return}D?p.y=m.scrollTop-O:p.y=w===ue.Down?m.scrollTop-_.y:m.scrollTop-C.y,p.y&&m.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,is(Xi(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Pp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=R1,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function sv(e){return!!(e&&"distance"in e)}function iv(e){return!!(e&&"delay"in e)}class Rp{constructor(t,n,r){var o;r===void 0&&(r=P2(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=Fs(i),this.documentListeners=new Si(this.document),this.listeners=new Si(r),this.windowListeners=new Si(_t(i)),this.initialCoordinates=(o=Hf(s))!=null?o:un,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.DragStart,ov),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),this.windowListeners.add(Dt.ContextMenu,ov),this.documentListeners.add(Dt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(iv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(sv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Dt.Click,R2,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const l=(n=Hf(t))!=null?n:un,c=Xi(o,l);if(!r&&a){if(sv(a)){if(a.tolerance!=null&&ud(c,a.tolerance))return this.handleCancel();if(ud(c,a.distance))return this.handleStart()}if(iv(a)&&ud(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const N2={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ap extends Rp{constructor(t){const{event:n}=t,r=Fs(n.target);super(t,N2,r)}}Ap.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const O2={move:{name:"mousemove"},end:{name:"mouseup"}};var qf;(function(e){e[e.RightClick=2]="RightClick"})(qf||(qf={}));
206class j2 extends Rp{constructor(t){super(t,O2,Fs(t.event.target))}}j2.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===qf.RightClick?!1:(r==null||r({event:n}),!0)}}];const dd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class I2 extends Rp{constructor(t){super(t,dd)}static setup(){return window.addEventListener(dd.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(dd.move.name,t)};function t(){}}}I2.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var _i;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(_i||(_i={}));var lc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(lc||(lc={}));function D2(e){let{acceleration:t,activator:n=_i.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=lc.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:h}=e;const p=L2({delta:d,disabled:!s}),[b,m]=qD(),w=f.useRef({x:0,y:0}),y=f.useRef({x:0,y:0}),v=f.useMemo(()=>{switch(n){case _i.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _i.DraggableRect:return o}},[n,o,l]),g=f.useRef(null),S=f.useCallback(()=>{const C=g.current;if(!C)return;const E=w.current.x*y.current.x,k=w.current.y*y.current.y;C.scrollBy(E,k)},[]),_=f.useMemo(()=>a===lc.TreeOrder?[...c].reverse():c,[a,c]);f.useEffect(()=>{if(!s||!c.length||!v){m();return}for(const C of _){if((r==null?void 0:r(C))===!1)continue;const E=c.indexOf(C),k=u[E];if(!k)continue;const{direction:N,speed:A}=S2(C,k,v,t,h);for(const O of["x","y"])p[O][N[O]]||(A[O]=0,N[O]=0);if(A.x>0||A.y>0){m(),g.current=C,b(S,i),w.current=A,y.current=N;return}}w.current={x:0,y:0},y.current={x:0,y:0},m()},[t,S,r,m,s,i,JSON.stringify(v),JSON.stringify(p),b,c,_,u,JSON.stringify(h)])}const M2={x:{[Ke.Backward]:!1,[Ke.Forward]:!1},y:{[Ke.Backward]:!1,[Ke.Forward]:!1}};function L2(e){let{delta:t,disabled:n}=e;const r=Vf(t);return ma(o=>{if(n||!r||!o)return M2;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ke.Backward]:o.x[Ke.Backward]||s.x===-1,[Ke.Forward]:o.x[Ke.Forward]||s.x===1},y:{[Ke.Backward]:o.y[Ke.Backward]||s.y===-1,[Ke.Forward]:o.y[Ke.Forward]||s.y===1}}},[n,t,r])}function $2(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return ma(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function F2(e,t){return f.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var Zi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Zi||(Zi={}));var Gf;(function(e){e.Optimized="optimized"})(Gf||(Gf={}));const av=new Map;function U2(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=f.useState(null),{frequency:a,measure:l,strategy:c}=o,u=f.useRef(e),d=w(),h=Yi(d),p=f.useCallback(function(y){y===void 0&&(y=[]),!h.current&&i(v=>v===null?y:v.concat(y.filter(g=>!v.includes(g))))},[h]),b=f.useRef(null),m=ma(y=>{if(d&&!n)return av;if(!y||y===av||u.current!==e||s!=null){const v=new Map;for(let g of e){if(!g)continue;if(s&&s.length>0&&!s.includes(g.id)&&g.rect.current){v.set(g.id,g.rect.current);continue}const S=g.node.current,_=S?new Tp(l(S),S):null;g.rect.current=_,_&&v.set(g.id,_)}return v}return y},[e,s,n,d,l]);return f.useEffect(()=>{u.current=e},[e]),f.useEffect(()=>{d||p()},[n,d]),f.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),f.useEffect(()=>{d||typeof a!="number"||b.current!==null||(b.current=setTimeout(()=>{p(),b.current=null},a))},[a,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:s!=null};function w(){switch(c){case Zi.Always:return!1;case Zi.BeforeDragging:return n;default:return!n}}}function A1(e,t){return ma(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function z2(e,t){return A1(e,t)}function B2(e){let{callback:t,disabled:n}=e;const r=Cp(t),o=f.useMemo(()=>
206{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return f.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function su(e){let{callback:t,disabled:n}=e;const r=Cp(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return f.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function W2(e){return new Tp(Us(e),e)}function lv(e,t,n){t===void 0&&(t=W2);const[r,o]=f.useState(null);function s(){o(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const i=B2({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){s();break}}}}),a=su({callback:s});return Nn(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function V2(e){const t=A1(e);return S1(e,t)}const cv=[];function H2(e){const t=f.useRef(e),n=ma(r=>e?r&&r!==cv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ou(e):cv,[e]);return f.useEffect(()=>{t.current=e},[e]),n}function K2(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(s=>{const i=cd(s.target);i&&n(a=>a?(a.set(i,Kf(i)),new Map(a)):null)},[]);return f.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(l=>{const c=cd(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,Kf(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(l=>{const c=cd(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>is(s,i),un):P1(e):un,[e,t])}function uv(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null},t),f.useEffect(()=>{const r=e!==un;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Xi(e,n.current):un}function q2(e){f.useEffect(()=>{if(!ru)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function G2(e,t){return f.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function N1(e){return f.useMemo(()=>e?y2(e):null,[e])}const dv=[];function Q2(e,t){t===void 0&&(t=Us);const[n]=e,r=N1(n?_t(n):null),[o,s]=f.useState(dv);function i(){s(()=>e.length?e.map(l=>k1(l)?r:new Tp(t(l),l)):dv)}const a=su({callback:i});return Nn(()=>{a==null||a.disconnect(),i(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function Y2(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return pa(t)?t:e}function X2(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(c=>{for(const{target:u}of c)if(pa(u)){r(d=>{const h=t(u);return d?{...d,width:h.width,height:h.height}:h});break}},[t]),s=su({callback:o}),i=f.useCallback(c=>{const u=Y2(c);s==null||s.disconnect(),u&&(s==null||s.observe(u)),r(u?t(u):null)},[t,s]),[a,l]=ic(i);return f.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const J2=[{sensor:Ap,options:{}},{sensor:Pp,options:{}}],Z2={current:{}},_l={draggable:{measure:rv},droppable:{measure:rv,strategy:Zi.WhileDragging,frequency:Gf.Optimized},dragOverlay:{measure:Us}};class Ei extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const eM={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ei,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ac},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:_l,measureDroppableContainers:ac,windowRect:null,measuringScheduled:!1},tM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ac,draggableNodes:new Map,over:null,measureDroppableContainers:ac},iu=f.createContext(tM),O1=f.createContext(eM);function nM(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ei}}}function rM(e,t){switch(t.type){case Fe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Fe.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Fe.DragEnd:case Fe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Fe.RegisterDroppable:{const{element:n}=t,{id:r}
206=n,o=new Ei(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Fe.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new Ei(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Fe.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Ei(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function oM(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(iu),s=Vf(r),i=Vf(n==null?void 0:n.id);return f.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!kp(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=YD(u);if(d){d.focus();break}}})}},[r,t,o,i,s]),null}function sM(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function iM(e){return f.useMemo(()=>({draggable:{..._l.draggable,...e==null?void 0:e.draggable},droppable:{..._l.droppable,...e==null?void 0:e.droppable},dragOverlay:{..._l.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function aM(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=f.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Nn(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=S1(u,r);if(i||(d.x=0),a||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=_1(c);h&&h.scrollBy({top:d.y,left:d.x})}},[t,i,a,r,n])}const j1=f.createContext({...un,scaleX:1,scaleY:1});var hr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(hr||(hr={}));const lM=f.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:l=!0,children:c,sensors:u=J2,collisionDetection:d=d2,measuring:h,modifiers:p,...b}=t;const m=f.useReducer(rM,void 0,nM),[w,y]=m,[v,g]=n2(),[S,_]=f.useState(hr.Uninitialized),C=S===hr.Initialized,{draggable:{active:E,nodes:k,translate:N},droppable:{containers:A}}=w,O=E!=null?k.get(E):null,D=f.useRef({initial:null,translated:null}),B=f.useMemo(()=>{var De;return E!=null?{id:E,data:(De=O==null?void 0:O.data)!=null?De:Z2,rect:D}:null},[E,O]),I=f.useRef(null),[H,L]=f.useState(null),[U,T]=f.useState(null),P=Yi(b,Object.values(b)),$=ga("DndDescribedBy",i),q=f.useMemo(()=>A.getEnabled(),[A]),z=iM(h),{droppableRects:Q,measureDroppableContainers:Y,measuringScheduled:me}=U2(q,{dragging:C,dependencies:[N.x,N.y],config:z.droppable}),ce=$2(k,E),F=f.useMemo(()=>U?Hf(U):null,[U]),oe=cu(),he=z2(ce,z.draggable.measure);aM({activeNode:E!=null?k.get(E):null,config:oe.layoutShiftCompensation,initialRect:he,measure:z.draggable.measure});const V=lv(ce,z.draggable.measure,he),re=lv(ce?ce.parentElement:null),J=f.useRef({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ee=A.getNodeFor((n=J.current.over)==null?void 0:n.id),Pe=X2({measure:z.dragOverlay.measure}),ht=(r=Pe.nodeRef.current)!=null?r:ce,st=C?(o=Pe.rect)!=null?o:V:null,hn=!!(Pe.nodeRef.current&&Pe.rect),er=V2(hn?null:V),pn=N1(ht?_t(ht):null),Kt=H2(C?Ee??ce:null),mn=Q2(Kt),Vr=sM(p,{transform:{x:N.x-er.x,y:N.y-er.y,scaleX:1,scaleY:1},activatorEvent:U,active:B,activeNodeRect:V,containerNodeRect:re,draggingNodeRect:st,over:J.current.over,overlayNodeRect:Pe.rect,scrollableAncestors:Kt,scrollableAncestorRects:mn,windowRect:pn}),gn=F?is(F,N):null,va=K2(Kt),au=uv(va),pt=uv(va,[V]),Et=is(Vr,au),tr=st?p2(st,Vr):null,Hr=B&&tr?d({active:B,collisionRect:tr,droppableRects:Q,droppableContainers:q,pointerCoordinates:gn}):null,Kr=b1(Hr,"id"),[vn,zs]=f.useState(null),Bs=hn?Vr:is(Vr,pt),nr=f2(Bs,(s=vn==null?void 0:vn.rect)!=null?s:null,V),ko=f.useRef(null),In=f.useCallback((De,Re)=>{let{sensor:it,options:G}=Re;if(I.current==null)return;const te=k.get(I.current);if(!te)return;const se=De.nativeEvent,Ae=new it({active:I.current,activeNode:te,event:se,options:G,context:J,onAbort(ve){if(!k.get(ve))return;const{onDragAbort:Ne}=P.current,We={id:ve};Ne==null||Ne(We),v({type:"onDragAbort",event:We})},onPending(ve,Je,Ne,We){if(!k.get(ve))return;const{onDragPending:Vs}=P.current,rr={id:ve,constraint:Je,initialCoordinates:Ne,offset:We};Vs==null||Vs(rr),v({type:"onDragPending",event:rr})},onStart(ve){const Je=I.current;if(Je==null)return;const Ne=k.get(Je);if(!Ne)return;const{onDragStart:We}=P.current,Ws={activatorEvent:se,active:{id:Je,data:Ne.data,rect:D}};Ft.unstable_batchedUpdates(()=>{We==null||We(Ws),_(hr.Initializing),y({type:Fe.DragStart,initialCoordinates:ve,active:Je}),v({type:"onDragStart",event:Ws}),L(ko.current),T(se)})},onMove(ve){y({type:Fe.DragMove,coordinates:ve})},onEnd:Be(Fe.DragEnd),onCancel:Be(Fe.DragCancel)});ko.current=Ae;function Be(ve){return async function(){const{active:Ne,collisions:We,over:Ws,scrollAdjustedTranslate:Vs}=J.current;let rr=null;if(Ne&&Vs){const{cancelDrop:Hs}=P.current;rr={activatorEvent:se,active:Ne,collisions:We,delta:Vs,over:Ws},ve===Fe.DragEnd&&typeof Hs=="function"&&await Promise.resolve(Hs(rr))&&(ve=Fe.DragCancel)}I.current=null,Ft.unstable_batchedUpdates(()=>{y({type:ve}
206),_(hr.Uninitialized),zs(null),L(null),T(null),ko.current=null;const Hs=ve===Fe.DragEnd?"onDragEnd":"onDragCancel";if(rr){const uu=P.current[Hs];uu==null||uu(rr),v({type:Hs,event:rr})}})}}},[k]),lu=f.useCallback((De,Re)=>(it,G)=>{const te=it.nativeEvent,se=k.get(G);if(I.current!==null||!se||te.dndKit||te.defaultPrevented)return;const Ae={active:se};De(it,Re.options,Ae)===!0&&(te.dndKit={capturedBy:Re.sensor},I.current=G,In(it,Re))},[k,In]),ya=F2(u,lu);q2(u),Nn(()=>{V&&S===hr.Initializing&&_(hr.Initialized)},[V,S]),f.useEffect(()=>{const{onDragMove:De}=P.current,{active:Re,activatorEvent:it,collisions:G,over:te}=J.current;if(!Re||!it)return;const se={active:Re,activatorEvent:it,collisions:G,delta:{x:Et.x,y:Et.y},over:te};Ft.unstable_batchedUpdates(()=>{De==null||De(se),v({type:"onDragMove",event:se})})},[Et.x,Et.y]),f.useEffect(()=>{const{active:De,activatorEvent:Re,collisions:it,droppableContainers:G,scrollAdjustedTranslate:te}=J.current;if(!De||I.current==null||!Re||!te)return;const{onDragOver:se}=P.current,Ae=G.get(Kr),Be=Ae&&Ae.rect.current?{id:Ae.id,rect:Ae.rect.current,data:Ae.data,disabled:Ae.disabled}:null,ve={active:De,activatorEvent:Re,collisions:it,delta:{x:te.x,y:te.y},over:Be};Ft.unstable_batchedUpdates(()=>{zs(Be),se==null||se(ve),v({type:"onDragOver",event:ve})})},[Kr]),Nn(()=>{J.current={activatorEvent:U,active:B,activeNode:ce,collisionRect:tr,collisions:Hr,droppableRects:Q,draggableNodes:k,draggingNode:ht,draggingNodeRect:st,droppableContainers:A,over:vn,scrollableAncestors:Kt,scrollAdjustedTranslate:Et},D.current={initial:st,translated:tr}},[B,ce,Hr,tr,k,ht,st,Q,A,vn,Kt,Et]),D2({...oe,delta:N,draggingRect:tr,pointerCoordinates:gn,scrollableAncestors:Kt,scrollableAncestorRects:mn});const wa=f.useMemo(()=>({active:B,activeNode:ce,activeNodeRect:V,activatorEvent:U,collisions:Hr,containerNodeRect:re,dragOverlay:Pe,draggableNodes:k,droppableContainers:A,droppableRects:Q,over:vn,measureDroppableContainers:Y,scrollableAncestors:Kt,scrollableAncestorRects:mn,measuringConfiguration:z,measuringScheduled:me,windowRect:pn}),[B,ce,V,U,Hr,re,Pe,k,A,Q,vn,Y,Kt,mn,z,me,pn]),xa=f.useMemo(()=>({activatorEvent:U,activators:ya,active:B,activeNodeRect:V,ariaDescribedById:{draggable:$},dispatch:y,draggableNodes:k,over:vn,measureDroppableContainers:Y}),[U,ya,B,V,y,$,k,vn,Y]);return j.createElement(y1.Provider,{value:g},j.createElement(iu.Provider,{value:xa},j.createElement(O1.Provider,{value:wa},j.createElement(j1.Provider,{value:nr},c)),j.createElement(oM,{disabled:(a==null?void 0:a.restoreFocus)===!1})),j.createElement(s2,{...a,hiddenTextDescribedById:$}));function cu(){const De=(H==null?void 0:H.autoScrollEnabled)===!1,Re=typeof l=="object"?l.enabled===!1:l===!1,it=C&&!De&&!Re;return typeof l=="object"?{...l,enabled:it}:{enabled:it}}}),cM=f.createContext(null),fv="button",uM="Draggable";function dM(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=ga(uM),{activators:i,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:h}=f.useContext(iu),{role:p=fv,roleDescription:b="draggable",tabIndex:m=0}=o??{},w=(l==null?void 0:l.id)===t,y=f.useContext(w?j1:cM),[v,g]=ic(),[S,_]=ic(),C=G2(i,t),E=Yi(n);Nn(()=>(d.set(t,{id:t,key:s,node:v,activatorNode:S,data:E}),()=>{const N=d.get(t);N&&N.key===s&&d.delete(t)}),[d,t]);const k=f.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":w&&p===fv?!0:void 0,"aria-roledescription":b,"aria-describedby":u.draggable}),[r,p,m,w,b,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:k,isDragging:w,listeners:r?void 0:C,node:v,over:h,setNodeRef:g,setActivatorNodeRef:_,transform:y}}function fM(){return f.useContext(O1)}const hM="Droppable",pM={timeout:25};function mM(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=ga(hM),{active:i,dispatch:a,over:l,measureDroppableContainers:c}=f.useContext(iu),u=f.useRef({disabled:n}),d=f.useRef(!1),h=f.useRef(null),p=f.useRef(null),{disabled:b,updateMeasurementsFor:m,timeout:w}={...pM,...o},y=Yi(m??r),v=f.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null},w)},[w]),g=su({callback:v,disabled:b||!i}),S=f.useCallback((k,N)=>{g&&(N&&(g.unobserve(N),d.current=!1),k&&g.observe(k))},[g]),[_,C]=ic(S),E=Yi(t);return f.useEffect(()=>{!g||!_.current||(g.disconnect(),d.current=!1,g.observe(_.current))},[_,g]),f.useEffect(()=>(a({type:Fe.RegisterDroppable,element:{id:r,key:s,disabled:n,node:_,rect:h,data:E}}),()=>a({type:Fe.UnregisterDroppable,key:s,id:r})),[r]),f.useEffect(()=>{n!==u.current.disabled&&(a({type:Fe.SetDroppableDisabled,id:r,key:s,disabled:n}),u.current.disabled=n)},[r,s,n,a]),{active:i,rect:h,isOver:(l==null?void 0:l.id)===r,node:_,over:l,setNodeRef:C}}
206function Np(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function gM(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function Za(e){return e!==null&&e>=0}function vM(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yM(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const I1=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Np(t,r,n),i=t[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},el={scaleX:1,scaleY:1},wM=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:i}=e;const a=(t=s[n])!=null?t:r;if(!a)return null;if(o===n){const c=s[i];return c?{x:0,y:n<i?c.top+c.height-(a.top+a.height):c.top-a.top,...el}:null}const l=xM(s,o,n);return o>n&&o<=i?{x:0,y:-a.height-l,...el}:o<n&&o>=i?{x:0,y:a.height+l,...el}:{x:0,y:0,...el}};function xM(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return r?n<t?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const D1="Sortable",M1=j.createContext({activeIndex:-1,containerId:D1,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:I1,disabled:{draggable:!1,droppable:!1}});function bM(e){let{children:t,id:n,items:r,strategy:o=I1,disabled:s=!1}=e;const{active:i,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=fM(),d=ga(D1,n),h=a.rect!==null,p=f.useMemo(()=>r.map(C=>typeof C=="object"&&"id"in C?C.id:C),[r]),b=i!=null,m=i?p.indexOf(i.id):-1,w=c?p.indexOf(c.id):-1,y=f.useRef(p),v=!vM(p,y.current),g=w!==-1&&m===-1||v,S=yM(s);Nn(()=>{v&&b&&u(p)},[v,p,b,u]),f.useEffect(()=>{y.current=p},[p]);const _=f.useMemo(()=>({activeIndex:m,containerId:d,disabled:S,disableTransforms:g,items:p,overIndex:w,useDragOverlay:h,sortedRects:gM(p,l),strategy:o}),[m,d,S.draggable,S.droppable,g,p,w,l,h,o]);return j.createElement(M1.Provider,{value:_},t)}const SM=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Np(n,r,o).indexOf(t)},_M=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==s&&o===i?!1:n?!0:i!==o&&t===l},EM={duration:200,easing:"ease"},L1="transform",CM=Ji.Transition.toString({property:L1,duration:0,easing:"linear"}),kM={roleDescription:"sortable"};function TM(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,i]=f.useState(null),a=f.useRef(n);return Nn(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const c=Us(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==a.current&&(a.current=n)},[t,n,r,o]),f.useEffect(()=>{s&&i(null)},[s]),s}function PM(e){let{animateLayoutChanges:t=_M,attributes:n,disabled:r,data:o,getNewIndex:s=SM,id:i,strategy:a,resizeObserverConfig:l,transition:c=EM}=e;const{items:u,containerId:d,activeIndex:h,disabled:p,disableTransforms:b,sortedRects:m,overIndex:w,useDragOverlay:y,strategy:v}=f.useContext(M1),g=RM(r,p),S=u.indexOf(i),_=f.useMemo(()=>({sortable:{containerId:d,index:S,items:u},...o}),[d,o,S,u]),C=f.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:E,node:k,isOver:N,setNodeRef:A}=mM({id:i,data:_,disabled:g.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:O,activatorEvent:D,activeNodeRect:B,attributes:I,setNodeRef:H,listeners:L,isDragging:U,over:T,setActivatorNodeRef:P,transform:$}=dM({id:i,data:_,attributes:{...kM,...n},disabled:g.draggable}),q=KD(A,H),z=!!O,Q=z&&!b&&Za(h)&&Za(w),Y=!y&&U,me=Y&&Q?$:null,F=Q?me??(a??v)({rects:m,activeNodeRect:B,activeIndex:h,overIndex:w,index:S}):null,oe=Za(h)&&Za(w)?s({id:i,items:u,activeIndex:h,overIndex:w}):S,he=O==null?void 0:O.id,V=f.useRef({activeId:he,items:u,newIndex:oe,containerId:d}),re=u!==V.current.items,J=t({active:O,containerId:d,isDragging:U,isSorting:z,id:i,index:S,items:u,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:c,wasDragging:V.current.activeId!=null}),Ee=TM({disabled:!J,index:S,node:k,rect:E});return f.useEffect(()=>{z&&V.current.newIndex!==oe&&(V.current.newIndex=oe),d!==V.current.containerId&&(V.current.containerId=d),u!==V.current.items&&(V.current.items=u)},[z,oe,d,u]),f.useEffect(()=>{if(he===V.current.activeId)return;if(he!=null&&V.current.activeId==null){V.current.activeId=he;return}const ht=setTimeout(()=>{V.current.activeId=he},50);return()=>clearTimeout(ht)},[he]),{active:O,activeIndex:h,attributes:I,data:_,rect:E,index:S,newIndex:oe,items:u,isOver:N,isSorting:z,isDragging:U,listeners:L,node:k,overIndex:w,over:T,setNodeRef:q,setActivatorNodeRef:P,setDroppableNodeRef:A,setDraggableNodeRef:H,transform:Ee??F,transition:Pe()};function Pe(){if(Ee||re&&V.current.newIndex===S)return CM;if(!(Y&&!kp(D)||!c)&&(z||J))return Ji.Transition.toString({...c,property:L1})}}function RM(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function cc(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const AM=[ue.Down,ue.Right,ue.Up,ue.Left],NM=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:i,scrollableAncestors:a}}=t;if(AM.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];
206s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const h=o.get(d.id);if(h)switch(e.code){case ue.Down:r.top<h.top&&l.push(d);break;case ue.Up:r.top>h.top&&l.push(d);break;case ue.Left:r.left>h.left&&l.push(d);break;case ue.Right:r.left<h.left&&l.push(d);break}});const c=c2({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=b1(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=s.get(n.id),h=s.get(u),p=h?o.get(h.id):null,b=h==null?void 0:h.node.current;if(b&&p&&d&&h){const w=ou(b).some((C,E)=>a[E]!==C),y=$1(d,h),v=OM(d,h),g=w||!y?{x:0,y:0}:{x:v?r.width-p.width:0,y:v?r.height-p.height:0},S={x:p.left,y:p.top};return g.x&&g.y?S:Xi(S,g)}}}};function $1(e,t){return!cc(e)||!cc(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function OM(e,t){return!cc(e)||!cc(t)||!$1(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const jM=({track:e,isEditing:t,editPrompt:n,onEditStart:r,onEditSave:o,onEditCancel:s,onEditPromptChange:i,onRemove:a})=>{const{attributes:l,listeners:c,setNodeRef:u,transform:d,transition:h,isDragging:p}=PM({id:e.id}),b={transform:Ji.Transform.toString(d),transition:h,opacity:p?.5:1};return x.jsx(rc,{ref:u,style:b,className:"p-4",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{...l,...c,className:"flex items-center justify-center p-1 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing",children:x.jsx(hk,{className:"w-4 h-4"})}),x.jsx("div",{className:"flex-1",children:t?x.jsxs("div",{className:"space-y-2",children:[x.jsx(Qi,{value:n,onChange:m=>i(m.target.value),className:"font-medium",placeholder:"Enter new prompt..."}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx(Ut,{size:"sm",onClick:o,children:"Save"}),x.jsx(Ut,{size:"sm",variant:"outline",onClick:s,children:"Cancel"})]})]}):x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"font-medium line-clamp-2",children:e.prompt}),x.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[x.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:e.audio_filename?"Has audio file":"No audio file"}),e.created_at&&x.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["Added: ",new Date(e.created_at).toLocaleDateString()]})]})]})}),x.jsxs("div",{className:"flex gap-2",children:[!t&&x.jsx(Ut,{variant:"outline",size:"sm",onClick:r,children:x.jsx(gk,{className:"w-4 h-4"})}),x.jsxs(WD,{children:[x.jsx(VD,{asChild:!0,children:x.jsx(Ut,{variant:"destructive",size:"sm",children:x.jsx(vk,{className:"w-4 h-4"})})}),x.jsxs(c1,{children:[x.jsxs(u1,{children:[x.jsx(f1,{children:"Delete Track"}),x.jsxs(h1,{children:["Are you sure you want to delete this track? This action cannot be undone.",e.audio_filename&&" The audio file will also be permanently deleted."]})]}),x.jsxs(d1,{children:[x.jsx(m1,{children:"Cancel"}),x.jsx(p1,{onClick:a,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})]})]})]})})},IM=()=>{const{tracks:e,removeTrack:t,loading:n,updateTrack:r,reorderTracks:o}=Gc(),[s,i]=f.useState(null),[a,l]=f.useState(""),c=i2(ev(Ap),ev(Pp,{coordinateGetter:NM})),u=async d=>{const{active:h,over:p}=d;if(p&&h.id!==p.id){const b=e.findIndex(y=>y.id===h.id),m=e.findIndex(y=>y.id===p.id),w=Np(e,b,m);await o(w)}};return n?x.jsxs("div",{className:"space-y-4",children:[x.jsx("h2",{className:"text-2xl font-bold",children:"Track Management"}),x.jsx("p",{className:"text-[hsl(var(--muted-foreground))]",children:"Loading tracks..."})]}):e.length===0?x.jsxs("div",{className:"space-y-4",children:[x.jsx("h2",{className:"text-2xl font-bold",children:"Track Management"}),x.jsx("p",{className:"text-[hsl(var(--muted-foreground))]",children:"No tracks to manage. Add some tracks first!"})]}):x.jsxs("div",{className:"space-y-4",children:[x.jsx("h2",{className:"text-2xl font-bold",children:"Track Management"}),x.jsx("p",{className:"text-[hsl(var(--muted-foreground))]",children:"Drag and drop to reorder tracks. Changes will appear on the main page."}),x.jsx(lM,{sensors:c,collisionDetection:l2,onDragEnd:u,children:x.jsx(bM,{items:e.map(d=>d.id),strategy:wM,children:x.jsx("div",{className:"space-y-3",children:e.map(d=>x.jsx(jM,{track:d,isEditing:s===d.id,editPrompt:a,onEditStart:()=>{i(d.id),l(d.prompt)},onEditSave:async()=>{r&&await r(d.id,{prompt:a}),i(null),l("")},onEditCancel:()=>{i(null),l("")},onEditPromptChange:l,onRemove:()=>t(d.id)},d.id))})})})]})},DM=()=>{const e=yA(),{addTrack:t}=Gc(),[n,r]=f.useState(""),[o,s]=f.useState(null),[i,a]=f.useState("maestro v1"),l=async u=>
206{if(u.preventDefault(),!n.trim()||!o){za.error("Please fill in all fields");return}await t({prompt:n.trim(),audioUrl:o?URL.createObjectURL(o):void 0,model:i}),za.success("Track added successfully!"),r(""),s(null),a("maestro v1");const d=document.getElementById("audioFile");d&&(d.value=""),setTimeout(()=>{e("/")},1e3)},c=u=>{var h;const d=(h=u.target.files)==null?void 0:h[0];d&&(d.type.startsWith("audio/")?(s(d),za.success(`File "${d.name}" selected`)):za.error("Please select an audio file"))};return x.jsx("div",{className:"min-h-screen bg-background p-6",children:x.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[x.jsxs(Ut,{variant:"ghost",onClick:()=>e("/"),className:"mb-4",children:[x.jsx(uk,{className:"w-4 h-4 mr-2"}),"Back to Demo"]}),x.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[x.jsxs(rc,{children:[x.jsxs(If,{children:[x.jsx(Df,{children:"Add New Track"}),x.jsx(Mf,{children:"Upload an audio file and provide a descriptive prompt for your track"})]}),x.jsx(Lf,{children:x.jsxs("form",{onSubmit:l,className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(wl,{htmlFor:"trackPrompt",children:"Track Prompt"}),x.jsx(Qi,{id:"trackPrompt",type:"text",placeholder:"Describe your track...",value:n,onChange:u=>r(u.target.value),required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(wl,{htmlFor:"audioFile",children:"Audio File"}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(Qi,{id:"audioFile",type:"file",accept:"audio/*",onChange:c,className:"flex-1"}),x.jsx(yk,{className:"w-5 h-5 text-muted-foreground"})]}),o&&x.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",o.name]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(wl,{htmlFor:"model",children:"Model"}),x.jsxs(uD,{value:i,onValueChange:a,children:[x.jsx(bS,{children:x.jsx(dD,{placeholder:"Select a model"})}),x.jsxs(ES,{children:[x.jsx(Sl,{value:"maestro v1",children:"maestro v1"}),x.jsx(Sl,{value:"maestro finetuned",children:"maestro finetuned"}),x.jsx(Sl,{value:"maestro SFX",children:"maestro SFX"})]})]})]}),x.jsx(Ut,{type:"submit",className:"w-full",children:"Add Track"})]})})]}),x.jsxs(rc,{children:[x.jsxs(If,{children:[x.jsx(Df,{children:"Track Management"}),x.jsx(Mf,{children:"View and manage your existing tracks"})]}),x.jsx(Lf,{children:x.jsx(IM,{})})]})]})]})})},MM=()=>{const e=lp();return f.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),x.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:x.jsxs("div",{className:"text-center",children:[x.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),x.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),x.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},LM=new zR,$M=()=>x.jsx(WR,{client:LM,children:x.jsx(rj,{children:x.jsxs(vR,{children:[x.jsx(eT,{}),x.jsx(OT,{}),x.jsx(LA,{children:x.jsxs(IA,{children:[x.jsx(gl,{path:"/",element:x.jsx(Uj,{})}),x.jsx(gl,{path:"/add-track",element:x.jsx(DM,{})}),x.jsx(gl,{path:"*",element:x.jsx(MM,{})})]})})]})})});D0(document.getElementById("root")).render(x.jsx($M,{}));

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.