@axiom-lattice/sandbox-console 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,211 @@
1
+ var Pv=e=>{throw TypeError(e)};var B1=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var Pd=(e,n,o)=>n.has(e)||Pv("Cannot "+o);var L=(e,n,o)=>(Pd(e,n,"read from private field"),o?o.call(e):n.get(e)),Ne=(e,n,o)=>n.has(e)?Pv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,o),ve=(e,n,o,a)=>(Pd(e,n,"write to private field"),a?a.call(e,o):n.set(e,o),o),$e=(e,n,o)=>(Pd(e,n,"access private method"),o);var Vl=(e,n,o,a)=>({set _(s){ve(e,n,s,o)},get _(){return L(e,n,a)}});var LI=B1((Nn,_n)=>{function W1(e,n){for(var o=0;o<n.length;o++){const a=n[o];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(a,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function o(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(s){if(s.ep)return;s.ep=!0;const u=o(s);fetch(s.href,u)}})();var Nv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function q1(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var o=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};o.prototype=n.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),o}var Nd={exports:{}},os={},_d={exports:{}},Ue={};/**
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 _v;function V1(){if(_v)return Ue;_v=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function b(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function w(j,z,ee){this.props=j,this.context=z,this.refs=S,this.updater=ee||C}w.prototype.isReactComponent={},w.prototype.setState=function(j,z){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,z,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function R(){}R.prototype=w.prototype;function N(j,z,ee){this.props=j,this.context=z,this.refs=S,this.updater=ee||C}var O=N.prototype=new R;O.constructor=N,E(O,w.prototype),O.isPureReactComponent=!0;var T=Array.isArray,$=Object.prototype.hasOwnProperty,A={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function P(j,z,ee){var ue,se={},de=null,Pe=null;if(z!=null)for(ue in z.ref!==void 0&&(Pe=z.ref),z.key!==void 0&&(de=""+z.key),z)$.call(z,ue)&&!M.hasOwnProperty(ue)&&(se[ue]=z[ue]);var pe=arguments.length-2;if(pe===1)se.children=ee;else if(1<pe){for(var ne=Array(pe),he=0;he<pe;he++)ne[he]=arguments[he+2];se.children=ne}if(j&&j.defaultProps)for(ue in pe=j.defaultProps,pe)se[ue]===void 0&&(se[ue]=pe[ue]);return{$$typeof:e,type:j,key:de,ref:Pe,props:se,_owner:A.current}}function _(j,z){return{$$typeof:e,type:j.type,key:z,ref:j.ref,props:j.props,_owner:j._owner}}function D(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function H(j){var z={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return z[ee]})}var W=/\/+/g;function J(j,z){return typeof j=="object"&&j!==null&&j.key!=null?H(""+j.key):z.toString(36)}function ce(j,z,ee,ue,se){var de=typeof j;(de==="undefined"||de==="boolean")&&(j=null);var Pe=!1;if(j===null)Pe=!0;else switch(de){case"string":case"number":Pe=!0;break;case"object":switch(j.$$typeof){case e:case n:Pe=!0}}if(Pe)return Pe=j,se=se(Pe),j=ue===""?"."+J(Pe,0):ue,T(se)?(ee="",j!=null&&(ee=j.replace(W,"$&/")+"/"),ce(se,z,ee,"",function(he){return he})):se!=null&&(D(se)&&(se=_(se,ee+(!se.key||Pe&&Pe.key===se.key?"":(""+se.key).replace(W,"$&/")+"/")+j)),z.push(se)),1;if(Pe=0,ue=ue===""?".":ue+":",T(j))for(var pe=0;pe<j.length;pe++){de=j[pe];var ne=ue+J(de,pe);Pe+=ce(de,z,ee,ne,se)}else if(ne=b(j),typeof ne=="function")for(j=ne.call(j),pe=0;!(de=j.next()).done;)de=de.value,ne=ue+J(de,pe++),Pe+=ce(de,z,ee,ne,se);else if(de==="object")throw z=String(j),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return Pe}function xe(j,z,ee){if(j==null)return j;var ue=[],se=0;return ce(j,ue,"","",function(de){return z.call(ee,de,se++)}),ue}function fe(j){if(j._status===-1){var z=j._result;z=z(),z.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=z)}if(j._status===1)return j._result.default;throw j._result}var ae={current:null},G={transition:null},Z={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:G,ReactCurrentOwner:A};function B(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:xe,forEach:function(j,z,ee){xe(j,function(){z.apply(this,arguments)},ee)},count:function(j){var z=0;return xe(j,function(){z++}),z},toArray:function(j){return xe(j,function(z){return z})||[]},only:function(j){if(!D(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ue.Component=w,Ue.Fragment=o,Ue.Profiler=s,Ue.PureComponent=N,Ue.StrictMode=a,Ue.Suspense=p,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ue.act=B,Ue.cloneElement=function(j,z,ee){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ue=E({},j.props),se=j.key,de=j.ref,Pe=j._owner;if(z!=null){if(z.ref!==void 0&&(de=z.ref,Pe=A.current),z.key!==void 0&&(se=""+z.key),j.type&&j.type.defaultProps)var pe=j.type.defaultProps;for(ne in z)$.call(z,ne)&&!M.hasOwnProperty(ne)&&(ue[ne]=z[ne]===void 0&&pe!==void 0?pe[ne]:z[ne])}var ne=arguments.length-2;if(ne===1)ue.children=ee;else if(1<ne){pe=Array(ne);for(var he=0;he<ne;he++)pe[he]=arguments[he+2];ue.children=pe}return{$$typeof:e,type:j.type,key:se,ref:de,props:ue,_owner:Pe}},Ue.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:u,_context:j},j.Consumer=j},Ue.createElement=P,Ue.createFactory=function(j){var z=P.bind(null,j);return z.type=j,z},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(j){return{$$typeof:f,render:j}},Ue.isValidElement=D,Ue.lazy=function(j){return{$$typeof:v,_payload:{_status:-1,_result:j},_init:fe}},Ue.memo=function(j,z){return{$$typeof:h,type:j,compare:z===void 0?null:z}},Ue.startTransition=function(j){var z=G.transition;G.transition={};try{j()}finally{G.transition=z}},Ue.unstable_act=B,Ue.useCallback=function(j,z){return ae.current.useCallback(j,z)},Ue.useContext=function(j){return ae.current.useContext(j)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(j){return ae.current.useDeferredValue(j)},Ue.useEffect=function(j,z){return ae.current.useEffect(j,z)},Ue.useId=function(){return ae.current.useId()},Ue.useImperativeHandle=function(j,z,ee){return ae.current.useImperativeHandle(j,z,ee)},Ue.useInsertionEffect=function(j,z){return ae.current.useInsertionEffect(j,z)},Ue.useLayoutEffect=function(j,z){return ae.current.useLayoutEffect(j,z)},Ue.useMemo=function(j,z){return ae.current.useMemo(j,z)},Ue.useReducer=function(j,z,ee){return ae.current.useReducer(j,z,ee)},Ue.useRef=function(j){return ae.current.useRef(j)},Ue.useState=function(j){return ae.current.useState(j)},Ue.useSyncExternalStore=function(j,z,ee){return ae.current.useSyncExternalStore(j,z,ee)},Ue.useTransition=function(){return ae.current.useTransition()},Ue.version="18.3.1",Ue}var Ov;function yp(){return Ov||(Ov=1,_d.exports=V1()),_d.exports}/**
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 Tv;function K1(){if(Tv)return os;Tv=1;var e=yp(),n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(f,p,h){var v,y={},b=null,C=null;h!==void 0&&(b=""+h),p.key!==void 0&&(b=""+p.key),p.ref!==void 0&&(C=p.ref);for(v in p)a.call(p,v)&&!u.hasOwnProperty(v)&&(y[v]=p[v]);if(f&&f.defaultProps)for(v in p=f.defaultProps,p)y[v]===void 0&&(y[v]=p[v]);return{$$typeof:n,type:f,key:b,ref:C,props:y,_owner:s.current}}return os.Fragment=o,os.jsx=c,os.jsxs=c,os}var jv;function H1(){return jv||(jv=1,Nd.exports=K1()),Nd.exports}var x=H1(),g=yp();const ie=da(g),_s=W1({__proto__:null,default:ie},[g]);var Kl={},Od={exports:{}},or={},Td={exports:{}},jd={};/**
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
+ */var Av;function Q1(){return Av||(Av=1,(function(e){function n(G,Z){var B=G.length;G.push(Z);e:for(;0<B;){var j=B-1>>>1,z=G[j];if(0<s(z,Z))G[j]=Z,G[B]=z,B=j;else break e}}function o(G){return G.length===0?null:G[0]}function a(G){if(G.length===0)return null;var Z=G[0],B=G.pop();if(B!==Z){G[0]=B;e:for(var j=0,z=G.length,ee=z>>>1;j<ee;){var ue=2*(j+1)-1,se=G[ue],de=ue+1,Pe=G[de];if(0>s(se,B))de<z&&0>s(Pe,se)?(G[j]=Pe,G[de]=B,j=de):(G[j]=se,G[ue]=B,j=ue);else if(de<z&&0>s(Pe,B))G[j]=Pe,G[de]=B,j=de;else break e}}return Z}function s(G,Z){var B=G.sortIndex-Z.sortIndex;return B!==0?B:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],h=[],v=1,y=null,b=3,C=!1,E=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(G){for(var Z=o(h);Z!==null;){if(Z.callback===null)a(h);else if(Z.startTime<=G)a(h),Z.sortIndex=Z.expirationTime,n(p,Z);else break;Z=o(h)}}function T(G){if(S=!1,O(G),!E)if(o(p)!==null)E=!0,fe($);else{var Z=o(h);Z!==null&&ae(T,Z.startTime-G)}}function $(G,Z){E=!1,S&&(S=!1,R(P),P=-1),C=!0;var B=b;try{for(O(Z),y=o(p);y!==null&&(!(y.expirationTime>Z)||G&&!H());){var j=y.callback;if(typeof j=="function"){y.callback=null,b=y.priorityLevel;var z=j(y.expirationTime<=Z);Z=e.unstable_now(),typeof z=="function"?y.callback=z:y===o(p)&&a(p),O(Z)}else a(p);y=o(p)}if(y!==null)var ee=!0;else{var ue=o(h);ue!==null&&ae(T,ue.startTime-Z),ee=!1}return ee}finally{y=null,b=B,C=!1}}var A=!1,M=null,P=-1,_=5,D=-1;function H(){return!(e.unstable_now()-D<_)}function W(){if(M!==null){var G=e.unstable_now();D=G;var Z=!0;try{Z=M(!0,G)}finally{Z?J():(A=!1,M=null)}}else A=!1}var J;if(typeof N=="function")J=function(){N(W)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,xe=ce.port2;ce.port1.onmessage=W,J=function(){xe.postMessage(null)}}else J=function(){w(W,0)};function fe(G){M=G,A||(A=!0,J())}function ae(G,Z){P=w(function(){G(e.unstable_now())},Z)}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(G){G.callback=null},e.unstable_continueExecution=function(){E||C||(E=!0,fe($))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return o(p)},e.unstable_next=function(G){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var B=b;b=Z;try{return G()}finally{b=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var B=b;b=G;try{return Z()}finally{b=B}},e.unstable_scheduleCallback=function(G,Z,B){var j=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?j+B:j):B=j,G){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=B+z,G={id:v++,callback:Z,priorityLevel:G,startTime:B,expirationTime:z,sortIndex:-1},B>j?(G.sortIndex=B,n(h,G),o(p)===null&&G===o(h)&&(S?(R(P),P=-1):S=!0,ae(T,B-j))):(G.sortIndex=z,n(p,G),E||C||(E=!0,fe($))),G},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(G){var Z=b;return function(){var B=b;b=Z;try{return G.apply(this,arguments)}finally{b=B}}}})(jd)),jd}var Iv;function G1(){return Iv||(Iv=1,Td.exports=Q1()),Td.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 Mv;function Y1(){if(Mv)return or;Mv=1;var e=yp(),n=G1();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function u(t,r){c(t,r),c(t+"Capture",r)}function c(t,r){for(s[t]=r,t=0;t<r.length;t++)a.add(r[t])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,h=/^[: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]*$/,v={},y={};function b(t){return p.call(y,t)?!0:p.call(v,t)?!1:h.test(t)?y[t]=!0:(v[t]=!0,!1)}function C(t,r,i,l){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function E(t,r,i,l){if(r===null||typeof r>"u"||C(t,r,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function S(t,r,i,l,d,m,k){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=t,this.type=r,this.sanitizeURL=m,this.removeEmptyString=k}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){w[t]=new S(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];w[r]=new S(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){w[t]=new S(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){w[t]=new S(t,2,!1,t,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(t){w[t]=new S(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){w[t]=new S(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){w[t]=new S(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){w[t]=new S(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){w[t]=new S(t,5,!1,t.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function N(t){return t[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(t){var r=t.replace(R,N);w[r]=new S(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(R,N);w[r]=new S(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(R,N);w[r]=new S(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){w[t]=new S(t,1,!1,t.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){w[t]=new S(t,1,!1,t.toLowerCase(),null,!0,!0)});function O(t,r,i,l){var d=w.hasOwnProperty(r)?w[r]:null;(d!==null?d.type!==0:l||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(E(r,i,d,l)&&(i=null),l||d===null?b(r)&&(i===null?t.removeAttribute(r):t.setAttribute(r,""+i)):d.mustUseProperty?t[d.propertyName]=i===null?d.type===3?!1:"":i:(r=d.attributeName,l=d.attributeNamespace,i===null?t.removeAttribute(r):(d=d.type,i=d===3||d===4&&i===!0?"":""+i,l?t.setAttributeNS(l,r,i):t.setAttribute(r,i))))}var T=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),A=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),H=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),G=Symbol.iterator;function Z(t){return t===null||typeof t!="object"?null:(t=G&&t[G]||t["@@iterator"],typeof t=="function"?t:null)}var B=Object.assign,j;function z(t){if(j===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);j=r&&r[1]||""}return`
34
+ `+j+t}var ee=!1;function ue(t,r){if(!t||ee)return"";ee=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(Y){var l=Y}Reflect.construct(t,[],r)}else{try{r.call()}catch(Y){l=Y}t.call(r.prototype)}else{try{throw Error()}catch(Y){l=Y}t()}}catch(Y){if(Y&&l&&typeof Y.stack=="string"){for(var d=Y.stack.split(`
35
+ `),m=l.stack.split(`
36
+ `),k=d.length-1,I=m.length-1;1<=k&&0<=I&&d[k]!==m[I];)I--;for(;1<=k&&0<=I;k--,I--)if(d[k]!==m[I]){if(k!==1||I!==1)do if(k--,I--,0>I||d[k]!==m[I]){var F=`
37
+ `+d[k].replace(" at new "," at ");return t.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",t.displayName)),F}while(1<=k&&0<=I);break}}}finally{ee=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?z(t):""}function se(t){switch(t.tag){case 5:return z(t.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return t=ue(t.type,!1),t;case 11:return t=ue(t.type.render,!1),t;case 1:return t=ue(t.type,!0),t;default:return""}}function de(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case M:return"Fragment";case A:return"Portal";case _:return"Profiler";case P:return"StrictMode";case J:return"Suspense";case ce:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case H:return(t.displayName||"Context")+".Consumer";case D:return(t._context.displayName||"Context")+".Provider";case W:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case xe:return r=t.displayName||null,r!==null?r:de(t.type)||"Memo";case fe:r=t._payload,t=t._init;try{return de(t(r))}catch{}}return null}function Pe(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(r);case 8:return r===P?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function pe(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ne(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function he(t){var r=ne(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,m=i.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(k){l=""+k,m.call(this,k)}}),Object.defineProperty(t,r,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function me(t){t._valueTracker||(t._valueTracker=he(t))}function Ee(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return t&&(l=ne(t)?t.checked?"true":"false":t.value),t=l,t!==i?(r.setValue(t),!0):!1}function je(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function _e(t,r){var i=r.checked;return B({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function Ie(t,r){var i=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;i=pe(r.value!=null?r.value:i),t._wrapperState={initialChecked:l,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function ke(t,r){r=r.checked,r!=null&&O(t,"checked",r,!1)}function Le(t,r){ke(t,r);var i=pe(r.value),l=r.type;if(i!=null)l==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?Fe(t,r.type,i):r.hasOwnProperty("defaultValue")&&Fe(t,r.type,pe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function Ae(t,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,i||r===t.value||(t.value=r),t.defaultValue=r}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function Fe(t,r,i){(r!=="number"||je(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var Be=Array.isArray;function He(t,r,i,l){if(t=t.options,r){r={};for(var d=0;d<i.length;d++)r["$"+i[d]]=!0;for(i=0;i<t.length;i++)d=r.hasOwnProperty("$"+t[i].value),t[i].selected!==d&&(t[i].selected=d),d&&l&&(t[i].defaultSelected=!0)}else{for(i=""+pe(i),r=null,d=0;d<t.length;d++){if(t[d].value===i){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}r!==null||t[d].disabled||(r=t[d])}r!==null&&(r.selected=!0)}}function st(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return B({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function _t(t,r){var i=r.value;if(i==null){if(i=r.children,r=r.defaultValue,i!=null){if(r!=null)throw Error(o(92));if(Be(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),i=r}t._wrapperState={initialValue:pe(i)}}function et(t,r){var i=pe(r.value),l=pe(r.defaultValue);i!=null&&(i=""+i,i!==t.value&&(t.value=i),r.defaultValue==null&&t.defaultValue!==i&&(t.defaultValue=i)),l!=null&&(t.defaultValue=""+l)}function vt(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function rt(t){switch(t){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 lt(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?rt(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var wt,Xt=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,i,l,d){MSApp.execUnsafeLocalFunction(function(){return t(r,i,l,d)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(wt=wt||document.createElement("div"),wt.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=wt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function Jt(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Ve={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},dt=["Webkit","ms","Moz","O"];Object.keys(Ve).forEach(function(t){dt.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Ve[r]=Ve[t]})});function cr(t,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||Ve.hasOwnProperty(t)&&Ve[t]?(""+r).trim():r+"px"}function yr(t,r){t=t.style;for(var i in r)if(r.hasOwnProperty(i)){var l=i.indexOf("--")===0,d=cr(i,r[i],l);i==="float"&&(i="cssFloat"),l?t.setProperty(i,d):t[i]=d}}var Fn=B({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 Q(t,r){if(r){if(Fn[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function X(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 We=null;function Ye(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Je=null,De=null,Ut=null;function Hr(t){if(t=Wa(t)){if(typeof Je!="function")throw Error(o(280));var r=t.stateNode;r&&(r=al(r),Je(t.stateNode,t.type,r))}}function Mt(t){De?Ut?Ut.push(t):Ut=[t]:De=t}function Or(){if(De){var t=De,r=Ut;if(Ut=De=null,Hr(t),r)for(t=0;t<r.length;t++)Hr(r[t])}}function mi(t,r){return t(r)}function dn(){}var Bt=!1;function xa(t,r,i){if(Bt)return t(r,i);Bt=!0;try{return mi(t,r,i)}finally{Bt=!1,(De!==null||Ut!==null)&&(dn(),Or())}}function $n(t,r){var i=t.stateNode;if(i===null)return null;var l=al(i);if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var vi=!1;if(f)try{var Tr={};Object.defineProperty(Tr,"passive",{get:function(){vi=!0}}),window.addEventListener("test",Tr,Tr),window.removeEventListener("test",Tr,Tr)}catch{vi=!1}function wa(t,r,i,l,d,m,k,I,F){var Y=Array.prototype.slice.call(arguments,3);try{r.apply(i,Y)}catch(re){this.onError(re)}}var Qr=!1,zn=null,Un=!1,yi=null,Ds={onError:function(t){Qr=!0,zn=t}};function ba(t,r,i,l,d,m,k,I,F){Qr=!1,zn=null,wa.apply(Ds,arguments)}function Ls(t,r,i,l,d,m,k,I,F){if(ba.apply(this,arguments),Qr){if(Qr){var Y=zn;Qr=!1,zn=null}else throw Error(o(198));Un||(Un=!0,yi=Y)}}function jr(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function Sa(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function Fs(t){if(jr(t)!==t)throw Error(o(188))}function Ca(t){var r=t.alternate;if(!r){if(r=jr(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,l=r;;){var d=i.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===i)return Fs(d),t;if(m===l)return Fs(d),r;m=m.sibling}throw Error(o(188))}if(i.return!==l.return)i=d,l=m;else{for(var k=!1,I=d.child;I;){if(I===i){k=!0,i=d,l=m;break}if(I===l){k=!0,l=d,i=m;break}I=I.sibling}if(!k){for(I=m.child;I;){if(I===i){k=!0,i=m,l=d;break}if(I===l){k=!0,l=m,i=d;break}I=I.sibling}if(!k)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function fn(t){return t=Ca(t),t!==null?Ao(t):null}function Ao(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=Ao(t);if(r!==null)return r;t=t.sibling}return null}var $s=n.unstable_scheduleCallback,Ea=n.unstable_cancelCallback,Zb=n.unstable_shouldYield,eS=n.unstable_requestPaint,yt=n.unstable_now,tS=n.unstable_getCurrentPriorityLevel,Hu=n.unstable_ImmediatePriority,rh=n.unstable_UserBlockingPriority,zs=n.unstable_NormalPriority,rS=n.unstable_LowPriority,nh=n.unstable_IdlePriority,Us=null,Gr=null;function nS(t){if(Gr&&typeof Gr.onCommitFiberRoot=="function")try{Gr.onCommitFiberRoot(Us,t,void 0,(t.current.flags&128)===128)}catch{}}var Ar=Math.clz32?Math.clz32:aS,oS=Math.log,iS=Math.LN2;function aS(t){return t>>>=0,t===0?32:31-(oS(t)/iS|0)|0}var Bs=64,Ws=4194304;function ka(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function qs(t,r){var i=t.pendingLanes;if(i===0)return 0;var l=0,d=t.suspendedLanes,m=t.pingedLanes,k=i&268435455;if(k!==0){var I=k&~d;I!==0?l=ka(I):(m&=k,m!==0&&(l=ka(m)))}else k=i&~d,k!==0?l=ka(k):m!==0&&(l=ka(m));if(l===0)return 0;if(r!==0&&r!==l&&(r&d)===0&&(d=l&-l,m=r&-r,d>=m||d===16&&(m&4194240)!==0))return r;if((l&4)!==0&&(l|=i&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=l;0<r;)i=31-Ar(r),d=1<<i,l|=t[i],r&=~d;return l}function sS(t,r){switch(t){case 1:case 2:case 4:return r+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 r+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 lS(t,r){for(var i=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes;0<m;){var k=31-Ar(m),I=1<<k,F=d[k];F===-1?((I&i)===0||(I&l)!==0)&&(d[k]=sS(I,r)):F<=r&&(t.expiredLanes|=I),m&=~I}}function Qu(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function oh(){var t=Bs;return Bs<<=1,(Bs&4194240)===0&&(Bs=64),t}function Gu(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function Ra(t,r,i){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Ar(r),t[r]=i}function uS(t,r){var i=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0<i;){var d=31-Ar(i),m=1<<d;r[d]=0,l[d]=-1,t[d]=-1,i&=~m}}function Yu(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var l=31-Ar(i),d=1<<l;d&r|t[l]&r&&(t[l]|=r),i&=~d}}var Ze=0;function ih(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var ah,Xu,sh,lh,uh,Ju=!1,Vs=[],Bn=null,Wn=null,qn=null,Pa=new Map,Na=new Map,Vn=[],cS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ch(t,r){switch(t){case"focusin":case"focusout":Bn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Pa.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(r.pointerId)}}function _a(t,r,i,l,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[d]},r!==null&&(r=Wa(r),r!==null&&Xu(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function dS(t,r,i,l,d){switch(r){case"focusin":return Bn=_a(Bn,t,r,i,l,d),!0;case"dragenter":return Wn=_a(Wn,t,r,i,l,d),!0;case"mouseover":return qn=_a(qn,t,r,i,l,d),!0;case"pointerover":var m=d.pointerId;return Pa.set(m,_a(Pa.get(m)||null,t,r,i,l,d)),!0;case"gotpointercapture":return m=d.pointerId,Na.set(m,_a(Na.get(m)||null,t,r,i,l,d)),!0}return!1}function dh(t){var r=Io(t.target);if(r!==null){var i=jr(r);if(i!==null){if(r=i.tag,r===13){if(r=Sa(i),r!==null){t.blockedOn=r,uh(t.priority,function(){sh(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ks(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=ec(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);We=l,i.target.dispatchEvent(l),We=null}else return r=Wa(i),r!==null&&Xu(r),t.blockedOn=i,!1;r.shift()}return!0}function fh(t,r,i){Ks(t)&&i.delete(r)}function fS(){Ju=!1,Bn!==null&&Ks(Bn)&&(Bn=null),Wn!==null&&Ks(Wn)&&(Wn=null),qn!==null&&Ks(qn)&&(qn=null),Pa.forEach(fh),Na.forEach(fh)}function Oa(t,r){t.blockedOn===r&&(t.blockedOn=null,Ju||(Ju=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,fS)))}function Ta(t){function r(d){return Oa(d,t)}if(0<Vs.length){Oa(Vs[0],t);for(var i=1;i<Vs.length;i++){var l=Vs[i];l.blockedOn===t&&(l.blockedOn=null)}}for(Bn!==null&&Oa(Bn,t),Wn!==null&&Oa(Wn,t),qn!==null&&Oa(qn,t),Pa.forEach(r),Na.forEach(r),i=0;i<Vn.length;i++)l=Vn[i],l.blockedOn===t&&(l.blockedOn=null);for(;0<Vn.length&&(i=Vn[0],i.blockedOn===null);)dh(i),i.blockedOn===null&&Vn.shift()}var gi=T.ReactCurrentBatchConfig,Hs=!0;function pS(t,r,i,l){var d=Ze,m=gi.transition;gi.transition=null;try{Ze=1,Zu(t,r,i,l)}finally{Ze=d,gi.transition=m}}function hS(t,r,i,l){var d=Ze,m=gi.transition;gi.transition=null;try{Ze=4,Zu(t,r,i,l)}finally{Ze=d,gi.transition=m}}function Zu(t,r,i,l){if(Hs){var d=ec(t,r,i,l);if(d===null)yc(t,r,l,Qs,i),ch(t,l);else if(dS(d,t,r,i,l))l.stopPropagation();else if(ch(t,l),r&4&&-1<cS.indexOf(t)){for(;d!==null;){var m=Wa(d);if(m!==null&&ah(m),m=ec(t,r,i,l),m===null&&yc(t,r,l,Qs,i),m===d)break;d=m}d!==null&&l.stopPropagation()}else yc(t,r,l,null,i)}}var Qs=null;function ec(t,r,i,l){if(Qs=null,t=Ye(l),t=Io(t),t!==null)if(r=jr(t),r===null)t=null;else if(i=r.tag,i===13){if(t=Sa(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Qs=t,null}function ph(t){switch(t){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(tS()){case Hu:return 1;case rh:return 4;case zs:case rS:return 16;case nh:return 536870912;default:return 16}default:return 16}}var Kn=null,tc=null,Gs=null;function hh(){if(Gs)return Gs;var t,r=tc,i=r.length,l,d="value"in Kn?Kn.value:Kn.textContent,m=d.length;for(t=0;t<i&&r[t]===d[t];t++);var k=i-t;for(l=1;l<=k&&r[i-l]===d[m-l];l++);return Gs=d.slice(t,1<l?1-l:void 0)}function Ys(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Xs(){return!0}function mh(){return!1}function dr(t){function r(i,l,d,m,k){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var I in t)t.hasOwnProperty(I)&&(i=t[I],this[I]=i?i(m):m[I]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Xs:mh,this.isPropagationStopped=mh,this}return B(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),r}var xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rc=dr(xi),ja=B({},xi,{view:0,detail:0}),mS=dr(ja),nc,oc,Aa,Js=B({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ac,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Aa&&(Aa&&t.type==="mousemove"?(nc=t.screenX-Aa.screenX,oc=t.screenY-Aa.screenY):oc=nc=0,Aa=t),nc)},movementY:function(t){return"movementY"in t?t.movementY:oc}}),vh=dr(Js),vS=B({},Js,{dataTransfer:0}),yS=dr(vS),gS=B({},ja,{relatedTarget:0}),ic=dr(gS),xS=B({},xi,{animationName:0,elapsedTime:0,pseudoElement:0}),wS=dr(xS),bS=B({},xi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),SS=dr(bS),CS=B({},xi,{data:0}),yh=dr(CS),ES={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kS={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"},RS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function PS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=RS[t])?!!r[t]:!1}function ac(){return PS}var NS=B({},ja,{key:function(t){if(t.key){var r=ES[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Ys(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?kS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ac,charCode:function(t){return t.type==="keypress"?Ys(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ys(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_S=dr(NS),OS=B({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gh=dr(OS),TS=B({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ac}),jS=dr(TS),AS=B({},xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),IS=dr(AS),MS=B({},Js,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),DS=dr(MS),LS=[9,13,27,32],sc=f&&"CompositionEvent"in window,Ia=null;f&&"documentMode"in document&&(Ia=document.documentMode);var FS=f&&"TextEvent"in window&&!Ia,xh=f&&(!sc||Ia&&8<Ia&&11>=Ia),wh=" ",bh=!1;function Sh(t,r){switch(t){case"keyup":return LS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ch(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var wi=!1;function $S(t,r){switch(t){case"compositionend":return Ch(r);case"keypress":return r.which!==32?null:(bh=!0,wh);case"textInput":return t=r.data,t===wh&&bh?null:t;default:return null}}function zS(t,r){if(wi)return t==="compositionend"||!sc&&Sh(t,r)?(t=hh(),Gs=tc=Kn=null,wi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return xh&&r.locale!=="ko"?null:r.data;default:return null}}var US={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 Eh(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!US[t.type]:r==="textarea"}function kh(t,r,i,l){Mt(l),r=nl(r,"onChange"),0<r.length&&(i=new rc("onChange","change",null,i,l),t.push({event:i,listeners:r}))}var Ma=null,Da=null;function BS(t){Wh(t,0)}function Zs(t){var r=ki(t);if(Ee(r))return t}function WS(t,r){if(t==="change")return r}var Rh=!1;if(f){var lc;if(f){var uc="oninput"in document;if(!uc){var Ph=document.createElement("div");Ph.setAttribute("oninput","return;"),uc=typeof Ph.oninput=="function"}lc=uc}else lc=!1;Rh=lc&&(!document.documentMode||9<document.documentMode)}function Nh(){Ma&&(Ma.detachEvent("onpropertychange",_h),Da=Ma=null)}function _h(t){if(t.propertyName==="value"&&Zs(Da)){var r=[];kh(r,Da,t,Ye(t)),xa(BS,r)}}function qS(t,r,i){t==="focusin"?(Nh(),Ma=r,Da=i,Ma.attachEvent("onpropertychange",_h)):t==="focusout"&&Nh()}function VS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Zs(Da)}function KS(t,r){if(t==="click")return Zs(r)}function HS(t,r){if(t==="input"||t==="change")return Zs(r)}function QS(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Ir=typeof Object.is=="function"?Object.is:QS;function La(t,r){if(Ir(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!p.call(r,d)||!Ir(t[d],r[d]))return!1}return!0}function Oh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Th(t,r){var i=Oh(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=r&&l>=r)return{node:i,offset:r-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Oh(i)}}function jh(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?jh(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Ah(){for(var t=window,r=je();r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=je(t.document)}return r}function cc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function GS(t){var r=Ah(),i=t.focusedElem,l=t.selectionRange;if(r!==i&&i&&i.ownerDocument&&jh(i.ownerDocument.documentElement,i)){if(l!==null&&cc(i)){if(r=l.start,t=l.end,t===void 0&&(t=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(t,i.value.length);else if(t=(r=i.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var d=i.textContent.length,m=Math.min(l.start,d);l=l.end===void 0?m:Math.min(l.end,d),!t.extend&&m>l&&(d=l,l=m,m=d),d=Th(i,m);var k=Th(i,l);d&&k&&(t.rangeCount!==1||t.anchorNode!==d.node||t.anchorOffset!==d.offset||t.focusNode!==k.node||t.focusOffset!==k.offset)&&(r=r.createRange(),r.setStart(d.node,d.offset),t.removeAllRanges(),m>l?(t.addRange(r),t.extend(k.node,k.offset)):(r.setEnd(k.node,k.offset),t.addRange(r)))}}for(r=[],t=i;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<r.length;i++)t=r[i],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var YS=f&&"documentMode"in document&&11>=document.documentMode,bi=null,dc=null,Fa=null,fc=!1;function Ih(t,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;fc||bi==null||bi!==je(l)||(l=bi,"selectionStart"in l&&cc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Fa&&La(Fa,l)||(Fa=l,l=nl(dc,"onSelect"),0<l.length&&(r=new rc("onSelect","select",null,r,i),t.push({event:r,listeners:l}),r.target=bi)))}function el(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var Si={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionend:el("Transition","TransitionEnd")},pc={},Mh={};f&&(Mh=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function tl(t){if(pc[t])return pc[t];if(!Si[t])return t;var r=Si[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in Mh)return pc[t]=r[i];return t}var Dh=tl("animationend"),Lh=tl("animationiteration"),Fh=tl("animationstart"),$h=tl("transitionend"),zh=new Map,Uh="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 Hn(t,r){zh.set(t,r),u(r,[t])}for(var hc=0;hc<Uh.length;hc++){var mc=Uh[hc],XS=mc.toLowerCase(),JS=mc[0].toUpperCase()+mc.slice(1);Hn(XS,"on"+JS)}Hn(Dh,"onAnimationEnd"),Hn(Lh,"onAnimationIteration"),Hn(Fh,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn($h,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $a="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(" "),ZS=new Set("cancel close invalid load scroll toggle".split(" ").concat($a));function Bh(t,r,i){var l=t.type||"unknown-event";t.currentTarget=i,Ls(l,r,void 0,t),t.currentTarget=null}function Wh(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],d=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var k=l.length-1;0<=k;k--){var I=l[k],F=I.instance,Y=I.currentTarget;if(I=I.listener,F!==m&&d.isPropagationStopped())break e;Bh(d,I,Y),m=F}else for(k=0;k<l.length;k++){if(I=l[k],F=I.instance,Y=I.currentTarget,I=I.listener,F!==m&&d.isPropagationStopped())break e;Bh(d,I,Y),m=F}}}if(Un)throw t=yi,Un=!1,yi=null,t}function ot(t,r){var i=r[Cc];i===void 0&&(i=r[Cc]=new Set);var l=t+"__bubble";i.has(l)||(qh(r,t,2,!1),i.add(l))}function vc(t,r,i){var l=0;r&&(l|=4),qh(i,t,l,r)}var rl="_reactListening"+Math.random().toString(36).slice(2);function za(t){if(!t[rl]){t[rl]=!0,a.forEach(function(i){i!=="selectionchange"&&(ZS.has(i)||vc(i,!1,t),vc(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[rl]||(r[rl]=!0,vc("selectionchange",!1,r))}}function qh(t,r,i,l){switch(ph(r)){case 1:var d=pS;break;case 4:d=hS;break;default:d=Zu}i=d.bind(null,r,i,t),d=void 0,!vi||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(r,i,{capture:!0,passive:d}):t.addEventListener(r,i,!0):d!==void 0?t.addEventListener(r,i,{passive:d}):t.addEventListener(r,i,!1)}function yc(t,r,i,l,d){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var k=l.tag;if(k===3||k===4){var I=l.stateNode.containerInfo;if(I===d||I.nodeType===8&&I.parentNode===d)break;if(k===4)for(k=l.return;k!==null;){var F=k.tag;if((F===3||F===4)&&(F=k.stateNode.containerInfo,F===d||F.nodeType===8&&F.parentNode===d))return;k=k.return}for(;I!==null;){if(k=Io(I),k===null)return;if(F=k.tag,F===5||F===6){l=m=k;continue e}I=I.parentNode}}l=l.return}xa(function(){var Y=m,re=Ye(i),oe=[];e:{var te=zh.get(t);if(te!==void 0){var ye=rc,we=t;switch(t){case"keypress":if(Ys(i)===0)break e;case"keydown":case"keyup":ye=_S;break;case"focusin":we="focus",ye=ic;break;case"focusout":we="blur",ye=ic;break;case"beforeblur":case"afterblur":ye=ic;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=yS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=jS;break;case Dh:case Lh:case Fh:ye=wS;break;case $h:ye=IS;break;case"scroll":ye=mS;break;case"wheel":ye=DS;break;case"copy":case"cut":case"paste":ye=SS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=gh}var Ce=(r&4)!==0,gt=!Ce&&t==="scroll",q=Ce?te!==null?te+"Capture":null:te;Ce=[];for(var U=Y,K;U!==null;){K=U;var le=K.stateNode;if(K.tag===5&&le!==null&&(K=le,q!==null&&(le=$n(U,q),le!=null&&Ce.push(Ua(U,le,K)))),gt)break;U=U.return}0<Ce.length&&(te=new ye(te,we,null,i,re),oe.push({event:te,listeners:Ce}))}}if((r&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ye=t==="mouseout"||t==="pointerout",te&&i!==We&&(we=i.relatedTarget||i.fromElement)&&(Io(we)||we[pn]))break e;if((ye||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,ye?(we=i.relatedTarget||i.toElement,ye=Y,we=we?Io(we):null,we!==null&&(gt=jr(we),we!==gt||we.tag!==5&&we.tag!==6)&&(we=null)):(ye=null,we=Y),ye!==we)){if(Ce=vh,le="onMouseLeave",q="onMouseEnter",U="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=gh,le="onPointerLeave",q="onPointerEnter",U="pointer"),gt=ye==null?te:ki(ye),K=we==null?te:ki(we),te=new Ce(le,U+"leave",ye,i,re),te.target=gt,te.relatedTarget=K,le=null,Io(re)===Y&&(Ce=new Ce(q,U+"enter",we,i,re),Ce.target=K,Ce.relatedTarget=gt,le=Ce),gt=le,ye&&we)t:{for(Ce=ye,q=we,U=0,K=Ce;K;K=Ci(K))U++;for(K=0,le=q;le;le=Ci(le))K++;for(;0<U-K;)Ce=Ci(Ce),U--;for(;0<K-U;)q=Ci(q),K--;for(;U--;){if(Ce===q||q!==null&&Ce===q.alternate)break t;Ce=Ci(Ce),q=Ci(q)}Ce=null}else Ce=null;ye!==null&&Vh(oe,te,ye,Ce,!1),we!==null&&gt!==null&&Vh(oe,gt,we,Ce,!0)}}e:{if(te=Y?ki(Y):window,ye=te.nodeName&&te.nodeName.toLowerCase(),ye==="select"||ye==="input"&&te.type==="file")var Re=WS;else if(Eh(te))if(Rh)Re=HS;else{Re=VS;var Oe=qS}else(ye=te.nodeName)&&ye.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(Re=KS);if(Re&&(Re=Re(t,Y))){kh(oe,Re,i,re);break e}Oe&&Oe(t,te,Y),t==="focusout"&&(Oe=te._wrapperState)&&Oe.controlled&&te.type==="number"&&Fe(te,"number",te.value)}switch(Oe=Y?ki(Y):window,t){case"focusin":(Eh(Oe)||Oe.contentEditable==="true")&&(bi=Oe,dc=Y,Fa=null);break;case"focusout":Fa=dc=bi=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,Ih(oe,i,re);break;case"selectionchange":if(YS)break;case"keydown":case"keyup":Ih(oe,i,re)}var Te;if(sc)e:{switch(t){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else wi?Sh(t,i)&&(Me="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(xh&&i.locale!=="ko"&&(wi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&wi&&(Te=hh()):(Kn=re,tc="value"in Kn?Kn.value:Kn.textContent,wi=!0)),Oe=nl(Y,Me),0<Oe.length&&(Me=new yh(Me,t,null,i,re),oe.push({event:Me,listeners:Oe}),Te?Me.data=Te:(Te=Ch(i),Te!==null&&(Me.data=Te)))),(Te=FS?$S(t,i):zS(t,i))&&(Y=nl(Y,"onBeforeInput"),0<Y.length&&(re=new yh("onBeforeInput","beforeinput",null,i,re),oe.push({event:re,listeners:Y}),re.data=Te))}Wh(oe,r)})}function Ua(t,r,i){return{instance:t,listener:r,currentTarget:i}}function nl(t,r){for(var i=r+"Capture",l=[];t!==null;){var d=t,m=d.stateNode;d.tag===5&&m!==null&&(d=m,m=$n(t,i),m!=null&&l.unshift(Ua(t,m,d)),m=$n(t,r),m!=null&&l.push(Ua(t,m,d))),t=t.return}return l}function Ci(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Vh(t,r,i,l,d){for(var m=r._reactName,k=[];i!==null&&i!==l;){var I=i,F=I.alternate,Y=I.stateNode;if(F!==null&&F===l)break;I.tag===5&&Y!==null&&(I=Y,d?(F=$n(i,m),F!=null&&k.unshift(Ua(i,F,I))):d||(F=$n(i,m),F!=null&&k.push(Ua(i,F,I)))),i=i.return}k.length!==0&&t.push({event:r,listeners:k})}var e1=/\r\n?/g,t1=/\u0000|\uFFFD/g;function Kh(t){return(typeof t=="string"?t:""+t).replace(e1,`
38
+ `).replace(t1,"")}function ol(t,r,i){if(r=Kh(r),Kh(t)!==r&&i)throw Error(o(425))}function il(){}var gc=null,xc=null;function wc(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var bc=typeof setTimeout=="function"?setTimeout:void 0,r1=typeof clearTimeout=="function"?clearTimeout:void 0,Hh=typeof Promise=="function"?Promise:void 0,n1=typeof queueMicrotask=="function"?queueMicrotask:typeof Hh<"u"?function(t){return Hh.resolve(null).then(t).catch(o1)}:bc;function o1(t){setTimeout(function(){throw t})}function Sc(t,r){var i=r,l=0;do{var d=i.nextSibling;if(t.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"){if(l===0){t.removeChild(d),Ta(r);return}l--}else i!=="$"&&i!=="$?"&&i!=="$!"||l++;i=d}while(i);Ta(r)}function Qn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function Qh(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(r===0)return t;r--}else i==="/$"&&r++}t=t.previousSibling}return null}var Ei=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Ei,Ba="__reactProps$"+Ei,pn="__reactContainer$"+Ei,Cc="__reactEvents$"+Ei,i1="__reactListeners$"+Ei,a1="__reactHandles$"+Ei;function Io(t){var r=t[Yr];if(r)return r;for(var i=t.parentNode;i;){if(r=i[pn]||i[Yr]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=Qh(t);t!==null;){if(i=t[Yr])return i;t=Qh(t)}return r}t=i,i=t.parentNode}return null}function Wa(t){return t=t[Yr]||t[pn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ki(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function al(t){return t[Ba]||null}var Ec=[],Ri=-1;function Gn(t){return{current:t}}function it(t){0>Ri||(t.current=Ec[Ri],Ec[Ri]=null,Ri--)}function nt(t,r){Ri++,Ec[Ri]=t.current,t.current=r}var Yn={},Dt=Gn(Yn),Zt=Gn(!1),Mo=Yn;function Pi(t,r){var i=t.type.contextTypes;if(!i)return Yn;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var d={},m;for(m in i)d[m]=r[m];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=d),d}function er(t){return t=t.childContextTypes,t!=null}function sl(){it(Zt),it(Dt)}function Gh(t,r,i){if(Dt.current!==Yn)throw Error(o(168));nt(Dt,r),nt(Zt,i)}function Yh(t,r,i){var l=t.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var d in l)if(!(d in r))throw Error(o(108,Pe(t)||"Unknown",d));return B({},i,l)}function ll(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Yn,Mo=Dt.current,nt(Dt,t),nt(Zt,Zt.current),!0}function Xh(t,r,i){var l=t.stateNode;if(!l)throw Error(o(169));i?(t=Yh(t,r,Mo),l.__reactInternalMemoizedMergedChildContext=t,it(Zt),it(Dt),nt(Dt,t)):it(Zt),nt(Zt,i)}var hn=null,ul=!1,kc=!1;function Jh(t){hn===null?hn=[t]:hn.push(t)}function s1(t){ul=!0,Jh(t)}function Xn(){if(!kc&&hn!==null){kc=!0;var t=0,r=Ze;try{var i=hn;for(Ze=1;t<i.length;t++){var l=i[t];do l=l(!0);while(l!==null)}hn=null,ul=!1}catch(d){throw hn!==null&&(hn=hn.slice(t+1)),$s(Hu,Xn),d}finally{Ze=r,kc=!1}}return null}var Ni=[],_i=0,cl=null,dl=0,gr=[],xr=0,Do=null,mn=1,vn="";function Lo(t,r){Ni[_i++]=dl,Ni[_i++]=cl,cl=t,dl=r}function Zh(t,r,i){gr[xr++]=mn,gr[xr++]=vn,gr[xr++]=Do,Do=t;var l=mn;t=vn;var d=32-Ar(l)-1;l&=~(1<<d),i+=1;var m=32-Ar(r)+d;if(30<m){var k=d-d%5;m=(l&(1<<k)-1).toString(32),l>>=k,d-=k,mn=1<<32-Ar(r)+d|i<<d|l,vn=m+t}else mn=1<<m|i<<d|l,vn=t}function Rc(t){t.return!==null&&(Lo(t,1),Zh(t,1,0))}function Pc(t){for(;t===cl;)cl=Ni[--_i],Ni[_i]=null,dl=Ni[--_i],Ni[_i]=null;for(;t===Do;)Do=gr[--xr],gr[xr]=null,vn=gr[--xr],gr[xr]=null,mn=gr[--xr],gr[xr]=null}var fr=null,pr=null,ut=!1,Mr=null;function em(t,r){var i=Cr(5,null,null,0);i.elementType="DELETED",i.stateNode=r,i.return=t,r=t.deletions,r===null?(t.deletions=[i],t.flags|=16):r.push(i)}function tm(t,r){switch(t.tag){case 5:var i=t.type;return r=r.nodeType!==1||i.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,fr=t,pr=Qn(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,fr=t,pr=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(i=Do!==null?{id:mn,overflow:vn}:null,t.memoizedState={dehydrated:r,treeContext:i,retryLane:1073741824},i=Cr(18,null,null,0),i.stateNode=r,i.return=t,t.child=i,fr=t,pr=null,!0):!1;default:return!1}}function Nc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function _c(t){if(ut){var r=pr;if(r){var i=r;if(!tm(t,r)){if(Nc(t))throw Error(o(418));r=Qn(i.nextSibling);var l=fr;r&&tm(t,r)?em(l,i):(t.flags=t.flags&-4097|2,ut=!1,fr=t)}}else{if(Nc(t))throw Error(o(418));t.flags=t.flags&-4097|2,ut=!1,fr=t}}}function rm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;fr=t}function fl(t){if(t!==fr)return!1;if(!ut)return rm(t),ut=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!wc(t.type,t.memoizedProps)),r&&(r=pr)){if(Nc(t))throw nm(),Error(o(418));for(;r;)em(t,r),r=Qn(r.nextSibling)}if(rm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"){if(r===0){pr=Qn(t.nextSibling);break e}r--}else i!=="$"&&i!=="$!"&&i!=="$?"||r++}t=t.nextSibling}pr=null}}else pr=fr?Qn(t.stateNode.nextSibling):null;return!0}function nm(){for(var t=pr;t;)t=Qn(t.nextSibling)}function Oi(){pr=fr=null,ut=!1}function Oc(t){Mr===null?Mr=[t]:Mr.push(t)}var l1=T.ReactCurrentBatchConfig;function qa(t,r,i){if(t=i.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(o(309));var l=i.stateNode}if(!l)throw Error(o(147,t));var d=l,m=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===m?r.ref:(r=function(k){var I=d.refs;k===null?delete I[m]:I[m]=k},r._stringRef=m,r)}if(typeof t!="string")throw Error(o(284));if(!i._owner)throw Error(o(290,t))}return t}function pl(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function om(t){var r=t._init;return r(t._payload)}function im(t){function r(q,U){if(t){var K=q.deletions;K===null?(q.deletions=[U],q.flags|=16):K.push(U)}}function i(q,U){if(!t)return null;for(;U!==null;)r(q,U),U=U.sibling;return null}function l(q,U){for(q=new Map;U!==null;)U.key!==null?q.set(U.key,U):q.set(U.index,U),U=U.sibling;return q}function d(q,U){return q=io(q,U),q.index=0,q.sibling=null,q}function m(q,U,K){return q.index=K,t?(K=q.alternate,K!==null?(K=K.index,K<U?(q.flags|=2,U):K):(q.flags|=2,U)):(q.flags|=1048576,U)}function k(q){return t&&q.alternate===null&&(q.flags|=2),q}function I(q,U,K,le){return U===null||U.tag!==6?(U=bd(K,q.mode,le),U.return=q,U):(U=d(U,K),U.return=q,U)}function F(q,U,K,le){var Re=K.type;return Re===M?re(q,U,K.props.children,le,K.key):U!==null&&(U.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===fe&&om(Re)===U.type)?(le=d(U,K.props),le.ref=qa(q,U,K),le.return=q,le):(le=Ll(K.type,K.key,K.props,null,q.mode,le),le.ref=qa(q,U,K),le.return=q,le)}function Y(q,U,K,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==K.containerInfo||U.stateNode.implementation!==K.implementation?(U=Sd(K,q.mode,le),U.return=q,U):(U=d(U,K.children||[]),U.return=q,U)}function re(q,U,K,le,Re){return U===null||U.tag!==7?(U=Vo(K,q.mode,le,Re),U.return=q,U):(U=d(U,K),U.return=q,U)}function oe(q,U,K){if(typeof U=="string"&&U!==""||typeof U=="number")return U=bd(""+U,q.mode,K),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case $:return K=Ll(U.type,U.key,U.props,null,q.mode,K),K.ref=qa(q,null,U),K.return=q,K;case A:return U=Sd(U,q.mode,K),U.return=q,U;case fe:var le=U._init;return oe(q,le(U._payload),K)}if(Be(U)||Z(U))return U=Vo(U,q.mode,K,null),U.return=q,U;pl(q,U)}return null}function te(q,U,K,le){var Re=U!==null?U.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Re!==null?null:I(q,U,""+K,le);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case $:return K.key===Re?F(q,U,K,le):null;case A:return K.key===Re?Y(q,U,K,le):null;case fe:return Re=K._init,te(q,U,Re(K._payload),le)}if(Be(K)||Z(K))return Re!==null?null:re(q,U,K,le,null);pl(q,K)}return null}function ye(q,U,K,le,Re){if(typeof le=="string"&&le!==""||typeof le=="number")return q=q.get(K)||null,I(U,q,""+le,Re);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return q=q.get(le.key===null?K:le.key)||null,F(U,q,le,Re);case A:return q=q.get(le.key===null?K:le.key)||null,Y(U,q,le,Re);case fe:var Oe=le._init;return ye(q,U,K,Oe(le._payload),Re)}if(Be(le)||Z(le))return q=q.get(K)||null,re(U,q,le,Re,null);pl(U,le)}return null}function we(q,U,K,le){for(var Re=null,Oe=null,Te=U,Me=U=0,Pt=null;Te!==null&&Me<K.length;Me++){Te.index>Me?(Pt=Te,Te=null):Pt=Te.sibling;var Qe=te(q,Te,K[Me],le);if(Qe===null){Te===null&&(Te=Pt);break}t&&Te&&Qe.alternate===null&&r(q,Te),U=m(Qe,U,Me),Oe===null?Re=Qe:Oe.sibling=Qe,Oe=Qe,Te=Pt}if(Me===K.length)return i(q,Te),ut&&Lo(q,Me),Re;if(Te===null){for(;Me<K.length;Me++)Te=oe(q,K[Me],le),Te!==null&&(U=m(Te,U,Me),Oe===null?Re=Te:Oe.sibling=Te,Oe=Te);return ut&&Lo(q,Me),Re}for(Te=l(q,Te);Me<K.length;Me++)Pt=ye(Te,q,Me,K[Me],le),Pt!==null&&(t&&Pt.alternate!==null&&Te.delete(Pt.key===null?Me:Pt.key),U=m(Pt,U,Me),Oe===null?Re=Pt:Oe.sibling=Pt,Oe=Pt);return t&&Te.forEach(function(ao){return r(q,ao)}),ut&&Lo(q,Me),Re}function Ce(q,U,K,le){var Re=Z(K);if(typeof Re!="function")throw Error(o(150));if(K=Re.call(K),K==null)throw Error(o(151));for(var Oe=Re=null,Te=U,Me=U=0,Pt=null,Qe=K.next();Te!==null&&!Qe.done;Me++,Qe=K.next()){Te.index>Me?(Pt=Te,Te=null):Pt=Te.sibling;var ao=te(q,Te,Qe.value,le);if(ao===null){Te===null&&(Te=Pt);break}t&&Te&&ao.alternate===null&&r(q,Te),U=m(ao,U,Me),Oe===null?Re=ao:Oe.sibling=ao,Oe=ao,Te=Pt}if(Qe.done)return i(q,Te),ut&&Lo(q,Me),Re;if(Te===null){for(;!Qe.done;Me++,Qe=K.next())Qe=oe(q,Qe.value,le),Qe!==null&&(U=m(Qe,U,Me),Oe===null?Re=Qe:Oe.sibling=Qe,Oe=Qe);return ut&&Lo(q,Me),Re}for(Te=l(q,Te);!Qe.done;Me++,Qe=K.next())Qe=ye(Te,q,Me,Qe.value,le),Qe!==null&&(t&&Qe.alternate!==null&&Te.delete(Qe.key===null?Me:Qe.key),U=m(Qe,U,Me),Oe===null?Re=Qe:Oe.sibling=Qe,Oe=Qe);return t&&Te.forEach(function(U1){return r(q,U1)}),ut&&Lo(q,Me),Re}function gt(q,U,K,le){if(typeof K=="object"&&K!==null&&K.type===M&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case $:e:{for(var Re=K.key,Oe=U;Oe!==null;){if(Oe.key===Re){if(Re=K.type,Re===M){if(Oe.tag===7){i(q,Oe.sibling),U=d(Oe,K.props.children),U.return=q,q=U;break e}}else if(Oe.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===fe&&om(Re)===Oe.type){i(q,Oe.sibling),U=d(Oe,K.props),U.ref=qa(q,Oe,K),U.return=q,q=U;break e}i(q,Oe);break}else r(q,Oe);Oe=Oe.sibling}K.type===M?(U=Vo(K.props.children,q.mode,le,K.key),U.return=q,q=U):(le=Ll(K.type,K.key,K.props,null,q.mode,le),le.ref=qa(q,U,K),le.return=q,q=le)}return k(q);case A:e:{for(Oe=K.key;U!==null;){if(U.key===Oe)if(U.tag===4&&U.stateNode.containerInfo===K.containerInfo&&U.stateNode.implementation===K.implementation){i(q,U.sibling),U=d(U,K.children||[]),U.return=q,q=U;break e}else{i(q,U);break}else r(q,U);U=U.sibling}U=Sd(K,q.mode,le),U.return=q,q=U}return k(q);case fe:return Oe=K._init,gt(q,U,Oe(K._payload),le)}if(Be(K))return we(q,U,K,le);if(Z(K))return Ce(q,U,K,le);pl(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,U!==null&&U.tag===6?(i(q,U.sibling),U=d(U,K),U.return=q,q=U):(i(q,U),U=bd(K,q.mode,le),U.return=q,q=U),k(q)):i(q,U)}return gt}var Ti=im(!0),am=im(!1),hl=Gn(null),ml=null,ji=null,Tc=null;function jc(){Tc=ji=ml=null}function Ac(t){var r=hl.current;it(hl),t._currentValue=r}function Ic(t,r,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===i)break;t=t.return}}function Ai(t,r){ml=t,Tc=ji=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(tr=!0),t.firstContext=null)}function wr(t){var r=t._currentValue;if(Tc!==t)if(t={context:t,memoizedValue:r,next:null},ji===null){if(ml===null)throw Error(o(308));ji=t,ml.dependencies={lanes:0,firstContext:t}}else ji=ji.next=t;return r}var Fo=null;function Mc(t){Fo===null?Fo=[t]:Fo.push(t)}function sm(t,r,i,l){var d=r.interleaved;return d===null?(i.next=i,Mc(r)):(i.next=d.next,d.next=i),r.interleaved=i,yn(t,l)}function yn(t,r){t.lanes|=r;var i=t.alternate;for(i!==null&&(i.lanes|=r),i=t,t=t.return;t!==null;)t.childLanes|=r,i=t.alternate,i!==null&&(i.childLanes|=r),i=t,t=t.return;return i.tag===3?i.stateNode:null}var Jn=!1;function Dc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lm(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function gn(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function Zn(t,r,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,yn(t,i)}return d=l.interleaved,d===null?(r.next=r,Mc(l)):(r.next=d.next,d.next=r),l.interleaved=r,yn(t,i)}function vl(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,Yu(t,i)}}function um(t,r){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var k={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};m===null?d=m=k:m=m.next=k,i=i.next}while(i!==null);m===null?d=m=r:m=m.next=r}else d=m=r;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:l.shared,effects:l.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}function yl(t,r,i,l){var d=t.updateQueue;Jn=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,I=d.shared.pending;if(I!==null){d.shared.pending=null;var F=I,Y=F.next;F.next=null,k===null?m=Y:k.next=Y,k=F;var re=t.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==k&&(I===null?re.firstBaseUpdate=Y:I.next=Y,re.lastBaseUpdate=F))}if(m!==null){var oe=d.baseState;k=0,re=Y=F=null,I=m;do{var te=I.lane,ye=I.eventTime;if((l&te)===te){re!==null&&(re=re.next={eventTime:ye,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var we=t,Ce=I;switch(te=r,ye=i,Ce.tag){case 1:if(we=Ce.payload,typeof we=="function"){oe=we.call(ye,oe,te);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ce.payload,te=typeof we=="function"?we.call(ye,oe,te):we,te==null)break e;oe=B({},oe,te);break e;case 2:Jn=!0}}I.callback!==null&&I.lane!==0&&(t.flags|=64,te=d.effects,te===null?d.effects=[I]:te.push(I))}else ye={eventTime:ye,lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(Y=re=ye,F=oe):re=re.next=ye,k|=te;if(I=I.next,I===null){if(I=d.shared.pending,I===null)break;te=I,I=te.next,te.next=null,d.lastBaseUpdate=te,d.shared.pending=null}}while(!0);if(re===null&&(F=oe),d.baseState=F,d.firstBaseUpdate=Y,d.lastBaseUpdate=re,r=d.shared.interleaved,r!==null){d=r;do k|=d.lane,d=d.next;while(d!==r)}else m===null&&(d.shared.lanes=0);Uo|=k,t.lanes=k,t.memoizedState=oe}}function cm(t,r,i){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var l=t[r],d=l.callback;if(d!==null){if(l.callback=null,l=i,typeof d!="function")throw Error(o(191,d));d.call(l)}}}var Va={},Xr=Gn(Va),Ka=Gn(Va),Ha=Gn(Va);function $o(t){if(t===Va)throw Error(o(174));return t}function Lc(t,r){switch(nt(Ha,r),nt(Ka,t),nt(Xr,Va),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:lt(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=lt(r,t)}it(Xr),nt(Xr,r)}function Ii(){it(Xr),it(Ka),it(Ha)}function dm(t){$o(Ha.current);var r=$o(Xr.current),i=lt(r,t.type);r!==i&&(nt(Ka,t),nt(Xr,i))}function Fc(t){Ka.current===t&&(it(Xr),it(Ka))}var ft=Gn(0);function gl(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var $c=[];function zc(){for(var t=0;t<$c.length;t++)$c[t]._workInProgressVersionPrimary=null;$c.length=0}var xl=T.ReactCurrentDispatcher,Uc=T.ReactCurrentBatchConfig,zo=0,pt=null,bt=null,kt=null,wl=!1,Qa=!1,Ga=0,u1=0;function Lt(){throw Error(o(321))}function Bc(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!Ir(t[i],r[i]))return!1;return!0}function Wc(t,r,i,l,d,m){if(zo=m,pt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,xl.current=t===null||t.memoizedState===null?p1:h1,t=i(l,d),Qa){m=0;do{if(Qa=!1,Ga=0,25<=m)throw Error(o(301));m+=1,kt=bt=null,r.updateQueue=null,xl.current=m1,t=i(l,d)}while(Qa)}if(xl.current=Cl,r=bt!==null&&bt.next!==null,zo=0,kt=bt=pt=null,wl=!1,r)throw Error(o(300));return t}function qc(){var t=Ga!==0;return Ga=0,t}function Jr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?pt.memoizedState=kt=t:kt=kt.next=t,kt}function br(){if(bt===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=bt.next;var r=kt===null?pt.memoizedState:kt.next;if(r!==null)kt=r,bt=t;else{if(t===null)throw Error(o(310));bt=t,t={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},kt===null?pt.memoizedState=kt=t:kt=kt.next=t}return kt}function Ya(t,r){return typeof r=="function"?r(t):r}function Vc(t){var r=br(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=bt,d=l.baseQueue,m=i.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}l.baseQueue=d=m,i.pending=null}if(d!==null){m=d.next,l=l.baseState;var I=k=null,F=null,Y=m;do{var re=Y.lane;if((zo&re)===re)F!==null&&(F=F.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),l=Y.hasEagerState?Y.eagerState:t(l,Y.action);else{var oe={lane:re,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};F===null?(I=F=oe,k=l):F=F.next=oe,pt.lanes|=re,Uo|=re}Y=Y.next}while(Y!==null&&Y!==m);F===null?k=l:F.next=I,Ir(l,r.memoizedState)||(tr=!0),r.memoizedState=l,r.baseState=k,r.baseQueue=F,i.lastRenderedState=l}if(t=i.interleaved,t!==null){d=t;do m=d.lane,pt.lanes|=m,Uo|=m,d=d.next;while(d!==t)}else d===null&&(i.lanes=0);return[r.memoizedState,i.dispatch]}function Kc(t){var r=br(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=i.dispatch,d=i.pending,m=r.memoizedState;if(d!==null){i.pending=null;var k=d=d.next;do m=t(m,k.action),k=k.next;while(k!==d);Ir(m,r.memoizedState)||(tr=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,l]}function fm(){}function pm(t,r){var i=pt,l=br(),d=r(),m=!Ir(l.memoizedState,d);if(m&&(l.memoizedState=d,tr=!0),l=l.queue,Hc(vm.bind(null,i,l,t),[t]),l.getSnapshot!==r||m||kt!==null&&kt.memoizedState.tag&1){if(i.flags|=2048,Xa(9,mm.bind(null,i,l,d,r),void 0,null),Rt===null)throw Error(o(349));(zo&30)!==0||hm(i,r,d)}return d}function hm(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=pt.updateQueue,r===null?(r={lastEffect:null,stores:null},pt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function mm(t,r,i,l){r.value=i,r.getSnapshot=l,ym(r)&&gm(t)}function vm(t,r,i){return i(function(){ym(r)&&gm(t)})}function ym(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!Ir(t,i)}catch{return!0}}function gm(t){var r=yn(t,1);r!==null&&$r(r,t,1,-1)}function xm(t){var r=Jr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ya,lastRenderedState:t},r.queue=t,t=t.dispatch=f1.bind(null,pt,t),[r.memoizedState,t]}function Xa(t,r,i,l){return t={tag:t,create:r,destroy:i,deps:l,next:null},r=pt.updateQueue,r===null?(r={lastEffect:null,stores:null},pt.updateQueue=r,r.lastEffect=t.next=t):(i=r.lastEffect,i===null?r.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,r.lastEffect=t)),t}function wm(){return br().memoizedState}function bl(t,r,i,l){var d=Jr();pt.flags|=t,d.memoizedState=Xa(1|r,i,void 0,l===void 0?null:l)}function Sl(t,r,i,l){var d=br();l=l===void 0?null:l;var m=void 0;if(bt!==null){var k=bt.memoizedState;if(m=k.destroy,l!==null&&Bc(l,k.deps)){d.memoizedState=Xa(r,i,m,l);return}}pt.flags|=t,d.memoizedState=Xa(1|r,i,m,l)}function bm(t,r){return bl(8390656,8,t,r)}function Hc(t,r){return Sl(2048,8,t,r)}function Sm(t,r){return Sl(4,2,t,r)}function Cm(t,r){return Sl(4,4,t,r)}function Em(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function km(t,r,i){return i=i!=null?i.concat([t]):null,Sl(4,4,Em.bind(null,r,t),i)}function Qc(){}function Rm(t,r){var i=br();r=r===void 0?null:r;var l=i.memoizedState;return l!==null&&r!==null&&Bc(r,l[1])?l[0]:(i.memoizedState=[t,r],t)}function Pm(t,r){var i=br();r=r===void 0?null:r;var l=i.memoizedState;return l!==null&&r!==null&&Bc(r,l[1])?l[0]:(t=t(),i.memoizedState=[t,r],t)}function Nm(t,r,i){return(zo&21)===0?(t.baseState&&(t.baseState=!1,tr=!0),t.memoizedState=i):(Ir(i,r)||(i=oh(),pt.lanes|=i,Uo|=i,t.baseState=!0),r)}function c1(t,r){var i=Ze;Ze=i!==0&&4>i?i:4,t(!0);var l=Uc.transition;Uc.transition={};try{t(!1),r()}finally{Ze=i,Uc.transition=l}}function _m(){return br().memoizedState}function d1(t,r,i){var l=no(t);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},Om(t))Tm(r,i);else if(i=sm(t,r,i,l),i!==null){var d=qt();$r(i,t,l,d),jm(i,r,l)}}function f1(t,r,i){var l=no(t),d={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(Om(t))Tm(r,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var k=r.lastRenderedState,I=m(k,i);if(d.hasEagerState=!0,d.eagerState=I,Ir(I,k)){var F=r.interleaved;F===null?(d.next=d,Mc(r)):(d.next=F.next,F.next=d),r.interleaved=d;return}}catch{}finally{}i=sm(t,r,d,l),i!==null&&(d=qt(),$r(i,t,l,d),jm(i,r,l))}}function Om(t){var r=t.alternate;return t===pt||r!==null&&r===pt}function Tm(t,r){Qa=wl=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function jm(t,r,i){if((i&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,Yu(t,i)}}var Cl={readContext:wr,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},p1={readContext:wr,useCallback:function(t,r){return Jr().memoizedState=[t,r===void 0?null:r],t},useContext:wr,useEffect:bm,useImperativeHandle:function(t,r,i){return i=i!=null?i.concat([t]):null,bl(4194308,4,Em.bind(null,r,t),i)},useLayoutEffect:function(t,r){return bl(4194308,4,t,r)},useInsertionEffect:function(t,r){return bl(4,2,t,r)},useMemo:function(t,r){var i=Jr();return r=r===void 0?null:r,t=t(),i.memoizedState=[t,r],t},useReducer:function(t,r,i){var l=Jr();return r=i!==void 0?i(r):r,l.memoizedState=l.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},l.queue=t,t=t.dispatch=d1.bind(null,pt,t),[l.memoizedState,t]},useRef:function(t){var r=Jr();return t={current:t},r.memoizedState=t},useState:xm,useDebugValue:Qc,useDeferredValue:function(t){return Jr().memoizedState=t},useTransition:function(){var t=xm(!1),r=t[0];return t=c1.bind(null,t[1]),Jr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,i){var l=pt,d=Jr();if(ut){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Rt===null)throw Error(o(349));(zo&30)!==0||hm(l,r,i)}d.memoizedState=i;var m={value:i,getSnapshot:r};return d.queue=m,bm(vm.bind(null,l,m,t),[t]),l.flags|=2048,Xa(9,mm.bind(null,l,m,i,r),void 0,null),i},useId:function(){var t=Jr(),r=Rt.identifierPrefix;if(ut){var i=vn,l=mn;i=(l&~(1<<32-Ar(l)-1)).toString(32)+i,r=":"+r+"R"+i,i=Ga++,0<i&&(r+="H"+i.toString(32)),r+=":"}else i=u1++,r=":"+r+"r"+i.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},h1={readContext:wr,useCallback:Rm,useContext:wr,useEffect:Hc,useImperativeHandle:km,useInsertionEffect:Sm,useLayoutEffect:Cm,useMemo:Pm,useReducer:Vc,useRef:wm,useState:function(){return Vc(Ya)},useDebugValue:Qc,useDeferredValue:function(t){var r=br();return Nm(r,bt.memoizedState,t)},useTransition:function(){var t=Vc(Ya)[0],r=br().memoizedState;return[t,r]},useMutableSource:fm,useSyncExternalStore:pm,useId:_m,unstable_isNewReconciler:!1},m1={readContext:wr,useCallback:Rm,useContext:wr,useEffect:Hc,useImperativeHandle:km,useInsertionEffect:Sm,useLayoutEffect:Cm,useMemo:Pm,useReducer:Kc,useRef:wm,useState:function(){return Kc(Ya)},useDebugValue:Qc,useDeferredValue:function(t){var r=br();return bt===null?r.memoizedState=t:Nm(r,bt.memoizedState,t)},useTransition:function(){var t=Kc(Ya)[0],r=br().memoizedState;return[t,r]},useMutableSource:fm,useSyncExternalStore:pm,useId:_m,unstable_isNewReconciler:!1};function Dr(t,r){if(t&&t.defaultProps){r=B({},r),t=t.defaultProps;for(var i in t)r[i]===void 0&&(r[i]=t[i]);return r}return r}function Gc(t,r,i,l){r=t.memoizedState,i=i(l,r),i=i==null?r:B({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var El={isMounted:function(t){return(t=t._reactInternals)?jr(t)===t:!1},enqueueSetState:function(t,r,i){t=t._reactInternals;var l=qt(),d=no(t),m=gn(l,d);m.payload=r,i!=null&&(m.callback=i),r=Zn(t,m,d),r!==null&&($r(r,t,d,l),vl(r,t,d))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var l=qt(),d=no(t),m=gn(l,d);m.tag=1,m.payload=r,i!=null&&(m.callback=i),r=Zn(t,m,d),r!==null&&($r(r,t,d,l),vl(r,t,d))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=qt(),l=no(t),d=gn(i,l);d.tag=2,r!=null&&(d.callback=r),r=Zn(t,d,l),r!==null&&($r(r,t,l,i),vl(r,t,l))}};function Am(t,r,i,l,d,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,k):r.prototype&&r.prototype.isPureReactComponent?!La(i,l)||!La(d,m):!0}function Im(t,r,i){var l=!1,d=Yn,m=r.contextType;return typeof m=="object"&&m!==null?m=wr(m):(d=er(r)?Mo:Dt.current,l=r.contextTypes,m=(l=l!=null)?Pi(t,d):Yn),r=new r(i,m),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=El,t.stateNode=r,r._reactInternals=t,l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=d,t.__reactInternalMemoizedMaskedChildContext=m),r}function Mm(t,r,i,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==t&&El.enqueueReplaceState(r,r.state,null)}function Yc(t,r,i,l){var d=t.stateNode;d.props=i,d.state=t.memoizedState,d.refs={},Dc(t);var m=r.contextType;typeof m=="object"&&m!==null?d.context=wr(m):(m=er(r)?Mo:Dt.current,d.context=Pi(t,m)),d.state=t.memoizedState,m=r.getDerivedStateFromProps,typeof m=="function"&&(Gc(t,r,m,i),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(r=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),r!==d.state&&El.enqueueReplaceState(d,d.state,null),yl(t,i,d,l),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308)}function Mi(t,r){try{var i="",l=r;do i+=se(l),l=l.return;while(l);var d=i}catch(m){d=`
39
+ Error generating stack: `+m.message+`
40
+ `+m.stack}return{value:t,source:r,stack:d,digest:null}}function Xc(t,r,i){return{value:t,source:null,stack:i??null,digest:r??null}}function Jc(t,r){try{console.error(r.value)}catch(i){setTimeout(function(){throw i})}}var v1=typeof WeakMap=="function"?WeakMap:Map;function Dm(t,r,i){i=gn(-1,i),i.tag=3,i.payload={element:null};var l=r.value;return i.callback=function(){Tl||(Tl=!0,pd=l),Jc(t,r)},i}function Lm(t,r,i){i=gn(-1,i),i.tag=3;var l=t.type.getDerivedStateFromError;if(typeof l=="function"){var d=r.value;i.payload=function(){return l(d)},i.callback=function(){Jc(t,r)}}var m=t.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(i.callback=function(){Jc(t,r),typeof l!="function"&&(to===null?to=new Set([this]):to.add(this));var k=r.stack;this.componentDidCatch(r.value,{componentStack:k!==null?k:""})}),i}function Fm(t,r,i){var l=t.pingCache;if(l===null){l=t.pingCache=new v1;var d=new Set;l.set(r,d)}else d=l.get(r),d===void 0&&(d=new Set,l.set(r,d));d.has(i)||(d.add(i),t=O1.bind(null,t,r,i),r.then(t,t))}function $m(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function zm(t,r,i,l,d){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(r=gn(-1,1),r.tag=2,Zn(i,r,1))),i.lanes|=1),t):(t.flags|=65536,t.lanes=d,t)}var y1=T.ReactCurrentOwner,tr=!1;function Wt(t,r,i,l){r.child=t===null?am(r,null,i,l):Ti(r,t.child,i,l)}function Um(t,r,i,l,d){i=i.render;var m=r.ref;return Ai(r,d),l=Wc(t,r,i,l,m,d),i=qc(),t!==null&&!tr?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,xn(t,r,d)):(ut&&i&&Rc(r),r.flags|=1,Wt(t,r,l,d),r.child)}function Bm(t,r,i,l,d){if(t===null){var m=i.type;return typeof m=="function"&&!wd(m)&&m.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(r.tag=15,r.type=m,Wm(t,r,m,l,d)):(t=Ll(i.type,null,l,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,(t.lanes&d)===0){var k=m.memoizedProps;if(i=i.compare,i=i!==null?i:La,i(k,l)&&t.ref===r.ref)return xn(t,r,d)}return r.flags|=1,t=io(m,l),t.ref=r.ref,t.return=r,r.child=t}function Wm(t,r,i,l,d){if(t!==null){var m=t.memoizedProps;if(La(m,l)&&t.ref===r.ref)if(tr=!1,r.pendingProps=l=m,(t.lanes&d)!==0)(t.flags&131072)!==0&&(tr=!0);else return r.lanes=t.lanes,xn(t,r,d)}return Zc(t,r,i,l,d)}function qm(t,r,i){var l=r.pendingProps,d=l.children,m=t!==null?t.memoizedState:null;if(l.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(Li,hr),hr|=i;else{if((i&1073741824)===0)return t=m!==null?m.baseLanes|i:i,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,nt(Li,hr),hr|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=m!==null?m.baseLanes:i,nt(Li,hr),hr|=l}else m!==null?(l=m.baseLanes|i,r.memoizedState=null):l=i,nt(Li,hr),hr|=l;return Wt(t,r,d,i),r.child}function Vm(t,r){var i=r.ref;(t===null&&i!==null||t!==null&&t.ref!==i)&&(r.flags|=512,r.flags|=2097152)}function Zc(t,r,i,l,d){var m=er(i)?Mo:Dt.current;return m=Pi(r,m),Ai(r,d),i=Wc(t,r,i,l,m,d),l=qc(),t!==null&&!tr?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,xn(t,r,d)):(ut&&l&&Rc(r),r.flags|=1,Wt(t,r,i,d),r.child)}function Km(t,r,i,l,d){if(er(i)){var m=!0;ll(r)}else m=!1;if(Ai(r,d),r.stateNode===null)Rl(t,r),Im(r,i,l),Yc(r,i,l,d),l=!0;else if(t===null){var k=r.stateNode,I=r.memoizedProps;k.props=I;var F=k.context,Y=i.contextType;typeof Y=="object"&&Y!==null?Y=wr(Y):(Y=er(i)?Mo:Dt.current,Y=Pi(r,Y));var re=i.getDerivedStateFromProps,oe=typeof re=="function"||typeof k.getSnapshotBeforeUpdate=="function";oe||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==l||F!==Y)&&Mm(r,k,l,Y),Jn=!1;var te=r.memoizedState;k.state=te,yl(r,l,k,d),F=r.memoizedState,I!==l||te!==F||Zt.current||Jn?(typeof re=="function"&&(Gc(r,i,re,l),F=r.memoizedState),(I=Jn||Am(r,i,I,l,te,F,Y))?(oe||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(r.flags|=4194308)):(typeof k.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=F),k.props=l,k.state=F,k.context=Y,l=I):(typeof k.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{k=r.stateNode,lm(t,r),I=r.memoizedProps,Y=r.type===r.elementType?I:Dr(r.type,I),k.props=Y,oe=r.pendingProps,te=k.context,F=i.contextType,typeof F=="object"&&F!==null?F=wr(F):(F=er(i)?Mo:Dt.current,F=Pi(r,F));var ye=i.getDerivedStateFromProps;(re=typeof ye=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==oe||te!==F)&&Mm(r,k,l,F),Jn=!1,te=r.memoizedState,k.state=te,yl(r,l,k,d);var we=r.memoizedState;I!==oe||te!==we||Zt.current||Jn?(typeof ye=="function"&&(Gc(r,i,ye,l),we=r.memoizedState),(Y=Jn||Am(r,i,Y,l,te,we,F)||!1)?(re||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(l,we,F),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(l,we,F)),typeof k.componentDidUpdate=="function"&&(r.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof k.componentDidUpdate!="function"||I===t.memoizedProps&&te===t.memoizedState||(r.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===t.memoizedProps&&te===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=we),k.props=l,k.state=we,k.context=F,l=Y):(typeof k.componentDidUpdate!="function"||I===t.memoizedProps&&te===t.memoizedState||(r.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===t.memoizedProps&&te===t.memoizedState||(r.flags|=1024),l=!1)}return ed(t,r,i,l,m,d)}function ed(t,r,i,l,d,m){Vm(t,r);var k=(r.flags&128)!==0;if(!l&&!k)return d&&Xh(r,i,!1),xn(t,r,m);l=r.stateNode,y1.current=r;var I=k&&typeof i.getDerivedStateFromError!="function"?null:l.render();return r.flags|=1,t!==null&&k?(r.child=Ti(r,t.child,null,m),r.child=Ti(r,null,I,m)):Wt(t,r,I,m),r.memoizedState=l.state,d&&Xh(r,i,!0),r.child}function Hm(t){var r=t.stateNode;r.pendingContext?Gh(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Gh(t,r.context,!1),Lc(t,r.containerInfo)}function Qm(t,r,i,l,d){return Oi(),Oc(d),r.flags|=256,Wt(t,r,i,l),r.child}var td={dehydrated:null,treeContext:null,retryLane:0};function rd(t){return{baseLanes:t,cachePool:null,transitions:null}}function Gm(t,r,i){var l=r.pendingProps,d=ft.current,m=!1,k=(r.flags&128)!==0,I;if((I=k)||(I=t!==null&&t.memoizedState===null?!1:(d&2)!==0),I?(m=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(d|=1),nt(ft,d&1),t===null)return _c(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(k=l.children,t=l.fallback,m?(l=r.mode,m=r.child,k={mode:"hidden",children:k},(l&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=k):m=Fl(k,l,0,null),t=Vo(t,l,i,null),m.return=r,t.return=r,m.sibling=t,r.child=m,r.child.memoizedState=rd(i),r.memoizedState=td,t):nd(r,k));if(d=t.memoizedState,d!==null&&(I=d.dehydrated,I!==null))return g1(t,r,k,l,I,d,i);if(m){m=l.fallback,k=r.mode,d=t.child,I=d.sibling;var F={mode:"hidden",children:l.children};return(k&1)===0&&r.child!==d?(l=r.child,l.childLanes=0,l.pendingProps=F,r.deletions=null):(l=io(d,F),l.subtreeFlags=d.subtreeFlags&14680064),I!==null?m=io(I,m):(m=Vo(m,k,i,null),m.flags|=2),m.return=r,l.return=r,l.sibling=m,r.child=l,l=m,m=r.child,k=t.child.memoizedState,k=k===null?rd(i):{baseLanes:k.baseLanes|i,cachePool:null,transitions:k.transitions},m.memoizedState=k,m.childLanes=t.childLanes&~i,r.memoizedState=td,l}return m=t.child,t=m.sibling,l=io(m,{mode:"visible",children:l.children}),(r.mode&1)===0&&(l.lanes=i),l.return=r,l.sibling=null,t!==null&&(i=r.deletions,i===null?(r.deletions=[t],r.flags|=16):i.push(t)),r.child=l,r.memoizedState=null,l}function nd(t,r){return r=Fl({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function kl(t,r,i,l){return l!==null&&Oc(l),Ti(r,t.child,null,i),t=nd(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function g1(t,r,i,l,d,m,k){if(i)return r.flags&256?(r.flags&=-257,l=Xc(Error(o(422))),kl(t,r,k,l)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(m=l.fallback,d=r.mode,l=Fl({mode:"visible",children:l.children},d,0,null),m=Vo(m,d,k,null),m.flags|=2,l.return=r,m.return=r,l.sibling=m,r.child=l,(r.mode&1)!==0&&Ti(r,t.child,null,k),r.child.memoizedState=rd(k),r.memoizedState=td,m);if((r.mode&1)===0)return kl(t,r,k,null);if(d.data==="$!"){if(l=d.nextSibling&&d.nextSibling.dataset,l)var I=l.dgst;return l=I,m=Error(o(419)),l=Xc(m,l,void 0),kl(t,r,k,l)}if(I=(k&t.childLanes)!==0,tr||I){if(l=Rt,l!==null){switch(k&-k){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(l.suspendedLanes|k))!==0?0:d,d!==0&&d!==m.retryLane&&(m.retryLane=d,yn(t,d),$r(l,t,d,-1))}return xd(),l=Xc(Error(o(421))),kl(t,r,k,l)}return d.data==="$?"?(r.flags|=128,r.child=t.child,r=T1.bind(null,t),d._reactRetry=r,null):(t=m.treeContext,pr=Qn(d.nextSibling),fr=r,ut=!0,Mr=null,t!==null&&(gr[xr++]=mn,gr[xr++]=vn,gr[xr++]=Do,mn=t.id,vn=t.overflow,Do=r),r=nd(r,l.children),r.flags|=4096,r)}function Ym(t,r,i){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),Ic(t.return,r,i)}function od(t,r,i,l,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d}:(m.isBackwards=r,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=i,m.tailMode=d)}function Xm(t,r,i){var l=r.pendingProps,d=l.revealOrder,m=l.tail;if(Wt(t,r,l.children,i),l=ft.current,(l&2)!==0)l=l&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ym(t,i,r);else if(t.tag===19)Ym(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}if(nt(ft,l),(r.mode&1)===0)r.memoizedState=null;else switch(d){case"forwards":for(i=r.child,d=null;i!==null;)t=i.alternate,t!==null&&gl(t)===null&&(d=i),i=i.sibling;i=d,i===null?(d=r.child,r.child=null):(d=i.sibling,i.sibling=null),od(r,!1,d,i,m);break;case"backwards":for(i=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&gl(t)===null){r.child=d;break}t=d.sibling,d.sibling=i,i=d,d=t}od(r,!0,i,null,m);break;case"together":od(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Rl(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function xn(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),Uo|=r.lanes,(i&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=io(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=io(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function x1(t,r,i){switch(r.tag){case 3:Hm(r),Oi();break;case 5:dm(r);break;case 1:er(r.type)&&ll(r);break;case 4:Lc(r,r.stateNode.containerInfo);break;case 10:var l=r.type._context,d=r.memoizedProps.value;nt(hl,l._currentValue),l._currentValue=d;break;case 13:if(l=r.memoizedState,l!==null)return l.dehydrated!==null?(nt(ft,ft.current&1),r.flags|=128,null):(i&r.child.childLanes)!==0?Gm(t,r,i):(nt(ft,ft.current&1),t=xn(t,r,i),t!==null?t.sibling:null);nt(ft,ft.current&1);break;case 19:if(l=(i&r.childLanes)!==0,(t.flags&128)!==0){if(l)return Xm(t,r,i);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),nt(ft,ft.current),l)break;return null;case 22:case 23:return r.lanes=0,qm(t,r,i)}return xn(t,r,i)}var Jm,id,Zm,ev;Jm=function(t,r){for(var i=r.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},id=function(){},Zm=function(t,r,i,l){var d=t.memoizedProps;if(d!==l){t=r.stateNode,$o(Xr.current);var m=null;switch(i){case"input":d=_e(t,d),l=_e(t,l),m=[];break;case"select":d=B({},d,{value:void 0}),l=B({},l,{value:void 0}),m=[];break;case"textarea":d=st(t,d),l=st(t,l),m=[];break;default:typeof d.onClick!="function"&&typeof l.onClick=="function"&&(t.onclick=il)}Q(i,l);var k;i=null;for(Y in d)if(!l.hasOwnProperty(Y)&&d.hasOwnProperty(Y)&&d[Y]!=null)if(Y==="style"){var I=d[Y];for(k in I)I.hasOwnProperty(k)&&(i||(i={}),i[k]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(s.hasOwnProperty(Y)?m||(m=[]):(m=m||[]).push(Y,null));for(Y in l){var F=l[Y];if(I=d!=null?d[Y]:void 0,l.hasOwnProperty(Y)&&F!==I&&(F!=null||I!=null))if(Y==="style")if(I){for(k in I)!I.hasOwnProperty(k)||F&&F.hasOwnProperty(k)||(i||(i={}),i[k]="");for(k in F)F.hasOwnProperty(k)&&I[k]!==F[k]&&(i||(i={}),i[k]=F[k])}else i||(m||(m=[]),m.push(Y,i)),i=F;else Y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,I=I?I.__html:void 0,F!=null&&I!==F&&(m=m||[]).push(Y,F)):Y==="children"?typeof F!="string"&&typeof F!="number"||(m=m||[]).push(Y,""+F):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(s.hasOwnProperty(Y)?(F!=null&&Y==="onScroll"&&ot("scroll",t),m||I===F||(m=[])):(m=m||[]).push(Y,F))}i&&(m=m||[]).push("style",i);var Y=m;(r.updateQueue=Y)&&(r.flags|=4)}},ev=function(t,r,i,l){i!==l&&(r.flags|=4)};function Ja(t,r){if(!ut)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Ft(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(r)for(var d=t.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&14680064,l|=d.flags&14680064,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=i,r}function w1(t,r,i){var l=r.pendingProps;switch(Pc(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(r),null;case 1:return er(r.type)&&sl(),Ft(r),null;case 3:return l=r.stateNode,Ii(),it(Zt),it(Dt),zc(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(fl(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Mr!==null&&(vd(Mr),Mr=null))),id(t,r),Ft(r),null;case 5:Fc(r);var d=$o(Ha.current);if(i=r.type,t!==null&&r.stateNode!=null)Zm(t,r,i,l,d),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Ft(r),null}if(t=$o(Xr.current),fl(r)){l=r.stateNode,i=r.type;var m=r.memoizedProps;switch(l[Yr]=r,l[Ba]=m,t=(r.mode&1)!==0,i){case"dialog":ot("cancel",l),ot("close",l);break;case"iframe":case"object":case"embed":ot("load",l);break;case"video":case"audio":for(d=0;d<$a.length;d++)ot($a[d],l);break;case"source":ot("error",l);break;case"img":case"image":case"link":ot("error",l),ot("load",l);break;case"details":ot("toggle",l);break;case"input":Ie(l,m),ot("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!m.multiple},ot("invalid",l);break;case"textarea":_t(l,m),ot("invalid",l)}Q(i,m),d=null;for(var k in m)if(m.hasOwnProperty(k)){var I=m[k];k==="children"?typeof I=="string"?l.textContent!==I&&(m.suppressHydrationWarning!==!0&&ol(l.textContent,I,t),d=["children",I]):typeof I=="number"&&l.textContent!==""+I&&(m.suppressHydrationWarning!==!0&&ol(l.textContent,I,t),d=["children",""+I]):s.hasOwnProperty(k)&&I!=null&&k==="onScroll"&&ot("scroll",l)}switch(i){case"input":me(l),Ae(l,m,!0);break;case"textarea":me(l),vt(l);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(l.onclick=il)}l=d,r.updateQueue=l,l!==null&&(r.flags|=4)}else{k=d.nodeType===9?d:d.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=rt(i)),t==="http://www.w3.org/1999/xhtml"?i==="script"?(t=k.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=k.createElement(i,{is:l.is}):(t=k.createElement(i),i==="select"&&(k=t,l.multiple?k.multiple=!0:l.size&&(k.size=l.size))):t=k.createElementNS(t,i),t[Yr]=r,t[Ba]=l,Jm(t,r,!1,!1),r.stateNode=t;e:{switch(k=X(i,l),i){case"dialog":ot("cancel",t),ot("close",t),d=l;break;case"iframe":case"object":case"embed":ot("load",t),d=l;break;case"video":case"audio":for(d=0;d<$a.length;d++)ot($a[d],t);d=l;break;case"source":ot("error",t),d=l;break;case"img":case"image":case"link":ot("error",t),ot("load",t),d=l;break;case"details":ot("toggle",t),d=l;break;case"input":Ie(t,l),d=_e(t,l),ot("invalid",t);break;case"option":d=l;break;case"select":t._wrapperState={wasMultiple:!!l.multiple},d=B({},l,{value:void 0}),ot("invalid",t);break;case"textarea":_t(t,l),d=st(t,l),ot("invalid",t);break;default:d=l}Q(i,d),I=d;for(m in I)if(I.hasOwnProperty(m)){var F=I[m];m==="style"?yr(t,F):m==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Xt(t,F)):m==="children"?typeof F=="string"?(i!=="textarea"||F!=="")&&Jt(t,F):typeof F=="number"&&Jt(t,""+F):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(s.hasOwnProperty(m)?F!=null&&m==="onScroll"&&ot("scroll",t):F!=null&&O(t,m,F,k))}switch(i){case"input":me(t),Ae(t,l,!1);break;case"textarea":me(t),vt(t);break;case"option":l.value!=null&&t.setAttribute("value",""+pe(l.value));break;case"select":t.multiple=!!l.multiple,m=l.value,m!=null?He(t,!!l.multiple,m,!1):l.defaultValue!=null&&He(t,!!l.multiple,l.defaultValue,!0);break;default:typeof d.onClick=="function"&&(t.onclick=il)}switch(i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Ft(r),null;case 6:if(t&&r.stateNode!=null)ev(t,r,t.memoizedProps,l);else{if(typeof l!="string"&&r.stateNode===null)throw Error(o(166));if(i=$o(Ha.current),$o(Xr.current),fl(r)){if(l=r.stateNode,i=r.memoizedProps,l[Yr]=r,(m=l.nodeValue!==i)&&(t=fr,t!==null))switch(t.tag){case 3:ol(l.nodeValue,i,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ol(l.nodeValue,i,(t.mode&1)!==0)}m&&(r.flags|=4)}else l=(i.nodeType===9?i:i.ownerDocument).createTextNode(l),l[Yr]=r,r.stateNode=l}return Ft(r),null;case 13:if(it(ft),l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ut&&pr!==null&&(r.mode&1)!==0&&(r.flags&128)===0)nm(),Oi(),r.flags|=98560,m=!1;else if(m=fl(r),l!==null&&l.dehydrated!==null){if(t===null){if(!m)throw Error(o(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Yr]=r}else Oi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ft(r),m=!1}else Mr!==null&&(vd(Mr),Mr=null),m=!0;if(!m)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=i,r):(l=l!==null,l!==(t!==null&&t.memoizedState!==null)&&l&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(ft.current&1)!==0?St===0&&(St=3):xd())),r.updateQueue!==null&&(r.flags|=4),Ft(r),null);case 4:return Ii(),id(t,r),t===null&&za(r.stateNode.containerInfo),Ft(r),null;case 10:return Ac(r.type._context),Ft(r),null;case 17:return er(r.type)&&sl(),Ft(r),null;case 19:if(it(ft),m=r.memoizedState,m===null)return Ft(r),null;if(l=(r.flags&128)!==0,k=m.rendering,k===null)if(l)Ja(m,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(k=gl(t),k!==null){for(r.flags|=128,Ja(m,!1),l=k.updateQueue,l!==null&&(r.updateQueue=l,r.flags|=4),r.subtreeFlags=0,l=i,i=r.child;i!==null;)m=i,t=l,m.flags&=14680066,k=m.alternate,k===null?(m.childLanes=0,m.lanes=t,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=k.childLanes,m.lanes=k.lanes,m.child=k.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=k.memoizedProps,m.memoizedState=k.memoizedState,m.updateQueue=k.updateQueue,m.type=k.type,t=k.dependencies,m.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),i=i.sibling;return nt(ft,ft.current&1|2),r.child}t=t.sibling}m.tail!==null&&yt()>Fi&&(r.flags|=128,l=!0,Ja(m,!1),r.lanes=4194304)}else{if(!l)if(t=gl(k),t!==null){if(r.flags|=128,l=!0,i=t.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),Ja(m,!0),m.tail===null&&m.tailMode==="hidden"&&!k.alternate&&!ut)return Ft(r),null}else 2*yt()-m.renderingStartTime>Fi&&i!==1073741824&&(r.flags|=128,l=!0,Ja(m,!1),r.lanes=4194304);m.isBackwards?(k.sibling=r.child,r.child=k):(i=m.last,i!==null?i.sibling=k:r.child=k,m.last=k)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=yt(),r.sibling=null,i=ft.current,nt(ft,l?i&1|2:i&1),r):(Ft(r),null);case 22:case 23:return gd(),l=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(hr&1073741824)!==0&&(Ft(r),r.subtreeFlags&6&&(r.flags|=8192)):Ft(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function b1(t,r){switch(Pc(r),r.tag){case 1:return er(r.type)&&sl(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Ii(),it(Zt),it(Dt),zc(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Fc(r),null;case 13:if(it(ft),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Oi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return it(ft),null;case 4:return Ii(),null;case 10:return Ac(r.type._context),null;case 22:case 23:return gd(),null;case 24:return null;default:return null}}var Pl=!1,$t=!1,S1=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Di(t,r){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){ht(t,r,l)}else i.current=null}function ad(t,r,i){try{i()}catch(l){ht(t,r,l)}}var tv=!1;function C1(t,r){if(gc=Hs,t=Ah(),cc(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var k=0,I=-1,F=-1,Y=0,re=0,oe=t,te=null;t:for(;;){for(var ye;oe!==i||d!==0&&oe.nodeType!==3||(I=k+d),oe!==m||l!==0&&oe.nodeType!==3||(F=k+l),oe.nodeType===3&&(k+=oe.nodeValue.length),(ye=oe.firstChild)!==null;)te=oe,oe=ye;for(;;){if(oe===t)break t;if(te===i&&++Y===d&&(I=k),te===m&&++re===l&&(F=k),(ye=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=ye}i=I===-1||F===-1?null:{start:I,end:F}}else i=null}i=i||{start:0,end:0}}else i=null;for(xc={focusedElem:t,selectionRange:i},Hs=!1,ge=r;ge!==null;)if(r=ge,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ge=t;else for(;ge!==null;){r=ge;try{var we=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Ce=we.memoizedProps,gt=we.memoizedState,q=r.stateNode,U=q.getSnapshotBeforeUpdate(r.elementType===r.type?Ce:Dr(r.type,Ce),gt);q.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var K=r.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(le){ht(r,r.return,le)}if(t=r.sibling,t!==null){t.return=r.return,ge=t;break}ge=r.return}return we=tv,tv=!1,we}function Za(t,r,i){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&t)===t){var m=d.destroy;d.destroy=void 0,m!==void 0&&ad(r,i,m)}d=d.next}while(d!==l)}}function Nl(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var l=i.create;i.destroy=l()}i=i.next}while(i!==r)}}function sd(t){var r=t.ref;if(r!==null){var i=t.stateNode;switch(t.tag){case 5:t=i;break;default:t=i}typeof r=="function"?r(t):r.current=t}}function rv(t){var r=t.alternate;r!==null&&(t.alternate=null,rv(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[Yr],delete r[Ba],delete r[Cc],delete r[i1],delete r[a1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function nv(t){return t.tag===5||t.tag===3||t.tag===4}function ov(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||nv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ld(t,r,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(t,r):i.insertBefore(t,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(t,i)):(r=i,r.appendChild(t)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=il));else if(l!==4&&(t=t.child,t!==null))for(ld(t,r,i),t=t.sibling;t!==null;)ld(t,r,i),t=t.sibling}function ud(t,r,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(ud(t,r,i),t=t.sibling;t!==null;)ud(t,r,i),t=t.sibling}var Ot=null,Lr=!1;function eo(t,r,i){for(i=i.child;i!==null;)iv(t,r,i),i=i.sibling}function iv(t,r,i){if(Gr&&typeof Gr.onCommitFiberUnmount=="function")try{Gr.onCommitFiberUnmount(Us,i)}catch{}switch(i.tag){case 5:$t||Di(i,r);case 6:var l=Ot,d=Lr;Ot=null,eo(t,r,i),Ot=l,Lr=d,Ot!==null&&(Lr?(t=Ot,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):Ot.removeChild(i.stateNode));break;case 18:Ot!==null&&(Lr?(t=Ot,i=i.stateNode,t.nodeType===8?Sc(t.parentNode,i):t.nodeType===1&&Sc(t,i),Ta(t)):Sc(Ot,i.stateNode));break;case 4:l=Ot,d=Lr,Ot=i.stateNode.containerInfo,Lr=!0,eo(t,r,i),Ot=l,Lr=d;break;case 0:case 11:case 14:case 15:if(!$t&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){d=l=l.next;do{var m=d,k=m.destroy;m=m.tag,k!==void 0&&((m&2)!==0||(m&4)!==0)&&ad(i,r,k),d=d.next}while(d!==l)}eo(t,r,i);break;case 1:if(!$t&&(Di(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(I){ht(i,r,I)}eo(t,r,i);break;case 21:eo(t,r,i);break;case 22:i.mode&1?($t=(l=$t)||i.memoizedState!==null,eo(t,r,i),$t=l):eo(t,r,i);break;default:eo(t,r,i)}}function av(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new S1),r.forEach(function(l){var d=j1.bind(null,t,l);i.has(l)||(i.add(l),l.then(d,d))})}}function Fr(t,r){var i=r.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l];try{var m=t,k=r,I=k;e:for(;I!==null;){switch(I.tag){case 5:Ot=I.stateNode,Lr=!1;break e;case 3:Ot=I.stateNode.containerInfo,Lr=!0;break e;case 4:Ot=I.stateNode.containerInfo,Lr=!0;break e}I=I.return}if(Ot===null)throw Error(o(160));iv(m,k,d),Ot=null,Lr=!1;var F=d.alternate;F!==null&&(F.return=null),d.return=null}catch(Y){ht(d,r,Y)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)sv(r,t),r=r.sibling}function sv(t,r){var i=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Fr(r,t),Zr(t),l&4){try{Za(3,t,t.return),Nl(3,t)}catch(Ce){ht(t,t.return,Ce)}try{Za(5,t,t.return)}catch(Ce){ht(t,t.return,Ce)}}break;case 1:Fr(r,t),Zr(t),l&512&&i!==null&&Di(i,i.return);break;case 5:if(Fr(r,t),Zr(t),l&512&&i!==null&&Di(i,i.return),t.flags&32){var d=t.stateNode;try{Jt(d,"")}catch(Ce){ht(t,t.return,Ce)}}if(l&4&&(d=t.stateNode,d!=null)){var m=t.memoizedProps,k=i!==null?i.memoizedProps:m,I=t.type,F=t.updateQueue;if(t.updateQueue=null,F!==null)try{I==="input"&&m.type==="radio"&&m.name!=null&&ke(d,m),X(I,k);var Y=X(I,m);for(k=0;k<F.length;k+=2){var re=F[k],oe=F[k+1];re==="style"?yr(d,oe):re==="dangerouslySetInnerHTML"?Xt(d,oe):re==="children"?Jt(d,oe):O(d,re,oe,Y)}switch(I){case"input":Le(d,m);break;case"textarea":et(d,m);break;case"select":var te=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!m.multiple;var ye=m.value;ye!=null?He(d,!!m.multiple,ye,!1):te!==!!m.multiple&&(m.defaultValue!=null?He(d,!!m.multiple,m.defaultValue,!0):He(d,!!m.multiple,m.multiple?[]:"",!1))}d[Ba]=m}catch(Ce){ht(t,t.return,Ce)}}break;case 6:if(Fr(r,t),Zr(t),l&4){if(t.stateNode===null)throw Error(o(162));d=t.stateNode,m=t.memoizedProps;try{d.nodeValue=m}catch(Ce){ht(t,t.return,Ce)}}break;case 3:if(Fr(r,t),Zr(t),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Ta(r.containerInfo)}catch(Ce){ht(t,t.return,Ce)}break;case 4:Fr(r,t),Zr(t);break;case 13:Fr(r,t),Zr(t),d=t.child,d.flags&8192&&(m=d.memoizedState!==null,d.stateNode.isHidden=m,!m||d.alternate!==null&&d.alternate.memoizedState!==null||(fd=yt())),l&4&&av(t);break;case 22:if(re=i!==null&&i.memoizedState!==null,t.mode&1?($t=(Y=$t)||re,Fr(r,t),$t=Y):Fr(r,t),Zr(t),l&8192){if(Y=t.memoizedState!==null,(t.stateNode.isHidden=Y)&&!re&&(t.mode&1)!==0)for(ge=t,re=t.child;re!==null;){for(oe=ge=re;ge!==null;){switch(te=ge,ye=te.child,te.tag){case 0:case 11:case 14:case 15:Za(4,te,te.return);break;case 1:Di(te,te.return);var we=te.stateNode;if(typeof we.componentWillUnmount=="function"){l=te,i=te.return;try{r=l,we.props=r.memoizedProps,we.state=r.memoizedState,we.componentWillUnmount()}catch(Ce){ht(l,i,Ce)}}break;case 5:Di(te,te.return);break;case 22:if(te.memoizedState!==null){cv(oe);continue}}ye!==null?(ye.return=te,ge=ye):cv(oe)}re=re.sibling}e:for(re=null,oe=t;;){if(oe.tag===5){if(re===null){re=oe;try{d=oe.stateNode,Y?(m=d.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(I=oe.stateNode,F=oe.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null,I.style.display=cr("display",k))}catch(Ce){ht(t,t.return,Ce)}}}else if(oe.tag===6){if(re===null)try{oe.stateNode.nodeValue=Y?"":oe.memoizedProps}catch(Ce){ht(t,t.return,Ce)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===t)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===t)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===t)break e;re===oe&&(re=null),oe=oe.return}re===oe&&(re=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Fr(r,t),Zr(t),l&4&&av(t);break;case 21:break;default:Fr(r,t),Zr(t)}}function Zr(t){var r=t.flags;if(r&2){try{e:{for(var i=t.return;i!==null;){if(nv(i)){var l=i;break e}i=i.return}throw Error(o(160))}switch(l.tag){case 5:var d=l.stateNode;l.flags&32&&(Jt(d,""),l.flags&=-33);var m=ov(t);ud(t,m,d);break;case 3:case 4:var k=l.stateNode.containerInfo,I=ov(t);ld(t,I,k);break;default:throw Error(o(161))}}catch(F){ht(t,t.return,F)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function E1(t,r,i){ge=t,lv(t)}function lv(t,r,i){for(var l=(t.mode&1)!==0;ge!==null;){var d=ge,m=d.child;if(d.tag===22&&l){var k=d.memoizedState!==null||Pl;if(!k){var I=d.alternate,F=I!==null&&I.memoizedState!==null||$t;I=Pl;var Y=$t;if(Pl=k,($t=F)&&!Y)for(ge=d;ge!==null;)k=ge,F=k.child,k.tag===22&&k.memoizedState!==null?dv(d):F!==null?(F.return=k,ge=F):dv(d);for(;m!==null;)ge=m,lv(m),m=m.sibling;ge=d,Pl=I,$t=Y}uv(t)}else(d.subtreeFlags&8772)!==0&&m!==null?(m.return=d,ge=m):uv(t)}}function uv(t){for(;ge!==null;){var r=ge;if((r.flags&8772)!==0){var i=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:$t||Nl(5,r);break;case 1:var l=r.stateNode;if(r.flags&4&&!$t)if(i===null)l.componentDidMount();else{var d=r.elementType===r.type?i.memoizedProps:Dr(r.type,i.memoizedProps);l.componentDidUpdate(d,i.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var m=r.updateQueue;m!==null&&cm(r,m,l);break;case 3:var k=r.updateQueue;if(k!==null){if(i=null,r.child!==null)switch(r.child.tag){case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}cm(r,k,i)}break;case 5:var I=r.stateNode;if(i===null&&r.flags&4){i=I;var F=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&i.focus();break;case"img":F.src&&(i.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var Y=r.alternate;if(Y!==null){var re=Y.memoizedState;if(re!==null){var oe=re.dehydrated;oe!==null&&Ta(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}$t||r.flags&512&&sd(r)}catch(te){ht(r,r.return,te)}}if(r===t){ge=null;break}if(i=r.sibling,i!==null){i.return=r.return,ge=i;break}ge=r.return}}function cv(t){for(;ge!==null;){var r=ge;if(r===t){ge=null;break}var i=r.sibling;if(i!==null){i.return=r.return,ge=i;break}ge=r.return}}function dv(t){for(;ge!==null;){var r=ge;try{switch(r.tag){case 0:case 11:case 15:var i=r.return;try{Nl(4,r)}catch(F){ht(r,i,F)}break;case 1:var l=r.stateNode;if(typeof l.componentDidMount=="function"){var d=r.return;try{l.componentDidMount()}catch(F){ht(r,d,F)}}var m=r.return;try{sd(r)}catch(F){ht(r,m,F)}break;case 5:var k=r.return;try{sd(r)}catch(F){ht(r,k,F)}}}catch(F){ht(r,r.return,F)}if(r===t){ge=null;break}var I=r.sibling;if(I!==null){I.return=r.return,ge=I;break}ge=r.return}}var k1=Math.ceil,_l=T.ReactCurrentDispatcher,cd=T.ReactCurrentOwner,Sr=T.ReactCurrentBatchConfig,Ke=0,Rt=null,xt=null,Tt=0,hr=0,Li=Gn(0),St=0,es=null,Uo=0,Ol=0,dd=0,ts=null,rr=null,fd=0,Fi=1/0,wn=null,Tl=!1,pd=null,to=null,jl=!1,ro=null,Al=0,rs=0,hd=null,Il=-1,Ml=0;function qt(){return(Ke&6)!==0?yt():Il!==-1?Il:Il=yt()}function no(t){return(t.mode&1)===0?1:(Ke&2)!==0&&Tt!==0?Tt&-Tt:l1.transition!==null?(Ml===0&&(Ml=oh()),Ml):(t=Ze,t!==0||(t=window.event,t=t===void 0?16:ph(t.type)),t)}function $r(t,r,i,l){if(50<rs)throw rs=0,hd=null,Error(o(185));Ra(t,i,l),((Ke&2)===0||t!==Rt)&&(t===Rt&&((Ke&2)===0&&(Ol|=i),St===4&&oo(t,Tt)),nr(t,l),i===1&&Ke===0&&(r.mode&1)===0&&(Fi=yt()+500,ul&&Xn()))}function nr(t,r){var i=t.callbackNode;lS(t,r);var l=qs(t,t===Rt?Tt:0);if(l===0)i!==null&&Ea(i),t.callbackNode=null,t.callbackPriority=0;else if(r=l&-l,t.callbackPriority!==r){if(i!=null&&Ea(i),r===1)t.tag===0?s1(pv.bind(null,t)):Jh(pv.bind(null,t)),n1(function(){(Ke&6)===0&&Xn()}),i=null;else{switch(ih(l)){case 1:i=Hu;break;case 4:i=rh;break;case 16:i=zs;break;case 536870912:i=nh;break;default:i=zs}i=bv(i,fv.bind(null,t))}t.callbackPriority=r,t.callbackNode=i}}function fv(t,r){if(Il=-1,Ml=0,(Ke&6)!==0)throw Error(o(327));var i=t.callbackNode;if($i()&&t.callbackNode!==i)return null;var l=qs(t,t===Rt?Tt:0);if(l===0)return null;if((l&30)!==0||(l&t.expiredLanes)!==0||r)r=Dl(t,l);else{r=l;var d=Ke;Ke|=2;var m=mv();(Rt!==t||Tt!==r)&&(wn=null,Fi=yt()+500,Wo(t,r));do try{N1();break}catch(I){hv(t,I)}while(!0);jc(),_l.current=m,Ke=d,xt!==null?r=0:(Rt=null,Tt=0,r=St)}if(r!==0){if(r===2&&(d=Qu(t),d!==0&&(l=d,r=md(t,d))),r===1)throw i=es,Wo(t,0),oo(t,l),nr(t,yt()),i;if(r===6)oo(t,l);else{if(d=t.current.alternate,(l&30)===0&&!R1(d)&&(r=Dl(t,l),r===2&&(m=Qu(t),m!==0&&(l=m,r=md(t,m))),r===1))throw i=es,Wo(t,0),oo(t,l),nr(t,yt()),i;switch(t.finishedWork=d,t.finishedLanes=l,r){case 0:case 1:throw Error(o(345));case 2:qo(t,rr,wn);break;case 3:if(oo(t,l),(l&130023424)===l&&(r=fd+500-yt(),10<r)){if(qs(t,0)!==0)break;if(d=t.suspendedLanes,(d&l)!==l){qt(),t.pingedLanes|=t.suspendedLanes&d;break}t.timeoutHandle=bc(qo.bind(null,t,rr,wn),r);break}qo(t,rr,wn);break;case 4:if(oo(t,l),(l&4194240)===l)break;for(r=t.eventTimes,d=-1;0<l;){var k=31-Ar(l);m=1<<k,k=r[k],k>d&&(d=k),l&=~m}if(l=d,l=yt()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*k1(l/1960))-l,10<l){t.timeoutHandle=bc(qo.bind(null,t,rr,wn),l);break}qo(t,rr,wn);break;case 5:qo(t,rr,wn);break;default:throw Error(o(329))}}}return nr(t,yt()),t.callbackNode===i?fv.bind(null,t):null}function md(t,r){var i=ts;return t.current.memoizedState.isDehydrated&&(Wo(t,r).flags|=256),t=Dl(t,r),t!==2&&(r=rr,rr=i,r!==null&&vd(r)),t}function vd(t){rr===null?rr=t:rr.push.apply(rr,t)}function R1(t){for(var r=t;;){if(r.flags&16384){var i=r.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var l=0;l<i.length;l++){var d=i[l],m=d.getSnapshot;d=d.value;try{if(!Ir(m(),d))return!1}catch{return!1}}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function oo(t,r){for(r&=~dd,r&=~Ol,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var i=31-Ar(r),l=1<<i;t[i]=-1,r&=~l}}function pv(t){if((Ke&6)!==0)throw Error(o(327));$i();var r=qs(t,0);if((r&1)===0)return nr(t,yt()),null;var i=Dl(t,r);if(t.tag!==0&&i===2){var l=Qu(t);l!==0&&(r=l,i=md(t,l))}if(i===1)throw i=es,Wo(t,0),oo(t,r),nr(t,yt()),i;if(i===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,qo(t,rr,wn),nr(t,yt()),null}function yd(t,r){var i=Ke;Ke|=1;try{return t(r)}finally{Ke=i,Ke===0&&(Fi=yt()+500,ul&&Xn())}}function Bo(t){ro!==null&&ro.tag===0&&(Ke&6)===0&&$i();var r=Ke;Ke|=1;var i=Sr.transition,l=Ze;try{if(Sr.transition=null,Ze=1,t)return t()}finally{Ze=l,Sr.transition=i,Ke=r,(Ke&6)===0&&Xn()}}function gd(){hr=Li.current,it(Li)}function Wo(t,r){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;if(i!==-1&&(t.timeoutHandle=-1,r1(i)),xt!==null)for(i=xt.return;i!==null;){var l=i;switch(Pc(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&sl();break;case 3:Ii(),it(Zt),it(Dt),zc();break;case 5:Fc(l);break;case 4:Ii();break;case 13:it(ft);break;case 19:it(ft);break;case 10:Ac(l.type._context);break;case 22:case 23:gd()}i=i.return}if(Rt=t,xt=t=io(t.current,null),Tt=hr=r,St=0,es=null,dd=Ol=Uo=0,rr=ts=null,Fo!==null){for(r=0;r<Fo.length;r++)if(i=Fo[r],l=i.interleaved,l!==null){i.interleaved=null;var d=l.next,m=i.pending;if(m!==null){var k=m.next;m.next=d,l.next=k}i.pending=l}Fo=null}return t}function hv(t,r){do{var i=xt;try{if(jc(),xl.current=Cl,wl){for(var l=pt.memoizedState;l!==null;){var d=l.queue;d!==null&&(d.pending=null),l=l.next}wl=!1}if(zo=0,kt=bt=pt=null,Qa=!1,Ga=0,cd.current=null,i===null||i.return===null){St=1,es=r,xt=null;break}e:{var m=t,k=i.return,I=i,F=r;if(r=Tt,I.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var Y=F,re=I,oe=re.tag;if((re.mode&1)===0&&(oe===0||oe===11||oe===15)){var te=re.alternate;te?(re.updateQueue=te.updateQueue,re.memoizedState=te.memoizedState,re.lanes=te.lanes):(re.updateQueue=null,re.memoizedState=null)}var ye=$m(k);if(ye!==null){ye.flags&=-257,zm(ye,k,I,m,r),ye.mode&1&&Fm(m,Y,r),r=ye,F=Y;var we=r.updateQueue;if(we===null){var Ce=new Set;Ce.add(F),r.updateQueue=Ce}else we.add(F);break e}else{if((r&1)===0){Fm(m,Y,r),xd();break e}F=Error(o(426))}}else if(ut&&I.mode&1){var gt=$m(k);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),zm(gt,k,I,m,r),Oc(Mi(F,I));break e}}m=F=Mi(F,I),St!==4&&(St=2),ts===null?ts=[m]:ts.push(m),m=k;do{switch(m.tag){case 3:m.flags|=65536,r&=-r,m.lanes|=r;var q=Dm(m,F,r);um(m,q);break e;case 1:I=F;var U=m.type,K=m.stateNode;if((m.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(to===null||!to.has(K)))){m.flags|=65536,r&=-r,m.lanes|=r;var le=Lm(m,I,r);um(m,le);break e}}m=m.return}while(m!==null)}yv(i)}catch(Re){r=Re,xt===i&&i!==null&&(xt=i=i.return);continue}break}while(!0)}function mv(){var t=_l.current;return _l.current=Cl,t===null?Cl:t}function xd(){(St===0||St===3||St===2)&&(St=4),Rt===null||(Uo&268435455)===0&&(Ol&268435455)===0||oo(Rt,Tt)}function Dl(t,r){var i=Ke;Ke|=2;var l=mv();(Rt!==t||Tt!==r)&&(wn=null,Wo(t,r));do try{P1();break}catch(d){hv(t,d)}while(!0);if(jc(),Ke=i,_l.current=l,xt!==null)throw Error(o(261));return Rt=null,Tt=0,St}function P1(){for(;xt!==null;)vv(xt)}function N1(){for(;xt!==null&&!Zb();)vv(xt)}function vv(t){var r=wv(t.alternate,t,hr);t.memoizedProps=t.pendingProps,r===null?yv(t):xt=r,cd.current=null}function yv(t){var r=t;do{var i=r.alternate;if(t=r.return,(r.flags&32768)===0){if(i=w1(i,r,hr),i!==null){xt=i;return}}else{if(i=b1(i,r),i!==null){i.flags&=32767,xt=i;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{St=6,xt=null;return}}if(r=r.sibling,r!==null){xt=r;return}xt=r=t}while(r!==null);St===0&&(St=5)}function qo(t,r,i){var l=Ze,d=Sr.transition;try{Sr.transition=null,Ze=1,_1(t,r,i,l)}finally{Sr.transition=d,Ze=l}return null}function _1(t,r,i,l){do $i();while(ro!==null);if((Ke&6)!==0)throw Error(o(327));i=t.finishedWork;var d=t.finishedLanes;if(i===null)return null;if(t.finishedWork=null,t.finishedLanes=0,i===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var m=i.lanes|i.childLanes;if(uS(t,m),t===Rt&&(xt=Rt=null,Tt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||jl||(jl=!0,bv(zs,function(){return $i(),null})),m=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||m){m=Sr.transition,Sr.transition=null;var k=Ze;Ze=1;var I=Ke;Ke|=4,cd.current=null,C1(t,i),sv(i,t),GS(xc),Hs=!!gc,xc=gc=null,t.current=i,E1(i),eS(),Ke=I,Ze=k,Sr.transition=m}else t.current=i;if(jl&&(jl=!1,ro=t,Al=d),m=t.pendingLanes,m===0&&(to=null),nS(i.stateNode),nr(t,yt()),r!==null)for(l=t.onRecoverableError,i=0;i<r.length;i++)d=r[i],l(d.value,{componentStack:d.stack,digest:d.digest});if(Tl)throw Tl=!1,t=pd,pd=null,t;return(Al&1)!==0&&t.tag!==0&&$i(),m=t.pendingLanes,(m&1)!==0?t===hd?rs++:(rs=0,hd=t):rs=0,Xn(),null}function $i(){if(ro!==null){var t=ih(Al),r=Sr.transition,i=Ze;try{if(Sr.transition=null,Ze=16>t?16:t,ro===null)var l=!1;else{if(t=ro,ro=null,Al=0,(Ke&6)!==0)throw Error(o(331));var d=Ke;for(Ke|=4,ge=t.current;ge!==null;){var m=ge,k=m.child;if((ge.flags&16)!==0){var I=m.deletions;if(I!==null){for(var F=0;F<I.length;F++){var Y=I[F];for(ge=Y;ge!==null;){var re=ge;switch(re.tag){case 0:case 11:case 15:Za(8,re,m)}var oe=re.child;if(oe!==null)oe.return=re,ge=oe;else for(;ge!==null;){re=ge;var te=re.sibling,ye=re.return;if(rv(re),re===Y){ge=null;break}if(te!==null){te.return=ye,ge=te;break}ge=ye}}}var we=m.alternate;if(we!==null){var Ce=we.child;if(Ce!==null){we.child=null;do{var gt=Ce.sibling;Ce.sibling=null,Ce=gt}while(Ce!==null)}}ge=m}}if((m.subtreeFlags&2064)!==0&&k!==null)k.return=m,ge=k;else e:for(;ge!==null;){if(m=ge,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:Za(9,m,m.return)}var q=m.sibling;if(q!==null){q.return=m.return,ge=q;break e}ge=m.return}}var U=t.current;for(ge=U;ge!==null;){k=ge;var K=k.child;if((k.subtreeFlags&2064)!==0&&K!==null)K.return=k,ge=K;else e:for(k=U;ge!==null;){if(I=ge,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Nl(9,I)}}catch(Re){ht(I,I.return,Re)}if(I===k){ge=null;break e}var le=I.sibling;if(le!==null){le.return=I.return,ge=le;break e}ge=I.return}}if(Ke=d,Xn(),Gr&&typeof Gr.onPostCommitFiberRoot=="function")try{Gr.onPostCommitFiberRoot(Us,t)}catch{}l=!0}return l}finally{Ze=i,Sr.transition=r}}return!1}function gv(t,r,i){r=Mi(i,r),r=Dm(t,r,1),t=Zn(t,r,1),r=qt(),t!==null&&(Ra(t,1,r),nr(t,r))}function ht(t,r,i){if(t.tag===3)gv(t,t,i);else for(;r!==null;){if(r.tag===3){gv(r,t,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(to===null||!to.has(l))){t=Mi(i,t),t=Lm(r,t,1),r=Zn(r,t,1),t=qt(),r!==null&&(Ra(r,1,t),nr(r,t));break}}r=r.return}}function O1(t,r,i){var l=t.pingCache;l!==null&&l.delete(r),r=qt(),t.pingedLanes|=t.suspendedLanes&i,Rt===t&&(Tt&i)===i&&(St===4||St===3&&(Tt&130023424)===Tt&&500>yt()-fd?Wo(t,0):dd|=i),nr(t,r)}function xv(t,r){r===0&&((t.mode&1)===0?r=1:(r=Ws,Ws<<=1,(Ws&130023424)===0&&(Ws=4194304)));var i=qt();t=yn(t,r),t!==null&&(Ra(t,r,i),nr(t,i))}function T1(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),xv(t,i)}function j1(t,r){var i=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(o(314))}l!==null&&l.delete(r),xv(t,i)}var wv;wv=function(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps||Zt.current)tr=!0;else{if((t.lanes&i)===0&&(r.flags&128)===0)return tr=!1,x1(t,r,i);tr=(t.flags&131072)!==0}else tr=!1,ut&&(r.flags&1048576)!==0&&Zh(r,dl,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;Rl(t,r),t=r.pendingProps;var d=Pi(r,Dt.current);Ai(r,i),d=Wc(null,r,l,t,d,i);var m=qc();return r.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,er(l)?(m=!0,ll(r)):m=!1,r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Dc(r),d.updater=El,r.stateNode=d,d._reactInternals=r,Yc(r,l,t,i),r=ed(null,r,l,!0,m,i)):(r.tag=0,ut&&m&&Rc(r),Wt(null,r,d,i),r=r.child),r;case 16:l=r.elementType;e:{switch(Rl(t,r),t=r.pendingProps,d=l._init,l=d(l._payload),r.type=l,d=r.tag=I1(l),t=Dr(l,t),d){case 0:r=Zc(null,r,l,t,i);break e;case 1:r=Km(null,r,l,t,i);break e;case 11:r=Um(null,r,l,t,i);break e;case 14:r=Bm(null,r,l,Dr(l.type,t),i);break e}throw Error(o(306,l,""))}return r;case 0:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Dr(l,d),Zc(t,r,l,d,i);case 1:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Dr(l,d),Km(t,r,l,d,i);case 3:e:{if(Hm(r),t===null)throw Error(o(387));l=r.pendingProps,m=r.memoizedState,d=m.element,lm(t,r),yl(r,l,null,i);var k=r.memoizedState;if(l=k.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){d=Mi(Error(o(423)),r),r=Qm(t,r,l,i,d);break e}else if(l!==d){d=Mi(Error(o(424)),r),r=Qm(t,r,l,i,d);break e}else for(pr=Qn(r.stateNode.containerInfo.firstChild),fr=r,ut=!0,Mr=null,i=am(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Oi(),l===d){r=xn(t,r,i);break e}Wt(t,r,l,i)}r=r.child}return r;case 5:return dm(r),t===null&&_c(r),l=r.type,d=r.pendingProps,m=t!==null?t.memoizedProps:null,k=d.children,wc(l,d)?k=null:m!==null&&wc(l,m)&&(r.flags|=32),Vm(t,r),Wt(t,r,k,i),r.child;case 6:return t===null&&_c(r),null;case 13:return Gm(t,r,i);case 4:return Lc(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Ti(r,null,l,i):Wt(t,r,l,i),r.child;case 11:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Dr(l,d),Um(t,r,l,d,i);case 7:return Wt(t,r,r.pendingProps,i),r.child;case 8:return Wt(t,r,r.pendingProps.children,i),r.child;case 12:return Wt(t,r,r.pendingProps.children,i),r.child;case 10:e:{if(l=r.type._context,d=r.pendingProps,m=r.memoizedProps,k=d.value,nt(hl,l._currentValue),l._currentValue=k,m!==null)if(Ir(m.value,k)){if(m.children===d.children&&!Zt.current){r=xn(t,r,i);break e}}else for(m=r.child,m!==null&&(m.return=r);m!==null;){var I=m.dependencies;if(I!==null){k=m.child;for(var F=I.firstContext;F!==null;){if(F.context===l){if(m.tag===1){F=gn(-1,i&-i),F.tag=2;var Y=m.updateQueue;if(Y!==null){Y=Y.shared;var re=Y.pending;re===null?F.next=F:(F.next=re.next,re.next=F),Y.pending=F}}m.lanes|=i,F=m.alternate,F!==null&&(F.lanes|=i),Ic(m.return,i,r),I.lanes|=i;break}F=F.next}}else if(m.tag===10)k=m.type===r.type?null:m.child;else if(m.tag===18){if(k=m.return,k===null)throw Error(o(341));k.lanes|=i,I=k.alternate,I!==null&&(I.lanes|=i),Ic(k,i,r),k=m.sibling}else k=m.child;if(k!==null)k.return=m;else for(k=m;k!==null;){if(k===r){k=null;break}if(m=k.sibling,m!==null){m.return=k.return,k=m;break}k=k.return}m=k}Wt(t,r,d.children,i),r=r.child}return r;case 9:return d=r.type,l=r.pendingProps.children,Ai(r,i),d=wr(d),l=l(d),r.flags|=1,Wt(t,r,l,i),r.child;case 14:return l=r.type,d=Dr(l,r.pendingProps),d=Dr(l.type,d),Bm(t,r,l,d,i);case 15:return Wm(t,r,r.type,r.pendingProps,i);case 17:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Dr(l,d),Rl(t,r),r.tag=1,er(l)?(t=!0,ll(r)):t=!1,Ai(r,i),Im(r,l,d),Yc(r,l,d,i),ed(null,r,l,!0,t,i);case 19:return Xm(t,r,i);case 22:return qm(t,r,i)}throw Error(o(156,r.tag))};function bv(t,r){return $s(t,r)}function A1(t,r,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(t,r,i,l){return new A1(t,r,i,l)}function wd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function I1(t){if(typeof t=="function")return wd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===W)return 11;if(t===xe)return 14}return 2}function io(t,r){var i=t.alternate;return i===null?(i=Cr(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function Ll(t,r,i,l,d,m){var k=2;if(l=t,typeof t=="function")wd(t)&&(k=1);else if(typeof t=="string")k=5;else e:switch(t){case M:return Vo(i.children,d,m,r);case P:k=8,d|=8;break;case _:return t=Cr(12,i,r,d|2),t.elementType=_,t.lanes=m,t;case J:return t=Cr(13,i,r,d),t.elementType=J,t.lanes=m,t;case ce:return t=Cr(19,i,r,d),t.elementType=ce,t.lanes=m,t;case ae:return Fl(i,d,m,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case D:k=10;break e;case H:k=9;break e;case W:k=11;break e;case xe:k=14;break e;case fe:k=16,l=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=Cr(k,i,r,d),r.elementType=t,r.type=l,r.lanes=m,r}function Vo(t,r,i,l){return t=Cr(7,t,l,r),t.lanes=i,t}function Fl(t,r,i,l){return t=Cr(22,t,l,r),t.elementType=ae,t.lanes=i,t.stateNode={isHidden:!1},t}function bd(t,r,i){return t=Cr(6,t,null,r),t.lanes=i,t}function Sd(t,r,i){return r=Cr(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function M1(t,r,i,l,d){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Cd(t,r,i,l,d,m,k,I,F){return t=new M1(t,r,i,I,F),r===1?(r=1,m===!0&&(r|=8)):r=0,m=Cr(3,null,null,r),t.current=m,m.stateNode=t,m.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dc(m),t}function D1(t,r,i){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:l==null?null:""+l,children:t,containerInfo:r,implementation:i}}function Sv(t){if(!t)return Yn;t=t._reactInternals;e:{if(jr(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(er(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var i=t.type;if(er(i))return Yh(t,i,r)}return r}function Cv(t,r,i,l,d,m,k,I,F){return t=Cd(i,l,!0,t,d,m,k,I,F),t.context=Sv(null),i=t.current,l=qt(),d=no(i),m=gn(l,d),m.callback=r??null,Zn(i,m,d),t.current.lanes=d,Ra(t,d,l),nr(t,l),t}function $l(t,r,i,l){var d=r.current,m=qt(),k=no(d);return i=Sv(i),r.context===null?r.context=i:r.pendingContext=i,r=gn(m,k),r.payload={element:t},l=l===void 0?null:l,l!==null&&(r.callback=l),t=Zn(d,r,k),t!==null&&($r(t,d,k,m),vl(t,d,k)),k}function zl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Ev(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function Ed(t,r){Ev(t,r),(t=t.alternate)&&Ev(t,r)}function L1(){return null}var kv=typeof reportError=="function"?reportError:function(t){console.error(t)};function kd(t){this._internalRoot=t}Ul.prototype.render=kd.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));$l(t,r,null,null)},Ul.prototype.unmount=kd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Bo(function(){$l(null,t,null,null)}),r[pn]=null}};function Ul(t){this._internalRoot=t}Ul.prototype.unstable_scheduleHydration=function(t){if(t){var r=lh();t={blockedOn:null,target:t,priority:r};for(var i=0;i<Vn.length&&r!==0&&r<Vn[i].priority;i++);Vn.splice(i,0,t),i===0&&dh(t)}};function Rd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Bl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Rv(){}function F1(t,r,i,l,d){if(d){if(typeof l=="function"){var m=l;l=function(){var Y=zl(k);m.call(Y)}}var k=Cv(r,l,t,0,null,!1,!1,"",Rv);return t._reactRootContainer=k,t[pn]=k.current,za(t.nodeType===8?t.parentNode:t),Bo(),k}for(;d=t.lastChild;)t.removeChild(d);if(typeof l=="function"){var I=l;l=function(){var Y=zl(F);I.call(Y)}}var F=Cd(t,0,!1,null,null,!1,!1,"",Rv);return t._reactRootContainer=F,t[pn]=F.current,za(t.nodeType===8?t.parentNode:t),Bo(function(){$l(r,F,i,l)}),F}function Wl(t,r,i,l,d){var m=i._reactRootContainer;if(m){var k=m;if(typeof d=="function"){var I=d;d=function(){var F=zl(k);I.call(F)}}$l(r,k,t,d)}else k=F1(i,r,t,d,l);return zl(k)}ah=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var i=ka(r.pendingLanes);i!==0&&(Yu(r,i|1),nr(r,yt()),(Ke&6)===0&&(Fi=yt()+500,Xn()))}break;case 13:Bo(function(){var l=yn(t,1);if(l!==null){var d=qt();$r(l,t,1,d)}}),Ed(t,1)}},Xu=function(t){if(t.tag===13){var r=yn(t,134217728);if(r!==null){var i=qt();$r(r,t,134217728,i)}Ed(t,134217728)}},sh=function(t){if(t.tag===13){var r=no(t),i=yn(t,r);if(i!==null){var l=qt();$r(i,t,r,l)}Ed(t,r)}},lh=function(){return Ze},uh=function(t,r){var i=Ze;try{return Ze=t,r()}finally{Ze=i}},Je=function(t,r,i){switch(r){case"input":if(Le(t,i),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==t&&l.form===t.form){var d=al(l);if(!d)throw Error(o(90));Ee(l),Le(l,d)}}}break;case"textarea":et(t,i);break;case"select":r=i.value,r!=null&&He(t,!!i.multiple,r,!1)}},mi=yd,dn=Bo;var $1={usingClientEntryPoint:!1,Events:[Wa,ki,al,Mt,Or,yd]},ns={findFiberByHostInstance:Io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},z1={bundleType:ns.bundleType,version:ns.version,rendererPackageName:ns.rendererPackageName,rendererConfig:ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=fn(t),t===null?null:t.stateNode},findFiberByHostInstance:ns.findFiberByHostInstance||L1,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 ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ql.isDisabled&&ql.supportsFiber)try{Us=ql.inject(z1),Gr=ql}catch{}}return or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$1,or.createPortal=function(t,r){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rd(r))throw Error(o(200));return D1(t,r,null,i)},or.createRoot=function(t,r){if(!Rd(t))throw Error(o(299));var i=!1,l="",d=kv;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),r=Cd(t,1,!1,null,null,i,!1,l,d),t[pn]=r.current,za(t.nodeType===8?t.parentNode:t),new kd(r)},or.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=fn(r),t=t===null?null:t.stateNode,t},or.flushSync=function(t){return Bo(t)},or.hydrate=function(t,r,i){if(!Bl(r))throw Error(o(200));return Wl(null,t,r,!0,i)},or.hydrateRoot=function(t,r,i){if(!Rd(t))throw Error(o(405));var l=i!=null&&i.hydratedSources||null,d=!1,m="",k=kv;if(i!=null&&(i.unstable_strictMode===!0&&(d=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),r=Cv(r,null,t,1,i??null,d,!1,m,k),t[pn]=r.current,za(t),l)for(t=0;t<l.length;t++)i=l[t],d=i._getVersion,d=d(i._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[i,d]:r.mutableSourceEagerHydrationData.push(i,d);return new Ul(r)},or.render=function(t,r,i){if(!Bl(r))throw Error(o(200));return Wl(null,t,r,!1,i)},or.unmountComponentAtNode=function(t){if(!Bl(t))throw Error(o(40));return t._reactRootContainer?(Bo(function(){Wl(null,null,t,!1,function(){t._reactRootContainer=null,t[pn]=null})}),!0):!1},or.unstable_batchedUpdates=yd,or.unstable_renderSubtreeIntoContainer=function(t,r,i,l){if(!Bl(i))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Wl(t,r,i,!1,l)},or.version="18.3.1-next-f1338f8080-20240426",or}var Dv;function w0(){if(Dv)return Od.exports;Dv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Od.exports=Y1(),Od.exports}var Lv;function X1(){if(Lv)return Kl;Lv=1;var e=w0();return Kl.createRoot=e.createRoot,Kl.hydrateRoot=e.hydrateRoot,Kl}var J1=X1();const Z1=da(J1);var au={exports:{}},su={exports:{}},eC=su.exports,Fv;function tC(){return Fv||(Fv=1,(function(e,n){(function(o,a){e.exports=a()})(eC,function(){function o(S){return!isNaN(parseFloat(S))&&isFinite(S)}function a(S){return S.charAt(0).toUpperCase()+S.substring(1)}function s(S){return function(){return this[S]}}var u=["isConstructor","isEval","isNative","isToplevel"],c=["columnNumber","lineNumber"],f=["fileName","functionName","source"],p=["args"],h=["evalOrigin"],v=u.concat(c,f,p,h);function y(S){if(S)for(var w=0;w<v.length;w++)S[v[w]]!==void 0&&this["set"+a(v[w])](S[v[w]])}y.prototype={getArgs:function(){return this.args},setArgs:function(S){if(Object.prototype.toString.call(S)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=S},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(S){if(S instanceof y)this.evalOrigin=S;else if(S instanceof Object)this.evalOrigin=new y(S);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var S=this.getFileName()||"",w=this.getLineNumber()||"",R=this.getColumnNumber()||"",N=this.getFunctionName()||"";return this.getIsEval()?S?"[eval] ("+S+":"+w+":"+R+")":"[eval]:"+w+":"+R:N?N+" ("+S+":"+w+":"+R+")":S+":"+w+":"+R}},y.fromString=function(w){var R=w.indexOf("("),N=w.lastIndexOf(")"),O=w.substring(0,R),T=w.substring(R+1,N).split(","),$=w.substring(N+1);if($.indexOf("@")===0)var A=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec($,""),M=A[1],P=A[2],_=A[3];return new y({functionName:O,args:T||void 0,fileName:M,lineNumber:P||void 0,columnNumber:_||void 0})};for(var b=0;b<u.length;b++)y.prototype["get"+a(u[b])]=s(u[b]),y.prototype["set"+a(u[b])]=(function(S){return function(w){this[S]=!!w}})(u[b]);for(var C=0;C<c.length;C++)y.prototype["get"+a(c[C])]=s(c[C]),y.prototype["set"+a(c[C])]=(function(S){return function(w){if(!o(w))throw new TypeError(S+" must be a Number");this[S]=Number(w)}})(c[C]);for(var E=0;E<f.length;E++)y.prototype["get"+a(f[E])]=s(f[E]),y.prototype["set"+a(f[E])]=(function(S){return function(w){this[S]=String(w)}})(f[E]);return y})})(su)),su.exports}var rC=au.exports,$v;function nC(){return $v||($v=1,(function(e,n){(function(o,a){e.exports=a(tC())})(rC,function(a){var s=/(^|@)\S+:\d+/,u=/^\s*at .*(\S+:\d+|\(native\))/m,c=/^(eval@)?(\[native code])?$/;return{parse:function(p){if(typeof p.stacktrace<"u"||typeof p["opera#sourceloc"]<"u")return this.parseOpera(p);if(p.stack&&p.stack.match(u))return this.parseV8OrIE(p);if(p.stack)return this.parseFFOrSafari(p);throw new Error("Cannot parse given Error object")},extractLocation:function(p){if(p.indexOf(":")===-1)return[p];var h=/(.+?)(?::(\d+))?(?::(\d+))?$/,v=h.exec(p.replace(/[()]/g,""));return[v[1],v[2]||void 0,v[3]||void 0]},parseV8OrIE:function(p){var h=p.stack.split(`
41
+ `).filter(function(v){return!!v.match(u)},this);return h.map(function(v){v.indexOf("(eval ")>-1&&(v=v.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var y=v.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),b=y.match(/ (\(.+\)$)/);y=b?y.replace(b[0],""):y;var C=this.extractLocation(b?b[1]:y),E=b&&y||void 0,S=["eval","<anonymous>"].indexOf(C[0])>-1?void 0:C[0];return new a({functionName:E,fileName:S,lineNumber:C[1],columnNumber:C[2],source:v})},this)},parseFFOrSafari:function(p){var h=p.stack.split(`
42
+ `).filter(function(v){return!v.match(c)},this);return h.map(function(v){if(v.indexOf(" > eval")>-1&&(v=v.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),v.indexOf("@")===-1&&v.indexOf(":")===-1)return new a({functionName:v});var y=/((.*".+"[^@]*)?[^@]*)(?:@)/,b=v.match(y),C=b&&b[1]?b[1]:void 0,E=this.extractLocation(v.replace(y,""));return new a({functionName:C,fileName:E[0],lineNumber:E[1],columnNumber:E[2],source:v})},this)},parseOpera:function(p){return!p.stacktrace||p.message.indexOf(`
43
+ `)>-1&&p.message.split(`
44
+ `).length>p.stacktrace.split(`
45
+ `).length?this.parseOpera9(p):p.stack?this.parseOpera11(p):this.parseOpera10(p)},parseOpera9:function(p){for(var h=/Line (\d+).*script (?:in )?(\S+)/i,v=p.message.split(`
46
+ `),y=[],b=2,C=v.length;b<C;b+=2){var E=h.exec(v[b]);E&&y.push(new a({fileName:E[2],lineNumber:E[1],source:v[b]}))}return y},parseOpera10:function(p){for(var h=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,v=p.stacktrace.split(`
47
+ `),y=[],b=0,C=v.length;b<C;b+=2){var E=h.exec(v[b]);E&&y.push(new a({functionName:E[3]||void 0,fileName:E[2],lineNumber:E[1],source:v[b]}))}return y},parseOpera11:function(p){var h=p.stack.split(`
48
+ `).filter(function(v){return!!v.match(s)&&!v.match(/^Error created at/)},this);return h.map(function(v){var y=v.split("@"),b=this.extractLocation(y.pop()),C=y.shift()||"",E=C.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,S;C.match(/\(([^)]*)\)/)&&(S=C.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var w=S===void 0||S==="[arguments not available]"?void 0:S.split(",");return new a({functionName:E,args:w,fileName:b[0],lineNumber:b[1],columnNumber:b[2],source:v})},this)}}})})(au)),au.exports}nC();function sr(e,n,o){return{hookName:"",trace:[],resourcePath:null}}var fa=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(){}},oC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},po,vp,u0,iC=(u0=class{constructor(){Ne(this,po,oC);Ne(this,vp,!1)}setTimeoutProvider(e){ve(this,po,e)}setTimeout(e,n){return L(this,po).setTimeout(e,n)}clearTimeout(e){L(this,po).clearTimeout(e)}setInterval(e,n){return L(this,po).setInterval(e,n)}clearInterval(e){L(this,po).clearInterval(e)}},po=new WeakMap,vp=new WeakMap,u0),Yo=new iC;function aC(e){setTimeout(e,0)}var ai=typeof window>"u"||"Deno"in globalThis;function Ht(){}function sC(e,n){return typeof e=="function"?e(n):e}function qf(e){return typeof e=="number"&&e>=0&&e!==1/0}function b0(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Co(e,n){return typeof e=="function"?e(n):e}function kr(e,n){return typeof e=="function"?e(n):e}function zv(e,n){const{type:o="all",exact:a,fetchStatus:s,predicate:u,queryKey:c,stale:f}=e;if(c){if(a){if(n.queryHash!==gp(c,n.options))return!1}else if(!fs(n.queryKey,c))return!1}if(o!=="all"){const p=n.isActive();if(o==="active"&&!p||o==="inactive"&&p)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||s&&s!==n.state.fetchStatus||u&&!u(n))}function Uv(e,n){const{exact:o,status:a,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(o){if(si(n.options.mutationKey)!==si(u))return!1}else if(!fs(n.options.mutationKey,u))return!1}return!(a&&n.state.status!==a||s&&!s(n))}function gp(e,n){return((n==null?void 0:n.queryKeyHashFn)||si)(e)}function si(e){return JSON.stringify(e,(n,o)=>Vf(o)?Object.keys(o).sort().reduce((a,s)=>(a[s]=o[s],a),{}):o)}function fs(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(o=>fs(e[o],n[o])):!1}var lC=Object.prototype.hasOwnProperty;function S0(e,n){if(e===n)return e;const o=Bv(e)&&Bv(n);if(!o&&!(Vf(e)&&Vf(n)))return n;const s=(o?e:Object.keys(e)).length,u=o?n:Object.keys(n),c=u.length,f=o?new Array(c):{};let p=0;for(let h=0;h<c;h++){const v=o?h:u[h],y=e[v],b=n[v];if(y===b){f[v]=y,(o?h<s:lC.call(e,v))&&p++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){f[v]=b;continue}const C=S0(y,b);f[v]=C,C===y&&p++}return s===c&&p===s?e:f}function yu(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const o in e)if(e[o]!==n[o])return!1;return!0}function Bv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vf(e){if(!Wv(e))return!1;const n=e.constructor;if(n===void 0)return!0;const o=n.prototype;return!(!Wv(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Wv(e){return Object.prototype.toString.call(e)==="[object Object]"}function uC(e){return new Promise(n=>{Yo.setTimeout(n,e)})}function Kf(e,n,o){return typeof o.structuralSharing=="function"?o.structuralSharing(e,n):o.structuralSharing!==!1?S0(e,n):n}function cC(e){return e}function dC(e,n,o=0){const a=[...e,n];return o&&a.length>o?a.slice(1):a}function fC(e,n,o=0){const a=[n,...e];return o&&a.length>o?a.slice(0,-1):a}var xp=Symbol();function C0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===xp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function E0(e,n){return typeof e=="function"?e(...n):!!e}var Xo,ho,Gi,c0,pC=(c0=class extends fa{constructor(){super();Ne(this,Xo);Ne(this,ho);Ne(this,Gi);ve(this,Gi,n=>{if(!ai&&window.addEventListener){const o=()=>n();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){L(this,ho)||this.setEventListener(L(this,Gi))}onUnsubscribe(){var n;this.hasListeners()||((n=L(this,ho))==null||n.call(this),ve(this,ho,void 0))}setEventListener(n){var o;ve(this,Gi,n),(o=L(this,ho))==null||o.call(this),ve(this,ho,n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(n){L(this,Xo)!==n&&(ve(this,Xo,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(o=>{o(n)})}isFocused(){var n;return typeof L(this,Xo)=="boolean"?L(this,Xo):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Xo=new WeakMap,ho=new WeakMap,Gi=new WeakMap,c0),wp=new pC;function Hf(){let e,n;const o=new Promise((s,u)=>{e=s,n=u});o.status="pending",o.catch(()=>{});function a(s){Object.assign(o,s),delete o.resolve,delete o.reject}return o.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},o.reject=s=>{a({status:"rejected",reason:s}),n(s)},o}var hC=aC;function mC(){let e=[],n=0,o=f=>{f()},a=f=>{f()},s=hC;const u=f=>{n?e.push(f):s(()=>{o(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(p=>{o(p)})})})};return{batch:f=>{let p;n++;try{p=f()}finally{n--,n||c()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{o=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var Et=mC(),Yi,mo,Xi,d0,vC=(d0=class extends fa{constructor(){super();Ne(this,Yi,!0);Ne(this,mo);Ne(this,Xi);ve(this,Xi,n=>{if(!ai&&window.addEventListener){const o=()=>n(!0),a=()=>n(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a)}}})}onSubscribe(){L(this,mo)||this.setEventListener(L(this,Xi))}onUnsubscribe(){var n;this.hasListeners()||((n=L(this,mo))==null||n.call(this),ve(this,mo,void 0))}setEventListener(n){var o;ve(this,Xi,n),(o=L(this,mo))==null||o.call(this),ve(this,mo,n(this.setOnline.bind(this)))}setOnline(n){L(this,Yi)!==n&&(ve(this,Yi,n),this.listeners.forEach(a=>{a(n)}))}isOnline(){return L(this,Yi)}},Yi=new WeakMap,mo=new WeakMap,Xi=new WeakMap,d0),gu=new vC;function yC(e){return Math.min(1e3*2**e,3e4)}function k0(e){return(e??"online")==="online"?gu.isOnline():!0}var Qf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function R0(e){let n=!1,o=0,a;const s=Hf(),u=()=>s.status!=="pending",c=S=>{var w;if(!u()){const R=new Qf(S);b(R),(w=e.onCancel)==null||w.call(e,R)}},f=()=>{n=!0},p=()=>{n=!1},h=()=>wp.isFocused()&&(e.networkMode==="always"||gu.isOnline())&&e.canRun(),v=()=>k0(e.networkMode)&&e.canRun(),y=S=>{u()||(a==null||a(),s.resolve(S))},b=S=>{u()||(a==null||a(),s.reject(S))},C=()=>new Promise(S=>{var w;a=R=>{(u()||h())&&S(R)},(w=e.onPause)==null||w.call(e)}).then(()=>{var S;a=void 0,u()||(S=e.onContinue)==null||S.call(e)}),E=()=>{if(u())return;let S;const w=o===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(y).catch(R=>{var A;if(u())return;const N=e.retry??(ai?0:3),O=e.retryDelay??yC,T=typeof O=="function"?O(o,R):O,$=N===!0||typeof N=="number"&&o<N||typeof N=="function"&&N(o,R);if(n||!$){b(R);return}o++,(A=e.onFail)==null||A.call(e,o,R),uC(T).then(()=>h()?void 0:C()).then(()=>{n?b(R):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:p,canStart:v,start:()=>(v()?E():C().then(E),s)}}var Jo,f0,P0=(f0=class{constructor(){Ne(this,Jo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qf(this.gcTime)&&ve(this,Jo,Yo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ai?1/0:300*1e3))}clearGcTimeout(){L(this,Jo)&&(Yo.clearTimeout(L(this,Jo)),ve(this,Jo,void 0))}},Jo=new WeakMap,f0),Zo,Ji,Er,ei,Nt,ks,ti,zr,Sn,p0,gC=(p0=class extends P0{constructor(n){super();Ne(this,zr);Ne(this,Zo);Ne(this,Ji);Ne(this,Er);Ne(this,ei);Ne(this,Nt);Ne(this,ks);Ne(this,ti);ve(this,ti,!1),ve(this,ks,n.defaultOptions),this.setOptions(n.options),this.observers=[],ve(this,ei,n.client),ve(this,Er,L(this,ei).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,ve(this,Zo,qv(this.options)),this.state=n.state??L(this,Zo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=L(this,Nt))==null?void 0:n.promise}setOptions(n){if(this.options={...L(this,ks),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=qv(this.options);o.data!==void 0&&(this.setData(o.data,{updatedAt:o.dataUpdatedAt,manual:!0}),ve(this,Zo,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Er).remove(this)}setData(n,o){const a=Kf(this.state.data,n,this.options);return $e(this,zr,Sn).call(this,{data:a,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),a}setState(n,o){$e(this,zr,Sn).call(this,{type:"setState",state:n,setStateOptions:o})}cancel(n){var a,s;const o=(a=L(this,Nt))==null?void 0:a.promise;return(s=L(this,Nt))==null||s.cancel(n),o?o.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Zo))}isActive(){return this.observers.some(n=>kr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Co(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!b0(this.state.dataUpdatedAt,n)}onFocus(){var o;const n=this.observers.find(a=>a.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(o=L(this,Nt))==null||o.continue()}onOnline(){var o;const n=this.observers.find(a=>a.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(o=L(this,Nt))==null||o.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),L(this,Er).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(o=>o!==n),this.observers.length||(L(this,Nt)&&(L(this,ti)?L(this,Nt).cancel({revert:!0}):L(this,Nt).cancelRetry()),this.scheduleGc()),L(this,Er).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,zr,Sn).call(this,{type:"invalidate"})}async fetch(n,o){var p,h,v,y,b,C,E,S,w,R,N,O;if(this.state.fetchStatus!=="idle"&&((p=L(this,Nt))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(L(this,Nt))return L(this,Nt).continueRetry(),L(this,Nt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const T=this.observers.find($=>$.options.queryFn);T&&this.setOptions(T.options)}const a=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(ve(this,ti,!0),a.signal)})},u=()=>{const T=C0(this.options,o),A=(()=>{const M={client:L(this,ei),queryKey:this.queryKey,meta:this.meta};return s(M),M})();return ve(this,ti,!1),this.options.persister?this.options.persister(T,A,this):T(A)},f=(()=>{const T={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:L(this,ei),state:this.state,fetchFn:u};return s(T),T})();(h=this.options.behavior)==null||h.onFetch(f,this),ve(this,Ji,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=f.fetchOptions)==null?void 0:v.meta))&&$e(this,zr,Sn).call(this,{type:"fetch",meta:(y=f.fetchOptions)==null?void 0:y.meta}),ve(this,Nt,R0({initialPromise:o==null?void 0:o.initialPromise,fn:f.fetchFn,onCancel:T=>{T instanceof Qf&&T.revert&&this.setState({...L(this,Ji),fetchStatus:"idle"}),a.abort()},onFail:(T,$)=>{$e(this,zr,Sn).call(this,{type:"failed",failureCount:T,error:$})},onPause:()=>{$e(this,zr,Sn).call(this,{type:"pause"})},onContinue:()=>{$e(this,zr,Sn).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const T=await L(this,Nt).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(C=(b=L(this,Er).config).onSuccess)==null||C.call(b,T,this),(S=(E=L(this,Er).config).onSettled)==null||S.call(E,T,this.state.error,this),T}catch(T){if(T instanceof Qf){if(T.silent)return L(this,Nt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw $e(this,zr,Sn).call(this,{type:"error",error:T}),(R=(w=L(this,Er).config).onError)==null||R.call(w,T,this),(O=(N=L(this,Er).config).onSettled)==null||O.call(N,this.state.data,T,this),T}finally{this.scheduleGc()}}},Zo=new WeakMap,Ji=new WeakMap,Er=new WeakMap,ei=new WeakMap,Nt=new WeakMap,ks=new WeakMap,ti=new WeakMap,zr=new WeakSet,Sn=function(n){const o=a=>{switch(n.type){case"failed":return{...a,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...N0(a.data,this.options),fetchMeta:n.meta??null};case"success":const s={...a,data:n.data,dataUpdateCount:a.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ve(this,Ji,n.manual?s:void 0),s;case"error":const u=n.error;return{...a,error:u,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...n.state}}};this.state=o(this.state),Et.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),L(this,Er).notify({query:this,type:"updated",action:n})})},p0);function N0(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:k0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qv(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,o=n!==void 0,a=o?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:o?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var ir,qe,Rs,Vt,ri,Zi,En,vo,Ps,ea,ta,ni,oi,yo,ra,Xe,us,Gf,Yf,Xf,Jf,Zf,ep,tp,_0,h0,xC=(h0=class extends fa{constructor(n,o){super();Ne(this,Xe);Ne(this,ir);Ne(this,qe);Ne(this,Rs);Ne(this,Vt);Ne(this,ri);Ne(this,Zi);Ne(this,En);Ne(this,vo);Ne(this,Ps);Ne(this,ea);Ne(this,ta);Ne(this,ni);Ne(this,oi);Ne(this,yo);Ne(this,ra,new Set);this.options=o,ve(this,ir,n),ve(this,vo,null),ve(this,En,Hf()),this.bindMethods(),this.setOptions(o)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,qe).addObserver(this),Vv(L(this,qe),this.options)?$e(this,Xe,us).call(this):this.updateResult(),$e(this,Xe,Jf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rp(L(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rp(L(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Xe,Zf).call(this),$e(this,Xe,ep).call(this),L(this,qe).removeObserver(this)}setOptions(n){const o=this.options,a=L(this,qe);if(this.options=L(this,ir).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kr(this.options.enabled,L(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Xe,tp).call(this),L(this,qe).setOptions(this.options),o._defaulted&&!yu(this.options,o)&&L(this,ir).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,qe),observer:this});const s=this.hasListeners();s&&Kv(L(this,qe),a,this.options,o)&&$e(this,Xe,us).call(this),this.updateResult(),s&&(L(this,qe)!==a||kr(this.options.enabled,L(this,qe))!==kr(o.enabled,L(this,qe))||Co(this.options.staleTime,L(this,qe))!==Co(o.staleTime,L(this,qe)))&&$e(this,Xe,Gf).call(this);const u=$e(this,Xe,Yf).call(this);s&&(L(this,qe)!==a||kr(this.options.enabled,L(this,qe))!==kr(o.enabled,L(this,qe))||u!==L(this,yo))&&$e(this,Xe,Xf).call(this,u)}getOptimisticResult(n){const o=L(this,ir).getQueryCache().build(L(this,ir),n),a=this.createResult(o,n);return bC(this,a)&&(ve(this,Vt,a),ve(this,Zi,this.options),ve(this,ri,L(this,qe).state)),a}getCurrentResult(){return L(this,Vt)}trackResult(n,o){return new Proxy(n,{get:(a,s)=>(this.trackProp(s),o==null||o(s),s==="promise"&&!this.options.experimental_prefetchInRender&&L(this,En).status==="pending"&&L(this,En).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(a,s))})}trackProp(n){L(this,ra).add(n)}getCurrentQuery(){return L(this,qe)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const o=L(this,ir).defaultQueryOptions(n),a=L(this,ir).getQueryCache().build(L(this,ir),o);return a.fetch().then(()=>this.createResult(a,o))}fetch(n){return $e(this,Xe,us).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,Vt)))}createResult(n,o){var _;const a=L(this,qe),s=this.options,u=L(this,Vt),c=L(this,ri),f=L(this,Zi),h=n!==a?n.state:L(this,Rs),{state:v}=n;let y={...v},b=!1,C;if(o._optimisticResults){const D=this.hasListeners(),H=!D&&Vv(n,o),W=D&&Kv(n,a,o,s);(H||W)&&(y={...y,...N0(v.data,n.options)}),o._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:E,errorUpdatedAt:S,status:w}=y;C=y.data;let R=!1;if(o.placeholderData!==void 0&&C===void 0&&w==="pending"){let D;u!=null&&u.isPlaceholderData&&o.placeholderData===(f==null?void 0:f.placeholderData)?(D=u.data,R=!0):D=typeof o.placeholderData=="function"?o.placeholderData((_=L(this,ta))==null?void 0:_.state.data,L(this,ta)):o.placeholderData,D!==void 0&&(w="success",C=Kf(u==null?void 0:u.data,D,o),b=!0)}if(o.select&&C!==void 0&&!R)if(u&&C===(c==null?void 0:c.data)&&o.select===L(this,Ps))C=L(this,ea);else try{ve(this,Ps,o.select),C=o.select(C),C=Kf(u==null?void 0:u.data,C,o),ve(this,ea,C),ve(this,vo,null)}catch(D){ve(this,vo,D)}L(this,vo)&&(E=L(this,vo),C=L(this,ea),S=Date.now(),w="error");const N=y.fetchStatus==="fetching",O=w==="pending",T=w==="error",$=O&&N,A=C!==void 0,P={status:w,fetchStatus:y.fetchStatus,isPending:O,isSuccess:w==="success",isError:T,isInitialLoading:$,isLoading:$,data:C,dataUpdatedAt:y.dataUpdatedAt,error:E,errorUpdatedAt:S,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:N,isRefetching:N&&!O,isLoadingError:T&&!A,isPaused:y.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:T&&A,isStale:bp(n,o),refetch:this.refetch,promise:L(this,En),isEnabled:kr(o.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const D=J=>{P.status==="error"?J.reject(P.error):P.data!==void 0&&J.resolve(P.data)},H=()=>{const J=ve(this,En,P.promise=Hf());D(J)},W=L(this,En);switch(W.status){case"pending":n.queryHash===a.queryHash&&D(W);break;case"fulfilled":(P.status==="error"||P.data!==W.value)&&H();break;case"rejected":(P.status!=="error"||P.error!==W.reason)&&H();break}}return P}updateResult(){const n=L(this,Vt),o=this.createResult(L(this,qe),this.options);if(ve(this,ri,L(this,qe).state),ve(this,Zi,this.options),L(this,ri).data!==void 0&&ve(this,ta,L(this,qe)),yu(o,n))return;ve(this,Vt,o);const a=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!L(this,ra).size)return!0;const c=new Set(u??L(this,ra));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,Vt)).some(f=>{const p=f;return L(this,Vt)[p]!==n[p]&&c.has(p)})};$e(this,Xe,_0).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Xe,Jf).call(this)}},ir=new WeakMap,qe=new WeakMap,Rs=new WeakMap,Vt=new WeakMap,ri=new WeakMap,Zi=new WeakMap,En=new WeakMap,vo=new WeakMap,Ps=new WeakMap,ea=new WeakMap,ta=new WeakMap,ni=new WeakMap,oi=new WeakMap,yo=new WeakMap,ra=new WeakMap,Xe=new WeakSet,us=function(n){$e(this,Xe,tp).call(this);let o=L(this,qe).fetch(this.options,n);return n!=null&&n.throwOnError||(o=o.catch(Ht)),o},Gf=function(){$e(this,Xe,Zf).call(this);const n=Co(this.options.staleTime,L(this,qe));if(ai||L(this,Vt).isStale||!qf(n))return;const a=b0(L(this,Vt).dataUpdatedAt,n)+1;ve(this,ni,Yo.setTimeout(()=>{L(this,Vt).isStale||this.updateResult()},a))},Yf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,qe)):this.options.refetchInterval)??!1},Xf=function(n){$e(this,Xe,ep).call(this),ve(this,yo,n),!(ai||kr(this.options.enabled,L(this,qe))===!1||!qf(L(this,yo))||L(this,yo)===0)&&ve(this,oi,Yo.setInterval(()=>{(this.options.refetchIntervalInBackground||wp.isFocused())&&$e(this,Xe,us).call(this)},L(this,yo)))},Jf=function(){$e(this,Xe,Gf).call(this),$e(this,Xe,Xf).call(this,$e(this,Xe,Yf).call(this))},Zf=function(){L(this,ni)&&(Yo.clearTimeout(L(this,ni)),ve(this,ni,void 0))},ep=function(){L(this,oi)&&(Yo.clearInterval(L(this,oi)),ve(this,oi,void 0))},tp=function(){const n=L(this,ir).getQueryCache().build(L(this,ir),this.options);if(n===L(this,qe))return;const o=L(this,qe);ve(this,qe,n),ve(this,Rs,n.state),this.hasListeners()&&(o==null||o.removeObserver(this),n.addObserver(this))},_0=function(n){Et.batch(()=>{n.listeners&&this.listeners.forEach(o=>{o(L(this,Vt))}),L(this,ir).getQueryCache().notify({query:L(this,qe),type:"observerResultsUpdated"})})},h0);function wC(e,n){return kr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Vv(e,n){return wC(e,n)||e.state.data!==void 0&&rp(e,n,n.refetchOnMount)}function rp(e,n,o){if(kr(n.enabled,e)!==!1&&Co(n.staleTime,e)!=="static"){const a=typeof o=="function"?o(e):o;return a==="always"||a!==!1&&bp(e,n)}return!1}function Kv(e,n,o,a){return(e!==n||kr(a.enabled,e)===!1)&&(!o.suspense||e.state.status!=="error")&&bp(e,o)}function bp(e,n){return kr(n.enabled,e)!==!1&&e.isStaleByTime(Co(n.staleTime,e))}function bC(e,n){return!yu(e.getCurrentResult(),n)}function Hv(e){return{onFetch:(n,o)=>{var v,y,b,C,E;const a=n.options,s=(b=(y=(v=n.fetchOptions)==null?void 0:v.meta)==null?void 0:y.fetchMore)==null?void 0:b.direction,u=((C=n.state.data)==null?void 0:C.pages)||[],c=((E=n.state.data)==null?void 0:E.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const h=async()=>{let S=!1;const w=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(n.signal.aborted?S=!0:n.signal.addEventListener("abort",()=>{S=!0}),n.signal)})},R=C0(n.options,n.fetchOptions),N=async(O,T,$)=>{if(S)return Promise.reject();if(T==null&&O.pages.length)return Promise.resolve(O);const M=(()=>{const H={client:n.client,queryKey:n.queryKey,pageParam:T,direction:$?"backward":"forward",meta:n.options.meta};return w(H),H})(),P=await R(M),{maxPages:_}=n.options,D=$?fC:dC;return{pages:D(O.pages,P,_),pageParams:D(O.pageParams,T,_)}};if(s&&u.length){const O=s==="backward",T=O?SC:Qv,$={pages:u,pageParams:c},A=T(a,$);f=await N($,A,O)}else{const O=e??u.length;do{const T=p===0?c[0]??a.initialPageParam:Qv(a,f);if(p>0&&T==null)break;f=await N(f,T),p++}while(p<O)}return f};n.options.persister?n.fetchFn=()=>{var S,w;return(w=(S=n.options).persister)==null?void 0:w.call(S,h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},o)}:n.fetchFn=h}}}function Qv(e,{pages:n,pageParams:o}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,o[a],o):void 0}function SC(e,{pages:n,pageParams:o}){var a;return n.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,n[0],n,o[0],o):void 0}var en,Kt,ii,tn,uo,m0,CC=(m0=class extends P0{constructor(n){super();Ne(this,tn);Ne(this,en);Ne(this,Kt);Ne(this,ii);this.mutationId=n.mutationId,ve(this,Kt,n.mutationCache),ve(this,en,[]),this.state=n.state||O0(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){L(this,en).includes(n)||(L(this,en).push(n),this.clearGcTimeout(),L(this,Kt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){ve(this,en,L(this,en).filter(o=>o!==n)),this.scheduleGc(),L(this,Kt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){L(this,en).length||(this.state.status==="pending"?this.scheduleGc():L(this,Kt).remove(this))}continue(){var n;return((n=L(this,ii))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var u,c,f,p,h,v,y,b,C,E,S,w,R,N,O,T,$,A,M,P;const o=()=>{$e(this,tn,uo).call(this,{type:"continue"})};ve(this,ii,R0({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(_,D)=>{$e(this,tn,uo).call(this,{type:"failed",failureCount:_,error:D})},onPause:()=>{$e(this,tn,uo).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Kt).canRun(this)}));const a=this.state.status==="pending",s=!L(this,ii).canStart();try{if(a)o();else{$e(this,tn,uo).call(this,{type:"pending",variables:n,isPaused:s}),await((c=(u=L(this,Kt).config).onMutate)==null?void 0:c.call(u,n,this));const D=await((p=(f=this.options).onMutate)==null?void 0:p.call(f,n));D!==this.state.context&&$e(this,tn,uo).call(this,{type:"pending",context:D,variables:n,isPaused:s})}const _=await L(this,ii).start();return await((v=(h=L(this,Kt).config).onSuccess)==null?void 0:v.call(h,_,n,this.state.context,this)),await((b=(y=this.options).onSuccess)==null?void 0:b.call(y,_,n,this.state.context)),await((E=(C=L(this,Kt).config).onSettled)==null?void 0:E.call(C,_,null,this.state.variables,this.state.context,this)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,_,null,n,this.state.context)),$e(this,tn,uo).call(this,{type:"success",data:_}),_}catch(_){try{throw await((N=(R=L(this,Kt).config).onError)==null?void 0:N.call(R,_,n,this.state.context,this)),await((T=(O=this.options).onError)==null?void 0:T.call(O,_,n,this.state.context)),await((A=($=L(this,Kt).config).onSettled)==null?void 0:A.call($,void 0,_,this.state.variables,this.state.context,this)),await((P=(M=this.options).onSettled)==null?void 0:P.call(M,void 0,_,n,this.state.context)),_}finally{$e(this,tn,uo).call(this,{type:"error",error:_})}}finally{L(this,Kt).runNext(this)}}},en=new WeakMap,Kt=new WeakMap,ii=new WeakMap,tn=new WeakSet,uo=function(n){const o=a=>{switch(n.type){case"failed":return{...a,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...a,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:n.error,failureCount:a.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=o(this.state),Et.batch(()=>{L(this,en).forEach(a=>{a.onMutationUpdate(n)}),L(this,Kt).notify({mutation:this,type:"updated",action:n})})},m0);function O0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,Ur,Ns,v0,EC=(v0=class extends fa{constructor(n={}){super();Ne(this,kn);Ne(this,Ur);Ne(this,Ns);this.config=n,ve(this,kn,new Set),ve(this,Ur,new Map),ve(this,Ns,0)}build(n,o,a){const s=new CC({mutationCache:this,mutationId:++Vl(this,Ns)._,options:n.defaultMutationOptions(o),state:a});return this.add(s),s}add(n){L(this,kn).add(n);const o=Hl(n);if(typeof o=="string"){const a=L(this,Ur).get(o);a?a.push(n):L(this,Ur).set(o,[n])}this.notify({type:"added",mutation:n})}remove(n){if(L(this,kn).delete(n)){const o=Hl(n);if(typeof o=="string"){const a=L(this,Ur).get(o);if(a)if(a.length>1){const s=a.indexOf(n);s!==-1&&a.splice(s,1)}else a[0]===n&&L(this,Ur).delete(o)}}this.notify({type:"removed",mutation:n})}canRun(n){const o=Hl(n);if(typeof o=="string"){const a=L(this,Ur).get(o),s=a==null?void 0:a.find(u=>u.state.status==="pending");return!s||s===n}else return!0}runNext(n){var a;const o=Hl(n);if(typeof o=="string"){const s=(a=L(this,Ur).get(o))==null?void 0:a.find(u=>u!==n&&u.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{L(this,kn).forEach(n=>{this.notify({type:"removed",mutation:n})}),L(this,kn).clear(),L(this,Ur).clear()})}getAll(){return Array.from(L(this,kn))}find(n){const o={exact:!0,...n};return this.getAll().find(a=>Uv(o,a))}findAll(n={}){return this.getAll().filter(o=>Uv(n,o))}notify(n){Et.batch(()=>{this.listeners.forEach(o=>{o(n)})})}resumePausedMutations(){const n=this.getAll().filter(o=>o.state.isPaused);return Et.batch(()=>Promise.all(n.map(o=>o.continue().catch(Ht))))}},kn=new WeakMap,Ur=new WeakMap,Ns=new WeakMap,v0);function Hl(e){var n;return(n=e.options.scope)==null?void 0:n.id}var go,xo,ar,Rn,jn,lu,np,y0,kC=(y0=class extends fa{constructor(o,a){super();Ne(this,jn);Ne(this,go);Ne(this,xo);Ne(this,ar);Ne(this,Rn);ve(this,go,o),this.setOptions(a),this.bindMethods(),$e(this,jn,lu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){var s;const a=this.options;this.options=L(this,go).defaultMutationOptions(o),yu(this.options,a)||L(this,go).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,ar),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&si(a.mutationKey)!==si(this.options.mutationKey)?this.reset():((s=L(this,ar))==null?void 0:s.state.status)==="pending"&&L(this,ar).setOptions(this.options)}onUnsubscribe(){var o;this.hasListeners()||(o=L(this,ar))==null||o.removeObserver(this)}onMutationUpdate(o){$e(this,jn,lu).call(this),$e(this,jn,np).call(this,o)}getCurrentResult(){return L(this,xo)}reset(){var o;(o=L(this,ar))==null||o.removeObserver(this),ve(this,ar,void 0),$e(this,jn,lu).call(this),$e(this,jn,np).call(this)}mutate(o,a){var s;return ve(this,Rn,a),(s=L(this,ar))==null||s.removeObserver(this),ve(this,ar,L(this,go).getMutationCache().build(L(this,go),this.options)),L(this,ar).addObserver(this),L(this,ar).execute(o)}},go=new WeakMap,xo=new WeakMap,ar=new WeakMap,Rn=new WeakMap,jn=new WeakSet,lu=function(){var a;const o=((a=L(this,ar))==null?void 0:a.state)??O0();ve(this,xo,{...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset})},np=function(o){Et.batch(()=>{var a,s,u,c,f,p,h,v;if(L(this,Rn)&&this.hasListeners()){const y=L(this,xo).variables,b=L(this,xo).context;(o==null?void 0:o.type)==="success"?((s=(a=L(this,Rn)).onSuccess)==null||s.call(a,o.data,y,b),(c=(u=L(this,Rn)).onSettled)==null||c.call(u,o.data,null,y,b)):(o==null?void 0:o.type)==="error"&&((p=(f=L(this,Rn)).onError)==null||p.call(f,o.error,y,b),(v=(h=L(this,Rn)).onSettled)==null||v.call(h,void 0,o.error,y,b))}this.listeners.forEach(y=>{y(L(this,xo))})})},y0),rn,g0,RC=(g0=class extends fa{constructor(n={}){super();Ne(this,rn);this.config=n,ve(this,rn,new Map)}build(n,o,a){const s=o.queryKey,u=o.queryHash??gp(s,o);let c=this.get(u);return c||(c=new gC({client:n,queryKey:s,queryHash:u,options:n.defaultQueryOptions(o),state:a,defaultOptions:n.getQueryDefaults(s)}),this.add(c)),c}add(n){L(this,rn).has(n.queryHash)||(L(this,rn).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const o=L(this,rn).get(n.queryHash);o&&(n.destroy(),o===n&&L(this,rn).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Et.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return L(this,rn).get(n)}getAll(){return[...L(this,rn).values()]}find(n){const o={exact:!0,...n};return this.getAll().find(a=>zv(o,a))}findAll(n={}){const o=this.getAll();return Object.keys(n).length>0?o.filter(a=>zv(n,a)):o}notify(n){Et.batch(()=>{this.listeners.forEach(o=>{o(n)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},rn=new WeakMap,g0),mt,wo,bo,na,oa,So,ia,aa,x0,op=(x0=class{constructor(e={}){Ne(this,mt);Ne(this,wo);Ne(this,bo);Ne(this,na);Ne(this,oa);Ne(this,So);Ne(this,ia);Ne(this,aa);ve(this,mt,e.queryCache||new RC),ve(this,wo,e.mutationCache||new EC),ve(this,bo,e.defaultOptions||{}),ve(this,na,new Map),ve(this,oa,new Map),ve(this,So,0)}mount(){Vl(this,So)._++,L(this,So)===1&&(ve(this,ia,wp.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onFocus())})),ve(this,aa,gu.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onOnline())})))}unmount(){var e,n;Vl(this,So)._--,L(this,So)===0&&((e=L(this,ia))==null||e.call(this),ve(this,ia,void 0),(n=L(this,aa))==null||n.call(this),ve(this,aa,void 0))}isFetching(e){return L(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,wo).findAll({...e,status:"pending"}).length}getQueryData(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=L(this,mt).get(n.queryHash))==null?void 0:o.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),o=L(this,mt).build(this,n),a=o.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&o.isStaleByTime(Co(n.staleTime,o))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return L(this,mt).findAll(e).map(({queryKey:n,state:o})=>{const a=o.data;return[n,a]})}setQueryData(e,n,o){const a=this.defaultQueryOptions({queryKey:e}),s=L(this,mt).get(a.queryHash),u=s==null?void 0:s.state.data,c=sC(n,u);if(c!==void 0)return L(this,mt).build(this,a).setData(c,{...o,manual:!0})}setQueriesData(e,n,o){return Et.batch(()=>L(this,mt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,o)]))}getQueryState(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=L(this,mt).get(n.queryHash))==null?void 0:o.state}removeQueries(e){const n=L(this,mt);Et.batch(()=>{n.findAll(e).forEach(o=>{n.remove(o)})})}resetQueries(e,n){const o=L(this,mt);return Et.batch(()=>(o.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const o={revert:!0,...n},a=Et.batch(()=>L(this,mt).findAll(e).map(s=>s.cancel(o)));return Promise.all(a).then(Ht).catch(Ht)}invalidateQueries(e,n={}){return Et.batch(()=>(L(this,mt).findAll(e).forEach(o=>{o.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"},n)))}refetchQueries(e,n={}){const o={...n,cancelRefetch:n.cancelRefetch??!0},a=Et.batch(()=>L(this,mt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,o);return o.throwOnError||(u=u.catch(Ht)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(Ht)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const o=L(this,mt).build(this,n);return o.isStaleByTime(Co(n.staleTime,o))?o.fetch(n):Promise.resolve(o.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ht).catch(Ht)}fetchInfiniteQuery(e){return e.behavior=Hv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ht).catch(Ht)}ensureInfiniteQueryData(e){return e.behavior=Hv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gu.isOnline()?L(this,wo).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mt)}getMutationCache(){return L(this,wo)}getDefaultOptions(){return L(this,bo)}setDefaultOptions(e){ve(this,bo,e)}setQueryDefaults(e,n){L(this,na).set(si(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...L(this,na).values()],o={};return n.forEach(a=>{fs(e,a.queryKey)&&Object.assign(o,a.defaultOptions)}),o}setMutationDefaults(e,n){L(this,oa).set(si(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...L(this,oa).values()],o={};return n.forEach(a=>{fs(e,a.mutationKey)&&Object.assign(o,a.defaultOptions)}),o}defaultQueryOptions(e){if(e._defaulted)return e;const n={...L(this,bo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=gp(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===xp&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,bo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,mt).clear(),L(this,wo).clear()}},mt=new WeakMap,wo=new WeakMap,bo=new WeakMap,na=new WeakMap,oa=new WeakMap,So=new WeakMap,ia=new WeakMap,aa=new WeakMap,x0),T0=g.createContext(void 0),Oo=e=>{const n=g.useContext(T0);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},j0=({client:e,children:n})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(T0.Provider,{value:e,children:n})),A0=g.createContext(!1),PC=()=>g.useContext(A0);A0.Provider;function NC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _C=g.createContext(NC()),OC=()=>g.useContext(_C),TC=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},jC=e=>{g.useEffect(()=>{e.clearReset()},[e])},AC=({result:e,errorResetBoundary:n,throwOnError:o,query:a,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||E0(o,[e.error,a])),IC=e=>{if(e.suspense){const o=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>o(a(...s)):o(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},MC=(e,n)=>e.isLoading&&e.isFetching&&!n,DC=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Gv=(e,n,o)=>n.fetchOptimistic(e).catch(()=>{o.clearReset()});function LC(e,n,o){var y,b,C,E,S;const a=PC(),s=OC(),u=Oo(),c=u.defaultQueryOptions(e);(b=(y=u.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||b.call(y,c),c._optimisticResults=a?"isRestoring":"optimistic",IC(c),TC(c,s),jC(s);const f=!u.getQueryCache().get(c.queryHash),[p]=g.useState(()=>new n(u,c)),h=p.getOptimisticResult(c),v=!a&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(w=>{const R=v?p.subscribe(Et.batchCalls(w)):Ht;return p.updateResult(),R},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),g.useEffect(()=>{p.setOptions(c)},[c,p]),DC(c,h))throw Gv(c,p,s);if(AC({result:h,errorResetBoundary:s,throwOnError:c.throwOnError,query:u.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw h.error;if((E=(C=u.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||E.call(C,c,h),c.experimental_prefetchInRender&&!ai&&MC(h,a)){const w=f?Gv(c,p,s):(S=u.getQueryCache().get(c.queryHash))==null?void 0:S.promise;w==null||w.catch(Ht).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?h:p.trackResult(h)}function Rr(e,n){return LC(e,xC)}function Gt(e,n){const o=Oo(),[a]=g.useState(()=>new kC(o,e));g.useEffect(()=>{a.setOptions(e)},[a,e]);const s=g.useSyncExternalStore(g.useCallback(c=>a.subscribe(Et.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=g.useCallback((c,f)=>{a.mutate(c,f).catch(Ht)},[a]);if(s.error&&E0(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}var I0=typeof global=="object"&&global&&global.Object===Object&&global,FC=typeof self=="object"&&self&&self.Object===Object&&self,In=I0||FC||Function("return this")(),Ro=In.Symbol,M0=Object.prototype,$C=M0.hasOwnProperty,zC=M0.toString,is=Ro?Ro.toStringTag:void 0;function UC(e){var n=$C.call(e,is),o=e[is];try{e[is]=void 0;var a=!0}catch{}var s=zC.call(e);return a&&(n?e[is]=o:delete e[is]),s}var BC=Object.prototype,WC=BC.toString;function qC(e){return WC.call(e)}var VC="[object Null]",KC="[object Undefined]",Yv=Ro?Ro.toStringTag:void 0;function Os(e){return e==null?e===void 0?KC:VC:Yv&&Yv in Object(e)?UC(e):qC(e)}function D0(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var HC="[object AsyncFunction]",QC="[object Function]",GC="[object GeneratorFunction]",YC="[object Proxy]";function L0(e){if(!D0(e))return!1;var n=Os(e);return n==QC||n==GC||n==HC||n==YC}var Ad=In["__core-js_shared__"],Xv=(function(){var e=/[^.]+$/.exec(Ad&&Ad.keys&&Ad.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function XC(e){return!!Xv&&Xv in e}var JC=Function.prototype,ZC=JC.toString;function ci(e){if(e!=null){try{return ZC.call(e)}catch{}try{return e+""}catch{}}return""}var eE=/[\\^$.*+?()[\]{}|]/g,tE=/^\[object .+?Constructor\]$/,rE=Function.prototype,nE=Object.prototype,oE=rE.toString,iE=nE.hasOwnProperty,aE=RegExp("^"+oE.call(iE).replace(eE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sE(e){if(!D0(e)||XC(e))return!1;var n=L0(e)?aE:tE;return n.test(ci(e))}function lE(e,n){return e==null?void 0:e[n]}function di(e,n){var o=lE(e,n);return sE(o)?o:void 0}var ps=di(Object,"create");function uE(){this.__data__=ps?ps(null):{},this.size=0}function cE(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var dE="__lodash_hash_undefined__",fE=Object.prototype,pE=fE.hasOwnProperty;function hE(e){var n=this.__data__;if(ps){var o=n[e];return o===dE?void 0:o}return pE.call(n,e)?n[e]:void 0}var mE=Object.prototype,vE=mE.hasOwnProperty;function yE(e){var n=this.__data__;return ps?n[e]!==void 0:vE.call(n,e)}var gE="__lodash_hash_undefined__";function xE(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ps&&n===void 0?gE:n,this}function li(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}li.prototype.clear=uE;li.prototype.delete=cE;li.prototype.get=hE;li.prototype.has=yE;li.prototype.set=xE;function wE(){this.__data__=[],this.size=0}function F0(e,n){return e===n||e!==e&&n!==n}function Nu(e,n){for(var o=e.length;o--;)if(F0(e[o][0],n))return o;return-1}var bE=Array.prototype,SE=bE.splice;function CE(e){var n=this.__data__,o=Nu(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():SE.call(n,o,1),--this.size,!0}function EE(e){var n=this.__data__,o=Nu(n,e);return o<0?void 0:n[o][1]}function kE(e){return Nu(this.__data__,e)>-1}function RE(e,n){var o=this.__data__,a=Nu(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Mn(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Mn.prototype.clear=wE;Mn.prototype.delete=CE;Mn.prototype.get=EE;Mn.prototype.has=kE;Mn.prototype.set=RE;var hs=di(In,"Map");function PE(){this.size=0,this.__data__={hash:new li,map:new(hs||Mn),string:new li}}function NE(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function _u(e,n){var o=e.__data__;return NE(n)?o[typeof n=="string"?"string":"hash"]:o.map}function _E(e){var n=_u(this,e).delete(e);return this.size-=n?1:0,n}function OE(e){return _u(this,e).get(e)}function TE(e){return _u(this,e).has(e)}function jE(e,n){var o=_u(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function fi(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}fi.prototype.clear=PE;fi.prototype.delete=_E;fi.prototype.get=OE;fi.prototype.has=TE;fi.prototype.set=jE;var AE="__lodash_hash_undefined__";function IE(e){return this.__data__.set(e,AE),this}function ME(e){return this.__data__.has(e)}function sa(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new fi;++n<o;)this.add(e[n])}sa.prototype.add=sa.prototype.push=IE;sa.prototype.has=ME;function DE(e,n,o,a){for(var s=e.length,u=o+-1;++u<s;)if(n(e[u],u,e))return u;return-1}function LE(e){return e!==e}function FE(e,n,o){for(var a=o-1,s=e.length;++a<s;)if(e[a]===n)return a;return-1}function $E(e,n,o){return n===n?FE(e,n,o):DE(e,LE,o)}function $0(e,n){var o=e==null?0:e.length;return!!o&&$E(e,n,0)>-1}function z0(e,n,o){for(var a=-1,s=e==null?0:e.length;++a<s;)if(o(n,e[a]))return!0;return!1}function zE(e){return function(n){return e(n)}}function Sp(e,n){return e.has(n)}var UE=200;function BE(e,n,o,a){var s=-1,u=$0,c=!0,f=e.length,p=[],h=n.length;if(!f)return p;a?(u=z0,c=!1):n.length>=UE&&(u=Sp,c=!1,n=new sa(n));e:for(;++s<f;){var v=e[s],y=v;if(v=a||v!==0?v:0,c&&y===y){for(var b=h;b--;)if(n[b]===y)continue e;p.push(v)}else u(n,y,a)||p.push(v)}return p}function U0(e,n){for(var o=-1,a=n.length,s=e.length;++o<a;)e[s+o]=n[o];return e}function la(e){return e!=null&&typeof e=="object"}var WE="[object Arguments]";function Jv(e){return la(e)&&Os(e)==WE}var B0=Object.prototype,qE=B0.hasOwnProperty,VE=B0.propertyIsEnumerable,W0=Jv((function(){return arguments})())?Jv:function(e){return la(e)&&qE.call(e,"callee")&&!VE.call(e,"callee")},ms=Array.isArray,Zv=Ro?Ro.isConcatSpreadable:void 0;function KE(e){return ms(e)||W0(e)||!!(Zv&&e&&e[Zv])}function q0(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=KE),s||(s=[]);++u<c;){var f=e[u];o(f)&&U0(s,f)}return s}function V0(e){return e}function HE(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var ey=Math.max;function QE(e,n,o){return n=ey(n===void 0?e.length-1:n,0),function(){for(var a=arguments,s=-1,u=ey(a.length-n,0),c=Array(u);++s<u;)c[s]=a[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=a[s];return f[n]=o(c),HE(e,this,f)}}function GE(e){return function(){return e}}var ty=(function(){try{var e=di(Object,"defineProperty");return e({},"",{}),e}catch{}})(),YE=ty?function(e,n){return ty(e,"toString",{configurable:!0,enumerable:!1,value:GE(n),writable:!0})}:V0,XE=800,JE=16,ZE=Date.now;function ek(e){var n=0,o=0;return function(){var a=ZE(),s=JE-(a-o);if(o=a,s>0){if(++n>=XE)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var tk=ek(YE);function K0(e,n){return tk(QE(e,n,V0),e+"")}var rk=9007199254740991;function H0(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rk}function Q0(e){return e!=null&&H0(e.length)&&!L0(e)}function uu(e){return la(e)&&Q0(e)}function G0(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}var xu=K0(function(e,n){var o=G0(n);return uu(o)&&(o=void 0),uu(e)?BE(e,q0(n,1,uu),void 0,o):[]}),Ki=di(In,"Set");function nk(){}function Cp(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var ok=1/0,ik=Ki&&1/Cp(new Ki([,-0]))[1]==ok?function(e){return new Ki(e)}:nk,ak=200;function sk(e,n,o){var a=-1,s=$0,u=e.length,c=!0,f=[],p=f;if(o)c=!1,s=z0;else if(u>=ak){var h=ik(e);if(h)return Cp(h);c=!1,s=Sp,p=new sa}else p=f;e:for(;++a<u;){var v=e[a],y=v;if(v=o||v!==0?v:0,c&&y===y){for(var b=p.length;b--;)if(p[b]===y)continue e;f.push(v)}else s(p,y,o)||(p!==f&&p.push(y),f.push(v))}return f}var Y0=K0(function(e){var n=G0(e);return n=typeof n=="function"?n:void 0,sk(q0(e,1,uu),void 0,n)}),Id,ry;function pa(){return ry||(ry=1,Id=TypeError),Id}const lk={},uk=Object.freeze(Object.defineProperty({__proto__:null,default:lk},Symbol.toStringTag,{value:"Module"})),ck=q1(uk);var Md,ny;function Ou(){if(ny)return Md;ny=1;var e=typeof Map=="function"&&Map.prototype,n=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=e&&n&&typeof n.get=="function"?n.get:null,a=e&&Map.prototype.forEach,s=typeof Set=="function"&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&typeof u.get=="function"?u.get:null,f=s&&Set.prototype.forEach,p=typeof WeakMap=="function"&&WeakMap.prototype,h=p?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,y=v?WeakSet.prototype.has:null,b=typeof WeakRef=="function"&&WeakRef.prototype,C=b?WeakRef.prototype.deref:null,E=Boolean.prototype.valueOf,S=Object.prototype.toString,w=Function.prototype.toString,R=String.prototype.match,N=String.prototype.slice,O=String.prototype.replace,T=String.prototype.toUpperCase,$=String.prototype.toLowerCase,A=RegExp.prototype.test,M=Array.prototype.concat,P=Array.prototype.join,_=Array.prototype.slice,D=Math.floor,H=typeof BigInt=="function"?BigInt.prototype.valueOf:null,W=Object.getOwnPropertySymbols,J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ce=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ce||!0)?Symbol.toStringTag:null,fe=Object.prototype.propertyIsEnumerable,ae=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Q){return Q.__proto__}:null);function G(Q,X){if(Q===1/0||Q===-1/0||Q!==Q||Q&&Q>-1e3&&Q<1e3||A.call(/e/,X))return X;var We=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Q=="number"){var Ye=Q<0?-D(-Q):D(Q);if(Ye!==Q){var Je=String(Ye),De=N.call(X,Je.length+1);return O.call(Je,We,"$&_")+"."+O.call(O.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(X,We,"$&_")}var Z=ck,B=Z.custom,j=_e(B)?B:null,z={__proto__:null,double:'"',single:"'"},ee={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Md=function Q(X,We,Ye,Je){var De=We||{};if(Le(De,"quoteStyle")&&!Le(z,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Le(De,"maxStringLength")&&(typeof De.maxStringLength=="number"?De.maxStringLength<0&&De.maxStringLength!==1/0:De.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ut=Le(De,"customInspect")?De.customInspect:!0;if(typeof Ut!="boolean"&&Ut!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Le(De,"indent")&&De.indent!==null&&De.indent!==" "&&!(parseInt(De.indent,10)===De.indent&&De.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Le(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Hr=De.numericSeparator;if(typeof X>"u")return"undefined";if(X===null)return"null";if(typeof X=="boolean")return X?"true":"false";if(typeof X=="string")return lt(X,De);if(typeof X=="number"){if(X===0)return 1/0/X>0?"0":"-0";var Mt=String(X);return Hr?G(X,Mt):Mt}if(typeof X=="bigint"){var Or=String(X)+"n";return Hr?G(X,Or):Or}var mi=typeof De.depth>"u"?5:De.depth;if(typeof Ye>"u"&&(Ye=0),Ye>=mi&&mi>0&&typeof X=="object")return Pe(X)?"[Array]":"[Object]";var dn=cr(De,Ye);if(typeof Je>"u")Je=[];else if(Be(Je,X)>=0)return"[Circular]";function Bt(fn,Ao,$s){if(Ao&&(Je=_.call(Je),Je.push(Ao)),$s){var Ea={depth:De.depth};return Le(De,"quoteStyle")&&(Ea.quoteStyle=De.quoteStyle),Q(fn,Ea,Ye+1,Je)}return Q(fn,De,Ye+1,Je)}if(typeof X=="function"&&!ne(X)){var xa=Fe(X),$n=Fn(X,Bt);return"[Function"+(xa?": "+xa:" (anonymous)")+"]"+($n.length>0?" { "+P.call($n,", ")+" }":"")}if(_e(X)){var vi=ce?O.call(String(X),/^(Symbol\(.*\))_[^)]*$/,"$1"):J.call(X);return typeof X=="object"&&!ce?Xt(vi):vi}if(rt(X)){for(var Tr="<"+$.call(String(X.nodeName)),wa=X.attributes||[],Qr=0;Qr<wa.length;Qr++)Tr+=" "+wa[Qr].name+"="+ue(se(wa[Qr].value),"double",De);return Tr+=">",X.childNodes&&X.childNodes.length&&(Tr+="..."),Tr+="</"+$.call(String(X.nodeName))+">",Tr}if(Pe(X)){if(X.length===0)return"[]";var zn=Fn(X,Bt);return dn&&!dt(zn)?"["+yr(zn,dn)+"]":"[ "+P.call(zn,", ")+" ]"}if(he(X)){var Un=Fn(X,Bt);return!("cause"in Error.prototype)&&"cause"in X&&!fe.call(X,"cause")?"{ ["+String(X)+"] "+P.call(M.call("[cause]: "+Bt(X.cause),Un),", ")+" }":Un.length===0?"["+String(X)+"]":"{ ["+String(X)+"] "+P.call(Un,", ")+" }"}if(typeof X=="object"&&Ut){if(j&&typeof X[j]=="function"&&Z)return Z(X,{depth:mi-Ye});if(Ut!=="symbol"&&typeof X.inspect=="function")return X.inspect()}if(He(X)){var yi=[];return a&&a.call(X,function(fn,Ao){yi.push(Bt(Ao,X,!0)+" => "+Bt(fn,X))}),Ve("Map",o.call(X),yi,dn)}if(et(X)){var Ds=[];return f&&f.call(X,function(fn){Ds.push(Bt(fn,X))}),Ve("Set",c.call(X),Ds,dn)}if(st(X))return Jt("WeakMap");if(vt(X))return Jt("WeakSet");if(_t(X))return Jt("WeakRef");if(Ee(X))return Xt(Bt(Number(X)));if(Ie(X))return Xt(Bt(H.call(X)));if(je(X))return Xt(E.call(X));if(me(X))return Xt(Bt(String(X)));if(typeof window<"u"&&X===window)return"{ [object Window] }";if(typeof globalThis<"u"&&X===globalThis||typeof Nv<"u"&&X===Nv)return"{ [object globalThis] }";if(!pe(X)&&!ne(X)){var ba=Fn(X,Bt),Ls=ae?ae(X)===Object.prototype:X instanceof Object||X.constructor===Object,jr=X instanceof Object?"":"null prototype",Sa=!Ls&&xe&&Object(X)===X&&xe in X?N.call(Ae(X),8,-1):jr?"Object":"",Fs=Ls||typeof X.constructor!="function"?"":X.constructor.name?X.constructor.name+" ":"",Ca=Fs+(Sa||jr?"["+P.call(M.call([],Sa||[],jr||[]),": ")+"] ":"");return ba.length===0?Ca+"{}":dn?Ca+"{"+yr(ba,dn)+"}":Ca+"{ "+P.call(ba,", ")+" }"}return String(X)};function ue(Q,X,We){var Ye=We.quoteStyle||X,Je=z[Ye];return Je+Q+Je}function se(Q){return O.call(String(Q),/"/g,"&quot;")}function de(Q){return!xe||!(typeof Q=="object"&&(xe in Q||typeof Q[xe]<"u"))}function Pe(Q){return Ae(Q)==="[object Array]"&&de(Q)}function pe(Q){return Ae(Q)==="[object Date]"&&de(Q)}function ne(Q){return Ae(Q)==="[object RegExp]"&&de(Q)}function he(Q){return Ae(Q)==="[object Error]"&&de(Q)}function me(Q){return Ae(Q)==="[object String]"&&de(Q)}function Ee(Q){return Ae(Q)==="[object Number]"&&de(Q)}function je(Q){return Ae(Q)==="[object Boolean]"&&de(Q)}function _e(Q){if(ce)return Q&&typeof Q=="object"&&Q instanceof Symbol;if(typeof Q=="symbol")return!0;if(!Q||typeof Q!="object"||!J)return!1;try{return J.call(Q),!0}catch{}return!1}function Ie(Q){if(!Q||typeof Q!="object"||!H)return!1;try{return H.call(Q),!0}catch{}return!1}var ke=Object.prototype.hasOwnProperty||function(Q){return Q in this};function Le(Q,X){return ke.call(Q,X)}function Ae(Q){return S.call(Q)}function Fe(Q){if(Q.name)return Q.name;var X=R.call(w.call(Q),/^function\s*([\w$]+)/);return X?X[1]:null}function Be(Q,X){if(Q.indexOf)return Q.indexOf(X);for(var We=0,Ye=Q.length;We<Ye;We++)if(Q[We]===X)return We;return-1}function He(Q){if(!o||!Q||typeof Q!="object")return!1;try{o.call(Q);try{c.call(Q)}catch{return!0}return Q instanceof Map}catch{}return!1}function st(Q){if(!h||!Q||typeof Q!="object")return!1;try{h.call(Q,h);try{y.call(Q,y)}catch{return!0}return Q instanceof WeakMap}catch{}return!1}function _t(Q){if(!C||!Q||typeof Q!="object")return!1;try{return C.call(Q),!0}catch{}return!1}function et(Q){if(!c||!Q||typeof Q!="object")return!1;try{c.call(Q);try{o.call(Q)}catch{return!0}return Q instanceof Set}catch{}return!1}function vt(Q){if(!y||!Q||typeof Q!="object")return!1;try{y.call(Q,y);try{h.call(Q,h)}catch{return!0}return Q instanceof WeakSet}catch{}return!1}function rt(Q){return!Q||typeof Q!="object"?!1:typeof HTMLElement<"u"&&Q instanceof HTMLElement?!0:typeof Q.nodeName=="string"&&typeof Q.getAttribute=="function"}function lt(Q,X){if(Q.length>X.maxStringLength){var We=Q.length-X.maxStringLength,Ye="... "+We+" more character"+(We>1?"s":"");return lt(N.call(Q,0,X.maxStringLength),X)+Ye}var Je=ee[X.quoteStyle||"single"];Je.lastIndex=0;var De=O.call(O.call(Q,Je,"\\$1"),/[\x00-\x1f]/g,wt);return ue(De,"single",X)}function wt(Q){var X=Q.charCodeAt(0),We={8:"b",9:"t",10:"n",12:"f",13:"r"}[X];return We?"\\"+We:"\\x"+(X<16?"0":"")+T.call(X.toString(16))}function Xt(Q){return"Object("+Q+")"}function Jt(Q){return Q+" { ? }"}function Ve(Q,X,We,Ye){var Je=Ye?yr(We,Ye):P.call(We,", ");return Q+" ("+X+") {"+Je+"}"}function dt(Q){for(var X=0;X<Q.length;X++)if(Be(Q[X],`
49
+ `)>=0)return!1;return!0}function cr(Q,X){var We;if(Q.indent===" ")We=" ";else if(typeof Q.indent=="number"&&Q.indent>0)We=P.call(Array(Q.indent+1)," ");else return null;return{base:We,prev:P.call(Array(X+1),We)}}function yr(Q,X){if(Q.length===0)return"";var We=`
50
+ `+X.prev+X.base;return We+P.call(Q,","+We)+`
51
+ `+X.prev}function Fn(Q,X){var We=Pe(Q),Ye=[];if(We){Ye.length=Q.length;for(var Je=0;Je<Q.length;Je++)Ye[Je]=Le(Q,Je)?X(Q[Je],Q):""}var De=typeof W=="function"?W(Q):[],Ut;if(ce){Ut={};for(var Hr=0;Hr<De.length;Hr++)Ut["$"+De[Hr]]=De[Hr]}for(var Mt in Q)Le(Q,Mt)&&(We&&String(Number(Mt))===Mt&&Mt<Q.length||ce&&Ut["$"+Mt]instanceof Symbol||(A.call(/[^\w$]/,Mt)?Ye.push(X(Mt,Q)+": "+X(Q[Mt],Q)):Ye.push(Mt+": "+X(Q[Mt],Q))));if(typeof W=="function")for(var Or=0;Or<De.length;Or++)fe.call(Q,De[Or])&&Ye.push("["+X(De[Or])+"]: "+X(Q[De[Or]],Q));return Ye}return Md}var Dd,oy;function dk(){if(oy)return Dd;oy=1;var e=Ou(),n=pa(),o=function(f,p,h){for(var v=f,y;(y=v.next)!=null;v=y)if(y.key===p)return v.next=y.next,h||(y.next=f.next,f.next=y),y},a=function(f,p){if(f){var h=o(f,p);return h&&h.value}},s=function(f,p,h){var v=o(f,p);v?v.value=h:f.next={key:p,next:f.next,value:h}},u=function(f,p){return f?!!o(f,p):!1},c=function(f,p){if(f)return o(f,p,!0)};return Dd=function(){var p,h={assert:function(v){if(!h.has(v))throw new n("Side channel does not contain "+e(v))},delete:function(v){var y=p&&p.next,b=c(p,v);return b&&y&&y===b&&(p=void 0),!!b},get:function(v){return a(p,v)},has:function(v){return u(p,v)},set:function(v,y){p||(p={next:void 0}),s(p,v,y)}};return h},Dd}var Ld,iy;function X0(){return iy||(iy=1,Ld=Object),Ld}var Fd,ay;function fk(){return ay||(ay=1,Fd=Error),Fd}var $d,sy;function pk(){return sy||(sy=1,$d=EvalError),$d}var zd,ly;function hk(){return ly||(ly=1,zd=RangeError),zd}var Ud,uy;function mk(){return uy||(uy=1,Ud=ReferenceError),Ud}var Bd,cy;function vk(){return cy||(cy=1,Bd=SyntaxError),Bd}var Wd,dy;function yk(){return dy||(dy=1,Wd=URIError),Wd}var qd,fy;function gk(){return fy||(fy=1,qd=Math.abs),qd}var Vd,py;function xk(){return py||(py=1,Vd=Math.floor),Vd}var Kd,hy;function wk(){return hy||(hy=1,Kd=Math.max),Kd}var Hd,my;function bk(){return my||(my=1,Hd=Math.min),Hd}var Qd,vy;function Sk(){return vy||(vy=1,Qd=Math.pow),Qd}var Gd,yy;function Ck(){return yy||(yy=1,Gd=Math.round),Gd}var Yd,gy;function Ek(){return gy||(gy=1,Yd=Number.isNaN||function(n){return n!==n}),Yd}var Xd,xy;function kk(){if(xy)return Xd;xy=1;var e=Ek();return Xd=function(o){return e(o)||o===0?o:o<0?-1:1},Xd}var Jd,wy;function Rk(){return wy||(wy=1,Jd=Object.getOwnPropertyDescriptor),Jd}var Zd,by;function J0(){if(by)return Zd;by=1;var e=Rk();if(e)try{e([],"length")}catch{e=null}return Zd=e,Zd}var ef,Sy;function Pk(){if(Sy)return ef;Sy=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ef=e,ef}var tf,Cy;function Nk(){return Cy||(Cy=1,tf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),a=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var s=42;n[o]=s;for(var u in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var c=Object.getOwnPropertySymbols(n);if(c.length!==1||c[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(n,o);if(f.value!==s||f.enumerable!==!0)return!1}return!0}),tf}var rf,Ey;function _k(){if(Ey)return rf;Ey=1;var e=typeof Symbol<"u"&&Symbol,n=Nk();return rf=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()},rf}var nf,ky;function Z0(){return ky||(ky=1,nf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nf}var of,Ry;function ex(){if(Ry)return of;Ry=1;var e=X0();return of=e.getPrototypeOf||null,of}var af,Py;function Ok(){if(Py)return af;Py=1;var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,a="[object Function]",s=function(p,h){for(var v=[],y=0;y<p.length;y+=1)v[y]=p[y];for(var b=0;b<h.length;b+=1)v[b+p.length]=h[b];return v},u=function(p,h){for(var v=[],y=h,b=0;y<p.length;y+=1,b+=1)v[b]=p[y];return v},c=function(f,p){for(var h="",v=0;v<f.length;v+=1)h+=f[v],v+1<f.length&&(h+=p);return h};return af=function(p){var h=this;if(typeof h!="function"||n.apply(h)!==a)throw new TypeError(e+h);for(var v=u(arguments,1),y,b=function(){if(this instanceof y){var R=h.apply(this,s(v,arguments));return Object(R)===R?R:this}return h.apply(p,s(v,arguments))},C=o(0,h.length-v.length),E=[],S=0;S<C;S++)E[S]="$"+S;if(y=Function("binder","return function ("+c(E,",")+"){ return binder.apply(this,arguments); }")(b),h.prototype){var w=function(){};w.prototype=h.prototype,y.prototype=new w,w.prototype=null}return y},af}var sf,Ny;function Tu(){if(Ny)return sf;Ny=1;var e=Ok();return sf=Function.prototype.bind||e,sf}var lf,_y;function Ep(){return _y||(_y=1,lf=Function.prototype.call),lf}var uf,Oy;function tx(){return Oy||(Oy=1,uf=Function.prototype.apply),uf}var cf,Ty;function Tk(){return Ty||(Ty=1,cf=typeof Reflect<"u"&&Reflect&&Reflect.apply),cf}var df,jy;function jk(){if(jy)return df;jy=1;var e=Tu(),n=tx(),o=Ep(),a=Tk();return df=a||e.call(o,n),df}var ff,Ay;function rx(){if(Ay)return ff;Ay=1;var e=Tu(),n=pa(),o=Ep(),a=jk();return ff=function(u){if(u.length<1||typeof u[0]!="function")throw new n("a function is required");return a(e,o,u)},ff}var pf,Iy;function Ak(){if(Iy)return pf;Iy=1;var e=rx(),n=J0(),o;try{o=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var a=!!o&&n&&n(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;return pf=a&&typeof a.get=="function"?e([a.get]):typeof u=="function"?function(f){return u(f==null?f:s(f))}:!1,pf}var hf,My;function Ik(){if(My)return hf;My=1;var e=Z0(),n=ex(),o=Ak();return hf=e?function(s){return e(s)}:n?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return n(s)}:o?function(s){return o(s)}:null,hf}var mf,Dy;function Mk(){if(Dy)return mf;Dy=1;var e=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=Tu();return mf=o.call(e,n),mf}var vf,Ly;function kp(){if(Ly)return vf;Ly=1;var e,n=X0(),o=fk(),a=pk(),s=hk(),u=mk(),c=vk(),f=pa(),p=yk(),h=gk(),v=xk(),y=wk(),b=bk(),C=Sk(),E=Ck(),S=kk(),w=Function,R=function(ne){try{return w('"use strict"; return ('+ne+").constructor;")()}catch{}},N=J0(),O=Pk(),T=function(){throw new f},$=N?(function(){try{return arguments.callee,T}catch{try{return N(arguments,"callee").get}catch{return T}}})():T,A=_k()(),M=Ik(),P=ex(),_=Z0(),D=tx(),H=Ep(),W={},J=typeof Uint8Array>"u"||!M?e:M(Uint8Array),ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":A&&M?M([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":W,"%AsyncGenerator%":W,"%AsyncGeneratorFunction%":W,"%AsyncIteratorPrototype%":W,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":W,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&M?M(M([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!M?e:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":N,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":s,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!M?e:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&M?M(""[Symbol.iterator]()):e,"%Symbol%":A?Symbol:e,"%SyntaxError%":c,"%ThrowTypeError%":$,"%TypedArray%":J,"%TypeError%":f,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":p,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":H,"%Function.prototype.apply%":D,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":P,"%Math.abs%":h,"%Math.floor%":v,"%Math.max%":y,"%Math.min%":b,"%Math.pow%":C,"%Math.round%":E,"%Math.sign%":S,"%Reflect.getPrototypeOf%":_};if(M)try{null.error}catch(ne){var xe=M(M(ne));ce["%Error.prototype%"]=xe}var fe=function ne(he){var me;if(he==="%AsyncFunction%")me=R("async function () {}");else if(he==="%GeneratorFunction%")me=R("function* () {}");else if(he==="%AsyncGeneratorFunction%")me=R("async function* () {}");else if(he==="%AsyncGenerator%"){var Ee=ne("%AsyncGeneratorFunction%");Ee&&(me=Ee.prototype)}else if(he==="%AsyncIteratorPrototype%"){var je=ne("%AsyncGenerator%");je&&M&&(me=M(je.prototype))}return ce[he]=me,me},ae={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G=Tu(),Z=Mk(),B=G.call(H,Array.prototype.concat),j=G.call(D,Array.prototype.splice),z=G.call(H,String.prototype.replace),ee=G.call(H,String.prototype.slice),ue=G.call(H,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,Pe=function(he){var me=ee(he,0,1),Ee=ee(he,-1);if(me==="%"&&Ee!=="%")throw new c("invalid intrinsic syntax, expected closing `%`");if(Ee==="%"&&me!=="%")throw new c("invalid intrinsic syntax, expected opening `%`");var je=[];return z(he,se,function(_e,Ie,ke,Le){je[je.length]=ke?z(Le,de,"$1"):Ie||_e}),je},pe=function(he,me){var Ee=he,je;if(Z(ae,Ee)&&(je=ae[Ee],Ee="%"+je[0]+"%"),Z(ce,Ee)){var _e=ce[Ee];if(_e===W&&(_e=fe(Ee)),typeof _e>"u"&&!me)throw new f("intrinsic "+he+" exists, but is not available. Please file an issue!");return{alias:je,name:Ee,value:_e}}throw new c("intrinsic "+he+" does not exist!")};return vf=function(he,me){if(typeof he!="string"||he.length===0)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof me!="boolean")throw new f('"allowMissing" argument must be a boolean');if(ue(/^%?[^%]*%?$/,he)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ee=Pe(he),je=Ee.length>0?Ee[0]:"",_e=pe("%"+je+"%",me),Ie=_e.name,ke=_e.value,Le=!1,Ae=_e.alias;Ae&&(je=Ae[0],j(Ee,B([0,1],Ae)));for(var Fe=1,Be=!0;Fe<Ee.length;Fe+=1){var He=Ee[Fe],st=ee(He,0,1),_t=ee(He,-1);if((st==='"'||st==="'"||st==="`"||_t==='"'||_t==="'"||_t==="`")&&st!==_t)throw new c("property names with quotes must have matching quotes");if((He==="constructor"||!Be)&&(Le=!0),je+="."+He,Ie="%"+je+"%",Z(ce,Ie))ke=ce[Ie];else if(ke!=null){if(!(He in ke)){if(!me)throw new f("base intrinsic for "+he+" exists, but the property is not available.");return}if(N&&Fe+1>=Ee.length){var et=N(ke,He);Be=!!et,Be&&"get"in et&&!("originalValue"in et.get)?ke=et.get:ke=ke[He]}else Be=Z(ke,He),ke=ke[He];Be&&!Le&&(ce[Ie]=ke)}}return ke},vf}var yf,Fy;function nx(){if(Fy)return yf;Fy=1;var e=kp(),n=rx(),o=n([e("%String.prototype.indexOf%")]);return yf=function(s,u){var c=e(s,!!u);return typeof c=="function"&&o(s,".prototype.")>-1?n([c]):c},yf}var gf,$y;function ox(){if($y)return gf;$y=1;var e=kp(),n=nx(),o=Ou(),a=pa(),s=e("%Map%",!0),u=n("Map.prototype.get",!0),c=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),p=n("Map.prototype.delete",!0),h=n("Map.prototype.size",!0);return gf=!!s&&function(){var y,b={assert:function(C){if(!b.has(C))throw new a("Side channel does not contain "+o(C))},delete:function(C){if(y){var E=p(y,C);return h(y)===0&&(y=void 0),E}return!1},get:function(C){if(y)return u(y,C)},has:function(C){return y?f(y,C):!1},set:function(C,E){y||(y=new s),c(y,C,E)}};return b},gf}var xf,zy;function Dk(){if(zy)return xf;zy=1;var e=kp(),n=nx(),o=Ou(),a=ox(),s=pa(),u=e("%WeakMap%",!0),c=n("WeakMap.prototype.get",!0),f=n("WeakMap.prototype.set",!0),p=n("WeakMap.prototype.has",!0),h=n("WeakMap.prototype.delete",!0);return xf=u?function(){var y,b,C={assert:function(E){if(!C.has(E))throw new s("Side channel does not contain "+o(E))},delete:function(E){if(u&&E&&(typeof E=="object"||typeof E=="function")){if(y)return h(y,E)}else if(a&&b)return b.delete(E);return!1},get:function(E){return u&&E&&(typeof E=="object"||typeof E=="function")&&y?c(y,E):b&&b.get(E)},has:function(E){return u&&E&&(typeof E=="object"||typeof E=="function")&&y?p(y,E):!!b&&b.has(E)},set:function(E,S){u&&E&&(typeof E=="object"||typeof E=="function")?(y||(y=new u),f(y,E,S)):a&&(b||(b=a()),b.set(E,S))}};return C}:a,xf}var wf,Uy;function Lk(){if(Uy)return wf;Uy=1;var e=pa(),n=Ou(),o=dk(),a=ox(),s=Dk(),u=s||a||o;return wf=function(){var f,p={assert:function(h){if(!p.has(h))throw new e("Side channel does not contain "+n(h))},delete:function(h){return!!f&&f.delete(h)},get:function(h){return f&&f.get(h)},has:function(h){return!!f&&f.has(h)},set:function(h,v){f||(f=u()),f.set(h,v)}};return p},wf}var bf,By;function Rp(){if(By)return bf;By=1;var e=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};return bf={default:o.RFC3986,formatters:{RFC1738:function(a){return e.call(a,n,"+")},RFC3986:function(a){return String(a)}},RFC1738:o.RFC1738,RFC3986:o.RFC3986},bf}var Sf,Wy;function ix(){if(Wy)return Sf;Wy=1;var e=Rp(),n=Object.prototype.hasOwnProperty,o=Array.isArray,a=(function(){for(var w=[],R=0;R<256;++R)w.push("%"+((R<16?"0":"")+R.toString(16)).toUpperCase());return w})(),s=function(R){for(;R.length>1;){var N=R.pop(),O=N.obj[N.prop];if(o(O)){for(var T=[],$=0;$<O.length;++$)typeof O[$]<"u"&&T.push(O[$]);N.obj[N.prop]=T}}},u=function(R,N){for(var O=N&&N.plainObjects?{__proto__:null}:{},T=0;T<R.length;++T)typeof R[T]<"u"&&(O[T]=R[T]);return O},c=function w(R,N,O){if(!N)return R;if(typeof N!="object"&&typeof N!="function"){if(o(R))R.push(N);else if(R&&typeof R=="object")(O&&(O.plainObjects||O.allowPrototypes)||!n.call(Object.prototype,N))&&(R[N]=!0);else return[R,N];return R}if(!R||typeof R!="object")return[R].concat(N);var T=R;return o(R)&&!o(N)&&(T=u(R,O)),o(R)&&o(N)?(N.forEach(function($,A){if(n.call(R,A)){var M=R[A];M&&typeof M=="object"&&$&&typeof $=="object"?R[A]=w(M,$,O):R.push($)}else R[A]=$}),R):Object.keys(N).reduce(function($,A){var M=N[A];return n.call($,A)?$[A]=w($[A],M,O):$[A]=M,$},T)},f=function(R,N){return Object.keys(N).reduce(function(O,T){return O[T]=N[T],O},R)},p=function(w,R,N){var O=w.replace(/\+/g," ");if(N==="iso-8859-1")return O.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(O)}catch{return O}},h=1024,v=function(R,N,O,T,$){if(R.length===0)return R;var A=R;if(typeof R=="symbol"?A=Symbol.prototype.toString.call(R):typeof R!="string"&&(A=String(R)),O==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(J){return"%26%23"+parseInt(J.slice(2),16)+"%3B"});for(var M="",P=0;P<A.length;P+=h){for(var _=A.length>=h?A.slice(P,P+h):A,D=[],H=0;H<_.length;++H){var W=_.charCodeAt(H);if(W===45||W===46||W===95||W===126||W>=48&&W<=57||W>=65&&W<=90||W>=97&&W<=122||$===e.RFC1738&&(W===40||W===41)){D[D.length]=_.charAt(H);continue}if(W<128){D[D.length]=a[W];continue}if(W<2048){D[D.length]=a[192|W>>6]+a[128|W&63];continue}if(W<55296||W>=57344){D[D.length]=a[224|W>>12]+a[128|W>>6&63]+a[128|W&63];continue}H+=1,W=65536+((W&1023)<<10|_.charCodeAt(H)&1023),D[D.length]=a[240|W>>18]+a[128|W>>12&63]+a[128|W>>6&63]+a[128|W&63]}M+=D.join("")}return M},y=function(R){for(var N=[{obj:{o:R},prop:"o"}],O=[],T=0;T<N.length;++T)for(var $=N[T],A=$.obj[$.prop],M=Object.keys(A),P=0;P<M.length;++P){var _=M[P],D=A[_];typeof D=="object"&&D!==null&&O.indexOf(D)===-1&&(N.push({obj:A,prop:_}),O.push(D))}return s(N),R},b=function(R){return Object.prototype.toString.call(R)==="[object RegExp]"},C=function(R){return!R||typeof R!="object"?!1:!!(R.constructor&&R.constructor.isBuffer&&R.constructor.isBuffer(R))},E=function(R,N){return[].concat(R,N)},S=function(R,N){if(o(R)){for(var O=[],T=0;T<R.length;T+=1)O.push(N(R[T]));return O}return N(R)};return Sf={arrayToObject:u,assign:f,combine:E,compact:y,decode:p,encode:v,isBuffer:C,isRegExp:b,maybeMap:S,merge:c},Sf}var Cf,qy;function Fk(){if(qy)return Cf;qy=1;var e=Lk(),n=ix(),o=Rp(),a=Object.prototype.hasOwnProperty,s={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,R){return w+"["+R+"]"},repeat:function(w){return w}},u=Array.isArray,c=Array.prototype.push,f=function(S,w){c.apply(S,u(w)?w:[w])},p=Date.prototype.toISOString,h=o.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,filter:void 0,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(w){return p.call(w)},skipNulls:!1,strictNullHandling:!1},y=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},b={},C=function S(w,R,N,O,T,$,A,M,P,_,D,H,W,J,ce,xe,fe,ae){for(var G=w,Z=ae,B=0,j=!1;(Z=Z.get(b))!==void 0&&!j;){var z=Z.get(w);if(B+=1,typeof z<"u"){if(z===B)throw new RangeError("Cyclic object value");j=!0}typeof Z.get(b)>"u"&&(B=0)}if(typeof _=="function"?G=_(R,G):G instanceof Date?G=W(G):N==="comma"&&u(G)&&(G=n.maybeMap(G,function(Ie){return Ie instanceof Date?W(Ie):Ie})),G===null){if($)return P&&!xe?P(R,v.encoder,fe,"key",J):R;G=""}if(y(G)||n.isBuffer(G)){if(P){var ee=xe?R:P(R,v.encoder,fe,"key",J);return[ce(ee)+"="+ce(P(G,v.encoder,fe,"value",J))]}return[ce(R)+"="+ce(String(G))]}var ue=[];if(typeof G>"u")return ue;var se;if(N==="comma"&&u(G))xe&&P&&(G=n.maybeMap(G,P)),se=[{value:G.length>0?G.join(",")||null:void 0}];else if(u(_))se=_;else{var de=Object.keys(G);se=D?de.sort(D):de}var Pe=M?String(R).replace(/\./g,"%2E"):String(R),pe=O&&u(G)&&G.length===1?Pe+"[]":Pe;if(T&&u(G)&&G.length===0)return pe+"[]";for(var ne=0;ne<se.length;++ne){var he=se[ne],me=typeof he=="object"&&he&&typeof he.value<"u"?he.value:G[he];if(!(A&&me===null)){var Ee=H&&M?String(he).replace(/\./g,"%2E"):String(he),je=u(G)?typeof N=="function"?N(pe,Ee):pe:pe+(H?"."+Ee:"["+Ee+"]");ae.set(w,B);var _e=e();_e.set(b,ae),f(ue,S(me,je,N,O,T,$,A,M,N==="comma"&&xe&&u(G)?null:P,_,D,H,W,J,ce,xe,fe,_e))}}return ue},E=function(w){if(!w)return v;if(typeof w.allowEmptyArrays<"u"&&typeof w.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof w.encodeDotInKeys<"u"&&typeof w.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(w.encoder!==null&&typeof w.encoder<"u"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var R=w.charset||v.charset;if(typeof w.charset<"u"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var N=o.default;if(typeof w.format<"u"){if(!a.call(o.formatters,w.format))throw new TypeError("Unknown format option provided.");N=w.format}var O=o.formatters[N],T=v.filter;(typeof w.filter=="function"||u(w.filter))&&(T=w.filter);var $;if(w.arrayFormat in s?$=w.arrayFormat:"indices"in w?$=w.indices?"indices":"repeat":$=v.arrayFormat,"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var A=typeof w.allowDots>"u"?w.encodeDotInKeys===!0?!0:v.allowDots:!!w.allowDots;return{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:v.addQueryPrefix,allowDots:A,allowEmptyArrays:typeof w.allowEmptyArrays=="boolean"?!!w.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:$,charset:R,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:v.charsetSentinel,commaRoundTrip:!!w.commaRoundTrip,delimiter:typeof w.delimiter>"u"?v.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:v.encode,encodeDotInKeys:typeof w.encodeDotInKeys=="boolean"?w.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof w.encoder=="function"?w.encoder:v.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:v.encodeValuesOnly,filter:T,format:N,formatter:O,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:v.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:v.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:v.strictNullHandling}};return Cf=function(S,w){var R=S,N=E(w),O,T;typeof N.filter=="function"?(T=N.filter,R=T("",R)):u(N.filter)&&(T=N.filter,O=T);var $=[];if(typeof R!="object"||R===null)return"";var A=s[N.arrayFormat],M=A==="comma"&&N.commaRoundTrip;O||(O=Object.keys(R)),N.sort&&O.sort(N.sort);for(var P=e(),_=0;_<O.length;++_){var D=O[_],H=R[D];N.skipNulls&&H===null||f($,C(H,D,A,M,N.allowEmptyArrays,N.strictNullHandling,N.skipNulls,N.encodeDotInKeys,N.encode?N.encoder:null,N.filter,N.sort,N.allowDots,N.serializeDate,N.format,N.formatter,N.encodeValuesOnly,N.charset,P))}var W=$.join(N.delimiter),J=N.addQueryPrefix===!0?"?":"";return N.charsetSentinel&&(N.charset==="iso-8859-1"?J+="utf8=%26%2310003%3B&":J+="utf8=%E2%9C%93&"),W.length>0?J+W:""},Cf}var Ef,Vy;function $k(){if(Vy)return Ef;Vy=1;var e=ix(),n=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(b){return b.replace(/&#(\d+);/g,function(C,E){return String.fromCharCode(parseInt(E,10))})},u=function(b,C,E){if(b&&typeof b=="string"&&C.comma&&b.indexOf(",")>-1)return b.split(",");if(C.throwOnLimitExceeded&&E>=C.arrayLimit)throw new RangeError("Array limit exceeded. Only "+C.arrayLimit+" element"+(C.arrayLimit===1?"":"s")+" allowed in an array.");return b},c="utf8=%26%2310003%3B",f="utf8=%E2%9C%93",p=function(C,E){var S={__proto__:null},w=E.ignoreQueryPrefix?C.replace(/^\?/,""):C;w=w.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var R=E.parameterLimit===1/0?void 0:E.parameterLimit,N=w.split(E.delimiter,E.throwOnLimitExceeded?R+1:R);if(E.throwOnLimitExceeded&&N.length>R)throw new RangeError("Parameter limit exceeded. Only "+R+" parameter"+(R===1?"":"s")+" allowed.");var O=-1,T,$=E.charset;if(E.charsetSentinel)for(T=0;T<N.length;++T)N[T].indexOf("utf8=")===0&&(N[T]===f?$="utf-8":N[T]===c&&($="iso-8859-1"),O=T,T=N.length);for(T=0;T<N.length;++T)if(T!==O){var A=N[T],M=A.indexOf("]="),P=M===-1?A.indexOf("="):M+1,_,D;P===-1?(_=E.decoder(A,a.decoder,$,"key"),D=E.strictNullHandling?null:""):(_=E.decoder(A.slice(0,P),a.decoder,$,"key"),D=e.maybeMap(u(A.slice(P+1),E,o(S[_])?S[_].length:0),function(W){return E.decoder(W,a.decoder,$,"value")})),D&&E.interpretNumericEntities&&$==="iso-8859-1"&&(D=s(String(D))),A.indexOf("[]=")>-1&&(D=o(D)?[D]:D);var H=n.call(S,_);H&&E.duplicates==="combine"?S[_]=e.combine(S[_],D):(!H||E.duplicates==="last")&&(S[_]=D)}return S},h=function(b,C,E,S){var w=0;if(b.length>0&&b[b.length-1]==="[]"){var R=b.slice(0,-1).join("");w=Array.isArray(C)&&C[R]?C[R].length:0}for(var N=S?C:u(C,E,w),O=b.length-1;O>=0;--O){var T,$=b[O];if($==="[]"&&E.parseArrays)T=E.allowEmptyArrays&&(N===""||E.strictNullHandling&&N===null)?[]:e.combine([],N);else{T=E.plainObjects?{__proto__:null}:{};var A=$.charAt(0)==="["&&$.charAt($.length-1)==="]"?$.slice(1,-1):$,M=E.decodeDotInKeys?A.replace(/%2E/g,"."):A,P=parseInt(M,10);!E.parseArrays&&M===""?T={0:N}:!isNaN(P)&&$!==M&&String(P)===M&&P>=0&&E.parseArrays&&P<=E.arrayLimit?(T=[],T[P]=N):M!=="__proto__"&&(T[M]=N)}N=T}return N},v=function(C,E,S,w){if(C){var R=S.allowDots?C.replace(/\.([^.[]+)/g,"[$1]"):C,N=/(\[[^[\]]*])/,O=/(\[[^[\]]*])/g,T=S.depth>0&&N.exec(R),$=T?R.slice(0,T.index):R,A=[];if($){if(!S.plainObjects&&n.call(Object.prototype,$)&&!S.allowPrototypes)return;A.push($)}for(var M=0;S.depth>0&&(T=O.exec(R))!==null&&M<S.depth;){if(M+=1,!S.plainObjects&&n.call(Object.prototype,T[1].slice(1,-1))&&!S.allowPrototypes)return;A.push(T[1])}if(T){if(S.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+S.depth+" and strictDepth is true");A.push("["+R.slice(T.index)+"]")}return h(A,E,S,w)}},y=function(C){if(!C)return a;if(typeof C.allowEmptyArrays<"u"&&typeof C.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof C.decodeDotInKeys<"u"&&typeof C.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(C.decoder!==null&&typeof C.decoder<"u"&&typeof C.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof C.charset<"u"&&C.charset!=="utf-8"&&C.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof C.throwOnLimitExceeded<"u"&&typeof C.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var E=typeof C.charset>"u"?a.charset:C.charset,S=typeof C.duplicates>"u"?a.duplicates:C.duplicates;if(S!=="combine"&&S!=="first"&&S!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var w=typeof C.allowDots>"u"?C.decodeDotInKeys===!0?!0:a.allowDots:!!C.allowDots;return{allowDots:w,allowEmptyArrays:typeof C.allowEmptyArrays=="boolean"?!!C.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof C.allowPrototypes=="boolean"?C.allowPrototypes:a.allowPrototypes,allowSparse:typeof C.allowSparse=="boolean"?C.allowSparse:a.allowSparse,arrayLimit:typeof C.arrayLimit=="number"?C.arrayLimit:a.arrayLimit,charset:E,charsetSentinel:typeof C.charsetSentinel=="boolean"?C.charsetSentinel:a.charsetSentinel,comma:typeof C.comma=="boolean"?C.comma:a.comma,decodeDotInKeys:typeof C.decodeDotInKeys=="boolean"?C.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof C.decoder=="function"?C.decoder:a.decoder,delimiter:typeof C.delimiter=="string"||e.isRegExp(C.delimiter)?C.delimiter:a.delimiter,depth:typeof C.depth=="number"||C.depth===!1?+C.depth:a.depth,duplicates:S,ignoreQueryPrefix:C.ignoreQueryPrefix===!0,interpretNumericEntities:typeof C.interpretNumericEntities=="boolean"?C.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof C.parameterLimit=="number"?C.parameterLimit:a.parameterLimit,parseArrays:C.parseArrays!==!1,plainObjects:typeof C.plainObjects=="boolean"?C.plainObjects:a.plainObjects,strictDepth:typeof C.strictDepth=="boolean"?!!C.strictDepth:a.strictDepth,strictNullHandling:typeof C.strictNullHandling=="boolean"?C.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof C.throwOnLimitExceeded=="boolean"?C.throwOnLimitExceeded:!1}};return Ef=function(b,C){var E=y(C);if(b===""||b===null||typeof b>"u")return E.plainObjects?{__proto__:null}:{};for(var S=typeof b=="string"?p(b,E):b,w=E.plainObjects?{__proto__:null}:{},R=Object.keys(S),N=0;N<R.length;++N){var O=R[N],T=v(O,S[O],E,typeof b=="string");w=e.merge(w,T,E)}return E.allowSparse===!0?w:e.compact(w)},Ef}var kf,Ky;function zk(){if(Ky)return kf;Ky=1;var e=Fk(),n=$k(),o=Rp();return kf={formats:o,parse:n,stringify:e},kf}var Uk=zk();const cu=da(Uk);var Rf,Hy;function Bk(){if(Hy)return Rf;Hy=1;function e(n,...o){}return Rf=e,Rf}var Wk=Bk();const Pp=da(Wk);function qk(e,n){for(var o=-1,a=e==null?0:e.length,s=0,u=[];++o<a;){var c=e[o];n(c,o,e)&&(u[s++]=c)}return u}function Vk(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}function Kk(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var du={exports:{}},Hk=du.exports,Qy;function Qk(){return Qy||(Qy=1,(function(e,n){(function(o,a){typeof Kk=="function"?e.exports=a():o.pluralize=a()})(Hk,function(){var o=[],a=[],s={},u={},c={};function f(S){return typeof S=="string"?new RegExp("^"+S+"$","i"):S}function p(S,w){return S===w?w:S===S.toLowerCase()?w.toLowerCase():S===S.toUpperCase()?w.toUpperCase():S[0]===S[0].toUpperCase()?w.charAt(0).toUpperCase()+w.substr(1).toLowerCase():w.toLowerCase()}function h(S,w){return S.replace(/\$(\d{1,2})/g,function(R,N){return w[N]||""})}function v(S,w){return S.replace(w[0],function(R,N){var O=h(w[1],arguments);return p(R===""?S[N-1]:R,O)})}function y(S,w,R){if(!S.length||s.hasOwnProperty(S))return w;for(var N=R.length;N--;){var O=R[N];if(O[0].test(w))return v(w,O)}return w}function b(S,w,R){return function(N){var O=N.toLowerCase();return w.hasOwnProperty(O)?p(N,O):S.hasOwnProperty(O)?p(N,S[O]):y(O,N,R)}}function C(S,w,R,N){return function(O){var T=O.toLowerCase();return w.hasOwnProperty(T)?!0:S.hasOwnProperty(T)?!1:y(T,T,R)===T}}function E(S,w,R){var N=w===1?E.singular(S):E.plural(S);return(R?w+" ":"")+N}return E.plural=b(c,u,o),E.isPlural=C(c,u,o),E.singular=b(u,c,a),E.isSingular=C(u,c,a),E.addPluralRule=function(S,w){o.push([f(S),w])},E.addSingularRule=function(S,w){a.push([f(S),w])},E.addUncountableRule=function(S){if(typeof S=="string"){s[S.toLowerCase()]=!0;return}E.addPluralRule(S,"$0"),E.addSingularRule(S,"$0")},E.addIrregularRule=function(S,w){w=w.toLowerCase(),S=S.toLowerCase(),c[S]=w,u[w]=S},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(S){return E.addIrregularRule(S[0],S[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(S){return E.addPluralRule(S[0],S[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(S){return E.addSingularRule(S[0],S[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(E.addUncountableRule),E})})(du)),du.exports}var Gk=Qk();const Gy=da(Gk);function Yk(){this.__data__=new Mn,this.size=0}function Xk(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Jk(e){return this.__data__.get(e)}function Zk(e){return this.__data__.has(e)}var eR=200;function tR(e,n){var o=this.__data__;if(o instanceof Mn){var a=o.__data__;if(!hs||a.length<eR-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new fi(a)}return o.set(e,n),this.size=o.size,this}function Eo(e){var n=this.__data__=new Mn(e);this.size=n.size}Eo.prototype.clear=Yk;Eo.prototype.delete=Xk;Eo.prototype.get=Jk;Eo.prototype.has=Zk;Eo.prototype.set=tR;function rR(e,n){for(var o=-1,a=e==null?0:e.length;++o<a;)if(n(e[o],o,e))return!0;return!1}var nR=1,oR=2;function ax(e,n,o,a,s,u){var c=o&nR,f=e.length,p=n.length;if(f!=p&&!(c&&p>f))return!1;var h=u.get(e),v=u.get(n);if(h&&v)return h==n&&v==e;var y=-1,b=!0,C=o&oR?new sa:void 0;for(u.set(e,n),u.set(n,e);++y<f;){var E=e[y],S=n[y];if(a)var w=c?a(S,E,y,n,e,u):a(E,S,y,e,n,u);if(w!==void 0){if(w)continue;b=!1;break}if(C){if(!rR(n,function(R,N){if(!Sp(C,N)&&(E===R||s(E,R,o,a,u)))return C.push(N)})){b=!1;break}}else if(!(E===S||s(E,S,o,a,u))){b=!1;break}}return u.delete(e),u.delete(n),b}var Yy=In.Uint8Array;function iR(e){var n=-1,o=Array(e.size);return e.forEach(function(a,s){o[++n]=[s,a]}),o}var aR=1,sR=2,lR="[object Boolean]",uR="[object Date]",cR="[object Error]",dR="[object Map]",fR="[object Number]",pR="[object RegExp]",hR="[object Set]",mR="[object String]",vR="[object Symbol]",yR="[object ArrayBuffer]",gR="[object DataView]",Xy=Ro?Ro.prototype:void 0,Pf=Xy?Xy.valueOf:void 0;function xR(e,n,o,a,s,u,c){switch(o){case gR:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case yR:return!(e.byteLength!=n.byteLength||!u(new Yy(e),new Yy(n)));case lR:case uR:case fR:return F0(+e,+n);case cR:return e.name==n.name&&e.message==n.message;case pR:case mR:return e==n+"";case dR:var f=iR;case hR:var p=a&aR;if(f||(f=Cp),e.size!=n.size&&!p)return!1;var h=c.get(e);if(h)return h==n;a|=sR,c.set(e,n);var v=ax(f(e),f(n),a,s,u,c);return c.delete(e),v;case vR:if(Pf)return Pf.call(e)==Pf.call(n)}return!1}function wR(e,n,o){var a=n(e);return ms(e)?a:U0(a,o(e))}function bR(){return[]}var SR=Object.prototype,CR=SR.propertyIsEnumerable,Jy=Object.getOwnPropertySymbols,ER=Jy?function(e){return e==null?[]:(e=Object(e),qk(Jy(e),function(n){return CR.call(e,n)}))}:bR;function kR(){return!1}var sx=typeof Nn=="object"&&Nn&&!Nn.nodeType&&Nn,Zy=sx&&typeof _n=="object"&&_n&&!_n.nodeType&&_n,RR=Zy&&Zy.exports===sx,eg=RR?In.Buffer:void 0,PR=eg?eg.isBuffer:void 0,ip=PR||kR,NR=9007199254740991,_R=/^(?:0|[1-9]\d*)$/;function OR(e,n){var o=typeof e;return n=n??NR,!!n&&(o=="number"||o!="symbol"&&_R.test(e))&&e>-1&&e%1==0&&e<n}var TR="[object Arguments]",jR="[object Array]",AR="[object Boolean]",IR="[object Date]",MR="[object Error]",DR="[object Function]",LR="[object Map]",FR="[object Number]",$R="[object Object]",zR="[object RegExp]",UR="[object Set]",BR="[object String]",WR="[object WeakMap]",qR="[object ArrayBuffer]",VR="[object DataView]",KR="[object Float32Array]",HR="[object Float64Array]",QR="[object Int8Array]",GR="[object Int16Array]",YR="[object Int32Array]",XR="[object Uint8Array]",JR="[object Uint8ClampedArray]",ZR="[object Uint16Array]",eP="[object Uint32Array]",at={};at[KR]=at[HR]=at[QR]=at[GR]=at[YR]=at[XR]=at[JR]=at[ZR]=at[eP]=!0;at[TR]=at[jR]=at[qR]=at[AR]=at[VR]=at[IR]=at[MR]=at[DR]=at[LR]=at[FR]=at[$R]=at[zR]=at[UR]=at[BR]=at[WR]=!1;function tP(e){return la(e)&&H0(e.length)&&!!at[Os(e)]}var lx=typeof Nn=="object"&&Nn&&!Nn.nodeType&&Nn,cs=lx&&typeof _n=="object"&&_n&&!_n.nodeType&&_n,rP=cs&&cs.exports===lx,Nf=rP&&I0.process,tg=(function(){try{var e=cs&&cs.require&&cs.require("util").types;return e||Nf&&Nf.binding&&Nf.binding("util")}catch{}})(),rg=tg&&tg.isTypedArray,ux=rg?zE(rg):tP,nP=Object.prototype,oP=nP.hasOwnProperty;function iP(e,n){var o=ms(e),a=!o&&W0(e),s=!o&&!a&&ip(e),u=!o&&!a&&!s&&ux(e),c=o||a||s||u,f=c?Vk(e.length,String):[],p=f.length;for(var h in e)oP.call(e,h)&&!(c&&(h=="length"||s&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||OR(h,p)))&&f.push(h);return f}var aP=Object.prototype;function sP(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||aP;return e===o}function lP(e,n){return function(o){return e(n(o))}}var uP=lP(Object.keys,Object),cP=Object.prototype,dP=cP.hasOwnProperty;function fP(e){if(!sP(e))return uP(e);var n=[];for(var o in Object(e))dP.call(e,o)&&o!="constructor"&&n.push(o);return n}function pP(e){return Q0(e)?iP(e):fP(e)}function ng(e){return wR(e,pP,ER)}var hP=1,mP=Object.prototype,vP=mP.hasOwnProperty;function yP(e,n,o,a,s,u){var c=o&hP,f=ng(e),p=f.length,h=ng(n),v=h.length;if(p!=v&&!c)return!1;for(var y=p;y--;){var b=f[y];if(!(c?b in n:vP.call(n,b)))return!1}var C=u.get(e),E=u.get(n);if(C&&E)return C==n&&E==e;var S=!0;u.set(e,n),u.set(n,e);for(var w=c;++y<p;){b=f[y];var R=e[b],N=n[b];if(a)var O=c?a(N,R,b,n,e,u):a(R,N,b,e,n,u);if(!(O===void 0?R===N||s(R,N,o,a,u):O)){S=!1;break}w||(w=b=="constructor")}if(S&&!w){var T=e.constructor,$=n.constructor;T!=$&&"constructor"in e&&"constructor"in n&&!(typeof T=="function"&&T instanceof T&&typeof $=="function"&&$ instanceof $)&&(S=!1)}return u.delete(e),u.delete(n),S}var ap=di(In,"DataView"),sp=di(In,"Promise"),lp=di(In,"WeakMap"),og="[object Map]",gP="[object Object]",ig="[object Promise]",ag="[object Set]",sg="[object WeakMap]",lg="[object DataView]",xP=ci(ap),wP=ci(hs),bP=ci(sp),SP=ci(Ki),CP=ci(lp),fo=Os;(ap&&fo(new ap(new ArrayBuffer(1)))!=lg||hs&&fo(new hs)!=og||sp&&fo(sp.resolve())!=ig||Ki&&fo(new Ki)!=ag||lp&&fo(new lp)!=sg)&&(fo=function(e){var n=Os(e),o=n==gP?e.constructor:void 0,a=o?ci(o):"";if(a)switch(a){case xP:return lg;case wP:return og;case bP:return ig;case SP:return ag;case CP:return sg}return n});var EP=1,ug="[object Arguments]",cg="[object Array]",Ql="[object Object]",kP=Object.prototype,dg=kP.hasOwnProperty;function RP(e,n,o,a,s,u){var c=ms(e),f=ms(n),p=c?cg:fo(e),h=f?cg:fo(n);p=p==ug?Ql:p,h=h==ug?Ql:h;var v=p==Ql,y=h==Ql,b=p==h;if(b&&ip(e)){if(!ip(n))return!1;c=!0,v=!1}if(b&&!v)return u||(u=new Eo),c||ux(e)?ax(e,n,o,a,s,u):xR(e,n,p,o,a,s,u);if(!(o&EP)){var C=v&&dg.call(e,"__wrapped__"),E=y&&dg.call(n,"__wrapped__");if(C||E){var S=C?e.value():e,w=E?n.value():n;return u||(u=new Eo),s(S,w,o,a,u)}}return b?(u||(u=new Eo),yP(e,n,o,a,s,u)):!1}function cx(e,n,o,a,s){return e===n?!0:e==null||n==null||!la(e)&&!la(n)?e!==e&&n!==n:RP(e,n,o,a,cx,s)}function Hi(e,n){return cx(e,n)}var fu={exports:{}};/* @license
52
+ Papa Parse
53
+ v5.5.3
54
+ https://github.com/mholt/PapaParse
55
+ License: MIT
56
+ */var PP=fu.exports,fg;function NP(){return fg||(fg=1,(function(e,n){((o,a)=>{e.exports=a()})(PP,function o(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},s,u=!a.document&&!!a.postMessage,c=a.IS_PAPA_WORKER||!1,f={},p=0,h={};function v(P){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(_){var D=$(_);D.chunkSize=parseInt(D.chunkSize),_.step||_.chunk||(D.chunkSize=null),this._handle=new S(D),(this._handle.streamer=this)._config=D}).call(this,P),this.parseChunk=function(_,D){var H=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<H){let J=this._config.newline;J||(W=this._config.quoteChar||'"',J=this._handle.guessLineEndings(_,W)),_=[..._.split(J).slice(H)].join(J)}this.isFirstChunk&&M(this._config.beforeFirstChunk)&&(W=this._config.beforeFirstChunk(_))!==void 0&&(_=W),this.isFirstChunk=!1,this._halted=!1;var H=this._partialLine+_,W=(this._partialLine="",this._handle.parse(H,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(_=W.meta.cursor,H=(this._finished||(this._partialLine=H.substring(_-this._baseIndex),this._baseIndex=_),W&&W.data&&(this._rowCount+=W.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),c)a.postMessage({results:W,workerId:h.WORKER_ID,finished:H});else if(M(this._config.chunk)&&!D){if(this._config.chunk(W,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=W=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(W.data),this._completeResults.errors=this._completeResults.errors.concat(W.errors),this._completeResults.meta=W.meta),this._completed||!H||!M(this._config.complete)||W&&W.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),H||W&&W.meta.paused||this._nextChunk(),W}this._halted=!0},this._sendError=function(_){M(this._config.error)?this._config.error(_):c&&this._config.error&&a.postMessage({workerId:h.WORKER_ID,error:_,finished:!1})}}function y(P){var _;(P=P||{}).chunkSize||(P.chunkSize=h.RemoteChunkSize),v.call(this,P),this._nextChunk=u?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(D){this._input=D,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(_=new XMLHttpRequest,this._config.withCredentials&&(_.withCredentials=this._config.withCredentials),u||(_.onload=A(this._chunkLoaded,this),_.onerror=A(this._chunkError,this)),_.open(this._config.downloadRequestBody?"POST":"GET",this._input,!u),this._config.downloadRequestHeaders){var D,H=this._config.downloadRequestHeaders;for(D in H)_.setRequestHeader(D,H[D])}var W;this._config.chunkSize&&(W=this._start+this._config.chunkSize-1,_.setRequestHeader("Range","bytes="+this._start+"-"+W));try{_.send(this._config.downloadRequestBody)}catch(J){this._chunkError(J.message)}u&&_.status===0&&this._chunkError()}},this._chunkLoaded=function(){_.readyState===4&&(_.status<200||400<=_.status?this._chunkError():(this._start+=this._config.chunkSize||_.responseText.length,this._finished=!this._config.chunkSize||this._start>=(D=>(D=D.getResponseHeader("Content-Range"))!==null?parseInt(D.substring(D.lastIndexOf("/")+1)):-1)(_),this.parseChunk(_.responseText)))},this._chunkError=function(D){D=_.statusText||D,this._sendError(new Error(D))}}function b(P){(P=P||{}).chunkSize||(P.chunkSize=h.LocalChunkSize),v.call(this,P);var _,D,H=typeof FileReader<"u";this.stream=function(W){this._input=W,D=W.slice||W.webkitSlice||W.mozSlice,H?((_=new FileReader).onload=A(this._chunkLoaded,this),_.onerror=A(this._chunkError,this)):_=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var W=this._input,J=(this._config.chunkSize&&(J=Math.min(this._start+this._config.chunkSize,this._input.size),W=D.call(W,this._start,J)),_.readAsText(W,this._config.encoding));H||this._chunkLoaded({target:{result:J}})},this._chunkLoaded=function(W){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(W.target.result)},this._chunkError=function(){this._sendError(_.error)}}function C(P){var _;v.call(this,P=P||{}),this.stream=function(D){return _=D,this._nextChunk()},this._nextChunk=function(){var D,H;if(!this._finished)return D=this._config.chunkSize,_=D?(H=_.substring(0,D),_.substring(D)):(H=_,""),this._finished=!_,this.parseChunk(H)}}function E(P){v.call(this,P=P||{});var _=[],D=!0,H=!1;this.pause=function(){v.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){v.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(W){this._input=W,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){H&&_.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),_.length?this.parseChunk(_.shift()):D=!0},this._streamData=A(function(W){try{_.push(typeof W=="string"?W:W.toString(this._config.encoding)),D&&(D=!1,this._checkIsFinished(),this.parseChunk(_.shift()))}catch(J){this._streamError(J)}},this),this._streamError=A(function(W){this._streamCleanUp(),this._sendError(W)},this),this._streamEnd=A(function(){this._streamCleanUp(),H=!0,this._streamData("")},this),this._streamCleanUp=A(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function S(P){var _,D,H,W,J=Math.pow(2,53),ce=-J,xe=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,fe=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,ae=this,G=0,Z=0,B=!1,j=!1,z=[],ee={data:[],errors:[],meta:{}};function ue(pe){return P.skipEmptyLines==="greedy"?pe.join("").trim()==="":pe.length===1&&pe[0].length===0}function se(){if(ee&&H&&(Pe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+h.DefaultDelimiter+"'"),H=!1),P.skipEmptyLines&&(ee.data=ee.data.filter(function(Ee){return!ue(Ee)})),de()){let Ee=function(je,_e){M(P.transformHeader)&&(je=P.transformHeader(je,_e)),z.push(je)};var me=Ee;if(ee)if(Array.isArray(ee.data[0])){for(var pe=0;de()&&pe<ee.data.length;pe++)ee.data[pe].forEach(Ee);ee.data.splice(0,1)}else ee.data.forEach(Ee)}function ne(Ee,je){for(var _e=P.header?{}:[],Ie=0;Ie<Ee.length;Ie++){var ke=Ie,Le=Ee[Ie],Le=((Ae,Fe)=>(Be=>(P.dynamicTypingFunction&&P.dynamicTyping[Be]===void 0&&(P.dynamicTyping[Be]=P.dynamicTypingFunction(Be)),(P.dynamicTyping[Be]||P.dynamicTyping)===!0))(Ae)?Fe==="true"||Fe==="TRUE"||Fe!=="false"&&Fe!=="FALSE"&&((Be=>{if(xe.test(Be)&&(Be=parseFloat(Be),ce<Be&&Be<J))return 1})(Fe)?parseFloat(Fe):fe.test(Fe)?new Date(Fe):Fe===""?null:Fe):Fe)(ke=P.header?Ie>=z.length?"__parsed_extra":z[Ie]:ke,Le=P.transform?P.transform(Le,ke):Le);ke==="__parsed_extra"?(_e[ke]=_e[ke]||[],_e[ke].push(Le)):_e[ke]=Le}return P.header&&(Ie>z.length?Pe("FieldMismatch","TooManyFields","Too many fields: expected "+z.length+" fields but parsed "+Ie,Z+je):Ie<z.length&&Pe("FieldMismatch","TooFewFields","Too few fields: expected "+z.length+" fields but parsed "+Ie,Z+je)),_e}var he;ee&&(P.header||P.dynamicTyping||P.transform)&&(he=1,!ee.data.length||Array.isArray(ee.data[0])?(ee.data=ee.data.map(ne),he=ee.data.length):ee.data=ne(ee.data,0),P.header&&ee.meta&&(ee.meta.fields=z),Z+=he)}function de(){return P.header&&z.length===0}function Pe(pe,ne,he,me){pe={type:pe,code:ne,message:he},me!==void 0&&(pe.row=me),ee.errors.push(pe)}M(P.step)&&(W=P.step,P.step=function(pe){ee=pe,de()?se():(se(),ee.data.length!==0&&(G+=pe.data.length,P.preview&&G>P.preview?D.abort():(ee.data=ee.data[0],W(ee,ae))))}),this.parse=function(pe,ne,he){var me=P.quoteChar||'"',me=(P.newline||(P.newline=this.guessLineEndings(pe,me)),H=!1,P.delimiter?M(P.delimiter)&&(P.delimiter=P.delimiter(pe),ee.meta.delimiter=P.delimiter):((me=((Ee,je,_e,Ie,ke)=>{var Le,Ae,Fe,Be;ke=ke||[","," ","|",";",h.RECORD_SEP,h.UNIT_SEP];for(var He=0;He<ke.length;He++){for(var st,_t=ke[He],et=0,vt=0,rt=0,lt=(Fe=void 0,new R({comments:Ie,delimiter:_t,newline:je,preview:10}).parse(Ee)),wt=0;wt<lt.data.length;wt++)_e&&ue(lt.data[wt])?rt++:(st=lt.data[wt].length,vt+=st,Fe===void 0?Fe=st:0<st&&(et+=Math.abs(st-Fe),Fe=st));0<lt.data.length&&(vt/=lt.data.length-rt),(Ae===void 0||et<=Ae)&&(Be===void 0||Be<vt)&&1.99<vt&&(Ae=et,Le=_t,Be=vt)}return{successful:!!(P.delimiter=Le),bestDelimiter:Le}})(pe,P.newline,P.skipEmptyLines,P.comments,P.delimitersToGuess)).successful?P.delimiter=me.bestDelimiter:(H=!0,P.delimiter=h.DefaultDelimiter),ee.meta.delimiter=P.delimiter),$(P));return P.preview&&P.header&&me.preview++,_=pe,D=new R(me),ee=D.parse(_,ne,he),se(),B?{meta:{paused:!0}}:ee||{meta:{paused:!1}}},this.paused=function(){return B},this.pause=function(){B=!0,D.abort(),_=M(P.chunk)?"":_.substring(D.getCharIndex())},this.resume=function(){ae.streamer._halted?(B=!1,ae.streamer.parseChunk(_,!0)):setTimeout(ae.resume,3)},this.aborted=function(){return j},this.abort=function(){j=!0,D.abort(),ee.meta.aborted=!0,M(P.complete)&&P.complete(ee),_=""},this.guessLineEndings=function(Ee,me){Ee=Ee.substring(0,1048576);var me=new RegExp(w(me)+"([^]*?)"+w(me),"gm"),he=(Ee=Ee.replace(me,"")).split("\r"),me=Ee.split(`
57
+ `),Ee=1<me.length&&me[0].length<he[0].length;if(he.length===1||Ee)return`
58
+ `;for(var je=0,_e=0;_e<he.length;_e++)he[_e][0]===`
59
+ `&&je++;return je>=he.length/2?`\r
60
+ `:"\r"}}function w(P){return P.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R(P){var _=(P=P||{}).delimiter,D=P.newline,H=P.comments,W=P.step,J=P.preview,ce=P.fastMode,xe=null,fe=!1,ae=P.quoteChar==null?'"':P.quoteChar,G=ae;if(P.escapeChar!==void 0&&(G=P.escapeChar),(typeof _!="string"||-1<h.BAD_DELIMITERS.indexOf(_))&&(_=","),H===_)throw new Error("Comment character same as delimiter");H===!0?H="#":(typeof H!="string"||-1<h.BAD_DELIMITERS.indexOf(H))&&(H=!1),D!==`
61
+ `&&D!=="\r"&&D!==`\r
62
+ `&&(D=`
63
+ `);var Z=0,B=!1;this.parse=function(j,z,ee){if(typeof j!="string")throw new Error("Input must be a string");var ue=j.length,se=_.length,de=D.length,Pe=H.length,pe=M(W),ne=[],he=[],me=[],Ee=Z=0;if(!j)return et();if(ce||ce!==!1&&j.indexOf(ae)===-1){for(var je=j.split(D),_e=0;_e<je.length;_e++){if(me=je[_e],Z+=me.length,_e!==je.length-1)Z+=D.length;else if(ee)return et();if(!H||me.substring(0,Pe)!==H){if(pe){if(ne=[],Be(me.split(_)),vt(),B)return et()}else Be(me.split(_));if(J&&J<=_e)return ne=ne.slice(0,J),et(!0)}}return et()}for(var Ie=j.indexOf(_,Z),ke=j.indexOf(D,Z),Le=new RegExp(w(G)+w(ae),"g"),Ae=j.indexOf(ae,Z);;)if(j[Z]===ae)for(Ae=Z,Z++;;){if((Ae=j.indexOf(ae,Ae+1))===-1)return ee||he.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ne.length,index:Z}),st();if(Ae===ue-1)return st(j.substring(Z,Ae).replace(Le,ae));if(ae===G&&j[Ae+1]===G)Ae++;else if(ae===G||Ae===0||j[Ae-1]!==G){Ie!==-1&&Ie<Ae+1&&(Ie=j.indexOf(_,Ae+1));var Fe=He((ke=ke!==-1&&ke<Ae+1?j.indexOf(D,Ae+1):ke)===-1?Ie:Math.min(Ie,ke));if(j.substr(Ae+1+Fe,se)===_){me.push(j.substring(Z,Ae).replace(Le,ae)),j[Z=Ae+1+Fe+se]!==ae&&(Ae=j.indexOf(ae,Z)),Ie=j.indexOf(_,Z),ke=j.indexOf(D,Z);break}if(Fe=He(ke),j.substring(Ae+1+Fe,Ae+1+Fe+de)===D){if(me.push(j.substring(Z,Ae).replace(Le,ae)),_t(Ae+1+Fe+de),Ie=j.indexOf(_,Z),Ae=j.indexOf(ae,Z),pe&&(vt(),B))return et();if(J&&ne.length>=J)return et(!0);break}he.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ne.length,index:Z}),Ae++}}else if(H&&me.length===0&&j.substring(Z,Z+Pe)===H){if(ke===-1)return et();Z=ke+de,ke=j.indexOf(D,Z),Ie=j.indexOf(_,Z)}else if(Ie!==-1&&(Ie<ke||ke===-1))me.push(j.substring(Z,Ie)),Z=Ie+se,Ie=j.indexOf(_,Z);else{if(ke===-1)break;if(me.push(j.substring(Z,ke)),_t(ke+de),pe&&(vt(),B))return et();if(J&&ne.length>=J)return et(!0)}return st();function Be(rt){ne.push(rt),Ee=Z}function He(rt){var lt=0;return lt=rt!==-1&&(rt=j.substring(Ae+1,rt))&&rt.trim()===""?rt.length:lt}function st(rt){return ee||(rt===void 0&&(rt=j.substring(Z)),me.push(rt),Z=ue,Be(me),pe&&vt()),et()}function _t(rt){Z=rt,Be(me),me=[],ke=j.indexOf(D,Z)}function et(rt){if(P.header&&!z&&ne.length&&!fe){var lt=ne[0],wt=Object.create(null),Xt=new Set(lt);let Jt=!1;for(let Ve=0;Ve<lt.length;Ve++){let dt=lt[Ve];if(wt[dt=M(P.transformHeader)?P.transformHeader(dt,Ve):dt]){let cr,yr=wt[dt];for(;cr=dt+"_"+yr,yr++,Xt.has(cr););Xt.add(cr),lt[Ve]=cr,wt[dt]++,Jt=!0,(xe=xe===null?{}:xe)[cr]=dt}else wt[dt]=1,lt[Ve]=dt;Xt.add(dt)}Jt&&console.warn("Duplicate headers found and renamed."),fe=!0}return{data:ne,errors:he,meta:{delimiter:_,linebreak:D,aborted:B,truncated:!!rt,cursor:Ee+(z||0),renamedHeaders:xe}}}function vt(){W(et()),ne=[],he=[]}},this.abort=function(){B=!0},this.getCharIndex=function(){return Z}}function N(P){var _=P.data,D=f[_.workerId],H=!1;if(_.error)D.userError(_.error,_.file);else if(_.results&&_.results.data){var W={abort:function(){H=!0,O(_.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:T,resume:T};if(M(D.userStep)){for(var J=0;J<_.results.data.length&&(D.userStep({data:_.results.data[J],errors:_.results.errors,meta:_.results.meta},W),!H);J++);delete _.results}else M(D.userChunk)&&(D.userChunk(_.results,W,_.file),delete _.results)}_.finished&&!H&&O(_.workerId,_.results)}function O(P,_){var D=f[P];M(D.userComplete)&&D.userComplete(_),D.terminate(),delete f[P]}function T(){throw new Error("Not implemented.")}function $(P){if(typeof P!="object"||P===null)return P;var _,D=Array.isArray(P)?[]:{};for(_ in P)D[_]=$(P[_]);return D}function A(P,_){return function(){P.apply(_,arguments)}}function M(P){return typeof P=="function"}return h.parse=function(P,_){var D=(_=_||{}).dynamicTyping||!1;if(M(D)&&(_.dynamicTypingFunction=D,D={}),_.dynamicTyping=D,_.transform=!!M(_.transform)&&_.transform,!_.worker||!h.WORKERS_SUPPORTED)return D=null,h.NODE_STREAM_INPUT,typeof P=="string"?(P=(H=>H.charCodeAt(0)!==65279?H:H.slice(1))(P),D=new(_.download?y:C)(_)):P.readable===!0&&M(P.read)&&M(P.on)?D=new E(_):(a.File&&P instanceof File||P instanceof Object)&&(D=new b(_)),D.stream(P);(D=(()=>{var H;return!!h.WORKERS_SUPPORTED&&(H=(()=>{var W=a.URL||a.webkitURL||null,J=o.toString();return h.BLOB_URL||(h.BLOB_URL=W.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",J,")();"],{type:"text/javascript"})))})(),(H=new a.Worker(H)).onmessage=N,H.id=p++,f[H.id]=H)})()).userStep=_.step,D.userChunk=_.chunk,D.userComplete=_.complete,D.userError=_.error,_.step=M(_.step),_.chunk=M(_.chunk),_.complete=M(_.complete),_.error=M(_.error),delete _.worker,D.postMessage({input:P,config:_,workerId:D.id})},h.unparse=function(P,_){var D=!1,H=!0,W=",",J=`\r
64
+ `,ce='"',xe=ce+ce,fe=!1,ae=null,G=!1,Z=((()=>{if(typeof _=="object"){if(typeof _.delimiter!="string"||h.BAD_DELIMITERS.filter(function(z){return _.delimiter.indexOf(z)!==-1}).length||(W=_.delimiter),typeof _.quotes!="boolean"&&typeof _.quotes!="function"&&!Array.isArray(_.quotes)||(D=_.quotes),typeof _.skipEmptyLines!="boolean"&&typeof _.skipEmptyLines!="string"||(fe=_.skipEmptyLines),typeof _.newline=="string"&&(J=_.newline),typeof _.quoteChar=="string"&&(ce=_.quoteChar),typeof _.header=="boolean"&&(H=_.header),Array.isArray(_.columns)){if(_.columns.length===0)throw new Error("Option columns is empty");ae=_.columns}_.escapeChar!==void 0&&(xe=_.escapeChar+ce),_.escapeFormulae instanceof RegExp?G=_.escapeFormulae:typeof _.escapeFormulae=="boolean"&&_.escapeFormulae&&(G=/^[=+\-@\t\r].*$/)}})(),new RegExp(w(ce),"g"));if(typeof P=="string"&&(P=JSON.parse(P)),Array.isArray(P)){if(!P.length||Array.isArray(P[0]))return B(null,P,fe);if(typeof P[0]=="object")return B(ae||Object.keys(P[0]),P,fe)}else if(typeof P=="object")return typeof P.data=="string"&&(P.data=JSON.parse(P.data)),Array.isArray(P.data)&&(P.fields||(P.fields=P.meta&&P.meta.fields||ae),P.fields||(P.fields=Array.isArray(P.data[0])?P.fields:typeof P.data[0]=="object"?Object.keys(P.data[0]):[]),Array.isArray(P.data[0])||typeof P.data[0]=="object"||(P.data=[P.data])),B(P.fields||[],P.data||[],fe);throw new Error("Unable to serialize unrecognized input");function B(z,ee,ue){var se="",de=(typeof z=="string"&&(z=JSON.parse(z)),typeof ee=="string"&&(ee=JSON.parse(ee)),Array.isArray(z)&&0<z.length),Pe=!Array.isArray(ee[0]);if(de&&H){for(var pe=0;pe<z.length;pe++)0<pe&&(se+=W),se+=j(z[pe],pe);0<ee.length&&(se+=J)}for(var ne=0;ne<ee.length;ne++){var he=(de?z:ee[ne]).length,me=!1,Ee=de?Object.keys(ee[ne]).length===0:ee[ne].length===0;if(ue&&!de&&(me=ue==="greedy"?ee[ne].join("").trim()==="":ee[ne].length===1&&ee[ne][0].length===0),ue==="greedy"&&de){for(var je=[],_e=0;_e<he;_e++){var Ie=Pe?z[_e]:_e;je.push(ee[ne][Ie])}me=je.join("").trim()===""}if(!me){for(var ke=0;ke<he;ke++){0<ke&&!Ee&&(se+=W);var Le=de&&Pe?z[ke]:ke;se+=j(ee[ne][Le],ke)}ne<ee.length-1&&(!ue||0<he&&!Ee)&&(se+=J)}}return se}function j(z,ee){var ue,se;return z==null?"":z.constructor===Date?JSON.stringify(z).slice(1,25):(se=!1,G&&typeof z=="string"&&G.test(z)&&(z="'"+z,se=!0),ue=z.toString().replace(Z,xe),(se=se||D===!0||typeof D=="function"&&D(z,ee)||Array.isArray(D)&&D[ee]||((de,Pe)=>{for(var pe=0;pe<Pe.length;pe++)if(-1<de.indexOf(Pe[pe]))return!0;return!1})(ue,h.BAD_DELIMITERS)||-1<ue.indexOf(W)||ue.charAt(0)===" "||ue.charAt(ue.length-1)===" ")?ce+ue+ce:ue)}},h.RECORD_SEP="",h.UNIT_SEP="",h.BYTE_ORDER_MARK="\uFEFF",h.BAD_DELIMITERS=["\r",`
65
+ `,'"',h.BYTE_ORDER_MARK],h.WORKERS_SUPPORTED=!u&&!!a.Worker,h.NODE_STREAM_INPUT=1,h.LocalChunkSize=10485760,h.RemoteChunkSize=5242880,h.DefaultDelimiter=",",h.Parser=R,h.ParserHandle=S,h.NetworkStreamer=y,h.FileStreamer=b,h.StringStreamer=C,h.ReadableStreamStreamer=E,a.jQuery&&((s=a.jQuery).fn.parse=function(P){var _=P.config||{},D=[];return this.each(function(J){if(!(s(this).prop("tagName").toUpperCase()==="INPUT"&&s(this).attr("type").toLowerCase()==="file"&&a.FileReader)||!this.files||this.files.length===0)return!0;for(var ce=0;ce<this.files.length;ce++)D.push({file:this.files[ce],inputElem:this,instanceConfig:s.extend({},_)})}),H(),this;function H(){if(D.length===0)M(P.complete)&&P.complete();else{var J,ce,xe,fe,ae=D[0];if(M(P.before)){var G=P.before(ae.file,ae.inputElem);if(typeof G=="object"){if(G.action==="abort")return J="AbortError",ce=ae.file,xe=ae.inputElem,fe=G.reason,void(M(P.error)&&P.error({name:J},ce,xe,fe));if(G.action==="skip")return void W();typeof G.config=="object"&&(ae.instanceConfig=s.extend(ae.instanceConfig,G.config))}else if(G==="skip")return void W()}var Z=ae.instanceConfig.complete;ae.instanceConfig.complete=function(B){M(Z)&&Z(B,ae.file,ae.inputElem),W()},h.parse(ae.file,ae.instanceConfig)}}function W(){D.splice(0,1),H()}}),c&&(a.onmessage=function(P){P=P.data,h.WORKER_ID===void 0&&P&&(h.WORKER_ID=P.workerId),typeof P.input=="string"?a.postMessage({workerId:h.WORKER_ID,results:h.parse(P.input,P.config),finished:!0}):(a.File&&P.input instanceof File||P.input instanceof Object)&&(P=h.parse(P.input,P.config))&&a.postMessage({workerId:h.WORKER_ID,results:P,finished:!0})}),(y.prototype=Object.create(v.prototype)).constructor=y,(b.prototype=Object.create(v.prototype)).constructor=b,(C.prototype=Object.create(C.prototype)).constructor=C,(E.prototype=Object.create(v.prototype)).constructor=E,h})})(fu)),fu.exports}NP();var _P=Object.defineProperty,V=(e,n)=>_P(e,"name",{value:n,configurable:!0}),dx=ie.createContext({}),OP=V(({children:e,isProvided:n,...o})=>{const a=V(async h=>{var v;try{return await((v=o.login)==null?void 0:v.call(o,h))}catch(y){return console.warn("Unhandled Error in login: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleLogin"),s=V(async h=>{var v;try{return await((v=o.register)==null?void 0:v.call(o,h))}catch(y){return console.warn("Unhandled Error in register: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleRegister"),u=V(async h=>{var v;try{return await((v=o.logout)==null?void 0:v.call(o,h))}catch(y){return console.warn("Unhandled Error in logout: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleLogout"),c=V(async h=>{var v;try{const y=await((v=o.check)==null?void 0:v.call(o,h));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in check: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleCheck"),f=V(async h=>{var v;try{const y=await((v=o.forgotPassword)==null?void 0:v.call(o,h));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in forgotPassword: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleForgotPassword"),p=V(async h=>{var v;try{const y=await((v=o.updatePassword)==null?void 0:v.call(o,h));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in updatePassword: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleUpdatePassword");return ie.createElement(dx.Provider,{value:{...o,login:a,logout:u,check:c,register:s,forgotPassword:f,updatePassword:p,isProvided:n}},e)},"AuthProviderContextProvider"),Wr=V(()=>ie.useContext(dx),"useAuthProviderContext"),TP=V(e=>{const{currentPage:n,pageSize:o,sorters:a,sorter:s,filters:u}=cu.parse(e.substring(1));return{parsedCurrentPage:n&&Number(n),parsedPageSize:o&&Number(o),parsedSorter:a||s||[],parsedFilters:u??[]}},"parseTableParams"),fx=V((e,n)=>e.operator!=="and"&&e.operator!=="or"&&n.operator!=="and"&&n.operator!=="or"?("field"in e?e.field:void 0)===("field"in n?n.field:void 0)&&e.operator===n.operator:("key"in e?e.key:void 0)===("key"in n?n.key:void 0)&&e.operator===n.operator,"compareFilters"),px=V((e,n)=>e.field===n.field,"compareSorters"),Gl=V((e,n,o=[])=>(n.filter(s=>(s.operator==="or"||s.operator==="and")&&!s.key).length>1&&Pp(!0,`[conditionalFilters]: You have created multiple Conditional Filters at the top level, this requires the key parameter.
66
+ For more information, see https://refine.dev/docs/advanced-tutorials/data-provider/handling-filters/#top-level-multiple-conditional-filters-usage`),Y0(e,n,o,fx).filter(s=>s.value!==void 0&&s.value!==null&&(s.operator!=="or"||s.operator==="or"&&s.value.length!==0)&&(s.operator!=="and"||s.operator==="and"&&s.value.length!==0))),"unionFilters"),pg=V((e,n)=>Y0(e,n,px).filter(o=>o.order!==void 0&&o.order!==null),"unionSorters"),hg=V((e,n)=>[...xu(n,e,fx),...e],"setInitialFilters"),mg=V((e,n)=>[...xu(n,e,px),...e],"setInitialSorters"),_f=V(e=>e/1e3,"userFriendlySecond"),jP=V((e,n)=>!e||!n?!1:!!e.find(o=>o===n),"hasPermission"),AP=V(e=>(e=e.replace(/([a-z]{1})([A-Z]{1})/g,"$1-$2"),e=e.replace(/([A-Z]{1})([A-Z]{1})([a-z]{1})/g,"$1-$2$3"),e=e.toLowerCase().replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim(),e=e.charAt(0).toUpperCase()+e.slice(1),e),"humanizeString"),IP={icon:ie.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"refine-logo",id:"refine-default-logo"},ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7889 0.422291C12.6627 -0.140764 11.3373 -0.140764 10.2111 0.422291L2.21115 4.42229C0.85601 5.09986 0 6.48491 0 8V16C0 17.5151 0.85601 18.9001 2.21115 19.5777L10.2111 23.5777C11.3373 24.1408 12.6627 24.1408 13.7889 23.5777L21.7889 19.5777C23.144 18.9001 24 17.5151 24 16V8C24 6.48491 23.144 5.09986 21.7889 4.42229L13.7889 0.422291ZM8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8V16C16 18.2091 14.2091 20 12 20C9.79086 20 8 18.2091 8 16V8Z",fill:"currentColor"}),ie.createElement("path",{d:"M14 8C14 9.10457 13.1046 10 12 10C10.8954 10 10 9.10457 10 8C10 6.89543 10.8954 6 12 6C13.1046 6 14 6.89543 14 8Z",fill:"currentColor"})),text:"Refine Project"},jt={mutationMode:"pessimistic",syncWithLocation:!1,undoableTimeout:5e3,warnWhenUnsavedChanges:!1,liveMode:"off",redirect:{afterCreate:"list",afterClone:"list",afterEdit:"list"},overtime:{enabled:!0,interval:1e3},textTransformers:{humanize:AP,plural:Gy.plural,singular:Gy.singular},disableServerSideValidation:!1,disableRouteChangeHandler:!1,title:IP},To=ie.createContext({mutationMode:"pessimistic",warnWhenUnsavedChanges:!1,syncWithLocation:!1,undoableTimeout:5e3,liveMode:"off",onLiveEvent:void 0,options:jt}),MP=V(({mutationMode:e,warnWhenUnsavedChanges:n,syncWithLocation:o,undoableTimeout:a,children:s,liveMode:u="off",onLiveEvent:c,options:f})=>ie.createElement(To.Provider,{value:{__initialized:!0,mutationMode:e,warnWhenUnsavedChanges:n,syncWithLocation:o,undoableTimeout:a,liveMode:u,onLiveEvent:c,options:f}},s),"RefineContextProvider"),DP=V(({options:e,disableTelemetry:n,liveMode:o,mutationMode:a,reactQueryClientConfig:s,reactQueryDevtoolConfig:u,syncWithLocation:c,undoableTimeout:f,warnWhenUnsavedChanges:p,disableRouteChangeHandler:h}={})=>{var v,y,b,C,E,S,w,R,N,O,T;const $={breadcrumb:e==null?void 0:e.breadcrumb,mutationMode:(e==null?void 0:e.mutationMode)??a??jt.mutationMode,undoableTimeout:(e==null?void 0:e.undoableTimeout)??f??jt.undoableTimeout,syncWithLocation:(e==null?void 0:e.syncWithLocation)??c??jt.syncWithLocation,warnWhenUnsavedChanges:(e==null?void 0:e.warnWhenUnsavedChanges)??p??jt.warnWhenUnsavedChanges,liveMode:(e==null?void 0:e.liveMode)??o??jt.liveMode,redirect:{afterCreate:((v=e==null?void 0:e.redirect)==null?void 0:v.afterCreate)??jt.redirect.afterCreate,afterClone:((y=e==null?void 0:e.redirect)==null?void 0:y.afterClone)??jt.redirect.afterClone,afterEdit:((b=e==null?void 0:e.redirect)==null?void 0:b.afterEdit)??jt.redirect.afterEdit},overtime:(e==null?void 0:e.overtime)??jt.overtime,textTransformers:{humanize:((C=e==null?void 0:e.textTransformers)==null?void 0:C.humanize)??jt.textTransformers.humanize,plural:((E=e==null?void 0:e.textTransformers)==null?void 0:E.plural)??jt.textTransformers.plural,singular:((S=e==null?void 0:e.textTransformers)==null?void 0:S.singular)??jt.textTransformers.singular},disableServerSideValidation:(e==null?void 0:e.disableServerSideValidation)??jt.disableServerSideValidation,projectId:e==null?void 0:e.projectId,title:{icon:typeof((w=e==null?void 0:e.title)==null?void 0:w.icon)>"u"?jt.title.icon:(R=e==null?void 0:e.title)==null?void 0:R.icon,text:typeof((N=e==null?void 0:e.title)==null?void 0:N.text)>"u"?jt.title.text:(O=e==null?void 0:e.title)==null?void 0:O.text},disableRouteChangeHandler:(e==null?void 0:e.disableRouteChangeHandler)??h??jt.disableRouteChangeHandler},A=(e==null?void 0:e.disableTelemetry)??n??!1,M={clientConfig:((T=e==null?void 0:e.reactQuery)==null?void 0:T.clientConfig)??s??{},devtoolConfig:u??{}};return{optionsWithDefaults:$,disableTelemetryWithDefault:A,reactQueryWithDefaults:M}},"handleRefineOptions"),Pn=V((e,n=[])=>{if(!e)return;let o=n.find(a=>a.identifier===e);return o||(o=n.find(a=>a.name===e)),o},"pickResource"),Cn=V((e,n,o)=>{if(n)return n;const a=Pn(e,o),s=a==null?void 0:a.meta;return s!=null&&s.dataProviderName?s.dataProviderName:"default"},"pickDataProvider"),Np=V(e=>e.startsWith(":"),"isParameter"),ua=V(e=>e.split("/").filter(o=>o!==""),"splitToSegments"),LP=V((e,n)=>{const o=ua(e),a=ua(n);return o.length===a.length},"isSegmentCountsSame"),wu=V(e=>e.replace(/^\/|\/$/g,""),"removeLeadingTrailingSlashes"),FP=V((e,n)=>{const o=wu(e),a=wu(n);if(!LP(o,a))return!1;const s=ua(o);return ua(a).every((c,f)=>Np(c)||c===s[f])},"checkBySegments"),Go=V((e,n)=>{const o=[];return["list","show","edit","create","clone"].forEach(s=>{const u=e[s];u&&o.push({action:s,resource:e,route:`/${u.replace(/^\//,"")}`})}),o},"getActionRoutesFromResource"),$P=V(e=>{var n;if(e.length===0)return;if(e.length===1)return e[0];const o=e.map(u=>({...u,splitted:ua(wu(u.route))})),a=((n=o[0])==null?void 0:n.splitted.length)??0;let s=[...o];for(let u=0;u<a;u++){const c=s.filter(f=>!Np(f.splitted[u]));if(c.length!==0){if(c.length===1){s=c;break}s=c}}return s[0]},"pickMatchedRoute"),zP=V((e,n)=>{const a=n.flatMap(u=>Go(u,n)).filter(u=>FP(e,u.route)),s=$P(a);return{found:!!s,resource:s==null?void 0:s.resource,action:s==null?void 0:s.action,matchedRoute:s==null?void 0:s.route}},"matchResourceFromRoute"),UP=V(e=>ua(wu(e)).flatMap(o=>Np(o)?[o.slice(1)]:[]),"pickRouteParams"),BP=V((e,n={})=>e.reduce((o,a)=>{const s=n[a];return typeof s<"u"&&(o[a]=s),o},{}),"prepareRouteParams"),qi=V((e,n={},o={},a={})=>{const s=UP(e),u=BP(s,{...n,...typeof(o==null?void 0:o.id)<"u"?{id:o.id}:{},...typeof(o==null?void 0:o.action)<"u"?{action:o.action}:{},...typeof(o==null?void 0:o.resource)<"u"?{resource:o.resource}:{},...o==null?void 0:o.params,...a});return e.replace(/:([^\/]+)/g,(c,f)=>{const p=u[f];return typeof p<"u"?`${p}`:c})},"composeRoute"),hx=V(()=>{const e=Wr();return e.isProvided?e:null},"useActiveAuthProvider"),WP=V(({pagination:e}={})=>{const n=(e==null?void 0:e.mode)??"server",o=(e==null?void 0:e.currentPage)??1,a=(e==null?void 0:e.pageSize)??10;return{currentPage:o,pageSize:a,mode:n}},"handlePaginationParams"),Of=V((e,n,o,a)=>{const s=a?e(n,a,o):e(n,o),u=o??n;return s===n||typeof s>"u"?u:s},"safeTranslate"),mx=V((e,n)=>{const{mutationMode:o,undoableTimeout:a}=g.useContext(To);return{mutationMode:e??o,undoableTimeout:n??a}},"useMutationMode"),vx=ie.createContext({}),qP=V(({children:e})=>{const[n,o]=g.useState(!1);return ie.createElement(vx.Provider,{value:{warnWhen:n,setWarnWhen:o}},e)},"UnsavedWarnContextProvider"),yx=V(()=>{const{warnWhenUnsavedChanges:e}=g.useContext(To),{warnWhen:n,setWarnWhen:o}=g.useContext(vx);return{warnWhenUnsavedChanges:e,warnWhen:!!n,setWarnWhen:o??(()=>{})}},"useWarnAboutChange"),VP=V(()=>{const{syncWithLocation:e}=g.useContext(To);return{syncWithLocation:e}},"useSyncWithLocation"),ju=V(()=>{const{mutationMode:e,syncWithLocation:n,undoableTimeout:o,warnWhenUnsavedChanges:a,liveMode:s,onLiveEvent:u,options:c,__initialized:f}=g.useContext(To);return{__initialized:f,mutationMode:e,syncWithLocation:n,undoableTimeout:o,warnWhenUnsavedChanges:a,liveMode:s,onLiveEvent:u,options:c}},"useRefineContext"),gx=V(()=>{const{options:{textTransformers:e}}=ju();return V((o="",a)=>{const s=e.humanize(o);return a==="singular"?e.singular(s):e.plural(s)},"getFriendlyName")},"useUserFriendlyName");function KP(e,n,o,a,s,u){var c;const f=u||gx(),p={create:"Create new ",clone:`#${a??""} Clone `,edit:`#${a??""} Edit `,show:`#${a??""} Show `,list:""},h=(n==null?void 0:n.identifier)??(n==null?void 0:n.name),v=((c=n==null?void 0:n.meta)==null?void 0:c.label)??(h&&f(h,o==="list"?"plural":"singular")),y=s??v,b=Of(e,"documentTitle.default","Refine"),C=Of(e,"documentTitle.suffix"," | Refine");let E=b;return o&&h&&(E=Of(e,`documentTitle.${h}.${o}`,`${p[o]??""}${y}${C}`,{id:a})),E}V(KP,"generateDefaultDocumentTitle");var vr=class{constructor(e=[]){this.segments=[],this.segments=e}key(){return this.segments}get(){return this.segments}};V(vr,"BaseKeyBuilder");var Dn=class extends vr{params(e){return new vr([...this.segments,e])}};V(Dn,"ParamsKeyBuilder");var xx=class extends vr{id(e){return new Dn([...this.segments,e?String(e):void 0])}};V(xx,"DataIdRequiringKeyBuilder");var wx=class extends vr{ids(...e){return new Dn([...this.segments,...e.length?[e.map(n=>String(n))]:[]])}};V(wx,"DataIdsRequiringKeyBuilder");var bx=class extends vr{action(e){if(e==="one")return new xx([...this.segments,e]);if(e==="many")return new wx([...this.segments,e]);if(["list","infinite"].includes(e))return new Dn([...this.segments,e]);throw new Error("Invalid action type")}};V(bx,"DataResourceKeyBuilder");var Sx=class extends vr{resource(e){return new bx([...this.segments,e])}mutation(e){return new Dn([...e==="custom"?this.segments:[this.segments[0]],e])}};V(Sx,"DataKeyBuilder");var Cx=class extends vr{action(e){return new Dn([...this.segments,e])}};V(Cx,"AuthKeyBuilder");var Ex=class extends vr{action(e){return new Dn([...this.segments,e])}};V(Ex,"AccessResourceKeyBuilder");var kx=class extends vr{resource(e){return new Ex([...this.segments,e])}};V(kx,"AccessKeyBuilder");var Rx=class extends vr{action(e){return new Dn([...this.segments,e])}};V(Rx,"AuditActionKeyBuilder");var Px=class extends vr{resource(e){return new Rx([...this.segments,e])}action(e){return new Dn([...this.segments,e])}};V(Px,"AuditKeyBuilder");var Nx=class extends vr{data(e){return new Sx(["data",e||"default"])}auth(){return new Cx(["auth"])}access(){return new kx(["access"])}audit(){return new Px(["audit"])}};V(Nx,"KeyBuilder");var HP=V(()=>new Nx([]),"keys"),QP=V(e=>{const n={queryKey:e.queryKey,signal:void 0};return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>e.signal}),n},"prepareQueryContext"),zt=V(()=>({keys:HP}),"useKeys");function GP({options:e,params:n}){const{getPermissions:o}=Wr(),{keys:a}=zt();return Rr({queryKey:a().auth().action("permissions").get(),queryFn:o?()=>o(n):()=>Promise.resolve(void 0),enabled:!!o,...e,meta:{...e==null?void 0:e.meta,...sr()}})}V(GP,"usePermissions");function _x({queryOptions:e}={}){const{getIdentity:n}=Wr(),{keys:o}=zt();return Rr({queryKey:o().auth().action("identity").get(),queryFn:n??(()=>Promise.resolve({})),retry:!1,enabled:!!n,...e,meta:{...e==null?void 0:e.meta,...sr()}})}V(_x,"useGetIdentity");var _p=V(()=>{const e=Oo(),{keys:n}=zt();return V(async()=>{await Promise.all(["check","identity","permissions"].map(a=>e.invalidateQueries({queryKey:n().auth().action(a).get()})))},"invalidate")},"useInvalidateAuthStore");function Ox({mutationOptions:e}={}){const n=_p(),o=qr(),{open:a,close:s}=pi(),{logout:u}=Wr(),{keys:c}=zt();return{...Gt({mutationKey:c().auth().action("logout").get(),mutationFn:u,...e,onSuccess:(p,h)=>{const{success:v,error:y,redirectTo:b,successNotification:C}=p,{redirectPath:E}=h??{},S=E??b;v&&(s==null||s("useLogout-error"),C&&(a==null||a(YP(C)))),(y||!v)&&(a==null||a(vg(y))),S!==!1&&S&&o({to:S}),n()},onError:p=>{a==null||a(vg(p))},meta:{...e==null?void 0:e.meta,...sr()}})}}V(Ox,"useLogout");var vg=V(e=>({key:"useLogout-error",type:"error",message:(e==null?void 0:e.name)||"Logout Error",description:(e==null?void 0:e.message)||"Something went wrong during logout"}),"buildNotification"),YP=V(e=>({message:e.message,description:e.description,key:"logout-success",type:"success"}),"buildSuccessNotification");function XP({mutationOptions:e}={}){var n;const o=_p(),a=qr(),s=un(),{close:u,open:c}=pi(),{login:f}=Wr(),{keys:p}=zt(),h=(n=s.params)==null?void 0:n.to;return{...Gt({mutationKey:p().auth().action("login").get(),mutationFn:f,onSuccess:async({success:y,redirectTo:b,error:C,successNotification:E})=>{y&&(u==null||u("login-error"),E&&(c==null||c(JP(E)))),(C||!y)&&(c==null||c(yg(C))),y&&(h?a({to:h,type:"replace"}):b&&a({to:b,type:"replace"})),setTimeout(()=>{o()},32)},onError:y=>{c==null||c(yg(y))},...e,meta:{...e==null?void 0:e.meta,...sr()}})}}V(XP,"useLogin");var yg=V(e=>({message:(e==null?void 0:e.name)||"Login Error",description:(e==null?void 0:e.message)||"Invalid credentials",key:"login-error",type:"error"}),"buildNotification"),JP=V(e=>({message:e.message,description:e.description,key:"login-success",type:"success"}),"buildSuccessNotification");function ZP({mutationOptions:e}={}){const n=_p(),o=qr(),{close:a,open:s}=pi(),{register:u}=Wr(),{keys:c}=zt();return{...Gt({mutationKey:c().auth().action("register").get(),mutationFn:u,onSuccess:async({success:p,redirectTo:h,error:v,successNotification:y})=>{p&&(a==null||a("register-error"),y&&(s==null||s(eN(y)))),(v||!p)&&(s==null||s(gg(v))),h&&o({to:h,type:"replace"}),p&&setTimeout(()=>{n()},32)},onError:p=>{s==null||s(gg(p))},...e,meta:{...e==null?void 0:e.meta,...sr()}})}}V(ZP,"useRegister");var gg=V(e=>({message:(e==null?void 0:e.name)||"Register Error",description:(e==null?void 0:e.message)||"Error while registering",key:"register-error",type:"error"}),"buildNotification"),eN=V(e=>({message:e.message,description:e.description,key:"register-success",type:"success"}),"buildSuccessNotification");function tN({mutationOptions:e}={}){const n=qr(),{open:o,close:a}=pi(),{forgotPassword:s}=Wr(),{keys:u}=zt();return{...Gt({mutationKey:u().auth().action("forgotPassword").get(),mutationFn:s,onSuccess:({success:f,redirectTo:p,error:h,successNotification:v})=>{f&&(a==null||a("forgot-password-error"),v&&(o==null||o(rN(v)))),(h||!f)&&(o==null||o(xg(h))),p&&n({to:p,type:"replace"})},onError:f=>{o==null||o(xg(f))},...e,meta:{...e==null?void 0:e.meta,...sr()}})}}V(tN,"useForgotPassword");var xg=V(e=>({message:(e==null?void 0:e.name)||"Forgot Password Error",description:(e==null?void 0:e.message)||"Error while resetting password",key:"forgot-password-error",type:"error"}),"buildNotification"),rN=V(e=>({message:e.message,description:e.description,key:"forgot-password-success",type:"success"}),"buildSuccessNotification");function nN({mutationOptions:e}={}){const n=qr(),{updatePassword:o}=Wr(),{close:a,open:s}=pi(),{keys:u}=zt(),f=un().params??{};return{...Gt({mutationKey:u().auth().action("updatePassword").get(),mutationFn:async h=>o==null?void 0:o({...f,...h}),onSuccess:({success:h,redirectTo:v,error:y,successNotification:b})=>{h&&(a==null||a("update-password-error"),b&&(s==null||s(oN(b)))),(y||!h)&&(s==null||s(wg(y))),v&&n({to:v,type:"replace"})},onError:h=>{s==null||s(wg(h))},...e,meta:{...e==null?void 0:e.meta,...sr()}})}}V(nN,"useUpdatePassword");var wg=V(e=>({message:(e==null?void 0:e.name)||"Update Password Error",description:(e==null?void 0:e.message)||"Error while updating password",key:"update-password-error",type:"error"}),"buildNotification"),oN=V(e=>({message:e.message,description:e.description,key:"update-password-success",type:"success"}),"buildSuccessNotification");function Tx({queryOptions:e,params:n}={}){const{check:o}=Wr(),{keys:a}=zt();return Rr({queryKey:a().auth().action("check").get(),queryFn:async()=>await(o==null?void 0:o(n))??{authenticated:!0},retry:!1,...e,meta:{...e==null?void 0:e.meta,...sr()}})}V(Tx,"useIsAuthenticated");function Op(){const e=qr(),{onError:n}=Wr(),{keys:o}=zt(),{mutate:a}=Ox();return{...Gt({mutationKey:o().auth().action("onError").get(),...n?{mutationFn:n,onSuccess:({logout:u,redirectTo:c})=>{if(u){a({redirectPath:c});return}if(c){e({to:c,type:"replace"});return}}}:{mutationFn:()=>({})},meta:{...sr()}})}}V(Op,"useOnError");var iN=V(()=>{const{isProvided:e}=Wr();return!!e},"useIsExistAuthentication"),jx=V(({enabled:e,isLoading:n,interval:o,onInterval:a})=>{const[s,u]=g.useState(void 0),{options:c}=ju(),{overtime:f}=c,p=o??f.interval,h=a??(f==null?void 0:f.onInterval),v=typeof e<"u"?e:typeof f.enabled<"u"?f.enabled:!0;return g.useEffect(()=>{let y;return v&&n&&(y=setInterval(()=>{u(b=>b===void 0?p:b+p)},p)),()=>{typeof y<"u"&&clearInterval(y),u(void 0)}},[n,p,v]),g.useEffect(()=>{h&&s&&h(s)},[s]),{elapsedTime:s}},"useLoadingOvertime"),aN=Object.freeze([]),sN=V(({resource:e,filters:n,pagination:o,sorters:a,queryOptions:s,successNotification:u,errorNotification:c,meta:f,liveMode:p,onLiveEvent:h,liveParams:v,dataProviderName:y,overtimeOptions:b}={})=>{var C,E,S;const{resources:w,resource:R,identifier:N}=lr({resource:e}),O=Ix(),T=Ln(),{mutate:$}=Op(),A=Lx(),M=Dp(),{keys:P}=zt(),_=Cn(N,y,w),D=f,H=n,W=a,J=WP({pagination:o}),ce=J.mode==="server",xe=M({resource:R,meta:D}),fe={meta:xe,filters:H,hasPagination:ce,pagination:J,sorters:W},ae=(s==null?void 0:s.enabled)===void 0||(s==null?void 0:s.enabled)===!0,{getList:G}=O(_);dN({resource:N,types:["*"],params:{meta:xe,pagination:J,hasPagination:ce,sorters:W,filters:H,subscriptionType:"useList",...v},channel:`resources/${R==null?void 0:R.name}`,enabled:ae,liveMode:p,onLiveEvent:h,meta:{...f,dataProviderName:_}});const Z=g.useMemo(()=>z=>{var ee;let ue=z;return J.mode==="client"&&(ue={...ue,data:ue.data.slice((J.currentPage-1)*J.pageSize,J.currentPage*J.pageSize),total:ue.total}),s!=null&&s.select?(ee=s==null?void 0:s.select)==null?void 0:ee.call(s,ue):ue},[J.currentPage,J.pageSize,J.mode,s==null?void 0:s.select]),B=Rr({queryKey:P().data(_).resource(N??"").action("list").params({...D||{},filters:H,...ce&&{pagination:J},...a&&{sorters:a}}).get(),queryFn:z=>{const ee={...xe,...QP(z)};return G({resource:(R==null?void 0:R.name)??"",pagination:J,filters:H,sorters:W,meta:ee})},...s,enabled:typeof(s==null?void 0:s.enabled)<"u"?s==null?void 0:s.enabled:!!(R!=null&&R.name),select:Z,meta:{...s==null?void 0:s.meta,...sr("useList",R==null?void 0:R.name)}});g.useEffect(()=>{if(B.isSuccess&&B.data){const z=typeof u=="function"?u(B.data,fe,N):u;A(z)}},[B.isSuccess,B.data,u]),g.useEffect(()=>{if(B.isError&&B.error){$(B.error);const z=typeof c=="function"?c(B.error,fe,N):c;A(z,{key:`${N}-useList-notification`,message:T("notifications.error",{statusCode:B.error.statusCode},`Error (status code: ${B.error.statusCode})`),description:B.error.message,type:"error"})}},[B.isError,(C=B.error)==null?void 0:C.message]);const{elapsedTime:j}=jx({...b,isLoading:B.isFetching});return{query:B,result:{data:((E=B==null?void 0:B.data)==null?void 0:E.data)||aN,total:(S=B==null?void 0:B.data)==null?void 0:S.total},overtime:{elapsedTime:j}}},"useList"),lN=V(({mutationOptions:e,overtimeOptions:n}={})=>{const{mutate:o}=Op(),a=Ix(),{resources:s,select:u}=lr(),c=Oo(),{mutationMode:f,undoableTimeout:p}=mx(),{notificationDispatch:h}=Dx(),v=Ln(),y=pN(),{log:b}=LN(),C=Lx(),E=jp(),S=Dp(),{options:{textTransformers:w}}=ju(),{keys:R}=zt(),N=Gt({mutationFn:({id:T,mutationMode:$,undoableTimeout:A,resource:M,onCancel:P,meta:_,dataProviderName:D,values:H})=>{const{resource:W,identifier:J}=u(M),ce=S({resource:W,meta:_}),xe=$??f,fe=A??p;return xe!=="undoable"?a(Cn(J,D,s)).deleteOne({resource:W.name,id:T,meta:ce,variables:H}):new Promise((G,Z)=>{const B=V(()=>{a(Cn(J,D,s)).deleteOne({resource:W.name,id:T,meta:ce,variables:H}).then(z=>G(z)).catch(z=>Z(z))},"doMutation"),j=V(()=>{Z({message:"mutationCancelled"})},"cancelMutation");P&&P(j),h({type:"ADD",payload:{id:T,resource:J,cancelMutation:j,doMutation:B,seconds:fe,isSilent:!!P}})})},onMutate:async({id:T,resource:$,mutationMode:A,dataProviderName:M,meta:P})=>{const{identifier:_}=u($),{gqlMutation:D,gqlQuery:H,...W}=P??{},J=R().data(Cn(_,M,s)).resource(_),ce=A??f;await c.cancelQueries({queryKey:J.get()});const xe=c.getQueriesData({queryKey:J.get()});return ce!=="pessimistic"&&(c.setQueriesData({queryKey:J.action("list").params(W??{}).get()},fe=>fe?{data:fe.data.filter(G=>{var Z;return((Z=G.id)==null?void 0:Z.toString())!==T.toString()}),total:fe.total-1}:null),c.setQueriesData({queryKey:J.action("many").get()},fe=>{if(!fe)return null;const ae=fe.data.filter(G=>{var Z;return((Z=G.id)==null?void 0:Z.toString())!==(T==null?void 0:T.toString())});return{...fe,data:ae}})),{previousQueries:xe,queryKey:J.get()}},onSettled:(T,$,{id:A,resource:M,dataProviderName:P,invalidates:_=["list","many"]})=>{const{identifier:D}=u(M);E({resource:D,dataProviderName:Cn(D,P,s),invalidates:_}),h({type:"REMOVE",payload:{id:A,resource:D}})},onSuccess:(T,{id:$,resource:A,successNotification:M,dataProviderName:P,meta:_},D)=>{const{resource:H,identifier:W}=u(A),J=w.singular(W),ce=Cn(W,P,s),xe=S({resource:H,meta:_}),fe=R().data(Cn(W,ce,s)).resource(W);c.removeQueries({queryKey:fe.action("one").get()});const ae=typeof M=="function"?M(T,$,W):M;C(ae,{key:`${$}-${W}-notification`,description:v("notifications.success","Success"),message:v("notifications.deleteSuccess",{resource:v(`${W}.${W}`,J)},`Successfully deleted a ${J}`),type:"success"}),y==null||y({channel:`resources/${H.name}`,type:"deleted",payload:{ids:[$]},date:new Date,meta:{...xe,dataProviderName:ce}});const{fields:G,operation:Z,variables:B,...j}=xe||{};b==null||b.mutate({action:"delete",resource:H.name,meta:{...j,dataProviderName:ce,id:$}}),c.removeQueries({queryKey:fe.action("one").get()})},onError:(T,{id:$,resource:A,errorNotification:M},P)=>{const{identifier:_}=u(A);if(P)for(const D of P.previousQueries)c.setQueryData(D[0],D[1]);if(T.message!=="mutationCancelled"){o(T);const D=w.singular(_),H=typeof M=="function"?M(T,$,_):M;C(H,{key:`${$}-${_}-notification`,message:v("notifications.deleteError",{resource:D,statusCode:T.statusCode},`Error (status code: ${T.statusCode})`),description:T.message,type:"error"})}},mutationKey:R().data().mutation("delete").get(),...e,meta:{...e==null?void 0:e.meta,...sr()}}),{elapsedTime:O}=jx({...n,isLoading:N.isPending});return{mutation:N,mutate:N.mutate,mutateAsync:N.mutateAsync,overtime:{elapsedTime:O}}},"useDelete"),Ax={default:{}},Tp=ie.createContext(Ax),uN=V(({children:e,dataProvider:n})=>{let o=Ax;return n&&(!("default"in n)&&("getList"in n||"getOne"in n)?o={default:n}:o=n),ie.createElement(Tp.Provider,{value:o},e)},"DataContextProvider"),Ix=V(()=>{const e=g.useContext(Tp);return g.useCallback(o=>{if(o){const a=e==null?void 0:e[o];if(!a)throw new Error(`"${o}" Data provider not found`);if(a&&!(e!=null&&e.default))throw new Error("If you have multiple data providers, you must provide default data provider property");return e[o]}if(e.default)return e.default;throw new Error('There is no "default" data provider. Please pass dataProviderName.')},[e])},"useDataProvider"),Au=ie.createContext({}),cN=V(({liveProvider:e,children:n})=>ie.createElement(Au.Provider,{value:{liveProvider:e}},n),"LiveContextProvider"),jp=V(()=>{const{resources:e}=lr(),n=Oo(),{keys:o}=zt();return g.useCallback(async({resource:s,dataProviderName:u,invalidates:c,id:f,invalidationFilters:p={type:"all",refetchType:"active"},invalidationOptions:h={cancelRefetch:!1}})=>{if(c===!1)return;const v=Cn(s,u,e),y=o().data(v).resource(s??"");await Promise.all(c.map(b=>{switch(b){case"all":return n.invalidateQueries({queryKey:o().data(v).get(),...p,...h});case"list":return n.invalidateQueries({queryKey:y.action("list").get(),...p,...h});case"many":return n.invalidateQueries({queryKey:y.action("many").get(),...p,...h});case"resourceAll":return n.invalidateQueries({queryKey:y.get(),...p,...h});case"detail":return n.invalidateQueries({queryKey:y.action("one").id(f||"").get(),...p,...h});default:return}}))},[])},"useInvalidate"),dN=V(({resource:e,params:n,channel:o,types:a,enabled:s=!0,liveMode:u,onLiveEvent:c,meta:f})=>{var p;const{resource:h,identifier:v}=lr({resource:e}),{liveProvider:y}=g.useContext(Au),{liveMode:b,onLiveEvent:C}=g.useContext(To),E=u??b,S=jp(),w=(f==null?void 0:f.dataProviderName)??((p=h==null?void 0:h.meta)==null?void 0:p.dataProviderName);g.useEffect(()=>{let R;const N=V(O=>{E==="auto"&&S({resource:v,dataProviderName:w,invalidates:["resourceAll"],invalidationFilters:{type:"active",refetchType:"active"},invalidationOptions:{cancelRefetch:!1}}),c==null||c(O),C==null||C(O)},"callback");return E&&E!=="off"&&s&&(R=y==null?void 0:y.subscribe({channel:o,params:{resource:h==null?void 0:h.name,...n},types:a,callback:N,meta:{...f,dataProviderName:w}})),()=>{R&&(y==null||y.unsubscribe(R))}},[s])},"useResourceSubscription"),fN=V(e=>{const{liveMode:n}=g.useContext(To);return e??n},"useLiveMode"),pN=V(()=>{const{liveProvider:e}=g.useContext(Au);return e==null?void 0:e.publish},"usePublish"),Mx=g.createContext({notifications:[],notificationDispatch:()=>!1}),hN=[],mN=V((e,n)=>{switch(n.type){case"ADD":return[...e.filter(a=>!(Hi(a.id,n.payload.id)&&a.resource===n.payload.resource)),{...n.payload,isRunning:!0}];case"REMOVE":return e.filter(o=>!(Hi(o.id,n.payload.id)&&o.resource===n.payload.resource));case"DECREASE_NOTIFICATION_SECOND":return e.map(o=>Hi(o.id,n.payload.id)&&o.resource===n.payload.resource?{...o,seconds:n.payload.seconds-1e3}:o);default:return e}},"undoableQueueReducer"),vN=V(({children:e})=>{const[n,o]=g.useReducer(mN,hN),a={notifications:n,notificationDispatch:o};return ie.createElement(Mx.Provider,{value:a},e,typeof window<"u"?n.map(s=>ie.createElement(ZN,{key:`${s.id}-${s.resource}-queue`,notification:s})):null)},"UndoableQueueContextProvider"),Dx=V(()=>{const{notifications:e,notificationDispatch:n}=g.useContext(Mx);return{notifications:e,notificationDispatch:n}},"useCancelNotification"),Ap=g.createContext({}),yN=V(({open:e,close:n,children:o})=>ie.createElement(Ap.Provider,{value:{open:e,close:n}},o),"NotificationContextProvider"),pi=V(()=>{const{open:e,close:n}=g.useContext(Ap);return{open:e,close:n}},"useNotification"),Lx=V(()=>{const{open:e}=pi();return g.useCallback((o,a)=>{o!==!1&&(o?e==null||e(o):a&&(e==null||e(a)))},[])},"useHandleNotification"),Ip=ie.createContext({}),gN=V(({children:e,i18nProvider:n})=>ie.createElement(Ip.Provider,{value:{i18nProvider:n}},e),"I18nContextProvider"),Ln=V(()=>{const{i18nProvider:e}=g.useContext(Ip);return g.useMemo(()=>{function o(a,s,u){return(e==null?void 0:e.translate(a,s,u))??u??(typeof s=="string"&&typeof u>"u"?s:a)}return V(o,"translate"),o},[e])},"useTranslate"),Fx={},ha=g.createContext(Fx),xN=V(({children:e,router:n})=>ie.createElement(ha.Provider,{value:n??Fx},e),"RouterContextProvider"),wN=V(e=>{const n=g.useRef(e);return Hi(n.current,e)||(n.current=e),n.current},"useMemoized"),$x=V((e,n)=>{const o=wN(n);return g.useMemo(e,o)},"useDeepMemo"),Ts=ie.createContext({resources:[]}),bN=V(({resources:e,children:n})=>{const o=$x(()=>e??[],[e]);return ie.createElement(Ts.Provider,{value:{resources:o}},n)},"ResourceContextProvider"),SN=V(()=>{const e=g.useContext(ha);return ie.useMemo(()=>(e==null?void 0:e.parse)??(()=>()=>({})),[e==null?void 0:e.parse])()},"useParse"),un=V(()=>{const e=SN();return ie.useMemo(()=>e(),[e])},"useParsed"),CN=V(e=>{const n=un();return e??n.id},"useId"),EN=V(e=>{const n=un();return e??n.action},"useAction");function zx(e){const{resources:n}=g.useContext(Ts),o=un(),a=V((c,f=!0)=>{const p=Pn(c,n);if(p)return{resource:p,identifier:p.identifier??p.name};if(f){const h={name:c,identifier:c},v=h.identifier??h.name;return{resource:h,identifier:v}}},"select");let s;const u=e;if(u){const c=Pn(u,n);c?s=c:s={name:u}}else o!=null&&o.resource&&(s=o.resource);return{resources:n,resource:s,select:a,identifier:(s==null?void 0:s.identifier)??(s==null?void 0:s.name)}}V(zx,"useResource");function lr(e){const{resources:n}=g.useContext(Ts),{select:o,identifier:a,resource:s}=zx(),u=(e==null?void 0:e.resource)??a,{identifier:c=void 0,resource:f=void 0}=u?o(u,!0):{},p=a===c,h=CN(),v=EN(e==null?void 0:e.action),y=ie.useMemo(()=>p?(e==null?void 0:e.id)??h:e==null?void 0:e.id,[p,e==null?void 0:e.id,h]),[b,C]=ie.useState(y);ie.useMemo(()=>C(y),[y]);const E=ie.useMemo(()=>!p&&!(e!=null&&e.action)?"create":v==="edit"||v==="clone"?v:"create",[v,p,e==null?void 0:e.action]);return{id:b,setId:C,resource:f||s,resources:n,action:v,identifier:c,formAction:E,select:o}}V(lr,"useResourceParams");var Ux=V(()=>{const{resource:e,resources:n}=lr(),o=un();return ie.useCallback(({resource:s,action:u,meta:c})=>{var f;const p=s||e;if(!p)return;const v=(f=Go(p,n).find(b=>b.action===u))==null?void 0:f.route;return v?qi(v,p==null?void 0:p.meta,o,c):void 0},[n,e,o])},"useGetToPath"),qr=V(()=>{const e=g.useContext(ha),{select:n}=lr(),o=Ux(),s=ie.useMemo(()=>(e==null?void 0:e.go)??(()=>()=>{}),[e==null?void 0:e.go])();return g.useCallback(c=>{if(typeof c.to!="object")return s({...c,to:c.to});const{resource:f}=n(c.to.resource);kN(c.to,f);const p=o({resource:f,action:c.to.action,meta:{id:c.to.id,...c.to.meta}});return s({...c,to:p})},[n,s])},"useGo"),kN=V((e,n)=>{if(!(e!=null&&e.action)||!(e!=null&&e.resource))throw new Error('[useGo]: "action" or "resource" is required.');if(["edit","show","clone"].includes(e==null?void 0:e.action)&&!e.id)throw new Error(`[useGo]: [action: ${e.action}] requires an "id" for resource [resource: ${e.resource}]`);if(!n[e.action])throw new Error(`[useGo]: [action: ${e.action}] is not defined for [resource: ${e.resource}]`)},"handleResourceErrors"),RN=V(()=>{const{resources:e}=lr(),n=un(),o=qr(),a=V((E,S="push")=>{o({to:E,type:S})},"handleUrl"),s=V((E,S={})=>{var w;const R=typeof E=="string"?Pn(E,e)??{name:E}:E,N=(w=Go(R,e).find(O=>O.action==="create"))==null?void 0:w.route;return N?o({to:qi(N,R==null?void 0:R.meta,n,S),type:"path",query:S.query}):""},"createUrl"),u=V((E,S,w={})=>{var R;const N=encodeURIComponent(S),O=typeof E=="string"?Pn(E,e)??{name:E}:E,T=(R=Go(O,e).find($=>$.action==="edit"))==null?void 0:R.route;return T?o({to:qi(T,O==null?void 0:O.meta,n,{...w,id:N}),type:"path",query:w.query}):""},"editUrl"),c=V((E,S,w={})=>{var R;const N=encodeURIComponent(S),O=typeof E=="string"?Pn(E,e)??{name:E}:E,T=(R=Go(O,e).find($=>$.action==="clone"))==null?void 0:R.route;return T?o({to:qi(T,O==null?void 0:O.meta,n,{...w,id:N}),type:"path",query:w.query}):""},"cloneUrl"),f=V((E,S,w={})=>{var R;const N=encodeURIComponent(S),O=typeof E=="string"?Pn(E,e)??{name:E}:E,T=(R=Go(O,e).find($=>$.action==="show"))==null?void 0:R.route;return T?o({to:qi(T,O==null?void 0:O.meta,n,{...w,id:N}),type:"path",query:w.query}):""},"showUrl"),p=V((E,S={})=>{var w;const R=typeof E=="string"?Pn(E,e)??{name:E}:E,N=(w=Go(R,e).find(O=>O.action==="list"))==null?void 0:w.route;return N?o({to:qi(N,R==null?void 0:R.meta,n,S),type:"path",query:S.query}):""},"listUrl");return{create:V((E,S="push",w={})=>{a(s(E,w),S)},"create"),createUrl:s,edit:V((E,S,w="push",R={})=>{a(u(E,S,R),w)},"edit"),editUrl:u,clone:V((E,S,w="push",R={})=>{a(c(E,S,R),w)},"clone"),cloneUrl:c,show:V((E,S,w="push",R={})=>{a(f(E,S,R),w)},"show"),showUrl:f,list:V((E,S="push",w={})=>{a(p(E,w),S)},"list"),listUrl:p}},"useNavigation"),PN=V((e,n)=>{const o=g.useContext(ha),a=o==null?void 0:o.Link,s=qr();let u="";return"go"in e&&(o!=null&&o.go||Pp(!0,"[Link]: `routerProvider` is not found. To use `go`, Please make sure that you have provided the `routerProvider` for `<Refine />` https://refine.dev/docs/routing/router-provider/ \n"),u=s({...e.go,type:"path"})),"to"in e&&(u=e.to),a?ie.createElement(a,{ref:n,...e,to:u,go:void 0}):ie.createElement("a",{ref:n,href:u,...e,to:void 0,go:void 0})},"LinkComponent"),NN=g.forwardRef(PN),_N=V(()=>NN,"useLink"),Iu=ie.createContext({options:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1}}}),ON=V(({can:e,children:n,options:o})=>ie.createElement(Iu.Provider,{value:{can:e,options:o?{...o,buttons:{enableAccessControl:!0,hideIfUnauthorized:!1,...o.buttons}}:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1},queryOptions:void 0}}},n),"AccessControlContextProvider"),Bx=V(e=>{if(!e)return;const{list:n,edit:o,create:a,show:s,clone:u,children:c,meta:f,icon:p,...h}=e,{icon:v,...y}=f??{};return{...h,...f?{meta:y}:{}}},"sanitizeResource"),TN=V(({action:e,resource:n,params:o,queryOptions:a})=>{const{can:s,options:u}=g.useContext(Iu),{keys:c}=zt(),{queryOptions:f}=u||{},p={...f,...a},{resource:h,...v}=o??{},y=Bx(h),b=Rr({queryKey:c().access().resource(n).action(e).params({params:{...v,resource:y},enabled:p==null?void 0:p.enabled}).get(),queryFn:()=>(s==null?void 0:s({action:e,resource:n,params:{...v,resource:y}}))??Promise.resolve({can:!0}),enabled:typeof s<"u",...p,meta:{...p==null?void 0:p.meta,...sr()},retry:!1});return typeof s>"u"?{data:{can:!0}}:b},"useCan"),jN=[],AN=[],IN=Object.freeze([]);function MN({pagination:e,filters:n,sorters:o,syncWithLocation:a,resource:s,successNotification:u,errorNotification:c,queryOptions:f,liveMode:p,onLiveEvent:h,liveParams:v,meta:y,dataProviderName:b,overtimeOptions:C}={}){var E,S,w,R,N,O,T,$,A;const{syncWithLocation:M}=VP(),P=a??M,_=fN(p),D=Dp(),H=un(),W=((n==null?void 0:n.mode)||"server")==="server",J=((o==null?void 0:o.mode)||"server")==="server",ce=(e==null?void 0:e.mode)!=="off",xe=e==null?void 0:e.currentPage,fe=e==null?void 0:e.pageSize,ae=y,{parsedCurrentPage:G,parsedPageSize:Z,parsedSorter:B,parsedFilters:j}=TP(((E=H.params)==null?void 0:E.search)??"?"),z=n==null?void 0:n.initial,ee=(n==null?void 0:n.permanent)??jN,ue=o==null?void 0:o.initial,se=(o==null?void 0:o.permanent)??AN,de=(n==null?void 0:n.defaultBehavior)??"merge";let Pe,pe,ne,he;P?(Pe=((S=H==null?void 0:H.params)==null?void 0:S.currentPage)||G||xe||1,pe=((w=H==null?void 0:H.params)==null?void 0:w.pageSize)||Z||fe||10,ne=((R=H==null?void 0:H.params)==null?void 0:R.sorters)||(B.length?B:ue),he=((N=H==null?void 0:H.params)==null?void 0:N.filters)||(j.length?j:z)):(Pe=xe||1,pe=fe||10,ne=ue,he=z);const me=qr(),{resource:Ee,identifier:je}=lr({resource:s}),_e=D({resource:Ee,meta:ae});ie.useEffect(()=>{Pp(typeof je>"u","useTable: `resource` is not defined.")},[je]);const[Ie,ke]=g.useState(mg(se,ne??[])),[Le,Ae]=g.useState(hg(ee,he??[])),[Fe,Be]=g.useState(Pe),[He,st]=g.useState(pe),_t=V(()=>{const{sorters:Ve,filters:dt,pageSize:cr,current:yr,...Fn}=(H==null?void 0:H.params)??{};return Fn},"getCurrentQueryParams"),et=V(({pagination:{currentPage:Ve,pageSize:dt},sorters:cr,filters:yr})=>me({type:"path",options:{keepHash:!0,keepQuery:!0},query:{...ce?{currentPage:Ve,pageSize:dt}:{},sorters:cr,filters:yr,..._t()}})??"","createLinkForSyncWithLocation");g.useEffect(()=>{var Ve;((Ve=H==null?void 0:H.params)==null?void 0:Ve.search)===""&&(Be(Pe),st(pe),ke(mg(se,ne??[])),Ae(hg(ee,he??[])))},[(O=H==null?void 0:H.params)==null?void 0:O.search]),g.useEffect(()=>{P&&me({type:"replace",options:{keepQuery:!0},query:{...ce?{pageSize:He,currentPage:Fe}:{},sorters:xu(Ie,se,Hi),filters:xu(Le,ee,Hi)}})},[P,Fe,He,Ie,Le]);const vt=sN({resource:je,pagination:{currentPage:Fe,pageSize:He,mode:e==null?void 0:e.mode},filters:W?Gl(ee,Le):void 0,sorters:J?pg(se,Ie):void 0,queryOptions:f,overtimeOptions:C,successNotification:u,errorNotification:c,meta:_e,liveMode:_,liveParams:v,onLiveEvent:h,dataProviderName:b}),rt=g.useCallback(Ve=>{Ae(dt=>Gl(ee,Ve,dt))},[ee]),lt=g.useCallback(Ve=>{Ae(Gl(ee,Ve))},[ee]),wt=g.useCallback(Ve=>{Ae(dt=>Gl(ee,Ve(dt)))},[ee]),Xt=g.useCallback((Ve,dt=de)=>{typeof Ve=="function"?wt(Ve):dt==="replace"?lt(Ve):rt(Ve)},[wt,lt,rt]),Jt=g.useCallback(Ve=>{ke(()=>pg(se,Ve))},[se]);return{tableQuery:vt.query,sorters:Ie,setSorters:Jt,filters:Le,setFilters:Xt,currentPage:Fe,setCurrentPage:Be,pageSize:He,setPageSize:st,pageCount:He?Math.ceil((((T=vt.result)==null?void 0:T.total)??0)/He):1,createLinkForSyncWithLocation:et,overtime:vt.overtime,result:{data:(($=vt.result)==null?void 0:$.data)||IN,total:(A=vt.result)==null?void 0:A.total}}}V(MN,"useTable");var Mp=ie.createContext({}),DN=V(({create:e,get:n,update:o,children:a})=>ie.createElement(Mp.Provider,{value:{create:e,get:n,update:o}},a),"AuditLogContextProvider"),LN=V(({logMutationOptions:e,renameMutationOptions:n}={})=>{const o=Oo(),a=g.useContext(Mp),{keys:s}=zt(),{resources:u}=g.useContext(Ts),{data:c,refetch:f,isLoading:p}=_x({queryOptions:{enabled:!!(a!=null&&a.create)}}),h=Gt({mutationFn:async y=>{var b,C;const E=Pn(y.resource,u),S=(b=E==null?void 0:E.meta)==null?void 0:b.audit;if(S&&!jP(S,y.action))return;let w;return p&&(a!=null&&a.create)&&(w=await f()),await((C=a.create)==null?void 0:C.call(a,{...y,author:c??(w==null?void 0:w.data)}))},mutationKey:s().audit().action("log").get(),...e,meta:{...e==null?void 0:e.meta,...sr()}}),v=Gt({mutationFn:async y=>{var b;return await((b=a.update)==null?void 0:b.call(a,y))},onSuccess:y=>{y!=null&&y.resource&&o.invalidateQueries({queryKey:s().audit().resource((y==null?void 0:y.resource)??"").action("list").get()})},mutationKey:s().audit().action("rename").get(),...n,meta:{...n==null?void 0:n.meta,...sr()}});return{log:h,rename:v}},"useLog"),bg=g.createContext({}),FN=V(()=>{if(!g.useContext(bg))throw new Error("useMetaContext must be used within a MetaContextProvider");return g.useContext(bg)},"useMetaContext"),Dp=V(()=>{const{params:e}=un(),n=FN();return V(({resource:a,meta:s}={})=>{const{meta:u}=Bx(a)??{meta:{}},{filters:c,sorters:f,currentPage:p,pageSize:h,...v}=e??{},y={...u,...v,...s};return n!=null&&n.tenantId&&(y.tenantId=n.tenantId),y},"getMetaFn")},"useMeta"),Wx=V(()=>{const{options:e}=ie.useContext(To);return e},"useRefineOptions");function $N({type:e}){const n=Ln(),{textTransformers:{humanize:o}}=Wx(),a=`buttons.${e}`,s=o(e);return{label:n(a,s)}}V($N,"useActionableButton");var qx=V(e=>{var n,o,a;const s=Ln(),u=ie.useContext(Iu),c=((n=e.accessControl)==null?void 0:n.enabled)??u.options.buttons.enableAccessControl,f=((o=e.accessControl)==null?void 0:o.hideIfUnauthorized)??u.options.buttons.hideIfUnauthorized,{data:p}=TN({resource:(a=e.resource)==null?void 0:a.name,action:e.action==="clone"?"create":e.action,params:{meta:e.meta,id:e.id,resource:e.resource},queryOptions:{enabled:c}}),h=ie.useMemo(()=>p!=null&&p.can?"":p!=null&&p.reason?p.reason:s("buttons.notAccessTitle","You don't have permission to access"),[p==null?void 0:p.can,p==null?void 0:p.reason,s]),v=c&&f&&!(p!=null&&p.can),y=(p==null?void 0:p.can)===!1;return{title:h,hidden:v,disabled:y,canAccess:p}},"useButtonCanAccess");function zN(e){var n;const o=RN(),a=_N(),s=Ln(),u=gx(),{textTransformers:{humanize:c}}=Wx(),{id:f,resource:p,identifier:h}=lr({resource:e.resource,id:e.action==="create"?void 0:e.id}),{canAccess:v,title:y,hidden:b,disabled:C}=qx({action:e.action,accessControl:e.accessControl,meta:e.meta,id:f,resource:p}),E=a,S=ie.useMemo(()=>{if(!p)return"";switch(e.action){case"create":case"list":return o[`${e.action}Url`](p,e.meta);default:return f?o[`${e.action}Url`](p,f,e.meta):""}},[p,f,e.meta,o[`${e.action}Url`]]),w=e.action==="list"?s(`${h??e.resource}.titles.list`,u(((n=p==null?void 0:p.meta)==null?void 0:n.label)??h??e.resource,"plural")):s(`buttons.${e.action}`,c(e.action));return{to:S,label:w,title:y,disabled:C,hidden:b,canAccess:v,LinkComponent:E}}V(zN,"useNavigationButton");function UN(e){const n=Ln(),{mutation:{mutate:o,isPending:a,variables:s}}=lN(),{setWarnWhen:u}=yx(),{mutationMode:c}=mx(e.mutationMode),{id:f,resource:p,identifier:h}=lr({resource:e.resource,id:e.id}),{title:v,disabled:y,hidden:b,canAccess:C}=qx({action:"delete",accessControl:e.accessControl,id:f,resource:p}),E=n("buttons.delete","Delete"),S=n("buttons.delete","Delete"),w=n("buttons.confirm","Are you sure?"),R=n("buttons.cancel","Cancel"),N=f===(s==null?void 0:s.id)&&a;return{label:E,title:v,hidden:b,disabled:y,canAccess:C,loading:N,confirmOkLabel:S,cancelLabel:R,confirmTitle:w,onConfirm:V(()=>{f&&h&&(u(!1),o({id:f,resource:h,mutationMode:c,successNotification:e.successNotification,errorNotification:e.errorNotification,meta:e.meta,dataProviderName:e.dataProviderName,invalidates:e.invalidates},{onSuccess:e.onSuccess}))},"onConfirm")}}V(UN,"useDeleteButton");function BN(e){const n=Ln(),{keys:o}=zt(),a=Oo(),s=jp(),{identifier:u,id:c,resources:f}=lr({resource:e.resource,id:e.id}),p=!!a.isFetching({queryKey:o().data(Cn(u,e.dataProviderName,f)).resource(u).action("one").get()}),h=V(()=>{s({id:c,invalidates:["detail"],dataProviderName:e.dataProviderName,resource:u})},"onClick"),v=n("buttons.refresh","Refresh");return{onClick:h,label:v,loading:p}}V(BN,"useRefreshButton");var WN="5.0.7",qN=V(()=>{var e;const n=iN(),o=g.useContext(Mp),{liveProvider:a}=g.useContext(Au),s=g.useContext(ha),u=g.useContext(Tp),{i18nProvider:c}=g.useContext(Ip),f=g.useContext(Ap),p=g.useContext(Iu),{resources:h}=lr(),v=ju(),y=!!o.create||!!o.get||!!o.update,b=!!(a!=null&&a.publish)||!!(a!=null&&a.subscribe)||!!(a!=null&&a.unsubscribe),C=!!s.Link||!!s.go||!!s.back||!!s.parse,E=!!u,S=!!(c!=null&&c.changeLocale)||!!(c!=null&&c.getLocale)||!!(c!=null&&c.translate),w=!!f.close||!!f.open,R=!!p.can,N=(e=v==null?void 0:v.options)==null?void 0:e.projectId;return{providers:{auth:n,auditLog:y,live:b,router:C,data:E,i18n:S,notification:w,accessControl:R},version:WN,resourceCount:h.length,projectId:N}},"useTelemetryData"),VN=V(e=>{try{const n=JSON.stringify(e||{});return typeof btoa<"u"?btoa(n):Buffer.from(n).toString("base64")}catch{return}},"encode"),KN=V(e=>{const n=new Image;n.src=e},"throughImage"),HN=V(e=>{fetch(e)},"throughFetch"),QN=V(e=>{typeof Image<"u"?KN(e):typeof fetch<"u"&&HN(e)},"transport"),GN=V(()=>{const e=qN(),n=ie.useRef(!1);return ie.useEffect(()=>{if(n.current)return;const o=VN(e);o&&(QN(`https://telemetry.refine.dev/telemetry?payload=${o}`),n.current=!0)},[]),null},"Telemetry"),YN=V(e=>{const n=["go","parse","back","Link"],o=Object.keys(e).filter(s=>!n.includes(s));return o.length>0?(console.warn(`Unsupported properties are found in \`routerProvider\` prop. You provided \`${o.join(", ")}\`. Supported properties are \`${n.join(", ")}\`. You may wanted to use \`legacyRouterProvider\` prop instead.`),!0):!1},"checkRouterPropMisuse"),XN=V(e=>{const n=ie.useRef(!1);ie.useEffect(()=>{n.current===!1&&e&&YN(e)&&(n.current=!0)},[e])},"useRouterMisuseWarning"),JN=V(({authProvider:e,dataProvider:n,routerProvider:o,notificationProvider:a,accessControlProvider:s,auditLogProvider:u,resources:c,children:f,liveProvider:p,i18nProvider:h,onLiveEvent:v,options:y})=>{const{optionsWithDefaults:b,disableTelemetryWithDefault:C,reactQueryWithDefaults:E}=DP({options:y}),S=b.disableRouteChangeHandler,w=$x(()=>{var O;return E.clientConfig instanceof op?E.clientConfig:new op({...E.clientConfig,defaultOptions:{...E.clientConfig.defaultOptions,queries:{refetchOnWindowFocus:!1,placeholderData:cC,...(O=E.clientConfig.defaultOptions)==null?void 0:O.queries}}})},[E.clientConfig]),N=ie.useMemo(()=>typeof a=="function"?a:()=>a,[a])();return XN(o),ie.createElement(j0,{client:w},ie.createElement(yN,{...N},ie.createElement(OP,{...e??{},isProvided:!!e},ie.createElement(uN,{dataProvider:n},ie.createElement(cN,{liveProvider:p},ie.createElement(xN,{router:o},ie.createElement(bN,{resources:c??[]},ie.createElement(gN,{i18nProvider:h},ie.createElement(ON,{...s??{}},ie.createElement(DN,{...u??{}},ie.createElement(vN,null,ie.createElement(MP,{mutationMode:b.mutationMode,warnWhenUnsavedChanges:b.warnWhenUnsavedChanges,syncWithLocation:b.syncWithLocation,undoableTimeout:b.undoableTimeout,liveMode:b.liveMode,onLiveEvent:v,options:b},ie.createElement(qP,null,ie.createElement(ie.Fragment,null,f,!C&&ie.createElement(GN,null),!S&&ie.createElement(r_,null)))))))))))))))},"Refine"),ZN=V(({notification:e})=>{const n=Ln(),{notificationDispatch:o}=Dx(),{open:a}=pi(),[s,u]=g.useState(),c=V(()=>{if(e.isRunning===!0&&(e.seconds===0&&e.doMutation(),e.isSilent||a==null||a({key:`${e.id}-${e.resource}-notification`,type:"progress",message:n("notifications.undoable",{seconds:_f(e.seconds)},`You have ${_f(e.seconds)} seconds to undo`),cancelMutation:e.cancelMutation,undoableTimeout:_f(e.seconds)}),e.seconds>0)){s&&clearTimeout(s);const f=setTimeout(()=>{o({type:"DECREASE_NOTIFICATION_SECOND",payload:{id:e.id,seconds:e.seconds,resource:e.resource}})},1e3);u(f)}},"cancelNotification");return g.useEffect(()=>{c()},[e]),null},"UndoableQueue");function e_({redirectOnFail:e=!0,appendCurrentPathToQuery:n=!0,children:o,fallback:a,loading:s,params:u}){var c;const f=hx(),p=!!(f!=null&&f.isProvided),h=un(),v=qr(),{isFetching:y,data:{authenticated:b,redirectTo:C}={}}=Tx({params:u}),E=p?b:!0;if(!p)return ie.createElement(ie.Fragment,null,o??null);if(y)return ie.createElement(ie.Fragment,null,s??null);if(E)return ie.createElement(ie.Fragment,null,o??null);if(typeof a<"u")return ie.createElement(ie.Fragment,null,a??null);const S=typeof e=="string"?e:C,w=`${h.pathname}`.replace(/(\?.*|#.*)$/,"");if(S){const R=(c=h.params)!=null&&c.to?h.params.to:v({to:w,options:{keepQuery:!0},type:"path"});return ie.createElement(t_,{config:{to:S,query:n&&(R??"").length>1?{to:R}:void 0,type:"replace"}})}return null}V(e_,"Authenticated");var t_=V(({config:e})=>{const n=qr();return ie.useEffect(()=>{n(e)},[n,e]),null},"Redirect"),r_=V(()=>{var e,n;const o=g.useContext(ha),a=hx(),s=(e=o.parse)==null?void 0:e.call(o),u=((n=s==null?void 0:s())==null?void 0:n.pathname)||"";return g.useEffect(()=>{var c;(c=a==null?void 0:a.check)==null||c.call(a).catch(()=>!1)},[u]),null},"RouteChangeHandler");/**
67
+ * react-router v7.11.0
68
+ *
69
+ * Copyright (c) Remix Software Inc.
70
+ *
71
+ * This source code is licensed under the MIT license found in the
72
+ * LICENSE.md file in the root directory of this source tree.
73
+ *
74
+ * @license MIT
75
+ */var Sg="popstate";function n_(e={}){function n(a,s){let{pathname:u,search:c,hash:f}=a.location;return up("",{pathname:u,search:c,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function o(a,s){return typeof s=="string"?s:vs(s)}return i_(n,o,null,e)}function ct(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Pr(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function o_(){return Math.random().toString(36).substring(2,10)}function Cg(e,n){return{usr:e.state,key:e.key,idx:n}}function up(e,n,o=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?ma(n):n,state:o,key:n&&n.key||a||o_()}}function vs({pathname:e="/",search:n="",hash:o=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),o&&o!=="#"&&(e+=o.charAt(0)==="#"?o:"#"+o),e}function ma(e){let n={};if(e){let o=e.indexOf("#");o>=0&&(n.hash=e.substring(o),e=e.substring(0,o));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function i_(e,n,o,a={}){let{window:s=document.defaultView,v5Compat:u=!1}=a,c=s.history,f="POP",p=null,h=v();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function v(){return(c.state||{idx:null}).idx}function y(){f="POP";let w=v(),R=w==null?null:w-h;h=w,p&&p({action:f,location:S.location,delta:R})}function b(w,R){f="PUSH";let N=up(S.location,w,R);h=v()+1;let O=Cg(N,h),T=S.createHref(N);try{c.pushState(O,"",T)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;s.location.assign(T)}u&&p&&p({action:f,location:S.location,delta:1})}function C(w,R){f="REPLACE";let N=up(S.location,w,R);h=v();let O=Cg(N,h),T=S.createHref(N);c.replaceState(O,"",T),u&&p&&p({action:f,location:S.location,delta:0})}function E(w){return a_(w)}let S={get action(){return f},get location(){return e(s,c)},listen(w){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(Sg,y),p=w,()=>{s.removeEventListener(Sg,y),p=null}},createHref(w){return n(s,w)},createURL:E,encodeLocation(w){let R=E(w);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:C,go(w){return c.go(w)}};return S}function a_(e,n=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),ct(o,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:vs(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=o+a),new URL(a,o)}function Vx(e,n,o="/"){return s_(e,n,o,!1)}function s_(e,n,o,a){let s=typeof n=="string"?ma(n):n,u=An(s.pathname||"/",o);if(u==null)return null;let c=Kx(e);l_(c);let f=null;for(let p=0;f==null&&p<c.length;++p){let h=x_(u);f=y_(c[p],h,a)}return f}function Kx(e,n=[],o=[],a="",s=!1){let u=(c,f,p=s,h)=>{let v={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(a)&&p)return;ct(v.relativePath.startsWith(a),`Absolute route path "${v.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(a.length)}let y=On([a,v.relativePath]),b=o.concat(v);c.children&&c.children.length>0&&(ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Kx(c.children,n,b,y,p)),!(c.path==null&&!c.index)&&n.push({path:y,score:m_(y,c.index),routesMeta:b})};return e.forEach((c,f)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))u(c,f);else for(let h of Hx(c.path))u(c,f,!0,h)}),n}function Hx(e){let n=e.split("/");if(n.length===0)return[];let[o,...a]=n,s=o.endsWith("?"),u=o.replace(/\?$/,"");if(a.length===0)return s?[u,""]:[u];let c=Hx(a.join("/")),f=[];return f.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&f.push(...c),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function l_(e){e.sort((n,o)=>n.score!==o.score?o.score-n.score:v_(n.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}var u_=/^:[\w-]+$/,c_=3,d_=2,f_=1,p_=10,h_=-2,Eg=e=>e==="*";function m_(e,n){let o=e.split("/"),a=o.length;return o.some(Eg)&&(a+=h_),n&&(a+=d_),o.filter(s=>!Eg(s)).reduce((s,u)=>s+(u_.test(u)?c_:u===""?f_:p_),a)}function v_(e,n){return e.length===n.length&&e.slice(0,-1).every((a,s)=>a===n[s])?e[e.length-1]-n[n.length-1]:0}function y_(e,n,o=!1){let{routesMeta:a}=e,s={},u="/",c=[];for(let f=0;f<a.length;++f){let p=a[f],h=f===a.length-1,v=u==="/"?n:n.slice(u.length)||"/",y=ys({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},v),b=p.route;if(!y&&h&&o&&!a[a.length-1].route.index&&(y=ys({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!y)return null;Object.assign(s,y.params),c.push({params:s,pathname:On([u,y.pathname]),pathnameBase:C_(On([u,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(u=On([u,y.pathnameBase]))}return c}function ys(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[o,a]=g_(e.path,e.caseSensitive,e.end),s=n.match(o);if(!s)return null;let u=s[0],c=u.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:v,isOptional:y},b)=>{if(v==="*"){let E=f[b]||"";c=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const C=f[b];return y&&!C?h[v]=void 0:h[v]=(C||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:c,pattern:e}}function g_(e,n=!1,o=!0){Pr(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 a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,p)=>(a.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),a]}function x_(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Pr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function An(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let o=n.endsWith("/")?n.length-1:n.length,a=e.charAt(o);return a&&a!=="/"?null:e.slice(o)||"/"}var Qx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,w_=e=>Qx.test(e);function b_(e,n="/"){let{pathname:o,search:a="",hash:s=""}=typeof e=="string"?ma(e):e,u;if(o)if(w_(o))u=o;else{if(o.includes("//")){let c=o;o=o.replace(/\/\/+/g,"/"),Pr(!1,`Pathnames cannot have embedded double slashes - normalizing ${c} -> ${o}`)}o.startsWith("/")?u=kg(o.substring(1),"/"):u=kg(o,n)}else u=n;return{pathname:u,search:E_(a),hash:k_(s)}}function kg(e,n){let o=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?o.length>1&&o.pop():s!=="."&&o.push(s)}),o.length>1?o.join("/"):"/"}function Tf(e,n,o,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function S_(e){return e.filter((n,o)=>o===0||n.route.path&&n.route.path.length>0)}function Lp(e){let n=S_(e);return n.map((o,a)=>a===n.length-1?o.pathname:o.pathnameBase)}function Fp(e,n,o,a=!1){let s;typeof e=="string"?s=ma(e):(s={...e},ct(!s.pathname||!s.pathname.includes("?"),Tf("?","pathname","search",s)),ct(!s.pathname||!s.pathname.includes("#"),Tf("#","pathname","hash",s)),ct(!s.search||!s.search.includes("#"),Tf("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,f;if(c==null)f=o;else{let y=n.length-1;if(!a&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}f=y>=0?n[y]:"/"}let p=b_(s,f),h=c&&c!=="/"&&c.endsWith("/"),v=(u||c===".")&&o.endsWith("/");return!p.pathname.endsWith("/")&&(h||v)&&(p.pathname+="/"),p}var On=e=>e.join("/").replace(/\/\/+/g,"/"),C_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,k_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,R_=class{constructor(e,n,o,a=!1){this.status=e,this.statusText=n||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function P_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function N_(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Gx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yx(e,n){let o=e;if(typeof o!="string"||!Qx.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let a=o,s=!1;if(Gx)try{let u=new URL(window.location.href),c=o.startsWith("//")?new URL(u.protocol+o):new URL(o),f=An(c.pathname,n);c.origin===u.origin&&f!=null?o=f+c.search+c.hash:s=!0}catch{Pr(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Xx=["POST","PUT","PATCH","DELETE"];new Set(Xx);var __=["GET",...Xx];new Set(__);var va=g.createContext(null);va.displayName="DataRouter";var Mu=g.createContext(null);Mu.displayName="DataRouterState";var O_=g.createContext(!1),Jx=g.createContext({isTransitioning:!1});Jx.displayName="ViewTransition";var T_=g.createContext(new Map);T_.displayName="Fetchers";var j_=g.createContext(null);j_.displayName="Await";var ur=g.createContext(null);ur.displayName="Navigation";var js=g.createContext(null);js.displayName="Location";var _r=g.createContext({outlet:null,matches:[],isDataRoute:!1});_r.displayName="Route";var $p=g.createContext(null);$p.displayName="RouteError";var Zx="REACT_ROUTER_ERROR",A_="REDIRECT",I_="ROUTE_ERROR_RESPONSE";function M_(e){if(e.startsWith(`${Zx}:${A_}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function D_(e){if(e.startsWith(`${Zx}:${I_}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new R_(n.status,n.statusText,n.data)}catch{}}function L_(e,{relative:n}={}){ct(ya(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:a}=g.useContext(ur),{hash:s,pathname:u,search:c}=As(e,{relative:n}),f=u;return o!=="/"&&(f=u==="/"?o:On([o,u])),a.createHref({pathname:f,search:c,hash:s})}function ya(){return g.useContext(js)!=null}function Nr(){return ct(ya(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(js).location}var ew="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function tw(e){g.useContext(ur).static||g.useLayoutEffect(e)}function gs(){let{isDataRoute:e}=g.useContext(_r);return e?J_():F_()}function F_(){ct(ya(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(va),{basename:n,navigator:o}=g.useContext(ur),{matches:a}=g.useContext(_r),{pathname:s}=Nr(),u=JSON.stringify(Lp(a)),c=g.useRef(!1);return tw(()=>{c.current=!0}),g.useCallback((p,h={})=>{if(Pr(c.current,ew),!c.current)return;if(typeof p=="number"){o.go(p);return}let v=Fp(p,JSON.parse(u),s,h.relative==="path");e==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:On([n,v.pathname])),(h.replace?o.replace:o.push)(v,h.state,h)},[n,o,u,s,e])}var $_=g.createContext(null);function z_(e){let n=g.useContext(_r).outlet;return g.useMemo(()=>n&&g.createElement($_.Provider,{value:e},n),[n,e])}function rw(){let{matches:e}=g.useContext(_r),n=e[e.length-1];return n?n.params:{}}function As(e,{relative:n}={}){let{matches:o}=g.useContext(_r),{pathname:a}=Nr(),s=JSON.stringify(Lp(o));return g.useMemo(()=>Fp(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function U_(e,n){return nw(e,n)}function nw(e,n,o,a,s){var N;ct(ya(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=g.useContext(ur),{matches:c}=g.useContext(_r),f=c[c.length-1],p=f?f.params:{},h=f?f.pathname:"/",v=f?f.pathnameBase:"/",y=f&&f.route;{let O=y&&y.path||"";iw(h,!y||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
76
+
77
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let b=Nr(),C;if(n){let O=typeof n=="string"?ma(n):n;ct(v==="/"||((N=O.pathname)==null?void 0:N.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${O.pathname}" was given in the \`location\` prop.`),C=O}else C=b;let E=C.pathname||"/",S=E;if(v!=="/"){let O=v.replace(/^\//,"").split("/");S="/"+E.replace(/^\//,"").split("/").slice(O.length).join("/")}let w=Vx(e,{pathname:S});Pr(y||w!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),Pr(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=K_(w&&w.map(O=>Object.assign({},O,{params:Object.assign({},p,O.params),pathname:On([v,u.encodeLocation?u.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?v:On([v,u.encodeLocation?u.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),c,o,a,s);return n&&R?g.createElement(js.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},R):R}function B_(){let e=X_(),n=P_(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),o=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:u},"ErrorBoundary")," or"," ",g.createElement("code",{style:u},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},n),o?g.createElement("pre",{style:s},o):null,c)}var W_=g.createElement(B_,null),ow=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const o=D_(e.digest);o&&(e=o)}let n=e!==void 0?g.createElement(_r.Provider,{value:this.props.routeContext},g.createElement($p.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(q_,{error:e},n):n}};ow.contextType=O_;var jf=new WeakMap;function q_({children:e,error:n}){let{basename:o}=g.useContext(ur);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=M_(n.digest);if(a){let s=jf.get(n);if(s)throw s;let u=Yx(a.location,o);if(Gx&&!jf.get(n))if(u.isExternal||a.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:a.replace}));throw jf.set(n,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function V_({routeContext:e,match:n,children:o}){let a=g.useContext(va);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(_r.Provider,{value:e},o)}function K_(e,n=[],o=null,a=null,s=null){if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let u=e,c=o==null?void 0:o.errors;if(c!=null){let v=u.findIndex(y=>y.route.id&&(c==null?void 0:c[y.route.id])!==void 0);ct(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,v+1))}let f=!1,p=-1;if(o)for(let v=0;v<u.length;v++){let y=u[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=v),y.route.id){let{loaderData:b,errors:C}=o,E=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!C||C[y.route.id]===void 0);if(y.route.lazy||E){f=!0,p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}let h=o&&a?(v,y)=>{var b,C;a(v,{location:o.location,params:((C=(b=o.matches)==null?void 0:b[0])==null?void 0:C.params)??{},unstable_pattern:N_(o.matches),errorInfo:y})}:void 0;return u.reduceRight((v,y,b)=>{let C,E=!1,S=null,w=null;o&&(C=c&&y.route.id?c[y.route.id]:void 0,S=y.route.errorElement||W_,f&&(p<0&&b===0?(iw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):p===b&&(E=!0,w=y.route.hydrateFallbackElement||null)));let R=n.concat(u.slice(0,b+1)),N=()=>{let O;return C?O=S:E?O=w:y.route.Component?O=g.createElement(y.route.Component,null):y.route.element?O=y.route.element:O=v,g.createElement(V_,{match:y,routeContext:{outlet:v,matches:R,isDataRoute:o!=null},children:O})};return o&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?g.createElement(ow,{location:o.location,revalidation:o.revalidation,component:S,error:C,children:N(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:h}):N()},null)}function zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function H_(e){let n=g.useContext(va);return ct(n,zp(e)),n}function Q_(e){let n=g.useContext(Mu);return ct(n,zp(e)),n}function G_(e){let n=g.useContext(_r);return ct(n,zp(e)),n}function Up(e){let n=G_(e),o=n.matches[n.matches.length-1];return ct(o.route.id,`${e} can only be used on routes that contain a unique "id"`),o.route.id}function Y_(){return Up("useRouteId")}function X_(){var a;let e=g.useContext($p),n=Q_("useRouteError"),o=Up("useRouteError");return e!==void 0?e:(a=n.errors)==null?void 0:a[o]}function J_(){let{router:e}=H_("useNavigate"),n=Up("useNavigate"),o=g.useRef(!1);return tw(()=>{o.current=!0}),g.useCallback(async(s,u={})=>{Pr(o.current,ew),o.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Rg={};function iw(e,n,o){!n&&!Rg[e]&&(Rg[e]=!0,Pr(!1,o))}g.memo(Z_);function Z_({routes:e,future:n,state:o,onError:a}){return nw(e,void 0,o,a,n)}function Pg({to:e,replace:n,state:o,relative:a}){ct(ya(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=g.useContext(ur);Pr(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=g.useContext(_r),{pathname:c}=Nr(),f=gs(),p=Fp(e,Lp(u),c,a==="path"),h=JSON.stringify(p);return g.useEffect(()=>{f(JSON.parse(h),{replace:n,state:o,relative:a})},[f,h,a,n,o]),null}function eO(e){return z_(e.context)}function Qo(e){ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function tO({basename:e="/",children:n=null,location:o,navigationType:a="POP",navigator:s,static:u=!1,unstable_useTransitions:c}){ct(!ya(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:f,navigator:s,static:u,unstable_useTransitions:c,future:{}}),[f,s,u,c]);typeof o=="string"&&(o=ma(o));let{pathname:h="/",search:v="",hash:y="",state:b=null,key:C="default"}=o,E=g.useMemo(()=>{let S=An(h,f);return S==null?null:{location:{pathname:S,search:v,hash:y,state:b,key:C},navigationType:a}},[f,h,v,y,b,C,a]);return Pr(E!=null,`<Router basename="${f}"> is not able to match the URL "${h}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:g.createElement(ur.Provider,{value:p},g.createElement(js.Provider,{children:n,value:E}))}function rO({children:e,location:n}){return U_(cp(e),n)}function cp(e,n=[]){let o=[];return g.Children.forEach(e,(a,s)=>{if(!g.isValidElement(a))return;let u=[...n,s];if(a.type===g.Fragment){o.push.apply(o,cp(a.props.children,u));return}ct(a.type===Qo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=cp(a.props.children,u)),o.push(c)}),o}var pu="get",hu="application/x-www-form-urlencoded";function Du(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nO(e){return Du(e)&&e.tagName.toLowerCase()==="button"}function oO(e){return Du(e)&&e.tagName.toLowerCase()==="form"}function iO(e){return Du(e)&&e.tagName.toLowerCase()==="input"}function aO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sO(e,n){return e.button===0&&(!n||n==="_self")&&!aO(e)}var Yl=null;function lO(){if(Yl===null)try{new FormData(document.createElement("form"),0),Yl=!1}catch{Yl=!0}return Yl}var uO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Af(e){return e!=null&&!uO.has(e)?(Pr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hu}"`),null):e}function cO(e,n){let o,a,s,u,c;if(oO(e)){let f=e.getAttribute("action");a=f?An(f,n):null,o=e.getAttribute("method")||pu,s=Af(e.getAttribute("enctype"))||hu,u=new FormData(e)}else if(nO(e)||iO(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||f.getAttribute("action");if(a=p?An(p,n):null,o=e.getAttribute("formmethod")||f.getAttribute("method")||pu,s=Af(e.getAttribute("formenctype"))||Af(f.getAttribute("enctype"))||hu,u=new FormData(f,e),!lO()){let{name:h,type:v,value:y}=e;if(v==="image"){let b=h?`${h}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else h&&u.append(h,y)}}else{if(Du(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=pu,a=null,s=hu,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:a,method:o.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Bp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function dO(e,n,o){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname=`_root.${o}`:n&&An(a.pathname,n)==="/"?a.pathname=`${n.replace(/\/$/,"")}/_root.${o}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${o}`,a}async function fO(e,n){if(e.id in n)return n[e.id];try{let o=await import(e.module);return n[e.id]=o,o}catch(o){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hO(e,n,o){let a=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await fO(u,o);return c.links?c.links():[]}return[]}));return gO(a.flat(1).filter(pO).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ng(e,n,o,a,s,u){let c=(p,h)=>o[h]?p.route.id!==o[h].route.id:!0,f=(p,h)=>{var v;return o[h].pathname!==p.pathname||((v=o[h].route.path)==null?void 0:v.endsWith("*"))&&o[h].params["*"]!==p.params["*"]};return u==="assets"?n.filter((p,h)=>c(p,h)||f(p,h)):u==="data"?n.filter((p,h)=>{var y;let v=a.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(c(p,h)||f(p,h))return!0;if(p.route.shouldRevalidate){let b=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((y=o[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function mO(e,n,{includeHydrateFallback:o}={}){return vO(e.map(a=>{let s=n.routes[a.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),o&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function vO(e){return[...new Set(e)]}function yO(e){let n={},o=Object.keys(e).sort();for(let a of o)n[a]=e[a];return n}function gO(e,n){let o=new Set;return new Set(n),e.reduce((a,s)=>{let u=JSON.stringify(yO(s));return o.has(u)||(o.add(u),a.push({key:u,link:s})),a},[])}function aw(){let e=g.useContext(va);return Bp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xO(){let e=g.useContext(Mu);return Bp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Wp=g.createContext(void 0);Wp.displayName="FrameworkContext";function sw(){let e=g.useContext(Wp);return Bp(e,"You must render this element inside a <HydratedRouter> element"),e}function wO(e,n){let o=g.useContext(Wp),[a,s]=g.useState(!1),[u,c]=g.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:h,onMouseLeave:v,onTouchStart:y}=n,b=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=R=>{R.forEach(N=>{c(N.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return b.current&&w.observe(b.current),()=>{w.disconnect()}}},[e]),g.useEffect(()=>{if(a){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[a]);let C=()=>{s(!0)},E=()=>{s(!1),c(!1)};return o?e!=="intent"?[u,b,{}]:[u,b,{onFocus:as(f,C),onBlur:as(p,E),onMouseEnter:as(h,C),onMouseLeave:as(v,E),onTouchStart:as(y,C)}]:[!1,b,{}]}function as(e,n){return o=>{e&&e(o),o.defaultPrevented||n(o)}}function bO({page:e,...n}){let{router:o}=aw(),a=g.useMemo(()=>Vx(o.routes,e,o.basename),[o.routes,e,o.basename]);return a?g.createElement(CO,{page:e,matches:a,...n}):null}function SO(e){let{manifest:n,routeModules:o}=sw(),[a,s]=g.useState([]);return g.useEffect(()=>{let u=!1;return hO(e,n,o).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,o]),a}function CO({page:e,matches:n,...o}){let a=Nr(),{manifest:s,routeModules:u}=sw(),{basename:c}=aw(),{loaderData:f,matches:p}=xO(),h=g.useMemo(()=>Ng(e,n,p,s,a,"data"),[e,n,p,s,a]),v=g.useMemo(()=>Ng(e,n,p,s,a,"assets"),[e,n,p,s,a]),y=g.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,S=!1;if(n.forEach(R=>{var O;let N=s.routes[R.route.id];!N||!N.hasLoader||(!h.some(T=>T.route.id===R.route.id)&&R.route.id in f&&((O=u[R.route.id])!=null&&O.shouldRevalidate)||N.hasClientLoader?S=!0:E.add(R.route.id))}),E.size===0)return[];let w=dO(e,c,"data");return S&&E.size>0&&w.searchParams.set("_routes",n.filter(R=>E.has(R.route.id)).map(R=>R.route.id).join(",")),[w.pathname+w.search]},[c,f,a,s,h,n,e,u]),b=g.useMemo(()=>mO(v,s),[v,s]),C=SO(v);return g.createElement(g.Fragment,null,y.map(E=>g.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...o})),b.map(E=>g.createElement("link",{key:E,rel:"modulepreload",href:E,...o})),C.map(({key:E,link:S})=>g.createElement("link",{key:E,nonce:o.nonce,...S})))}function EO(...e){return n=>{e.forEach(o=>{typeof o=="function"?o(n):o!=null&&(o.current=n)})}}var kO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{kO&&(window.__reactRouterVersion="7.11.0")}catch{}function RO({basename:e,children:n,unstable_useTransitions:o,window:a}){let s=g.useRef();s.current==null&&(s.current=n_({window:a,v5Compat:!0}));let u=s.current,[c,f]=g.useState({action:u.action,location:u.location}),p=g.useCallback(h=>{o===!1?f(h):g.startTransition(()=>f(h))},[o]);return g.useLayoutEffect(()=>u.listen(p),[u,p]),g.createElement(tO,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,unstable_useTransitions:o})}var lw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Po=g.forwardRef(function({onClick:n,discover:o="render",prefetch:a="none",relative:s,reloadDocument:u,replace:c,state:f,target:p,to:h,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:b,...C},E){let{basename:S,unstable_useTransitions:w}=g.useContext(ur),R=typeof h=="string"&&lw.test(h),N=Yx(h,S);h=N.to;let O=L_(h,{relative:s}),[T,$,A]=wO(a,C),M=OO(h,{replace:c,state:f,target:p,preventScrollReset:v,relative:s,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:w});function P(D){n&&n(D),D.defaultPrevented||M(D)}let _=g.createElement("a",{...C,...A,href:N.absoluteURL||O,onClick:N.isExternal||u?n:P,ref:EO(E,$),target:p,"data-discover":!R&&o==="render"?"true":void 0});return T&&!R?g.createElement(g.Fragment,null,_,g.createElement(bO,{page:O})):_});Po.displayName="Link";var PO=g.forwardRef(function({"aria-current":n="page",caseSensitive:o=!1,className:a="",end:s=!1,style:u,to:c,viewTransition:f,children:p,...h},v){let y=As(c,{relative:h.relative}),b=Nr(),C=g.useContext(Mu),{navigator:E,basename:S}=g.useContext(ur),w=C!=null&&MO(y)&&f===!0,R=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,N=b.pathname,O=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;o||(N=N.toLowerCase(),O=O?O.toLowerCase():null,R=R.toLowerCase()),O&&S&&(O=An(O,S)||O);const T=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let $=N===R||!s&&N.startsWith(R)&&N.charAt(T)==="/",A=O!=null&&(O===R||!s&&O.startsWith(R)&&O.charAt(R.length)==="/"),M={isActive:$,isPending:A,isTransitioning:w},P=$?n:void 0,_;typeof a=="function"?_=a(M):_=[a,$?"active":null,A?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let D=typeof u=="function"?u(M):u;return g.createElement(Po,{...h,"aria-current":P,className:_,ref:v,style:D,to:c,viewTransition:f},typeof p=="function"?p(M):p)});PO.displayName="NavLink";var NO=g.forwardRef(({discover:e="render",fetcherKey:n,navigate:o,reloadDocument:a,replace:s,state:u,method:c=pu,action:f,onSubmit:p,relative:h,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:b,...C},E)=>{let{unstable_useTransitions:S}=g.useContext(ur),w=AO(),R=IO(f,{relative:h}),N=c.toLowerCase()==="get"?"get":"post",O=typeof f=="string"&&lw.test(f),T=$=>{if(p&&p($),$.defaultPrevented)return;$.preventDefault();let A=$.nativeEvent.submitter,M=(A==null?void 0:A.getAttribute("formmethod"))||c,P=()=>w(A||$.currentTarget,{fetcherKey:n,method:M,navigate:o,replace:s,state:u,relative:h,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:b});S&&o!==!1?g.startTransition(()=>P()):P()};return g.createElement("form",{ref:E,method:N,action:R,onSubmit:a?p:T,...C,"data-discover":!O&&e==="render"?"true":void 0})});NO.displayName="Form";function _O(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uw(e){let n=g.useContext(va);return ct(n,_O(e)),n}function OO(e,{target:n,replace:o,state:a,preventScrollReset:s,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let h=gs(),v=Nr(),y=As(e,{relative:u});return g.useCallback(b=>{if(sO(b,n)){b.preventDefault();let C=o!==void 0?o:vs(v)===vs(y),E=()=>h(e,{replace:C,state:a,preventScrollReset:s,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f});p?g.startTransition(()=>E()):E()}},[v,h,y,o,a,n,e,s,u,c,f,p])}var TO=0,jO=()=>`__${String(++TO)}__`;function AO(){let{router:e}=uw("useSubmit"),{basename:n}=g.useContext(ur),o=Y_(),a=e.fetch,s=e.navigate;return g.useCallback(async(u,c={})=>{let{action:f,method:p,encType:h,formData:v,body:y}=cO(u,n);if(c.navigate===!1){let b=c.fetcherKey||jO();await a(b,o,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:v,body:y,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:v,body:y,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:o,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,n,o])}function IO(e,{relative:n}={}){let{basename:o}=g.useContext(ur),a=g.useContext(_r);ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),u={...As(e||".",{relative:n})},c=Nr();if(e==null){u.search=c.search;let f=new URLSearchParams(u.search),p=f.getAll("index");if(p.some(v=>v==="")){f.delete("index"),p.filter(y=>y).forEach(y=>f.append("index",y));let v=f.toString();u.search=v?`?${v}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(u.pathname=u.pathname==="/"?o:On([o,u.pathname])),vs(u)}function MO(e,{relative:n}={}){let o=g.useContext(Jx);ct(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=uw("useViewTransitionState"),s=As(e,{relative:n});if(!o.isTransitioning)return!1;let u=An(o.currentLocation.pathname,a)||o.currentLocation.pathname,c=An(o.nextLocation.pathname,a)||o.nextLocation.pathname;return ys(s.pathname,c)!=null||ys(s.pathname,u)!=null}var _g=e=>{if(typeof e>"u")return e;const n=Number(e);return`${n}`===e?n:e},DO={addQueryPrefix:!0,skipNulls:!0,arrayFormat:"indices",encode:!1,encodeValuesOnly:!0},LO={go:()=>{const{search:e,hash:n}=Nr(),o=gs();return g.useCallback(({to:s,type:u,query:c,hash:f,options:{keepQuery:p,keepHash:h}={}})=>{const v={...p&&e&&cu.parse(e,{ignoreQueryPrefix:!0}),...c};v.to&&(v.to=encodeURIComponent(`${v.to}`));const y=Object.keys(v).length>0,b=`#${(f||h&&n||"").replace(/^#/,"")}`,C=b.length>1,S=`${s||""}${y?cu.stringify(v,DO):""}${C?b:""}`;if(u==="path")return S;o(S,{replace:u==="replace"})},[n,e,o])},back:()=>{const e=gs();return g.useCallback(()=>{e(-1)},[e])},parse:()=>{var e;let n=rw();const{pathname:o,search:a}=Nr(),{resources:s}=g.useContext(Ts),{resource:u,action:c,matchedRoute:f}=ie.useMemo(()=>zP(o,s),[s,o]);return Object.entries(n).length===0&&f&&(n=((e=ys(f,o))==null?void 0:e.params)||{}),g.useCallback(()=>{const h=cu.parse(a,{ignoreQueryPrefix:!0}),v={...n,...h};return{...u&&{resource:u},...c&&{action:c},...(n==null?void 0:n.id)&&{id:decodeURIComponent(n.id)},pathname:o,params:{...v,currentPage:_g(v.currentPage),pageSize:_g(v.pageSize),to:v.to?decodeURIComponent(v.to):void 0}}},[o,a,n,u,c])},Link:ie.forwardRef(function(n,o){return ie.createElement(Po,{to:n.to,...n,ref:o})})},FO=({resource:e,fallbackTo:n,meta:o})=>{const a=Ux(),{resource:s,resources:u}=lr({resource:e}),c=s||u.find(f=>f.list);if(c){const f=a({resource:c,action:"list",meta:o});return f?ie.createElement(Pg,{to:f}):null}return n?(console.warn(`No resource is found. navigation to ${n}.`),ie.createElement(Pg,{to:n})):(console.warn('No resource and "fallbackTo" is found. No navigation will be made.'),null)};function $O(e,n=!0){const{navigator:o}=ie.useContext(ur);ie.useEffect(()=>{if(!n)return;const a=o.go,s=o.push;return o.push=(...u)=>{e()!==!1&&s(...u)},o.go=(...u)=>{e()!==!1&&a(...u)},()=>{o.push=s,o.go=a}},[o,e,n])}function zO(e,n=!0,o){const a=ie.useCallback(u=>(u.preventDefault(),u.returnValue=e,u.returnValue),[e]);ie.useEffect(()=>(n&&window.addEventListener("beforeunload",a),()=>{window.removeEventListener("beforeunload",a)}),[a,n]);const s=ie.useCallback(()=>{const u=window.confirm(e);return u&&o&&o(),u},[e]);$O(s,n)}var UO=({translationKey:e="warnWhenUnsavedChanges",message:n="Are you sure you want to leave? You have unsaved changes."})=>{const o=Ln(),{pathname:a}=Nr(),{warnWhen:s,setWarnWhen:u}=yx();ie.useEffect(()=>()=>u==null?void 0:u(!1),[a]);const c=ie.useMemo(()=>o(e,n),[e,n,o]);return zO(c,s,()=>{u==null||u(!1)}),null};/**
78
+ * @license lucide-react v0.563.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const cw=(...e)=>e.filter((n,o,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===o).join(" ").trim();/**
83
+ * @license lucide-react v0.563.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const BO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
88
+ * @license lucide-react v0.563.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const WO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,o,a)=>a?a.toUpperCase():o.toLowerCase());/**
93
+ * @license lucide-react v0.563.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Og=e=>{const n=WO(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
98
+ * @license lucide-react v0.563.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */var qO={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"};/**
103
+ * @license lucide-react v0.563.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const VO=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
108
+ * @license lucide-react v0.563.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const KO=g.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:s="",children:u,iconNode:c,...f},p)=>g.createElement("svg",{ref:p,...qO,width:n,height:n,stroke:e,strokeWidth:a?Number(o)*24/Number(n):o,className:cw("lucide",s),...!u&&!VO(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,v])=>g.createElement(h,v)),...Array.isArray(u)?u:[u]]));/**
113
+ * @license lucide-react v0.563.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const cn=(e,n)=>{const o=g.forwardRef(({className:a,...s},u)=>g.createElement(KO,{ref:u,iconNode:n,className:cw(`lucide-${BO(Og(e))}`,`lucide-${e}`,a),...s}));return o.displayName=Og(e),o};/**
118
+ * @license lucide-react v0.563.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const HO=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],QO=cn("boxes",HO);/**
123
+ * @license lucide-react v0.563.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const GO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],YO=cn("check",GO);/**
128
+ * @license lucide-react v0.563.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const XO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],JO=cn("chevron-down",XO);/**
133
+ * @license lucide-react v0.563.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const ZO=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],eT=cn("chevron-up",ZO);/**
138
+ * @license lucide-react v0.563.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const tT=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],rT=cn("hard-drive",tT);/**
143
+ * @license lucide-react v0.563.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const nT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],oT=cn("layout-dashboard",nT);/**
148
+ * @license lucide-react v0.563.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const iT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Tg=cn("plus",iT);/**
153
+ * @license lucide-react v0.563.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const aT=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],sT=cn("server",aT);/**
158
+ * @license lucide-react v0.563.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const lT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],jg=cn("trash-2",lT);/**
163
+ * @license lucide-react v0.563.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const uT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cT=cn("x",uT),dw="sandbox-console.servers",fw="sandbox-console.selectedServerId";function bu(){return{id:"default",name:"Default Server",url:"http://127.0.0.1:4002",apiKey:""}}function Lu(){return typeof window<"u"&&typeof window.localStorage<"u"}function ss(){return[bu()]}function pw(){if(!Lu())return ss();const e=window.localStorage.getItem(dw);if(!e)return ss();try{const n=JSON.parse(e);if(!Array.isArray(n)||n.length===0)return ss();const o=n.filter(a=>typeof a.id=="string"&&typeof a.name=="string"&&typeof a.url=="string"&&typeof a.apiKey=="string");return o.length>0?o:ss()}catch{return ss()}}function Ag(e){Lu()&&window.localStorage.setItem(dw,JSON.stringify(e))}function dT(){return Lu()?window.localStorage.getItem(fw)??bu().id:bu().id}function fT(e){Lu()&&window.localStorage.setItem(fw,e)}function Fu(){const e=pw(),n=dT();return e.find(o=>o.id===n)??e[0]??bu()}function pT(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`server-${Date.now()}`}function Ig(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function qp(...e){return n=>{let o=!1;const a=e.map(s=>{const u=Ig(s,n);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let s=0;s<a.length;s++){const u=a[s];typeof u=="function"?u():Ig(e[s],null)}}}}function ln(...e){return g.useCallback(qp(...e),e)}var hT=Symbol.for("react.lazy"),Su=_s[" use ".trim().toString()];function mT(e){return typeof e=="object"&&e!==null&&"then"in e}function hw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===hT&&"_payload"in e&&mT(e._payload)}function mw(e){const n=yT(e),o=g.forwardRef((a,s)=>{let{children:u,...c}=a;hw(u)&&typeof Su=="function"&&(u=Su(u._payload));const f=g.Children.toArray(u),p=f.find(xT);if(p){const h=p.props.children,v=f.map(y=>y===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:y);return x.jsx(n,{...c,ref:s,children:g.isValidElement(h)?g.cloneElement(h,void 0,v):null})}return x.jsx(n,{...c,ref:s,children:u})});return o.displayName=`${e}.Slot`,o}var vT=mw("Slot");function yT(e){const n=g.forwardRef((o,a)=>{let{children:s,...u}=o;if(hw(s)&&typeof Su=="function"&&(s=Su(s._payload)),g.isValidElement(s)){const c=bT(s),f=wT(u,s.props);return s.type!==g.Fragment&&(f.ref=a?qp(a,c):c),g.cloneElement(s,f)}return g.Children.count(s)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var gT=Symbol("radix.slottable");function xT(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gT}function wT(e,n){const o={...n};for(const a in n){const s=e[a],u=n[a];/^on[A-Z]/.test(a)?s&&u?o[a]=(...f)=>{const p=u(...f);return s(...f),p}:s&&(o[a]=s):a==="style"?o[a]={...s,...u}:a==="className"&&(o[a]=[s,u].filter(Boolean).join(" "))}return{...e,...o}}function bT(e){var a,s;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function vw(e){var n,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(o=vw(e[n]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function yw(){for(var e,n,o=0,a="",s=arguments.length;o<s;o++)(e=arguments[o])&&(n=vw(e))&&(a&&(a+=" "),a+=n);return a}const Mg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dg=yw,Vp=(e,n)=>o=>{var a;if((n==null?void 0:n.variants)==null)return Dg(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(h=>{const v=o==null?void 0:o[h],y=u==null?void 0:u[h];if(v===null)return null;const b=Mg(v)||Mg(y);return s[h][b]}),f=o&&Object.entries(o).reduce((h,v)=>{let[y,b]=v;return b===void 0||(h[y]=b),h},{}),p=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((h,v)=>{let{class:y,className:b,...C}=v;return Object.entries(C).every(E=>{let[S,w]=E;return Array.isArray(w)?w.includes({...u,...f}[S]):{...u,...f}[S]===w})?[...h,y,b]:h},[]);return Dg(e,c,p,o==null?void 0:o.class,o==null?void 0:o.className)},ST=(e,n)=>{const o=new Array(e.length+n.length);for(let a=0;a<e.length;a++)o[a]=e[a];for(let a=0;a<n.length;a++)o[e.length+a]=n[a];return o},CT=(e,n)=>({classGroupId:e,validator:n}),gw=(e=new Map,n=null,o)=>({nextPart:e,validators:n,classGroupId:o}),Cu="-",Lg=[],ET="arbitrary..",kT=e=>{const n=PT(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return RT(c);const f=c.split(Cu),p=f[0]===""&&f.length>1?1:0;return xw(f,p,n)},getConflictingClassGroupIds:(c,f)=>{if(f){const p=a[c],h=o[c];return p?h?ST(h,p):p:h||Lg}return o[c]||Lg}}},xw=(e,n,o)=>{if(e.length-n===0)return o.classGroupId;const s=e[n],u=o.nextPart.get(s);if(u){const h=xw(e,n+1,u);if(h)return h}const c=o.validators;if(c===null)return;const f=n===0?e.join(Cu):e.slice(n).join(Cu),p=c.length;for(let h=0;h<p;h++){const v=c[h];if(v.validator(f))return v.classGroupId}},RT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),o=n.indexOf(":"),a=n.slice(0,o);return a?ET+a:void 0})(),PT=e=>{const{theme:n,classGroups:o}=e;return NT(o,n)},NT=(e,n)=>{const o=gw();for(const a in e){const s=e[a];Kp(s,o,a,n)}return o},Kp=(e,n,o,a)=>{const s=e.length;for(let u=0;u<s;u++){const c=e[u];_T(c,n,o,a)}},_T=(e,n,o,a)=>{if(typeof e=="string"){OT(e,n,o);return}if(typeof e=="function"){TT(e,n,o,a);return}jT(e,n,o,a)},OT=(e,n,o)=>{const a=e===""?n:ww(n,e);a.classGroupId=o},TT=(e,n,o,a)=>{if(AT(e)){Kp(e(a),n,o,a);return}n.validators===null&&(n.validators=[]),n.validators.push(CT(o,e))},jT=(e,n,o,a)=>{const s=Object.entries(e),u=s.length;for(let c=0;c<u;c++){const[f,p]=s[c];Kp(p,ww(n,f),o,a)}},ww=(e,n)=>{let o=e;const a=n.split(Cu),s=a.length;for(let u=0;u<s;u++){const c=a[u];let f=o.nextPart.get(c);f||(f=gw(),o.nextPart.set(c,f)),o=f}return o},AT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,IT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,o=Object.create(null),a=Object.create(null);const s=(u,c)=>{o[u]=c,n++,n>e&&(n=0,a=o,o=Object.create(null))};return{get(u){let c=o[u];if(c!==void 0)return c;if((c=a[u])!==void 0)return s(u,c),c},set(u,c){u in o?o[u]=c:s(u,c)}}},dp="!",Fg=":",MT=[],$g=(e,n,o,a,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:o,maybePostfixModifierPosition:a,isExternal:s}),DT=e=>{const{prefix:n,experimentalParseClassName:o}=e;let a=s=>{const u=[];let c=0,f=0,p=0,h;const v=s.length;for(let S=0;S<v;S++){const w=s[S];if(c===0&&f===0){if(w===Fg){u.push(s.slice(p,S)),p=S+1;continue}if(w==="/"){h=S;continue}}w==="["?c++:w==="]"?c--:w==="("?f++:w===")"&&f--}const y=u.length===0?s:s.slice(p);let b=y,C=!1;y.endsWith(dp)?(b=y.slice(0,-1),C=!0):y.startsWith(dp)&&(b=y.slice(1),C=!0);const E=h&&h>p?h-p:void 0;return $g(u,C,b,E)};if(n){const s=n+Fg,u=a;a=c=>c.startsWith(s)?u(c.slice(s.length)):$g(MT,!1,c,void 0,!0)}if(o){const s=a;a=u=>o({className:u,parseClassName:s})}return a},LT=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((o,a)=>{n.set(o,1e6+a)}),o=>{const a=[];let s=[];for(let u=0;u<o.length;u++){const c=o[u],f=c[0]==="[",p=n.has(c);f||p?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},FT=e=>({cache:IT(e.cacheSize),parseClassName:DT(e),sortModifiers:LT(e),...kT(e)}),$T=/\s+/,zT=(e,n)=>{const{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:u}=n,c=[],f=e.trim().split($T);let p="";for(let h=f.length-1;h>=0;h-=1){const v=f[h],{isExternal:y,modifiers:b,hasImportantModifier:C,baseClassName:E,maybePostfixModifierPosition:S}=o(v);if(y){p=v+(p.length>0?" "+p:p);continue}let w=!!S,R=a(w?E.substring(0,S):E);if(!R){if(!w){p=v+(p.length>0?" "+p:p);continue}if(R=a(E),!R){p=v+(p.length>0?" "+p:p);continue}w=!1}const N=b.length===0?"":b.length===1?b[0]:u(b).join(":"),O=C?N+dp:N,T=O+R;if(c.indexOf(T)>-1)continue;c.push(T);const $=s(R,w);for(let A=0;A<$.length;++A){const M=$[A];c.push(O+M)}p=v+(p.length>0?" "+p:p)}return p},UT=(...e)=>{let n=0,o,a,s="";for(;n<e.length;)(o=e[n++])&&(a=bw(o))&&(s&&(s+=" "),s+=a);return s},bw=e=>{if(typeof e=="string")return e;let n,o="";for(let a=0;a<e.length;a++)e[a]&&(n=bw(e[a]))&&(o&&(o+=" "),o+=n);return o},BT=(e,...n)=>{let o,a,s,u;const c=p=>{const h=n.reduce((v,y)=>y(v),e());return o=FT(h),a=o.cache.get,s=o.cache.set,u=f,f(p)},f=p=>{const h=a(p);if(h)return h;const v=zT(p,o);return s(p,v),v};return u=c,(...p)=>u(UT(...p))},WT=[],Ct=e=>{const n=o=>o[e]||WT;return n.isThemeGetter=!0,n},Sw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,VT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KT=/\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$/,HT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,so=e=>qT.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),lo=e=>!!e&&Number.isInteger(Number(e)),If=e=>e.endsWith("%")&&ze(e.slice(0,-1)),bn=e=>VT.test(e),Ew=()=>!0,YT=e=>KT.test(e)&&!HT.test(e),Hp=()=>!1,XT=e=>QT.test(e),JT=e=>GT.test(e),ZT=e=>!be(e)&&!Se(e),ej=e=>jo(e,Pw,Hp),be=e=>Sw.test(e),Ko=e=>jo(e,Nw,YT),zg=e=>jo(e,lj,ze),tj=e=>jo(e,Ow,Ew),rj=e=>jo(e,_w,Hp),Ug=e=>jo(e,kw,Hp),nj=e=>jo(e,Rw,JT),Xl=e=>jo(e,Tw,XT),Se=e=>Cw.test(e),ls=e=>hi(e,Nw),oj=e=>hi(e,_w),Bg=e=>hi(e,kw),ij=e=>hi(e,Pw),aj=e=>hi(e,Rw),Jl=e=>hi(e,Tw,!0),sj=e=>hi(e,Ow,!0),jo=(e,n,o)=>{const a=Sw.exec(e);return a?a[1]?n(a[1]):o(a[2]):!1},hi=(e,n,o=!1)=>{const a=Cw.exec(e);return a?a[1]?n(a[1]):o:!1},kw=e=>e==="position"||e==="percentage",Rw=e=>e==="image"||e==="url",Pw=e=>e==="length"||e==="size"||e==="bg-size",Nw=e=>e==="length",lj=e=>e==="number",_w=e=>e==="family-name",Ow=e=>e==="number"||e==="weight",Tw=e=>e==="shadow",uj=()=>{const e=Ct("color"),n=Ct("font"),o=Ct("text"),a=Ct("font-weight"),s=Ct("tracking"),u=Ct("leading"),c=Ct("breakpoint"),f=Ct("container"),p=Ct("spacing"),h=Ct("radius"),v=Ct("shadow"),y=Ct("inset-shadow"),b=Ct("text-shadow"),C=Ct("drop-shadow"),E=Ct("blur"),S=Ct("perspective"),w=Ct("aspect"),R=Ct("ease"),N=Ct("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...T(),Se,be],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],P=()=>[Se,be,p],_=()=>[so,"full","auto",...P()],D=()=>[lo,"none","subgrid",Se,be],H=()=>["auto",{span:["full",lo,Se,be]},lo,Se,be],W=()=>[lo,"auto",Se,be],J=()=>["auto","min","max","fr",Se,be],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],xe=()=>["start","end","center","stretch","center-safe","end-safe"],fe=()=>["auto",...P()],ae=()=>[so,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],G=()=>[so,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[so,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],B=()=>[e,Se,be],j=()=>[...T(),Bg,Ug,{position:[Se,be]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",ij,ej,{size:[Se,be]}],ue=()=>[If,ls,Ko],se=()=>["","none","full",h,Se,be],de=()=>["",ze,ls,Ko],Pe=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[ze,If,Bg,Ug],he=()=>["","none",E,Se,be],me=()=>["none",ze,Se,be],Ee=()=>["none",ze,Se,be],je=()=>[ze,Se,be],_e=()=>[so,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bn],breakpoint:[bn],color:[Ew],container:[bn],"drop-shadow":[bn],ease:["in","out","in-out"],font:[ZT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bn],shadow:[bn],spacing:["px",ze],text:[bn],"text-shadow":[bn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",so,be,Se,w]}],container:["container"],columns:[{columns:[ze,be,Se,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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"],sr:["sr-only","not-sr-only"],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:$()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[lo,"auto",Se,be]}],basis:[{basis:[so,"full","auto",f,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,so,"auto","initial","none",be]}],grow:[{grow:["",ze,Se,be]}],shrink:[{shrink:["",ze,Se,be]}],order:[{order:[lo,"first","last","none",Se,be]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...xe(),"normal"]}],"justify-self":[{"justify-self":["auto",...xe()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...xe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...xe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...xe(),"baseline"]}],"place-self":[{"place-self":["auto",...xe()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:fe()}],mx:[{mx:fe()}],my:[{my:fe()}],ms:[{ms:fe()}],me:[{me:fe()}],mbs:[{mbs:fe()}],mbe:[{mbe:fe()}],mt:[{mt:fe()}],mr:[{mr:fe()}],mb:[{mb:fe()}],ml:[{ml:fe()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[f,"screen",...ae()]}],"min-w":[{"min-w":[f,"screen","none",...ae()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",o,ls,Ko]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,sj,tj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",If,be]}],"font-family":[{font:[oj,rj,n]}],"font-features":[{"font-features":[be]}],"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:[s,Se,be]}],"line-clamp":[{"line-clamp":[ze,"none",Se,zg]}],leading:[{leading:[u,...P()]}],"list-image":[{"list-image":["none",Se,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Se,Ko]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[ze,"auto",Se,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lo,Se,be],radial:["",Se,be],conic:[lo,Se,be]},aj,nj]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Pe(),"hidden","none"]}],"divide-style":[{divide:[...Pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...Pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Se,be]}],"outline-w":[{outline:["",ze,ls,Ko]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",v,Jl,Xl]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",y,Jl,Xl]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[ze,Ko]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",b,Jl,Xl]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[ze,Se,be]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Se,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,be]}],filter:[{filter:["","none",Se,be]}],blur:[{blur:he()}],brightness:[{brightness:[ze,Se,be]}],contrast:[{contrast:[ze,Se,be]}],"drop-shadow":[{"drop-shadow":["","none",C,Jl,Xl]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",ze,Se,be]}],"hue-rotate":[{"hue-rotate":[ze,Se,be]}],invert:[{invert:["",ze,Se,be]}],saturate:[{saturate:[ze,Se,be]}],sepia:[{sepia:["",ze,Se,be]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,be]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Se,be]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Se,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Se,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Se,be]}],"backdrop-invert":[{"backdrop-invert":["",ze,Se,be]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Se,be]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Se,be]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Se,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Se,be]}],ease:[{ease:["linear","initial",R,Se,be]}],delay:[{delay:[ze,Se,be]}],animate:[{animate:["none",N,Se,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Se,be]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[Se,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Se,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Se,be]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[ze,ls,Ko,zg]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cj=BT(uj);function Ge(...e){return cj(yw(e))}const dj=Vp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),tt=g.forwardRef(function({className:n,variant:o,size:a,asChild:s=!1,...u},c){const f=Ge(dj({variant:o,size:a,className:n}));return s?x.jsx(vT,{className:f,ref:c,...u}):x.jsx("button",{className:f,ref:c,...u})});tt.displayName="Button";function It(e,n,{checkForDefaultPrevented:o=!0}={}){return function(s){if(e==null||e(s),o===!1||!s.defaultPrevented)return n==null?void 0:n(s)}}function fj(e,n){const o=g.createContext(n),a=u=>{const{children:c,...f}=u,p=g.useMemo(()=>f,Object.values(f));return x.jsx(o.Provider,{value:p,children:c})};a.displayName=e+"Provider";function s(u){const c=g.useContext(o);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${e}\``)}return[a,s]}function $u(e,n=[]){let o=[];function a(u,c){const f=g.createContext(c),p=o.length;o=[...o,c];const h=y=>{var R;const{scope:b,children:C,...E}=y,S=((R=b==null?void 0:b[e])==null?void 0:R[p])||f,w=g.useMemo(()=>E,Object.values(E));return x.jsx(S.Provider,{value:w,children:C})};h.displayName=u+"Provider";function v(y,b){var S;const C=((S=b==null?void 0:b[e])==null?void 0:S[p])||f,E=g.useContext(C);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[h,v]}const s=()=>{const u=o.map(c=>g.createContext(c));return function(f){const p=(f==null?void 0:f[e])||u;return g.useMemo(()=>({[`__scope${e}`]:{...f,[e]:p}}),[f,p])}};return s.scopeName=e,[a,pj(s,...n)]}function pj(...e){const n=e[0];if(e.length===1)return n;const o=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=a.reduce((f,{useScope:p,scopeName:h})=>{const y=p(u)[`__scope${h}`];return{...f,...y}},{});return g.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return o.scopeName=n.scopeName,o}var xs=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},hj=_s[" useId ".trim().toString()]||(()=>{}),mj=0;function ds(e){const[n,o]=g.useState(hj());return xs(()=>{o(a=>a??String(mj++))},[e]),n?`radix-${n}`:""}var vj=_s[" useInsertionEffect ".trim().toString()]||xs;function Qp({prop:e,defaultProp:n,onChange:o=()=>{},caller:a}){const[s,u,c]=yj({defaultProp:n,onChange:o}),f=e!==void 0,p=f?e:s;{const v=g.useRef(e!==void 0);g.useEffect(()=>{const y=v.current;y!==f&&console.warn(`${a} is changing from ${y?"controlled":"uncontrolled"} to ${f?"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.`),v.current=f},[f,a])}const h=g.useCallback(v=>{var y;if(f){const b=gj(v)?v(e):v;b!==e&&((y=c.current)==null||y.call(c,b))}else u(v)},[f,e,u,c]);return[p,h]}function yj({defaultProp:e,onChange:n}){const[o,a]=g.useState(e),s=g.useRef(o),u=g.useRef(n);return vj(()=>{u.current=n},[n]),g.useEffect(()=>{var c;s.current!==o&&((c=u.current)==null||c.call(u,o),s.current=o)},[o,s]),[o,a,u]}function gj(e){return typeof e=="function"}var jw=w0();const xj=da(jw);function Eu(e){const n=wj(e),o=g.forwardRef((a,s)=>{const{children:u,...c}=a,f=g.Children.toArray(u),p=f.find(Sj);if(p){const h=p.props.children,v=f.map(y=>y===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:y);return x.jsx(n,{...c,ref:s,children:g.isValidElement(h)?g.cloneElement(h,void 0,v):null})}return x.jsx(n,{...c,ref:s,children:u})});return o.displayName=`${e}.Slot`,o}function wj(e){const n=g.forwardRef((o,a)=>{const{children:s,...u}=o;if(g.isValidElement(s)){const c=Ej(s),f=Cj(u,s.props);return s.type!==g.Fragment&&(f.ref=a?qp(a,c):c),g.cloneElement(s,f)}return g.Children.count(s)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var bj=Symbol("radix.slottable");function Sj(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bj}function Cj(e,n){const o={...n};for(const a in n){const s=e[a],u=n[a];/^on[A-Z]/.test(a)?s&&u?o[a]=(...f)=>{const p=u(...f);return s(...f),p}:s&&(o[a]=s):a==="style"?o[a]={...s,...u}:a==="className"&&(o[a]=[s,u].filter(Boolean).join(" "))}return{...e,...o}}function Ej(e){var a,s;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var kj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yt=kj.reduce((e,n)=>{const o=Eu(`Primitive.${n}`),a=g.forwardRef((s,u)=>{const{asChild:c,...f}=s,p=c?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...f,ref:u})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function Rj(e,n){e&&jw.flushSync(()=>e.dispatchEvent(n))}function ca(e){const n=g.useRef(e);return g.useEffect(()=>{n.current=e}),g.useMemo(()=>(...o)=>{var a;return(a=n.current)==null?void 0:a.call(n,...o)},[])}function Pj(e,n=globalThis==null?void 0:globalThis.document){const o=ca(e);g.useEffect(()=>{const a=s=>{s.key==="Escape"&&o(s)};return n.addEventListener("keydown",a,{capture:!0}),()=>n.removeEventListener("keydown",a,{capture:!0})},[o,n])}var Nj="DismissableLayer",fp="dismissableLayer.update",_j="dismissableLayer.pointerDownOutside",Oj="dismissableLayer.focusOutside",Wg,Aw=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Iw=g.forwardRef((e,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...p}=e,h=g.useContext(Aw),[v,y]=g.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=g.useState({}),E=ln(n,M=>y(M)),S=Array.from(h.layers),[w]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=S.indexOf(w),N=v?S.indexOf(v):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,T=N>=R,$=Aj(M=>{const P=M.target,_=[...h.branches].some(D=>D.contains(P));!T||_||(s==null||s(M),c==null||c(M),M.defaultPrevented||f==null||f())},b),A=Ij(M=>{const P=M.target;[...h.branches].some(D=>D.contains(P))||(u==null||u(M),c==null||c(M),M.defaultPrevented||f==null||f())},b);return Pj(M=>{N===h.layers.size-1&&(a==null||a(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},b),g.useEffect(()=>{if(v)return o&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Wg=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),qg(),()=>{o&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Wg)}},[v,b,o,h]),g.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),qg())},[v,h]),g.useEffect(()=>{const M=()=>C({});return document.addEventListener(fp,M),()=>document.removeEventListener(fp,M)},[]),x.jsx(Yt.div,{...p,ref:E,style:{pointerEvents:O?T?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,A.onFocusCapture),onBlurCapture:It(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,$.onPointerDownCapture)})});Iw.displayName=Nj;var Tj="DismissableLayerBranch",jj=g.forwardRef((e,n)=>{const o=g.useContext(Aw),a=g.useRef(null),s=ln(n,a);return g.useEffect(()=>{const u=a.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),x.jsx(Yt.div,{...e,ref:s})});jj.displayName=Tj;function Aj(e,n=globalThis==null?void 0:globalThis.document){const o=ca(e),a=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const u=f=>{if(f.target&&!a.current){let p=function(){Mw(_j,o,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",s.current),s.current=p,n.addEventListener("click",s.current,{once:!0})):p()}else n.removeEventListener("click",s.current);a.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",u),n.removeEventListener("click",s.current)}},[n,o]),{onPointerDownCapture:()=>a.current=!0}}function Ij(e,n=globalThis==null?void 0:globalThis.document){const o=ca(e),a=g.useRef(!1);return g.useEffect(()=>{const s=u=>{u.target&&!a.current&&Mw(Oj,o,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",s),()=>n.removeEventListener("focusin",s)},[n,o]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function qg(){const e=new CustomEvent(fp);document.dispatchEvent(e)}function Mw(e,n,o,{discrete:a}){const s=o.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});n&&s.addEventListener(e,n,{once:!0}),a?Rj(s,u):s.dispatchEvent(u)}var Mf="focusScope.autoFocusOnMount",Df="focusScope.autoFocusOnUnmount",Vg={bubbles:!1,cancelable:!0},Mj="FocusScope",Dw=g.forwardRef((e,n)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...c}=e,[f,p]=g.useState(null),h=ca(s),v=ca(u),y=g.useRef(null),b=ln(n,S=>p(S)),C=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(a){let S=function(O){if(C.paused||!f)return;const T=O.target;f.contains(T)?y.current=T:co(y.current,{select:!0})},w=function(O){if(C.paused||!f)return;const T=O.relatedTarget;T!==null&&(f.contains(T)||co(y.current,{select:!0}))},R=function(O){if(document.activeElement===document.body)for(const $ of O)$.removedNodes.length>0&&co(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const N=new MutationObserver(R);return f&&N.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),N.disconnect()}}},[a,f,C.paused]),g.useEffect(()=>{if(f){Hg.add(C);const S=document.activeElement;if(!f.contains(S)){const R=new CustomEvent(Mf,Vg);f.addEventListener(Mf,h),f.dispatchEvent(R),R.defaultPrevented||(Dj(Uj(Lw(f)),{select:!0}),document.activeElement===S&&co(f))}return()=>{f.removeEventListener(Mf,h),setTimeout(()=>{const R=new CustomEvent(Df,Vg);f.addEventListener(Df,v),f.dispatchEvent(R),R.defaultPrevented||co(S??document.body,{select:!0}),f.removeEventListener(Df,v),Hg.remove(C)},0)}}},[f,h,v,C]);const E=g.useCallback(S=>{if(!o&&!a||C.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,R=document.activeElement;if(w&&R){const N=S.currentTarget,[O,T]=Lj(N);O&&T?!S.shiftKey&&R===T?(S.preventDefault(),o&&co(O,{select:!0})):S.shiftKey&&R===O&&(S.preventDefault(),o&&co(T,{select:!0})):R===N&&S.preventDefault()}},[o,a,C.paused]);return x.jsx(Yt.div,{tabIndex:-1,...c,ref:b,onKeyDown:E})});Dw.displayName=Mj;function Dj(e,{select:n=!1}={}){const o=document.activeElement;for(const a of e)if(co(a,{select:n}),document.activeElement!==o)return}function Lj(e){const n=Lw(e),o=Kg(n,e),a=Kg(n.reverse(),e);return[o,a]}function Lw(e){const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function Kg(e,n){for(const o of e)if(!Fj(o,{upTo:n}))return o}function Fj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $j(e){return e instanceof HTMLInputElement&&"select"in e}function co(e,{select:n=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&$j(e)&&n&&e.select()}}var Hg=zj();function zj(){let e=[];return{add(n){const o=e[0];n!==o&&(o==null||o.pause()),e=Qg(e,n),e.unshift(n)},remove(n){var o;e=Qg(e,n),(o=e[0])==null||o.resume()}}}function Qg(e,n){const o=[...e],a=o.indexOf(n);return a!==-1&&o.splice(a,1),o}function Uj(e){return e.filter(n=>n.tagName!=="A")}var Bj="Portal",Fw=g.forwardRef((e,n)=>{var f;const{container:o,...a}=e,[s,u]=g.useState(!1);xs(()=>u(!0),[]);const c=o||s&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return c?xj.createPortal(x.jsx(Yt.div,{...a,ref:n}),c):null});Fw.displayName=Bj;function Wj(e,n){return g.useReducer((o,a)=>n[o][a]??o,e)}var Is=e=>{const{present:n,children:o}=e,a=qj(n),s=typeof o=="function"?o({present:a.isPresent}):g.Children.only(o),u=ln(a.ref,Vj(s));return typeof o=="function"||a.isPresent?g.cloneElement(s,{ref:u}):null};Is.displayName="Presence";function qj(e){const[n,o]=g.useState(),a=g.useRef(null),s=g.useRef(e),u=g.useRef("none"),c=e?"mounted":"unmounted",[f,p]=Wj(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=Zl(a.current);u.current=f==="mounted"?h:"none"},[f]),xs(()=>{const h=a.current,v=s.current;if(v!==e){const b=u.current,C=Zl(h);e?p("MOUNT"):C==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(v&&b!==C?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),xs(()=>{if(n){let h;const v=n.ownerDocument.defaultView??window,y=C=>{const S=Zl(a.current).includes(CSS.escape(C.animationName));if(C.target===n&&S&&(p("ANIMATION_END"),!s.current)){const w=n.style.animationFillMode;n.style.animationFillMode="forwards",h=v.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=w)})}},b=C=>{C.target===n&&(u.current=Zl(a.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{v.clearTimeout(h),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:g.useCallback(h=>{a.current=h?getComputedStyle(h):null,o(h)},[])}}function Zl(e){return(e==null?void 0:e.animationName)||"none"}function Vj(e){var a,s;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Lf=0;function Kj(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gg()),document.body.insertAdjacentElement("beforeend",e[1]??Gg()),Lf++,()=>{Lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Lf--}},[])}function Gg(){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 nn=function(){return nn=Object.assign||function(n){for(var o,a=1,s=arguments.length;a<s;a++){o=arguments[a];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(n[u]=o[u])}return n},nn.apply(this,arguments)};function $w(e,n){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(o[a[s]]=e[a[s]]);return o}function Hj(e,n,o){if(o||arguments.length===2)for(var a=0,s=n.length,u;a<s;a++)(u||!(a in n))&&(u||(u=Array.prototype.slice.call(n,0,a)),u[a]=n[a]);return e.concat(u||Array.prototype.slice.call(n))}var mu="right-scroll-bar-position",vu="width-before-scroll-bar",Qj="with-scroll-bars-hidden",Gj="--removed-body-scroll-bar-size";function Ff(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Yj(e,n){var o=g.useState(function(){return{value:e,callback:n,facade:{get current(){return o.value},set current(a){var s=o.value;s!==a&&(o.value=a,o.callback(a,s))}}}})[0];return o.callback=n,o.facade}var Xj=typeof window<"u"?g.useLayoutEffect:g.useEffect,Yg=new WeakMap;function Jj(e,n){var o=Yj(null,function(a){return e.forEach(function(s){return Ff(s,a)})});return Xj(function(){var a=Yg.get(o);if(a){var s=new Set(a),u=new Set(e),c=o.current;s.forEach(function(f){u.has(f)||Ff(f,null)}),u.forEach(function(f){s.has(f)||Ff(f,c)})}Yg.set(o,e)},[e]),o}function Zj(e){return e}function e2(e,n){n===void 0&&(n=Zj);var o=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(u){var c=n(u,a);return o.push(c),function(){o=o.filter(function(f){return f!==c})}},assignSyncMedium:function(u){for(a=!0;o.length;){var c=o;o=[],c.forEach(u)}o={push:function(f){return u(f)},filter:function(){return o}}},assignMedium:function(u){a=!0;var c=[];if(o.length){var f=o;o=[],f.forEach(u),c=o}var p=function(){var v=c;c=[],v.forEach(u)},h=function(){return Promise.resolve().then(p)};h(),o={push:function(v){c.push(v),h()},filter:function(v){return c=c.filter(v),o}}}};return s}function t2(e){e===void 0&&(e={});var n=e2(null);return n.options=nn({async:!0,ssr:!1},e),n}var zw=function(e){var n=e.sideCar,o=$w(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=n.read();if(!a)throw new Error("Sidecar medium not found");return g.createElement(a,nn({},o))};zw.isSideCarExport=!0;function r2(e,n){return e.useMedium(n),zw}var Uw=t2(),$f=function(){},zu=g.forwardRef(function(e,n){var o=g.useRef(null),a=g.useState({onScrollCapture:$f,onWheelCapture:$f,onTouchMoveCapture:$f}),s=a[0],u=a[1],c=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,v=e.enabled,y=e.shards,b=e.sideCar,C=e.noRelative,E=e.noIsolation,S=e.inert,w=e.allowPinchZoom,R=e.as,N=R===void 0?"div":R,O=e.gapMode,T=$w(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=b,A=Jj([o,n]),M=nn(nn({},T),s);return g.createElement(g.Fragment,null,v&&g.createElement($,{sideCar:Uw,removeScrollBar:h,shards:y,noRelative:C,noIsolation:E,inert:S,setCallbacks:u,allowPinchZoom:!!w,lockRef:o,gapMode:O}),c?g.cloneElement(g.Children.only(f),nn(nn({},M),{ref:A})):g.createElement(N,nn({},M,{className:p,ref:A}),f))});zu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zu.classNames={fullWidth:vu,zeroRight:mu};var n2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function o2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=n2();return n&&e.setAttribute("nonce",n),e}function i2(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function a2(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var s2=function(){var e=0,n=null;return{add:function(o){e==0&&(n=o2())&&(i2(n,o),a2(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},l2=function(){var e=s2();return function(n,o){g.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&o])}},Bw=function(){var e=l2(),n=function(o){var a=o.styles,s=o.dynamic;return e(a,s),null};return n},u2={left:0,top:0,right:0,gap:0},zf=function(e){return parseInt(e||"",10)||0},c2=function(e){var n=window.getComputedStyle(document.body),o=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],s=n[e==="padding"?"paddingRight":"marginRight"];return[zf(o),zf(a),zf(s)]},d2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return u2;var n=c2(e),o=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-o+n[2]-n[0])}},f2=Bw(),Qi="data-scroll-locked",p2=function(e,n,o,a){var s=e.left,u=e.top,c=e.right,f=e.gap;return o===void 0&&(o="margin"),`
168
+ .`.concat(Qj,` {
169
+ overflow: hidden `).concat(a,`;
170
+ padding-right: `).concat(f,"px ").concat(a,`;
171
+ }
172
+ body[`).concat(Qi,`] {
173
+ overflow: hidden `).concat(a,`;
174
+ overscroll-behavior: contain;
175
+ `).concat([n&&"position: relative ".concat(a,";"),o==="margin"&&`
176
+ padding-left: `.concat(s,`px;
177
+ padding-top: `).concat(u,`px;
178
+ padding-right: `).concat(c,`px;
179
+ margin-left:0;
180
+ margin-top:0;
181
+ margin-right: `).concat(f,"px ").concat(a,`;
182
+ `),o==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
183
+ }
184
+
185
+ .`).concat(mu,` {
186
+ right: `).concat(f,"px ").concat(a,`;
187
+ }
188
+
189
+ .`).concat(vu,` {
190
+ margin-right: `).concat(f,"px ").concat(a,`;
191
+ }
192
+
193
+ .`).concat(mu," .").concat(mu,` {
194
+ right: 0 `).concat(a,`;
195
+ }
196
+
197
+ .`).concat(vu," .").concat(vu,` {
198
+ margin-right: 0 `).concat(a,`;
199
+ }
200
+
201
+ body[`).concat(Qi,`] {
202
+ `).concat(Gj,": ").concat(f,`px;
203
+ }
204
+ `)},Xg=function(){var e=parseInt(document.body.getAttribute(Qi)||"0",10);return isFinite(e)?e:0},h2=function(){g.useEffect(function(){return document.body.setAttribute(Qi,(Xg()+1).toString()),function(){var e=Xg()-1;e<=0?document.body.removeAttribute(Qi):document.body.setAttribute(Qi,e.toString())}},[])},m2=function(e){var n=e.noRelative,o=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;h2();var u=g.useMemo(function(){return d2(s)},[s]);return g.createElement(f2,{styles:p2(u,!n,s,o?"":"!important")})},pp=!1;if(typeof window<"u")try{var eu=Object.defineProperty({},"passive",{get:function(){return pp=!0,!0}});window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{pp=!1}var zi=pp?{passive:!1}:!1,v2=function(e){return e.tagName==="TEXTAREA"},Ww=function(e,n){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[n]!=="hidden"&&!(o.overflowY===o.overflowX&&!v2(e)&&o[n]==="visible")},y2=function(e){return Ww(e,"overflowY")},g2=function(e){return Ww(e,"overflowX")},Jg=function(e,n){var o=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=qw(e,a);if(s){var u=Vw(e,a),c=u[1],f=u[2];if(c>f)return!0}a=a.parentNode}while(a&&a!==o.body);return!1},x2=function(e){var n=e.scrollTop,o=e.scrollHeight,a=e.clientHeight;return[n,o,a]},w2=function(e){var n=e.scrollLeft,o=e.scrollWidth,a=e.clientWidth;return[n,o,a]},qw=function(e,n){return e==="v"?y2(n):g2(n)},Vw=function(e,n){return e==="v"?x2(n):w2(n)},b2=function(e,n){return e==="h"&&n==="rtl"?-1:1},S2=function(e,n,o,a,s){var u=b2(e,window.getComputedStyle(n).direction),c=u*a,f=o.target,p=n.contains(f),h=!1,v=c>0,y=0,b=0;do{if(!f)break;var C=Vw(e,f),E=C[0],S=C[1],w=C[2],R=S-w-u*E;(E||R)&&qw(e,f)&&(y+=R,b+=E);var N=f.parentNode;f=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(v&&Math.abs(y)<1||!v&&Math.abs(b)<1)&&(h=!0),h},tu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zg=function(e){return[e.deltaX,e.deltaY]},e0=function(e){return e&&"current"in e?e.current:e},C2=function(e,n){return e[0]===n[0]&&e[1]===n[1]},E2=function(e){return`
205
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
206
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
207
+ `)},k2=0,Ui=[];function R2(e){var n=g.useRef([]),o=g.useRef([0,0]),a=g.useRef(),s=g.useState(k2++)[0],u=g.useState(Bw)[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var S=Hj([e.lockRef.current],(e.shards||[]).map(e0),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=g.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var R=tu(S),N=o.current,O="deltaX"in S?S.deltaX:N[0]-R[0],T="deltaY"in S?S.deltaY:N[1]-R[1],$,A=S.target,M=Math.abs(O)>Math.abs(T)?"h":"v";if("touches"in S&&M==="h"&&A.type==="range")return!1;var P=window.getSelection(),_=P&&P.anchorNode,D=_?_===A||_.contains(A):!1;if(D)return!1;var H=Jg(M,A);if(!H)return!0;if(H?$=M:($=M==="v"?"h":"v",H=Jg(M,A)),!H)return!1;if(!a.current&&"changedTouches"in S&&(O||T)&&(a.current=$),!$)return!0;var W=a.current||$;return S2(W,w,S,W==="h"?O:T)},[]),p=g.useCallback(function(S){var w=S;if(!(!Ui.length||Ui[Ui.length-1]!==u)){var R="deltaY"in w?Zg(w):tu(w),N=n.current.filter(function($){return $.name===w.type&&($.target===w.target||w.target===$.shadowParent)&&C2($.delta,R)})[0];if(N&&N.should){w.cancelable&&w.preventDefault();return}if(!N){var O=(c.current.shards||[]).map(e0).filter(Boolean).filter(function($){return $.contains(w.target)}),T=O.length>0?f(w,O[0]):!c.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),h=g.useCallback(function(S,w,R,N){var O={name:S,delta:w,target:R,should:N,shadowParent:P2(R)};n.current.push(O),setTimeout(function(){n.current=n.current.filter(function(T){return T!==O})},1)},[]),v=g.useCallback(function(S){o.current=tu(S),a.current=void 0},[]),y=g.useCallback(function(S){h(S.type,Zg(S),S.target,f(S,e.lockRef.current))},[]),b=g.useCallback(function(S){h(S.type,tu(S),S.target,f(S,e.lockRef.current))},[]);g.useEffect(function(){return Ui.push(u),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:b}),document.addEventListener("wheel",p,zi),document.addEventListener("touchmove",p,zi),document.addEventListener("touchstart",v,zi),function(){Ui=Ui.filter(function(S){return S!==u}),document.removeEventListener("wheel",p,zi),document.removeEventListener("touchmove",p,zi),document.removeEventListener("touchstart",v,zi)}},[]);var C=e.removeScrollBar,E=e.inert;return g.createElement(g.Fragment,null,E?g.createElement(u,{styles:E2(s)}):null,C?g.createElement(m2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function P2(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const N2=r2(Uw,R2);var Kw=g.forwardRef(function(e,n){return g.createElement(zu,nn({},e,{ref:n,sideCar:N2}))});Kw.classNames=zu.classNames;var _2=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Bi=new WeakMap,ru=new WeakMap,nu={},Uf=0,Hw=function(e){return e&&(e.host||Hw(e.parentNode))},O2=function(e,n){return n.map(function(o){if(e.contains(o))return o;var a=Hw(o);return a&&e.contains(a)?a:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},T2=function(e,n,o,a){var s=O2(n,Array.isArray(e)?e:[e]);nu[o]||(nu[o]=new WeakMap);var u=nu[o],c=[],f=new Set,p=new Set(s),h=function(y){!y||f.has(y)||(f.add(y),h(y.parentNode))};s.forEach(h);var v=function(y){!y||p.has(y)||Array.prototype.forEach.call(y.children,function(b){if(f.has(b))v(b);else try{var C=b.getAttribute(a),E=C!==null&&C!=="false",S=(Bi.get(b)||0)+1,w=(u.get(b)||0)+1;Bi.set(b,S),u.set(b,w),c.push(b),S===1&&E&&ru.set(b,!0),w===1&&b.setAttribute(o,"true"),E||b.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",b,R)}})};return v(n),f.clear(),Uf++,function(){c.forEach(function(y){var b=Bi.get(y)-1,C=u.get(y)-1;Bi.set(y,b),u.set(y,C),b||(ru.has(y)||y.removeAttribute(a),ru.delete(y)),C||y.removeAttribute(o)}),Uf--,Uf||(Bi=new WeakMap,Bi=new WeakMap,ru=new WeakMap,nu={})}},j2=function(e,n,o){o===void 0&&(o="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=_2(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),T2(a,s,o,"aria-hidden")):function(){return null}},Uu="Dialog",[Qw,zI]=$u(Uu),[A2,Vr]=Qw(Uu),Gw=e=>{const{__scopeDialog:n,children:o,open:a,defaultOpen:s,onOpenChange:u,modal:c=!0}=e,f=g.useRef(null),p=g.useRef(null),[h,v]=Qp({prop:a,defaultProp:s??!1,onChange:u,caller:Uu});return x.jsx(A2,{scope:n,triggerRef:f,contentRef:p,contentId:ds(),titleId:ds(),descriptionId:ds(),open:h,onOpenChange:v,onOpenToggle:g.useCallback(()=>v(y=>!y),[v]),modal:c,children:o})};Gw.displayName=Uu;var Yw="DialogTrigger",I2=g.forwardRef((e,n)=>{const{__scopeDialog:o,...a}=e,s=Vr(Yw,o),u=ln(n,s.triggerRef);return x.jsx(Yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Xp(s.open),...a,ref:u,onClick:It(e.onClick,s.onOpenToggle)})});I2.displayName=Yw;var Gp="DialogPortal",[M2,Xw]=Qw(Gp,{forceMount:void 0}),Jw=e=>{const{__scopeDialog:n,forceMount:o,children:a,container:s}=e,u=Vr(Gp,n);return x.jsx(M2,{scope:n,forceMount:o,children:g.Children.map(a,c=>x.jsx(Is,{present:o||u.open,children:x.jsx(Fw,{asChild:!0,container:s,children:c})}))})};Jw.displayName=Gp;var ku="DialogOverlay",Zw=g.forwardRef((e,n)=>{const o=Xw(ku,e.__scopeDialog),{forceMount:a=o.forceMount,...s}=e,u=Vr(ku,e.__scopeDialog);return u.modal?x.jsx(Is,{present:a||u.open,children:x.jsx(L2,{...s,ref:n})}):null});Zw.displayName=ku;var D2=Eu("DialogOverlay.RemoveScroll"),L2=g.forwardRef((e,n)=>{const{__scopeDialog:o,...a}=e,s=Vr(ku,o);return x.jsx(Kw,{as:D2,allowPinchZoom:!0,shards:[s.contentRef],children:x.jsx(Yt.div,{"data-state":Xp(s.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),ui="DialogContent",eb=g.forwardRef((e,n)=>{const o=Xw(ui,e.__scopeDialog),{forceMount:a=o.forceMount,...s}=e,u=Vr(ui,e.__scopeDialog);return x.jsx(Is,{present:a||u.open,children:u.modal?x.jsx(F2,{...s,ref:n}):x.jsx($2,{...s,ref:n})})});eb.displayName=ui;var F2=g.forwardRef((e,n)=>{const o=Vr(ui,e.__scopeDialog),a=g.useRef(null),s=ln(n,o.contentRef,a);return g.useEffect(()=>{const u=a.current;if(u)return j2(u)},[]),x.jsx(tb,{...e,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:It(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=o.triggerRef.current)==null||c.focus()}),onPointerDownOutside:It(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&u.preventDefault()}),onFocusOutside:It(e.onFocusOutside,u=>u.preventDefault())})}),$2=g.forwardRef((e,n)=>{const o=Vr(ui,e.__scopeDialog),a=g.useRef(!1),s=g.useRef(!1);return x.jsx(tb,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var c,f;(c=e.onCloseAutoFocus)==null||c.call(e,u),u.defaultPrevented||(a.current||(f=o.triggerRef.current)==null||f.focus(),u.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:u=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=u.target;((h=o.triggerRef.current)==null?void 0:h.contains(c))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),tb=g.forwardRef((e,n)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:u,...c}=e,f=Vr(ui,o),p=g.useRef(null),h=ln(n,p);return Kj(),x.jsxs(x.Fragment,{children:[x.jsx(Dw,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:u,children:x.jsx(Iw,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Xp(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(z2,{titleId:f.titleId}),x.jsx(B2,{contentRef:p,descriptionId:f.descriptionId})]})]})}),Yp="DialogTitle",rb=g.forwardRef((e,n)=>{const{__scopeDialog:o,...a}=e,s=Vr(Yp,o);return x.jsx(Yt.h2,{id:s.titleId,...a,ref:n})});rb.displayName=Yp;var nb="DialogDescription",ob=g.forwardRef((e,n)=>{const{__scopeDialog:o,...a}=e,s=Vr(nb,o);return x.jsx(Yt.p,{id:s.descriptionId,...a,ref:n})});ob.displayName=nb;var ib="DialogClose",ab=g.forwardRef((e,n)=>{const{__scopeDialog:o,...a}=e,s=Vr(ib,o);return x.jsx(Yt.button,{type:"button",...a,ref:n,onClick:It(e.onClick,()=>s.onOpenChange(!1))})});ab.displayName=ib;function Xp(e){return e?"open":"closed"}var sb="DialogTitleWarning",[UI,lb]=fj(sb,{contentName:ui,titleName:Yp,docsSlug:"dialog"}),z2=({titleId:e})=>{const n=lb(sb),o=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
208
+
209
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
210
+
211
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},U2="DialogDescriptionWarning",B2=({contentRef:e,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lb(U2).contentName}}.`;return g.useEffect(()=>{var u;const s=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");n&&s&&(document.getElementById(n)||console.warn(a))},[a,e,n]),null},W2=Gw,q2=Jw,ub=Zw,cb=eb,db=rb,fb=ob,V2=ab;const Ru=W2,K2=q2,pb=g.forwardRef(function({className:n,...o},a){return x.jsx(ub,{ref:a,className:Ge("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",n),...o})});pb.displayName=ub.displayName;const ws=g.forwardRef(function({className:n,children:o,showCloseButton:a=!0,...s},u){return x.jsxs(K2,{children:[x.jsx(pb,{}),x.jsxs(cb,{ref:u,className:Ge("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",n),...s,children:[o,a?x.jsxs(V2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(cT,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]}):null]})]})});ws.displayName=cb.displayName;const bs=({className:e,...n})=>x.jsx("div",{className:Ge("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});bs.displayName="DialogHeader";const Ss=({className:e,...n})=>x.jsx("div",{className:Ge("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Ss.displayName="DialogFooter";const Cs=g.forwardRef(function({className:n,...o},a){return x.jsx(db,{ref:a,className:Ge("text-lg font-semibold leading-none tracking-tight",n),...o})});Cs.displayName=db.displayName;const Es=g.forwardRef(function({className:n,...o},a){return x.jsx(fb,{ref:a,className:Ge("text-sm text-muted-foreground",n),...o})});Es.displayName=fb.displayName;const At=g.forwardRef(function({className:n,type:o,...a},s){return x.jsx("input",{type:o,className:Ge("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:s,...a})});At.displayName="Input";var H2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q2=H2.reduce((e,n)=>{const o=mw(`Primitive.${n}`),a=g.forwardRef((s,u)=>{const{asChild:c,...f}=s,p=c?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...f,ref:u})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),G2="Label",hb=g.forwardRef((e,n)=>x.jsx(Q2.label,{...e,ref:n,onMouseDown:o=>{var s;o.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));hb.displayName=G2;var mb=hb;const Y2=Vp("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),on=g.forwardRef(function({className:n,...o},a){return x.jsx(mb,{ref:a,className:Ge(Y2(),n),...o})});on.displayName=mb.displayName;const Bf={name:"",url:"",apiKey:""};function X2({open:e,onOpenChange:n}){const[o,a]=g.useState([]),[s,u]=g.useState(""),[c,f]=g.useState(Bf);g.useEffect(()=>{if(!e)return;const b=pw(),C=Fu();a(b),u(C.id),f(Bf)},[e]);const p=g.useMemo(()=>c.name.trim()&&c.url.trim(),[c.name,c.url]);function h(){if(!p)return;const b=[...o,{id:pT(),name:c.name.trim(),url:c.url.trim().replace(/\/$/,""),apiKey:c.apiKey.trim()}];Ag(b),a(b),f(Bf)}function v(b){fT(b),window.location.reload()}function y(b){const C=o.filter(E=>E.id!==b);if(C.length!==0){if(Ag(C),s===b){v(C[0].id);return}a(C),u(E=>E===b?C[0].id:E)}}return x.jsx(Ru,{open:e,onOpenChange:n,children:x.jsxs(ws,{className:"max-w-2xl",children:[x.jsxs(bs,{children:[x.jsx(Cs,{children:"Servers"}),x.jsx(Es,{children:"Add multiple API servers and choose which one the console should use by default."})]}),x.jsxs("div",{className:"space-y-3",children:[x.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:"Configured Servers"}),x.jsx("div",{className:"space-y-2",children:o.map(b=>{const C=b.id===s;return x.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border px-3 py-2.5",children:[x.jsxs("div",{className:"min-w-0 space-y-0.5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"truncate font-medium text-sm",children:b.name}),C?x.jsx("span",{className:"shrink-0 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-emerald-400",children:"Active"}):null]}),x.jsx("div",{className:"truncate text-xs text-muted-foreground",children:b.url})]}),x.jsxs("div",{className:"flex shrink-0 gap-2",children:[x.jsx(tt,{type:"button",size:"sm",variant:C?"secondary":"outline",onClick:()=>v(b.id),disabled:C,children:C?"Selected":"Use"}),x.jsx(tt,{type:"button",size:"sm",variant:"ghost",className:"text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>y(b.id),disabled:o.length===1,children:"Delete"})]})]},b.id)})})]}),x.jsx("div",{className:"border-t"}),x.jsxs("div",{className:"space-y-4",children:[x.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:"Add Server"}),x.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(on,{htmlFor:"server-name",children:"Name"}),x.jsx(At,{id:"server-name",value:c.name,onChange:b=>f(C=>({...C,name:b.target.value})),placeholder:"Production"})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(on,{htmlFor:"server-url",children:"URL"}),x.jsx(At,{id:"server-url",value:c.url,onChange:b=>f(C=>({...C,url:b.target.value})),placeholder:"https://..."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(on,{htmlFor:"server-api-key",children:"API Key"}),x.jsx(At,{id:"server-api-key",value:c.apiKey,onChange:b=>f(C=>({...C,apiKey:b.target.value})),placeholder:"Optional"})]})]}),x.jsx(Ss,{className:"sm:justify-start",children:x.jsx(tt,{type:"button",onClick:h,disabled:!p,children:"Add Server"})})]})]})})}const an=g.forwardRef(function({className:n,...o},a){return x.jsx("div",{ref:a,className:Ge("rounded-xl border bg-card text-card-foreground shadow",n),...o})});an.displayName="Card";const No=g.forwardRef(function({className:n,...o},a){return x.jsx("div",{ref:a,className:Ge("flex flex-col space-y-1.5 p-6",n),...o})});No.displayName="CardHeader";const _o=g.forwardRef(function({className:n,...o},a){return x.jsx("h3",{ref:a,className:Ge("text-2xl font-semibold leading-none tracking-tight",n),...o})});_o.displayName="CardTitle";const Br=g.forwardRef(function({className:n,...o},a){return x.jsx("p",{ref:a,className:Ge("text-sm text-muted-foreground",n),...o})});Br.displayName="CardDescription";const sn=g.forwardRef(function({className:n,...o},a){return x.jsx("div",{ref:a,className:Ge("p-6 pt-0",n),...o})});sn.displayName="CardContent";const J2=g.forwardRef(function({className:n,...o},a){return x.jsx("div",{ref:a,className:Ge("flex items-center p-6 pt-0",n),...o})});J2.displayName="CardFooter";const Z2=[{to:"/",label:"Overview",icon:oT},{to:"/sandboxes",label:"Sandboxes",icon:QO},{to:"/images",label:"Images",icon:rT}];function eA(e,n){return n==="/"?e===n:e===n||e.startsWith(`${n}/`)}function tA({children:e}){const n=Nr(),[o,a]=g.useState(!1),s=g.useMemo(()=>Fu(),[]);return x.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[x.jsxs("div",{className:"mx-auto flex min-h-screen w-full max-w-[1600px] flex-col gap-4 p-4 lg:grid lg:grid-cols-[280px_minmax(0,1fr)] lg:p-6",children:[x.jsx("aside",{className:"min-w-0",children:x.jsxs(an,{className:"border-border/80 bg-card/95 shadow-2xl shadow-black/20 backdrop-blur",children:[x.jsxs(No,{className:"space-y-4 border-b border-border/80 pb-5",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx(Br,{className:"text-[0.7rem] font-semibold uppercase tracking-[0.28em] text-muted-foreground/80",children:"Sandbox Console"}),x.jsx(_o,{className:"text-xl",children:"Control Plane"})]}),x.jsx(Br,{className:"max-w-xs text-sm leading-6",children:"Inspect sandboxes and images from one console."})]}),x.jsx(sn,{className:"p-3",children:x.jsx("nav",{className:"flex flex-col gap-1","aria-label":"Primary",children:Z2.map(u=>{const c=u.icon,f=eA(n.pathname,u.to);return x.jsx(tt,{asChild:!0,variant:f?"secondary":"ghost",className:Ge("h-11 w-full justify-start gap-3 rounded-lg px-3 text-sm",f?"bg-secondary text-secondary-foreground shadow-sm shadow-black/10":"text-muted-foreground hover:bg-accent/70 hover:text-accent-foreground"),children:x.jsxs(Po,{"aria-current":f?"page":void 0,to:u.to,children:[x.jsx(c,{className:"h-4 w-4"}),x.jsx("span",{children:u.label})]})},u.to)})})})]})}),x.jsx("main",{className:"min-w-0",children:x.jsxs("div",{className:"flex min-h-full flex-col gap-4",children:[x.jsx("header",{className:"rounded-xl border border-border/80 bg-background/80 px-5 py-4 shadow-lg shadow-black/10 backdrop-blur",children:x.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx("div",{className:"text-[0.7rem] font-semibold uppercase tracking-[0.28em] text-muted-foreground/80",children:"Active Workspace"}),x.jsx("div",{className:"text-sm text-muted-foreground",children:"Navigate sandboxes and images from the console shell."})]}),x.jsxs("div",{className:"flex items-center gap-2 self-start sm:self-auto",children:[x.jsxs(tt,{type:"button",variant:"outline",className:"h-auto items-center gap-3 rounded-lg border-border/80 bg-card/70 px-3 py-2 text-left",onClick:()=>a(!0),children:[x.jsx(sT,{className:"h-4 w-4 text-muted-foreground"}),x.jsxs("span",{className:"flex flex-col items-start",children:[x.jsx("span",{className:"text-[0.62rem] font-semibold uppercase tracking-[0.22em] text-muted-foreground/80",children:"Server"}),x.jsx("span",{className:"max-w-[180px] truncate text-sm font-medium text-foreground",children:s.name})]})]}),x.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/80 bg-card/70 px-3 py-2 text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground",children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400","aria-hidden":"true"}),"Dark Console"]})]})]})}),x.jsx("div",{className:"min-w-0 flex-1 rounded-xl border border-border/70 bg-card/40 p-0 shadow-inner shadow-black/10",children:x.jsx("div",{className:"min-w-0 p-4 sm:p-6",children:e})})]})})]}),x.jsx(X2,{open:o,onOpenChange:a})]})}function ga(e){return encodeURIComponent(e)}async function rA(e){if(!(e.headers.get("content-type")??"").includes("application/json"))return;const o=await e.text();if(o)return JSON.parse(o)}function nA(e){const n=new Headers(e==null?void 0:e.headers),{apiKey:o}=Fu();return o&&!n.has("authorization")&&n.set("authorization",`Bearer ${o}`),(e==null?void 0:e.body)!==void 0&&!n.has("content-type")&&n.set("content-type","application/json"),n}async function Kr(e,n){var f;const{headers:o,...a}=n??{},{url:s}=Fu(),u=await fetch(`${s}${e}`,{...a,headers:nA({...a,headers:o})}),c=await rA(u);if(!u.ok){const p=new Error(((f=c==null?void 0:c.error)==null?void 0:f.message)??`Request failed: ${u.status}`);throw p.status=u.status,p}return c==null?void 0:c.data}function vb(){return Kr("/api/sandboxes")}function yb(){return Kr("/api/images")}function oA(e){return Kr(`/api/sandboxes/${ga(e)}`,{method:"GET"})}function iA(e){const{name:n,...o}=e;return Kr(`/api/sandboxes/${ga(n)}`,{method:"PUT",body:JSON.stringify(o)})}function aA(e){return Kr(`/api/sandboxes/${ga(e)}/start`,{method:"POST"})}function t0(e){return Kr(`/api/sandboxes/${ga(e)}/stop`,{method:"POST"})}function r0(e){return Kr(`/api/sandboxes/${ga(e)}`,{method:"DELETE"})}function sA(e,n,o){return Kr("/api/files/list",{method:"POST",body:JSON.stringify({sandboxName:e,path:n,recursive:o})})}function lA(e,n){return Kr("/api/files/read",{method:"POST",body:JSON.stringify({sandboxName:e,path:n})})}function uA(e){return Kr("/api/shell/exec",{method:"POST",body:JSON.stringify(e)})}function cA(e,n){return Kr(`/api/sandboxes/${ga(e)}/logs`,{method:"POST",body:JSON.stringify(n)})}const Bu=g.forwardRef(function({className:n,...o},a){return x.jsx("div",{className:"w-full overflow-auto",children:x.jsx("table",{ref:a,className:Ge("w-full caption-bottom text-sm",n),...o})})});Bu.displayName="Table";const Wu=g.forwardRef(function({className:n,...o},a){return x.jsx("thead",{ref:a,className:Ge("[&_tr]:border-b",n),...o})});Wu.displayName="TableHeader";const qu=g.forwardRef(function({className:n,...o},a){return x.jsx("tbody",{ref:a,className:Ge("[&_tr:last-child]:border-0",n),...o})});qu.displayName="TableBody";const dA=g.forwardRef(function({className:n,...o},a){return x.jsx("tfoot",{ref:a,className:Ge("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",n),...o})});dA.displayName="TableFooter";const Tn=g.forwardRef(function({className:n,...o},a){return x.jsx("tr",{ref:a,className:Ge("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n),...o})});Tn.displayName="TableRow";const mr=g.forwardRef(function({className:n,...o},a){return x.jsx("th",{ref:a,className:Ge("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",n),...o})});mr.displayName="TableHead";const Qt=g.forwardRef(function({className:n,...o},a){return x.jsx("td",{ref:a,className:Ge("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...o})});Qt.displayName="TableCell";const fA=g.forwardRef(function({className:n,...o},a){return x.jsx("caption",{ref:a,className:Ge("mt-4 text-sm text-muted-foreground",n),...o})});fA.displayName="TableCaption";function pA(e){return e?"Cached":"Not Cached"}function hA({images:e}){const[n,o]=g.useState(""),a=e.filter(u=>u.ref.toLowerCase().includes(n.toLowerCase())),s=n.trim()?"No images match this search.":"No images have been discovered yet.";return x.jsxs("div",{className:"space-y-5 p-6",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-semibold",children:"Images"}),x.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Registry and cache inventory for sandbox base images."})]}),x.jsxs("div",{className:"max-w-sm space-y-2",children:[x.jsx(on,{htmlFor:"image-search-input",children:"Search images"}),x.jsx(At,{id:"image-search-input",placeholder:"Search images",value:n,onChange:u=>o(u.target.value)})]}),x.jsx("div",{className:"overflow-hidden rounded-xl border bg-card",children:x.jsxs(Bu,{children:[x.jsx(Wu,{className:"bg-muted/40",children:x.jsxs(Tn,{className:"hover:bg-transparent",children:[x.jsx(mr,{className:"px-4",children:"Reference"}),x.jsx(mr,{className:"px-4",children:"Source"}),x.jsx(mr,{className:"px-4",children:"Cache"})]})}),x.jsxs(qu,{children:[a.map(u=>x.jsxs(Tn,{children:[x.jsx(Qt,{className:"px-4 py-3 font-medium text-foreground",children:u.ref}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:u.sourceType}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:pA(u.cached)})]},u.ref)),a.length===0?x.jsx(Tn,{children:x.jsx(Qt,{className:"px-4 py-6 text-center text-muted-foreground",colSpan:3,children:s})}):null]})]})})]})}function mA({sandboxes:e,images:n}){const o=e.items.filter(u=>u.status==="running").length,a=e.items.filter(u=>u.status==="stopped").length,s=[{label:"Running Sandboxes",value:String(o),description:"Live environments currently available for interactive work."},{label:"Stopped Sandboxes",value:String(a),description:"Provisioned sandboxes that can be resumed or inspected later."},{label:"Known Images",value:String(n.total),description:"Container images currently tracked by the workspace catalog."}];return x.jsx("div",{className:"space-y-6 p-6",children:x.jsxs(an,{className:"border-border/80 bg-card/95 shadow-xl shadow-black/10",children:[x.jsxs(No,{className:"gap-4 border-b border-border/80 pb-5 sm:flex-row sm:items-end sm:justify-between",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(Br,{className:"text-[0.7rem] font-semibold uppercase tracking-[0.28em] text-muted-foreground/80",children:"Sandbox Console"}),x.jsxs("div",{className:"space-y-1",children:[x.jsx(_o,{className:"text-3xl",children:"Overview"}),x.jsx(Br,{className:"max-w-2xl text-sm leading-6",children:"Operational summary for active sandboxes, parked environments, and available images."})]})]}),x.jsxs("div",{className:"flex flex-wrap gap-3",children:[x.jsx(tt,{asChild:!0,children:x.jsx(Po,{to:"/sandboxes",children:"Open Sandboxes"})}),x.jsx(tt,{asChild:!0,variant:"outline",children:x.jsx(Po,{to:"/images",children:"Open Images"})})]})]}),x.jsx(sn,{className:"grid gap-4 p-6 md:grid-cols-3",children:s.map(u=>x.jsxs(an,{className:"border-border/70 bg-background/60 shadow-sm shadow-black/10",children:[x.jsxs(No,{className:"pb-3",children:[x.jsx(Br,{className:"text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground/80",children:u.label}),x.jsx(_o,{className:"text-3xl",children:u.value})]}),x.jsx(sn,{children:x.jsx("p",{className:"text-sm text-muted-foreground",children:u.description})})]},u.label))})]})})}function vA(e){const n=e+"CollectionProvider",[o,a]=$u(n),[s,u]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:w,children:R}=S,N=ie.useRef(null),O=ie.useRef(new Map).current;return x.jsx(s,{scope:w,itemMap:O,collectionRef:N,children:R})};c.displayName=n;const f=e+"CollectionSlot",p=Eu(f),h=ie.forwardRef((S,w)=>{const{scope:R,children:N}=S,O=u(f,R),T=ln(w,O.collectionRef);return x.jsx(p,{ref:T,children:N})});h.displayName=f;const v=e+"CollectionItemSlot",y="data-radix-collection-item",b=Eu(v),C=ie.forwardRef((S,w)=>{const{scope:R,children:N,...O}=S,T=ie.useRef(null),$=ln(w,T),A=u(v,R);return ie.useEffect(()=>(A.itemMap.set(T,{ref:T,...O}),()=>void A.itemMap.delete(T))),x.jsx(b,{[y]:"",ref:$,children:N})});C.displayName=v;function E(S){const w=u(e+"CollectionConsumer",S);return ie.useCallback(()=>{const N=w.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${y}]`));return Array.from(w.itemMap.values()).sort((A,M)=>O.indexOf(A.ref.current)-O.indexOf(M.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:h,ItemSlot:C},E,a]}var yA=g.createContext(void 0);function gb(e){const n=g.useContext(yA);return e||n||"ltr"}var Wf="rovingFocusGroup.onEntryFocus",gA={bubbles:!1,cancelable:!0},Ms="RovingFocusGroup",[hp,xb,xA]=vA(Ms),[wA,wb]=$u(Ms,[xA]),[bA,SA]=wA(Ms),bb=g.forwardRef((e,n)=>x.jsx(hp.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(hp.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(CA,{...e,ref:n})})}));bb.displayName=Ms;var CA=g.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:s=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...y}=e,b=g.useRef(null),C=ln(n,b),E=gb(u),[S,w]=Qp({prop:c,defaultProp:f??null,onChange:p,caller:Ms}),[R,N]=g.useState(!1),O=ca(h),T=xb(o),$=g.useRef(!1),[A,M]=g.useState(0);return g.useEffect(()=>{const P=b.current;if(P)return P.addEventListener(Wf,O),()=>P.removeEventListener(Wf,O)},[O]),x.jsx(bA,{scope:o,orientation:a,dir:E,loop:s,currentTabStopId:S,onItemFocus:g.useCallback(P=>w(P),[w]),onItemShiftTab:g.useCallback(()=>N(!0),[]),onFocusableItemAdd:g.useCallback(()=>M(P=>P+1),[]),onFocusableItemRemove:g.useCallback(()=>M(P=>P-1),[]),children:x.jsx(Yt.div,{tabIndex:R||A===0?-1:0,"data-orientation":a,...y,ref:C,style:{outline:"none",...e.style},onMouseDown:It(e.onMouseDown,()=>{$.current=!0}),onFocus:It(e.onFocus,P=>{const _=!$.current;if(P.target===P.currentTarget&&_&&!R){const D=new CustomEvent(Wf,gA);if(P.currentTarget.dispatchEvent(D),!D.defaultPrevented){const H=T().filter(fe=>fe.focusable),W=H.find(fe=>fe.active),J=H.find(fe=>fe.id===S),xe=[W,J,...H].filter(Boolean).map(fe=>fe.ref.current);Eb(xe,v)}}$.current=!1}),onBlur:It(e.onBlur,()=>N(!1))})})}),Sb="RovingFocusGroupItem",Cb=g.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:s=!1,tabStopId:u,children:c,...f}=e,p=ds(),h=u||p,v=SA(Sb,o),y=v.currentTabStopId===h,b=xb(o),{onFocusableItemAdd:C,onFocusableItemRemove:E,currentTabStopId:S}=v;return g.useEffect(()=>{if(a)return C(),()=>E()},[a,C,E]),x.jsx(hp.ItemSlot,{scope:o,id:h,focusable:a,active:s,children:x.jsx(Yt.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...f,ref:n,onMouseDown:It(e.onMouseDown,w=>{a?v.onItemFocus(h):w.preventDefault()}),onFocus:It(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:It(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){v.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const R=RA(w,v.orientation,v.dir);if(R!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let O=b().filter(T=>T.focusable).map(T=>T.ref.current);if(R==="last")O.reverse();else if(R==="prev"||R==="next"){R==="prev"&&O.reverse();const T=O.indexOf(w.currentTarget);O=v.loop?PA(O,T+1):O.slice(T+1)}setTimeout(()=>Eb(O))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:S!=null}):c})})});Cb.displayName=Sb;var EA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kA(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function RA(e,n,o){const a=kA(e.key,o);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return EA[a]}function Eb(e,n=!1){const o=document.activeElement;for(const a of e)if(a===o||(a.focus({preventScroll:n}),document.activeElement!==o))return}function PA(e,n){return e.map((o,a)=>e[(n+a)%e.length])}var NA=bb,_A=Cb,Vu="Tabs",[OA,BI]=$u(Vu,[wb]),kb=wb(),[TA,Jp]=OA(Vu),Rb=g.forwardRef((e,n)=>{const{__scopeTabs:o,value:a,onValueChange:s,defaultValue:u,orientation:c="horizontal",dir:f,activationMode:p="automatic",...h}=e,v=gb(f),[y,b]=Qp({prop:a,onChange:s,defaultProp:u??"",caller:Vu});return x.jsx(TA,{scope:o,baseId:ds(),value:y,onValueChange:b,orientation:c,dir:v,activationMode:p,children:x.jsx(Yt.div,{dir:v,"data-orientation":c,...h,ref:n})})});Rb.displayName=Vu;var Pb="TabsList",Nb=g.forwardRef((e,n)=>{const{__scopeTabs:o,loop:a=!0,...s}=e,u=Jp(Pb,o),c=kb(o);return x.jsx(NA,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:a,children:x.jsx(Yt.div,{role:"tablist","aria-orientation":u.orientation,...s,ref:n})})});Nb.displayName=Pb;var _b="TabsTrigger",Ob=g.forwardRef((e,n)=>{const{__scopeTabs:o,value:a,disabled:s=!1,...u}=e,c=Jp(_b,o),f=kb(o),p=Ab(c.baseId,a),h=Ib(c.baseId,a),v=a===c.value;return x.jsx(_A,{asChild:!0,...f,focusable:!s,active:v,children:x.jsx(Yt.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:p,...u,ref:n,onMouseDown:It(e.onMouseDown,y=>{!s&&y.button===0&&y.ctrlKey===!1?c.onValueChange(a):y.preventDefault()}),onKeyDown:It(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(a)}),onFocus:It(e.onFocus,()=>{const y=c.activationMode!=="manual";!v&&!s&&y&&c.onValueChange(a)})})})});Ob.displayName=_b;var Tb="TabsContent",jb=g.forwardRef((e,n)=>{const{__scopeTabs:o,value:a,forceMount:s,children:u,...c}=e,f=Jp(Tb,o),p=Ab(f.baseId,a),h=Ib(f.baseId,a),v=a===f.value,y=g.useRef(v);return g.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),x.jsx(Is,{present:s||v,children:({present:b})=>x.jsx(Yt.div,{"data-state":v?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:h,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:y.current?"0s":void 0},children:b&&u})})});jb.displayName=Tb;function Ab(e,n){return`${e}-trigger-${n}`}function Ib(e,n){return`${e}-content-${n}`}var jA=Rb,Mb=Nb,Db=Ob,Lb=jb;const AA=jA,Fb=g.forwardRef(function({className:n,...o},a){return x.jsx(Mb,{ref:a,className:Ge("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n),...o})});Fb.displayName=Mb.displayName;const $b=g.forwardRef(function({className:n,...o},a){return x.jsx(Db,{ref:a,className:Ge("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 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",n),...o})});$b.displayName=Db.displayName;const Vi=g.forwardRef(function({className:n,...o},a){return x.jsx(Lb,{ref:a,className:Ge("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...o})});Vi.displayName=Lb.displayName;function IA(e){if(!e)return{};if(!Array.isArray(e))return e;const n={};for(const o of e)Array.isArray(o)&&o.length>=2&&(n[String(o[0])]=String(o[1]));return n}function zb(e){var n;return e===void 0?"-":typeof e=="string"?e:"Oci"in e&&((n=e.Oci)!=null&&n.reference)?e.Oci.reference:"Disk"in e&&e.Disk?e.Disk:"Path"in e&&e.Path?e.Path:"-"}function MA({result:e,onRun:n,isRunning:o,errorMessage:a}){const[s,u]=g.useState(""),c=s.trim(),f=!o&&!!c,p=()=>{f&&n(c)};return x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex gap-2",children:[x.jsx("label",{className:"sr-only",htmlFor:"exec-command-input",children:"Command"}),x.jsx(At,{id:"exec-command-input",value:s,onChange:h=>u(h.target.value),placeholder:"pwd",className:"flex-1 border-border/70 bg-background/80"}),x.jsx(tt,{onClick:p,disabled:!f,children:o?"Running...":"Run"})]}),a?x.jsx("div",{role:"alert",className:"rounded-md border border-red-800 bg-red-950/40 px-3 py-2 text-sm text-red-200",children:a}):null,x.jsx(an,{className:"border-border/70 bg-background/40 shadow-sm",children:x.jsxs(sn,{className:"space-y-3 p-4",children:[x.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:["exit code ",(e==null?void 0:e.exitCode)??"-"]}),x.jsxs("div",{className:"space-y-1",children:[x.jsx("div",{className:"text-[11px] uppercase tracking-[0.16em] text-muted-foreground",children:"stdout"}),x.jsx("pre",{className:"min-h-12 whitespace-pre-wrap rounded-md bg-muted/30 px-3 py-3 font-mono text-xs text-foreground",children:e==null?void 0:e.stdout})]}),e!=null&&e.stderr?x.jsxs("div",{className:"space-y-1",children:[x.jsx("div",{className:"text-[11px] uppercase tracking-[0.16em] text-muted-foreground",children:"stderr"}),x.jsx("pre",{className:"whitespace-pre-wrap rounded-md border border-red-500/20 bg-red-950/20 px-3 py-3 font-mono text-xs text-red-300",children:e.stderr})]}):null]})})]})}function DA({files:e,content:n,previewFile:o,onPreviewFile:a}){const s=o??e[0]??"";return x.jsxs("div",{className:"grid gap-4 lg:grid-cols-[240px_1fr]",children:[x.jsxs(an,{className:"border-border shadow-none",children:[x.jsx(No,{className:"px-3 py-2.5",children:x.jsx(_o,{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Files"})}),x.jsx(sn,{className:"space-y-1 px-2 pb-2 pt-0 text-sm",children:e.map(u=>x.jsx(tt,{type:"button","aria-current":s===u?"true":void 0,variant:"ghost",className:Ge("h-auto w-full justify-start rounded-md px-2.5 py-1.5 text-left font-normal text-muted-foreground hover:bg-muted/70",s===u&&"bg-muted shadow-sm ring-1 ring-inset ring-border hover:bg-muted"),onClick:()=>a==null?void 0:a(u),"aria-label":`Switch preview to ${u}`,children:x.jsx("span",{className:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:u})},u))})]}),x.jsxs(an,{className:"border-border shadow-none",children:[x.jsx(No,{className:"px-4 py-3",children:x.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[x.jsx(_o,{className:"shrink-0 text-sm font-medium",children:"Preview"}),x.jsx("div",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s})]})}),x.jsx(sn,{className:"px-0 pb-0 pt-0",children:x.jsx("pre",{className:"overflow-auto border-t border-border px-4 py-4 text-xs leading-6 text-muted-foreground",children:x.jsx("span",{children:n})})})]})]})}function n0({rows:e,emptyMessage:n}){return e.length===0&&n?x.jsx("div",{className:"rounded-lg border border-dashed border-border/70 bg-background/40 px-4 py-6 text-sm text-muted-foreground",children:n}):x.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:x.jsxs(Bu,{className:"min-w-full text-sm",children:[x.jsx(Wu,{className:"bg-card/60 [&_tr]:border-border",children:x.jsxs(Tn,{className:"hover:bg-transparent",children:[x.jsx(mr,{className:"px-4 py-3 text-muted-foreground",children:"Key"}),x.jsx(mr,{className:"px-4 py-3 text-muted-foreground",children:"Value"})]})}),x.jsx(qu,{className:"[&_tr]:border-border",children:e.map(o=>x.jsxs(Tn,{className:"hover:bg-transparent",children:[x.jsx(Qt,{className:"px-4 py-3",children:o.key}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:o.value})]},o.key))})]})})}const LA=[{key:"system",label:"system",color:"text-cyan-400"},{key:"stdout",label:"stdout",color:"text-green-400"},{key:"stderr",label:"stderr",color:"text-red-400"}];function FA({entries:e,isLoading:n,errorMessage:o,onLoad:a}){const[s,u]=g.useState(["system","stderr"]),[c,f]=g.useState(100),p=v=>{u(y=>{if(y.includes(v)){const b=y.filter(C=>C!==v);return b.length===0?["system","stderr"]:b}return[...y,v]})},h=()=>{a({sources:s,tail:c})};return x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[x.jsx("div",{className:"flex items-center gap-1.5 rounded-lg bg-muted/60 p-1",children:LA.map(v=>x.jsx("button",{type:"button",onClick:()=>p(v.key),className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${s.includes(v.key)?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:x.jsx("span",{className:s.includes(v.key)?v.color:"",children:v.label})},v.key))}),x.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["tail",x.jsx("input",{type:"number",min:1,max:1e4,value:c,onChange:v=>f(Number(v.target.value)||100),className:"w-16 rounded-md border border-border/70 bg-background/80 px-2 py-1 font-mono text-xs"})]}),x.jsx(tt,{onClick:h,disabled:n,variant:"outline",size:"sm",children:n?"Loading...":"Load logs"}),e!==void 0&&x.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," entries"]})]}),o?x.jsx("div",{role:"alert",className:"rounded-md border border-red-800 bg-red-950/40 px-3 py-2 text-sm text-red-200",children:o}):null,x.jsx("div",{className:"max-h-[500px] overflow-auto rounded-md border border-border/70 bg-zinc-950 font-mono text-xs text-green-300",children:e&&e.length>0?x.jsx("div",{className:"p-3",children:e.map((v,y)=>x.jsxs("div",{className:"whitespace-pre-wrap break-all leading-relaxed",children:[x.jsxs("span",{className:"select-none text-zinc-600",children:[v.timestamp," "]}),x.jsxs("span",{className:v.source==="system"?"text-cyan-400":v.source==="stderr"?"text-red-400":"text-green-300",children:["[",v.source,"]"]})," ",v.text]},y))}):e?x.jsx("div",{className:"px-3 py-8 text-center text-zinc-500",children:"No log entries found."}):x.jsx("div",{className:"px-3 py-8 text-center text-zinc-500",children:'Click "Load logs" to fetch sandbox logs.'})})]})}const $A=Vp("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ub=g.forwardRef(function({className:n,variant:o,...a},s){return x.jsx("span",{ref:s,className:Ge($A({variant:o}),n),...a})});Ub.displayName="Badge";const zA={running:{variant:"default"},stopped:{variant:"secondary"},crashed:{variant:"outline",className:"border-red-500/20 bg-red-500/15 text-red-300"},unknown:{variant:"outline",className:"border-amber-500/20 bg-amber-500/15 text-amber-300"}};function Bb({status:e}){const{variant:n,className:o}=zA[e]??{variant:"outline",className:"border-gray-500/20 bg-gray-500/15 text-gray-300"};return x.jsx(Ub,{variant:n,className:o?`capitalize ${o}`:"capitalize",children:e??"unknown"})}const UA=[{key:"files",label:"Files"},{key:"exec",label:"Exec"},{key:"mounts",label:"Mounts"},{key:"env",label:"Env"},{key:"logs",label:"Logs"}];function BA({sandbox:e,files:n,fileContent:o,isFileLoading:a,isMetricsRefreshing:s,previewFile:u,onPreviewFile:c,onRefreshMetrics:f,execResult:p,isExecRunning:h,execErrorMessage:v,fileErrorMessage:y,onRunCommand:b,logEntries:C,isLogLoading:E,logErrorMessage:S,onLoadLogs:w=()=>{}}){const[R,N]=g.useState("files"),O=M=>`sandbox-tab-${M}`,T=M=>`sandbox-panel-${M}`,$=[{label:"CPU",value:e.cpus??"-",description:"Allocated vCPUs"},{label:"Memory",value:e.memoryMib===void 0?"-":`${e.memoryMib} MiB`,description:"Provisioned memory"},{label:"Volumes",value:e.volumeCount,description:"Mounted volumes"}],A=e.metrics;return x.jsxs("div",{className:"space-y-6 p-6",children:[x.jsxs(an,{className:"border-border/80 bg-card/95 shadow-xl shadow-black/10",children:[x.jsxs(No,{className:"gap-4 border-b border-border/80 pb-5 sm:flex-row sm:items-start sm:justify-between",children:[x.jsxs("div",{className:"space-y-3",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx(Br,{className:"text-[0.7rem] font-semibold uppercase tracking-[0.28em] text-muted-foreground/80",children:"Sandbox detail"}),x.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[x.jsx(_o,{className:"text-3xl",children:e.name}),x.jsx(Bb,{status:e.status})]})]}),x.jsx(Br,{className:"max-w-3xl text-sm leading-6",children:"Inspect runtime resources, mounted data, environment variables, and command execution for this sandbox."})]}),x.jsxs("div",{className:"space-y-2 text-left sm:text-right",children:[x.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground/80",children:"Image"}),x.jsx("p",{className:"font-mono text-sm text-foreground/90",children:zb(e.image)})]})]}),x.jsx(sn,{className:"grid gap-3 p-6 md:grid-cols-3",children:$.map(M=>x.jsx("div",{className:"rounded-lg border border-border/70 bg-background/50 px-4 py-4 shadow-sm shadow-black/5",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx(Br,{className:"text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground/80",children:M.label}),x.jsx("div",{className:"text-2xl font-semibold tracking-tight text-foreground",children:M.value}),x.jsx("p",{className:"text-sm text-muted-foreground",children:M.description})]})},M.label))})]}),x.jsxs(an,{className:"border-border/80 bg-card/95 shadow-lg shadow-black/10",children:[x.jsxs(No,{className:"gap-4 border-b border-border/80 pb-5 sm:flex-row sm:items-start sm:justify-between",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(_o,{children:"Runtime Metrics"}),x.jsx(Br,{children:"Live sandbox usage snapshot from microsandbox. Disk and network values are cumulative totals."})]}),x.jsxs("div",{className:"flex items-center gap-3",children:[A?x.jsx("p",{className:"text-xs text-muted-foreground",children:VA(A.timestampMs)}):null,x.jsx(tt,{type:"button",variant:"outline",size:"sm",onClick:f,disabled:s||f===void 0,"aria-label":"Refresh metrics",children:s?"Refreshing...":"Refresh metrics"})]})]}),x.jsx(sn,{className:"p-6",children:A?x.jsx("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[{label:"CPU Usage",value:WA(A.cpuPercent),description:"Current CPU utilization"},{label:"Memory In Use",value:`${Wi(A.memoryBytes)} / ${Wi(A.memoryLimitBytes)}`,description:"Current usage against memory limit"},{label:"Uptime",value:qA(A.uptimeMs),description:"Elapsed running time"},{label:"Disk Read",value:Wi(A.diskReadBytes),description:"Total bytes read from disk"},{label:"Disk Write",value:Wi(A.diskWriteBytes),description:"Total bytes written to disk"},{label:"Network In",value:Wi(A.netRxBytes),description:"Total bytes received"},{label:"Network Out",value:Wi(A.netTxBytes),description:"Total bytes sent"}].map(M=>x.jsx("div",{className:"rounded-lg border border-border/70 bg-background/50 px-4 py-4 shadow-sm shadow-black/5",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx(Br,{className:"text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground/80",children:M.label}),x.jsx("div",{className:"text-2xl font-semibold tracking-tight text-foreground",children:M.value}),x.jsx("p",{className:"text-sm text-muted-foreground",children:M.description})]})},M.label))}):x.jsx("div",{className:"rounded-lg border border-dashed border-border/70 bg-background/40 px-4 py-6 text-sm text-muted-foreground",children:"Runtime metrics are unavailable for this sandbox right now."})})]}),x.jsx(an,{className:"border-border/80 bg-card/95 shadow-lg shadow-black/10",children:x.jsx(sn,{className:"p-4 sm:p-6",children:x.jsxs(AA,{value:R,onValueChange:M=>N(M),className:"space-y-4",children:[x.jsx(Fb,{"aria-label":"Sandbox detail sections",className:"h-auto w-full justify-start gap-2 overflow-x-auto rounded-xl bg-muted/60 p-1",children:UA.map(M=>x.jsx($b,{id:O(M.key),value:M.key,"aria-controls":T(M.key),className:"shrink-0 rounded-lg px-3 py-2",children:M.label},M.key))}),x.jsx(Vi,{value:"files",id:T("files"),"aria-labelledby":O("files"),children:x.jsxs("div",{className:"space-y-3",children:[a?x.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:"Loading file preview..."}):null,y?x.jsx("div",{role:"alert",className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:y}):null,x.jsx(DA,{files:n,content:o,previewFile:u,onPreviewFile:c})]})}),x.jsx(Vi,{value:"exec",id:T("exec"),"aria-labelledby":O("exec"),children:x.jsx(MA,{result:p,onRun:b,isRunning:h,errorMessage:v})}),x.jsx(Vi,{value:"mounts",id:T("mounts"),"aria-labelledby":O("mounts"),children:x.jsx(n0,{rows:Object.entries(e.volumes).map(([M,P])=>({key:M,value:JSON.stringify(P)})),emptyMessage:"No volume mounts configured for this sandbox."})}),x.jsx(Vi,{value:"env",id:T("env"),"aria-labelledby":O("env"),children:x.jsx(n0,{rows:Object.entries(IA(e.env)).map(([M,P])=>({key:M,value:P})),emptyMessage:"No environment variables configured for this sandbox."})}),x.jsx(Vi,{value:"logs",id:T("logs"),"aria-labelledby":O("logs"),children:x.jsx(FA,{entries:C,isLoading:E,errorMessage:S,onLoad:w})})]})})})]})}function Wi(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1024)return`${e} B`;const n=["KiB","MiB","GiB","TiB"];let o=e,a=-1;for(;o>=1024&&a<n.length-1;)o/=1024,a+=1;return`${o>=10?o.toFixed(0):o.toFixed(1)} ${n[a]}`}function WA(e){return Number.isFinite(e)?Number.isInteger(e)?`${e}%`:`${e.toFixed(1)}%`:"-"}function qA(e){if(!Number.isFinite(e)||e<0)return"-";const n=Math.floor(e/1e3),o=Math.floor(n/3600),a=Math.floor(n%3600/60),s=n%60;return o>0?`${o}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function VA(e){if(!Number.isFinite(e)||e<=0)return"Updated recently";const n=Math.max(0,Date.now()-e),o=Math.floor(n/1e3);if(o<60)return`Updated ${o}s ago`;const a=Math.floor(o/60);return a<60?`Updated ${a}m ago`:`Updated ${Math.floor(a/60)}h ago`}function o0(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function KA(...e){return n=>{let o=!1;const a=e.map(s=>{const u=o0(s,n);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let s=0;s<a.length;s++){const u=a[s];typeof u=="function"?u():o0(e[s],null)}}}}function Zp(...e){return g.useCallback(KA(...e),e)}function HA(e,n=[]){let o=[];function a(u,c){const f=g.createContext(c);f.displayName=u+"Context";const p=o.length;o=[...o,c];const h=y=>{var R;const{scope:b,children:C,...E}=y,S=((R=b==null?void 0:b[e])==null?void 0:R[p])||f,w=g.useMemo(()=>E,Object.values(E));return x.jsx(S.Provider,{value:w,children:C})};h.displayName=u+"Provider";function v(y,b){var S;const C=((S=b==null?void 0:b[e])==null?void 0:S[p])||f,E=g.useContext(C);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[h,v]}const s=()=>{const u=o.map(c=>g.createContext(c));return function(f){const p=(f==null?void 0:f[e])||u;return g.useMemo(()=>({[`__scope${e}`]:{...f,[e]:p}}),[f,p])}};return s.scopeName=e,[a,QA(s,...n)]}function QA(...e){const n=e[0];if(e.length===1)return n;const o=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=a.reduce((f,{useScope:p,scopeName:h})=>{const y=p(u)[`__scope${h}`];return{...f,...y}},{});return g.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return o.scopeName=n.scopeName,o}function i0(e,n,{checkForDefaultPrevented:o=!0}={}){return function(s){if(e==null||e(s),o===!1||!s.defaultPrevented)return n==null?void 0:n(s)}}var Pu=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},GA=_s[" useInsertionEffect ".trim().toString()]||Pu;function YA({prop:e,defaultProp:n,onChange:o=()=>{},caller:a}){const[s,u,c]=XA({defaultProp:n,onChange:o}),f=e!==void 0,p=f?e:s;{const v=g.useRef(e!==void 0);g.useEffect(()=>{const y=v.current;y!==f&&console.warn(`${a} is changing from ${y?"controlled":"uncontrolled"} to ${f?"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.`),v.current=f},[f,a])}const h=g.useCallback(v=>{var y;if(f){const b=JA(v)?v(e):v;b!==e&&((y=c.current)==null||y.call(c,b))}else u(v)},[f,e,u,c]);return[p,h]}function XA({defaultProp:e,onChange:n}){const[o,a]=g.useState(e),s=g.useRef(o),u=g.useRef(n);return GA(()=>{u.current=n},[n]),g.useEffect(()=>{var c;s.current!==o&&((c=u.current)==null||c.call(u,o),s.current=o)},[o,s]),[o,a,u]}function JA(e){return typeof e=="function"}function ZA(e){const n=g.useRef({value:e,previous:e});return g.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function eI(e){const[n,o]=g.useState(void 0);return Pu(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let c,f;if("borderBoxSize"in u){const p=u.borderBoxSize,h=Array.isArray(p)?p[0]:p;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;o({width:c,height:f})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else o(void 0)},[e]),n}function tI(e,n){return g.useReducer((o,a)=>n[o][a]??o,e)}var Wb=e=>{const{present:n,children:o}=e,a=rI(n),s=typeof o=="function"?o({present:a.isPresent}):g.Children.only(o),u=nI(a.ref,oI(s));return typeof o=="function"||a.isPresent?g.cloneElement(s,{ref:u}):null};Wb.displayName="Presence";function rI(e){const[n,o]=g.useState(),a=g.useRef(null),s=g.useRef(e),u=g.useRef("none"),c=e?"mounted":"unmounted",[f,p]=tI(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=ou(a.current);u.current=f==="mounted"?h:"none"},[f]),Pu(()=>{const h=a.current,v=s.current;if(v!==e){const b=u.current,C=ou(h);e?p("MOUNT"):C==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(v&&b!==C?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),Pu(()=>{if(n){let h;const v=n.ownerDocument.defaultView??window,y=C=>{const S=ou(a.current).includes(CSS.escape(C.animationName));if(C.target===n&&S&&(p("ANIMATION_END"),!s.current)){const w=n.style.animationFillMode;n.style.animationFillMode="forwards",h=v.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=w)})}},b=C=>{C.target===n&&(u.current=ou(a.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{v.clearTimeout(h),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:g.useCallback(h=>{a.current=h?getComputedStyle(h):null,o(h)},[])}}function a0(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function nI(...e){const n=g.useRef(e);return n.current=e,g.useCallback(o=>{const a=n.current;let s=!1;const u=a.map(c=>{const f=a0(c,o);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let c=0;c<u.length;c++){const f=u[c];typeof f=="function"?f():a0(a[c],null)}}},[])}function ou(e){return(e==null?void 0:e.animationName)||"none"}function oI(e){var a,s;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function iI(e){const n=g.forwardRef((o,a)=>{let{children:s,...u}=o,c=null,f=!1;const p=[];s0(s)&&typeof iu=="function"&&(s=iu(s._payload)),g.Children.forEach(s,b=>{var C;if(cI(b)){f=!0;const E=b;let S="child"in E.props?E.props.child:E.props.children;s0(S)&&typeof iu=="function"&&(S=iu(S._payload)),c=sI(E,S),p.push((C=c==null?void 0:c.props)==null?void 0:C.children)}else p.push(b)}),c?c=g.cloneElement(c,void 0,p):!f&&g.Children.count(s)===1&&g.isValidElement(s)&&(c=s);const h=c?uI(c):void 0,v=Zp(a,h);if(!c){if(s||s===0)throw new Error(f?hI(e):pI(e));return s}const y=lI(u,c.props??{});return c.type!==g.Fragment&&(y.ref=a?v:h),g.cloneElement(c,y)});return n.displayName=`${e}.Slot`,n}var aI=Symbol.for("radix.slottable"),sI=(e,n)=>{if("child"in e.props){const o=e.props.child;return g.isValidElement(o)?g.cloneElement(o,void 0,e.props.children(o.props.children)):null}return g.isValidElement(n)?n:null};function lI(e,n){const o={...n};for(const a in n){const s=e[a],u=n[a];/^on[A-Z]/.test(a)?s&&u?o[a]=(...f)=>{const p=u(...f);return s(...f),p}:s&&(o[a]=s):a==="style"?o[a]={...s,...u}:a==="className"&&(o[a]=[s,u].filter(Boolean).join(" "))}return{...e,...o}}function uI(e){var a,s;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function cI(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aI}var dI=Symbol.for("react.lazy");function s0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dI&&"_payload"in e&&fI(e._payload)}function fI(e){return typeof e=="object"&&e!==null&&"then"in e}var pI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,hI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,iu=_s[" use ".trim().toString()],mI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],eh=mI.reduce((e,n)=>{const o=iI(`Primitive.${n}`),a=g.forwardRef((s,u)=>{const{asChild:c,...f}=s,p=c?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...f,ref:u})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),Ku="Checkbox",[vI,WI]=HA(Ku),[yI,th]=vI(Ku);function gI(e){const{__scopeCheckbox:n,checked:o,children:a,defaultChecked:s,disabled:u,form:c,name:f,onCheckedChange:p,required:h,value:v="on",internal_do_not_use_render:y}=e,[b,C]=YA({prop:o,defaultProp:s??!1,onChange:p,caller:Ku}),[E,S]=g.useState(null),[w,R]=g.useState(null),N=g.useRef(!1),O=E?!!c||!!E.closest("form"):!0,T={checked:b,disabled:u,setChecked:C,control:E,setControl:S,name:f,form:c,value:v,hasConsumerStoppedPropagationRef:N,required:h,defaultChecked:ko(s)?!1:s,isFormControl:O,bubbleInput:w,setBubbleInput:R};return x.jsx(yI,{scope:n,...T,children:xI(y)?y(T):a})}var qb="CheckboxTrigger",Vb=g.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:o,...a},s)=>{const{control:u,value:c,disabled:f,checked:p,required:h,setControl:v,setChecked:y,hasConsumerStoppedPropagationRef:b,isFormControl:C,bubbleInput:E}=th(qb,e),S=Zp(s,v),w=g.useRef(p);return g.useEffect(()=>{const R=u==null?void 0:u.form;if(R){const N=()=>y(w.current);return R.addEventListener("reset",N),()=>R.removeEventListener("reset",N)}},[u,y]),x.jsx(eh.button,{type:"button",role:"checkbox","aria-checked":ko(p)?"mixed":p,"aria-required":h,"data-state":Xb(p),"data-disabled":f?"":void 0,disabled:f,value:c,...a,ref:S,onKeyDown:i0(n,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:i0(o,R=>{y(N=>ko(N)?!0:!N),E&&C&&(b.current=R.isPropagationStopped(),b.current||R.stopPropagation())})})});Vb.displayName=qb;var Kb=g.forwardRef((e,n)=>{const{__scopeCheckbox:o,name:a,checked:s,defaultChecked:u,required:c,disabled:f,value:p,onCheckedChange:h,form:v,...y}=e;return x.jsx(gI,{__scopeCheckbox:o,checked:s,defaultChecked:u,disabled:f,required:c,onCheckedChange:h,name:a,form:v,value:p,internal_do_not_use_render:({isFormControl:b})=>x.jsxs(x.Fragment,{children:[x.jsx(Vb,{...y,ref:n,__scopeCheckbox:o}),b&&x.jsx(Yb,{__scopeCheckbox:o})]})})});Kb.displayName=Ku;var Hb="CheckboxIndicator",Qb=g.forwardRef((e,n)=>{const{__scopeCheckbox:o,forceMount:a,...s}=e,u=th(Hb,o);return x.jsx(Wb,{present:a||ko(u.checked)||u.checked===!0,children:x.jsx(eh.span,{"data-state":Xb(u.checked),"data-disabled":u.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...e.style}})})});Qb.displayName=Hb;var Gb="CheckboxBubbleInput",Yb=g.forwardRef(({__scopeCheckbox:e,...n},o)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:u,defaultChecked:c,required:f,disabled:p,name:h,value:v,form:y,bubbleInput:b,setBubbleInput:C}=th(Gb,e),E=Zp(o,C),S=ZA(u),w=eI(a);g.useEffect(()=>{const N=b;if(!N)return;const O=window.HTMLInputElement.prototype,$=Object.getOwnPropertyDescriptor(O,"checked").set,A=!s.current;if(S!==u&&$){const M=new Event("click",{bubbles:A});N.indeterminate=ko(u),$.call(N,ko(u)?!1:u),N.dispatchEvent(M)}},[b,S,u,s]);const R=g.useRef(ko(u)?!1:u);return x.jsx(eh.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??R.current,required:f,disabled:p,name:h,value:v,form:y,...n,tabIndex:-1,ref:E,style:{...n.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Yb.displayName=Gb;function xI(e){return typeof e=="function"}function ko(e){return e==="indeterminate"}function Xb(e){return ko(e)?"indeterminate":e?"checked":"unchecked"}const mp=g.forwardRef(function({className:n,...o},a){return x.jsx(Kb,{ref:a,className:Ge("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...o,children:x.jsx(Qb,{className:Ge("flex items-center justify-center text-current"),children:x.jsx(YO,{className:"h-4 w-4"})})})});mp.displayName="Checkbox";function l0(){return{name:"",image:"",cpus:"",memoryMib:"",envVars:[],volumes:[],advancedExpanded:!1}}function wI(e){const n={};if(e.name.trim()||(n.name="沙盒名称不能为空"),e.cpus.trim()){const s=Number(e.cpus);(!Number.isInteger(s)||s<1)&&(n.cpus="CPU 必须是正整数")}if(e.memoryMib.trim()){const s=Number(e.memoryMib);(!Number.isInteger(s)||s<1)&&(n.memoryMib="内存必须是正整数")}const o={};e.envVars.forEach(s=>{s.key.trim()===""&&s.value.trim()!==""&&(o[s.id]={key:"环境变量名不能为空"})}),Object.keys(o).length>0&&(n.envVars=o);const a={};return e.volumes.forEach(s=>{const u={};s.name.trim()||(u.name="卷名称不能为空"),s.type==="bind"&&!s.source.trim()&&(u.source="挂载源路径不能为空"),s.type==="named"&&!s.namedVolumeName.trim()&&(u.namedVolumeName="卷名不能为空"),Object.keys(u).length>0&&(a[s.id]=u)}),Object.keys(a).length>0&&(n.volumes=a),n}function bI(e){return!!(e.name||e.cpus||e.memoryMib||e.envVars&&Object.keys(e.envVars).length>0||e.volumes&&Object.keys(e.volumes).length>0)}function SI(e){const n={name:e.name.trim()};if(e.image.trim()&&(n.image=e.image.trim()),e.cpus.trim()){const s=Number(e.cpus);Number.isInteger(s)&&s>=1&&(n.cpus=s)}if(e.memoryMib.trim()){const s=Number(e.memoryMib);Number.isInteger(s)&&s>=1&&(n.memoryMib=s)}const o=e.envVars.filter(s=>s.key.trim()!=="").map(s=>[s.key.trim(),s.value]);o.length>0&&(n.env=Object.fromEntries(o));const a=e.volumes.filter(s=>s.name.trim()!=="").map(s=>{const u={readonly:s.readonly||void 0};switch(s.type){case"bind":return[s.name.trim(),{...u,type:"bind",source:s.source.trim()}];case"named":return[s.name.trim(),{...u,type:"named",name:s.namedVolumeName.trim()}];case"tmpfs":{const c={type:"tmpfs"};if(s.sizeMib.trim()){const f=Number(s.sizeMib);Number.isInteger(f)&&f>0&&(c.sizeMib=f)}return[s.name.trim(),c]}}});return a.length>0&&(n.volumes=Object.fromEntries(a)),n}let CI=0;function Jb(){return`row-${++CI}-${Date.now().toString(36)}`}function EI(){return{id:Jb(),key:"",value:""}}function kI(){return{id:Jb(),name:"",type:"bind",source:"",namedVolumeName:"",sizeMib:"",readonly:!1}}function RI({open:e,onClose:n,onCreate:o,isSubmitting:a=!1,errorMessage:s,inputRef:u,restoreFocusRef:c}){const[f,p]=g.useState(l0),[h,v]=g.useState({}),y=g.useRef(null),b=u??y;function C(){a||(p(l0()),v({}),n())}g.useEffect(()=>{var A;e&&((A=b.current)==null||A.focus())},[e,b]);function E(A){if(A.preventDefault(),a)return;const M=wI(f);if(v(M),bI(M))return;const P=SI(f);o(P)}function S(A,M){p(P=>({...P,[A]:M}))}function w(){p(A=>({...A,envVars:[...A.envVars,EI()]}))}function R(A){p(M=>({...M,envVars:M.envVars.filter(P=>P.id!==A)}))}function N(A,M){p(P=>({...P,envVars:P.envVars.map(_=>_.id===A?{..._,...M}:_)}))}function O(){p(A=>({...A,volumes:[...A.volumes,kI()]}))}function T(A){p(M=>({...M,volumes:M.volumes.filter(P=>P.id!==A)}))}function $(A,M){p(P=>({...P,volumes:P.volumes.map(_=>_.id===A?{..._,...M}:_)}))}return e?x.jsx(Ru,{open:e,onOpenChange:A=>{A||C()},children:x.jsxs(ws,{showCloseButton:!1,className:"max-w-lg shadow-2xl",onEscapeKeyDown:A=>{a&&A.preventDefault()},onInteractOutside:A=>{A.preventDefault()},onPointerDownOutside:A=>{A.preventDefault()},onOpenAutoFocus:A=>{var M;A.preventDefault(),(M=b.current)==null||M.focus()},onCloseAutoFocus:A=>{var M;A.preventDefault(),(M=c==null?void 0:c.current)==null||M.focus()},children:[x.jsxs(bs,{className:"space-y-1 text-left",children:[x.jsx(Cs,{className:"text-lg font-semibold",children:"Create Sandbox"}),x.jsx(Es,{className:"text-sm text-muted-foreground",children:"Configure your sandbox with the desired resources and settings."})]}),s?x.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}):null,x.jsxs("form",{onSubmit:E,className:"space-y-4",children:[x.jsxs("div",{className:"space-y-3",children:[x.jsxs("div",{className:"space-y-1.5",children:[x.jsxs(on,{htmlFor:"sandbox-name-input",children:["Sandbox name ",x.jsx("span",{className:"text-destructive",children:"*"})]}),x.jsx(At,{id:"sandbox-name-input",ref:b,value:f.name,onChange:A=>S("name",A.target.value),placeholder:"my-sandbox"}),h.name?x.jsx("p",{className:"text-xs text-destructive",children:h.name}):null]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(on,{htmlFor:"sandbox-image-input",children:"Image"}),x.jsx(At,{id:"sandbox-image-input",value:f.image,onChange:A=>S("image",A.target.value),placeholder:"e.g., ubuntu:22.04"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(on,{htmlFor:"sandbox-cpus-input",children:"CPUs"}),x.jsx(At,{id:"sandbox-cpus-input",type:"number",min:1,value:f.cpus,onChange:A=>S("cpus",A.target.value),placeholder:"e.g., 2"}),h.cpus?x.jsx("p",{className:"text-xs text-destructive",children:h.cpus}):null]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(on,{htmlFor:"sandbox-memory-input",children:"Memory (MiB)"}),x.jsx(At,{id:"sandbox-memory-input",type:"number",min:1,value:f.memoryMib,onChange:A=>S("memoryMib",A.target.value),placeholder:"e.g., 1024"}),h.memoryMib?x.jsx("p",{className:"text-xs text-destructive",children:h.memoryMib}):null]})]})]}),x.jsxs("button",{type:"button",onClick:()=>S("advancedExpanded",!f.advancedExpanded),className:"flex w-full items-center justify-between rounded-md border border-input bg-muted/50 px-3 py-2 text-sm text-muted-foreground transition-colors hover:bg-muted",children:[x.jsx("span",{children:"Advanced Configuration"}),f.advancedExpanded?x.jsx(eT,{className:"h-4 w-4"}):x.jsx(JO,{className:"h-4 w-4"})]}),f.advancedExpanded?x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Environment Variables"}),f.envVars.map(A=>{var M,P;return x.jsxs("div",{className:"flex items-start gap-2",children:[x.jsxs("div",{className:"flex-1 space-y-1",children:[x.jsx(At,{className:"text-sm",value:A.key,onChange:_=>N(A.id,{key:_.target.value}),placeholder:"KEY"}),(P=(M=h.envVars)==null?void 0:M[A.id])!=null&&P.key?x.jsx("p",{className:"text-xs text-destructive",children:h.envVars[A.id].key}):null]}),x.jsx("div",{className:"flex-1",children:x.jsx(At,{className:"text-sm",value:A.value,onChange:_=>N(A.id,{value:_.target.value}),placeholder:"value"})}),x.jsx(tt,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive",onClick:()=>R(A.id),children:x.jsx(jg,{className:"h-4 w-4"})})]},A.id)}),x.jsxs(tt,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:bg-muted",onClick:w,children:[x.jsx(Tg,{className:"mr-1 h-3.5 w-3.5"}),"Add Environment Variable"]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Volume Mounts"}),f.volumes.map(A=>{var M,P,_,D,H,W;return x.jsxs("div",{className:"rounded-md border border-input bg-muted/30 p-3 space-y-2",children:[x.jsxs("div",{className:"flex items-start gap-2",children:[x.jsxs("div",{className:"flex-1 space-y-1",children:[x.jsx(At,{className:"text-sm",value:A.name,onChange:J=>$(A.id,{name:J.target.value}),placeholder:"Volume name (key)"}),(P=(M=h.volumes)==null?void 0:M[A.id])!=null&&P.name?x.jsx("p",{className:"text-xs text-destructive",children:h.volumes[A.id].name}):null]}),x.jsxs("select",{value:A.type,onChange:J=>$(A.id,{type:J.target.value}),className:"h-9 rounded-md border border-input bg-background px-2 text-sm",children:[x.jsx("option",{value:"bind",children:"Bind"}),x.jsx("option",{value:"named",children:"Named"}),x.jsx("option",{value:"tmpfs",children:"Tmpfs"})]}),x.jsx(tt,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive",onClick:()=>T(A.id),children:x.jsx(jg,{className:"h-4 w-4"})})]}),A.type==="bind"?x.jsxs("div",{className:"space-y-1",children:[x.jsx(At,{className:"text-sm",value:A.source,onChange:J=>$(A.id,{source:J.target.value}),placeholder:"Source path (e.g., /host/data)"}),(D=(_=h.volumes)==null?void 0:_[A.id])!=null&&D.source?x.jsx("p",{className:"text-xs text-destructive",children:h.volumes[A.id].source}):null]}):null,A.type==="named"?x.jsxs("div",{className:"space-y-1",children:[x.jsx(At,{className:"text-sm",value:A.namedVolumeName,onChange:J=>$(A.id,{namedVolumeName:J.target.value}),placeholder:"Volume name"}),(W=(H=h.volumes)==null?void 0:H[A.id])!=null&&W.namedVolumeName?x.jsx("p",{className:"text-xs text-destructive",children:h.volumes[A.id].namedVolumeName}):null]}):null,A.type==="tmpfs"?x.jsx(At,{type:"number",min:1,className:"text-sm",value:A.sizeMib,onChange:J=>$(A.id,{sizeMib:J.target.value}),placeholder:"Size (MiB)"}):null,A.type!=="tmpfs"?x.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[x.jsx("input",{type:"checkbox",checked:A.readonly,onChange:J=>$(A.id,{readonly:J.target.checked}),className:"h-4 w-4 rounded border-input bg-background text-primary"}),"Read-only"]}):null]},A.id)}),x.jsxs(tt,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:bg-muted",onClick:O,children:[x.jsx(Tg,{className:"mr-1 h-3.5 w-3.5"}),"Add Volume Mount"]})]})]}):null,x.jsxs(Ss,{className:"mt-6 flex-row justify-end gap-2 space-x-0",children:[x.jsx(tt,{type:"button",variant:"outline",onClick:C,disabled:a,children:"Cancel"}),x.jsx(tt,{type:"submit",disabled:a||!f.name.trim(),children:a?"Creating...":"Create"})]})]})]})}):null}function PI({sandboxes:e,onStart:n,onStop:o,onDelete:a,onCreate:s,isLoading:u=!1,errorMessage:c,mutationErrorMessage:f,pendingSandboxName:p,pendingActionLabel:h,onCreateDialogOpen:v,onCreateDialogClose:y,createErrorMessage:b,isCreating:C=!1,showLifecycleActions:E=!0,pendingDeleteSandboxName:S=null,selectedNames:w,onToggleSelect:R,onToggleSelectAll:N,onBatchStop:O,onBatchDelete:T,isBatchPending:$,batchPendingLabel:A}){const[M,P]=g.useState(""),[_,D]=g.useState(!1),H=g.useRef(null),W=g.useRef(null),J=j=>p===j&&h!==void 0||S===j,ce=e.filter(j=>j.name.toLowerCase().includes(M.toLowerCase())),xe=g.useMemo(()=>ce.map(j=>j.name),[ce]),fe=ce.filter(j=>w.has(j.name)).length,ae=ce.length>0&&fe===ce.length,G=!u&&!c&&ce.length===0;function Z(){D(!1),y==null||y()}function B(){v==null||v(),D(!0)}return x.jsxs("div",{className:"space-y-5 p-6",children:[x.jsxs("div",{className:"flex items-center justify-between gap-4",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-semibold",children:"Sandboxes"}),x.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Fleet view and lifecycle operations."})]}),x.jsx(tt,{ref:H,onClick:B,children:"Create Sandbox"})]}),x.jsxs("div",{className:"max-w-sm space-y-2",children:[x.jsx(on,{htmlFor:"sandbox-search-input",children:"Search sandboxes"}),x.jsx(At,{id:"sandbox-search-input",placeholder:"Search sandboxes",value:M,onChange:j=>P(j.target.value)})]}),u?x.jsx("div",{role:"status",className:"rounded-md border bg-card px-3 py-2 text-sm text-muted-foreground",children:"Loading sandboxes..."}):null,c?x.jsxs("div",{role:"alert",className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:["Cannot load sandboxes: ",c]}):null,f?x.jsxs("div",{role:"alert",className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:["Sandbox action failed: ",f]}):null,fe>0?x.jsxs("div",{className:"flex items-center gap-3 rounded-md border bg-muted/30 px-4 py-2",children:[x.jsxs("span",{className:"text-sm font-medium",children:[fe," selected"]}),x.jsx("div",{className:"flex-1"}),x.jsx(tt,{variant:"outline",size:"sm",onClick:O,disabled:$,children:$&&A==="Stopping..."?"Stopping...":"Stop Selected"}),x.jsx(tt,{variant:"outline",size:"sm",className:"border-destructive/40 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:T,disabled:$,children:$&&A==="Deleting..."?"Deleting...":"Delete Selected"})]}):null,x.jsx("div",{className:"overflow-hidden rounded-xl border bg-card",children:x.jsxs(Bu,{children:[x.jsx(Wu,{className:"bg-muted/40",children:x.jsxs(Tn,{className:"hover:bg-transparent",children:[x.jsx(mr,{className:"w-10 px-4",children:x.jsx(mp,{checked:ae,"aria-label":"Select all",onCheckedChange:()=>N(xe)})}),x.jsx(mr,{className:"px-4",children:"Name"}),x.jsx(mr,{className:"px-4",children:"Status"}),x.jsx(mr,{className:"px-4",children:"Image"}),x.jsx(mr,{className:"px-4",children:"Env"}),x.jsx(mr,{className:"px-4",children:"Volumes"}),E?x.jsx(mr,{className:"px-4",children:"Actions"}):null]})}),x.jsxs(qu,{children:[ce.map(j=>{const z=w.has(j.name);return x.jsxs(Tn,{"data-state":z?"selected":void 0,children:[x.jsx(Qt,{className:"px-4 py-3",children:x.jsx(mp,{checked:z,"aria-label":`Select ${j.name}`,onCheckedChange:()=>R(j.name)})}),x.jsx(Qt,{className:"px-4 py-3",children:x.jsx(Po,{className:"font-medium text-foreground transition-colors hover:text-primary",to:`/sandboxes/${j.name}`,children:j.name})}),x.jsx(Qt,{className:"px-4 py-3",children:x.jsx(Bb,{status:j.status})}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:zb(j.image)}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:j.envCount}),x.jsx(Qt,{className:"px-4 py-3 text-muted-foreground",children:j.volumeCount}),E?x.jsx(Qt,{className:"px-4 py-3",children:x.jsxs("div",{className:"flex gap-2",children:[x.jsx(tt,{variant:"outline",size:"sm",onClick:()=>n(j.name),"aria-label":J(j.name)&&h==="Starting..."?"Starting...":`Start ${j.name}`,disabled:J(j.name)||$,children:J(j.name)&&h==="Starting..."?"Starting...":"Start"}),x.jsx(tt,{variant:"outline",size:"sm",onClick:()=>o(j.name),"aria-label":J(j.name)&&h==="Stopping..."?"Stopping...":`Stop ${j.name}`,disabled:J(j.name)||$,children:J(j.name)&&h==="Stopping..."?"Stopping...":"Stop"}),x.jsx(tt,{variant:"outline",size:"sm",className:"border-destructive/40 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>a(j.name),"aria-label":J(j.name)&&h==="Deleting..."?"Deleting...":`Delete ${j.name}`,disabled:J(j.name)||$,children:J(j.name)&&h==="Deleting..."?"Deleting...":"Delete"})]})}):null]},j.name)}),G?x.jsx(Tn,{children:x.jsx(Qt,{className:"px-4 py-6 text-center text-muted-foreground",colSpan:E?7:6,children:"No sandboxes match this search."})}):null]})]})}),x.jsx(RI,{open:_,onClose:Z,onCreate:s,isSubmitting:C,errorMessage:b,inputRef:W,restoreFocusRef:H})]})}function Ho(e){throw new Error(`${e} is not implemented in Task 4 scaffold`)}const NI={getApiUrl:()=>"/api/microsandbox",getList:async e=>({data:[],total:0}),getOne:async e=>({data:{id:e.id}}),create:async e=>Ho("create"),update:async e=>Ho("update"),deleteOne:async e=>Ho("deleteOne"),getMany:async e=>({data:[]}),createMany:async e=>Ho("createMany"),updateMany:async e=>Ho("updateMany"),deleteMany:async e=>Ho("deleteMany"),custom:async e=>Ho("custom")},_I=new op({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function OI(){return x.jsx(tA,{children:x.jsx(eO,{})})}function TI(){const{data:e}=Rr({queryKey:["overview","sandboxes"],queryFn:vb}),{data:n}=Rr({queryKey:["overview","images"],queryFn:yb});return x.jsx(mA,{sandboxes:e??{items:[],total:0},images:n??{items:[],total:0}})}function jI(){const e=gs(),n=Oo(),{data:o,isLoading:a,error:s}=Rr({queryKey:["sandboxes"],queryFn:vb}),[u,c]=g.useState(null),[f,p]=g.useState(new Set),[h,v]=g.useState(null),[y,b]=g.useState(!1),[C,E]=g.useState(),[S,w]=g.useState(),R=async()=>{await Promise.all([n.invalidateQueries({queryKey:["sandboxes"]}),n.invalidateQueries({queryKey:["overview","sandboxes"]})])},N=Gt({mutationFn:z=>iA(z),onSuccess:async(z,ee)=>{await R(),e(`/sandboxes/${ee.name}`)}}),O=Gt({mutationFn:aA,onSuccess:R}),T=Gt({mutationFn:t0,onSuccess:R}),$=Gt({mutationFn:r0,onSuccess:R}),A=O.error instanceof Error?O.error.message:T.error instanceof Error?T.error.message:$.error instanceof Error?$.error.message:S||void 0,M=O.isPending?O.variables:T.isPending?T.variables:$.isPending?$.variables:void 0,P=O.isPending?"Starting...":T.isPending?"Stopping...":$.isPending?"Deleting...":void 0,_=()=>{N.reset()},D=()=>{O.reset(),T.reset(),$.reset()},H=z=>{D(),O.mutate(z,{onSuccess:D})},W=z=>{D(),T.mutate(z,{onSuccess:D})},J=z=>{c(z)},ce=()=>{u&&(D(),$.mutate(u,{onSuccess:D}),c(null))},xe=()=>{c(null)},fe=g.useCallback(z=>{p(ee=>{const ue=new Set(ee);return ue.has(z)?ue.delete(z):ue.add(z),ue})},[]),ae=g.useCallback(z=>{p(ee=>{if(z.every(se=>ee.has(se))){const se=new Set(ee);return z.forEach(de=>se.delete(de)),se}return new Set([...ee,...z])})},[]),G=async()=>{if(f.size!==0){D(),w(void 0),b(!0),E("Stopping...");try{await Promise.all([...f].map(z=>t0(z))),p(new Set),await R()}catch(z){w(z instanceof Error?z.message:"Batch stop failed")}finally{b(!1),E(void 0)}}},Z=()=>{v([...f])},B=async()=>{if(h){D(),w(void 0),b(!0),E("Deleting...");try{await Promise.all(h.map(z=>r0(z))),p(new Set),v(null),await R()}catch(z){w(z instanceof Error?z.message:"Batch delete failed")}finally{b(!1),E(void 0)}}},j=()=>{v(null)};return x.jsxs(x.Fragment,{children:[x.jsx(PI,{sandboxes:(o==null?void 0:o.items)??[],isLoading:a,errorMessage:s instanceof Error?s.message:void 0,mutationErrorMessage:A,pendingSandboxName:M,pendingActionLabel:P,onCreateDialogOpen:_,onCreateDialogClose:_,onStart:H,onStop:W,onDelete:J,onCreate:z=>N.mutate(z),createErrorMessage:N.error instanceof Error?N.error.message:void 0,isCreating:N.isPending,showLifecycleActions:!0,pendingDeleteSandboxName:u,selectedNames:f,onToggleSelect:fe,onToggleSelectAll:ae,onBatchStop:G,onBatchDelete:Z,isBatchPending:y,batchPendingLabel:C}),x.jsx(Ru,{open:u!==null,onOpenChange:z=>{z||xe()},children:x.jsxs(ws,{children:[x.jsxs(bs,{children:[x.jsx(Cs,{children:"Delete sandbox?"}),x.jsxs(Es,{children:["This will permanently remove the sandbox ",x.jsx("strong",{children:u}),". This action cannot be undone."]})]}),x.jsxs(Ss,{children:[x.jsx(tt,{variant:"outline",onClick:xe,children:"Cancel"}),x.jsx(tt,{variant:"destructive",onClick:ce,disabled:$.isPending,children:$.isPending?"Deleting...":"Delete"})]})]})}),x.jsx(Ru,{open:h!==null,onOpenChange:z=>{z||j()},children:x.jsxs(ws,{children:[x.jsxs(bs,{children:[x.jsx(Cs,{children:"Delete sandboxes?"}),x.jsxs(Es,{children:["This will permanently remove"," ",(h==null?void 0:h.length)??0," sandbox",((h==null?void 0:h.length)??0)!==1?"es":"",":"," ",x.jsx("strong",{children:h==null?void 0:h.join(", ")}),". This action cannot be undone."]})]}),x.jsxs(Ss,{children:[x.jsx(tt,{variant:"outline",onClick:j,children:"Cancel"}),x.jsx(tt,{variant:"destructive",onClick:B,disabled:y,children:y&&C==="Deleting..."?"Deleting...":"Delete"})]})]})})]})}function AI({name:e}){var T,$;const[n,o]=g.useState(),[a,s]=g.useState(),[u,c]=g.useState(),f=Rr({queryKey:["sandbox",e],queryFn:()=>oA(e),enabled:!0,retry:!1,refetchInterval:5e3}),{data:p,isLoading:h,error:v}=f,y=Rr({queryKey:["sandbox-files",e],queryFn:()=>sA(e,"~"),enabled:!0,retry:!1}),b=((T=y.data)==null?void 0:T.entries.filter(A=>A.type==="file").map(A=>A.path))??[],C=n&&b.includes(n)?n:b[0],E=Rr({queryKey:["sandbox-file",e,C],queryFn:()=>lA(e,C??""),enabled:!!C,retry:!1}),S=y.isLoading||E.isLoading,w=y.error instanceof Error?y.error.message:E.error instanceof Error?E.error.message:void 0,R=Gt({mutationFn:uA,onMutate:()=>{s(void 0)},onSuccess:A=>{s(A)},onError:()=>{s(void 0)}}),N=Gt({mutationFn:A=>cA(e,A),onMutate:()=>{c(void 0)},onSuccess:A=>{c(A.entries)},onError:()=>{c(void 0)}}),O=v instanceof Error?v:void 0;return h?x.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading sandbox detail..."}):(O==null?void 0:O.status)===404?x.jsxs("div",{className:"space-y-4 p-6",children:[x.jsx("h1",{className:"text-2xl font-semibold",children:"Sandbox not found."}),x.jsx(Po,{className:"text-sm text-primary hover:text-primary/80",to:"/sandboxes",children:"Back to Sandboxes"})]}):O?x.jsxs("div",{className:"p-6 text-sm text-red-600",children:["Cannot load sandbox detail: ",O.message]}):p?x.jsx(BA,{sandbox:p,files:b,fileContent:(($=E.data)==null?void 0:$.content)??"",isFileLoading:S,isMetricsRefreshing:f.isRefetching,previewFile:C,onPreviewFile:o,onRefreshMetrics:()=>{f.refetch()},execResult:a,isExecRunning:R.isPending,execErrorMessage:R.error instanceof Error?R.error.message:void 0,fileErrorMessage:w,onRunCommand:A=>{R.mutate({sandboxName:e,command:A})},logEntries:u,isLogLoading:N.isPending,logErrorMessage:N.error instanceof Error?N.error.message:void 0,onLoadLogs:A=>N.mutate(A)}):x.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Sandbox detail unavailable."})}function II(){const{name:e}=rw();return e?x.jsx(AI,{name:e},e):x.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Sandbox detail unavailable."})}function MI(){const{data:e}=Rr({queryKey:["images"],queryFn:yb});return x.jsx(hA,{images:(e==null?void 0:e.items)??[]})}function DI(){return x.jsx(RO,{children:x.jsx(j0,{client:_I,children:x.jsxs(JN,{dataProvider:NI,routerProvider:LO,resources:[{name:"overview",list:"/"},{name:"sandboxes",list:"/sandboxes",show:"/sandboxes/:name"},{name:"images",list:"/images"}],children:[x.jsxs(rO,{children:[x.jsxs(Qo,{element:x.jsx(OI,{}),children:[x.jsx(Qo,{index:!0,element:x.jsx(TI,{})}),x.jsx(Qo,{path:"sandboxes",element:x.jsx(jI,{})}),x.jsx(Qo,{path:"sandboxes/:name",element:x.jsx(II,{})}),x.jsx(Qo,{path:"images",element:x.jsx(MI,{})})]}),x.jsx(Qo,{path:"*",element:x.jsx(FO,{resource:"overview"})})]}),x.jsx(UO,{})]})})})}Z1.createRoot(document.getElementById("root")).render(x.jsx(ie.StrictMode,{children:x.jsx(DI,{})}))});export default LI();