@dataramen/cli 0.0.44 → 0.0.45-beta.1

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.
@@ -1,284 +0,0 @@
1
- (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $d={exports:{}},Os={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and 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 U0;function Q2(){if(U0)return Os;U0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,s,o){var u=null;if(o!==void 0&&(u=""+o),s.key!==void 0&&(u=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:l,key:u,ref:s!==void 0?s:null,props:o}}return Os.Fragment=n,Os.jsx=i,Os.jsxs=i,Os}var B0;function I2(){return B0||(B0=1,$d.exports=Q2()),$d.exports}var b=I2(),Yd={exports:{}},_e={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and 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 q0;function V2(){if(q0)return _e;q0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function x(C){return C===null||typeof C!="object"?null:(C=g&&C[g]||C["@@iterator"],typeof C=="function"?C:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,A={};function _(C,I,se){this.props=C,this.context=I,this.refs=A,this.updater=se||v}_.prototype.isReactComponent={},_.prototype.setState=function(C,I){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,I,"setState")},_.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function k(){}k.prototype=_.prototype;function O(C,I,se){this.props=C,this.context=I,this.refs=A,this.updater=se||v}var R=O.prototype=new k;R.constructor=O,w(R,_.prototype),R.isPureReactComponent=!0;var q=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},D=Object.prototype.hasOwnProperty;function $(C,I,se,N,fe,Te){return se=Te.ref,{$$typeof:e,type:C,key:I,ref:se!==void 0?se:null,props:Te}}function ee(C,I){return $(C.type,I,void 0,void 0,void 0,C.props)}function ie(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function z(C){var I={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(se){return I[se]})}var ae=/\/+/g;function te(C,I){return typeof C=="object"&&C!==null&&C.key!=null?z(""+C.key):I.toString(36)}function ue(){}function J(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(ue,ue):(C.status="pending",C.then(function(I){C.status==="pending"&&(C.status="fulfilled",C.value=I)},function(I){C.status==="pending"&&(C.status="rejected",C.reason=I)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function oe(C,I,se,N,fe){var Te=typeof C;(Te==="undefined"||Te==="boolean")&&(C=null);var ce=!1;if(C===null)ce=!0;else switch(Te){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(C.$$typeof){case e:case n:ce=!0;break;case m:return ce=C._init,oe(ce(C._payload),I,se,N,fe)}}if(ce)return fe=fe(C),ce=N===""?"."+te(C,0):N,q(fe)?(se="",ce!=null&&(se=ce.replace(ae,"$&/")+"/"),oe(fe,I,se,"",function(Ie){return Ie})):fe!=null&&(ie(fe)&&(fe=ee(fe,se+(fe.key==null||C&&C.key===fe.key?"":(""+fe.key).replace(ae,"$&/")+"/")+ce)),I.push(fe)),1;ce=0;var ct=N===""?".":N+":";if(q(C))for(var Re=0;Re<C.length;Re++)N=C[Re],Te=ct+te(N,Re),ce+=oe(N,I,se,Te,fe);else if(Re=x(C),typeof Re=="function")for(C=Re.call(C),Re=0;!(N=C.next()).done;)N=N.value,Te=ct+te(N,Re++),ce+=oe(N,I,se,Te,fe);else if(Te==="object"){if(typeof C.then=="function")return oe(J(C),I,se,N,fe);throw I=String(C),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ce}function B(C,I,se){if(C==null)return C;var N=[],fe=0;return oe(C,N,"","",function(Te){return I.call(se,Te,fe++)}),N}function X(C){if(C._status===-1){var I=C._result;I=I(),I.then(function(se){(C._status===0||C._status===-1)&&(C._status=1,C._result=se)},function(se){(C._status===0||C._status===-1)&&(C._status=2,C._result=se)}),C._status===-1&&(C._status=0,C._result=I)}if(C._status===1)return C._result.default;throw C._result}var ne=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)};function pe(){}return _e.Children={map:B,forEach:function(C,I,se){B(C,function(){I.apply(this,arguments)},se)},count:function(C){var I=0;return B(C,function(){I++}),I},toArray:function(C){return B(C,function(I){return I})||[]},only:function(C){if(!ie(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},_e.Component=_,_e.Fragment=i,_e.Profiler=s,_e.PureComponent=O,_e.StrictMode=l,_e.Suspense=d,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,_e.__COMPILER_RUNTIME={__proto__:null,c:function(C){return M.H.useMemoCache(C)}},_e.cache=function(C){return function(){return C.apply(null,arguments)}},_e.cloneElement=function(C,I,se){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var N=w({},C.props),fe=C.key,Te=void 0;if(I!=null)for(ce in I.ref!==void 0&&(Te=void 0),I.key!==void 0&&(fe=""+I.key),I)!D.call(I,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&I.ref===void 0||(N[ce]=I[ce]);var ce=arguments.length-2;if(ce===1)N.children=se;else if(1<ce){for(var ct=Array(ce),Re=0;Re<ce;Re++)ct[Re]=arguments[Re+2];N.children=ct}return $(C.type,fe,void 0,void 0,Te,N)},_e.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:o,_context:C},C},_e.createElement=function(C,I,se){var N,fe={},Te=null;if(I!=null)for(N in I.key!==void 0&&(Te=""+I.key),I)D.call(I,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(fe[N]=I[N]);var ce=arguments.length-2;if(ce===1)fe.children=se;else if(1<ce){for(var ct=Array(ce),Re=0;Re<ce;Re++)ct[Re]=arguments[Re+2];fe.children=ct}if(C&&C.defaultProps)for(N in ce=C.defaultProps,ce)fe[N]===void 0&&(fe[N]=ce[N]);return $(C,Te,void 0,void 0,null,fe)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(C){return{$$typeof:f,render:C}},_e.isValidElement=ie,_e.lazy=function(C){return{$$typeof:m,_payload:{_status:-1,_result:C},_init:X}},_e.memo=function(C,I){return{$$typeof:h,type:C,compare:I===void 0?null:I}},_e.startTransition=function(C){var I=M.T,se={};M.T=se;try{var N=C(),fe=M.S;fe!==null&&fe(se,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(pe,ne)}catch(Te){ne(Te)}finally{M.T=I}},_e.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},_e.use=function(C){return M.H.use(C)},_e.useActionState=function(C,I,se){return M.H.useActionState(C,I,se)},_e.useCallback=function(C,I){return M.H.useCallback(C,I)},_e.useContext=function(C){return M.H.useContext(C)},_e.useDebugValue=function(){},_e.useDeferredValue=function(C,I){return M.H.useDeferredValue(C,I)},_e.useEffect=function(C,I,se){var N=M.H;if(typeof se=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return N.useEffect(C,I)},_e.useId=function(){return M.H.useId()},_e.useImperativeHandle=function(C,I,se){return M.H.useImperativeHandle(C,I,se)},_e.useInsertionEffect=function(C,I){return M.H.useInsertionEffect(C,I)},_e.useLayoutEffect=function(C,I){return M.H.useLayoutEffect(C,I)},_e.useMemo=function(C,I){return M.H.useMemo(C,I)},_e.useOptimistic=function(C,I){return M.H.useOptimistic(C,I)},_e.useReducer=function(C,I,se){return M.H.useReducer(C,I,se)},_e.useRef=function(C){return M.H.useRef(C)},_e.useState=function(C){return M.H.useState(C)},_e.useSyncExternalStore=function(C,I,se){return M.H.useSyncExternalStore(C,I,se)},_e.useTransition=function(){return M.H.useTransition()},_e.version="19.1.0",_e}var H0;function fp(){return H0||(H0=1,Yd.exports=V2()),Yd.exports}var E=fp();const nt=Ca(E);var Kd={exports:{}},js={},Gd={exports:{}},Xd={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and 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 F0;function $2(){return F0||(F0=1,function(e){function n(B,X){var ne=B.length;B.push(X);e:for(;0<ne;){var pe=ne-1>>>1,C=B[pe];if(0<s(C,X))B[pe]=X,B[ne]=C,ne=pe;else break e}}function i(B){return B.length===0?null:B[0]}function l(B){if(B.length===0)return null;var X=B[0],ne=B.pop();if(ne!==X){B[0]=ne;e:for(var pe=0,C=B.length,I=C>>>1;pe<I;){var se=2*(pe+1)-1,N=B[se],fe=se+1,Te=B[fe];if(0>s(N,ne))fe<C&&0>s(Te,N)?(B[pe]=Te,B[fe]=ne,pe=fe):(B[pe]=N,B[se]=ne,pe=se);else if(fe<C&&0>s(Te,ne))B[pe]=Te,B[fe]=ne,pe=fe;else break e}}return X}function s(B,X){var ne=B.sortIndex-X.sortIndex;return ne!==0?ne:B.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],m=1,g=null,x=3,v=!1,w=!1,A=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function q(B){for(var X=i(h);X!==null;){if(X.callback===null)l(h);else if(X.startTime<=B)l(h),X.sortIndex=X.expirationTime,n(d,X);else break;X=i(h)}}function M(B){if(A=!1,q(B),!w)if(i(d)!==null)w=!0,D||(D=!0,te());else{var X=i(h);X!==null&&oe(M,X.startTime-B)}}var D=!1,$=-1,ee=5,ie=-1;function z(){return _?!0:!(e.unstable_now()-ie<ee)}function ae(){if(_=!1,D){var B=e.unstable_now();ie=B;var X=!0;try{e:{w=!1,A&&(A=!1,O($),$=-1),v=!0;var ne=x;try{t:{for(q(B),g=i(d);g!==null&&!(g.expirationTime>B&&z());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,x=g.priorityLevel;var C=pe(g.expirationTime<=B);if(B=e.unstable_now(),typeof C=="function"){g.callback=C,q(B),X=!0;break t}g===i(d)&&l(d),q(B)}else l(d);g=i(d)}if(g!==null)X=!0;else{var I=i(h);I!==null&&oe(M,I.startTime-B),X=!1}}break e}finally{g=null,x=ne,v=!1}X=void 0}}finally{X?te():D=!1}}}var te;if(typeof R=="function")te=function(){R(ae)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,J=ue.port2;ue.port1.onmessage=ae,te=function(){J.postMessage(null)}}else te=function(){k(ae,0)};function oe(B,X){$=k(function(){B(e.unstable_now())},X)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var X=3;break;default:X=x}var ne=x;x=X;try{return B()}finally{x=ne}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=x;x=B;try{return X()}finally{x=ne}},e.unstable_scheduleCallback=function(B,X,ne){var pe=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?pe+ne:pe):ne=pe,B){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=ne+C,B={id:m++,callback:X,priorityLevel:B,startTime:ne,expirationTime:C,sortIndex:-1},ne>pe?(B.sortIndex=ne,n(h,B),i(d)===null&&B===i(h)&&(A?(O($),$=-1):A=!0,oe(M,ne-pe))):(B.sortIndex=C,n(d,B),w||v||(w=!0,D||(D=!0,te()))),B},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(B){var X=x;return function(){var ne=x;x=X;try{return B.apply(this,arguments)}finally{x=ne}}}}(Xd)),Xd}var P0;function Y2(){return P0||(P0=1,Gd.exports=$2()),Gd.exports}var Zd={exports:{}},Jt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Q0;function K2(){if(Q0)return Jt;Q0=1;var e=fp();function n(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Jt.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return o(d,h,null,m)},Jt.flushSync=function(d){var h=u.T,m=l.p;try{if(u.T=null,l.p=2,d)return d()}finally{u.T=h,l.p=m,l.d.f()}},Jt.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(d,h))},Jt.prefetchDNS=function(d){typeof d=="string"&&l.d.D(d)},Jt.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?l.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:v}):m==="script"&&l.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Jt.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);l.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(d)},Jt.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);l.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Jt.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);l.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(d)},Jt.requestFormReset=function(d){l.d.r(d)},Jt.unstable_batchedUpdates=function(d,h){return d(h)},Jt.useFormState=function(d,h,m){return u.H.useFormState(d,h,m)},Jt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Jt.version="19.1.0",Jt}var I0;function Ib(){if(I0)return Zd.exports;I0=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(),Zd.exports=K2(),Zd.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var V0;function G2(){if(V0)return js;V0=1;var e=Y2(),n=fp(),i=Ib();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}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."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function u(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 f(t){if(o(t)!==t)throw Error(l(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(l(188));return r!==t?null:t}for(var a=t,c=r;;){var p=a.return;if(p===null)break;var y=p.alternate;if(y===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===a)return f(p),t;if(y===c)return f(p),r;y=y.sibling}throw Error(l(188))}if(a.return!==c.return)a=p,c=y;else{for(var S=!1,T=p.child;T;){if(T===a){S=!0,a=p,c=y;break}if(T===c){S=!0,c=p,a=y;break}T=T.sibling}if(!S){for(T=y.child;T;){if(T===a){S=!0,a=y,c=p;break}if(T===c){S=!0,c=y,a=p;break}T=T.sibling}if(!S)throw Error(l(189))}}if(a.alternate!==c)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:r}function h(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=h(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function te(t){return t===null||typeof t!="object"?null:(t=ae&&t[ae]||t["@@iterator"],typeof t=="function"?t:null)}var ue=Symbol.for("react.client.reference");function J(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ue?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case _:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case ie:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case R:return(t.displayName||"Context")+".Provider";case O:return(t._context.displayName||"Context")+".Consumer";case q:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case $:return r=t.displayName||null,r!==null?r:J(t.type)||"Memo";case ee:r=t._payload,t=t._init;try{return J(t(r))}catch{}}return null}var oe=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},pe=[],C=-1;function I(t){return{current:t}}function se(t){0>C||(t.current=pe[C],pe[C]=null,C--)}function N(t,r){C++,pe[C]=t.current,t.current=r}var fe=I(null),Te=I(null),ce=I(null),ct=I(null);function Re(t,r){switch(N(ce,r),N(Te,t),N(fe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?f0(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=f0(r),t=d0(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}se(fe),N(fe,t)}function Ie(){se(fe),se(Te),se(ce)}function Ft(t){t.memoizedState!==null&&N(ct,t);var r=fe.current,a=d0(r,t.type);r!==a&&(N(Te,t),N(fe,a))}function wt(t){Te.current===t&&(se(fe),se(Te)),ct.current===t&&(se(ct),Ts._currentValue=ne)}var cn=Object.prototype.hasOwnProperty,tr=e.unstable_scheduleCallback,fn=e.unstable_cancelCallback,ii=e.unstable_shouldYield,Dt=e.unstable_requestPaint,Mt=e.unstable_now,nr=e.unstable_getCurrentPriorityLevel,wn=e.unstable_ImmediatePriority,Ke=e.unstable_UserBlockingPriority,Bn=e.unstable_NormalPriority,Rr=e.unstable_LowPriority,dr=e.unstable_IdlePriority,Or=e.log,li=e.unstable_setDisableYieldValue,Y=null,W=null;function ye(t){if(typeof Or=="function"&&li(t),W&&typeof W.setStrictMode=="function")try{W.setStrictMode(Y,t)}catch{}}var ge=Math.clz32?Math.clz32:Yt,Be=Math.log,Pt=Math.LN2;function Yt(t){return t>>>=0,t===0?32:31-(Be(t)/Pt|0)|0}var yt=256,gt=4194304;function qe(t){var r=t&42;if(r!==0)return r;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ft(t,r,a){var c=t.pendingLanes;if(c===0)return 0;var p=0,y=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~y,c!==0?p=qe(c):(S&=T,S!==0?p=qe(S):a||(a=T&~t,a!==0&&(p=qe(a))))):(T=c&~y,T!==0?p=qe(T):S!==0?p=qe(S):a||(a=c&~t,a!==0&&(p=qe(a)))),p===0?0:r!==0&&r!==p&&(r&y)===0&&(y=p&-p,a=r&-r,y>=a||y===32&&(a&4194048)!==0)?r:p}function Lt(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function zt(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ai(){var t=yt;return yt<<=1,(yt&4194048)===0&&(yt=256),t}function jr(){var t=gt;return gt<<=1,(gt&62914560)===0&&(gt=4194304),t}function hr(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function qn(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Qi(t,r,a,c,p,y){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var T=t.entanglements,j=t.expirationTimes,F=t.hiddenUpdates;for(a=S&~a;0<a;){var K=31-ge(a),Z=1<<K;T[K]=0,j[K]=-1;var P=F[K];if(P!==null)for(F[K]=null,K=0;K<P.length;K++){var Q=P[K];Q!==null&&(Q.lane&=-536870913)}a&=~Z}c!==0&&Ii(t,c,0),y!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=y&~(S&~r))}function Ii(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-ge(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|a&4194090}function St(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-ge(a),p=1<<c;p&r|t[c]&r&&(t[c]|=r),a&=~p}}function Kt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ve(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Me(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:O0(t.type))}function rn(t,r){var a=X.p;try{return X.p=t,r()}finally{X.p=a}}var Gt=Math.random().toString(36).slice(2),le="__reactFiber$"+Gt,he="__reactProps$"+Gt,Se="__reactContainer$"+Gt,dt="__reactEvents$"+Gt,Ut="__reactListeners$"+Gt,Hn="__reactHandles$"+Gt,Sn="__reactResources$"+Gt,Ct="__reactMarker$"+Gt;function Xt(t){delete t[le],delete t[he],delete t[dt],delete t[Ut],delete t[Hn]}function Ve(t){var r=t[le];if(r)return r;for(var a=t.parentNode;a;){if(r=a[Se]||a[le]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=y0(t);t!==null;){if(a=t[le])return a;t=y0(t)}return r}t=a,a=t.parentNode}return null}function Cn(t){if(t=t[le]||t[Se]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Vi(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function si(t){var r=t[Sn];return r||(r=t[Sn]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Et(t){t[Ct]=!0}var Ua=new Set,Ba={};function pr(t,r){Dr(t,r),Dr(t+"Capture",r)}function Dr(t,r){for(Ba[t]=r,t=0;t<r.length;t++)Ua.add(r[t])}var $e=RegExp("^[: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]*$"),Fn={},Cl={};function $i(t){return cn.call(Cl,t)?!0:cn.call(Fn,t)?!1:$e.test(t)?Cl[t]=!0:(Fn[t]=!0,!1)}function El(t,r,a){if($i(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function oi(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Mr(t,r,a,c){if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+c)}}var qc,im;function Al(t){if(qc===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);qc=r&&r[1]||"",im=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+qc+t+im}var Hc=!1;function Fc(t,r){if(!t||Hc)return"";Hc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(Q){var P=Q}Reflect.construct(t,[],Z)}else{try{Z.call()}catch(Q){P=Q}t.call(Z.prototype)}}else{try{throw Error()}catch(Q){P=Q}(Z=t())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(Q){if(Q&&P&&typeof Q.stack=="string")return[Q.stack,P.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),S=y[0],T=y[1];if(S&&T){var j=S.split(`
44
- `),F=T.split(`
45
- `);for(p=c=0;c<j.length&&!j[c].includes("DetermineComponentFrameRoot");)c++;for(;p<F.length&&!F[p].includes("DetermineComponentFrameRoot");)p++;if(c===j.length||p===F.length)for(c=j.length-1,p=F.length-1;1<=c&&0<=p&&j[c]!==F[p];)p--;for(;1<=c&&0<=p;c--,p--)if(j[c]!==F[p]){if(c!==1||p!==1)do if(c--,p--,0>p||j[c]!==F[p]){var K=`
46
- `+j[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=p);break}}}finally{Hc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Al(a):""}function Uw(t){switch(t.tag){case 26:case 27:case 5:return Al(t.type);case 16:return Al("Lazy");case 13:return Al("Suspense");case 19:return Al("SuspenseList");case 0:case 15:return Fc(t.type,!1);case 11:return Fc(t.type.render,!1);case 1:return Fc(t.type,!0);case 31:return Al("Activity");default:return""}}function lm(t){try{var r="";do r+=Uw(t),t=t.return;while(t);return r}catch(a){return`
47
- Error generating stack: `+a.message+`
48
- `+a.stack}}function Pn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function am(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Bw(t){var r=am(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,y=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(S){c=""+S,y.call(this,S)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function vo(t){t._valueTracker||(t._valueTracker=Bw(t))}function sm(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=am(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function xo(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}}var qw=/[\n"\\]/g;function Qn(t){return t.replace(qw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Pc(t,r,a,c,p,y,S,T){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r!=null?S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Pn(r)):t.value!==""+Pn(r)&&(t.value=""+Pn(r)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),r!=null?Qc(t,S,Pn(r)):a!=null?Qc(t,S,Pn(a)):c!=null&&t.removeAttribute("value"),p==null&&y!=null&&(t.defaultChecked=!!y),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?t.name=""+Pn(T):t.removeAttribute("name")}function om(t,r,a,c,p,y,S,T){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),r!=null||a!=null){if(!(y!=="submit"&&y!=="reset"||r!=null))return;a=a!=null?""+Pn(a):"",r=r!=null?""+Pn(r):a,T||r===t.value||(t.value=r),t.defaultValue=r}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=T?t.checked:!!c,t.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S)}function Qc(t,r,a){r==="number"&&xo(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Tl(t,r,a,c){if(t=t.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<t.length;a++)p=r.hasOwnProperty("$"+t[a].value),t[a].selected!==p&&(t[a].selected=p),p&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Pn(a),r=null,p=0;p<t.length;p++){if(t[p].value===a){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function um(t,r,a){if(r!=null&&(r=""+Pn(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+Pn(a):""}function cm(t,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(l(92));if(oe(c)){if(1<c.length)throw Error(l(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Pn(r),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c)}function kl(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var Hw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fm(t,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,a):typeof a!="number"||a===0||Hw.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function dm(t,r,a){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var p in r)c=r[p],r.hasOwnProperty(p)&&a[p]!==c&&fm(t,p,c)}else for(var y in r)r.hasOwnProperty(y)&&fm(t,y,r[y])}function Ic(t){if(t.indexOf("-")===-1)return!1;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 Fw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wo(t){return Pw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Vc=null;function $c(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _l=null,Nl=null;function hm(t){var r=Cn(t);if(r&&(t=r.stateNode)){var a=t[he]||null;e:switch(t=r.stateNode,r.type){case"input":if(Pc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Qn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var p=c[he]||null;if(!p)throw Error(l(90));Pc(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===t.form&&sm(c)}break e;case"textarea":um(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Tl(t,!!a.multiple,r,!1)}}}var Yc=!1;function pm(t,r,a){if(Yc)return t(r,a);Yc=!0;try{var c=t(r);return c}finally{if(Yc=!1,(_l!==null||Nl!==null)&&(au(),_l&&(r=_l,t=Nl,Nl=_l=null,hm(r),t)))for(r=0;r<t.length;r++)hm(t[r])}}function qa(t,r){var a=t.stateNode;if(a===null)return null;var c=a[he]||null;if(c===null)return null;a=c[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":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,r,typeof a));return a}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kc=!1;if(Lr)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){Kc=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{Kc=!1}var ui=null,Gc=null,So=null;function mm(){if(So)return So;var t,r=Gc,a=r.length,c,p="value"in ui?ui.value:ui.textContent,y=p.length;for(t=0;t<a&&r[t]===p[t];t++);var S=a-t;for(c=1;c<=S&&r[a-c]===p[y-c];c++);return So=p.slice(t,1<c?1-c:void 0)}function Co(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 Eo(){return!0}function ym(){return!1}function dn(t){function r(a,c,p,y,S){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var T in t)t.hasOwnProperty(T)&&(a=t[T],this[T]=a?a(y):y[T]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Eo:ym,this.isPropagationStopped=ym,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Eo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Eo)},persist:function(){},isPersistent:Eo}),r}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ao=dn(Yi),Fa=m({},Yi,{view:0,detail:0}),Qw=dn(Fa),Xc,Zc,Pa,To=m({},Fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,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!==Pa&&(Pa&&t.type==="mousemove"?(Xc=t.screenX-Pa.screenX,Zc=t.screenY-Pa.screenY):Zc=Xc=0,Pa=t),Xc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),gm=dn(To),Iw=m({},To,{dataTransfer:0}),Vw=dn(Iw),$w=m({},Fa,{relatedTarget:0}),Jc=dn($w),Yw=m({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),Kw=dn(Yw),Gw=m({},Yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Xw=dn(Gw),Zw=m({},Yi,{data:0}),bm=dn(Zw),Jw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ww={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"},eS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=eS[t])?!!r[t]:!1}function Wc(){return tS}var nS=m({},Fa,{key:function(t){if(t.key){var r=Jw[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Co(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ww[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?Co(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Co(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),rS=dn(nS),iS=m({},To,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=dn(iS),lS=m({},Fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),aS=dn(lS),sS=m({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=dn(sS),uS=m({},To,{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}),cS=dn(uS),fS=m({},Yi,{newState:0,oldState:0}),dS=dn(fS),hS=[9,13,27,32],ef=Lr&&"CompositionEvent"in window,Qa=null;Lr&&"documentMode"in document&&(Qa=document.documentMode);var pS=Lr&&"TextEvent"in window&&!Qa,xm=Lr&&(!ef||Qa&&8<Qa&&11>=Qa),wm=" ",Sm=!1;function Cm(t,r){switch(t){case"keyup":return hS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Em(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Rl=!1;function mS(t,r){switch(t){case"compositionend":return Em(r);case"keypress":return r.which!==32?null:(Sm=!0,wm);case"textInput":return t=r.data,t===wm&&Sm?null:t;default:return null}}function yS(t,r){if(Rl)return t==="compositionend"||!ef&&Cm(t,r)?(t=mm(),So=Gc=ui=null,Rl=!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 xm&&r.locale!=="ko"?null:r.data;default:return null}}var gS={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 Am(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!gS[t.type]:r==="textarea"}function Tm(t,r,a,c){_l?Nl?Nl.push(c):Nl=[c]:_l=c,r=du(r,"onChange"),0<r.length&&(a=new Ao("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Ia=null,Va=null;function bS(t){a0(t,0)}function ko(t){var r=Vi(t);if(sm(r))return t}function km(t,r){if(t==="change")return r}var _m=!1;if(Lr){var tf;if(Lr){var nf="oninput"in document;if(!nf){var Nm=document.createElement("div");Nm.setAttribute("oninput","return;"),nf=typeof Nm.oninput=="function"}tf=nf}else tf=!1;_m=tf&&(!document.documentMode||9<document.documentMode)}function Rm(){Ia&&(Ia.detachEvent("onpropertychange",Om),Va=Ia=null)}function Om(t){if(t.propertyName==="value"&&ko(Va)){var r=[];Tm(r,Va,t,$c(t)),pm(bS,r)}}function vS(t,r,a){t==="focusin"?(Rm(),Ia=r,Va=a,Ia.attachEvent("onpropertychange",Om)):t==="focusout"&&Rm()}function xS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ko(Va)}function wS(t,r){if(t==="click")return ko(r)}function SS(t,r){if(t==="input"||t==="change")return ko(r)}function CS(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var En=typeof Object.is=="function"?Object.is:CS;function $a(t,r){if(En(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!cn.call(r,p)||!En(t[p],r[p]))return!1}return!0}function jm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Dm(t,r){var a=jm(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=jm(a)}}function Mm(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Mm(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Lm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=xo(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=xo(t.document)}return r}function rf(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")}var ES=Lr&&"documentMode"in document&&11>=document.documentMode,Ol=null,lf=null,Ya=null,af=!1;function zm(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;af||Ol==null||Ol!==xo(c)||(c=Ol,"selectionStart"in c&&rf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ya&&$a(Ya,c)||(Ya=c,c=du(lf,"onSelect"),0<c.length&&(r=new Ao("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=Ol)))}function Ki(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var jl={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},sf={},Um={};Lr&&(Um=document.createElement("div").style,"AnimationEvent"in window||(delete jl.animationend.animation,delete jl.animationiteration.animation,delete jl.animationstart.animation),"TransitionEvent"in window||delete jl.transitionend.transition);function Gi(t){if(sf[t])return sf[t];if(!jl[t])return t;var r=jl[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in Um)return sf[t]=r[a];return t}var Bm=Gi("animationend"),qm=Gi("animationiteration"),Hm=Gi("animationstart"),AS=Gi("transitionrun"),TS=Gi("transitionstart"),kS=Gi("transitioncancel"),Fm=Gi("transitionend"),Pm=new Map,of="abort auxClick beforeToggle 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(" ");of.push("scrollEnd");function rr(t,r){Pm.set(t,r),pr(r,[t])}var Qm=new WeakMap;function In(t,r){if(typeof t=="object"&&t!==null){var a=Qm.get(t);return a!==void 0?a:(r={value:t,source:r,stack:lm(r)},Qm.set(t,r),r)}return{value:t,source:r,stack:lm(r)}}var Vn=[],Dl=0,uf=0;function _o(){for(var t=Dl,r=uf=Dl=0;r<t;){var a=Vn[r];Vn[r++]=null;var c=Vn[r];Vn[r++]=null;var p=Vn[r];Vn[r++]=null;var y=Vn[r];if(Vn[r++]=null,c!==null&&p!==null){var S=c.pending;S===null?p.next=p:(p.next=S.next,S.next=p),c.pending=p}y!==0&&Im(a,p,y)}}function No(t,r,a,c){Vn[Dl++]=t,Vn[Dl++]=r,Vn[Dl++]=a,Vn[Dl++]=c,uf|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function cf(t,r,a,c){return No(t,r,a,c),Ro(t)}function Ml(t,r){return No(t,null,null,r),Ro(t)}function Im(t,r,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var p=!1,y=t.return;y!==null;)y.childLanes|=a,c=y.alternate,c!==null&&(c.childLanes|=a),y.tag===22&&(t=y.stateNode,t===null||t._visibility&1||(p=!0)),t=y,y=y.return;return t.tag===3?(y=t.stateNode,p&&r!==null&&(p=31-ge(a),t=y.hiddenUpdates,c=t[p],c===null?t[p]=[r]:c.push(r),r.lane=a|536870912),y):null}function Ro(t){if(50<bs)throw bs=0,yd=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Ll={};function _S(t,r,a,c){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(t,r,a,c){return new _S(t,r,a,c)}function ff(t){return t=t.prototype,!(!t||!t.isReactComponent)}function zr(t,r){var a=t.alternate;return a===null?(a=An(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Vm(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Oo(t,r,a,c,p,y){var S=0;if(c=t,typeof t=="function")ff(t)&&(S=1);else if(typeof t=="string")S=R2(t,a,fe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ie:return t=An(31,a,r,p),t.elementType=ie,t.lanes=y,t;case w:return Xi(a.children,p,y,r);case A:S=8,p|=24;break;case _:return t=An(12,a,r,p|2),t.elementType=_,t.lanes=y,t;case M:return t=An(13,a,r,p),t.elementType=M,t.lanes=y,t;case D:return t=An(19,a,r,p),t.elementType=D,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:case R:S=10;break e;case O:S=9;break e;case q:S=11;break e;case $:S=14;break e;case ee:S=16,c=null;break e}S=29,a=Error(l(130,t===null?"null":typeof t,"")),c=null}return r=An(S,a,r,p),r.elementType=t,r.type=c,r.lanes=y,r}function Xi(t,r,a,c){return t=An(7,t,c,r),t.lanes=a,t}function df(t,r,a){return t=An(6,t,null,r),t.lanes=a,t}function hf(t,r,a){return r=An(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var zl=[],Ul=0,jo=null,Do=0,$n=[],Yn=0,Zi=null,Ur=1,Br="";function Ji(t,r){zl[Ul++]=Do,zl[Ul++]=jo,jo=t,Do=r}function $m(t,r,a){$n[Yn++]=Ur,$n[Yn++]=Br,$n[Yn++]=Zi,Zi=t;var c=Ur;t=Br;var p=32-ge(c)-1;c&=~(1<<p),a+=1;var y=32-ge(r)+p;if(30<y){var S=p-p%5;y=(c&(1<<S)-1).toString(32),c>>=S,p-=S,Ur=1<<32-ge(r)+p|a<<p|c,Br=y+t}else Ur=1<<y|a<<p|c,Br=t}function pf(t){t.return!==null&&(Ji(t,1),$m(t,1,0))}function mf(t){for(;t===jo;)jo=zl[--Ul],zl[Ul]=null,Do=zl[--Ul],zl[Ul]=null;for(;t===Zi;)Zi=$n[--Yn],$n[Yn]=null,Br=$n[--Yn],$n[Yn]=null,Ur=$n[--Yn],$n[Yn]=null}var ln=null,bt=null,Ye=!1,Wi=null,mr=!1,yf=Error(l(519));function el(t){var r=Error(l(418,""));throw Xa(In(r,t)),yf}function Ym(t){var r=t.stateNode,a=t.type,c=t.memoizedProps;switch(r[le]=t,r[he]=c,a){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(a=0;a<xs.length;a++)ze(xs[a],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":ze("invalid",r),om(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),vo(r);break;case"select":ze("invalid",r);break;case"textarea":ze("invalid",r),cm(r,c.value,c.defaultValue,c.children),vo(r)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||c0(r.textContent,a)?(c.popover!=null&&(ze("beforetoggle",r),ze("toggle",r)),c.onScroll!=null&&ze("scroll",r),c.onScrollEnd!=null&&ze("scrollend",r),c.onClick!=null&&(r.onclick=hu),r=!0):r=!1,r||el(t)}function Km(t){for(ln=t.return;ln;)switch(ln.tag){case 5:case 13:mr=!1;return;case 27:case 3:mr=!0;return;default:ln=ln.return}}function Ka(t){if(t!==ln)return!1;if(!Ye)return Km(t),Ye=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||jd(t.type,t.memoizedProps)),a=!a),a&&bt&&el(t),Km(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(a=t.data,a==="/$"){if(r===0){bt=lr(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++;t=t.nextSibling}bt=null}}else r===27?(r=bt,Ai(t.type)?(t=zd,zd=null,bt=t):bt=r):bt=ln?lr(t.stateNode.nextSibling):null;return!0}function Ga(){bt=ln=null,Ye=!1}function Gm(){var t=Wi;return t!==null&&(mn===null?mn=t:mn.push.apply(mn,t),Wi=null),t}function Xa(t){Wi===null?Wi=[t]:Wi.push(t)}var gf=I(null),tl=null,qr=null;function ci(t,r,a){N(gf,r._currentValue),r._currentValue=a}function Hr(t){t._currentValue=gf.current,se(gf)}function bf(t,r,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===a)break;t=t.return}}function vf(t,r,a,c){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var y=p.dependencies;if(y!==null){var S=p.child;y=y.firstContext;e:for(;y!==null;){var T=y;y=p;for(var j=0;j<r.length;j++)if(T.context===r[j]){y.lanes|=a,T=y.alternate,T!==null&&(T.lanes|=a),bf(y.return,a,t),c||(S=null);break e}y=T.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(l(341));S.lanes|=a,y=S.alternate,y!==null&&(y.lanes|=a),bf(S,a,t),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===t){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function Za(t,r,a,c){t=null;for(var p=r,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(l(387));if(S=S.memoizedProps,S!==null){var T=p.type;En(p.pendingProps.value,S.value)||(t!==null?t.push(T):t=[T])}}else if(p===ct.current){if(S=p.alternate,S===null)throw Error(l(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(Ts):t=[Ts])}p=p.return}t!==null&&vf(r,t,a,c),r.flags|=262144}function Mo(t){for(t=t.firstContext;t!==null;){if(!En(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function nl(t){tl=t,qr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Zt(t){return Xm(tl,t)}function Lo(t,r){return tl===null&&nl(t),Xm(t,r)}function Xm(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},qr===null){if(t===null)throw Error(l(308));qr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else qr=qr.next=r;return a}var NS=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},RS=e.unstable_scheduleCallback,OS=e.unstable_NormalPriority,Ot={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xf(){return{controller:new NS,data:new Map,refCount:0}}function Ja(t){t.refCount--,t.refCount===0&&RS(OS,function(){t.controller.abort()})}var Wa=null,wf=0,Bl=0,ql=null;function jS(t,r){if(Wa===null){var a=Wa=[];wf=0,Bl=Cd(),ql={status:"pending",value:void 0,then:function(c){a.push(c)}}}return wf++,r.then(Zm,Zm),r}function Zm(){if(--wf===0&&Wa!==null){ql!==null&&(ql.status="fulfilled");var t=Wa;Wa=null,Bl=0,ql=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function DS(t,r){var a=[],c={status:"pending",value:null,reason:null,then:function(p){a.push(p)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var p=0;p<a.length;p++)(0,a[p])(r)},function(p){for(c.status="rejected",c.reason=p,p=0;p<a.length;p++)(0,a[p])(void 0)}),c}var Jm=B.S;B.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&jS(t,r),Jm!==null&&Jm(t,r)};var rl=I(null);function Sf(){var t=rl.current;return t!==null?t:it.pooledCache}function zo(t,r){r===null?N(rl,rl.current):N(rl,r.pool)}function Wm(){var t=Sf();return t===null?null:{parent:Ot._currentValue,pool:t}}var es=Error(l(460)),ey=Error(l(474)),Uo=Error(l(542)),Cf={then:function(){}};function ty(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Bo(){}function ny(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Bo,Bo),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,iy(t),t;default:if(typeof r.status=="string")r.then(Bo,Bo);else{if(t=it,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=c}},function(c){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,iy(t),t}throw ts=r,es}}var ts=null;function ry(){if(ts===null)throw Error(l(459));var t=ts;return ts=null,t}function iy(t){if(t===es||t===Uo)throw Error(l(483))}var fi=!1;function Ef(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Af(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function di(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function hi(t,r,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ge&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,r=Ro(t),Im(t,null,a),r}return No(t,c,r,a),Ro(t)}function ns(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,St(t,a)}}function Tf(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};y===null?p=y=S:y=y.next=S,a=a.next}while(a!==null);y===null?p=y=r:y=y.next=r}else p=y=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var kf=!1;function rs(){if(kf){var t=ql;if(t!==null)throw t}}function is(t,r,a,c){kf=!1;var p=t.updateQueue;fi=!1;var y=p.firstBaseUpdate,S=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var j=T,F=j.next;j.next=null,S===null?y=F:S.next=F,S=j;var K=t.alternate;K!==null&&(K=K.updateQueue,T=K.lastBaseUpdate,T!==S&&(T===null?K.firstBaseUpdate=F:T.next=F,K.lastBaseUpdate=j))}if(y!==null){var Z=p.baseState;S=0,K=F=j=null,T=y;do{var P=T.lane&-536870913,Q=P!==T.lane;if(Q?(He&P)===P:(c&P)===P){P!==0&&P===Bl&&(kf=!0),K!==null&&(K=K.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Ee=t,we=T;P=r;var et=a;switch(we.tag){case 1:if(Ee=we.payload,typeof Ee=="function"){Z=Ee.call(et,Z,P);break e}Z=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=we.payload,P=typeof Ee=="function"?Ee.call(et,Z,P):Ee,P==null)break e;Z=m({},Z,P);break e;case 2:fi=!0}}P=T.callback,P!==null&&(t.flags|=64,Q&&(t.flags|=8192),Q=p.callbacks,Q===null?p.callbacks=[P]:Q.push(P))}else Q={lane:P,tag:T.tag,payload:T.payload,callback:T.callback,next:null},K===null?(F=K=Q,j=Z):K=K.next=Q,S|=P;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;Q=T,T=Q.next,Q.next=null,p.lastBaseUpdate=Q,p.shared.pending=null}}while(!0);K===null&&(j=Z),p.baseState=j,p.firstBaseUpdate=F,p.lastBaseUpdate=K,y===null&&(p.shared.lanes=0),wi|=S,t.lanes=S,t.memoizedState=Z}}function ly(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function ay(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)ly(a[t],r)}var Hl=I(null),qo=I(0);function sy(t,r){t=Yr,N(qo,t),N(Hl,r),Yr=t|r.baseLanes}function _f(){N(qo,Yr),N(Hl,Hl.current)}function Nf(){Yr=qo.current,se(Hl),se(qo)}var pi=0,Oe=null,Je=null,kt=null,Ho=!1,Fl=!1,il=!1,Fo=0,ls=0,Pl=null,MS=0;function At(){throw Error(l(321))}function Rf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!En(t[a],r[a]))return!1;return!0}function Of(t,r,a,c,p,y){return pi=y,Oe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=t===null||t.memoizedState===null?Iy:Vy,il=!1,y=a(c,p),il=!1,Fl&&(y=uy(r,a,c,p)),oy(t),y}function oy(t){B.H=Yo;var r=Je!==null&&Je.next!==null;if(pi=0,kt=Je=Oe=null,Ho=!1,ls=0,Pl=null,r)throw Error(l(300));t===null||Bt||(t=t.dependencies,t!==null&&Mo(t)&&(Bt=!0))}function uy(t,r,a,c){Oe=t;var p=0;do{if(Fl&&(Pl=null),ls=0,Fl=!1,25<=p)throw Error(l(301));if(p+=1,kt=Je=null,t.updateQueue!=null){var y=t.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}B.H=FS,y=r(a,c)}while(Fl);return y}function LS(){var t=B.H,r=t.useState()[0];return r=typeof r.then=="function"?as(r):r,t=t.useState()[0],(Je!==null?Je.memoizedState:null)!==t&&(Oe.flags|=1024),r}function jf(){var t=Fo!==0;return Fo=0,t}function Df(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function Mf(t){if(Ho){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ho=!1}pi=0,kt=Je=Oe=null,Fl=!1,ls=Fo=0,Pl=null}function hn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?Oe.memoizedState=kt=t:kt=kt.next=t,kt}function _t(){if(Je===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=Je.next;var r=kt===null?Oe.memoizedState:kt.next;if(r!==null)kt=r,Je=t;else{if(t===null)throw Oe.alternate===null?Error(l(467)):Error(l(310));Je=t,t={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},kt===null?Oe.memoizedState=kt=t:kt=kt.next=t}return kt}function Lf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(t){var r=ls;return ls+=1,Pl===null&&(Pl=[]),t=ny(Pl,t,r),r=Oe,(kt===null?r.memoizedState:kt.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Iy:Vy),t}function Po(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return as(t);if(t.$$typeof===R)return Zt(t)}throw Error(l(438,String(t)))}function zf(t){var r=null,a=Oe.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=Oe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Lf(),Oe.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),c=0;c<t;c++)a[c]=z;return r.index++,a}function Fr(t,r){return typeof r=="function"?r(t):r}function Qo(t){var r=_t();return Uf(r,Je,t)}function Uf(t,r,a){var c=t.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=a;var p=t.baseQueue,y=c.pending;if(y!==null){if(p!==null){var S=p.next;p.next=y.next,y.next=S}r.baseQueue=p=y,c.pending=null}if(y=t.baseState,p===null)t.memoizedState=y;else{r=p.next;var T=S=null,j=null,F=r,K=!1;do{var Z=F.lane&-536870913;if(Z!==F.lane?(He&Z)===Z:(pi&Z)===Z){var P=F.revertLane;if(P===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),Z===Bl&&(K=!0);else if((pi&P)===P){F=F.next,P===Bl&&(K=!0);continue}else Z={lane:0,revertLane:F.revertLane,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},j===null?(T=j=Z,S=y):j=j.next=Z,Oe.lanes|=P,wi|=P;Z=F.action,il&&a(y,Z),y=F.hasEagerState?F.eagerState:a(y,Z)}else P={lane:Z,revertLane:F.revertLane,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},j===null?(T=j=P,S=y):j=j.next=P,Oe.lanes|=Z,wi|=Z;F=F.next}while(F!==null&&F!==r);if(j===null?S=y:j.next=T,!En(y,t.memoizedState)&&(Bt=!0,K&&(a=ql,a!==null)))throw a;t.memoizedState=y,t.baseState=S,t.baseQueue=j,c.lastRenderedState=y}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Bf(t){var r=_t(),a=r.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var c=a.dispatch,p=a.pending,y=r.memoizedState;if(p!==null){a.pending=null;var S=p=p.next;do y=t(y,S.action),S=S.next;while(S!==p);En(y,r.memoizedState)||(Bt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),a.lastRenderedState=y}return[y,c]}function cy(t,r,a){var c=Oe,p=_t(),y=Ye;if(y){if(a===void 0)throw Error(l(407));a=a()}else a=r();var S=!En((Je||p).memoizedState,a);S&&(p.memoizedState=a,Bt=!0),p=p.queue;var T=hy.bind(null,c,p,t);if(ss(2048,8,T,[t]),p.getSnapshot!==r||S||kt!==null&&kt.memoizedState.tag&1){if(c.flags|=2048,Ql(9,Io(),dy.bind(null,c,p,a,r),null),it===null)throw Error(l(349));y||(pi&124)!==0||fy(c,r,a)}return a}function fy(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Oe.updateQueue,r===null?(r=Lf(),Oe.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function dy(t,r,a,c){r.value=a,r.getSnapshot=c,py(r)&&my(t)}function hy(t,r,a){return a(function(){py(r)&&my(t)})}function py(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!En(t,a)}catch{return!0}}function my(t){var r=Ml(t,2);r!==null&&Rn(r,t,2)}function qf(t){var r=hn();if(typeof t=="function"){var a=t;if(t=a(),il){ye(!0);try{a()}finally{ye(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:t},r}function yy(t,r,a,c){return t.baseState=a,Uf(t,Je,typeof c=="function"?c:Fr)}function zS(t,r,a,c,p){if($o(t))throw Error(l(485));if(t=r.action,t!==null){var y={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){y.listeners.push(S)}};B.T!==null?a(!0):y.isTransition=!1,c(y),a=r.pending,a===null?(y.next=r.pending=y,gy(r,y)):(y.next=a.next,r.pending=a.next=y)}}function gy(t,r){var a=r.action,c=r.payload,p=t.state;if(r.isTransition){var y=B.T,S={};B.T=S;try{var T=a(p,c),j=B.S;j!==null&&j(S,T),by(t,r,T)}catch(F){Hf(t,r,F)}finally{B.T=y}}else try{y=a(p,c),by(t,r,y)}catch(F){Hf(t,r,F)}}function by(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){vy(t,r,c)},function(c){return Hf(t,r,c)}):vy(t,r,a)}function vy(t,r,a){r.status="fulfilled",r.value=a,xy(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,gy(t,a)))}function Hf(t,r,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,xy(r),r=r.next;while(r!==c)}t.action=null}function xy(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function wy(t,r){return r}function Sy(t,r){if(Ye){var a=it.formState;if(a!==null){e:{var c=Oe;if(Ye){if(bt){t:{for(var p=bt,y=mr;p.nodeType!==8;){if(!y){p=null;break t}if(p=lr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){bt=lr(p.nextSibling),c=p.data==="F!";break e}}el(c)}c=!1}c&&(r=a[0])}}return a=hn(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wy,lastRenderedState:r},a.queue=c,a=Fy.bind(null,Oe,c),c.dispatch=a,c=qf(!1),y=Vf.bind(null,Oe,!1,c.queue),c=hn(),p={state:r,dispatch:null,action:t,pending:null},c.queue=p,a=zS.bind(null,Oe,p,y,a),p.dispatch=a,c.memoizedState=t,[r,a,!1]}function Cy(t){var r=_t();return Ey(r,Je,t)}function Ey(t,r,a){if(r=Uf(t,r,wy)[0],t=Qo(Fr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=as(r)}catch(S){throw S===es?Uo:S}else c=r;r=_t();var p=r.queue,y=p.dispatch;return a!==r.memoizedState&&(Oe.flags|=2048,Ql(9,Io(),US.bind(null,p,a),null)),[c,y,t]}function US(t,r){t.action=r}function Ay(t){var r=_t(),a=Je;if(a!==null)return Ey(r,a,t);_t(),r=r.memoizedState,a=_t();var c=a.queue.dispatch;return a.memoizedState=t,[r,c,!1]}function Ql(t,r,a,c){return t={tag:t,create:a,deps:c,inst:r,next:null},r=Oe.updateQueue,r===null&&(r=Lf(),Oe.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t),t}function Io(){return{destroy:void 0,resource:void 0}}function Ty(){return _t().memoizedState}function Vo(t,r,a,c){var p=hn();c=c===void 0?null:c,Oe.flags|=t,p.memoizedState=Ql(1|r,Io(),a,c)}function ss(t,r,a,c){var p=_t();c=c===void 0?null:c;var y=p.memoizedState.inst;Je!==null&&c!==null&&Rf(c,Je.memoizedState.deps)?p.memoizedState=Ql(r,y,a,c):(Oe.flags|=t,p.memoizedState=Ql(1|r,y,a,c))}function ky(t,r){Vo(8390656,8,t,r)}function _y(t,r){ss(2048,8,t,r)}function Ny(t,r){return ss(4,2,t,r)}function Ry(t,r){return ss(4,4,t,r)}function Oy(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function jy(t,r,a){a=a!=null?a.concat([t]):null,ss(4,4,Oy.bind(null,r,t),a)}function Ff(){}function Dy(t,r){var a=_t();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&Rf(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function My(t,r){var a=_t();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&Rf(r,c[1]))return c[0];if(c=t(),il){ye(!0);try{t()}finally{ye(!1)}}return a.memoizedState=[c,r],c}function Pf(t,r,a){return a===void 0||(pi&1073741824)!==0?t.memoizedState=r:(t.memoizedState=a,t=Ug(),Oe.lanes|=t,wi|=t,a)}function Ly(t,r,a,c){return En(a,r)?a:Hl.current!==null?(t=Pf(t,a,c),En(t,r)||(Bt=!0),t):(pi&42)===0?(Bt=!0,t.memoizedState=a):(t=Ug(),Oe.lanes|=t,wi|=t,r)}function zy(t,r,a,c,p){var y=X.p;X.p=y!==0&&8>y?y:8;var S=B.T,T={};B.T=T,Vf(t,!1,r,a);try{var j=p(),F=B.S;if(F!==null&&F(T,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var K=DS(j,c);os(t,r,K,Nn(t))}else os(t,r,c,Nn(t))}catch(Z){os(t,r,{then:function(){},status:"rejected",reason:Z},Nn())}finally{X.p=y,B.T=S}}function BS(){}function Qf(t,r,a,c){if(t.tag!==5)throw Error(l(476));var p=Uy(t).queue;zy(t,p,r,ne,a===null?BS:function(){return By(t),a(c)})}function Uy(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:ne},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function By(t){var r=Uy(t).next.queue;os(t,r,{},Nn())}function If(){return Zt(Ts)}function qy(){return _t().memoizedState}function Hy(){return _t().memoizedState}function qS(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=Nn();t=di(a);var c=hi(r,t,a);c!==null&&(Rn(c,r,a),ns(c,r,a)),r={cache:xf()},t.payload=r;return}r=r.return}}function HS(t,r,a){var c=Nn();a={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},$o(t)?Py(r,a):(a=cf(t,r,a,c),a!==null&&(Rn(a,t,c),Qy(a,r,c)))}function Fy(t,r,a){var c=Nn();os(t,r,a,c)}function os(t,r,a,c){var p={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if($o(t))Py(r,p);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var S=r.lastRenderedState,T=y(S,a);if(p.hasEagerState=!0,p.eagerState=T,En(T,S))return No(t,r,p,0),it===null&&_o(),!1}catch{}finally{}if(a=cf(t,r,p,c),a!==null)return Rn(a,t,c),Qy(a,r,c),!0}return!1}function Vf(t,r,a,c){if(c={lane:2,revertLane:Cd(),action:c,hasEagerState:!1,eagerState:null,next:null},$o(t)){if(r)throw Error(l(479))}else r=cf(t,a,c,2),r!==null&&Rn(r,t,2)}function $o(t){var r=t.alternate;return t===Oe||r!==null&&r===Oe}function Py(t,r){Fl=Ho=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Qy(t,r,a){if((a&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,St(t,a)}}var Yo={readContext:Zt,use:Po,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At},Iy={readContext:Zt,use:Po,useCallback:function(t,r){return hn().memoizedState=[t,r===void 0?null:r],t},useContext:Zt,useEffect:ky,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Vo(4194308,4,Oy.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Vo(4194308,4,t,r)},useInsertionEffect:function(t,r){Vo(4,2,t,r)},useMemo:function(t,r){var a=hn();r=r===void 0?null:r;var c=t();if(il){ye(!0);try{t()}finally{ye(!1)}}return a.memoizedState=[c,r],c},useReducer:function(t,r,a){var c=hn();if(a!==void 0){var p=a(r);if(il){ye(!0);try{a(r)}finally{ye(!1)}}}else p=r;return c.memoizedState=c.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},c.queue=t,t=t.dispatch=HS.bind(null,Oe,t),[c.memoizedState,t]},useRef:function(t){var r=hn();return t={current:t},r.memoizedState=t},useState:function(t){t=qf(t);var r=t.queue,a=Fy.bind(null,Oe,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Ff,useDeferredValue:function(t,r){var a=hn();return Pf(a,t,r)},useTransition:function(){var t=qf(!1);return t=zy.bind(null,Oe,t.queue,!0,!1),hn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var c=Oe,p=hn();if(Ye){if(a===void 0)throw Error(l(407));a=a()}else{if(a=r(),it===null)throw Error(l(349));(He&124)!==0||fy(c,r,a)}p.memoizedState=a;var y={value:a,getSnapshot:r};return p.queue=y,ky(hy.bind(null,c,y,t),[t]),c.flags|=2048,Ql(9,Io(),dy.bind(null,c,y,a,r),null),a},useId:function(){var t=hn(),r=it.identifierPrefix;if(Ye){var a=Br,c=Ur;a=(c&~(1<<32-ge(c)-1)).toString(32)+a,r="«"+r+"R"+a,a=Fo++,0<a&&(r+="H"+a.toString(32)),r+="»"}else a=MS++,r="«"+r+"r"+a.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:If,useFormState:Sy,useActionState:Sy,useOptimistic:function(t){var r=hn();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Vf.bind(null,Oe,!0,a),a.dispatch=r,[t,r]},useMemoCache:zf,useCacheRefresh:function(){return hn().memoizedState=qS.bind(null,Oe)}},Vy={readContext:Zt,use:Po,useCallback:Dy,useContext:Zt,useEffect:_y,useImperativeHandle:jy,useInsertionEffect:Ny,useLayoutEffect:Ry,useMemo:My,useReducer:Qo,useRef:Ty,useState:function(){return Qo(Fr)},useDebugValue:Ff,useDeferredValue:function(t,r){var a=_t();return Ly(a,Je.memoizedState,t,r)},useTransition:function(){var t=Qo(Fr)[0],r=_t().memoizedState;return[typeof t=="boolean"?t:as(t),r]},useSyncExternalStore:cy,useId:qy,useHostTransitionStatus:If,useFormState:Cy,useActionState:Cy,useOptimistic:function(t,r){var a=_t();return yy(a,Je,t,r)},useMemoCache:zf,useCacheRefresh:Hy},FS={readContext:Zt,use:Po,useCallback:Dy,useContext:Zt,useEffect:_y,useImperativeHandle:jy,useInsertionEffect:Ny,useLayoutEffect:Ry,useMemo:My,useReducer:Bf,useRef:Ty,useState:function(){return Bf(Fr)},useDebugValue:Ff,useDeferredValue:function(t,r){var a=_t();return Je===null?Pf(a,t,r):Ly(a,Je.memoizedState,t,r)},useTransition:function(){var t=Bf(Fr)[0],r=_t().memoizedState;return[typeof t=="boolean"?t:as(t),r]},useSyncExternalStore:cy,useId:qy,useHostTransitionStatus:If,useFormState:Ay,useActionState:Ay,useOptimistic:function(t,r){var a=_t();return Je!==null?yy(a,Je,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:zf,useCacheRefresh:Hy},Il=null,us=0;function Ko(t){var r=us;return us+=1,Il===null&&(Il=[]),ny(Il,t,r)}function cs(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Go(t,r){throw r.$$typeof===g?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function $y(t){var r=t._init;return r(t._payload)}function Yy(t){function r(U,L){if(t){var H=U.deletions;H===null?(U.deletions=[L],U.flags|=16):H.push(L)}}function a(U,L){if(!t)return null;for(;L!==null;)r(U,L),L=L.sibling;return null}function c(U){for(var L=new Map;U!==null;)U.key!==null?L.set(U.key,U):L.set(U.index,U),U=U.sibling;return L}function p(U,L){return U=zr(U,L),U.index=0,U.sibling=null,U}function y(U,L,H){return U.index=H,t?(H=U.alternate,H!==null?(H=H.index,H<L?(U.flags|=67108866,L):H):(U.flags|=67108866,L)):(U.flags|=1048576,L)}function S(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function T(U,L,H,G){return L===null||L.tag!==6?(L=df(H,U.mode,G),L.return=U,L):(L=p(L,H),L.return=U,L)}function j(U,L,H,G){var de=H.type;return de===w?K(U,L,H.props.children,G,H.key):L!==null&&(L.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===ee&&$y(de)===L.type)?(L=p(L,H.props),cs(L,H),L.return=U,L):(L=Oo(H.type,H.key,H.props,null,U.mode,G),cs(L,H),L.return=U,L)}function F(U,L,H,G){return L===null||L.tag!==4||L.stateNode.containerInfo!==H.containerInfo||L.stateNode.implementation!==H.implementation?(L=hf(H,U.mode,G),L.return=U,L):(L=p(L,H.children||[]),L.return=U,L)}function K(U,L,H,G,de){return L===null||L.tag!==7?(L=Xi(H,U.mode,G,de),L.return=U,L):(L=p(L,H),L.return=U,L)}function Z(U,L,H){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=df(""+L,U.mode,H),L.return=U,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case x:return H=Oo(L.type,L.key,L.props,null,U.mode,H),cs(H,L),H.return=U,H;case v:return L=hf(L,U.mode,H),L.return=U,L;case ee:var G=L._init;return L=G(L._payload),Z(U,L,H)}if(oe(L)||te(L))return L=Xi(L,U.mode,H,null),L.return=U,L;if(typeof L.then=="function")return Z(U,Ko(L),H);if(L.$$typeof===R)return Z(U,Lo(U,L),H);Go(U,L)}return null}function P(U,L,H,G){var de=L!==null?L.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return de!==null?null:T(U,L,""+H,G);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return H.key===de?j(U,L,H,G):null;case v:return H.key===de?F(U,L,H,G):null;case ee:return de=H._init,H=de(H._payload),P(U,L,H,G)}if(oe(H)||te(H))return de!==null?null:K(U,L,H,G,null);if(typeof H.then=="function")return P(U,L,Ko(H),G);if(H.$$typeof===R)return P(U,L,Lo(U,H),G);Go(U,H)}return null}function Q(U,L,H,G,de){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return U=U.get(H)||null,T(L,U,""+G,de);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return U=U.get(G.key===null?H:G.key)||null,j(L,U,G,de);case v:return U=U.get(G.key===null?H:G.key)||null,F(L,U,G,de);case ee:var je=G._init;return G=je(G._payload),Q(U,L,H,G,de)}if(oe(G)||te(G))return U=U.get(H)||null,K(L,U,G,de,null);if(typeof G.then=="function")return Q(U,L,H,Ko(G),de);if(G.$$typeof===R)return Q(U,L,H,Lo(L,G),de);Go(L,G)}return null}function Ee(U,L,H,G){for(var de=null,je=null,be=L,Ce=L=0,Ht=null;be!==null&&Ce<H.length;Ce++){be.index>Ce?(Ht=be,be=null):Ht=be.sibling;var Qe=P(U,be,H[Ce],G);if(Qe===null){be===null&&(be=Ht);break}t&&be&&Qe.alternate===null&&r(U,be),L=y(Qe,L,Ce),je===null?de=Qe:je.sibling=Qe,je=Qe,be=Ht}if(Ce===H.length)return a(U,be),Ye&&Ji(U,Ce),de;if(be===null){for(;Ce<H.length;Ce++)be=Z(U,H[Ce],G),be!==null&&(L=y(be,L,Ce),je===null?de=be:je.sibling=be,je=be);return Ye&&Ji(U,Ce),de}for(be=c(be);Ce<H.length;Ce++)Ht=Q(be,U,Ce,H[Ce],G),Ht!==null&&(t&&Ht.alternate!==null&&be.delete(Ht.key===null?Ce:Ht.key),L=y(Ht,L,Ce),je===null?de=Ht:je.sibling=Ht,je=Ht);return t&&be.forEach(function(Ri){return r(U,Ri)}),Ye&&Ji(U,Ce),de}function we(U,L,H,G){if(H==null)throw Error(l(151));for(var de=null,je=null,be=L,Ce=L=0,Ht=null,Qe=H.next();be!==null&&!Qe.done;Ce++,Qe=H.next()){be.index>Ce?(Ht=be,be=null):Ht=be.sibling;var Ri=P(U,be,Qe.value,G);if(Ri===null){be===null&&(be=Ht);break}t&&be&&Ri.alternate===null&&r(U,be),L=y(Ri,L,Ce),je===null?de=Ri:je.sibling=Ri,je=Ri,be=Ht}if(Qe.done)return a(U,be),Ye&&Ji(U,Ce),de;if(be===null){for(;!Qe.done;Ce++,Qe=H.next())Qe=Z(U,Qe.value,G),Qe!==null&&(L=y(Qe,L,Ce),je===null?de=Qe:je.sibling=Qe,je=Qe);return Ye&&Ji(U,Ce),de}for(be=c(be);!Qe.done;Ce++,Qe=H.next())Qe=Q(be,U,Ce,Qe.value,G),Qe!==null&&(t&&Qe.alternate!==null&&be.delete(Qe.key===null?Ce:Qe.key),L=y(Qe,L,Ce),je===null?de=Qe:je.sibling=Qe,je=Qe);return t&&be.forEach(function(P2){return r(U,P2)}),Ye&&Ji(U,Ce),de}function et(U,L,H,G){if(typeof H=="object"&&H!==null&&H.type===w&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case x:e:{for(var de=H.key;L!==null;){if(L.key===de){if(de=H.type,de===w){if(L.tag===7){a(U,L.sibling),G=p(L,H.props.children),G.return=U,U=G;break e}}else if(L.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===ee&&$y(de)===L.type){a(U,L.sibling),G=p(L,H.props),cs(G,H),G.return=U,U=G;break e}a(U,L);break}else r(U,L);L=L.sibling}H.type===w?(G=Xi(H.props.children,U.mode,G,H.key),G.return=U,U=G):(G=Oo(H.type,H.key,H.props,null,U.mode,G),cs(G,H),G.return=U,U=G)}return S(U);case v:e:{for(de=H.key;L!==null;){if(L.key===de)if(L.tag===4&&L.stateNode.containerInfo===H.containerInfo&&L.stateNode.implementation===H.implementation){a(U,L.sibling),G=p(L,H.children||[]),G.return=U,U=G;break e}else{a(U,L);break}else r(U,L);L=L.sibling}G=hf(H,U.mode,G),G.return=U,U=G}return S(U);case ee:return de=H._init,H=de(H._payload),et(U,L,H,G)}if(oe(H))return Ee(U,L,H,G);if(te(H)){if(de=te(H),typeof de!="function")throw Error(l(150));return H=de.call(H),we(U,L,H,G)}if(typeof H.then=="function")return et(U,L,Ko(H),G);if(H.$$typeof===R)return et(U,L,Lo(U,H),G);Go(U,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,L!==null&&L.tag===6?(a(U,L.sibling),G=p(L,H),G.return=U,U=G):(a(U,L),G=df(H,U.mode,G),G.return=U,U=G),S(U)):a(U,L)}return function(U,L,H,G){try{us=0;var de=et(U,L,H,G);return Il=null,de}catch(be){if(be===es||be===Uo)throw be;var je=An(29,be,null,U.mode);return je.lanes=G,je.return=U,je}finally{}}}var Vl=Yy(!0),Ky=Yy(!1),Kn=I(null),yr=null;function mi(t){var r=t.alternate;N(jt,jt.current&1),N(Kn,t),yr===null&&(r===null||Hl.current!==null||r.memoizedState!==null)&&(yr=t)}function Gy(t){if(t.tag===22){if(N(jt,jt.current),N(Kn,t),yr===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(yr=t)}}else yi()}function yi(){N(jt,jt.current),N(Kn,Kn.current)}function Pr(t){se(Kn),yr===t&&(yr=null),se(jt)}var jt=I(0);function Xo(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Ld(a)))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}function $f(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Yf={enqueueSetState:function(t,r,a){t=t._reactInternals;var c=Nn(),p=di(c);p.payload=r,a!=null&&(p.callback=a),r=hi(t,p,c),r!==null&&(Rn(r,t,c),ns(r,t,c))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=Nn(),p=di(c);p.tag=1,p.payload=r,a!=null&&(p.callback=a),r=hi(t,p,c),r!==null&&(Rn(r,t,c),ns(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=Nn(),c=di(a);c.tag=2,r!=null&&(c.callback=r),r=hi(t,c,a),r!==null&&(Rn(r,t,a),ns(r,t,a))}};function Xy(t,r,a,c,p,y,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,y,S):r.prototype&&r.prototype.isPureReactComponent?!$a(a,c)||!$a(p,y):!0}function Zy(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&Yf.enqueueReplaceState(r,r.state,null)}function ll(t,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var p in t)a[p]===void 0&&(a[p]=t[p])}return a}var Zo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Jy(t){Zo(t)}function Wy(t){console.error(t)}function eg(t){Zo(t)}function Jo(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function tg(t,r,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Kf(t,r,a){return a=di(a),a.tag=3,a.payload={element:null},a.callback=function(){Jo(t,r)},a}function ng(t){return t=di(t),t.tag=3,t}function rg(t,r,a,c){var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;t.payload=function(){return p(y)},t.callback=function(){tg(r,a,c)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){tg(r,a,c),typeof p!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function PS(t,r,a,c,p){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&Za(r,a,p,!0),a=Kn.current,a!==null){switch(a.tag){case 13:return yr===null?bd():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=p,c===Cf?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),xd(t,c,p)),!1;case 22:return a.flags|=65536,c===Cf?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),xd(t,c,p)),!1}throw Error(l(435,a.tag))}return xd(t,c,p),bd(),!1}if(Ye)return r=Kn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,c!==yf&&(t=Error(l(422),{cause:c}),Xa(In(t,a)))):(c!==yf&&(r=Error(l(423),{cause:c}),Xa(In(r,a))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=In(c,a),p=Kf(t.stateNode,c,p),Tf(t,p),vt!==4&&(vt=2)),!1;var y=Error(l(520),{cause:c});if(y=In(y,a),gs===null?gs=[y]:gs.push(y),vt!==4&&(vt=2),r===null)return!0;c=In(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=p&-p,a.lanes|=t,t=Kf(a.stateNode,c,t),Tf(a,t),!1;case 1:if(r=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Si===null||!Si.has(y))))return a.flags|=65536,p&=-p,a.lanes|=p,p=ng(p),rg(p,t,a,c),Tf(a,p),!1}a=a.return}while(a!==null);return!1}var ig=Error(l(461)),Bt=!1;function Qt(t,r,a,c){r.child=t===null?Ky(r,null,a,c):Vl(r,t.child,a,c)}function lg(t,r,a,c,p){a=a.render;var y=r.ref;if("ref"in c){var S={};for(var T in c)T!=="ref"&&(S[T]=c[T])}else S=c;return nl(r),c=Of(t,r,a,S,y,p),T=jf(),t!==null&&!Bt?(Df(t,r,p),Qr(t,r,p)):(Ye&&T&&pf(r),r.flags|=1,Qt(t,r,c,p),r.child)}function ag(t,r,a,c,p){if(t===null){var y=a.type;return typeof y=="function"&&!ff(y)&&y.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=y,sg(t,r,y,c,p)):(t=Oo(a.type,null,c,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(y=t.child,!nd(t,p)){var S=y.memoizedProps;if(a=a.compare,a=a!==null?a:$a,a(S,c)&&t.ref===r.ref)return Qr(t,r,p)}return r.flags|=1,t=zr(y,c),t.ref=r.ref,t.return=r,r.child=t}function sg(t,r,a,c,p){if(t!==null){var y=t.memoizedProps;if($a(y,c)&&t.ref===r.ref)if(Bt=!1,r.pendingProps=c=y,nd(t,p))(t.flags&131072)!==0&&(Bt=!0);else return r.lanes=t.lanes,Qr(t,r,p)}return Gf(t,r,a,c,p)}function og(t,r,a){var c=r.pendingProps,p=c.children,y=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=y!==null?y.baseLanes|a:a,t!==null){for(p=r.child=t.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;r.childLanes=y&~c}else r.childLanes=0,r.child=null;return ug(t,r,c,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&zo(r,y!==null?y.cachePool:null),y!==null?sy(r,y):_f(),Gy(r);else return r.lanes=r.childLanes=536870912,ug(t,r,y!==null?y.baseLanes|a:a,a)}else y!==null?(zo(r,y.cachePool),sy(r,y),yi(),r.memoizedState=null):(t!==null&&zo(r,null),_f(),yi());return Qt(t,r,p,a),r.child}function ug(t,r,a,c){var p=Sf();return p=p===null?null:{parent:Ot._currentValue,pool:p},r.memoizedState={baseLanes:a,cachePool:p},t!==null&&zo(r,null),_f(),Gy(r),t!==null&&Za(t,r,c,!0),null}function Wo(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Gf(t,r,a,c,p){return nl(r),a=Of(t,r,a,c,void 0,p),c=jf(),t!==null&&!Bt?(Df(t,r,p),Qr(t,r,p)):(Ye&&c&&pf(r),r.flags|=1,Qt(t,r,a,p),r.child)}function cg(t,r,a,c,p,y){return nl(r),r.updateQueue=null,a=uy(r,c,a,p),oy(t),c=jf(),t!==null&&!Bt?(Df(t,r,y),Qr(t,r,y)):(Ye&&c&&pf(r),r.flags|=1,Qt(t,r,a,y),r.child)}function fg(t,r,a,c,p){if(nl(r),r.stateNode===null){var y=Ll,S=a.contextType;typeof S=="object"&&S!==null&&(y=Zt(S)),y=new a(c,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Yf,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=c,y.state=r.memoizedState,y.refs={},Ef(r),S=a.contextType,y.context=typeof S=="object"&&S!==null?Zt(S):Ll,y.state=r.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&($f(r,a,S,c),y.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(S=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),S!==y.state&&Yf.enqueueReplaceState(y,y.state,null),is(r,c,y,p),rs(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){y=r.stateNode;var T=r.memoizedProps,j=ll(a,T);y.props=j;var F=y.context,K=a.contextType;S=Ll,typeof K=="object"&&K!==null&&(S=Zt(K));var Z=a.getDerivedStateFromProps;K=typeof Z=="function"||typeof y.getSnapshotBeforeUpdate=="function",T=r.pendingProps!==T,K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(T||F!==S)&&Zy(r,y,c,S),fi=!1;var P=r.memoizedState;y.state=P,is(r,c,y,p),rs(),F=r.memoizedState,T||P!==F||fi?(typeof Z=="function"&&($f(r,a,Z,c),F=r.memoizedState),(j=fi||Xy(r,a,j,c,P,F,S))?(K||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=F),y.props=c,y.state=F,y.context=S,c=j):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{y=r.stateNode,Af(t,r),S=r.memoizedProps,K=ll(a,S),y.props=K,Z=r.pendingProps,P=y.context,F=a.contextType,j=Ll,typeof F=="object"&&F!==null&&(j=Zt(F)),T=a.getDerivedStateFromProps,(F=typeof T=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==Z||P!==j)&&Zy(r,y,c,j),fi=!1,P=r.memoizedState,y.state=P,is(r,c,y,p),rs();var Q=r.memoizedState;S!==Z||P!==Q||fi||t!==null&&t.dependencies!==null&&Mo(t.dependencies)?(typeof T=="function"&&($f(r,a,T,c),Q=r.memoizedState),(K=fi||Xy(r,a,K,c,P,Q,j)||t!==null&&t.dependencies!==null&&Mo(t.dependencies))?(F||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,Q,j),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,Q,j)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===t.memoizedProps&&P===t.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&P===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=Q),y.props=c,y.state=Q,y.context=j,c=K):(typeof y.componentDidUpdate!="function"||S===t.memoizedProps&&P===t.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&P===t.memoizedState||(r.flags|=1024),c=!1)}return y=c,Wo(t,r),c=(r.flags&128)!==0,y||c?(y=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,t!==null&&c?(r.child=Vl(r,t.child,null,p),r.child=Vl(r,null,a,p)):Qt(t,r,a,p),r.memoizedState=y.state,t=r.child):t=Qr(t,r,p),t}function dg(t,r,a,c){return Ga(),r.flags|=256,Qt(t,r,a,c),r.child}var Xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zf(t){return{baseLanes:t,cachePool:Wm()}}function Jf(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=Gn),t}function hg(t,r,a){var c=r.pendingProps,p=!1,y=(r.flags&128)!==0,S;if((S=y)||(S=t!==null&&t.memoizedState===null?!1:(jt.current&2)!==0),S&&(p=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ye){if(p?mi(r):yi(),Ye){var T=bt,j;if(j=T){e:{for(j=T,T=mr;j.nodeType!==8;){if(!T){T=null;break e}if(j=lr(j.nextSibling),j===null){T=null;break e}}T=j}T!==null?(r.memoizedState={dehydrated:T,treeContext:Zi!==null?{id:Ur,overflow:Br}:null,retryLane:536870912,hydrationErrors:null},j=An(18,null,null,0),j.stateNode=T,j.return=r,r.child=j,ln=r,bt=null,j=!0):j=!1}j||el(r)}if(T=r.memoizedState,T!==null&&(T=T.dehydrated,T!==null))return Ld(T)?r.lanes=32:r.lanes=536870912,null;Pr(r)}return T=c.children,c=c.fallback,p?(yi(),p=r.mode,T=eu({mode:"hidden",children:T},p),c=Xi(c,p,a,null),T.return=r,c.return=r,T.sibling=c,r.child=T,p=r.child,p.memoizedState=Zf(a),p.childLanes=Jf(t,S,a),r.memoizedState=Xf,c):(mi(r),Wf(r,T))}if(j=t.memoizedState,j!==null&&(T=j.dehydrated,T!==null)){if(y)r.flags&256?(mi(r),r.flags&=-257,r=ed(t,r,a)):r.memoizedState!==null?(yi(),r.child=t.child,r.flags|=128,r=null):(yi(),p=c.fallback,T=r.mode,c=eu({mode:"visible",children:c.children},T),p=Xi(p,T,a,null),p.flags|=2,c.return=r,p.return=r,c.sibling=p,r.child=c,Vl(r,t.child,null,a),c=r.child,c.memoizedState=Zf(a),c.childLanes=Jf(t,S,a),r.memoizedState=Xf,r=p);else if(mi(r),Ld(T)){if(S=T.nextSibling&&T.nextSibling.dataset,S)var F=S.dgst;S=F,c=Error(l(419)),c.stack="",c.digest=S,Xa({value:c,source:null,stack:null}),r=ed(t,r,a)}else if(Bt||Za(t,r,a,!1),S=(a&t.childLanes)!==0,Bt||S){if(S=it,S!==null&&(c=a&-a,c=(c&42)!==0?1:Kt(c),c=(c&(S.suspendedLanes|a))!==0?0:c,c!==0&&c!==j.retryLane))throw j.retryLane=c,Ml(t,c),Rn(S,t,c),ig;T.data==="$?"||bd(),r=ed(t,r,a)}else T.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=j.treeContext,bt=lr(T.nextSibling),ln=r,Ye=!0,Wi=null,mr=!1,t!==null&&($n[Yn++]=Ur,$n[Yn++]=Br,$n[Yn++]=Zi,Ur=t.id,Br=t.overflow,Zi=r),r=Wf(r,c.children),r.flags|=4096);return r}return p?(yi(),p=c.fallback,T=r.mode,j=t.child,F=j.sibling,c=zr(j,{mode:"hidden",children:c.children}),c.subtreeFlags=j.subtreeFlags&65011712,F!==null?p=zr(F,p):(p=Xi(p,T,a,null),p.flags|=2),p.return=r,c.return=r,c.sibling=p,r.child=c,c=p,p=r.child,T=t.child.memoizedState,T===null?T=Zf(a):(j=T.cachePool,j!==null?(F=Ot._currentValue,j=j.parent!==F?{parent:F,pool:F}:j):j=Wm(),T={baseLanes:T.baseLanes|a,cachePool:j}),p.memoizedState=T,p.childLanes=Jf(t,S,a),r.memoizedState=Xf,c):(mi(r),a=t.child,t=a.sibling,a=zr(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=a,r.memoizedState=null,a)}function Wf(t,r){return r=eu({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function eu(t,r){return t=An(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function ed(t,r,a){return Vl(r,t.child,null,a),t=Wf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function pg(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),bf(t.return,r,a)}function td(t,r,a,c,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=a,y.tailMode=p)}function mg(t,r,a){var c=r.pendingProps,p=c.revealOrder,y=c.tail;if(Qt(t,r,c.children,a),c=jt.current,(c&2)!==0)c=c&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&&pg(t,a,r);else if(t.tag===19)pg(t,a,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}c&=1}switch(N(jt,c),p){case"forwards":for(a=r.child,p=null;a!==null;)t=a.alternate,t!==null&&Xo(t)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),td(r,!1,p,a,y);break;case"backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&Xo(t)===null){r.child=p;break}t=p.sibling,p.sibling=a,a=p,p=t}td(r,!0,a,null,y);break;case"together":td(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Qr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),wi|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Za(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,a=zr(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=zr(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function nd(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Mo(t)))}function QS(t,r,a){switch(r.tag){case 3:Re(r,r.stateNode.containerInfo),ci(r,Ot,t.memoizedState.cache),Ga();break;case 27:case 5:Ft(r);break;case 4:Re(r,r.stateNode.containerInfo);break;case 10:ci(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(mi(r),r.flags|=128,null):(a&r.child.childLanes)!==0?hg(t,r,a):(mi(r),t=Qr(t,r,a),t!==null?t.sibling:null);mi(r);break;case 19:var p=(t.flags&128)!==0;if(c=(a&r.childLanes)!==0,c||(Za(t,r,a,!1),c=(a&r.childLanes)!==0),p){if(c)return mg(t,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),N(jt,jt.current),c)break;return null;case 22:case 23:return r.lanes=0,og(t,r,a);case 24:ci(r,Ot,t.memoizedState.cache)}return Qr(t,r,a)}function yg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)Bt=!0;else{if(!nd(t,a)&&(r.flags&128)===0)return Bt=!1,QS(t,r,a);Bt=(t.flags&131072)!==0}else Bt=!1,Ye&&(r.flags&1048576)!==0&&$m(r,Do,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,p=c._init;if(c=p(c._payload),r.type=c,typeof c=="function")ff(c)?(t=ll(c,t),r.tag=1,r=fg(null,r,c,t,a)):(r.tag=0,r=Gf(null,r,c,t,a));else{if(c!=null){if(p=c.$$typeof,p===q){r.tag=11,r=lg(null,r,c,t,a);break e}else if(p===$){r.tag=14,r=ag(null,r,c,t,a);break e}}throw r=J(c)||c,Error(l(306,r,""))}}return r;case 0:return Gf(t,r,r.type,r.pendingProps,a);case 1:return c=r.type,p=ll(c,r.pendingProps),fg(t,r,c,p,a);case 3:e:{if(Re(r,r.stateNode.containerInfo),t===null)throw Error(l(387));c=r.pendingProps;var y=r.memoizedState;p=y.element,Af(t,r),is(r,c,null,a);var S=r.memoizedState;if(c=S.cache,ci(r,Ot,c),c!==y.cache&&vf(r,[Ot],a,!0),rs(),c=S.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=dg(t,r,c,a);break e}else if(c!==p){p=In(Error(l(424)),r),Xa(p),r=dg(t,r,c,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(bt=lr(t.firstChild),ln=r,Ye=!0,Wi=null,mr=!0,a=Ky(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ga(),c===p){r=Qr(t,r,a);break e}Qt(t,r,c,a)}r=r.child}return r;case 26:return Wo(t,r),t===null?(a=x0(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ye||(a=r.type,t=r.pendingProps,c=pu(ce.current).createElement(a),c[le]=r,c[he]=t,Vt(c,a,t),Et(c),r.stateNode=c):r.memoizedState=x0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Ft(r),t===null&&Ye&&(c=r.stateNode=g0(r.type,r.pendingProps,ce.current),ln=r,mr=!0,p=bt,Ai(r.type)?(zd=p,bt=lr(c.firstChild)):bt=p),Qt(t,r,r.pendingProps.children,a),Wo(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ye&&((p=c=bt)&&(c=g2(c,r.type,r.pendingProps,mr),c!==null?(r.stateNode=c,ln=r,bt=lr(c.firstChild),mr=!1,p=!0):p=!1),p||el(r)),Ft(r),p=r.type,y=r.pendingProps,S=t!==null?t.memoizedProps:null,c=y.children,jd(p,y)?c=null:S!==null&&jd(p,S)&&(r.flags|=32),r.memoizedState!==null&&(p=Of(t,r,LS,null,null,a),Ts._currentValue=p),Wo(t,r),Qt(t,r,c,a),r.child;case 6:return t===null&&Ye&&((t=a=bt)&&(a=b2(a,r.pendingProps,mr),a!==null?(r.stateNode=a,ln=r,bt=null,t=!0):t=!1),t||el(r)),null;case 13:return hg(t,r,a);case 4:return Re(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Vl(r,null,c,a):Qt(t,r,c,a),r.child;case 11:return lg(t,r,r.type,r.pendingProps,a);case 7:return Qt(t,r,r.pendingProps,a),r.child;case 8:return Qt(t,r,r.pendingProps.children,a),r.child;case 12:return Qt(t,r,r.pendingProps.children,a),r.child;case 10:return c=r.pendingProps,ci(r,r.type,c.value),Qt(t,r,c.children,a),r.child;case 9:return p=r.type._context,c=r.pendingProps.children,nl(r),p=Zt(p),c=c(p),r.flags|=1,Qt(t,r,c,a),r.child;case 14:return ag(t,r,r.type,r.pendingProps,a);case 15:return sg(t,r,r.type,r.pendingProps,a);case 19:return mg(t,r,a);case 31:return c=r.pendingProps,a=r.mode,c={mode:c.mode,children:c.children},t===null?(a=eu(c,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=zr(t.child,c),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return og(t,r,a);case 24:return nl(r),c=Zt(Ot),t===null?(p=Sf(),p===null&&(p=it,y=xf(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=a),p=y),r.memoizedState={parent:c,cache:p},Ef(r),ci(r,Ot,p)):((t.lanes&a)!==0&&(Af(t,r),is(r,null,null,a),rs()),p=t.memoizedState,y=r.memoizedState,p.parent!==c?(p={parent:c,cache:c},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ci(r,Ot,c)):(c=y.cache,ci(r,Ot,c),c!==p.cache&&vf(r,[Ot],a,!0))),Qt(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function Ir(t){t.flags|=4}function gg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!A0(r)){if(r=Kn.current,r!==null&&((He&4194048)===He?yr!==null:(He&62914560)!==He&&(He&536870912)===0||r!==yr))throw ts=Cf,ey;t.flags|=8192}}function tu(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?jr():536870912,t.lanes|=r,Gl|=r)}function fs(t,r){if(!Ye)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function ht(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function IS(t,r,a){var c=r.pendingProps;switch(mf(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(r),null;case 1:return ht(r),null;case 3:return a=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Hr(Ot),Ie(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ka(r)?Ir(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Gm())),ht(r),null;case 26:return a=r.memoizedState,t===null?(Ir(r),a!==null?(ht(r),gg(r,a)):(ht(r),r.flags&=-16777217)):a?a!==t.memoizedState?(Ir(r),ht(r),gg(r,a)):(ht(r),r.flags&=-16777217):(t.memoizedProps!==c&&Ir(r),ht(r),r.flags&=-16777217),null;case 27:wt(r),a=ce.current;var p=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Ir(r);else{if(!c){if(r.stateNode===null)throw Error(l(166));return ht(r),null}t=fe.current,Ka(r)?Ym(r):(t=g0(p,c,a),r.stateNode=t,Ir(r))}return ht(r),null;case 5:if(wt(r),a=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Ir(r);else{if(!c){if(r.stateNode===null)throw Error(l(166));return ht(r),null}if(t=fe.current,Ka(r))Ym(r);else{switch(p=pu(ce.current),t){case 1:t=p.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=p.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=p.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=p.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":t=p.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?p.createElement("select",{is:c.is}):p.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?p.createElement(a,{is:c.is}):p.createElement(a)}}t[le]=r,t[he]=c;e:for(p=r.child;p!==null;){if(p.tag===5||p.tag===6)t.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===r)break e;for(;p.sibling===null;){if(p.return===null||p.return===r)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}r.stateNode=t;e:switch(Vt(t,a,c),a){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&Ir(r)}}return ht(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&Ir(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(l(166));if(t=ce.current,Ka(r)){if(t=r.stateNode,a=r.memoizedProps,c=null,p=ln,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}t[le]=r,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||c0(t.nodeValue,a)),t||el(r)}else t=pu(t).createTextNode(c),t[le]=r,r.stateNode=t}return ht(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=Ka(r),c!==null&&c.dehydrated!==null){if(t===null){if(!p)throw Error(l(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));p[le]=r}else Ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ht(r),p=!1}else p=Gm(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Pr(r),r):(Pr(r),null)}if(Pr(r),(r.flags&128)!==0)return r.lanes=a,r;if(a=c!==null,t=t!==null&&t.memoizedState!==null,a){c=r.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool);var y=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)}return a!==t&&a&&(r.child.flags|=8192),tu(r,r.updateQueue),ht(r),null;case 4:return Ie(),t===null&&kd(r.stateNode.containerInfo),ht(r),null;case 10:return Hr(r.type),ht(r),null;case 19:if(se(jt),p=r.memoizedState,p===null)return ht(r),null;if(c=(r.flags&128)!==0,y=p.rendering,y===null)if(c)fs(p,!1);else{if(vt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(y=Xo(t),y!==null){for(r.flags|=128,fs(p,!1),t=y.updateQueue,r.updateQueue=t,tu(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Vm(a,t),a=a.sibling;return N(jt,jt.current&1|2),r.child}t=t.sibling}p.tail!==null&&Mt()>iu&&(r.flags|=128,c=!0,fs(p,!1),r.lanes=4194304)}else{if(!c)if(t=Xo(y),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,tu(r,t),fs(p,!0),p.tail===null&&p.tailMode==="hidden"&&!y.alternate&&!Ye)return ht(r),null}else 2*Mt()-p.renderingStartTime>iu&&a!==536870912&&(r.flags|=128,c=!0,fs(p,!1),r.lanes=4194304);p.isBackwards?(y.sibling=r.child,r.child=y):(t=p.last,t!==null?t.sibling=y:r.child=y,p.last=y)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=Mt(),r.sibling=null,t=jt.current,N(jt,c?t&1|2:t&1),r):(ht(r),null);case 22:case 23:return Pr(r),Nf(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(ht(r),r.subtreeFlags&6&&(r.flags|=8192)):ht(r),a=r.updateQueue,a!==null&&tu(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),t!==null&&se(rl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Hr(Ot),ht(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function VS(t,r){switch(mf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Hr(Ot),Ie(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return wt(r),null;case 13:if(Pr(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));Ga()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return se(jt),null;case 4:return Ie(),null;case 10:return Hr(r.type),null;case 22:case 23:return Pr(r),Nf(),t!==null&&se(rl),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Hr(Ot),null;case 25:return null;default:return null}}function bg(t,r){switch(mf(r),r.tag){case 3:Hr(Ot),Ie();break;case 26:case 27:case 5:wt(r);break;case 4:Ie();break;case 13:Pr(r);break;case 19:se(jt);break;case 10:Hr(r.type);break;case 22:case 23:Pr(r),Nf(),t!==null&&se(rl);break;case 24:Hr(Ot)}}function ds(t,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var p=c.next;a=p;do{if((a.tag&t)===t){c=void 0;var y=a.create,S=a.inst;c=y(),S.destroy=c}a=a.next}while(a!==p)}}catch(T){tt(r,r.return,T)}}function gi(t,r,a){try{var c=r.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&t)===t){var S=c.inst,T=S.destroy;if(T!==void 0){S.destroy=void 0,p=r;var j=a,F=T;try{F()}catch(K){tt(p,j,K)}}}c=c.next}while(c!==y)}}catch(K){tt(r,r.return,K)}}function vg(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{ay(r,a)}catch(c){tt(t,t.return,c)}}}function xg(t,r,a){a.props=ll(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){tt(t,r,c)}}function hs(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof a=="function"?t.refCleanup=a(c):a.current=c}}catch(p){tt(t,r,p)}}function gr(t,r){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(p){tt(t,r,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){tt(t,r,p)}else a.current=null}function wg(t){var r=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(p){tt(t,t.return,p)}}function rd(t,r,a){try{var c=t.stateNode;d2(c,t.type,a,r),c[he]=r}catch(p){tt(t,t.return,p)}}function Sg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ai(t.type)||t.tag===4}function id(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Sg(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.tag===27&&Ai(t.type)||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,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=hu));else if(c!==4&&(c===27&&Ai(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(ld(t,r,a),t=t.sibling;t!==null;)ld(t,r,a),t=t.sibling}function nu(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(c===27&&Ai(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(nu(t,r,a),t=t.sibling;t!==null;)nu(t,r,a),t=t.sibling}function Cg(t){var r=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Vt(r,c,a),r[le]=t,r[he]=a}catch(y){tt(t,t.return,y)}}var Vr=!1,Tt=!1,ad=!1,Eg=typeof WeakSet=="function"?WeakSet:Set,qt=null;function $S(t,r){if(t=t.containerInfo,Rd=xu,t=Lm(t),rf(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var p=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var S=0,T=-1,j=-1,F=0,K=0,Z=t,P=null;t:for(;;){for(var Q;Z!==a||p!==0&&Z.nodeType!==3||(T=S+p),Z!==y||c!==0&&Z.nodeType!==3||(j=S+c),Z.nodeType===3&&(S+=Z.nodeValue.length),(Q=Z.firstChild)!==null;)P=Z,Z=Q;for(;;){if(Z===t)break t;if(P===a&&++F===p&&(T=S),P===y&&++K===c&&(j=S),(Q=Z.nextSibling)!==null)break;Z=P,P=Z.parentNode}Z=Q}a=T===-1||j===-1?null:{start:T,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Od={focusedElem:t,selectionRange:a},xu=!1,qt=r;qt!==null;)if(r=qt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,qt=t;else for(;qt!==null;){switch(r=qt,y=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&y!==null){t=void 0,a=r,p=y.memoizedProps,y=y.memoizedState,c=a.stateNode;try{var Ee=ll(a.type,p,a.elementType===a.type);t=c.getSnapshotBeforeUpdate(Ee,y),c.__reactInternalSnapshotBeforeUpdate=t}catch(we){tt(a,a.return,we)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Md(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Md(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,qt=t;break}qt=r.return}}function Ag(t,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:bi(t,a),c&4&&ds(5,a);break;case 1:if(bi(t,a),c&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(S){tt(a,a.return,S)}else{var p=ll(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(p,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){tt(a,a.return,S)}}c&64&&vg(a),c&512&&hs(a,a.return);break;case 3:if(bi(t,a),c&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{ay(t,r)}catch(S){tt(a,a.return,S)}}break;case 27:r===null&&c&4&&Cg(a);case 26:case 5:bi(t,a),r===null&&c&4&&wg(a),c&512&&hs(a,a.return);break;case 12:bi(t,a);break;case 13:bi(t,a),c&4&&_g(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=t2.bind(null,a),v2(t,a))));break;case 22:if(c=a.memoizedState!==null||Vr,!c){r=r!==null&&r.memoizedState!==null||Tt,p=Vr;var y=Tt;Vr=c,(Tt=r)&&!y?vi(t,a,(a.subtreeFlags&8772)!==0):bi(t,a),Vr=p,Tt=y}break;case 30:break;default:bi(t,a)}}function Tg(t){var r=t.alternate;r!==null&&(t.alternate=null,Tg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Xt(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var st=null,pn=!1;function $r(t,r,a){for(a=a.child;a!==null;)kg(t,r,a),a=a.sibling}function kg(t,r,a){if(W&&typeof W.onCommitFiberUnmount=="function")try{W.onCommitFiberUnmount(Y,a)}catch{}switch(a.tag){case 26:Tt||gr(a,r),$r(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Tt||gr(a,r);var c=st,p=pn;Ai(a.type)&&(st=a.stateNode,pn=!1),$r(t,r,a),Ss(a.stateNode),st=c,pn=p;break;case 5:Tt||gr(a,r);case 6:if(c=st,p=pn,st=null,$r(t,r,a),st=c,pn=p,st!==null)if(pn)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(y){tt(a,r,y)}else try{st.removeChild(a.stateNode)}catch(y){tt(a,r,y)}break;case 18:st!==null&&(pn?(t=st,m0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Rs(t)):m0(st,a.stateNode));break;case 4:c=st,p=pn,st=a.stateNode.containerInfo,pn=!0,$r(t,r,a),st=c,pn=p;break;case 0:case 11:case 14:case 15:Tt||gi(2,a,r),Tt||gi(4,a,r),$r(t,r,a);break;case 1:Tt||(gr(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&xg(a,r,c)),$r(t,r,a);break;case 21:$r(t,r,a);break;case 22:Tt=(c=Tt)||a.memoizedState!==null,$r(t,r,a),Tt=c;break;default:$r(t,r,a)}}function _g(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Rs(t)}catch(a){tt(r,r.return,a)}}function YS(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Eg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Eg),r;default:throw Error(l(435,t.tag))}}function sd(t,r){var a=YS(t);r.forEach(function(c){var p=n2.bind(null,t,c);a.has(c)||(a.add(c),c.then(p,p))})}function Tn(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c],y=t,S=r,T=S;e:for(;T!==null;){switch(T.tag){case 27:if(Ai(T.type)){st=T.stateNode,pn=!1;break e}break;case 5:st=T.stateNode,pn=!1;break e;case 3:case 4:st=T.stateNode.containerInfo,pn=!0;break e}T=T.return}if(st===null)throw Error(l(160));kg(y,S,p),st=null,pn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Ng(r,t),r=r.sibling}var ir=null;function Ng(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Tn(r,t),kn(t),c&4&&(gi(3,t,t.return),ds(3,t),gi(5,t,t.return));break;case 1:Tn(r,t),kn(t),c&512&&(Tt||a===null||gr(a,a.return)),c&64&&Vr&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var p=ir;if(Tn(r,t),kn(t),c&512&&(Tt||a===null||gr(a,a.return)),c&4){var y=a!==null?a.memoizedState:null;if(c=t.memoizedState,a===null)if(c===null)if(t.stateNode===null){e:{c=t.type,a=t.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":y=p.getElementsByTagName("title")[0],(!y||y[Ct]||y[le]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(c),p.head.insertBefore(y,p.querySelector("head > title"))),Vt(y,c,a),y[le]=t,Et(y),c=y;break e;case"link":var S=C0("link","href",p).get(c+(a.href||""));if(S){for(var T=0;T<S.length;T++)if(y=S[T],y.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&y.getAttribute("rel")===(a.rel==null?null:a.rel)&&y.getAttribute("title")===(a.title==null?null:a.title)&&y.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(T,1);break t}}y=p.createElement(c),Vt(y,c,a),p.head.appendChild(y);break;case"meta":if(S=C0("meta","content",p).get(c+(a.content||""))){for(T=0;T<S.length;T++)if(y=S[T],y.getAttribute("content")===(a.content==null?null:""+a.content)&&y.getAttribute("name")===(a.name==null?null:a.name)&&y.getAttribute("property")===(a.property==null?null:a.property)&&y.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&y.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(T,1);break t}}y=p.createElement(c),Vt(y,c,a),p.head.appendChild(y);break;default:throw Error(l(468,c))}y[le]=t,Et(y),c=y}t.stateNode=c}else E0(p,t.type,t.stateNode);else t.stateNode=S0(p,c,t.memoizedProps);else y!==c?(y===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):y.count--,c===null?E0(p,t.type,t.stateNode):S0(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&rd(t,t.memoizedProps,a.memoizedProps)}break;case 27:Tn(r,t),kn(t),c&512&&(Tt||a===null||gr(a,a.return)),a!==null&&c&4&&rd(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Tn(r,t),kn(t),c&512&&(Tt||a===null||gr(a,a.return)),t.flags&32){p=t.stateNode;try{kl(p,"")}catch(Q){tt(t,t.return,Q)}}c&4&&t.stateNode!=null&&(p=t.memoizedProps,rd(t,p,a!==null?a.memoizedProps:p)),c&1024&&(ad=!0);break;case 6:if(Tn(r,t),kn(t),c&4){if(t.stateNode===null)throw Error(l(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(Q){tt(t,t.return,Q)}}break;case 3:if(gu=null,p=ir,ir=mu(r.containerInfo),Tn(r,t),ir=p,kn(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{Rs(r.containerInfo)}catch(Q){tt(t,t.return,Q)}ad&&(ad=!1,Rg(t));break;case 4:c=ir,ir=mu(t.stateNode.containerInfo),Tn(r,t),kn(t),ir=c;break;case 12:Tn(r,t),kn(t);break;case 13:Tn(r,t),kn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(hd=Mt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,sd(t,c)));break;case 22:p=t.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,F=Vr,K=Tt;if(Vr=F||p,Tt=K||j,Tn(r,t),Tt=K,Vr=F,kn(t),c&8192)e:for(r=t.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(a===null||j||Vr||Tt||al(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){j=a=r;try{if(y=j.stateNode,p)S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{T=j.stateNode;var Z=j.memoizedProps.style,P=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;T.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(Q){tt(j,j.return,Q)}}}else if(r.tag===6){if(a===null){j=r;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(Q){tt(j,j.return,Q)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,sd(t,a))));break;case 19:Tn(r,t),kn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,sd(t,c)));break;case 30:break;case 21:break;default:Tn(r,t),kn(t)}}function kn(t){var r=t.flags;if(r&2){try{for(var a,c=t.return;c!==null;){if(Sg(c)){a=c;break}c=c.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var p=a.stateNode,y=id(t);nu(t,y,p);break;case 5:var S=a.stateNode;a.flags&32&&(kl(S,""),a.flags&=-33);var T=id(t);nu(t,T,S);break;case 3:case 4:var j=a.stateNode.containerInfo,F=id(t);ld(t,F,j);break;default:throw Error(l(161))}}catch(K){tt(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Rg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Rg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function bi(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Ag(t,r.alternate,r),r=r.sibling}function al(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:gi(4,r,r.return),al(r);break;case 1:gr(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&xg(r,r.return,a),al(r);break;case 27:Ss(r.stateNode);case 26:case 5:gr(r,r.return),al(r);break;case 22:r.memoizedState===null&&al(r);break;case 30:al(r);break;default:al(r)}t=t.sibling}}function vi(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,p=t,y=r,S=y.flags;switch(y.tag){case 0:case 11:case 15:vi(p,y,a),ds(4,y);break;case 1:if(vi(p,y,a),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(F){tt(c,c.return,F)}if(c=y,p=c.updateQueue,p!==null){var T=c.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)ly(j[p],T)}catch(F){tt(c,c.return,F)}}a&&S&64&&vg(y),hs(y,y.return);break;case 27:Cg(y);case 26:case 5:vi(p,y,a),a&&c===null&&S&4&&wg(y),hs(y,y.return);break;case 12:vi(p,y,a);break;case 13:vi(p,y,a),a&&S&4&&_g(p,y);break;case 22:y.memoizedState===null&&vi(p,y,a),hs(y,y.return);break;case 30:break;default:vi(p,y,a)}r=r.sibling}}function od(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Ja(a))}function ud(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Ja(t))}function br(t,r,a,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Og(t,r,a,c),r=r.sibling}function Og(t,r,a,c){var p=r.flags;switch(r.tag){case 0:case 11:case 15:br(t,r,a,c),p&2048&&ds(9,r);break;case 1:br(t,r,a,c);break;case 3:br(t,r,a,c),p&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Ja(t)));break;case 12:if(p&2048){br(t,r,a,c),t=r.stateNode;try{var y=r.memoizedProps,S=y.id,T=y.onPostCommit;typeof T=="function"&&T(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(j){tt(r,r.return,j)}}else br(t,r,a,c);break;case 13:br(t,r,a,c);break;case 23:break;case 22:y=r.stateNode,S=r.alternate,r.memoizedState!==null?y._visibility&2?br(t,r,a,c):ps(t,r):y._visibility&2?br(t,r,a,c):(y._visibility|=2,$l(t,r,a,c,(r.subtreeFlags&10256)!==0)),p&2048&&od(S,r);break;case 24:br(t,r,a,c),p&2048&&ud(r.alternate,r);break;default:br(t,r,a,c)}}function $l(t,r,a,c,p){for(p=p&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var y=t,S=r,T=a,j=c,F=S.flags;switch(S.tag){case 0:case 11:case 15:$l(y,S,T,j,p),ds(8,S);break;case 23:break;case 22:var K=S.stateNode;S.memoizedState!==null?K._visibility&2?$l(y,S,T,j,p):ps(y,S):(K._visibility|=2,$l(y,S,T,j,p)),p&&F&2048&&od(S.alternate,S);break;case 24:$l(y,S,T,j,p),p&&F&2048&&ud(S.alternate,S);break;default:$l(y,S,T,j,p)}r=r.sibling}}function ps(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,c=r,p=c.flags;switch(c.tag){case 22:ps(a,c),p&2048&&od(c.alternate,c);break;case 24:ps(a,c),p&2048&&ud(c.alternate,c);break;default:ps(a,c)}r=r.sibling}}var ms=8192;function Yl(t){if(t.subtreeFlags&ms)for(t=t.child;t!==null;)jg(t),t=t.sibling}function jg(t){switch(t.tag){case 26:Yl(t),t.flags&ms&&t.memoizedState!==null&&j2(ir,t.memoizedState,t.memoizedProps);break;case 5:Yl(t);break;case 3:case 4:var r=ir;ir=mu(t.stateNode.containerInfo),Yl(t),ir=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ms,ms=16777216,Yl(t),ms=r):Yl(t));break;default:Yl(t)}}function Dg(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function ys(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];qt=c,Lg(c,t)}Dg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Mg(t),t=t.sibling}function Mg(t){switch(t.tag){case 0:case 11:case 15:ys(t),t.flags&2048&&gi(9,t,t.return);break;case 3:ys(t);break;case 12:ys(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,ru(t)):ys(t);break;default:ys(t)}}function ru(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];qt=c,Lg(c,t)}Dg(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:gi(8,r,r.return),ru(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,ru(r));break;default:ru(r)}t=t.sibling}}function Lg(t,r){for(;qt!==null;){var a=qt;switch(a.tag){case 0:case 11:case 15:gi(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ja(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,qt=c;else e:for(a=t;qt!==null;){c=qt;var p=c.sibling,y=c.return;if(Tg(c),c===a){qt=null;break e}if(p!==null){p.return=y,qt=p;break e}qt=y}}}var KS={getCacheForType:function(t){var r=Zt(Ot),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a}},GS=typeof WeakMap=="function"?WeakMap:Map,Ge=0,it=null,Le=null,He=0,Xe=0,_n=null,xi=!1,Kl=!1,cd=!1,Yr=0,vt=0,wi=0,sl=0,fd=0,Gn=0,Gl=0,gs=null,mn=null,dd=!1,hd=0,iu=1/0,lu=null,Si=null,It=0,Ci=null,Xl=null,Zl=0,pd=0,md=null,zg=null,bs=0,yd=null;function Nn(){if((Ge&2)!==0&&He!==0)return He&-He;if(B.T!==null){var t=Bl;return t!==0?t:Cd()}return Me()}function Ug(){Gn===0&&(Gn=(He&536870912)===0||Ye?ai():536870912);var t=Kn.current;return t!==null&&(t.flags|=32),Gn}function Rn(t,r,a){(t===it&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)&&(Jl(t,0),Ei(t,He,Gn,!1)),qn(t,a),((Ge&2)===0||t!==it)&&(t===it&&((Ge&2)===0&&(sl|=a),vt===4&&Ei(t,He,Gn,!1)),vr(t))}function Bg(t,r,a){if((Ge&6)!==0)throw Error(l(327));var c=!a&&(r&124)===0&&(r&t.expiredLanes)===0||Lt(t,r),p=c?JS(t,r):vd(t,r,!0),y=c;do{if(p===0){Kl&&!c&&Ei(t,r,0,!1);break}else{if(a=t.current.alternate,y&&!XS(a)){p=vd(t,r,!1),y=!1;continue}if(p===2){if(y=r,t.errorRecoveryDisabledLanes&y)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var T=t;p=gs;var j=T.current.memoizedState.isDehydrated;if(j&&(Jl(T,S).flags|=256),S=vd(T,S,!1),S!==2){if(cd&&!j){T.errorRecoveryDisabledLanes|=y,sl|=y,p=4;break e}y=mn,mn=p,y!==null&&(mn===null?mn=y:mn.push.apply(mn,y))}p=S}if(y=!1,p!==2)continue}}if(p===1){Jl(t,0),Ei(t,r,0,!0);break}e:{switch(c=t,y=p,y){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Ei(c,r,Gn,!xi);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(p=hd+300-Mt(),10<p)){if(Ei(c,r,Gn,!xi),ft(c,0,!0)!==0)break e;c.timeoutHandle=h0(qg.bind(null,c,a,mn,lu,dd,r,Gn,sl,Gl,xi,y,2,-0,0),p);break e}qg(c,a,mn,lu,dd,r,Gn,sl,Gl,xi,y,0,-0,0)}}break}while(!0);vr(t)}function qg(t,r,a,c,p,y,S,T,j,F,K,Z,P,Q){if(t.timeoutHandle=-1,Z=r.subtreeFlags,(Z&8192||(Z&16785408)===16785408)&&(As={stylesheets:null,count:0,unsuspend:O2},jg(r),Z=D2(),Z!==null)){t.cancelPendingCommit=Z($g.bind(null,t,r,y,a,c,p,S,T,j,K,1,P,Q)),Ei(t,y,S,!F);return}$g(t,r,y,a,c,p,S,T,j)}function XS(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var p=a[c],y=p.getSnapshot;p=p.value;try{if(!En(y(),p))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;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 Ei(t,r,a,c){r&=~fd,r&=~sl,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var p=r;0<p;){var y=31-ge(p),S=1<<y;c[y]=-1,p&=~S}a!==0&&Ii(t,a,r)}function au(){return(Ge&6)===0?(vs(0),!1):!0}function gd(){if(Le!==null){if(Xe===0)var t=Le.return;else t=Le,qr=tl=null,Mf(t),Il=null,us=0,t=Le;for(;t!==null;)bg(t.alternate,t),t=t.return;Le=null}}function Jl(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,p2(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),gd(),it=t,Le=a=zr(t.current,null),He=r,Xe=0,_n=null,xi=!1,Kl=Lt(t,r),cd=!1,Gl=Gn=fd=sl=wi=vt=0,mn=gs=null,dd=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var p=31-ge(c),y=1<<p;r|=t[p],c&=~y}return Yr=r,_o(),a}function Hg(t,r){Oe=null,B.H=Yo,r===es||r===Uo?(r=ry(),Xe=3):r===ey?(r=ry(),Xe=4):Xe=r===ig?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,_n=r,Le===null&&(vt=1,Jo(t,In(r,t.current)))}function Fg(){var t=B.H;return B.H=Yo,t===null?Yo:t}function Pg(){var t=B.A;return B.A=KS,t}function bd(){vt=4,xi||(He&4194048)!==He&&Kn.current!==null||(Kl=!0),(wi&134217727)===0&&(sl&134217727)===0||it===null||Ei(it,He,Gn,!1)}function vd(t,r,a){var c=Ge;Ge|=2;var p=Fg(),y=Pg();(it!==t||He!==r)&&(lu=null,Jl(t,r)),r=!1;var S=vt;e:do try{if(Xe!==0&&Le!==null){var T=Le,j=_n;switch(Xe){case 8:gd(),S=6;break e;case 3:case 2:case 9:case 6:Kn.current===null&&(r=!0);var F=Xe;if(Xe=0,_n=null,Wl(t,T,j,F),a&&Kl){S=0;break e}break;default:F=Xe,Xe=0,_n=null,Wl(t,T,j,F)}}ZS(),S=vt;break}catch(K){Hg(t,K)}while(!0);return r&&t.shellSuspendCounter++,qr=tl=null,Ge=c,B.H=p,B.A=y,Le===null&&(it=null,He=0,_o()),S}function ZS(){for(;Le!==null;)Qg(Le)}function JS(t,r){var a=Ge;Ge|=2;var c=Fg(),p=Pg();it!==t||He!==r?(lu=null,iu=Mt()+500,Jl(t,r)):Kl=Lt(t,r);e:do try{if(Xe!==0&&Le!==null){r=Le;var y=_n;t:switch(Xe){case 1:Xe=0,_n=null,Wl(t,r,y,1);break;case 2:case 9:if(ty(y)){Xe=0,_n=null,Ig(r);break}r=function(){Xe!==2&&Xe!==9||it!==t||(Xe=7),vr(t)},y.then(r,r);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:ty(y)?(Xe=0,_n=null,Ig(r)):(Xe=0,_n=null,Wl(t,r,y,7));break;case 5:var S=null;switch(Le.tag){case 26:S=Le.memoizedState;case 5:case 27:var T=Le;if(!S||A0(S)){Xe=0,_n=null;var j=T.sibling;if(j!==null)Le=j;else{var F=T.return;F!==null?(Le=F,su(F)):Le=null}break t}}Xe=0,_n=null,Wl(t,r,y,5);break;case 6:Xe=0,_n=null,Wl(t,r,y,6);break;case 8:gd(),vt=6;break e;default:throw Error(l(462))}}WS();break}catch(K){Hg(t,K)}while(!0);return qr=tl=null,B.H=c,B.A=p,Ge=a,Le!==null?0:(it=null,He=0,_o(),vt)}function WS(){for(;Le!==null&&!ii();)Qg(Le)}function Qg(t){var r=yg(t.alternate,t,Yr);t.memoizedProps=t.pendingProps,r===null?su(t):Le=r}function Ig(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=cg(a,r,r.pendingProps,r.type,void 0,He);break;case 11:r=cg(a,r,r.pendingProps,r.type.render,r.ref,He);break;case 5:Mf(r);default:bg(a,r),r=Le=Vm(r,Yr),r=yg(a,r,Yr)}t.memoizedProps=t.pendingProps,r===null?su(t):Le=r}function Wl(t,r,a,c){qr=tl=null,Mf(r),Il=null,us=0;var p=r.return;try{if(PS(t,p,r,a,He)){vt=1,Jo(t,In(a,t.current)),Le=null;return}}catch(y){if(p!==null)throw Le=p,y;vt=1,Jo(t,In(a,t.current)),Le=null;return}r.flags&32768?(Ye||c===1?t=!0:Kl||(He&536870912)!==0?t=!1:(xi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Kn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Vg(r,t)):su(r)}function su(t){var r=t;do{if((r.flags&32768)!==0){Vg(r,xi);return}t=r.return;var a=IS(r.alternate,r,Yr);if(a!==null){Le=a;return}if(r=r.sibling,r!==null){Le=r;return}Le=r=t}while(r!==null);vt===0&&(vt=5)}function Vg(t,r){do{var a=VS(t.alternate,t);if(a!==null){a.flags&=32767,Le=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){Le=t;return}Le=t=a}while(t!==null);vt=6,Le=null}function $g(t,r,a,c,p,y,S,T,j){t.cancelPendingCommit=null;do ou();while(It!==0);if((Ge&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(y=r.lanes|r.childLanes,y|=uf,Qi(t,a,y,S,T,j),t===it&&(Le=it=null,He=0),Xl=r,Ci=t,Zl=a,pd=y,md=p,zg=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,r2(Bn,function(){return Zg(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,p=X.p,X.p=2,S=Ge,Ge|=4;try{$S(t,r,a)}finally{Ge=S,X.p=p,B.T=c}}It=1,Yg(),Kg(),Gg()}}function Yg(){if(It===1){It=0;var t=Ci,r=Xl,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var c=X.p;X.p=2;var p=Ge;Ge|=4;try{Ng(r,t);var y=Od,S=Lm(t.containerInfo),T=y.focusedElem,j=y.selectionRange;if(S!==T&&T&&T.ownerDocument&&Mm(T.ownerDocument.documentElement,T)){if(j!==null&&rf(T)){var F=j.start,K=j.end;if(K===void 0&&(K=F),"selectionStart"in T)T.selectionStart=F,T.selectionEnd=Math.min(K,T.value.length);else{var Z=T.ownerDocument||document,P=Z&&Z.defaultView||window;if(P.getSelection){var Q=P.getSelection(),Ee=T.textContent.length,we=Math.min(j.start,Ee),et=j.end===void 0?we:Math.min(j.end,Ee);!Q.extend&&we>et&&(S=et,et=we,we=S);var U=Dm(T,we),L=Dm(T,et);if(U&&L&&(Q.rangeCount!==1||Q.anchorNode!==U.node||Q.anchorOffset!==U.offset||Q.focusNode!==L.node||Q.focusOffset!==L.offset)){var H=Z.createRange();H.setStart(U.node,U.offset),Q.removeAllRanges(),we>et?(Q.addRange(H),Q.extend(L.node,L.offset)):(H.setEnd(L.node,L.offset),Q.addRange(H))}}}}for(Z=[],Q=T;Q=Q.parentNode;)Q.nodeType===1&&Z.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<Z.length;T++){var G=Z[T];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}xu=!!Rd,Od=Rd=null}finally{Ge=p,X.p=c,B.T=a}}t.current=r,It=2}}function Kg(){if(It===2){It=0;var t=Ci,r=Xl,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var c=X.p;X.p=2;var p=Ge;Ge|=4;try{Ag(t,r.alternate,r)}finally{Ge=p,X.p=c,B.T=a}}It=3}}function Gg(){if(It===4||It===3){It=0,Dt();var t=Ci,r=Xl,a=Zl,c=zg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?It=5:(It=0,Xl=Ci=null,Xg(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(Si=null),ve(a),r=r.stateNode,W&&typeof W.onCommitFiberRoot=="function")try{W.onCommitFiberRoot(Y,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=B.T,p=X.p,X.p=2,B.T=null;try{for(var y=t.onRecoverableError,S=0;S<c.length;S++){var T=c[S];y(T.value,{componentStack:T.stack})}}finally{B.T=r,X.p=p}}(Zl&3)!==0&&ou(),vr(t),p=t.pendingLanes,(a&4194090)!==0&&(p&42)!==0?t===yd?bs++:(bs=0,yd=t):bs=0,vs(0)}}function Xg(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Ja(r)))}function ou(t){return Yg(),Kg(),Gg(),Zg()}function Zg(){if(It!==5)return!1;var t=Ci,r=pd;pd=0;var a=ve(Zl),c=B.T,p=X.p;try{X.p=32>a?32:a,B.T=null,a=md,md=null;var y=Ci,S=Zl;if(It=0,Xl=Ci=null,Zl=0,(Ge&6)!==0)throw Error(l(331));var T=Ge;if(Ge|=4,Mg(y.current),Og(y,y.current,S,a),Ge=T,vs(0,!1),W&&typeof W.onPostCommitFiberRoot=="function")try{W.onPostCommitFiberRoot(Y,y)}catch{}return!0}finally{X.p=p,B.T=c,Xg(t,r)}}function Jg(t,r,a){r=In(a,r),r=Kf(t.stateNode,r,2),t=hi(t,r,2),t!==null&&(qn(t,2),vr(t))}function tt(t,r,a){if(t.tag===3)Jg(t,t,a);else for(;r!==null;){if(r.tag===3){Jg(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Si===null||!Si.has(c))){t=In(a,t),a=ng(2),c=hi(r,a,2),c!==null&&(rg(a,c,r,t),qn(c,2),vr(c));break}}r=r.return}}function xd(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new GS;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(cd=!0,p.add(a),t=e2.bind(null,t,r,a),r.then(t,t))}function e2(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,it===t&&(He&a)===a&&(vt===4||vt===3&&(He&62914560)===He&&300>Mt()-hd?(Ge&2)===0&&Jl(t,0):fd|=a,Gl===He&&(Gl=0)),vr(t)}function Wg(t,r){r===0&&(r=jr()),t=Ml(t,r),t!==null&&(qn(t,r),vr(t))}function t2(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Wg(t,a)}function n2(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(r),Wg(t,a)}function r2(t,r){return tr(t,r)}var uu=null,ea=null,wd=!1,cu=!1,Sd=!1,ol=0;function vr(t){t!==ea&&t.next===null&&(ea===null?uu=ea=t:ea=ea.next=t),cu=!0,wd||(wd=!0,l2())}function vs(t,r){if(!Sd&&cu){Sd=!0;do for(var a=!1,c=uu;c!==null;){if(t!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var S=c.suspendedLanes,T=c.pingedLanes;y=(1<<31-ge(42|t)+1)-1,y&=p&~(S&~T),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(a=!0,r0(c,y))}else y=He,y=ft(c,c===it?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Lt(c,y)||(a=!0,r0(c,y));c=c.next}while(a);Sd=!1}}function i2(){e0()}function e0(){cu=wd=!1;var t=0;ol!==0&&(h2()&&(t=ol),ol=0);for(var r=Mt(),a=null,c=uu;c!==null;){var p=c.next,y=t0(c,r);y===0?(c.next=null,a===null?uu=p:a.next=p,p===null&&(ea=a)):(a=c,(t!==0||(y&3)!==0)&&(cu=!0)),c=p}vs(t)}function t0(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var S=31-ge(y),T=1<<S,j=p[S];j===-1?((T&a)===0||(T&c)!==0)&&(p[S]=zt(T,r)):j<=r&&(t.expiredLanes|=T),y&=~T}if(r=it,a=He,a=ft(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===r&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&fn(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Lt(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(c!==null&&fn(c),ve(a)){case 2:case 8:a=Ke;break;case 32:a=Bn;break;case 268435456:a=dr;break;default:a=Bn}return c=n0.bind(null,t),a=tr(a,c),t.callbackPriority=r,t.callbackNode=a,r}return c!==null&&c!==null&&fn(c),t.callbackPriority=2,t.callbackNode=null,2}function n0(t,r){if(It!==0&&It!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ou()&&t.callbackNode!==a)return null;var c=He;return c=ft(t,t===it?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Bg(t,c,r),t0(t,Mt()),t.callbackNode!=null&&t.callbackNode===a?n0.bind(null,t):null)}function r0(t,r){if(ou())return null;Bg(t,r,!0)}function l2(){m2(function(){(Ge&6)!==0?tr(wn,i2):e0()})}function Cd(){return ol===0&&(ol=ai()),ol}function i0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wo(""+t)}function l0(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function a2(t,r,a,c,p){if(r==="submit"&&a&&a.stateNode===p){var y=i0((p[he]||null).action),S=c.submitter;S&&(r=(r=S[he]||null)?i0(r.formAction):S.getAttribute("formAction"),r!==null&&(y=r,S=null));var T=new Ao("action","action",null,c,p);t.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ol!==0){var j=S?l0(p,S):new FormData(p);Qf(a,{pending:!0,data:j,method:p.method,action:y},null,j)}}else typeof y=="function"&&(T.preventDefault(),j=S?l0(p,S):new FormData(p),Qf(a,{pending:!0,data:j,method:p.method,action:y},y,j))},currentTarget:p}]})}}for(var Ed=0;Ed<of.length;Ed++){var Ad=of[Ed],s2=Ad.toLowerCase(),o2=Ad[0].toUpperCase()+Ad.slice(1);rr(s2,"on"+o2)}rr(Bm,"onAnimationEnd"),rr(qm,"onAnimationIteration"),rr(Hm,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(AS,"onTransitionRun"),rr(TS,"onTransitionStart"),rr(kS,"onTransitionCancel"),rr(Fm,"onTransitionEnd"),Dr("onMouseEnter",["mouseout","mouseover"]),Dr("onMouseLeave",["mouseout","mouseover"]),Dr("onPointerEnter",["pointerout","pointerover"]),Dr("onPointerLeave",["pointerout","pointerover"]),pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xs="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(" "),u2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xs));function a0(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],p=c.event;c=c.listeners;e:{var y=void 0;if(r)for(var S=c.length-1;0<=S;S--){var T=c[S],j=T.instance,F=T.currentTarget;if(T=T.listener,j!==y&&p.isPropagationStopped())break e;y=T,p.currentTarget=F;try{y(p)}catch(K){Zo(K)}p.currentTarget=null,y=j}else for(S=0;S<c.length;S++){if(T=c[S],j=T.instance,F=T.currentTarget,T=T.listener,j!==y&&p.isPropagationStopped())break e;y=T,p.currentTarget=F;try{y(p)}catch(K){Zo(K)}p.currentTarget=null,y=j}}}}function ze(t,r){var a=r[dt];a===void 0&&(a=r[dt]=new Set);var c=t+"__bubble";a.has(c)||(s0(r,t,2,!1),a.add(c))}function Td(t,r,a){var c=0;r&&(c|=4),s0(a,t,c,r)}var fu="_reactListening"+Math.random().toString(36).slice(2);function kd(t){if(!t[fu]){t[fu]=!0,Ua.forEach(function(a){a!=="selectionchange"&&(u2.has(a)||Td(a,!1,t),Td(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[fu]||(r[fu]=!0,Td("selectionchange",!1,r))}}function s0(t,r,a,c){switch(O0(r)){case 2:var p=z2;break;case 8:p=U2;break;default:p=Fd}a=p.bind(null,r,a,t),p=void 0,!Kc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(r,a,{capture:!0,passive:p}):t.addEventListener(r,a,!0):p!==void 0?t.addEventListener(r,a,{passive:p}):t.addEventListener(r,a,!1)}function _d(t,r,a,c,p){var y=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var T=c.stateNode.containerInfo;if(T===p)break;if(S===4)for(S=c.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;T!==null;){if(S=Ve(T),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){c=y=S;continue e}T=T.parentNode}}c=c.return}pm(function(){var F=y,K=$c(a),Z=[];e:{var P=Pm.get(t);if(P!==void 0){var Q=Ao,Ee=t;switch(t){case"keypress":if(Co(a)===0)break e;case"keydown":case"keyup":Q=rS;break;case"focusin":Ee="focus",Q=Jc;break;case"focusout":Ee="blur",Q=Jc;break;case"beforeblur":case"afterblur":Q=Jc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=gm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Vw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=aS;break;case Bm:case qm:case Hm:Q=Kw;break;case Fm:Q=oS;break;case"scroll":case"scrollend":Q=Qw;break;case"wheel":Q=cS;break;case"copy":case"cut":case"paste":Q=Xw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=vm;break;case"toggle":case"beforetoggle":Q=dS}var we=(r&4)!==0,et=!we&&(t==="scroll"||t==="scrollend"),U=we?P!==null?P+"Capture":null:P;we=[];for(var L=F,H;L!==null;){var G=L;if(H=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||H===null||U===null||(G=qa(L,U),G!=null&&we.push(ws(L,G,H))),et)break;L=L.return}0<we.length&&(P=new Q(P,Ee,null,a,K),Z.push({event:P,listeners:we}))}}if((r&7)===0){e:{if(P=t==="mouseover"||t==="pointerover",Q=t==="mouseout"||t==="pointerout",P&&a!==Vc&&(Ee=a.relatedTarget||a.fromElement)&&(Ve(Ee)||Ee[Se]))break e;if((Q||P)&&(P=K.window===K?K:(P=K.ownerDocument)?P.defaultView||P.parentWindow:window,Q?(Ee=a.relatedTarget||a.toElement,Q=F,Ee=Ee?Ve(Ee):null,Ee!==null&&(et=o(Ee),we=Ee.tag,Ee!==et||we!==5&&we!==27&&we!==6)&&(Ee=null)):(Q=null,Ee=F),Q!==Ee)){if(we=gm,G="onMouseLeave",U="onMouseEnter",L="mouse",(t==="pointerout"||t==="pointerover")&&(we=vm,G="onPointerLeave",U="onPointerEnter",L="pointer"),et=Q==null?P:Vi(Q),H=Ee==null?P:Vi(Ee),P=new we(G,L+"leave",Q,a,K),P.target=et,P.relatedTarget=H,G=null,Ve(K)===F&&(we=new we(U,L+"enter",Ee,a,K),we.target=H,we.relatedTarget=et,G=we),et=G,Q&&Ee)t:{for(we=Q,U=Ee,L=0,H=we;H;H=ta(H))L++;for(H=0,G=U;G;G=ta(G))H++;for(;0<L-H;)we=ta(we),L--;for(;0<H-L;)U=ta(U),H--;for(;L--;){if(we===U||U!==null&&we===U.alternate)break t;we=ta(we),U=ta(U)}we=null}else we=null;Q!==null&&o0(Z,P,Q,we,!1),Ee!==null&&et!==null&&o0(Z,et,Ee,we,!0)}}e:{if(P=F?Vi(F):window,Q=P.nodeName&&P.nodeName.toLowerCase(),Q==="select"||Q==="input"&&P.type==="file")var de=km;else if(Am(P))if(_m)de=SS;else{de=xS;var je=vS}else Q=P.nodeName,!Q||Q.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?F&&Ic(F.elementType)&&(de=km):de=wS;if(de&&(de=de(t,F))){Tm(Z,de,a,K);break e}je&&je(t,P,F),t==="focusout"&&F&&P.type==="number"&&F.memoizedProps.value!=null&&Qc(P,"number",P.value)}switch(je=F?Vi(F):window,t){case"focusin":(Am(je)||je.contentEditable==="true")&&(Ol=je,lf=F,Ya=null);break;case"focusout":Ya=lf=Ol=null;break;case"mousedown":af=!0;break;case"contextmenu":case"mouseup":case"dragend":af=!1,zm(Z,a,K);break;case"selectionchange":if(ES)break;case"keydown":case"keyup":zm(Z,a,K)}var be;if(ef)e:{switch(t){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Rl?Cm(t,a)&&(Ce="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(xm&&a.locale!=="ko"&&(Rl||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Rl&&(be=mm()):(ui=K,Gc="value"in ui?ui.value:ui.textContent,Rl=!0)),je=du(F,Ce),0<je.length&&(Ce=new bm(Ce,t,null,a,K),Z.push({event:Ce,listeners:je}),be?Ce.data=be:(be=Em(a),be!==null&&(Ce.data=be)))),(be=pS?mS(t,a):yS(t,a))&&(Ce=du(F,"onBeforeInput"),0<Ce.length&&(je=new bm("onBeforeInput","beforeinput",null,a,K),Z.push({event:je,listeners:Ce}),je.data=be)),a2(Z,t,F,a,K)}a0(Z,r)})}function ws(t,r,a){return{instance:t,listener:r,currentTarget:a}}function du(t,r){for(var a=r+"Capture",c=[];t!==null;){var p=t,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=qa(t,a),p!=null&&c.unshift(ws(t,p,y)),p=qa(t,r),p!=null&&c.push(ws(t,p,y))),t.tag===3)return c;t=t.return}return[]}function ta(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function o0(t,r,a,c,p){for(var y=r._reactName,S=[];a!==null&&a!==c;){var T=a,j=T.alternate,F=T.stateNode;if(T=T.tag,j!==null&&j===c)break;T!==5&&T!==26&&T!==27||F===null||(j=F,p?(F=qa(a,y),F!=null&&S.unshift(ws(a,F,j))):p||(F=qa(a,y),F!=null&&S.push(ws(a,F,j)))),a=a.return}S.length!==0&&t.push({event:r,listeners:S})}var c2=/\r\n?/g,f2=/\u0000|\uFFFD/g;function u0(t){return(typeof t=="string"?t:""+t).replace(c2,`
49
- `).replace(f2,"")}function c0(t,r){return r=u0(r),u0(t)===r}function hu(){}function We(t,r,a,c,p,y){switch(a){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||kl(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&kl(t,""+c);break;case"className":oi(t,"class",c);break;case"tabIndex":oi(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":oi(t,a,c);break;case"style":dm(t,c,y);break;case"data":if(r!=="object"){oi(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wo(""+c),t.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(a==="formAction"?(r!=="input"&&We(t,r,"name",p.name,p,null),We(t,r,"formEncType",p.formEncType,p,null),We(t,r,"formMethod",p.formMethod,p,null),We(t,r,"formTarget",p.formTarget,p,null)):(We(t,r,"encType",p.encType,p,null),We(t,r,"method",p.method,p,null),We(t,r,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wo(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=hu);break;case"onScroll":c!=null&&ze("scroll",t);break;case"onScrollEnd":c!=null&&ze("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}a=wo(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""+c):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":c===!0?t.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,c):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(a,c):t.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(a):t.setAttribute(a,c);break;case"popover":ze("beforetoggle",t),ze("toggle",t),El(t,"popover",c);break;case"xlinkActuate":Mr(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Mr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Mr(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Mr(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Mr(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Mr(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":El(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Fw.get(a)||a,El(t,a,c))}}function Nd(t,r,a,c,p,y){switch(a){case"style":dm(t,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof c=="string"?kl(t,c):(typeof c=="number"||typeof c=="bigint")&&kl(t,""+c);break;case"onScroll":c!=null&&ze("scroll",t);break;case"onScrollEnd":c!=null&&ze("scrollend",t);break;case"onClick":c!=null&&(t.onclick=hu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ba.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(p=a.endsWith("Capture"),r=a.slice(2,p?a.length-7:void 0),y=t[he]||null,y=y!=null?y[a]:null,typeof y=="function"&&t.removeEventListener(r,y,p),typeof c=="function")){typeof y!="function"&&y!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,c,p);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):El(t,a,c)}}}function Vt(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",t),ze("load",t);var c=!1,p=!1,y;for(y in a)if(a.hasOwnProperty(y)){var S=a[y];if(S!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:We(t,r,y,S,a,null)}}p&&We(t,r,"srcSet",a.srcSet,a,null),c&&We(t,r,"src",a.src,a,null);return;case"input":ze("invalid",t);var T=y=S=p=null,j=null,F=null;for(c in a)if(a.hasOwnProperty(c)){var K=a[c];if(K!=null)switch(c){case"name":p=K;break;case"type":S=K;break;case"checked":j=K;break;case"defaultChecked":F=K;break;case"value":y=K;break;case"defaultValue":T=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,r));break;default:We(t,r,c,K,a,null)}}om(t,y,T,j,F,S,p,!1),vo(t);return;case"select":ze("invalid",t),c=S=y=null;for(p in a)if(a.hasOwnProperty(p)&&(T=a[p],T!=null))switch(p){case"value":y=T;break;case"defaultValue":S=T;break;case"multiple":c=T;default:We(t,r,p,T,a,null)}r=y,a=S,t.multiple=!!c,r!=null?Tl(t,!!c,r,!1):a!=null&&Tl(t,!!c,a,!0);return;case"textarea":ze("invalid",t),y=p=c=null;for(S in a)if(a.hasOwnProperty(S)&&(T=a[S],T!=null))switch(S){case"value":c=T;break;case"defaultValue":p=T;break;case"children":y=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(l(91));break;default:We(t,r,S,T,a,null)}cm(t,c,p,y),vo(t);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(c=a[j],c!=null))switch(j){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:We(t,r,j,c,a,null)}return;case"dialog":ze("beforetoggle",t),ze("toggle",t),ze("cancel",t),ze("close",t);break;case"iframe":case"object":ze("load",t);break;case"video":case"audio":for(c=0;c<xs.length;c++)ze(xs[c],t);break;case"image":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"embed":case"source":case"link":ze("error",t),ze("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in a)if(a.hasOwnProperty(F)&&(c=a[F],c!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:We(t,r,F,c,a,null)}return;default:if(Ic(r)){for(K in a)a.hasOwnProperty(K)&&(c=a[K],c!==void 0&&Nd(t,r,K,c,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(c=a[T],c!=null&&We(t,r,T,c,a,null))}function d2(t,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,S=null,T=null,j=null,F=null,K=null;for(Q in a){var Z=a[Q];if(a.hasOwnProperty(Q)&&Z!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":j=Z;default:c.hasOwnProperty(Q)||We(t,r,Q,null,c,Z)}}for(var P in c){var Q=c[P];if(Z=a[P],c.hasOwnProperty(P)&&(Q!=null||Z!=null))switch(P){case"type":y=Q;break;case"name":p=Q;break;case"checked":F=Q;break;case"defaultChecked":K=Q;break;case"value":S=Q;break;case"defaultValue":T=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(l(137,r));break;default:Q!==Z&&We(t,r,P,Q,c,Z)}}Pc(t,S,T,j,F,K,y,p);return;case"select":Q=S=T=P=null;for(y in a)if(j=a[y],a.hasOwnProperty(y)&&j!=null)switch(y){case"value":break;case"multiple":Q=j;default:c.hasOwnProperty(y)||We(t,r,y,null,c,j)}for(p in c)if(y=c[p],j=a[p],c.hasOwnProperty(p)&&(y!=null||j!=null))switch(p){case"value":P=y;break;case"defaultValue":T=y;break;case"multiple":S=y;default:y!==j&&We(t,r,p,y,c,j)}r=T,a=S,c=Q,P!=null?Tl(t,!!a,P,!1):!!c!=!!a&&(r!=null?Tl(t,!!a,r,!0):Tl(t,!!a,a?[]:"",!1));return;case"textarea":Q=P=null;for(T in a)if(p=a[T],a.hasOwnProperty(T)&&p!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:We(t,r,T,null,c,p)}for(S in c)if(p=c[S],y=a[S],c.hasOwnProperty(S)&&(p!=null||y!=null))switch(S){case"value":P=p;break;case"defaultValue":Q=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:p!==y&&We(t,r,S,p,c,y)}um(t,P,Q);return;case"option":for(var Ee in a)if(P=a[Ee],a.hasOwnProperty(Ee)&&P!=null&&!c.hasOwnProperty(Ee))switch(Ee){case"selected":t.selected=!1;break;default:We(t,r,Ee,null,c,P)}for(j in c)if(P=c[j],Q=a[j],c.hasOwnProperty(j)&&P!==Q&&(P!=null||Q!=null))switch(j){case"selected":t.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:We(t,r,j,P,c,Q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in a)P=a[we],a.hasOwnProperty(we)&&P!=null&&!c.hasOwnProperty(we)&&We(t,r,we,null,c,P);for(F in c)if(P=c[F],Q=a[F],c.hasOwnProperty(F)&&P!==Q&&(P!=null||Q!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,r));break;default:We(t,r,F,P,c,Q)}return;default:if(Ic(r)){for(var et in a)P=a[et],a.hasOwnProperty(et)&&P!==void 0&&!c.hasOwnProperty(et)&&Nd(t,r,et,void 0,c,P);for(K in c)P=c[K],Q=a[K],!c.hasOwnProperty(K)||P===Q||P===void 0&&Q===void 0||Nd(t,r,K,P,c,Q);return}}for(var U in a)P=a[U],a.hasOwnProperty(U)&&P!=null&&!c.hasOwnProperty(U)&&We(t,r,U,null,c,P);for(Z in c)P=c[Z],Q=a[Z],!c.hasOwnProperty(Z)||P===Q||P==null&&Q==null||We(t,r,Z,P,c,Q)}var Rd=null,Od=null;function pu(t){return t.nodeType===9?t:t.ownerDocument}function f0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function d0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function jd(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Dd=null;function h2(){var t=window.event;return t&&t.type==="popstate"?t===Dd?!1:(Dd=t,!0):(Dd=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,p2=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,m2=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(t){return p0.resolve(null).then(t).catch(y2)}:h0;function y2(t){setTimeout(function(){throw t})}function Ai(t){return t==="head"}function m0(t,r){var a=r,c=0,p=0;do{var y=a.nextSibling;if(t.removeChild(a),y&&y.nodeType===8)if(a=y.data,a==="/$"){if(0<c&&8>c){a=c;var S=t.ownerDocument;if(a&1&&Ss(S.documentElement),a&2&&Ss(S.body),a&4)for(a=S.head,Ss(a),S=a.firstChild;S;){var T=S.nextSibling,j=S.nodeName;S[Ct]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&S.rel.toLowerCase()==="stylesheet"||a.removeChild(S),S=T}}if(p===0){t.removeChild(y),Rs(r);return}p--}else a==="$"||a==="$?"||a==="$!"?p++:c=a.charCodeAt(0)-48;else c=0;a=y}while(a);Rs(r)}function Md(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Md(a),Xt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function g2(t,r,a,c){for(;t.nodeType===1;){var p=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Ct])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(y=t.getAttribute("rel"),y==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(y!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(y=t.getAttribute("src"),(y!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===y)return t}else return t;if(t=lr(t.nextSibling),t===null)break}return null}function b2(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=lr(t.nextSibling),t===null))return null;return t}function Ld(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function v2(t,r){var a=t.ownerDocument;if(t.data!=="$?"||a.readyState==="complete")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function lr(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==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var zd=null;function y0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}function g0(t,r,a){switch(r=pu(a),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Ss(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Xt(t)}var Xn=new Map,b0=new Set;function mu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Kr=X.d;X.d={f:x2,r:w2,D:S2,C:C2,L:E2,m:A2,X:k2,S:T2,M:_2};function x2(){var t=Kr.f(),r=au();return t||r}function w2(t){var r=Cn(t);r!==null&&r.tag===5&&r.type==="form"?By(r):Kr.r(t)}var na=typeof document>"u"?null:document;function v0(t,r,a){var c=na;if(c&&typeof r=="string"&&r){var p=Qn(r);p='link[rel="'+t+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),b0.has(p)||(b0.add(p),t={rel:t,crossOrigin:a,href:r},c.querySelector(p)===null&&(r=c.createElement("link"),Vt(r,"link",t),Et(r),c.head.appendChild(r)))}}function S2(t){Kr.D(t),v0("dns-prefetch",t,null)}function C2(t,r){Kr.C(t,r),v0("preconnect",t,r)}function E2(t,r,a){Kr.L(t,r,a);var c=na;if(c&&t&&r){var p='link[rel="preload"][as="'+Qn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Qn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Qn(a.imageSizes)+'"]')):p+='[href="'+Qn(t)+'"]';var y=p;switch(r){case"style":y=ra(t);break;case"script":y=ia(t)}Xn.has(y)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),Xn.set(y,t),c.querySelector(p)!==null||r==="style"&&c.querySelector(Cs(y))||r==="script"&&c.querySelector(Es(y))||(r=c.createElement("link"),Vt(r,"link",t),Et(r),c.head.appendChild(r)))}}function A2(t,r){Kr.m(t,r);var a=na;if(a&&t){var c=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Qn(c)+'"][href="'+Qn(t)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=ia(t)}if(!Xn.has(y)&&(t=m({rel:"modulepreload",href:t},r),Xn.set(y,t),a.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Es(y)))return}c=a.createElement("link"),Vt(c,"link",t),Et(c),a.head.appendChild(c)}}}function T2(t,r,a){Kr.S(t,r,a);var c=na;if(c&&t){var p=si(c).hoistableStyles,y=ra(t);r=r||"default";var S=p.get(y);if(!S){var T={loading:0,preload:null};if(S=c.querySelector(Cs(y)))T.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=Xn.get(y))&&Ud(t,a);var j=S=c.createElement("link");Et(j),Vt(j,"link",t),j._p=new Promise(function(F,K){j.onload=F,j.onerror=K}),j.addEventListener("load",function(){T.loading|=1}),j.addEventListener("error",function(){T.loading|=2}),T.loading|=4,yu(S,r,c)}S={type:"stylesheet",instance:S,count:1,state:T},p.set(y,S)}}}function k2(t,r){Kr.X(t,r);var a=na;if(a&&t){var c=si(a).hoistableScripts,p=ia(t),y=c.get(p);y||(y=a.querySelector(Es(p)),y||(t=m({src:t,async:!0},r),(r=Xn.get(p))&&Bd(t,r),y=a.createElement("script"),Et(y),Vt(y,"link",t),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function _2(t,r){Kr.M(t,r);var a=na;if(a&&t){var c=si(a).hoistableScripts,p=ia(t),y=c.get(p);y||(y=a.querySelector(Es(p)),y||(t=m({src:t,async:!0,type:"module"},r),(r=Xn.get(p))&&Bd(t,r),y=a.createElement("script"),Et(y),Vt(y,"link",t),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function x0(t,r,a,c){var p=(p=ce.current)?mu(p):null;if(!p)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=ra(a.href),a=si(p).hoistableStyles,c=a.get(r),c||(c={type:"style",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=ra(a.href);var y=si(p).hoistableStyles,S=y.get(t);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,S),(y=p.querySelector(Cs(t)))&&!y._p&&(S.instance=y,S.state.loading=5),Xn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xn.set(t,a),y||N2(p,t,a,S.state))),r&&c===null)throw Error(l(528,""));return S}if(r&&c!==null)throw Error(l(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ia(a),a=si(p).hoistableScripts,c=a.get(r),c||(c={type:"script",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function ra(t){return'href="'+Qn(t)+'"'}function Cs(t){return'link[rel="stylesheet"]['+t+"]"}function w0(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function N2(t,r,a,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),Vt(r,"link",a),Et(r),t.head.appendChild(r))}function ia(t){return'[src="'+Qn(t)+'"]'}function Es(t){return"script[async]"+t}function S0(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Qn(a.href)+'"]');if(c)return r.instance=c,Et(c),c;var p=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),Et(c),Vt(c,"style",p),yu(c,a.precedence,t),r.instance=c;case"stylesheet":p=ra(a.href);var y=t.querySelector(Cs(p));if(y)return r.state.loading|=4,r.instance=y,Et(y),y;c=w0(a),(p=Xn.get(p))&&Ud(c,p),y=(t.ownerDocument||t).createElement("link"),Et(y);var S=y;return S._p=new Promise(function(T,j){S.onload=T,S.onerror=j}),Vt(y,"link",c),r.state.loading|=4,yu(y,a.precedence,t),r.instance=y;case"script":return y=ia(a.src),(p=t.querySelector(Es(y)))?(r.instance=p,Et(p),p):(c=a,(p=Xn.get(y))&&(c=m({},a),Bd(c,p)),t=t.ownerDocument||t,p=t.createElement("script"),Et(p),Vt(p,"link",c),t.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,yu(c,a.precedence,t));return r.instance}function yu(t,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,S=0;S<c.length;S++){var T=c[S];if(T.dataset.precedence===r)y=T;else if(y!==p)break}y?y.parentNode.insertBefore(t,y.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function Ud(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Bd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var gu=null;function C0(t,r,a){if(gu===null){var c=new Map,p=gu=new Map;p.set(a,c)}else p=gu,c=p.get(a),c||(c=new Map,p.set(a,c));if(c.has(t))return c;for(c.set(t,null),a=a.getElementsByTagName(t),p=0;p<a.length;p++){var y=a[p];if(!(y[Ct]||y[le]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var S=y.getAttribute(r)||"";S=t+S;var T=c.get(S);T?T.push(y):c.set(S,[y])}}return c}function E0(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function R2(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function A0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var As=null;function O2(){}function j2(t,r,a){if(As===null)throw Error(l(475));var c=As;if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=ra(a.href),y=t.querySelector(Cs(p));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=bu.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=y,Et(y);return}y=t.ownerDocument||t,a=w0(a),(p=Xn.get(p))&&Ud(a,p),y=y.createElement("link"),Et(y);var S=y;S._p=new Promise(function(T,j){S.onload=T,S.onerror=j}),Vt(y,"link",a),r.instance=y}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=bu.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function D2(){if(As===null)throw Error(l(475));var t=As;return t.stylesheets&&t.count===0&&qd(t,t.stylesheets),0<t.count?function(r){var a=setTimeout(function(){if(t.stylesheets&&qd(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(a)}}:null}function bu(){if(this.count--,this.count===0){if(this.stylesheets)qd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var vu=null;function qd(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,vu=new Map,r.forEach(M2,t),vu=null,bu.call(t))}function M2(t,r){if(!(r.state.loading&4)){var a=vu.get(t);if(a)var c=a.get(null);else{a=new Map,vu.set(t,a);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var S=p[y];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),c=S)}c&&a.set(null,c)}p=r.instance,S=p.getAttribute("data-precedence"),y=a.get(S)||c,y===c&&a.set(null,p),a.set(S,p),this.count++,c=bu.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),r.state.loading|=4}}var Ts={$$typeof:R,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function L2(t,r,a,c,p,y,S,T){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hr(0),this.hiddenUpdates=hr(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function T0(t,r,a,c,p,y,S,T,j,F,K,Z){return t=new L2(t,r,a,S,T,j,F,Z),r=1,y===!0&&(r|=24),y=An(3,null,null,r),t.current=y,y.stateNode=t,r=xf(),r.refCount++,t.pooledCache=r,r.refCount++,y.memoizedState={element:c,isDehydrated:a,cache:r},Ef(y),t}function k0(t){return t?(t=Ll,t):Ll}function _0(t,r,a,c,p,y){p=k0(p),c.context===null?c.context=p:c.pendingContext=p,c=di(r),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=hi(t,c,r),a!==null&&(Rn(a,t,r),ns(a,t,r))}function N0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Hd(t,r){N0(t,r),(t=t.alternate)&&N0(t,r)}function R0(t){if(t.tag===13){var r=Ml(t,67108864);r!==null&&Rn(r,t,67108864),Hd(t,67108864)}}var xu=!0;function z2(t,r,a,c){var p=B.T;B.T=null;var y=X.p;try{X.p=2,Fd(t,r,a,c)}finally{X.p=y,B.T=p}}function U2(t,r,a,c){var p=B.T;B.T=null;var y=X.p;try{X.p=8,Fd(t,r,a,c)}finally{X.p=y,B.T=p}}function Fd(t,r,a,c){if(xu){var p=Pd(c);if(p===null)_d(t,r,c,wu,a),j0(t,c);else if(q2(p,t,r,a,c))c.stopPropagation();else if(j0(t,c),r&4&&-1<B2.indexOf(t)){for(;p!==null;){var y=Cn(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=qe(y.pendingLanes);if(S!==0){var T=y;for(T.pendingLanes|=2,T.entangledLanes|=2;S;){var j=1<<31-ge(S);T.entanglements[1]|=j,S&=~j}vr(y),(Ge&6)===0&&(iu=Mt()+500,vs(0))}}break;case 13:T=Ml(y,2),T!==null&&Rn(T,y,2),au(),Hd(y,2)}if(y=Pd(c),y===null&&_d(t,r,c,wu,a),y===p)break;p=y}p!==null&&c.stopPropagation()}else _d(t,r,c,null,a)}}function Pd(t){return t=$c(t),Qd(t)}var wu=null;function Qd(t){if(wu=null,t=Ve(t),t!==null){var r=o(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=u(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return wu=t,null}function O0(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nr()){case wn:return 2;case Ke:return 8;case Bn:case Rr:return 32;case dr:return 268435456;default:return 32}default:return 32}}var Id=!1,Ti=null,ki=null,_i=null,ks=new Map,_s=new Map,Ni=[],B2="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".split(" ");function j0(t,r){switch(t){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":ks.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":_s.delete(r.pointerId)}}function Ns(t,r,a,c,p,y){return t===null||t.nativeEvent!==y?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},r!==null&&(r=Cn(r),r!==null&&R0(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function q2(t,r,a,c,p){switch(r){case"focusin":return Ti=Ns(Ti,t,r,a,c,p),!0;case"dragenter":return ki=Ns(ki,t,r,a,c,p),!0;case"mouseover":return _i=Ns(_i,t,r,a,c,p),!0;case"pointerover":var y=p.pointerId;return ks.set(y,Ns(ks.get(y)||null,t,r,a,c,p)),!0;case"gotpointercapture":return y=p.pointerId,_s.set(y,Ns(_s.get(y)||null,t,r,a,c,p)),!0}return!1}function D0(t){var r=Ve(t.target);if(r!==null){var a=o(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){t.blockedOn=r,rn(t.priority,function(){if(a.tag===13){var c=Nn();c=Kt(c);var p=Ml(a,c);p!==null&&Rn(p,a,c),Hd(a,c)}});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Su(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Pd(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Vc=c,a.target.dispatchEvent(c),Vc=null}else return r=Cn(a),r!==null&&R0(r),t.blockedOn=a,!1;r.shift()}return!0}function M0(t,r,a){Su(t)&&a.delete(r)}function H2(){Id=!1,Ti!==null&&Su(Ti)&&(Ti=null),ki!==null&&Su(ki)&&(ki=null),_i!==null&&Su(_i)&&(_i=null),ks.forEach(M0),_s.forEach(M0)}function Cu(t,r){t.blockedOn===r&&(t.blockedOn=null,Id||(Id=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,H2)))}var Eu=null;function L0(t){Eu!==t&&(Eu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Eu===t&&(Eu=null);for(var r=0;r<t.length;r+=3){var a=t[r],c=t[r+1],p=t[r+2];if(typeof c!="function"){if(Qd(c||a)===null)continue;break}var y=Cn(a);y!==null&&(t.splice(r,3),r-=3,Qf(y,{pending:!0,data:p,method:a.method,action:c},c,p))}}))}function Rs(t){function r(j){return Cu(j,t)}Ti!==null&&Cu(Ti,t),ki!==null&&Cu(ki,t),_i!==null&&Cu(_i,t),ks.forEach(r),_s.forEach(r);for(var a=0;a<Ni.length;a++){var c=Ni[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Ni.length&&(a=Ni[0],a.blockedOn===null);)D0(a),a.blockedOn===null&&Ni.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var p=a[c],y=a[c+1],S=p[he]||null;if(typeof y=="function")S||L0(a);else if(S){var T=null;if(y&&y.hasAttribute("formAction")){if(p=y,S=y[he]||null)T=S.formAction;else if(Qd(p)!==null)continue}else T=S.action;typeof T=="function"?a[c+1]=T:(a.splice(c,3),c-=3),L0(a)}}}function Vd(t){this._internalRoot=t}Au.prototype.render=Vd.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var a=r.current,c=Nn();_0(a,c,t,r,null,null)},Au.prototype.unmount=Vd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;_0(t.current,2,null,t,null,null),au(),r[Se]=null}};function Au(t){this._internalRoot=t}Au.prototype.unstable_scheduleHydration=function(t){if(t){var r=Me();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Ni.length&&r!==0&&r<Ni[a].priority;a++);Ni.splice(a,0,t),a===0&&D0(t)}};var z0=n.version;if(z0!=="19.1.0")throw Error(l(527,z0,"19.1.0"));X.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=d(r),t=t!==null?h(t):null,t=t===null?null:t.stateNode,t};var F2={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Y=Tu.inject(F2),W=Tu}catch{}}return js.createRoot=function(t,r){if(!s(t))throw Error(l(299));var a=!1,c="",p=Jy,y=Wy,S=eg,T=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks)),r=T0(t,1,!1,null,null,a,c,p,y,S,T,null),t[Se]=r.current,kd(t),new Vd(r)},js.hydrateRoot=function(t,r,a){if(!s(t))throw Error(l(299));var c=!1,p="",y=Jy,S=Wy,T=eg,j=null,F=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(j=a.unstable_transitionCallbacks),a.formState!==void 0&&(F=a.formState)),r=T0(t,1,!0,r,a??null,c,p,y,S,T,j,F),r.context=k0(null),a=r.current,c=Nn(),c=Kt(c),p=di(c),p.callback=null,hi(a,p,c),a=c,r.current.lanes=a,qn(r,a),vr(r),t[Se]=r.current,kd(t),new Au(r)},js.version="19.1.0",js}var $0;function X2(){if($0)return Kd.exports;$0=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(),Kd.exports=G2(),Kd.exports}var Z2=X2();const J2=Ca(Z2);var Ds={},Y0;function W2(){if(Y0)return Ds;Y0=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.parse=u,Ds.serialize=h;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,l=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,o=(()=>{const x=function(){};return x.prototype=Object.create(null),x})();function u(x,v){const w=new o,A=x.length;if(A<2)return w;const _=(v==null?void 0:v.decode)||m;let k=0;do{const O=x.indexOf("=",k);if(O===-1)break;const R=x.indexOf(";",k),q=R===-1?A:R;if(O>q){k=x.lastIndexOf(";",O-1)+1;continue}const M=f(x,k,O),D=d(x,O,M),$=x.slice(M,D);if(w[$]===void 0){let ee=f(x,O+1,q),ie=d(x,q,ee);const z=_(x.slice(ee,ie));w[$]=z}k=q+1}while(k<A);return w}function f(x,v,w){do{const A=x.charCodeAt(v);if(A!==32&&A!==9)return v}while(++v<w);return w}function d(x,v,w){for(;v>w;){const A=x.charCodeAt(--v);if(A!==32&&A!==9)return v+1}return w}function h(x,v,w){const A=(w==null?void 0:w.encode)||encodeURIComponent;if(!e.test(x))throw new TypeError(`argument name is invalid: ${x}`);const _=A(v);if(!n.test(_))throw new TypeError(`argument val is invalid: ${v}`);let k=x+"="+_;if(!w)return k;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);k+="; Max-Age="+w.maxAge}if(w.domain){if(!i.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);k+="; Domain="+w.domain}if(w.path){if(!l.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);k+="; Path="+w.path}if(w.expires){if(!g(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);k+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(k+="; HttpOnly"),w.secure&&(k+="; Secure"),w.partitioned&&(k+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":k+="; Priority=Low";break;case"medium":k+="; Priority=Medium";break;case"high":k+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":k+="; SameSite=Strict";break;case"lax":k+="; SameSite=Lax";break;case"none":k+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return k}function m(x){if(x.indexOf("%")===-1)return x;try{return decodeURIComponent(x)}catch{return x}}function g(x){return s.call(x)==="[object Date]"}return Ds}W2();var K0="popstate";function eC(e={}){function n(l,s){let{pathname:o,search:u,hash:f}=l.location;return Rh("",{pathname:o,search:u,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function i(l,s){return typeof s=="string"?s:Ks(s)}return nC(n,i,null,e)}function ut(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function sr(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function tC(){return Math.random().toString(36).substring(2,10)}function G0(e,n){return{usr:e.state,key:e.key,idx:n}}function Rh(e,n,i=null,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Ea(n):n,state:i,key:n&&n.key||l||tC()}}function Ks({pathname:e="/",search:n="",hash:i=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Ea(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substring(i),e=e.substring(0,i));let l=e.indexOf("?");l>=0&&(n.search=e.substring(l),e=e.substring(0,l)),e&&(n.pathname=e)}return n}function nC(e,n,i,l={}){let{window:s=document.defaultView,v5Compat:o=!1}=l,u=s.history,f="POP",d=null,h=m();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function m(){return(u.state||{idx:null}).idx}function g(){f="POP";let _=m(),k=_==null?null:_-h;h=_,d&&d({action:f,location:A.location,delta:k})}function x(_,k){f="PUSH";let O=Rh(A.location,_,k);h=m()+1;let R=G0(O,h),q=A.createHref(O);try{u.pushState(R,"",q)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(q)}o&&d&&d({action:f,location:A.location,delta:1})}function v(_,k){f="REPLACE";let O=Rh(A.location,_,k);h=m();let R=G0(O,h),q=A.createHref(O);u.replaceState(R,"",q),o&&d&&d({action:f,location:A.location,delta:0})}function w(_){return rC(_)}let A={get action(){return f},get location(){return e(s,u)},listen(_){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(K0,g),d=_,()=>{s.removeEventListener(K0,g),d=null}},createHref(_){return n(s,_)},createURL:w,encodeLocation(_){let k=w(_);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:v,go(_){return u.go(_)}};return A}function rC(e,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ut(i,"No window.location.(origin|href) available to create URL");let l=typeof e=="string"?e:Ks(e);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=i+l),new URL(l,i)}function Vb(e,n,i="/"){return iC(e,n,i,!1)}function iC(e,n,i,l){let s=typeof n=="string"?Ea(n):n,o=Jr(s.pathname||"/",i);if(o==null)return null;let u=$b(e);lC(u);let f=null;for(let d=0;f==null&&d<u.length;++d){let h=yC(o);f=pC(u[d],h,l)}return f}function $b(e,n=[],i=[],l=""){let s=(o,u,f)=>{let d={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:u,route:o};d.relativePath.startsWith("/")&&(ut(d.relativePath.startsWith(l),`Absolute route path "${d.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(l.length));let h=Zr([l,d.relativePath]),m=i.concat(d);o.children&&o.children.length>0&&(ut(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),$b(o.children,n,m,h)),!(o.path==null&&!o.index)&&n.push({path:h,score:dC(h,o.index),routesMeta:m})};return e.forEach((o,u)=>{var f;if(o.path===""||!((f=o.path)!=null&&f.includes("?")))s(o,u);else for(let d of Yb(o.path))s(o,u,d)}),n}function Yb(e){let n=e.split("/");if(n.length===0)return[];let[i,...l]=n,s=i.endsWith("?"),o=i.replace(/\?$/,"");if(l.length===0)return s?[o,""]:[o];let u=Yb(l.join("/")),f=[];return f.push(...u.map(d=>d===""?o:[o,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function lC(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:hC(n.routesMeta.map(l=>l.childrenIndex),i.routesMeta.map(l=>l.childrenIndex)))}var aC=/^:[\w-]+$/,sC=3,oC=2,uC=1,cC=10,fC=-2,X0=e=>e==="*";function dC(e,n){let i=e.split("/"),l=i.length;return i.some(X0)&&(l+=fC),n&&(l+=oC),i.filter(s=>!X0(s)).reduce((s,o)=>s+(aC.test(o)?sC:o===""?uC:cC),l)}function hC(e,n){return e.length===n.length&&e.slice(0,-1).every((l,s)=>l===n[s])?e[e.length-1]-n[n.length-1]:0}function pC(e,n,i=!1){let{routesMeta:l}=e,s={},o="/",u=[];for(let f=0;f<l.length;++f){let d=l[f],h=f===l.length-1,m=o==="/"?n:n.slice(o.length)||"/",g=Xu({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),x=d.route;if(!g&&h&&i&&!l[l.length-1].route.index&&(g=Xu({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(s,g.params),u.push({params:s,pathname:Zr([o,g.pathname]),pathnameBase:xC(Zr([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=Zr([o,g.pathnameBase]))}return u}function Xu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,l]=mC(e.path,e.caseSensitive,e.end),s=n.match(i);if(!s)return null;let o=s[0],u=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:l.reduce((h,{paramName:m,isOptional:g},x)=>{if(m==="*"){let w=f[x]||"";u=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?h[m]=void 0:h[m]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:u,pattern:e}}function mC(e,n=!1,i=!0){sr(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 l=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,d)=>(l.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(l.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),l]}function yC(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return sr(!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 Jr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,l=e.charAt(i);return l&&l!=="/"?null:e.slice(i)||"/"}function gC(e,n="/"){let{pathname:i,search:l="",hash:s=""}=typeof e=="string"?Ea(e):e;return{pathname:i?i.startsWith("/")?i:bC(i,n):n,search:wC(l),hash:SC(s)}}function bC(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function Jd(e,n,i,l){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vC(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function dp(e){let n=vC(e);return n.map((i,l)=>l===n.length-1?i.pathname:i.pathnameBase)}function hp(e,n,i,l=!1){let s;typeof e=="string"?s=Ea(e):(s={...e},ut(!s.pathname||!s.pathname.includes("?"),Jd("?","pathname","search",s)),ut(!s.pathname||!s.pathname.includes("#"),Jd("#","pathname","hash",s)),ut(!s.search||!s.search.includes("#"),Jd("#","search","hash",s)));let o=e===""||s.pathname==="",u=o?"/":s.pathname,f;if(u==null)f=i;else{let g=n.length-1;if(!l&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?n[g]:"/"}let d=gC(s,f),h=u&&u!=="/"&&u.endsWith("/"),m=(o||u===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Zr=e=>e.join("/").replace(/\/\/+/g,"/"),xC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Kb=["POST","PUT","PATCH","DELETE"];new Set(Kb);var EC=["GET",...Kb];new Set(EC);var Aa=E.createContext(null);Aa.displayName="DataRouter";var pc=E.createContext(null);pc.displayName="DataRouterState";var Gb=E.createContext({isTransitioning:!1});Gb.displayName="ViewTransition";var AC=E.createContext(new Map);AC.displayName="Fetchers";var TC=E.createContext(null);TC.displayName="Await";var cr=E.createContext(null);cr.displayName="Navigation";var to=E.createContext(null);to.displayName="Location";var Ar=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ar.displayName="Route";var pp=E.createContext(null);pp.displayName="RouteError";function kC(e,{relative:n}={}){ut(Ta(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:l}=E.useContext(cr),{hash:s,pathname:o,search:u}=no(e,{relative:n}),f=o;return i!=="/"&&(f=o==="/"?i:Zr([i,o])),l.createHref({pathname:f,search:u,hash:s})}function Ta(){return E.useContext(to)!=null}function Ln(){return ut(Ta(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(to).location}var Xb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zb(e){E.useContext(cr).static||E.useLayoutEffect(e)}function Tr(){let{isDataRoute:e}=E.useContext(Ar);return e?HC():_C()}function _C(){ut(Ta(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Aa),{basename:n,navigator:i}=E.useContext(cr),{matches:l}=E.useContext(Ar),{pathname:s}=Ln(),o=JSON.stringify(dp(l)),u=E.useRef(!1);return Zb(()=>{u.current=!0}),E.useCallback((d,h={})=>{if(sr(u.current,Xb),!u.current)return;if(typeof d=="number"){i.go(d);return}let m=hp(d,JSON.parse(o),s,h.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Zr([n,m.pathname])),(h.replace?i.replace:i.push)(m,h.state,h)},[n,i,o,s,e])}E.createContext(null);function no(e,{relative:n}={}){let{matches:i}=E.useContext(Ar),{pathname:l}=Ln(),s=JSON.stringify(dp(i));return E.useMemo(()=>hp(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function NC(e,n){return Jb(e,n)}function Jb(e,n,i,l){var O;ut(Ta(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s,static:o}=E.useContext(cr),{matches:u}=E.useContext(Ar),f=u[u.length-1],d=f?f.params:{},h=f?f.pathname:"/",m=f?f.pathnameBase:"/",g=f&&f.route;{let R=g&&g.path||"";Wb(h,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) 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.
50
-
51
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let x=Ln(),v;if(n){let R=typeof n=="string"?Ea(n):n;ut(m==="/"||((O=R.pathname)==null?void 0:O.startsWith(m)),`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 "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),v=R}else v=x;let w=v.pathname||"/",A=w;if(m!=="/"){let R=m.replace(/^\//,"").split("/");A="/"+w.replace(/^\//,"").split("/").slice(R.length).join("/")}let _=!o&&i&&i.matches&&i.matches.length>0?i.matches:Vb(e,{pathname:A});sr(g||_!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),sr(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 k=MC(_&&_.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Zr([m,s.encodeLocation?s.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Zr([m,s.encodeLocation?s.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),u,i,l);return n&&k?E.createElement(to.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},k):k}function RC(){let e=qC(),n=CC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,l="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:l},o={padding:"2px 4px",backgroundColor:l},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},n),i?E.createElement("pre",{style:s},i):null,u)}var OC=E.createElement(RC,null),jC=class extends E.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){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?E.createElement(Ar.Provider,{value:this.props.routeContext},E.createElement(pp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function DC({routeContext:e,match:n,children:i}){let l=E.useContext(Aa);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Ar.Provider,{value:e},i)}function MC(e,n=[],i=null,l=null){if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let s=e,o=i==null?void 0:i.errors;if(o!=null){let d=s.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);ut(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let u=!1,f=-1;if(i)for(let d=0;d<s.length;d++){let h=s[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=d),h.route.id){let{loaderData:m,errors:g}=i,x=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||x){u=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}return s.reduceRight((d,h,m)=>{let g,x=!1,v=null,w=null;i&&(g=o&&h.route.id?o[h.route.id]:void 0,v=h.route.errorElement||OC,u&&(f<0&&m===0?(Wb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):f===m&&(x=!0,w=h.route.hydrateFallbackElement||null)));let A=n.concat(s.slice(0,m+1)),_=()=>{let k;return g?k=v:x?k=w:h.route.Component?k=E.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=d,E.createElement(DC,{match:h,routeContext:{outlet:d,matches:A,isDataRoute:i!=null},children:k})};return i&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?E.createElement(jC,{location:i.location,revalidation:i.revalidation,component:v,error:g,children:_(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):_()},null)}function mp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LC(e){let n=E.useContext(Aa);return ut(n,mp(e)),n}function zC(e){let n=E.useContext(pc);return ut(n,mp(e)),n}function UC(e){let n=E.useContext(Ar);return ut(n,mp(e)),n}function yp(e){let n=UC(e),i=n.matches[n.matches.length-1];return ut(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function BC(){return yp("useRouteId")}function qC(){var l;let e=E.useContext(pp),n=zC("useRouteError"),i=yp("useRouteError");return e!==void 0?e:(l=n.errors)==null?void 0:l[i]}function HC(){let{router:e}=LC("useNavigate"),n=yp("useNavigate"),i=E.useRef(!1);return Zb(()=>{i.current=!0}),E.useCallback(async(s,o={})=>{sr(i.current,Xb),i.current&&(typeof s=="number"?e.navigate(s):await e.navigate(s,{fromRouteId:n,...o}))},[e,n])}var Z0={};function Wb(e,n,i){!n&&!Z0[e]&&(Z0[e]=!0,sr(!1,i))}E.memo(FC);function FC({routes:e,future:n,state:i}){return Jb(e,void 0,i,n)}function PC({to:e,replace:n,state:i,relative:l}){ut(Ta(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=E.useContext(cr);sr(!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:o}=E.useContext(Ar),{pathname:u}=Ln(),f=Tr(),d=hp(e,dp(o),u,l==="path"),h=JSON.stringify(d);return E.useEffect(()=>{f(JSON.parse(h),{replace:n,state:i,relative:l})},[f,h,l,n,i]),null}function zu(e){ut(!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 QC({basename:e="/",children:n=null,location:i,navigationType:l="POP",navigator:s,static:o=!1}){ut(!Ta(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=E.useMemo(()=>({basename:u,navigator:s,static:o,future:{}}),[u,s,o]);typeof i=="string"&&(i=Ea(i));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:x="default"}=i,v=E.useMemo(()=>{let w=Jr(d,u);return w==null?null:{location:{pathname:w,search:h,hash:m,state:g,key:x},navigationType:l}},[u,d,h,m,g,x,l]);return sr(v!=null,`<Router basename="${u}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:E.createElement(cr.Provider,{value:f},E.createElement(to.Provider,{children:n,value:v}))}function IC({children:e,location:n}){return NC(Oh(e),n)}function Oh(e,n=[]){let i=[];return E.Children.forEach(e,(l,s)=>{if(!E.isValidElement(l))return;let o=[...n,s];if(l.type===E.Fragment){i.push.apply(i,Oh(l.props.children,o));return}ut(l.type===zu,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ut(!l.props.index||!l.props.children,"An index route cannot have child routes.");let u={id:l.props.id||o.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(u.children=Oh(l.props.children,o)),i.push(u)}),i}var Uu="get",Bu="application/x-www-form-urlencoded";function mc(e){return e!=null&&typeof e.tagName=="string"}function VC(e){return mc(e)&&e.tagName.toLowerCase()==="button"}function $C(e){return mc(e)&&e.tagName.toLowerCase()==="form"}function YC(e){return mc(e)&&e.tagName.toLowerCase()==="input"}function KC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GC(e,n){return e.button===0&&(!n||n==="_self")&&!KC(e)}var ku=null;function XC(){if(ku===null)try{new FormData(document.createElement("form"),0),ku=!1}catch{ku=!0}return ku}var ZC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wd(e){return e!=null&&!ZC.has(e)?(sr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bu}"`),null):e}function JC(e,n){let i,l,s,o,u;if($C(e)){let f=e.getAttribute("action");l=f?Jr(f,n):null,i=e.getAttribute("method")||Uu,s=Wd(e.getAttribute("enctype"))||Bu,o=new FormData(e)}else if(VC(e)||YC(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 d=e.getAttribute("formaction")||f.getAttribute("action");if(l=d?Jr(d,n):null,i=e.getAttribute("formmethod")||f.getAttribute("method")||Uu,s=Wd(e.getAttribute("formenctype"))||Wd(f.getAttribute("enctype"))||Bu,o=new FormData(f,e),!XC()){let{name:h,type:m,value:g}=e;if(m==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if(mc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Uu,l=null,s=Bu,u=e}return o&&s==="text/plain"&&(u=o,o=void 0),{action:l,method:i.toLowerCase(),encType:s,formData:o,body:u}}function gp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}async function WC(e,n){if(e.id in n)return n[e.id];try{let i=await import(e.module);return n[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function eE(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 tE(e,n,i){let l=await Promise.all(e.map(async s=>{let o=n.routes[s.route.id];if(o){let u=await WC(o,i);return u.links?u.links():[]}return[]}));return lE(l.flat(1).filter(eE).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function J0(e,n,i,l,s,o){let u=(d,h)=>i[h]?d.route.id!==i[h].route.id:!0,f=(d,h)=>{var m;return i[h].pathname!==d.pathname||((m=i[h].route.path)==null?void 0:m.endsWith("*"))&&i[h].params["*"]!==d.params["*"]};return o==="assets"?n.filter((d,h)=>u(d,h)||f(d,h)):o==="data"?n.filter((d,h)=>{var g;let m=l.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(u(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=i[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function nE(e,n,{includeHydrateFallback:i}={}){return rE(e.map(l=>{let s=n.routes[l.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function rE(e){return[...new Set(e)]}function iE(e){let n={},i=Object.keys(e).sort();for(let l of i)n[l]=e[l];return n}function lE(e,n){let i=new Set;return new Set(n),e.reduce((l,s)=>{let o=JSON.stringify(iE(s));return i.has(o)||(i.add(o),l.push({key:o,link:s})),l},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var aE=new Set([100,101,204,205]);function sE(e,n){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname="_root.data":n&&Jr(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function ev(){let e=E.useContext(Aa);return gp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function oE(){let e=E.useContext(pc);return gp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bp=E.createContext(void 0);bp.displayName="FrameworkContext";function tv(){let e=E.useContext(bp);return gp(e,"You must render this element inside a <HydratedRouter> element"),e}function uE(e,n){let i=E.useContext(bp),[l,s]=E.useState(!1),[o,u]=E.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:g}=n,x=E.useRef(null);E.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let A=k=>{k.forEach(O=>{u(O.isIntersecting)})},_=new IntersectionObserver(A,{threshold:.5});return x.current&&_.observe(x.current),()=>{_.disconnect()}}},[e]),E.useEffect(()=>{if(l){let A=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(A)}}},[l]);let v=()=>{s(!0)},w=()=>{s(!1),u(!1)};return i?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ms(f,v),onBlur:Ms(d,w),onMouseEnter:Ms(h,v),onMouseLeave:Ms(m,w),onTouchStart:Ms(g,v)}]:[!1,x,{}]}function Ms(e,n){return i=>{e&&e(i),i.defaultPrevented||n(i)}}function cE({page:e,...n}){let{router:i}=ev(),l=E.useMemo(()=>Vb(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?E.createElement(dE,{page:e,matches:l,...n}):null}function fE(e){let{manifest:n,routeModules:i}=tv(),[l,s]=E.useState([]);return E.useEffect(()=>{let o=!1;return tE(e,n,i).then(u=>{o||s(u)}),()=>{o=!0}},[e,n,i]),l}function dE({page:e,matches:n,...i}){let l=Ln(),{manifest:s,routeModules:o}=tv(),{basename:u}=ev(),{loaderData:f,matches:d}=oE(),h=E.useMemo(()=>J0(e,n,d,s,l,"data"),[e,n,d,s,l]),m=E.useMemo(()=>J0(e,n,d,s,l,"assets"),[e,n,d,s,l]),g=E.useMemo(()=>{if(e===l.pathname+l.search+l.hash)return[];let w=new Set,A=!1;if(n.forEach(k=>{var R;let O=s.routes[k.route.id];!O||!O.hasLoader||(!h.some(q=>q.route.id===k.route.id)&&k.route.id in f&&((R=o[k.route.id])!=null&&R.shouldRevalidate)||O.hasClientLoader?A=!0:w.add(k.route.id))}),w.size===0)return[];let _=sE(e,u);return A&&w.size>0&&_.searchParams.set("_routes",n.filter(k=>w.has(k.route.id)).map(k=>k.route.id).join(",")),[_.pathname+_.search]},[u,f,l,s,h,n,e,o]),x=E.useMemo(()=>nE(m,s),[m,s]),v=fE(m);return E.createElement(E.Fragment,null,g.map(w=>E.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),x.map(w=>E.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),v.map(({key:w,link:A})=>E.createElement("link",{key:w,...A})))}function hE(...e){return n=>{e.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var nv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nv&&(window.__reactRouterVersion="7.6.0")}catch{}function pE({basename:e,children:n,window:i}){let l=E.useRef();l.current==null&&(l.current=eC({window:i,v5Compat:!0}));let s=l.current,[o,u]=E.useState({action:s.action,location:s.location}),f=E.useCallback(d=>{E.startTransition(()=>u(d))},[u]);return E.useLayoutEffect(()=>s.listen(f),[s,f]),E.createElement(QC,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:s})}var rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vp=E.forwardRef(function({onClick:n,discover:i="render",prefetch:l="none",relative:s,reloadDocument:o,replace:u,state:f,target:d,to:h,preventScrollReset:m,viewTransition:g,...x},v){let{basename:w}=E.useContext(cr),A=typeof h=="string"&&rv.test(h),_,k=!1;if(typeof h=="string"&&A&&(_=h,nv))try{let ie=new URL(window.location.href),z=h.startsWith("//")?new URL(ie.protocol+h):new URL(h),ae=Jr(z.pathname,w);z.origin===ie.origin&&ae!=null?h=ae+z.search+z.hash:k=!0}catch{sr(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let O=kC(h,{relative:s}),[R,q,M]=uE(l,x),D=bE(h,{replace:u,state:f,target:d,preventScrollReset:m,relative:s,viewTransition:g});function $(ie){n&&n(ie),ie.defaultPrevented||D(ie)}let ee=E.createElement("a",{...x,...M,href:_||O,onClick:k||o?n:$,ref:hE(v,q),target:d,"data-discover":!A&&i==="render"?"true":void 0});return R&&!A?E.createElement(E.Fragment,null,ee,E.createElement(cE,{page:O})):ee});vp.displayName="Link";var mE=E.forwardRef(function({"aria-current":n="page",caseSensitive:i=!1,className:l="",end:s=!1,style:o,to:u,viewTransition:f,children:d,...h},m){let g=no(u,{relative:h.relative}),x=Ln(),v=E.useContext(pc),{navigator:w,basename:A}=E.useContext(cr),_=v!=null&&CE(g)&&f===!0,k=w.encodeLocation?w.encodeLocation(g).pathname:g.pathname,O=x.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(O=O.toLowerCase(),R=R?R.toLowerCase():null,k=k.toLowerCase()),R&&A&&(R=Jr(R,A)||R);const q=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let M=O===k||!s&&O.startsWith(k)&&O.charAt(q)==="/",D=R!=null&&(R===k||!s&&R.startsWith(k)&&R.charAt(k.length)==="/"),$={isActive:M,isPending:D,isTransitioning:_},ee=M?n:void 0,ie;typeof l=="function"?ie=l($):ie=[l,M?"active":null,D?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o($):o;return E.createElement(vp,{...h,"aria-current":ee,className:ie,ref:m,style:z,to:u,viewTransition:f},typeof d=="function"?d($):d)});mE.displayName="NavLink";var yE=E.forwardRef(({discover:e="render",fetcherKey:n,navigate:i,reloadDocument:l,replace:s,state:o,method:u=Uu,action:f,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:g,...x},v)=>{let w=wE(),A=SE(f,{relative:h}),_=u.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&rv.test(f),O=R=>{if(d&&d(R),R.defaultPrevented)return;R.preventDefault();let q=R.nativeEvent.submitter,M=(q==null?void 0:q.getAttribute("formmethod"))||u;w(q||R.currentTarget,{fetcherKey:n,method:M,navigate:i,replace:s,state:o,relative:h,preventScrollReset:m,viewTransition:g})};return E.createElement("form",{ref:v,method:_,action:A,onSubmit:l?d:O,...x,"data-discover":!k&&e==="render"?"true":void 0})});yE.displayName="Form";function gE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iv(e){let n=E.useContext(Aa);return ut(n,gE(e)),n}function bE(e,{target:n,replace:i,state:l,preventScrollReset:s,relative:o,viewTransition:u}={}){let f=Tr(),d=Ln(),h=no(e,{relative:o});return E.useCallback(m=>{if(GC(m,n)){m.preventDefault();let g=i!==void 0?i:Ks(d)===Ks(h);f(e,{replace:g,state:l,preventScrollReset:s,relative:o,viewTransition:u})}},[d,f,h,i,l,n,e,s,o,u])}var vE=0,xE=()=>`__${String(++vE)}__`;function wE(){let{router:e}=iv("useSubmit"),{basename:n}=E.useContext(cr),i=BC();return E.useCallback(async(l,s={})=>{let{action:o,method:u,encType:f,formData:d,body:h}=JC(l,n);if(s.navigate===!1){let m=s.fetcherKey||xE();await e.fetch(m,i,s.action||o,{preventScrollReset:s.preventScrollReset,formData:d,body:h,formMethod:s.method||u,formEncType:s.encType||f,flushSync:s.flushSync})}else await e.navigate(s.action||o,{preventScrollReset:s.preventScrollReset,formData:d,body:h,formMethod:s.method||u,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:i,flushSync:s.flushSync,viewTransition:s.viewTransition})},[e,n,i])}function SE(e,{relative:n}={}){let{basename:i}=E.useContext(cr),l=E.useContext(Ar);ut(l,"useFormAction must be used inside a RouteContext");let[s]=l.matches.slice(-1),o={...no(e||".",{relative:n})},u=Ln();if(e==null){o.search=u.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(m=>m==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let m=f.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(o.pathname=o.pathname==="/"?i:Zr([i,o.pathname])),Ks(o)}function CE(e,n={}){let i=E.useContext(Gb);ut(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=iv("useViewTransitionState"),s=no(e,{relative:n.relative});if(!i.isTransitioning)return!1;let o=Jr(i.currentLocation.pathname,l)||i.currentLocation.pathname,u=Jr(i.nextLocation.pathname,l)||i.nextLocation.pathname;return Xu(s.pathname,u)!=null||Xu(s.pathname,o)!=null}[...aE];var lv=Ib();const EE=Ca(lv);function jh(e,n){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},jh(e,n)}function ka(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,jh(e,n)}var _a=function(){function e(){this.listeners=[]}var n=e.prototype;return n.subscribe=function(l){var s=this,o=l||function(){};return this.listeners.push(o),this.onSubscribe(),function(){s.listeners=s.listeners.filter(function(u){return u!==o}),s.onUnsubscribe()}},n.hasListeners=function(){return this.listeners.length>0},n.onSubscribe=function(){},n.onUnsubscribe=function(){},e}();function De(){return De=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var l in i)({}).hasOwnProperty.call(i,l)&&(e[l]=i[l])}return e},De.apply(null,arguments)}var Zu=typeof window>"u";function $t(){}function AE(e,n){return typeof e=="function"?e(n):e}function Dh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ju(e){return Array.isArray(e)?e:[e]}function av(e,n){return Math.max(e+(n||0)-Date.now(),0)}function qu(e,n,i){return ro(e)?typeof n=="function"?De({},i,{queryKey:e,queryFn:n}):De({},n,{queryKey:e}):e}function TE(e,n,i){return ro(e)?typeof n=="function"?De({},i,{mutationKey:e,mutationFn:n}):De({},n,{mutationKey:e}):typeof e=="function"?De({},n,{mutationFn:e}):De({},e)}function ji(e,n,i){return ro(e)?[De({},n,{queryKey:e}),i]:[e||{},n]}function kE(e,n){if(e===!0&&n===!0||e==null&&n==null)return"all";if(e===!1&&n===!1)return"none";var i=e??!n;return i?"active":"inactive"}function W0(e,n){var i=e.active,l=e.exact,s=e.fetching,o=e.inactive,u=e.predicate,f=e.queryKey,d=e.stale;if(ro(f)){if(l){if(n.queryHash!==xp(f,n.options))return!1}else if(!Wu(n.queryKey,f))return!1}var h=kE(i,o);if(h==="none")return!1;if(h!=="all"){var m=n.isActive();if(h==="active"&&!m||h==="inactive"&&m)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||typeof s=="boolean"&&n.isFetching()!==s||u&&!u(n))}function e1(e,n){var i=e.exact,l=e.fetching,s=e.predicate,o=e.mutationKey;if(ro(o)){if(!n.options.mutationKey)return!1;if(i){if(cl(n.options.mutationKey)!==cl(o))return!1}else if(!Wu(n.options.mutationKey,o))return!1}return!(typeof l=="boolean"&&n.state.status==="loading"!==l||s&&!s(n))}function xp(e,n){var i=(n==null?void 0:n.queryKeyHashFn)||cl;return i(e)}function cl(e){var n=Ju(e);return _E(n)}function _E(e){return JSON.stringify(e,function(n,i){return Mh(i)?Object.keys(i).sort().reduce(function(l,s){return l[s]=i[s],l},{}):i})}function Wu(e,n){return sv(Ju(e),Ju(n))}function sv(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?!Object.keys(n).some(function(i){return!sv(e[i],n[i])}):!1}function ec(e,n){if(e===n)return e;var i=Array.isArray(e)&&Array.isArray(n);if(i||Mh(e)&&Mh(n)){for(var l=i?e.length:Object.keys(e).length,s=i?n:Object.keys(n),o=s.length,u=i?[]:{},f=0,d=0;d<o;d++){var h=i?d:s[d];u[h]=ec(e[h],n[h]),u[h]===e[h]&&f++}return l===o&&f===l?e:u}return n}function NE(e,n){if(e&&!n||n&&!e)return!1;for(var i in e)if(e[i]!==n[i])return!1;return!0}function Mh(e){if(!t1(e))return!1;var n=e.constructor;if(typeof n>"u")return!0;var i=n.prototype;return!(!t1(i)||!i.hasOwnProperty("isPrototypeOf"))}function t1(e){return Object.prototype.toString.call(e)==="[object Object]"}function ro(e){return typeof e=="string"||Array.isArray(e)}function RE(e){return new Promise(function(n){setTimeout(n,e)})}function n1(e){Promise.resolve().then(e).catch(function(n){return setTimeout(function(){throw n})})}function ov(){if(typeof AbortController=="function")return new AbortController}var OE=function(e){ka(n,e);function n(){var l;return l=e.call(this)||this,l.setup=function(s){var o;if(!Zu&&((o=window)!=null&&o.addEventListener)){var u=function(){return s()};return window.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",u,!1),function(){window.removeEventListener("visibilitychange",u),window.removeEventListener("focus",u)}}},l}var i=n.prototype;return i.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},i.onUnsubscribe=function(){if(!this.hasListeners()){var s;(s=this.cleanup)==null||s.call(this),this.cleanup=void 0}},i.setEventListener=function(s){var o,u=this;this.setup=s,(o=this.cleanup)==null||o.call(this),this.cleanup=s(function(f){typeof f=="boolean"?u.setFocused(f):u.onFocus()})},i.setFocused=function(s){this.focused=s,s&&this.onFocus()},i.onFocus=function(){this.listeners.forEach(function(s){s()})},i.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},n}(_a),Ps=new OE,jE=function(e){ka(n,e);function n(){var l;return l=e.call(this)||this,l.setup=function(s){var o;if(!Zu&&((o=window)!=null&&o.addEventListener)){var u=function(){return s()};return window.addEventListener("online",u,!1),window.addEventListener("offline",u,!1),function(){window.removeEventListener("online",u),window.removeEventListener("offline",u)}}},l}var i=n.prototype;return i.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},i.onUnsubscribe=function(){if(!this.hasListeners()){var s;(s=this.cleanup)==null||s.call(this),this.cleanup=void 0}},i.setEventListener=function(s){var o,u=this;this.setup=s,(o=this.cleanup)==null||o.call(this),this.cleanup=s(function(f){typeof f=="boolean"?u.setOnline(f):u.onOnline()})},i.setOnline=function(s){this.online=s,s&&this.onOnline()},i.onOnline=function(){this.listeners.forEach(function(s){s()})},i.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},n}(_a),Hu=new jE;function DE(e){return Math.min(1e3*Math.pow(2,e),3e4)}function tc(e){return typeof(e==null?void 0:e.cancel)=="function"}var uv=function(n){this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent};function Fu(e){return e instanceof uv}var cv=function(n){var i=this,l=!1,s,o,u,f;this.abort=n.abort,this.cancel=function(x){return s==null?void 0:s(x)},this.cancelRetry=function(){l=!0},this.continueRetry=function(){l=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(x,v){u=x,f=v});var d=function(v){i.isResolved||(i.isResolved=!0,n.onSuccess==null||n.onSuccess(v),o==null||o(),u(v))},h=function(v){i.isResolved||(i.isResolved=!0,n.onError==null||n.onError(v),o==null||o(),f(v))},m=function(){return new Promise(function(v){o=v,i.isPaused=!0,n.onPause==null||n.onPause()}).then(function(){o=void 0,i.isPaused=!1,n.onContinue==null||n.onContinue()})},g=function x(){if(!i.isResolved){var v;try{v=n.fn()}catch(w){v=Promise.reject(w)}s=function(A){if(!i.isResolved&&(h(new uv(A)),i.abort==null||i.abort(),tc(v)))try{v.cancel()}catch{}},i.isTransportCancelable=tc(v),Promise.resolve(v).then(d).catch(function(w){var A,_;if(!i.isResolved){var k=(A=n.retry)!=null?A:3,O=(_=n.retryDelay)!=null?_:DE,R=typeof O=="function"?O(i.failureCount,w):O,q=k===!0||typeof k=="number"&&i.failureCount<k||typeof k=="function"&&k(i.failureCount,w);if(l||!q){h(w);return}i.failureCount++,n.onFail==null||n.onFail(i.failureCount,w),RE(R).then(function(){if(!Ps.isFocused()||!Hu.isOnline())return m()}).then(function(){l?h(w):x()})}})}};g()},ME=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(i){i()},this.batchNotifyFn=function(i){i()}}var n=e.prototype;return n.batch=function(l){var s;this.transactions++;try{s=l()}finally{this.transactions--,this.transactions||this.flush()}return s},n.schedule=function(l){var s=this;this.transactions?this.queue.push(l):n1(function(){s.notifyFn(l)})},n.batchCalls=function(l){var s=this;return function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];s.schedule(function(){l.apply(void 0,u)})}},n.flush=function(){var l=this,s=this.queue;this.queue=[],s.length&&n1(function(){l.batchNotifyFn(function(){s.forEach(function(o){l.notifyFn(o)})})})},n.setNotifyFunction=function(l){this.notifyFn=l},n.setBatchNotifyFunction=function(l){this.batchNotifyFn=l},e}(),ot=new ME,fv=console;function nc(){return fv}function LE(e){fv=e}var zE=function(){function e(i){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=i.defaultOptions,this.setOptions(i.options),this.observers=[],this.cache=i.cache,this.queryKey=i.queryKey,this.queryHash=i.queryHash,this.initialState=i.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=i.meta,this.scheduleGc()}var n=e.prototype;return n.setOptions=function(l){var s;this.options=De({},this.defaultOptions,l),this.meta=l==null?void 0:l.meta,this.cacheTime=Math.max(this.cacheTime||0,(s=this.options.cacheTime)!=null?s:5*60*1e3)},n.setDefaultOptions=function(l){this.defaultOptions=l},n.scheduleGc=function(){var l=this;this.clearGcTimeout(),Dh(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){l.optionalRemove()},this.cacheTime))},n.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},n.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},n.setData=function(l,s){var o,u,f=this.state.data,d=AE(l,f);return(o=(u=this.options).isDataEqual)!=null&&o.call(u,f,d)?d=f:this.options.structuralSharing!==!1&&(d=ec(f,d)),this.dispatch({data:d,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt}),d},n.setState=function(l,s){this.dispatch({type:"setState",state:l,setStateOptions:s})},n.cancel=function(l){var s,o=this.promise;return(s=this.retryer)==null||s.cancel(l),o?o.then($t).catch($t):Promise.resolve()},n.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},n.reset=function(){this.destroy(),this.setState(this.initialState)},n.isActive=function(){return this.observers.some(function(l){return l.options.enabled!==!1})},n.isFetching=function(){return this.state.isFetching},n.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(l){return l.getCurrentResult().isStale})},n.isStaleByTime=function(l){return l===void 0&&(l=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!av(this.state.dataUpdatedAt,l)},n.onFocus=function(){var l,s=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});s&&s.refetch(),(l=this.retryer)==null||l.continue()},n.onOnline=function(){var l,s=this.observers.find(function(o){return o.shouldFetchOnReconnect()});s&&s.refetch(),(l=this.retryer)==null||l.continue()},n.addObserver=function(l){this.observers.indexOf(l)===-1&&(this.observers.push(l),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:l}))},n.removeObserver=function(l){this.observers.indexOf(l)!==-1&&(this.observers=this.observers.filter(function(s){return s!==l}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:l}))},n.getObserversCount=function(){return this.observers.length},n.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},n.fetch=function(l,s){var o=this,u,f,d;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var h;return(h=this.retryer)==null||h.continueRetry(),this.promise}}if(l&&this.setOptions(l),!this.options.queryFn){var m=this.observers.find(function(O){return O.options.queryFn});m&&this.setOptions(m.options)}var g=Ju(this.queryKey),x=ov(),v={queryKey:g,pageParam:void 0,meta:this.meta};Object.defineProperty(v,"signal",{enumerable:!0,get:function(){if(x)return o.abortSignalConsumed=!0,x.signal}});var w=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(v)):Promise.reject("Missing queryFn")},A={fetchOptions:s,options:this.options,queryKey:g,state:this.state,fetchFn:w,meta:this.meta};if((u=this.options.behavior)!=null&&u.onFetch){var _;(_=this.options.behavior)==null||_.onFetch(A)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((f=A.fetchOptions)==null?void 0:f.meta)){var k;this.dispatch({type:"fetch",meta:(k=A.fetchOptions)==null?void 0:k.meta})}return this.retryer=new cv({fn:A.fetchFn,abort:x==null||(d=x.abort)==null?void 0:d.bind(x),onSuccess:function(R){o.setData(R),o.cache.config.onSuccess==null||o.cache.config.onSuccess(R,o),o.cacheTime===0&&o.optionalRemove()},onError:function(R){Fu(R)&&R.silent||o.dispatch({type:"error",error:R}),Fu(R)||(o.cache.config.onError==null||o.cache.config.onError(R,o),nc().error(R)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay}),this.promise=this.retryer.promise,this.promise},n.dispatch=function(l){var s=this;this.state=this.reducer(this.state,l),ot.batch(function(){s.observers.forEach(function(o){o.onQueryUpdate(l)}),s.cache.notify({query:s,type:"queryUpdated",action:l})})},n.getDefaultState=function(l){var s=typeof l.initialData=="function"?l.initialData():l.initialData,o=typeof l.initialData<"u",u=o?typeof l.initialDataUpdatedAt=="function"?l.initialDataUpdatedAt():l.initialDataUpdatedAt:0,f=typeof s<"u";return{data:s,dataUpdateCount:0,dataUpdatedAt:f?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:f?"success":"idle"}},n.reducer=function(l,s){var o,u;switch(s.type){case"failed":return De({},l,{fetchFailureCount:l.fetchFailureCount+1});case"pause":return De({},l,{isPaused:!0});case"continue":return De({},l,{isPaused:!1});case"fetch":return De({},l,{fetchFailureCount:0,fetchMeta:(o=s.meta)!=null?o:null,isFetching:!0,isPaused:!1},!l.dataUpdatedAt&&{error:null,status:"loading"});case"success":return De({},l,{data:s.data,dataUpdateCount:l.dataUpdateCount+1,dataUpdatedAt:(u=s.dataUpdatedAt)!=null?u:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var f=s.error;return Fu(f)&&f.revert&&this.revertState?De({},this.revertState):De({},l,{error:f,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return De({},l,{isInvalidated:!0});case"setState":return De({},l,s.state);default:return l}},e}(),UE=function(e){ka(n,e);function n(l){var s;return s=e.call(this)||this,s.config=l||{},s.queries=[],s.queriesMap={},s}var i=n.prototype;return i.build=function(s,o,u){var f,d=o.queryKey,h=(f=o.queryHash)!=null?f:xp(d,o),m=this.get(h);return m||(m=new zE({cache:this,queryKey:d,queryHash:h,options:s.defaultQueryOptions(o),state:u,defaultOptions:s.getQueryDefaults(d),meta:o.meta}),this.add(m)),m},i.add=function(s){this.queriesMap[s.queryHash]||(this.queriesMap[s.queryHash]=s,this.queries.push(s),this.notify({type:"queryAdded",query:s}))},i.remove=function(s){var o=this.queriesMap[s.queryHash];o&&(s.destroy(),this.queries=this.queries.filter(function(u){return u!==s}),o===s&&delete this.queriesMap[s.queryHash],this.notify({type:"queryRemoved",query:s}))},i.clear=function(){var s=this;ot.batch(function(){s.queries.forEach(function(o){s.remove(o)})})},i.get=function(s){return this.queriesMap[s]},i.getAll=function(){return this.queries},i.find=function(s,o){var u=ji(s,o),f=u[0];return typeof f.exact>"u"&&(f.exact=!0),this.queries.find(function(d){return W0(f,d)})},i.findAll=function(s,o){var u=ji(s,o),f=u[0];return Object.keys(f).length>0?this.queries.filter(function(d){return W0(f,d)}):this.queries},i.notify=function(s){var o=this;ot.batch(function(){o.listeners.forEach(function(u){u(s)})})},i.onFocus=function(){var s=this;ot.batch(function(){s.queries.forEach(function(o){o.onFocus()})})},i.onOnline=function(){var s=this;ot.batch(function(){s.queries.forEach(function(o){o.onOnline()})})},n}(_a),BE=function(){function e(i){this.options=De({},i.defaultOptions,i.options),this.mutationId=i.mutationId,this.mutationCache=i.mutationCache,this.observers=[],this.state=i.state||dv(),this.meta=i.meta}var n=e.prototype;return n.setState=function(l){this.dispatch({type:"setState",state:l})},n.addObserver=function(l){this.observers.indexOf(l)===-1&&this.observers.push(l)},n.removeObserver=function(l){this.observers=this.observers.filter(function(s){return s!==l})},n.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then($t).catch($t)):Promise.resolve()},n.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},n.execute=function(){var l=this,s,o=this.state.status==="loading",u=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),u=u.then(function(){l.mutationCache.config.onMutate==null||l.mutationCache.config.onMutate(l.state.variables,l)}).then(function(){return l.options.onMutate==null?void 0:l.options.onMutate(l.state.variables)}).then(function(f){f!==l.state.context&&l.dispatch({type:"loading",context:f,variables:l.state.variables})})),u.then(function(){return l.executeMutation()}).then(function(f){s=f,l.mutationCache.config.onSuccess==null||l.mutationCache.config.onSuccess(s,l.state.variables,l.state.context,l)}).then(function(){return l.options.onSuccess==null?void 0:l.options.onSuccess(s,l.state.variables,l.state.context)}).then(function(){return l.options.onSettled==null?void 0:l.options.onSettled(s,null,l.state.variables,l.state.context)}).then(function(){return l.dispatch({type:"success",data:s}),s}).catch(function(f){return l.mutationCache.config.onError==null||l.mutationCache.config.onError(f,l.state.variables,l.state.context,l),nc().error(f),Promise.resolve().then(function(){return l.options.onError==null?void 0:l.options.onError(f,l.state.variables,l.state.context)}).then(function(){return l.options.onSettled==null?void 0:l.options.onSettled(void 0,f,l.state.variables,l.state.context)}).then(function(){throw l.dispatch({type:"error",error:f}),f})})},n.executeMutation=function(){var l=this,s;return this.retryer=new cv({fn:function(){return l.options.mutationFn?l.options.mutationFn(l.state.variables):Promise.reject("No mutationFn found")},onFail:function(){l.dispatch({type:"failed"})},onPause:function(){l.dispatch({type:"pause"})},onContinue:function(){l.dispatch({type:"continue"})},retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay}),this.retryer.promise},n.dispatch=function(l){var s=this;this.state=qE(this.state,l),ot.batch(function(){s.observers.forEach(function(o){o.onMutationUpdate(l)}),s.mutationCache.notify(s)})},e}();function dv(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function qE(e,n){switch(n.type){case"failed":return De({},e,{failureCount:e.failureCount+1});case"pause":return De({},e,{isPaused:!0});case"continue":return De({},e,{isPaused:!1});case"loading":return De({},e,{context:n.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:n.variables});case"success":return De({},e,{data:n.data,error:null,status:"success",isPaused:!1});case"error":return De({},e,{data:void 0,error:n.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return De({},e,n.state);default:return e}}var hv=function(e){ka(n,e);function n(l){var s;return s=e.call(this)||this,s.config=l||{},s.mutations=[],s.mutationId=0,s}var i=n.prototype;return i.build=function(s,o,u){var f=new BE({mutationCache:this,mutationId:++this.mutationId,options:s.defaultMutationOptions(o),state:u,defaultOptions:o.mutationKey?s.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(f),f},i.add=function(s){this.mutations.push(s),this.notify(s)},i.remove=function(s){this.mutations=this.mutations.filter(function(o){return o!==s}),s.cancel(),this.notify(s)},i.clear=function(){var s=this;ot.batch(function(){s.mutations.forEach(function(o){s.remove(o)})})},i.getAll=function(){return this.mutations},i.find=function(s){return typeof s.exact>"u"&&(s.exact=!0),this.mutations.find(function(o){return e1(s,o)})},i.findAll=function(s){return this.mutations.filter(function(o){return e1(s,o)})},i.notify=function(s){var o=this;ot.batch(function(){o.listeners.forEach(function(u){u(s)})})},i.onFocus=function(){this.resumePausedMutations()},i.onOnline=function(){this.resumePausedMutations()},i.resumePausedMutations=function(){var s=this.mutations.filter(function(o){return o.state.isPaused});return ot.batch(function(){return s.reduce(function(o,u){return o.then(function(){return u.continue().catch($t)})},Promise.resolve())})},n}(_a);function HE(){return{onFetch:function(n){n.fetchFn=function(){var i,l,s,o,u,f,d=(i=n.fetchOptions)==null||(l=i.meta)==null?void 0:l.refetchPage,h=(s=n.fetchOptions)==null||(o=s.meta)==null?void 0:o.fetchMore,m=h==null?void 0:h.pageParam,g=(h==null?void 0:h.direction)==="forward",x=(h==null?void 0:h.direction)==="backward",v=((u=n.state.data)==null?void 0:u.pages)||[],w=((f=n.state.data)==null?void 0:f.pageParams)||[],A=ov(),_=A==null?void 0:A.signal,k=w,O=!1,R=n.options.queryFn||function(){return Promise.reject("Missing queryFn")},q=function(J,oe,B,X){return k=X?[oe].concat(k):[].concat(k,[oe]),X?[B].concat(J):[].concat(J,[B])},M=function(J,oe,B,X){if(O)return Promise.reject("Cancelled");if(typeof B>"u"&&!oe&&J.length)return Promise.resolve(J);var ne={queryKey:n.queryKey,signal:_,pageParam:B,meta:n.meta},pe=R(ne),C=Promise.resolve(pe).then(function(se){return q(J,B,se,X)});if(tc(pe)){var I=C;I.cancel=pe.cancel}return C},D;if(!v.length)D=M([]);else if(g){var $=typeof m<"u",ee=$?m:r1(n.options,v);D=M(v,$,ee)}else if(x){var ie=typeof m<"u",z=ie?m:FE(n.options,v);D=M(v,ie,z,!0)}else(function(){k=[];var ue=typeof n.options.getNextPageParam>"u",J=d&&v[0]?d(v[0],0,v):!0;D=J?M([],ue,w[0]):Promise.resolve(q([],w[0],v[0]));for(var oe=function(ne){D=D.then(function(pe){var C=d&&v[ne]?d(v[ne],ne,v):!0;if(C){var I=ue?w[ne]:r1(n.options,pe);return M(pe,ue,I)}return Promise.resolve(q(pe,w[ne],v[ne]))})},B=1;B<v.length;B++)oe(B)})();var ae=D.then(function(ue){return{pages:ue,pageParams:k}}),te=ae;return te.cancel=function(){O=!0,A==null||A.abort(),tc(D)&&D.cancel()},ae}}}}function r1(e,n){return e.getNextPageParam==null?void 0:e.getNextPageParam(n[n.length-1],n)}function FE(e,n){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(n[0],n)}var PE=function(){function e(i){i===void 0&&(i={}),this.queryCache=i.queryCache||new UE,this.mutationCache=i.mutationCache||new hv,this.defaultOptions=i.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var n=e.prototype;return n.mount=function(){var l=this;this.unsubscribeFocus=Ps.subscribe(function(){Ps.isFocused()&&Hu.isOnline()&&(l.mutationCache.onFocus(),l.queryCache.onFocus())}),this.unsubscribeOnline=Hu.subscribe(function(){Ps.isFocused()&&Hu.isOnline()&&(l.mutationCache.onOnline(),l.queryCache.onOnline())})},n.unmount=function(){var l,s;(l=this.unsubscribeFocus)==null||l.call(this),(s=this.unsubscribeOnline)==null||s.call(this)},n.isFetching=function(l,s){var o=ji(l,s),u=o[0];return u.fetching=!0,this.queryCache.findAll(u).length},n.isMutating=function(l){return this.mutationCache.findAll(De({},l,{fetching:!0})).length},n.getQueryData=function(l,s){var o;return(o=this.queryCache.find(l,s))==null?void 0:o.state.data},n.getQueriesData=function(l){return this.getQueryCache().findAll(l).map(function(s){var o=s.queryKey,u=s.state,f=u.data;return[o,f]})},n.setQueryData=function(l,s,o){var u=qu(l),f=this.defaultQueryOptions(u);return this.queryCache.build(this,f).setData(s,o)},n.setQueriesData=function(l,s,o){var u=this;return ot.batch(function(){return u.getQueryCache().findAll(l).map(function(f){var d=f.queryKey;return[d,u.setQueryData(d,s,o)]})})},n.getQueryState=function(l,s){var o;return(o=this.queryCache.find(l,s))==null?void 0:o.state},n.removeQueries=function(l,s){var o=ji(l,s),u=o[0],f=this.queryCache;ot.batch(function(){f.findAll(u).forEach(function(d){f.remove(d)})})},n.resetQueries=function(l,s,o){var u=this,f=ji(l,s,o),d=f[0],h=f[1],m=this.queryCache,g=De({},d,{active:!0});return ot.batch(function(){return m.findAll(d).forEach(function(x){x.reset()}),u.refetchQueries(g,h)})},n.cancelQueries=function(l,s,o){var u=this,f=ji(l,s,o),d=f[0],h=f[1],m=h===void 0?{}:h;typeof m.revert>"u"&&(m.revert=!0);var g=ot.batch(function(){return u.queryCache.findAll(d).map(function(x){return x.cancel(m)})});return Promise.all(g).then($t).catch($t)},n.invalidateQueries=function(l,s,o){var u,f,d,h=this,m=ji(l,s,o),g=m[0],x=m[1],v=De({},g,{active:(u=(f=g.refetchActive)!=null?f:g.active)!=null?u:!0,inactive:(d=g.refetchInactive)!=null?d:!1});return ot.batch(function(){return h.queryCache.findAll(g).forEach(function(w){w.invalidate()}),h.refetchQueries(v,x)})},n.refetchQueries=function(l,s,o){var u=this,f=ji(l,s,o),d=f[0],h=f[1],m=ot.batch(function(){return u.queryCache.findAll(d).map(function(x){return x.fetch(void 0,De({},h,{meta:{refetchPage:d==null?void 0:d.refetchPage}}))})}),g=Promise.all(m).then($t);return h!=null&&h.throwOnError||(g=g.catch($t)),g},n.fetchQuery=function(l,s,o){var u=qu(l,s,o),f=this.defaultQueryOptions(u);typeof f.retry>"u"&&(f.retry=!1);var d=this.queryCache.build(this,f);return d.isStaleByTime(f.staleTime)?d.fetch(f):Promise.resolve(d.state.data)},n.prefetchQuery=function(l,s,o){return this.fetchQuery(l,s,o).then($t).catch($t)},n.fetchInfiniteQuery=function(l,s,o){var u=qu(l,s,o);return u.behavior=HE(),this.fetchQuery(u)},n.prefetchInfiniteQuery=function(l,s,o){return this.fetchInfiniteQuery(l,s,o).then($t).catch($t)},n.cancelMutations=function(){var l=this,s=ot.batch(function(){return l.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(s).then($t).catch($t)},n.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},n.executeMutation=function(l){return this.mutationCache.build(this,l).execute()},n.getQueryCache=function(){return this.queryCache},n.getMutationCache=function(){return this.mutationCache},n.getDefaultOptions=function(){return this.defaultOptions},n.setDefaultOptions=function(l){this.defaultOptions=l},n.setQueryDefaults=function(l,s){var o=this.queryDefaults.find(function(u){return cl(l)===cl(u.queryKey)});o?o.defaultOptions=s:this.queryDefaults.push({queryKey:l,defaultOptions:s})},n.getQueryDefaults=function(l){var s;return l?(s=this.queryDefaults.find(function(o){return Wu(l,o.queryKey)}))==null?void 0:s.defaultOptions:void 0},n.setMutationDefaults=function(l,s){var o=this.mutationDefaults.find(function(u){return cl(l)===cl(u.mutationKey)});o?o.defaultOptions=s:this.mutationDefaults.push({mutationKey:l,defaultOptions:s})},n.getMutationDefaults=function(l){var s;return l?(s=this.mutationDefaults.find(function(o){return Wu(l,o.mutationKey)}))==null?void 0:s.defaultOptions:void 0},n.defaultQueryOptions=function(l){if(l!=null&&l._defaulted)return l;var s=De({},this.defaultOptions.queries,this.getQueryDefaults(l==null?void 0:l.queryKey),l,{_defaulted:!0});return!s.queryHash&&s.queryKey&&(s.queryHash=xp(s.queryKey,s)),s},n.defaultQueryObserverOptions=function(l){return this.defaultQueryOptions(l)},n.defaultMutationOptions=function(l){return l!=null&&l._defaulted?l:De({},this.defaultOptions.mutations,this.getMutationDefaults(l==null?void 0:l.mutationKey),l,{_defaulted:!0})},n.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),QE=function(e){ka(n,e);function n(l,s){var o;return o=e.call(this)||this,o.client=l,o.options=s,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(s),o}var i=n.prototype;return i.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},i.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),i1(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},i.onUnsubscribe=function(){this.listeners.length||this.destroy()},i.shouldFetchOnReconnect=function(){return Lh(this.currentQuery,this.options,this.options.refetchOnReconnect)},i.shouldFetchOnWindowFocus=function(){return Lh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},i.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},i.setOptions=function(s,o){var u=this.options,f=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(s),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=u.queryKey),this.updateQuery();var d=this.hasListeners();d&&l1(this.currentQuery,f,this.options,u)&&this.executeFetch(),this.updateResult(o),d&&(this.currentQuery!==f||this.options.enabled!==u.enabled||this.options.staleTime!==u.staleTime)&&this.updateStaleTimeout();var h=this.computeRefetchInterval();d&&(this.currentQuery!==f||this.options.enabled!==u.enabled||h!==this.currentRefetchInterval)&&this.updateRefetchInterval(h)},i.getOptimisticResult=function(s){var o=this.client.defaultQueryObserverOptions(s),u=this.client.getQueryCache().build(this.client,o);return this.createResult(u,o)},i.getCurrentResult=function(){return this.currentResult},i.trackResult=function(s,o){var u=this,f={},d=function(m){u.trackedProps.includes(m)||u.trackedProps.push(m)};return Object.keys(s).forEach(function(h){Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:function(){return d(h),s[h]}})}),(o.useErrorBoundary||o.suspense)&&d("error"),f},i.getNextResult=function(s){var o=this;return new Promise(function(u,f){var d=o.subscribe(function(h){h.isFetching||(d(),h.isError&&(s!=null&&s.throwOnError)?f(h.error):u(h))})})},i.getCurrentQuery=function(){return this.currentQuery},i.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},i.refetch=function(s){return this.fetch(De({},s,{meta:{refetchPage:s==null?void 0:s.refetchPage}}))},i.fetchOptimistic=function(s){var o=this,u=this.client.defaultQueryObserverOptions(s),f=this.client.getQueryCache().build(this.client,u);return f.fetch().then(function(){return o.createResult(f,u)})},i.fetch=function(s){var o=this;return this.executeFetch(s).then(function(){return o.updateResult(),o.currentResult})},i.executeFetch=function(s){this.updateQuery();var o=this.currentQuery.fetch(this.options,s);return s!=null&&s.throwOnError||(o=o.catch($t)),o},i.updateStaleTimeout=function(){var s=this;if(this.clearStaleTimeout(),!(Zu||this.currentResult.isStale||!Dh(this.options.staleTime))){var o=av(this.currentResult.dataUpdatedAt,this.options.staleTime),u=o+1;this.staleTimeoutId=setTimeout(function(){s.currentResult.isStale||s.updateResult()},u)}},i.computeRefetchInterval=function(){var s;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(s=this.options.refetchInterval)!=null?s:!1},i.updateRefetchInterval=function(s){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=s,!(Zu||this.options.enabled===!1||!Dh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||Ps.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},i.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},i.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},i.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},i.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},i.createResult=function(s,o){var u=this.currentQuery,f=this.options,d=this.currentResult,h=this.currentResultState,m=this.currentResultOptions,g=s!==u,x=g?s.state:this.currentQueryInitialState,v=g?this.currentResult:this.previousQueryResult,w=s.state,A=w.dataUpdatedAt,_=w.error,k=w.errorUpdatedAt,O=w.isFetching,R=w.status,q=!1,M=!1,D;if(o.optimisticResults){var $=this.hasListeners(),ee=!$&&i1(s,o),ie=$&&l1(s,u,o,f);(ee||ie)&&(O=!0,A||(R="loading"))}if(o.keepPreviousData&&!w.dataUpdateCount&&(v!=null&&v.isSuccess)&&R!=="error")D=v.data,A=v.dataUpdatedAt,R=v.status,q=!0;else if(o.select&&typeof w.data<"u")if(d&&w.data===(h==null?void 0:h.data)&&o.select===this.selectFn)D=this.selectResult;else try{this.selectFn=o.select,D=o.select(w.data),o.structuralSharing!==!1&&(D=ec(d==null?void 0:d.data,D)),this.selectResult=D,this.selectError=null}catch(te){nc().error(te),this.selectError=te}else D=w.data;if(typeof o.placeholderData<"u"&&typeof D>"u"&&(R==="loading"||R==="idle")){var z;if(d!=null&&d.isPlaceholderData&&o.placeholderData===(m==null?void 0:m.placeholderData))z=d.data;else if(z=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof z<"u")try{z=o.select(z),o.structuralSharing!==!1&&(z=ec(d==null?void 0:d.data,z)),this.selectError=null}catch(te){nc().error(te),this.selectError=te}typeof z<"u"&&(R="success",D=z,M=!0)}this.selectError&&(_=this.selectError,D=this.selectResult,k=Date.now(),R="error");var ae={status:R,isLoading:R==="loading",isSuccess:R==="success",isError:R==="error",isIdle:R==="idle",data:D,dataUpdatedAt:A,error:_,errorUpdatedAt:k,failureCount:w.fetchFailureCount,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:O,isRefetching:O&&R!=="loading",isLoadingError:R==="error"&&w.dataUpdatedAt===0,isPlaceholderData:M,isPreviousData:q,isRefetchError:R==="error"&&w.dataUpdatedAt!==0,isStale:wp(s,o),refetch:this.refetch,remove:this.remove};return ae},i.shouldNotifyListeners=function(s,o){if(!o)return!0;var u=this.options,f=u.notifyOnChangeProps,d=u.notifyOnChangePropsExclusions;if(!f&&!d||f==="tracked"&&!this.trackedProps.length)return!0;var h=f==="tracked"?this.trackedProps:f;return Object.keys(s).some(function(m){var g=m,x=s[g]!==o[g],v=h==null?void 0:h.some(function(A){return A===m}),w=d==null?void 0:d.some(function(A){return A===m});return x&&!w&&(!h||v)})},i.updateResult=function(s){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!NE(this.currentResult,o)){var u={cache:!0};(s==null?void 0:s.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(u.listeners=!0),this.notify(De({},u,s))}},i.updateQuery=function(){var s=this.client.getQueryCache().build(this.client,this.options);if(s!==this.currentQuery){var o=this.currentQuery;this.currentQuery=s,this.currentQueryInitialState=s.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),s.addObserver(this))}},i.onQueryUpdate=function(s){var o={};s.type==="success"?o.onSuccess=!0:s.type==="error"&&!Fu(s.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},i.notify=function(s){var o=this;ot.batch(function(){s.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):s.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),s.listeners&&o.listeners.forEach(function(u){u(o.currentResult)}),s.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},n}(_a);function IE(e,n){return n.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&n.retryOnMount===!1)}function i1(e,n){return IE(e,n)||e.state.dataUpdatedAt>0&&Lh(e,n,n.refetchOnMount)}function Lh(e,n,i){if(n.enabled!==!1){var l=typeof i=="function"?i(e):i;return l==="always"||l!==!1&&wp(e,n)}return!1}function l1(e,n,i,l){return i.enabled!==!1&&(e!==n||l.enabled===!1)&&(!i.suspense||e.state.status!=="error")&&wp(e,i)}function wp(e,n){return e.isStaleByTime(n.staleTime)}var VE=function(e){ka(n,e);function n(l,s){var o;return o=e.call(this)||this,o.client=l,o.setOptions(s),o.bindMethods(),o.updateResult(),o}var i=n.prototype;return i.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},i.setOptions=function(s){this.options=this.client.defaultMutationOptions(s)},i.onUnsubscribe=function(){if(!this.listeners.length){var s;(s=this.currentMutation)==null||s.removeObserver(this)}},i.onMutationUpdate=function(s){this.updateResult();var o={listeners:!0};s.type==="success"?o.onSuccess=!0:s.type==="error"&&(o.onError=!0),this.notify(o)},i.getCurrentResult=function(){return this.currentResult},i.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},i.mutate=function(s,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,De({},this.options,{variables:typeof s<"u"?s:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},i.updateResult=function(){var s=this.currentMutation?this.currentMutation.state:dv(),o=De({},s,{isLoading:s.status==="loading",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},i.notify=function(s){var o=this;ot.batch(function(){o.mutateOptions&&(s.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):s.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),s.listeners&&o.listeners.forEach(function(u){u(o.currentResult)})})},n}(_a),$E=EE.unstable_batchedUpdates;ot.setBatchNotifyFunction($E);var YE=console;LE(YE);var a1=nt.createContext(void 0),pv=nt.createContext(!1);function mv(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=a1),window.ReactQueryClientContext):a1}var yv=function(){var n=nt.useContext(mv(nt.useContext(pv)));if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},KE=function(n){var i=n.client,l=n.contextSharing,s=l===void 0?!1:l,o=n.children;nt.useEffect(function(){return i.mount(),function(){i.unmount()}},[i]);var u=mv(s);return nt.createElement(pv.Provider,{value:s},nt.createElement(u.Provider,{value:i},o))};function GE(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var XE=nt.createContext(GE()),ZE=function(){return nt.useContext(XE)};function gv(e,n,i){return typeof n=="function"?n.apply(void 0,i):typeof n=="boolean"?n:!!e}function Wn(e,n,i){var l=nt.useRef(!1),s=nt.useState(0),o=s[1],u=TE(e,n,i),f=yv(),d=nt.useRef();d.current?d.current.setOptions(u):d.current=new VE(f,u);var h=d.current.getCurrentResult();nt.useEffect(function(){l.current=!0;var g=d.current.subscribe(ot.batchCalls(function(){l.current&&o(function(x){return x+1})}));return function(){l.current=!1,g()}},[]);var m=nt.useCallback(function(g,x){d.current.mutate(g,x).catch($t)},[]);if(h.error&&gv(void 0,d.current.options.useErrorBoundary,[h.error]))throw h.error;return De({},h,{mutate:m,mutateAsync:h.mutate})}function JE(e,n){var i=nt.useRef(!1),l=nt.useState(0),s=l[1],o=yv(),u=ZE(),f=o.defaultQueryObserverOptions(e);f.optimisticResults=!0,f.onError&&(f.onError=ot.batchCalls(f.onError)),f.onSuccess&&(f.onSuccess=ot.batchCalls(f.onSuccess)),f.onSettled&&(f.onSettled=ot.batchCalls(f.onSettled)),f.suspense&&(typeof f.staleTime!="number"&&(f.staleTime=1e3),f.cacheTime===0&&(f.cacheTime=1)),(f.suspense||f.useErrorBoundary)&&(u.isReset()||(f.retryOnMount=!1));var d=nt.useState(function(){return new n(o,f)}),h=d[0],m=h.getOptimisticResult(f);if(nt.useEffect(function(){i.current=!0,u.clearReset();var g=h.subscribe(ot.batchCalls(function(){i.current&&s(function(x){return x+1})}));return h.updateResult(),function(){i.current=!1,g()}},[u,h]),nt.useEffect(function(){h.setOptions(f,{listeners:!1})},[f,h]),f.suspense&&m.isLoading)throw h.fetchOptimistic(f).then(function(g){var x=g.data;f.onSuccess==null||f.onSuccess(x),f.onSettled==null||f.onSettled(x,null)}).catch(function(g){u.clearReset(),f.onError==null||f.onError(g),f.onSettled==null||f.onSettled(void 0,g)});if(m.isError&&!u.isReset()&&!m.isFetching&&gv(f.suspense,f.useErrorBoundary,[m.error,h.getCurrentQuery()]))throw m.error;return f.notifyOnChangeProps==="tracked"&&(m=h.trackResult(m,f)),m}function zn(e,n,i){var l=qu(e,n,i);return JE(l,QE)}function bv(e,n){return function(){return e.apply(n,arguments)}}const{toString:WE}=Object.prototype,{getPrototypeOf:Sp}=Object,{iterator:yc,toStringTag:vv}=Symbol,gc=(e=>n=>{const i=WE.call(n);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),fr=e=>(e=e.toLowerCase(),n=>gc(n)===e),bc=e=>n=>typeof n===e,{isArray:Na}=Array,Gs=bc("undefined");function e3(e){return e!==null&&!Gs(e)&&e.constructor!==null&&!Gs(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xv=fr("ArrayBuffer");function t3(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&xv(e.buffer),n}const n3=bc("string"),bn=bc("function"),wv=bc("number"),vc=e=>e!==null&&typeof e=="object",r3=e=>e===!0||e===!1,Pu=e=>{if(gc(e)!=="object")return!1;const n=Sp(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(vv in e)&&!(yc in e)},i3=fr("Date"),l3=fr("File"),a3=fr("Blob"),s3=fr("FileList"),o3=e=>vc(e)&&bn(e.pipe),u3=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((n=gc(e))==="formdata"||n==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},c3=fr("URLSearchParams"),[f3,d3,h3,p3]=["ReadableStream","Request","Response","Headers"].map(fr),m3=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function io(e,n,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let l,s;if(typeof e!="object"&&(e=[e]),Na(e))for(l=0,s=e.length;l<s;l++)n.call(null,e[l],l,e);else{const o=i?Object.getOwnPropertyNames(e):Object.keys(e),u=o.length;let f;for(l=0;l<u;l++)f=o[l],n.call(null,e[f],f,e)}}function Sv(e,n){n=n.toLowerCase();const i=Object.keys(e);let l=i.length,s;for(;l-- >0;)if(s=i[l],n===s.toLowerCase())return s;return null}const fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cv=e=>!Gs(e)&&e!==fl;function zh(){const{caseless:e}=Cv(this)&&this||{},n={},i=(l,s)=>{const o=e&&Sv(n,s)||s;Pu(n[o])&&Pu(l)?n[o]=zh(n[o],l):Pu(l)?n[o]=zh({},l):Na(l)?n[o]=l.slice():n[o]=l};for(let l=0,s=arguments.length;l<s;l++)arguments[l]&&io(arguments[l],i);return n}const y3=(e,n,i,{allOwnKeys:l}={})=>(io(n,(s,o)=>{i&&bn(s)?e[o]=bv(s,i):e[o]=s},{allOwnKeys:l}),e),g3=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),b3=(e,n,i,l)=>{e.prototype=Object.create(n.prototype,l),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),i&&Object.assign(e.prototype,i)},v3=(e,n,i,l)=>{let s,o,u;const f={};if(n=n||{},e==null)return n;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)u=s[o],(!l||l(u,e,n))&&!f[u]&&(n[u]=e[u],f[u]=!0);e=i!==!1&&Sp(e)}while(e&&(!i||i(e,n))&&e!==Object.prototype);return n},x3=(e,n,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=n.length;const l=e.indexOf(n,i);return l!==-1&&l===i},w3=e=>{if(!e)return null;if(Na(e))return e;let n=e.length;if(!wv(n))return null;const i=new Array(n);for(;n-- >0;)i[n]=e[n];return i},S3=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Sp(Uint8Array)),C3=(e,n)=>{const l=(e&&e[yc]).call(e);let s;for(;(s=l.next())&&!s.done;){const o=s.value;n.call(e,o[0],o[1])}},E3=(e,n)=>{let i;const l=[];for(;(i=e.exec(n))!==null;)l.push(i);return l},A3=fr("HTMLFormElement"),T3=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,l,s){return l.toUpperCase()+s}),s1=(({hasOwnProperty:e})=>(n,i)=>e.call(n,i))(Object.prototype),k3=fr("RegExp"),Ev=(e,n)=>{const i=Object.getOwnPropertyDescriptors(e),l={};io(i,(s,o)=>{let u;(u=n(s,o,e))!==!1&&(l[o]=u||s)}),Object.defineProperties(e,l)},_3=e=>{Ev(e,(n,i)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const l=e[i];if(bn(l)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},N3=(e,n)=>{const i={},l=s=>{s.forEach(o=>{i[o]=!0})};return Na(e)?l(e):l(String(e).split(n)),i},R3=()=>{},O3=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function j3(e){return!!(e&&bn(e.append)&&e[vv]==="FormData"&&e[yc])}const D3=e=>{const n=new Array(10),i=(l,s)=>{if(vc(l)){if(n.indexOf(l)>=0)return;if(!("toJSON"in l)){n[s]=l;const o=Na(l)?[]:{};return io(l,(u,f)=>{const d=i(u,s+1);!Gs(d)&&(o[f]=d)}),n[s]=void 0,o}}return l};return i(e,0)},M3=fr("AsyncFunction"),L3=e=>e&&(vc(e)||bn(e))&&bn(e.then)&&bn(e.catch),Av=((e,n)=>e?setImmediate:n?((i,l)=>(fl.addEventListener("message",({source:s,data:o})=>{s===fl&&o===i&&l.length&&l.shift()()},!1),s=>{l.push(s),fl.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",bn(fl.postMessage)),z3=typeof queueMicrotask<"u"?queueMicrotask.bind(fl):typeof process<"u"&&process.nextTick||Av,U3=e=>e!=null&&bn(e[yc]),V={isArray:Na,isArrayBuffer:xv,isBuffer:e3,isFormData:u3,isArrayBufferView:t3,isString:n3,isNumber:wv,isBoolean:r3,isObject:vc,isPlainObject:Pu,isReadableStream:f3,isRequest:d3,isResponse:h3,isHeaders:p3,isUndefined:Gs,isDate:i3,isFile:l3,isBlob:a3,isRegExp:k3,isFunction:bn,isStream:o3,isURLSearchParams:c3,isTypedArray:S3,isFileList:s3,forEach:io,merge:zh,extend:y3,trim:m3,stripBOM:g3,inherits:b3,toFlatObject:v3,kindOf:gc,kindOfTest:fr,endsWith:x3,toArray:w3,forEachEntry:C3,matchAll:E3,isHTMLForm:A3,hasOwnProperty:s1,hasOwnProp:s1,reduceDescriptors:Ev,freezeMethods:_3,toObjectSet:N3,toCamelCase:T3,noop:R3,toFiniteNumber:O3,findKey:Sv,global:fl,isContextDefined:Cv,isSpecCompliantForm:j3,toJSONObject:D3,isAsyncFn:M3,isThenable:L3,setImmediate:Av,asap:z3,isIterable:U3};function ke(e,n,i,l,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),i&&(this.config=i),l&&(this.request=l),s&&(this.response=s,this.status=s.status?s.status:null)}V.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}});const Tv=ke.prototype,kv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{kv[e]={value:e}});Object.defineProperties(ke,kv);Object.defineProperty(Tv,"isAxiosError",{value:!0});ke.from=(e,n,i,l,s,o)=>{const u=Object.create(Tv);return V.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),ke.call(u,e.message,n,i,l,s),u.cause=e,u.name=e.name,o&&Object.assign(u,o),u};const B3=null;function Uh(e){return V.isPlainObject(e)||V.isArray(e)}function _v(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function o1(e,n,i){return e?e.concat(n).map(function(s,o){return s=_v(s),!i&&o?"["+s+"]":s}).join(i?".":""):n}function q3(e){return V.isArray(e)&&!e.some(Uh)}const H3=V.toFlatObject(V,{},null,function(n){return/^is[A-Z]/.test(n)});function xc(e,n,i){if(!V.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,i=V.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,_){return!V.isUndefined(_[A])});const l=i.metaTokens,s=i.visitor||m,o=i.dots,u=i.indexes,d=(i.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(n);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(V.isDate(w))return w.toISOString();if(!d&&V.isBlob(w))throw new ke("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(w)||V.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,A,_){let k=w;if(w&&!_&&typeof w=="object"){if(V.endsWith(A,"{}"))A=l?A:A.slice(0,-2),w=JSON.stringify(w);else if(V.isArray(w)&&q3(w)||(V.isFileList(w)||V.endsWith(A,"[]"))&&(k=V.toArray(w)))return A=_v(A),k.forEach(function(R,q){!(V.isUndefined(R)||R===null)&&n.append(u===!0?o1([A],q,o):u===null?A:A+"[]",h(R))}),!1}return Uh(w)?!0:(n.append(o1(_,A,o),h(w)),!1)}const g=[],x=Object.assign(H3,{defaultVisitor:m,convertValue:h,isVisitable:Uh});function v(w,A){if(!V.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+A.join("."));g.push(w),V.forEach(w,function(k,O){(!(V.isUndefined(k)||k===null)&&s.call(n,k,V.isString(O)?O.trim():O,A,x))===!0&&v(k,A?A.concat(O):[O])}),g.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return v(e),n}function u1(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(l){return n[l]})}function Cp(e,n){this._pairs=[],e&&xc(e,this,n)}const Nv=Cp.prototype;Nv.append=function(n,i){this._pairs.push([n,i])};Nv.toString=function(n){const i=n?function(l){return n.call(this,l,u1)}:u1;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function F3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rv(e,n,i){if(!n)return e;const l=i&&i.encode||F3;V.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let o;if(s?o=s(n,i):o=V.isURLSearchParams(n)?n.toString():new Cp(n,i).toString(l),o){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class c1{constructor(){this.handlers=[]}use(n,i,l){return this.handlers.push({fulfilled:n,rejected:i,synchronous:l?l.synchronous:!1,runWhen:l?l.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){V.forEach(this.handlers,function(l){l!==null&&n(l)})}}const Ov={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P3=typeof URLSearchParams<"u"?URLSearchParams:Cp,Q3=typeof FormData<"u"?FormData:null,I3=typeof Blob<"u"?Blob:null,V3={isBrowser:!0,classes:{URLSearchParams:P3,FormData:Q3,Blob:I3},protocols:["http","https","file","blob","url","data"]},Ep=typeof window<"u"&&typeof document<"u",Bh=typeof navigator=="object"&&navigator||void 0,$3=Ep&&(!Bh||["ReactNative","NativeScript","NS"].indexOf(Bh.product)<0),Y3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",K3=Ep&&window.location.href||"http://localhost",G3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ep,hasStandardBrowserEnv:$3,hasStandardBrowserWebWorkerEnv:Y3,navigator:Bh,origin:K3},Symbol.toStringTag,{value:"Module"})),Wt={...G3,...V3};function X3(e,n){return xc(e,new Wt.classes.URLSearchParams,Object.assign({visitor:function(i,l,s,o){return Wt.isNode&&V.isBuffer(i)?(this.append(l,i.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},n))}function Z3(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function J3(e){const n={},i=Object.keys(e);let l;const s=i.length;let o;for(l=0;l<s;l++)o=i[l],n[o]=e[o];return n}function jv(e){function n(i,l,s,o){let u=i[o++];if(u==="__proto__")return!0;const f=Number.isFinite(+u),d=o>=i.length;return u=!u&&V.isArray(s)?s.length:u,d?(V.hasOwnProp(s,u)?s[u]=[s[u],l]:s[u]=l,!f):((!s[u]||!V.isObject(s[u]))&&(s[u]=[]),n(i,l,s[u],o)&&V.isArray(s[u])&&(s[u]=J3(s[u])),!f)}if(V.isFormData(e)&&V.isFunction(e.entries)){const i={};return V.forEachEntry(e,(l,s)=>{n(Z3(l),s,i,0)}),i}return null}function W3(e,n,i){if(V.isString(e))try{return(n||JSON.parse)(e),V.trim(e)}catch(l){if(l.name!=="SyntaxError")throw l}return(i||JSON.stringify)(e)}const lo={transitional:Ov,adapter:["xhr","http","fetch"],transformRequest:[function(n,i){const l=i.getContentType()||"",s=l.indexOf("application/json")>-1,o=V.isObject(n);if(o&&V.isHTMLForm(n)&&(n=new FormData(n)),V.isFormData(n))return s?JSON.stringify(jv(n)):n;if(V.isArrayBuffer(n)||V.isBuffer(n)||V.isStream(n)||V.isFile(n)||V.isBlob(n)||V.isReadableStream(n))return n;if(V.isArrayBufferView(n))return n.buffer;if(V.isURLSearchParams(n))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(o){if(l.indexOf("application/x-www-form-urlencoded")>-1)return X3(n,this.formSerializer).toString();if((f=V.isFileList(n))||l.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return xc(f?{"files[]":n}:n,d&&new d,this.formSerializer)}}return o||s?(i.setContentType("application/json",!1),W3(n)):n}],transformResponse:[function(n){const i=this.transitional||lo.transitional,l=i&&i.forcedJSONParsing,s=this.responseType==="json";if(V.isResponse(n)||V.isReadableStream(n))return n;if(n&&V.isString(n)&&(l&&!this.responseType||s)){const u=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(n)}catch(f){if(u)throw f.name==="SyntaxError"?ke.from(f,ke.ERR_BAD_RESPONSE,this,null,this.response):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{lo.headers[e]={}});const e4=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),t4=e=>{const n={};let i,l,s;return e&&e.split(`
52
- `).forEach(function(u){s=u.indexOf(":"),i=u.substring(0,s).trim().toLowerCase(),l=u.substring(s+1).trim(),!(!i||n[i]&&e4[i])&&(i==="set-cookie"?n[i]?n[i].push(l):n[i]=[l]:n[i]=n[i]?n[i]+", "+l:l)}),n},f1=Symbol("internals");function Ls(e){return e&&String(e).trim().toLowerCase()}function Qu(e){return e===!1||e==null?e:V.isArray(e)?e.map(Qu):String(e)}function n4(e){const n=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let l;for(;l=i.exec(e);)n[l[1]]=l[2];return n}const r4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function eh(e,n,i,l,s){if(V.isFunction(l))return l.call(this,n,i);if(s&&(n=i),!!V.isString(n)){if(V.isString(l))return n.indexOf(l)!==-1;if(V.isRegExp(l))return l.test(n)}}function i4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,i,l)=>i.toUpperCase()+l)}function l4(e,n){const i=V.toCamelCase(" "+n);["get","set","has"].forEach(l=>{Object.defineProperty(e,l+i,{value:function(s,o,u){return this[l].call(this,n,s,o,u)},configurable:!0})})}let vn=class{constructor(n){n&&this.set(n)}set(n,i,l){const s=this;function o(f,d,h){const m=Ls(d);if(!m)throw new Error("header name must be a non-empty string");const g=V.findKey(s,m);(!g||s[g]===void 0||h===!0||h===void 0&&s[g]!==!1)&&(s[g||d]=Qu(f))}const u=(f,d)=>V.forEach(f,(h,m)=>o(h,m,d));if(V.isPlainObject(n)||n instanceof this.constructor)u(n,i);else if(V.isString(n)&&(n=n.trim())&&!r4(n))u(t4(n),i);else if(V.isObject(n)&&V.isIterable(n)){let f={},d,h;for(const m of n){if(!V.isArray(m))throw TypeError("Object iterator must return a key-value pair");f[h=m[0]]=(d=f[h])?V.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}u(f,i)}else n!=null&&o(i,n,l);return this}get(n,i){if(n=Ls(n),n){const l=V.findKey(this,n);if(l){const s=this[l];if(!i)return s;if(i===!0)return n4(s);if(V.isFunction(i))return i.call(this,s,l);if(V.isRegExp(i))return i.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,i){if(n=Ls(n),n){const l=V.findKey(this,n);return!!(l&&this[l]!==void 0&&(!i||eh(this,this[l],l,i)))}return!1}delete(n,i){const l=this;let s=!1;function o(u){if(u=Ls(u),u){const f=V.findKey(l,u);f&&(!i||eh(l,l[f],f,i))&&(delete l[f],s=!0)}}return V.isArray(n)?n.forEach(o):o(n),s}clear(n){const i=Object.keys(this);let l=i.length,s=!1;for(;l--;){const o=i[l];(!n||eh(this,this[o],o,n,!0))&&(delete this[o],s=!0)}return s}normalize(n){const i=this,l={};return V.forEach(this,(s,o)=>{const u=V.findKey(l,o);if(u){i[u]=Qu(s),delete i[o];return}const f=n?i4(o):String(o).trim();f!==o&&delete i[o],i[f]=Qu(s),l[f]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const i=Object.create(null);return V.forEach(this,(l,s)=>{l!=null&&l!==!1&&(i[s]=n&&V.isArray(l)?l.join(", "):l)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,i])=>n+": "+i).join(`
53
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...i){const l=new this(n);return i.forEach(s=>l.set(s)),l}static accessor(n){const l=(this[f1]=this[f1]={accessors:{}}).accessors,s=this.prototype;function o(u){const f=Ls(u);l[f]||(l4(s,u),l[f]=!0)}return V.isArray(n)?n.forEach(o):o(n),this}};vn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(vn.prototype,({value:e},n)=>{let i=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(l){this[i]=l}}});V.freezeMethods(vn);function th(e,n){const i=this||lo,l=n||i,s=vn.from(l.headers);let o=l.data;return V.forEach(e,function(f){o=f.call(i,o,s.normalize(),n?n.status:void 0)}),s.normalize(),o}function Dv(e){return!!(e&&e.__CANCEL__)}function Ra(e,n,i){ke.call(this,e??"canceled",ke.ERR_CANCELED,n,i),this.name="CanceledError"}V.inherits(Ra,ke,{__CANCEL__:!0});function Mv(e,n,i){const l=i.config.validateStatus;!i.status||!l||l(i.status)?e(i):n(new ke("Request failed with status code "+i.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function a4(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function s4(e,n){e=e||10;const i=new Array(e),l=new Array(e);let s=0,o=0,u;return n=n!==void 0?n:1e3,function(d){const h=Date.now(),m=l[o];u||(u=h),i[s]=d,l[s]=h;let g=o,x=0;for(;g!==s;)x+=i[g++],g=g%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),h-u<n)return;const v=m&&h-m;return v?Math.round(x*1e3/v):void 0}}function o4(e,n){let i=0,l=1e3/n,s,o;const u=(h,m=Date.now())=>{i=m,s=null,o&&(clearTimeout(o),o=null),e.apply(null,h)};return[(...h)=>{const m=Date.now(),g=m-i;g>=l?u(h,m):(s=h,o||(o=setTimeout(()=>{o=null,u(s)},l-g)))},()=>s&&u(s)]}const rc=(e,n,i=3)=>{let l=0;const s=s4(50,250);return o4(o=>{const u=o.loaded,f=o.lengthComputable?o.total:void 0,d=u-l,h=s(d),m=u<=f;l=u;const g={loaded:u,total:f,progress:f?u/f:void 0,bytes:d,rate:h||void 0,estimated:h&&f&&m?(f-u)/h:void 0,event:o,lengthComputable:f!=null,[n?"download":"upload"]:!0};e(g)},i)},d1=(e,n)=>{const i=e!=null;return[l=>n[0]({lengthComputable:i,total:e,loaded:l}),n[1]]},h1=e=>(...n)=>V.asap(()=>e(...n)),u4=Wt.hasStandardBrowserEnv?((e,n)=>i=>(i=new URL(i,Wt.origin),e.protocol===i.protocol&&e.host===i.host&&(n||e.port===i.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,c4=Wt.hasStandardBrowserEnv?{write(e,n,i,l,s,o){const u=[e+"="+encodeURIComponent(n)];V.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),V.isString(l)&&u.push("path="+l),V.isString(s)&&u.push("domain="+s),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function f4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function d4(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function Lv(e,n,i){let l=!f4(n);return e&&(l||i==!1)?d4(e,n):n}const p1=e=>e instanceof vn?{...e}:e;function yl(e,n){n=n||{};const i={};function l(h,m,g,x){return V.isPlainObject(h)&&V.isPlainObject(m)?V.merge.call({caseless:x},h,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function s(h,m,g,x){if(V.isUndefined(m)){if(!V.isUndefined(h))return l(void 0,h,g,x)}else return l(h,m,g,x)}function o(h,m){if(!V.isUndefined(m))return l(void 0,m)}function u(h,m){if(V.isUndefined(m)){if(!V.isUndefined(h))return l(void 0,h)}else return l(void 0,m)}function f(h,m,g){if(g in n)return l(h,m);if(g in e)return l(void 0,h)}const d={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(h,m,g)=>s(p1(h),p1(m),g,!0)};return V.forEach(Object.keys(Object.assign({},e,n)),function(m){const g=d[m]||s,x=g(e[m],n[m],m);V.isUndefined(x)&&g!==f||(i[m]=x)}),i}const zv=e=>{const n=yl({},e);let{data:i,withXSRFToken:l,xsrfHeaderName:s,xsrfCookieName:o,headers:u,auth:f}=n;n.headers=u=vn.from(u),n.url=Rv(Lv(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):"")));let d;if(V.isFormData(i)){if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((d=u.getContentType())!==!1){const[h,...m]=d?d.split(";").map(g=>g.trim()).filter(Boolean):[];u.setContentType([h||"multipart/form-data",...m].join("; "))}}if(Wt.hasStandardBrowserEnv&&(l&&V.isFunction(l)&&(l=l(n)),l||l!==!1&&u4(n.url))){const h=s&&o&&c4.read(o);h&&u.set(s,h)}return n},h4=typeof XMLHttpRequest<"u",p4=h4&&function(e){return new Promise(function(i,l){const s=zv(e);let o=s.data;const u=vn.from(s.headers).normalize();let{responseType:f,onUploadProgress:d,onDownloadProgress:h}=s,m,g,x,v,w;function A(){v&&v(),w&&w(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let _=new XMLHttpRequest;_.open(s.method.toUpperCase(),s.url,!0),_.timeout=s.timeout;function k(){if(!_)return;const R=vn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),M={data:!f||f==="text"||f==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:R,config:e,request:_};Mv(function($){i($),A()},function($){l($),A()},M),_=null}"onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(k)},_.onabort=function(){_&&(l(new ke("Request aborted",ke.ECONNABORTED,e,_)),_=null)},_.onerror=function(){l(new ke("Network Error",ke.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let q=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const M=s.transitional||Ov;s.timeoutErrorMessage&&(q=s.timeoutErrorMessage),l(new ke(q,M.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,_)),_=null},o===void 0&&u.setContentType(null),"setRequestHeader"in _&&V.forEach(u.toJSON(),function(q,M){_.setRequestHeader(M,q)}),V.isUndefined(s.withCredentials)||(_.withCredentials=!!s.withCredentials),f&&f!=="json"&&(_.responseType=s.responseType),h&&([x,w]=rc(h,!0),_.addEventListener("progress",x)),d&&_.upload&&([g,v]=rc(d),_.upload.addEventListener("progress",g),_.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(m=R=>{_&&(l(!R||R.type?new Ra(null,e,_):R),_.abort(),_=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const O=a4(s.url);if(O&&Wt.protocols.indexOf(O)===-1){l(new ke("Unsupported protocol "+O+":",ke.ERR_BAD_REQUEST,e));return}_.send(o||null)})},m4=(e,n)=>{const{length:i}=e=e?e.filter(Boolean):[];if(n||i){let l=new AbortController,s;const o=function(h){if(!s){s=!0,f();const m=h instanceof Error?h:this.reason;l.abort(m instanceof ke?m:new Ra(m instanceof Error?m.message:m))}};let u=n&&setTimeout(()=>{u=null,o(new ke(`timeout ${n} of ms exceeded`,ke.ETIMEDOUT))},n);const f=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(o):h.removeEventListener("abort",o)}),e=null)};e.forEach(h=>h.addEventListener("abort",o));const{signal:d}=l;return d.unsubscribe=()=>V.asap(f),d}},y4=function*(e,n){let i=e.byteLength;if(i<n){yield e;return}let l=0,s;for(;l<i;)s=l+n,yield e.slice(l,s),l=s},g4=async function*(e,n){for await(const i of b4(e))yield*y4(i,n)},b4=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:i,value:l}=await n.read();if(i)break;yield l}}finally{await n.cancel()}},m1=(e,n,i,l)=>{const s=g4(e,n);let o=0,u,f=d=>{u||(u=!0,l&&l(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await s.next();if(h){f(),d.close();return}let g=m.byteLength;if(i){let x=o+=g;i(x)}d.enqueue(new Uint8Array(m))}catch(h){throw f(h),h}},cancel(d){return f(d),s.return()}},{highWaterMark:2})},wc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Uv=wc&&typeof ReadableStream=="function",v4=wc&&(typeof TextEncoder=="function"?(e=>n=>e.encode(n))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Bv=(e,...n)=>{try{return!!e(...n)}catch{return!1}},x4=Uv&&Bv(()=>{let e=!1;const n=new Request(Wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),y1=64*1024,qh=Uv&&Bv(()=>V.isReadableStream(new Response("").body)),ic={stream:qh&&(e=>e.body)};wc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!ic[n]&&(ic[n]=V.isFunction(e[n])?i=>i[n]():(i,l)=>{throw new ke(`Response type '${n}' is not supported`,ke.ERR_NOT_SUPPORT,l)})})})(new Response);const w4=async e=>{if(e==null)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e))return(await new Request(Wt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(V.isArrayBufferView(e)||V.isArrayBuffer(e))return e.byteLength;if(V.isURLSearchParams(e)&&(e=e+""),V.isString(e))return(await v4(e)).byteLength},S4=async(e,n)=>{const i=V.toFiniteNumber(e.getContentLength());return i??w4(n)},C4=wc&&(async e=>{let{url:n,method:i,data:l,signal:s,cancelToken:o,timeout:u,onDownloadProgress:f,onUploadProgress:d,responseType:h,headers:m,withCredentials:g="same-origin",fetchOptions:x}=zv(e);h=h?(h+"").toLowerCase():"text";let v=m4([s,o&&o.toAbortSignal()],u),w;const A=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let _;try{if(d&&x4&&i!=="get"&&i!=="head"&&(_=await S4(m,l))!==0){let M=new Request(n,{method:"POST",body:l,duplex:"half"}),D;if(V.isFormData(l)&&(D=M.headers.get("content-type"))&&m.setContentType(D),M.body){const[$,ee]=d1(_,rc(h1(d)));l=m1(M.body,y1,$,ee)}}V.isString(g)||(g=g?"include":"omit");const k="credentials"in Request.prototype;w=new Request(n,{...x,signal:v,method:i.toUpperCase(),headers:m.normalize().toJSON(),body:l,duplex:"half",credentials:k?g:void 0});let O=await fetch(w);const R=qh&&(h==="stream"||h==="response");if(qh&&(f||R&&A)){const M={};["status","statusText","headers"].forEach(ie=>{M[ie]=O[ie]});const D=V.toFiniteNumber(O.headers.get("content-length")),[$,ee]=f&&d1(D,rc(h1(f),!0))||[];O=new Response(m1(O.body,y1,$,()=>{ee&&ee(),A&&A()}),M)}h=h||"text";let q=await ic[V.findKey(ic,h)||"text"](O,e);return!R&&A&&A(),await new Promise((M,D)=>{Mv(M,D,{data:q,headers:vn.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:w})})}catch(k){throw A&&A(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,w),{cause:k.cause||k}):ke.from(k,k&&k.code,e,w)}}),Hh={http:B3,xhr:p4,fetch:C4};V.forEach(Hh,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const g1=e=>`- ${e}`,E4=e=>V.isFunction(e)||e===null||e===!1,qv={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:n}=e;let i,l;const s={};for(let o=0;o<n;o++){i=e[o];let u;if(l=i,!E4(i)&&(l=Hh[(u=String(i)).toLowerCase()],l===void 0))throw new ke(`Unknown adapter '${u}'`);if(l)break;s[u||"#"+o]=l}if(!l){const o=Object.entries(s).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=n?o.length>1?`since :
54
- `+o.map(g1).join(`
55
- `):" "+g1(o[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return l},adapters:Hh};function nh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ra(null,e)}function b1(e){return nh(e),e.headers=vn.from(e.headers),e.data=th.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qv.getAdapter(e.adapter||lo.adapter)(e).then(function(l){return nh(e),l.data=th.call(e,e.transformResponse,l),l.headers=vn.from(l.headers),l},function(l){return Dv(l)||(nh(e),l&&l.response&&(l.response.data=th.call(e,e.transformResponse,l.response),l.response.headers=vn.from(l.response.headers))),Promise.reject(l)})}const Hv="1.9.0",Sc={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Sc[e]=function(l){return typeof l===e||"a"+(n<1?"n ":" ")+e}});const v1={};Sc.transitional=function(n,i,l){function s(o,u){return"[Axios v"+Hv+"] Transitional option '"+o+"'"+u+(l?". "+l:"")}return(o,u,f)=>{if(n===!1)throw new ke(s(u," has been removed"+(i?" in "+i:"")),ke.ERR_DEPRECATED);return i&&!v1[u]&&(v1[u]=!0,console.warn(s(u," has been deprecated since v"+i+" and will be removed in the near future"))),n?n(o,u,f):!0}};Sc.spelling=function(n){return(i,l)=>(console.warn(`${l} is likely a misspelling of ${n}`),!0)};function A4(e,n,i){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const l=Object.keys(e);let s=l.length;for(;s-- >0;){const o=l[s],u=n[o];if(u){const f=e[o],d=f===void 0||u(f,o,e);if(d!==!0)throw new ke("option "+o+" must be "+d,ke.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new ke("Unknown option "+o,ke.ERR_BAD_OPTION)}}const Iu={assertOptions:A4,validators:Sc},xr=Iu.validators;let hl=class{constructor(n){this.defaults=n||{},this.interceptors={request:new c1,response:new c1}}async request(n,i){try{return await this._request(n,i)}catch(l){if(l instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{l.stack?o&&!String(l.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(l.stack+=`
56
- `+o):l.stack=o}catch{}}throw l}}_request(n,i){typeof n=="string"?(i=i||{},i.url=n):i=n||{},i=yl(this.defaults,i);const{transitional:l,paramsSerializer:s,headers:o}=i;l!==void 0&&Iu.assertOptions(l,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),s!=null&&(V.isFunction(s)?i.paramsSerializer={serialize:s}:Iu.assertOptions(s,{encode:xr.function,serialize:xr.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Iu.assertOptions(i,{baseUrl:xr.spelling("baseURL"),withXsrfToken:xr.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let u=o&&V.merge(o.common,o[i.method]);o&&V.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),i.headers=vn.concat(u,o);const f=[];let d=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(i)===!1||(d=d&&A.synchronous,f.unshift(A.fulfilled,A.rejected))});const h=[];this.interceptors.response.forEach(function(A){h.push(A.fulfilled,A.rejected)});let m,g=0,x;if(!d){const w=[b1.bind(this),void 0];for(w.unshift.apply(w,f),w.push.apply(w,h),x=w.length,m=Promise.resolve(i);g<x;)m=m.then(w[g++],w[g++]);return m}x=f.length;let v=i;for(g=0;g<x;){const w=f[g++],A=f[g++];try{v=w(v)}catch(_){A.call(this,_);break}}try{m=b1.call(this,v)}catch(w){return Promise.reject(w)}for(g=0,x=h.length;g<x;)m=m.then(h[g++],h[g++]);return m}getUri(n){n=yl(this.defaults,n);const i=Lv(n.baseURL,n.url,n.allowAbsoluteUrls);return Rv(i,n.params,n.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(n){hl.prototype[n]=function(i,l){return this.request(yl(l||{},{method:n,url:i,data:(l||{}).data}))}});V.forEach(["post","put","patch"],function(n){function i(l){return function(o,u,f){return this.request(yl(f||{},{method:n,headers:l?{"Content-Type":"multipart/form-data"}:{},url:o,data:u}))}}hl.prototype[n]=i(),hl.prototype[n+"Form"]=i(!0)});let T4=class Fv{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(o){i=o});const l=this;this.promise.then(s=>{if(!l._listeners)return;let o=l._listeners.length;for(;o-- >0;)l._listeners[o](s);l._listeners=null}),this.promise.then=s=>{let o;const u=new Promise(f=>{l.subscribe(f),o=f}).then(s);return u.cancel=function(){l.unsubscribe(o)},u},n(function(o,u,f){l.reason||(l.reason=new Ra(o,u,f),i(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const n=new AbortController,i=l=>{n.abort(l)};return this.subscribe(i),n.signal.unsubscribe=()=>this.unsubscribe(i),n.signal}static source(){let n;return{token:new Fv(function(s){n=s}),cancel:n}}};function k4(e){return function(i){return e.apply(null,i)}}function _4(e){return V.isObject(e)&&e.isAxiosError===!0}const Fh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fh).forEach(([e,n])=>{Fh[n]=e});function Pv(e){const n=new hl(e),i=bv(hl.prototype.request,n);return V.extend(i,hl.prototype,n,{allOwnKeys:!0}),V.extend(i,n,null,{allOwnKeys:!0}),i.create=function(s){return Pv(yl(e,s))},i}const xt=Pv(lo);xt.Axios=hl;xt.CanceledError=Ra;xt.CancelToken=T4;xt.isCancel=Dv;xt.VERSION=Hv;xt.toFormData=xc;xt.AxiosError=ke;xt.Cancel=xt.CanceledError;xt.all=function(n){return Promise.all(n)};xt.spread=k4;xt.isAxiosError=_4;xt.mergeConfig=yl;xt.AxiosHeaders=vn;xt.formToJSON=e=>jv(V.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=qv.getAdapter;xt.HttpStatusCode=Fh;xt.default=xt;const{Axios:KM,AxiosError:N4,CanceledError:GM,isCancel:XM,CancelToken:ZM,VERSION:JM,all:WM,Cancel:e9,isAxiosError:lc,spread:t9,toFormData:n9,AxiosHeaders:r9,HttpStatusCode:i9,formToJSON:l9,getAdapter:a9,mergeConfig:s9}=xt,Ph="__access_token__",R4=()=>{try{const e=localStorage.getItem(Ph);return e||void 0}catch{return}},_u=e=>{e?localStorage.setItem(Ph,e):localStorage.removeItem(Ph)};let O4={data:""},j4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||O4,D4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,M4=/\/\*[^]*?\*\/| +/g,x1=/\n+/g,Di=(e,n)=>{let i="",l="",s="";for(let o in e){let u=e[o];o[0]=="@"?o[1]=="i"?i=o+" "+u+";":l+=o[1]=="f"?Di(u,o):o+"{"+Di(u,o[1]=="k"?"":n)+"}":typeof u=="object"?l+=Di(u,n?n.replace(/([^,])+/g,f=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,d=>/&/.test(d)?d.replace(/&/g,f):f?f+" "+d:d)):o):u!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Di.p?Di.p(o,u):o+":"+u+";")}return i+(n&&s?n+"{"+s+"}":s)+l},Gr={},Qv=e=>{if(typeof e=="object"){let n="";for(let i in e)n+=i+Qv(e[i]);return n}return e},L4=(e,n,i,l,s)=>{let o=Qv(e),u=Gr[o]||(Gr[o]=(d=>{let h=0,m=11;for(;h<d.length;)m=101*m+d.charCodeAt(h++)>>>0;return"go"+m})(o));if(!Gr[u]){let d=o!==e?e:(h=>{let m,g,x=[{}];for(;m=D4.exec(h.replace(M4,""));)m[4]?x.shift():m[3]?(g=m[3].replace(x1," ").trim(),x.unshift(x[0][g]=x[0][g]||{})):x[0][m[1]]=m[2].replace(x1," ").trim();return x[0]})(e);Gr[u]=Di(s?{["@keyframes "+u]:d}:d,i?"":"."+u)}let f=i&&Gr.g?Gr.g:null;return i&&(Gr.g=Gr[u]),((d,h,m,g)=>{g?h.data=h.data.replace(g,d):h.data.indexOf(d)===-1&&(h.data=m?d+h.data:h.data+d)})(Gr[u],n,l,f),u},z4=(e,n,i)=>e.reduce((l,s,o)=>{let u=n[o];if(u&&u.call){let f=u(i),d=f&&f.props&&f.props.className||/^go/.test(f)&&f;u=d?"."+d:f&&typeof f=="object"?f.props?"":Di(f,""):f===!1?"":f}return l+s+(u??"")},"");function Cc(e){let n=this||{},i=e.call?e(n.p):e;return L4(i.unshift?i.raw?z4(i,[].slice.call(arguments,1),n.p):i.reduce((l,s)=>Object.assign(l,s&&s.call?s(n.p):s),{}):i,j4(n.target),n.g,n.o,n.k)}let Iv,Qh,Ih;Cc.bind({g:1});let Wr=Cc.bind({k:1});function U4(e,n,i,l){Di.p=n,Iv=e,Qh=i,Ih=l}function Hi(e,n){let i=this||{};return function(){let l=arguments;function s(o,u){let f=Object.assign({},o),d=f.className||s.className;i.p=Object.assign({theme:Qh&&Qh()},f),i.o=/ *go\d+/.test(d),f.className=Cc.apply(i,l)+(d?" "+d:"");let h=e;return e[0]&&(h=f.as||e,delete f.as),Ih&&h[0]&&Ih(f),Iv(h,f)}return s}}var B4=e=>typeof e=="function",ac=(e,n)=>B4(e)?e(n):e,q4=(()=>{let e=0;return()=>(++e).toString()})(),Vv=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let n=matchMedia("(prefers-reduced-motion: reduce)");e=!n||n.matches}return e}})(),H4=20,$v=(e,n)=>{switch(n.type){case 0:return{...e,toasts:[n.toast,...e.toasts].slice(0,H4)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===n.toast.id?{...o,...n.toast}:o)};case 2:let{toast:i}=n;return $v(e,{type:e.toasts.find(o=>o.id===i.id)?1:0,toast:i});case 3:let{toastId:l}=n;return{...e,toasts:e.toasts.map(o=>o.id===l||l===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==n.toastId)};case 5:return{...e,pausedAt:n.time};case 6:let s=n.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Vu=[],dl={toasts:[],pausedAt:void 0},wl=e=>{dl=$v(dl,e),Vu.forEach(n=>{n(dl)})},F4={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},P4=(e={})=>{let[n,i]=E.useState(dl),l=E.useRef(dl);E.useEffect(()=>(l.current!==dl&&i(dl),Vu.push(i),()=>{let o=Vu.indexOf(i);o>-1&&Vu.splice(o,1)}),[]);let s=n.toasts.map(o=>{var u,f,d;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((u=e[o.type])==null?void 0:u.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((f=e[o.type])==null?void 0:f.duration)||(e==null?void 0:e.duration)||F4[o.type],style:{...e.style,...(d=e[o.type])==null?void 0:d.style,...o.style}}});return{...n,toasts:s}},Q4=(e,n="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:n,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...i,id:(i==null?void 0:i.id)||q4()}),ao=e=>(n,i)=>{let l=Q4(n,e,i);return wl({type:2,toast:l}),l.id},an=(e,n)=>ao("blank")(e,n);an.error=ao("error");an.success=ao("success");an.loading=ao("loading");an.custom=ao("custom");an.dismiss=e=>{wl({type:3,toastId:e})};an.remove=e=>wl({type:4,toastId:e});an.promise=(e,n,i)=>{let l=an.loading(n.loading,{...i,...i==null?void 0:i.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=n.success?ac(n.success,s):void 0;return o?an.success(o,{id:l,...i,...i==null?void 0:i.success}):an.dismiss(l),s}).catch(s=>{let o=n.error?ac(n.error,s):void 0;o?an.error(o,{id:l,...i,...i==null?void 0:i.error}):an.dismiss(l)}),e};var I4=(e,n)=>{wl({type:1,toast:{id:e,height:n}})},V4=()=>{wl({type:5,time:Date.now()})},Qs=new Map,$4=1e3,Y4=(e,n=$4)=>{if(Qs.has(e))return;let i=setTimeout(()=>{Qs.delete(e),wl({type:4,toastId:e})},n);Qs.set(e,i)},K4=e=>{let{toasts:n,pausedAt:i}=P4(e);E.useEffect(()=>{if(i)return;let o=Date.now(),u=n.map(f=>{if(f.duration===1/0)return;let d=(f.duration||0)+f.pauseDuration-(o-f.createdAt);if(d<0){f.visible&&an.dismiss(f.id);return}return setTimeout(()=>an.dismiss(f.id),d)});return()=>{u.forEach(f=>f&&clearTimeout(f))}},[n,i]);let l=E.useCallback(()=>{i&&wl({type:6,time:Date.now()})},[i]),s=E.useCallback((o,u)=>{let{reverseOrder:f=!1,gutter:d=8,defaultPosition:h}=u||{},m=n.filter(v=>(v.position||h)===(o.position||h)&&v.height),g=m.findIndex(v=>v.id===o.id),x=m.filter((v,w)=>w<g&&v.visible).length;return m.filter(v=>v.visible).slice(...f?[x+1]:[0,x]).reduce((v,w)=>v+(w.height||0)+d,0)},[n]);return E.useEffect(()=>{n.forEach(o=>{if(o.dismissed)Y4(o.id,o.removeDelay);else{let u=Qs.get(o.id);u&&(clearTimeout(u),Qs.delete(o.id))}})},[n]),{toasts:n,handlers:{updateHeight:I4,startPause:V4,endPause:l,calculateOffset:s}}},G4=Wr`
57
- from {
58
- transform: scale(0) rotate(45deg);
59
- opacity: 0;
60
- }
61
- to {
62
- transform: scale(1) rotate(45deg);
63
- opacity: 1;
64
- }`,X4=Wr`
65
- from {
66
- transform: scale(0);
67
- opacity: 0;
68
- }
69
- to {
70
- transform: scale(1);
71
- opacity: 1;
72
- }`,Z4=Wr`
73
- from {
74
- transform: scale(0) rotate(90deg);
75
- opacity: 0;
76
- }
77
- to {
78
- transform: scale(1) rotate(90deg);
79
- opacity: 1;
80
- }`,J4=Hi("div")`
81
- width: 20px;
82
- opacity: 0;
83
- height: 20px;
84
- border-radius: 10px;
85
- background: ${e=>e.primary||"#ff4b4b"};
86
- position: relative;
87
- transform: rotate(45deg);
88
-
89
- animation: ${G4} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
90
- forwards;
91
- animation-delay: 100ms;
92
-
93
- &:after,
94
- &:before {
95
- content: '';
96
- animation: ${X4} 0.15s ease-out forwards;
97
- animation-delay: 150ms;
98
- position: absolute;
99
- border-radius: 3px;
100
- opacity: 0;
101
- background: ${e=>e.secondary||"#fff"};
102
- bottom: 9px;
103
- left: 4px;
104
- height: 2px;
105
- width: 12px;
106
- }
107
-
108
- &:before {
109
- animation: ${Z4} 0.15s ease-out forwards;
110
- animation-delay: 180ms;
111
- transform: rotate(90deg);
112
- }
113
- `,W4=Wr`
114
- from {
115
- transform: rotate(0deg);
116
- }
117
- to {
118
- transform: rotate(360deg);
119
- }
120
- `,eA=Hi("div")`
121
- width: 12px;
122
- height: 12px;
123
- box-sizing: border-box;
124
- border: 2px solid;
125
- border-radius: 100%;
126
- border-color: ${e=>e.secondary||"#e0e0e0"};
127
- border-right-color: ${e=>e.primary||"#616161"};
128
- animation: ${W4} 1s linear infinite;
129
- `,tA=Wr`
130
- from {
131
- transform: scale(0) rotate(45deg);
132
- opacity: 0;
133
- }
134
- to {
135
- transform: scale(1) rotate(45deg);
136
- opacity: 1;
137
- }`,nA=Wr`
138
- 0% {
139
- height: 0;
140
- width: 0;
141
- opacity: 0;
142
- }
143
- 40% {
144
- height: 0;
145
- width: 6px;
146
- opacity: 1;
147
- }
148
- 100% {
149
- opacity: 1;
150
- height: 10px;
151
- }`,rA=Hi("div")`
152
- width: 20px;
153
- opacity: 0;
154
- height: 20px;
155
- border-radius: 10px;
156
- background: ${e=>e.primary||"#61d345"};
157
- position: relative;
158
- transform: rotate(45deg);
159
-
160
- animation: ${tA} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
161
- forwards;
162
- animation-delay: 100ms;
163
- &:after {
164
- content: '';
165
- box-sizing: border-box;
166
- animation: ${nA} 0.2s ease-out forwards;
167
- opacity: 0;
168
- animation-delay: 200ms;
169
- position: absolute;
170
- border-right: 2px solid;
171
- border-bottom: 2px solid;
172
- border-color: ${e=>e.secondary||"#fff"};
173
- bottom: 6px;
174
- left: 6px;
175
- height: 10px;
176
- width: 6px;
177
- }
178
- `,iA=Hi("div")`
179
- position: absolute;
180
- `,lA=Hi("div")`
181
- position: relative;
182
- display: flex;
183
- justify-content: center;
184
- align-items: center;
185
- min-width: 20px;
186
- min-height: 20px;
187
- `,aA=Wr`
188
- from {
189
- transform: scale(0.6);
190
- opacity: 0.4;
191
- }
192
- to {
193
- transform: scale(1);
194
- opacity: 1;
195
- }`,sA=Hi("div")`
196
- position: relative;
197
- transform: scale(0.6);
198
- opacity: 0.4;
199
- min-width: 20px;
200
- animation: ${aA} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
201
- forwards;
202
- `,oA=({toast:e})=>{let{icon:n,type:i,iconTheme:l}=e;return n!==void 0?typeof n=="string"?E.createElement(sA,null,n):n:i==="blank"?null:E.createElement(lA,null,E.createElement(eA,{...l}),i!=="loading"&&E.createElement(iA,null,i==="error"?E.createElement(J4,{...l}):E.createElement(rA,{...l})))},uA=e=>`
203
- 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
204
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
205
- `,cA=e=>`
206
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
207
- 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
208
- `,fA="0%{opacity:0;} 100%{opacity:1;}",dA="0%{opacity:1;} 100%{opacity:0;}",hA=Hi("div")`
209
- display: flex;
210
- align-items: center;
211
- background: #fff;
212
- color: #363636;
213
- line-height: 1.3;
214
- will-change: transform;
215
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
216
- max-width: 350px;
217
- pointer-events: auto;
218
- padding: 8px 10px;
219
- border-radius: 8px;
220
- `,pA=Hi("div")`
221
- display: flex;
222
- justify-content: center;
223
- margin: 4px 10px;
224
- color: inherit;
225
- flex: 1 1 auto;
226
- white-space: pre-line;
227
- `,mA=(e,n)=>{let i=e.includes("top")?1:-1,[l,s]=Vv()?[fA,dA]:[uA(i),cA(i)];return{animation:n?`${Wr(l)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Wr(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},yA=E.memo(({toast:e,position:n,style:i,children:l})=>{let s=e.height?mA(e.position||n||"top-center",e.visible):{opacity:0},o=E.createElement(oA,{toast:e}),u=E.createElement(pA,{...e.ariaProps},ac(e.message,e));return E.createElement(hA,{className:e.className,style:{...s,...i,...e.style}},typeof l=="function"?l({icon:o,message:u}):E.createElement(E.Fragment,null,o,u))});U4(E.createElement);var gA=({id:e,className:n,style:i,onHeightUpdate:l,children:s})=>{let o=E.useCallback(u=>{if(u){let f=()=>{let d=u.getBoundingClientRect().height;l(e,d)};f(),new MutationObserver(f).observe(u,{subtree:!0,childList:!0,characterData:!0})}},[e,l]);return E.createElement("div",{ref:o,className:n,style:i},s)},bA=(e,n)=>{let i=e.includes("top"),l=i?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Vv()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${n*(i?1:-1)}px)`,...l,...s}},vA=Cc`
228
- z-index: 9999;
229
- > * {
230
- pointer-events: auto;
231
- }
232
- `,Nu=16,xA=({reverseOrder:e,position:n="top-center",toastOptions:i,gutter:l,children:s,containerStyle:o,containerClassName:u})=>{let{toasts:f,handlers:d}=K4(i);return E.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Nu,left:Nu,right:Nu,bottom:Nu,pointerEvents:"none",...o},className:u,onMouseEnter:d.startPause,onMouseLeave:d.endPause},f.map(h=>{let m=h.position||n,g=d.calculateOffset(h,{reverseOrder:e,gutter:l,defaultPosition:n}),x=bA(m,g);return E.createElement(gA,{id:h.id,key:h.id,onHeightUpdate:d.updateHeight,className:h.visible?vA:"",style:x},h.type==="custom"?ac(h.message,h):s?s(h):E.createElement(yA,{toast:h,position:m}))}))},un=an;const mt=new PE({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(e,n)=>{var i;return lc(n)&&((i=n.response)==null?void 0:i.status)===404?!1:e<3}}},mutationCache:new hv({onError:e=>{var n;lc(e)&&e.status&&e.status>=400&&e.status<500&&(n=e.response)!=null&&n.data.error&&un.error(e.response.data.error)}})}),wA=async()=>{const{data:e}=await Ec.post("/auth/refresh");return e.data.accessToken},SA=async e=>{const{data:n}=await Ec.post("/auth/login",e);return n.data.accessToken},rh=()=>{mt.invalidateQueries({queryKey:["accessToken"]})},so=(()=>{let e=Promise.resolve(R4()),n=!1;const i=async()=>{await Ec.post("/auth/logout"),_u(void 0),window.location.reload()};return{get:async()=>e.then(u=>(rh(),u)),refresh:()=>(n||(n=!0,e=wA().then(u=>(_u(u),u)).catch(()=>{_u(void 0),i()}).finally(()=>{n=!1,rh()})),e),login:u=>(n||(n=!0,e=SA(u).then(f=>(_u(f),f)).finally(()=>{n=!1,rh()})),e),logout:i}})(),Yv=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",at=xt.create({baseURL:Yv,withCredentials:!0});at.interceptors.request.use(async e=>{const n=await so.get();return n&&(e.headers.Authorization=`Bearer ${n}`),e});at.interceptors.response.use(e=>e,e=>{var n;return lc(e)&&e.status===401&&((n=e==null?void 0:e.response)==null?void 0:n.data.error)!=="Missing auth token"&&so.refresh(),Promise.reject(e)});const Ec=xt.create({baseURL:Yv,withCredentials:!0}),ei="data-sources",gl="auth-user",CA=e=>zn({queryKey:["project","datasources",e],queryFn:async()=>{const{data:n}=await at.get(`/project/team/${e}/datasources`);return n.data},enabled:!!e}),EA=e=>zn({queryKey:["project","saved-queries",e],queryFn:async()=>{const{data:n}=await at.get(`/project/team/${e}/queries`);return n.data},enabled:!!e}),oo=e=>{const n=["project","team"],i=["project","saved-queries"];return Promise.all([mt.invalidateQueries(n),mt.invalidateQueries(i)])},AA=e=>{const n=["trash","team"];return mt.invalidateQueries(n)},TA=(e,n)=>zn({queryKey:["project",n,"tables",e],queryFn:async()=>{const{data:i}=await at.get(`/project/team/${n}/query`,{params:{size:20,search:e}});return i.data},enabled:!!n,staleTime:0,keepPreviousData:!0}),kA=(e,n)=>{},_A=()=>{},NA={event:kA,pageView:_A},Ac=e=>zn([ei,e],async()=>{const{data:n}=await at.get("/data-sources/"+e);return n.data},{enabled:!!e}),Kv=e=>zn({queryKey:[ei,e.teamId],queryFn:async()=>{const{data:n}=await at.get("/data-sources",{params:e});return n.data},enabled:e.teamId!==void 0}),Oa=e=>zn({queryKey:[ei,e,"inspections"],queryFn:async()=>{const{data:n}=await at.get(`/data-sources/${e}/inspections`);return n.data},enabled:!!e}),RA=()=>Wn(async e=>{const{data:n}=await at.post("/data-sources",e);return n.data},{onSuccess:()=>{mt.invalidateQueries([ei]),oo()},onError:()=>{}}),OA=()=>Wn({mutationFn:async({dataSource:e,id:n})=>{const{data:i}=await at.put(`/data-sources/${n}`,e);return i.data},onSuccess:()=>{mt.invalidateQueries([ei]),oo()}}),Gv=()=>Wn({mutationFn:async e=>{await at.post(`/data-sources/${e}/inspect`)},onSuccess:()=>{mt.invalidateQueries([ei])}}),jA=()=>Wn({mutationFn:async e=>{await at.delete(`/data-sources/${e}`)},onSuccess:()=>{mt.invalidateQueries([ei]),oo()}}),Xv=()=>zn(["accessToken"],so.get),kr=()=>{const{data:e}=Xv();return zn({queryKey:[gl],queryFn:async()=>{const{data:n}=await at.get("/users");return n.data},enabled:!!e,retry:(n,i)=>lc(i)&&i.code==="ERR_NETWORK"?!1:n<3})},DA=()=>Wn({mutationFn:async e=>{const{data:n}=await at.patch("/users",e);return n.data},onSuccess:async e=>{mt.setQueryData([gl],e)}}),MA=()=>Wn({mutationFn:async e=>(await at.post("/users",e),!0),onSuccess:()=>{mt.invalidateQueries({queryKey:["team-users"]})}});function LA(e){const n=[];for(const i of e)for(const l of i.columns)l.ref&&(n.push({id:`${i.tableName}->${l.ref.table}.${l.ref.field}`,name:`${i.tableName} in ${l.ref.table}`,where:`${i.tableName}.${l.name} = ${l.ref.table}.${l.ref.field}`,on:{fromTable:l.ref.table,toTable:i.tableName,fromColumn:l.ref.field,toColumn:l.name}}),n.push({id:`${l.ref.table}->${i.tableName}.${l.name}`,name:`${l.ref.table} in ${i.tableName}`,where:`${l.ref.table}.${l.ref.field} = ${i.tableName}.${l.name}`,on:{fromTable:i.tableName,toTable:l.ref.table,fromColumn:l.name,toColumn:l.ref.field}}));return n}const zA=e=>zn({queryKey:["hooks",e],queryFn:async()=>{const n=await mt.fetchQuery({queryKey:[ei,e,"inspections"],queryFn:async()=>{const{data:i}=await at.get(`/data-sources/${e}/inspections`);return i.data}});return LA(n)},enabled:!!e}),Ap=[{value:"=",label:"equals"},{value:"<>",label:"not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"},{value:"LIKE",label:"contains"},{value:"NOT LIKE",label:"not contains"},{value:"IN",label:"in list"},{value:"NOT IN",label:"not in list"},{value:"IS NULL",label:"is null"},{value:"IS NOT NULL",label:"is not null"}],Is=Ap.reduce((e,n)=>(e[n.value]=n.label,e),{}),w1=Ap.reduce((e,n)=>(e[n.label]=n.value,e),{}),ja=e=>e.map(n=>({label:Is[n],value:n})),UA=ja(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]),BA=ja(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);ja(["=","<>","IS NULL","IS NOT NULL"]);const qA=ja(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);ja(["IS NULL","IS NOT NULL"]);ja(["IN","NOT IN"]);const Zv=e=>e!=="IS NULL"&&e!=="IS NOT NULL",HA=(e,n)=>Zv(e)?e==="IN"||e==="NOT IN"?n.split(",").map(i=>({value:i.trim(),isColumn:!1})):[{value:n,isColumn:!1}]:[],Jv=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],FA=["integer","smallint","decimal","numeric","float","real","double precision","int","smallint","integer","bigint","decimal","numeric","real","double precision","serial","bigserial","money"],PA=["date","time","datetime","timestamp","year","date","time","time without time zone","time with time zone","timestamp","timestamp without time zone","timestamp with time zone","interval"],QA=["date","datetime","timestamp","timestamptz"].reduce((e,n)=>(e[n]=!0,e),{}),zi=e=>e.fn?e.distinct===!0?`${e.fn} distinct ${e.value}`:`${e.fn} ${e.value}`:e.value;var sn=(e=>(e.OWNER="owner",e.ADMIN="admin",e.EDITOR="editor",e.READ_ONLY="read_only",e))(sn||{});const S1={[sn.READ_ONLY]:10,[sn.EDITOR]:20,[sn.ADMIN]:30,[sn.OWNER]:40};function IA(e,n){if(!e||!n)return{};const i=new Set;for(const s of n)s.table&&i.add(s.table);const l={};for(const s of i){const o=e.find(u=>u.tableName===s);if(o){l[s]=[];const u=o.columns.filter(f=>f.isPrimary);for(const f of u)if(n.find(h=>h.table===s&&h.column===f.name))l[s].push(f.name);else{delete l[s];break}}}return l}function VA(e,n,i,l){const{data:s}=zA(n),{data:o}=Oa(n);return E.useMemo(()=>{const u=IA(o,e==null?void 0:e.columns);return{name:i,tabId:l,hooks:(()=>{const f=[];if(!s||!e||!e.columns)return f;for(const d of s)(e.tables.includes(d.on.toTable)||e.tables.includes(d.on.fromTable))&&f.push(d);return f})(),availableJoins:(()=>{const f=[];if(!s||!e||!e.columns)return f;for(const d of s)!e.tables.includes(d.on.toTable)&&e.tables.includes(d.on.fromTable)&&f.push(d);return f})(),allColumns:(e==null?void 0:e.allColumns)||[],dataSourceId:n,entities:Object.keys(u),getValue:(f,d)=>{var g;const h=zi(d),m=(g=e==null?void 0:e.columns)==null?void 0:g.findIndex(x=>x.full===h);if(m!=null&&m>-1)return f[m]},getEntityKey:(f,d)=>u[f].reduce((h,m)=>{var x;const g=(x=e==null?void 0:e.columns)==null?void 0:x.findIndex(v=>v.column===m&&v.table===f);return g!=null&&g>-1&&h.push([m,d[g]]),h},[]),getColumnType:f=>{const d=e==null?void 0:e.allColumns.find(h=>h.full===f);if(d)return d.type}}},[e,n,s,o,i])}function $A(e,n){return E.useMemo(()=>({state:e,setState:n}),[e,n])}function ga(e){return{dataSourceId:e.dataSourceId||"",table:e.table||"",filters:(e==null?void 0:e.filters)||[],joins:(e==null?void 0:e.joins)??[],orderBy:(e==null?void 0:e.orderBy)??[],page:(e==null?void 0:e.page)||0,size:(e==null?void 0:e.size)||50,columns:(e==null?void 0:e.columns)??[],groupBy:(e==null?void 0:e.groupBy)??[],aggregations:(e==null?void 0:e.aggregations)??[]}}const Un=e=>{const n=new Set;let i=e;const l=f=>(n.add(f),()=>n.delete(f)),s=f=>(n.forEach(d=>d(f)),!0),o=f=>{i=typeof f=="function"?f(i):f,s(i)},u=f=>()=>f?f(i):i;return[f=>E.useSyncExternalStore(l,u(f),u(f)),o,{get:()=>i,subscribe:f=>(f(i),l(f))}]};function YA(e,n,i){try{const l=i.getItem(e);if(l)return JSON.parse(l)}catch(l){console.warn("Failed to restore tabs",l)}return n}const Wv=({storage:e=localStorage,localStorageKey:n,initialData:i})=>{const l=Un(YA(n,i,e));return l[2].subscribe(s=>{e.setItem(n,JSON.stringify(s))}),l},[Tc,kc,_c]=Wv({initialData:[],localStorageKey:"open-tabs__v1"}),[KA,Vh,GA]=Wv({initialData:"",localStorageKey:"active-tabs",storage:sessionStorage}),Xs=(e,n,i=!1)=>{ZA();const l=XA({label:e,type:"explorer",id:Date.now().toString(36),options:ga(n)});i&&Tp(l.id)},C1=e=>{const n=GA.get();if(kc(i=>i.filter(l=>l.id!==e)),n===e){const i=_c.get();i.length>0?Vh(i[0].id):Vh("")}},Tp=e=>{Vh(e)},kp=(e,n)=>{kc(i=>i.map(l=>l.id===e?{...l,label:n}:l))};function XA(e){return kc(n=>n?[...n,e]:[e]),e}const E1=20;function ZA(){if(_c.get().length>=E1){const n=`Maximum ${E1} tabs are allowed to be open at the same time. Please close other tabs to open new ones.`;throw un.error(n),new Error(n)}}const JA="_alert_18lpv_2",WA="_info_18lpv_2",eT="_danger_18lpv_2",tT="_success_18lpv_2",nT="_warning_18lpv_2",rT="_dark_18lpv_2",la={alert:JA,info:WA,danger:eT,success:tT,warning:nT,dark:rT};function ex(e){var n,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(i=ex(e[n]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function Ae(){for(var e,n,i=0,l="",s=arguments.length;i<s;i++)(e=arguments[i])&&(n=ex(e))&&(l&&(l+=" "),l+=n);return l}const gn=({variant:e,noRounded:n,className:i,children:l,...s})=>b.jsx("div",{className:Ae(la.alert,!n&&"rounded-lg",(e==="info"||!e)&&la.info,e==="danger"&&la.danger,e==="dark"&&la.dark,e==="warning"&&la.warning,e==="success"&&la.success,i),role:"alert",...s,children:l}),pt={home:{path:"/",name:"🏠 Home"},workbench:{path:"/workbench"},login:{path:"/login"}},tx=async e=>mt.fetchQuery({queryKey:["query",e],queryFn:async()=>{const{data:n}=await at.get("/queries/"+e);return n.data}}),[iT,ih,lT]=Un(void 0),aT=async()=>new Promise(e=>{ih({onCancel:()=>{ih(void 0),e(void 0)},onConfirm:(n,i,l)=>{ih(void 0),e({dsId:l,id:i,type:n})}})}),_p=e=>{const n=Tr();return E.useCallback(()=>{lT.get()||aT().then(l=>{(l==null?void 0:l.type)==="table"?(Xs(l.id,ga({table:l.id,dataSourceId:l.dsId}),!0),location.pathname!==pt.workbench.path&&n(pt.workbench.path)):(l==null?void 0:l.type)==="query"&&tx(l.id).then(s=>{Xs(s.name,ga(s.opts),!0),location.pathname!==pt.workbench.path&&n(pt.workbench.path)})})},[n,e])},Da=e=>{const{data:n}=kr();return E.useMemo(()=>n?S1[n.teamRole]>=S1[e]:!1,[n,e])},sT="_input_1vhx5_2",oT="_small_1vhx5_2",uT="_content_1vhx5_2",cT="_form_1vhx5_2",fT="_mode-select_1vhx5_2",Ze={input:sT,small:oT,content:uT,form:cT,switch:"_switch_1vhx5_2",modeSelect:fT},dT="_modal_1oza4_2",hT="_modal-visible_1oza4_2",pT="_modal-invisible_1oza4_2",mT="_backdrop_1oza4_2",yT="_modal-container_1oza4_2",gT="_close-button_1oza4_2",fa={modal:dT,modalVisible:hT,modalInvisible:pT,backdrop:mT,modalContainer:yT,closeButton:gT},Fi=e=>E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...e},E.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M368 368L144 144M368 144L144 368"})),tn=({children:e,backdropClose:n,isVisible:i,onClose:l,onClosed:s,noPadding:o=!1,portal:u=!1})=>{const[f,d]=E.useState(!1),h=()=>{n&&l()},m=x=>{i||getComputedStyle(x.currentTarget).opacity==="0"&&(d(!1),s&&s())};E.useEffect(()=>{i&&d(!0)},[i]);const g=b.jsxs("div",{onTransitionEnd:m,className:Ae(fa.modal,i?fa.modalVisible:fa.modalInvisible),children:[b.jsx("div",{onClick:h,className:fa.backdrop}),b.jsx("div",{className:Ae(fa.modalContainer,o!==!0&&"p-4"),children:f&&e})]});return u?lv.createPortal(g,document.body):g},er=({onClick:e})=>{const n=E.useRef(e);return n.current=e,E.useEffect(()=>{const i=l=>{var s;l.key==="Escape"&&((s=n.current)==null||s.call(n))};return window.addEventListener("keyup",i),()=>{window.removeEventListener("keyup",i)}},[]),b.jsx("button",{className:fa.closeButton,onClick:e,children:b.jsx(Fi,{width:20,height:20})})},nx=({children:e})=>b.jsx("h2",{className:"text-xl font-semibold",children:e}),uo=e=>{const[n,i]=E.useState(e),[l,s]=E.useState([]),o=E.useRef(e),u=E.useCallback((h,m)=>{i(g=>({...g,[h]:m}))},[]),f=E.useCallback(h=>m=>{m.target.type==="checkbox"?u(h,m.target.checked):u(h,m.target.value),s(g=>g.includes(h)?g:[...g,h])},[u]),d=E.useCallback(()=>{i(o.current),s([])},[]);return[n,{set:u,change:f,reset:d,touched:l}]},bT=({form:e,change:n})=>b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database URL"}),b.jsx("input",{value:e.dbUrl,onChange:n("dbUrl"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database port"}),b.jsx("input",{value:e.dbPort,onChange:n("dbPort"),type:"number",className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"User"}),b.jsx("input",{value:e.dbUser,onChange:n("dbUser"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Password"}),b.jsx("input",{type:"password",value:e.dbPassword,onChange:n("dbPassword"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database"}),b.jsx("input",{value:e.dbDatabase,onChange:n("dbDatabase"),className:"input"})]})]}),vT=({form:e,change:n})=>b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database URL"}),b.jsx("input",{value:e.dbUrl,onChange:n("dbUrl"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database port"}),b.jsx("input",{value:e.dbPort,onChange:n("dbPort"),type:"number",className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"User"}),b.jsx("input",{value:e.dbUser,onChange:n("dbUser"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Password"}),b.jsx("input",{type:"password",value:e.dbPassword,onChange:n("dbPassword"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Database"}),b.jsx("input",{value:e.dbDatabase,onChange:n("dbDatabase"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,Ze.small),children:[b.jsx("label",{children:"Schema"}),b.jsx("input",{value:e.dbSchema,onChange:n("dbSchema"),className:"input"})]})]}),aa=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],xT=({show:e,onClose:n,dbType:i="postgres"})=>{const l=RA(),s=Gv(),{data:o}=kr(),[u,{change:f,set:d}]=uo({name:"",dbType:i,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),h=async()=>{const w=await l.mutateAsync({...u,dbPort:Number(u.dbPort),teamId:o.teamId,ownerId:o.id});await s.mutateAsync(w.id),n(),NA.event("Create Datasource",{dbType:u.dbType})},m=w=>{d("allowInsert",!w),d("allowUpdate",!w)},g=()=>{n()},x=l.isLoading||s.isLoading,v=!u.allowInsert&&!u.allowUpdate;return b.jsxs(tn,{isVisible:e,onClose:g,children:[b.jsx(er,{onClick:g}),b.jsxs(gn,{variant:"warning",className:"text-sm mb-2 max-w-xl",children:["DataRamen is currently under active development. In production-like environments, ",b.jsx("span",{className:"font-semibold underline",children:"it’s recommended to use read-only database credentials"}),"."]}),l.isError&&b.jsx(gn,{variant:"danger",className:"mb-2",children:b.jsx("span",{children:"Failed to connect to the database. Please check if the data are correct and retry."})}),l.isLoading&&b.jsx(gn,{className:"mb-2",variant:"info",children:"Creating connection"}),s.isLoading&&b.jsx(gn,{className:"mb-2",variant:"info",children:"Inspecting connection"}),b.jsxs("div",{className:Ze.switch,children:[b.jsxs("label",{className:"button tertiary",children:[b.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:u.dbType===aa[0].tag,onChange:()=>d("dbType",aa[0].tag)}),b.jsx("span",{children:aa[0].label})]}),b.jsxs("label",{className:"button tertiary",children:[b.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:u.dbType===aa[1].tag,onChange:()=>d("dbType",aa[1].tag)}),b.jsx("span",{children:aa[1].label})]})]}),b.jsxs("div",{className:"overflow-y-auto mt-2",children:[b.jsx("div",{className:Ze.content,children:b.jsxs("div",{className:Ze.form,children:[b.jsxs("div",{className:Ae(Ze.input,"col-span-2"),children:[b.jsx("label",{children:"Name"}),b.jsx("input",{value:u.name,onChange:f("name"),className:"input"})]}),b.jsxs("div",{className:Ae(Ze.input,"col-span-2"),children:[b.jsx("label",{children:"Description"}),b.jsx("textarea",{value:u.description,onChange:f("description"),className:"input"})]}),u.dbType==="mysql"&&b.jsx(bT,{form:u,change:f}),u.dbType==="postgres"&&b.jsx(vT,{form:u,change:f})]})}),b.jsxs("div",{className:"mt-4",children:[b.jsxs("label",{className:Ze.modeSelect,children:[b.jsxs("div",{children:[b.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:v,onChange:()=>m(!0)}),b.jsx("span",{className:"text-sm font-semibold",children:"Production mode"})]}),b.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",b.jsx("strong",{children:"forbidden"}),". You won't be able to insert new rows or edit existing data. Tables in this data source are read-only."]})]}),b.jsxs("label",{className:Ze.modeSelect,children:[b.jsxs("div",{children:[b.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!v,onChange:()=>m(!1)}),b.jsx("span",{className:"text-sm font-semibold",children:"Dev mode"})]}),b.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",b.jsx("strong",{children:"allowed"}),". You will be able to insert new rows and edit existing data."]})]})]})]}),b.jsxs("div",{className:"flex justify-end gap-1 mt-2",children:[b.jsx("button",{onClick:g,className:"button tertiary",disabled:x,children:"Cancel"}),b.jsx("button",{onClick:h,className:"button primary",disabled:x,children:"Create"})]})]})},wT="_data-source-entry_cvaen_2",ST="_action-title_cvaen_2",CT="_action-subtext_cvaen_2",ET="_tab_cvaen_2",Ui={dataSourceEntry:wT,actionTitle:ST,actionSubtext:CT,tab:ET},AT=e=>E.createElement("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("path",{d:"m24.129 23.412-.508-.484c-.251-.331-.518-.624-.809-.891l-.005-.004q-.448-.407-.931-.774-.387-.266-1.064-.641c-.371-.167-.661-.46-.818-.824l-.004-.01-.048-.024c.212-.021.406-.06.592-.115l-.023.006.57-.157c.236-.074.509-.122.792-.133h.006c.298-.012.579-.06.847-.139l-.025.006q.194-.048.399-.109t.351-.109v-.169q-.145-.217-.351-.496c-.131-.178-.278-.333-.443-.468l-.005-.004q-.629-.556-1.303-1.076c-.396-.309-.845-.624-1.311-.916l-.068-.04c-.246-.162-.528-.312-.825-.435l-.034-.012q-.448-.182-.883-.399c-.097-.048-.21-.09-.327-.119l-.011-.002c-.117-.024-.217-.084-.29-.169l-.001-.001c-.138-.182-.259-.389-.355-.609l-.008-.02q-.145-.339-.314-.651-.363-.702-.702-1.427t-.651-1.452q-.217-.484-.399-.967c-.134-.354-.285-.657-.461-.942l.013.023c-.432-.736-.863-1.364-1.331-1.961l.028.038c-.463-.584-.943-1.106-1.459-1.59l-.008-.007c-.509-.478-1.057-.934-1.632-1.356l-.049-.035q-.896-.651-1.96-1.282c-.285-.168-.616-.305-.965-.393l-.026-.006-1.113-.278-.629-.048q-.314-.024-.629-.024c-.148-.078-.275-.171-.387-.279-.11-.105-.229-.204-.353-.295l-.01-.007c-.605-.353-1.308-.676-2.043-.93l-.085-.026c-.193-.113-.425-.179-.672-.179-.176 0-.345.034-.499.095l.009-.003c-.38.151-.67.458-.795.84l-.003.01c-.073.172-.115.371-.115.581 0 .368.13.705.347.968l-.002-.003q.544.725.834 1.14.217.291.448.605c.141.188.266.403.367.63l.008.021c.056.119.105.261.141.407l.003.016q.048.206.121.448.217.556.411 1.14c.141.425.297.785.478 1.128l-.019-.04q.145.266.291.52t.314.496c.065.098.147.179.241.242l.003.002c.099.072.164.185.169.313v.001c-.114.168-.191.369-.217.586l-.001.006c-.035.253-.085.478-.153.695l.008-.03c-.223.666-.351 1.434-.351 2.231 0 .258.013.512.04.763l-.003-.031c.06.958.349 1.838.812 2.6l-.014-.025c.197.295.408.552.641.787.168.188.412.306.684.306.152 0 .296-.037.422-.103l-.005.002c.35-.126.599-.446.617-.827v-.002c.048-.474.12-.898.219-1.312l-.013.067c.024-.063.038-.135.038-.211 0-.015-.001-.03-.002-.045v.002q-.012-.109.133-.206v.048q.145.339.302.677t.326.677c.295.449.608.841.952 1.202l-.003-.003c.345.372.721.706 1.127 1.001l.022.015c.212.162.398.337.566.528l.004.004c.158.186.347.339.56.454l.01.005v-.024h.048c-.039-.087-.102-.157-.18-.205l-.002-.001c-.079-.044-.147-.088-.211-.136l.005.003q-.217-.217-.448-.484t-.423-.508q-.508-.702-.969-1.467t-.871-1.555q-.194-.387-.375-.798t-.351-.798c-.049-.099-.083-.213-.096-.334v-.005c-.006-.115-.072-.214-.168-.265l-.002-.001c-.121.206-.255.384-.408.545l.001-.001c-.159.167-.289.364-.382.58l-.005.013c-.141.342-.244.739-.289 1.154l-.002.019q-.072.641-.145 1.318l-.048.024-.024.024c-.26-.053-.474-.219-.59-.443l-.002-.005q-.182-.351-.326-.69c-.248-.637-.402-1.374-.423-2.144v-.009c-.009-.122-.013-.265-.013-.408 0-.666.105-1.308.299-1.91l-.012.044q.072-.266.314-.896t.097-.871c-.05-.165-.143-.304-.265-.41l-.001-.001c-.122-.106-.233-.217-.335-.335l-.003-.004q-.169-.244-.326-.52t-.278-.544c-.165-.382-.334-.861-.474-1.353l-.022-.089c-.159-.565-.336-1.043-.546-1.503l.026.064c-.111-.252-.24-.47-.39-.669l.006.008q-.244-.326-.436-.617-.244-.314-.484-.605c-.163-.197-.308-.419-.426-.657l-.009-.02c-.048-.097-.09-.21-.119-.327l-.002-.011c-.011-.035-.017-.076-.017-.117 0-.082.024-.159.066-.223l-.001.002c.011-.056.037-.105.073-.145.039-.035.089-.061.143-.072h.002c.085-.055.188-.088.3-.088.084 0 .165.019.236.053l-.003-.001c.219.062.396.124.569.195l-.036-.013q.459.194.847.375c.298.142.552.292.792.459l-.018-.012q.194.121.387.266t.411.291h.339q.387 0 .822.037c.293.023.564.078.822.164l-.024-.007c.481.143.894.312 1.286.515l-.041-.019q.593.302 1.125.641c.589.367 1.098.743 1.577 1.154l-.017-.014c.5.428.954.867 1.38 1.331l.01.012c.416.454.813.947 1.176 1.464l.031.047c.334.472.671 1.018.974 1.584l.042.085c.081.154.163.343.234.536l.011.033q.097.278.217.57.266.605.57 1.221t.57 1.198l.532 1.161c.187.406.396.756.639 1.079l-.011-.015c.203.217.474.369.778.422l.008.001c.368.092.678.196.978.319l-.047-.017c.143.065.327.134.516.195l.04.011c.212.065.396.151.565.259l-.009-.005c.327.183.604.363.868.559l-.021-.015q.411.302.822.57.194.145.651.423t.484.52c-.114-.004-.249-.007-.384-.007-.492 0-.976.032-1.45.094l.056-.006c-.536.072-1.022.203-1.479.39l.04-.014c-.113.049-.248.094-.388.129l-.019.004c-.142.021-.252.135-.266.277v.001c.061.076.11.164.143.26l.002.006c.034.102.075.19.125.272l-.003-.006c.119.211.247.393.391.561l-.004-.005c.141.174.3.325.476.454l.007.005q.244.194.508.399c.161.126.343.25.532.362l.024.013c.284.174.614.34.958.479l.046.016c.374.15.695.324.993.531l-.016-.011q.291.169.58.375t.556.399c.073.072.137.152.191.239l.003.005c.091.104.217.175.36.193h.003v-.048c-.088-.067-.153-.16-.184-.267l-.001-.004c-.025-.102-.062-.191-.112-.273l.002.004zm-18.576-19.205q-.194 0-.363.012c-.115.008-.222.029-.323.063l.009-.003v.024h.048q.097.145.244.326t.266.351l.387.798.048-.024c.113-.082.2-.192.252-.321l.002-.005c.052-.139.082-.301.082-.469 0-.018 0-.036-.001-.054v.003c-.045-.044-.082-.096-.108-.154l-.001-.003-.081-.182c-.053-.084-.127-.15-.214-.192l-.003-.001c-.094-.045-.174-.102-.244-.169z"})),TT=e=>E.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("title",null,"file_type_pgsql"),E.createElement("path",{d:"M29.507,18.773a1.378,1.378,0,0,0-1.144-.921,2.619,2.619,0,0,0-.913.051,8.2,8.2,0,0,1-1.406.185,27.125,27.125,0,0,0,2.872-6.83c.953-3.689.444-5.369-.151-6.13A8.239,8.239,0,0,0,22.121,2a11.773,11.773,0,0,0-3.453.484A12.858,12.858,0,0,0,16.648,2.3a6.565,6.565,0,0,0-3.518.867,16.039,16.039,0,0,0-2.484-.624,7.694,7.694,0,0,0-5.819.924C3.093,4.691,2.289,6.819,2.438,9.792A36.351,36.351,0,0,0,3.844,16.33a22.579,22.579,0,0,0,1.514,3.863A4.786,4.786,0,0,0,7.8,22.742a2.4,2.4,0,0,0,2.379-.516,2.08,2.08,0,0,0,.5.43,3.328,3.328,0,0,0,.944.4,5.069,5.069,0,0,0,3.3-.2c.006.171.011.335.014.477.006.229.013.454.021.665a11.641,11.641,0,0,0,.441,3.3c.016.043.037.107.059.176a3.975,3.975,0,0,0,.991,1.745,2.955,2.955,0,0,0,2.09.777,4.7,4.7,0,0,0,.977-.109A4.592,4.592,0,0,0,22.607,28.1c.811-1.155,1.206-2.894,1.277-5.635.009-.078.018-.152.026-.222l.017-.145.191.017.049,0a7.562,7.562,0,0,0,3.163-.548c.631-.293,2.654-1.361,2.177-2.8"}),E.createElement("path",{d:"M27.689,19.053c-3.163.652-3.38-.418-3.38-.418C27.648,13.68,29.044,7.39,27.839,5.851c-3.286-4.2-8.975-2.213-9.07-2.162l-.031.006a11.28,11.28,0,0,0-2.11-.22,5.212,5.212,0,0,0-3.34,1S3.14.294,3.612,9.733c.1,2.008,2.878,15.194,6.191,11.211,1.211-1.456,2.381-2.688,2.381-2.688a3.071,3.071,0,0,0,2.006.512l.057-.048a2.21,2.21,0,0,0,.023.567c-.854.954-.6,1.121-2.309,1.472-1.726.356-.712.989-.05,1.155a3.508,3.508,0,0,0,3.915-1.272l-.05.2c.334.268.569,1.742.53,3.079a8.481,8.481,0,0,0,.2,2.971c.264.717.526,2.329,2.769,1.849a3.307,3.307,0,0,0,2.98-3.179c.1-1.234.313-1.052.326-2.155l.174-.522c.2-1.673.032-2.213,1.186-1.962l.281.025a6.4,6.4,0,0,0,2.615-.44c1.406-.652,2.239-1.742.853-1.455h0",style:{fill:"#336791"}}),E.createElement("path",{d:"M13.882,10.631a.981.981,0,0,0-.674.1.247.247,0,0,0-.1.164.48.48,0,0,0,.117.314.881.881,0,0,0,.559.349.637.637,0,0,0,.09.006.725.725,0,0,0,.687-.467c.035-.248-.326-.414-.676-.463m9.442.008c-.027-.195-.374-.25-.7-.2s-.647.194-.62.389a.667.667,0,0,0,.62.411.592.592,0,0,0,.083-.006.8.8,0,0,0,.451-.247.5.5,0,0,0,.169-.343",style:{fill:"#fff"}}),E.createElement("path",{d:"M28.741,18.979c-.121-.365-.509-.482-1.154-.349-1.915.4-2.6.121-2.826-.044a26.327,26.327,0,0,0,3.373-7.565,14.374,14.374,0,0,0,.5-3.253,3.513,3.513,0,0,0-.509-2.2,7.482,7.482,0,0,0-6.049-2.825,10.363,10.363,0,0,0-3.5.551,8.717,8.717,0,0,0-1.968-.253,5.684,5.684,0,0,0-3.372.929,15.051,15.051,0,0,0-2.74-.718,6.978,6.978,0,0,0-5.242.805c-1.5,1.064-2.2,2.966-2.061,5.653a35.489,35.489,0,0,0,1.373,6.348c1.07,3.505,2.233,5.49,3.457,5.9a1.548,1.548,0,0,0,.491.081,2.049,2.049,0,0,0,1.563-.886q1.042-1.25,2.155-2.438a3.472,3.472,0,0,0,1.55.417l0,.042q-.14.166-.273.338c-.375.475-.452.574-1.658.823-.343.071-1.254.259-1.267.9-.014.7,1.077.991,1.2,1.022a5.144,5.144,0,0,0,1.249.162,3.634,3.634,0,0,0,2.5-.934,23.674,23.674,0,0,0,.381,5.684,2.854,2.854,0,0,0,2.729,2.1,4.378,4.378,0,0,0,.917-.1,3.462,3.462,0,0,0,3.156-3.212c.177-1.026.481-3.475.624-4.789a3.859,3.859,0,0,0,1.11.137,6.6,6.6,0,0,0,2.519-.48c.712-.331,2-1.141,1.763-1.846ZM24.051,10.1a7.968,7.968,0,0,1-.116,1.107,10.229,10.229,0,0,0-.14,1.3,9.859,9.859,0,0,0,.1,1.47,5.236,5.236,0,0,1-.229,2.986,3.882,3.882,0,0,1-.207-.426c-.058-.141-.185-.368-.359-.681-.68-1.22-2.274-4.078-1.458-5.244.243-.347.86-.7,2.408-.512ZM22.174,3.531a6.617,6.617,0,0,1,5.334,2.522c.975,1.245-.1,6.912-3.205,11.8l-.094-.119-.039-.049a5.524,5.524,0,0,0,.506-3.8,9.114,9.114,0,0,1-.1-1.352,9.572,9.572,0,0,1,.131-1.206,7.614,7.614,0,0,0,.123-1.493.619.619,0,0,0,.013-.21,8.381,8.381,0,0,0-1.912-3.6,8.61,8.61,0,0,0-3.039-2.284,10.246,10.246,0,0,1,2.28-.214ZM9.479,20.654c-.627.754-1.061.61-1.2.562-.928-.31-2.006-2.272-2.955-5.384a35.167,35.167,0,0,1-1.34-6.159c-.12-2.4.462-4.074,1.73-4.974,2.063-1.463,5.456-.587,6.819-.143-.02.019-.04.037-.059.057-2.237,2.259-2.184,6.119-2.178,6.355,0,.091.007.22.018.4a15.969,15.969,0,0,1-.081,3.226A4.08,4.08,0,0,0,11.3,18.007q.133.138.278.262c-.383.41-1.216,1.318-2.1,2.385Zm2.39-3.19a3.3,3.3,0,0,1-.865-2.764,16.7,16.7,0,0,0,.087-3.381c-.006-.095-.011-.178-.014-.243A4.3,4.3,0,0,1,14,10.223a1.188,1.188,0,0,1,.918,1.026c.646,2.989.085,4.234-.365,5.235-.093.206-.181.4-.255.6l-.058.156a10.218,10.218,0,0,0-.368,1.109,2.788,2.788,0,0,1-2-.887Zm.113,4.03a1.733,1.733,0,0,1-.523-.225,2.553,2.553,0,0,1,.557-.166c1.418-.292,1.637-.5,2.116-1.105.11-.139.234-.3.406-.489h0c.256-.287.374-.238.586-.15a.829.829,0,0,1,.408.525.585.585,0,0,1-.05.491A3.1,3.1,0,0,1,11.983,21.495ZM19.406,28.4a2.113,2.113,0,0,1-2.754-1.526,31.129,31.129,0,0,1-.3-6.853.392.392,0,0,0-.017-.124,1.643,1.643,0,0,0-.048-.23,1.589,1.589,0,0,0-.862-1.034,1.216,1.216,0,0,0-.793-.1,9.586,9.586,0,0,1,.342-1.022l.058-.157c.066-.177.148-.36.235-.554.471-1.047,1.117-2.482.416-5.722a2.044,2.044,0,0,0-2.468-1.669A5.694,5.694,0,0,0,11.328,10c-.078.04-.15.078-.216.115A8.244,8.244,0,0,1,13.03,5.163,4.711,4.711,0,0,1,16.6,3.827,7.567,7.567,0,0,1,22.381,6.59,8.774,8.774,0,0,1,23.963,9.3c-1.463-.149-2.458.14-2.962.861-1.1,1.568.6,4.612,1.416,6.075.15.268.279.5.319.6a5.432,5.432,0,0,0,.861,1.387c.077.1.152.189.208.271-.443.128-1.239.423-1.166,1.9-.058.74-.474,4.205-.686,5.43-.279,1.617-.874,2.22-2.548,2.579Zm7.242-8.288a5.714,5.714,0,0,1-1.931.4,2.422,2.422,0,0,1-1.3-.167c-.045-.919.3-1.015.66-1.117.057-.016.112-.032.166-.05a1.353,1.353,0,0,0,.11.08c.639.422,1.78.467,3.39.135l.018,0a4.334,4.334,0,0,1-1.116.72Z",style:{fill:"#fff"}})),Zs=({size:e,type:n})=>n==="mysql"?b.jsx(AT,{width:e,height:e}):b.jsx(TT,{width:e,height:e}),[kT,ba]=Un(void 0),Nc=(e,n)=>e!=null&&e>n,_T=()=>{const e=_p("Home");return b.jsxs("div",{className:"card-white relative hover:bg-gray-50! cursor-pointer",onClick:e,children:[b.jsxs("h2",{className:Ui.actionTitle,children:[b.jsx("span",{children:"🔎 Start new query"}),b.jsx("span",{className:"hotkey",children:"N"})]}),b.jsx("p",{className:Ui.actionSubtext,children:"Select a table to start from. You will be able to customize your query later."})]})},NT=()=>{const[e,n]=E.useState(void 0),i=Da(sn.EDITOR),l=s=>{i?n(s):un.error("You don't have permission to connect new data sources in this team")};return b.jsxs("div",{children:[e&&b.jsx(xT,{show:!0,dbType:e,onClose:()=>n(void 0)}),b.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>l("postgres"),children:[b.jsx("p",{className:Ui.actionTitle,children:"🧙‍♂️ Connection wizard"}),b.jsx("p",{className:Ui.actionSubtext,children:"Configure new database connection."}),b.jsxs("div",{className:"flex gap-2 mt-2",children:[b.jsx(Zs,{size:28,type:"postgres"}),b.jsx(Zs,{size:28,type:"mysql"})]})]})]})},RT=()=>{const e=Tr(),n=Tc(),i=()=>{e(pt.workbench.path)},l=s=>{Tp(s.currentTarget.dataset.tabId),e(pt.workbench.path)};return b.jsxs("div",{className:"card-white lg:col-span-2",children:[b.jsxs("h2",{className:Ui.actionTitle,children:[b.jsx("span",{children:"🛠️ Workbench"}),b.jsx("button",{onClick:i,className:"hotkey",children:"W"})]}),b.jsx("p",{className:Ui.actionSubtext,children:"Continue your work from where you left."}),Nc(n==null?void 0:n.length,0)&&b.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:n==null?void 0:n.map(s=>b.jsxs("button",{className:Ui.tab,onClick:l,"data-tab-id":s.id,children:[b.jsx("span",{children:"📄"}),b.jsx("span",{className:"truncate",children:s.label})]},s.id))})]})},OT=()=>{const{data:e}=kr(),{data:n}=Kv({teamId:e==null?void 0:e.teamId}),i=l=>{ba(l)};return!n||n.length===0?null:b.jsxs("div",{className:"mt-8",children:[b.jsx("h2",{className:"text-4xl font-semibold text-gray-700 text-center lg:text-left",children:"Data sources"}),b.jsx("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:n==null?void 0:n.map(l=>b.jsxs("div",{className:Ui.dataSourceEntry,onClick:()=>i(l.id),tabIndex:0,children:[b.jsx(Zs,{size:32,type:l.dbType}),b.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:l.name}),l.allowInsert?b.jsx("span",{className:"text-red-700",children:"Development"}):b.jsx("span",{className:"text-blue-700",children:"Production"})]},l.id))})]})},jT=()=>{const{data:e}=kr(),n=Tc(),{data:i}=Kv({teamId:e==null?void 0:e.teamId}),l=!!i&&i.length>0,s=!!e;return b.jsx("div",{className:"page-container h-screen max-h-screen overflow-y-auto bg-(--bg)",children:b.jsxs("div",{className:"page-content h-full",children:[b.jsx("h2",{className:"text-4xl font-semibold text-gray-700 text-center lg:text-left mt-4 lg:mt-0",children:"Data ramen"}),s&&!l&&b.jsx(gn,{variant:"warning",className:"font-semibold mt-4",children:"Connect at least one datasource to start using DataRamen"}),b.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[b.jsx(_T,{}),b.jsx(NT,{}),s&&n.length>0&&b.jsx(RT,{})]}),s&&b.jsx(OT,{})]})})},[DT,Np]=Un(void 0),MT=()=>Np(void 0);function pl(e,n){if(e==null)return"";switch(n){case"json":case"jsonb":return JSON.stringify(e,null,2)}if(e===0||e===!1)return e.toString();switch(typeof e){case"string":return e;case"number":case"boolean":return e.toString();default:return JSON.stringify(e)}}const LT=e=>{var i;const n=((i=e.value)==null?void 0:i.map(l=>l.value).join(", "))||"";return`${e.column} ${e.operator} ${n}`},Mi=e=>{let n=e.replace(/[_-]+/g," ");return n=n.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),n=n.toLowerCase().replace(/\b\w/g,i=>i.toUpperCase()),n},zT="_container_jl9vo_2",UT="_header_jl9vo_2",BT="_fields-container_jl9vo_2",qT="_field-label_jl9vo_2",HT="_actions_jl9vo_2",zs={container:zT,header:UT,fieldsContainer:BT,fieldLabel:qT,actions:HT},FT=({searchAll:e,table:n,datasourceId:i,filters:l,joins:s,orderBy:o,groupBy:u,columns:f,page:d=0,size:h=20})=>zn({queryKey:["explorer",i,n,d,h,l,s,o,u,f,e],queryFn:async()=>{const{data:m}=await at.post("/runner/select",{datasourceId:i,table:n,filters:l,joins:s,orderBy:o,page:d,size:h,columns:f,groupBy:u,searchAll:e});return m.data},retry:1,enabled:!!n&&!!i,keepPreviousData:!0,staleTime:0,cacheTime:0}),PT=(e,n,i)=>zn({queryKey:["entity",e,n,i],queryFn:async()=>{const l=i?i.map(([o,u])=>({column:o,operator:"=",value:[{value:u}],connector:"AND"})):[],{data:s}=await at.post("/runner/select",{datasourceId:e,table:n,filters:l,size:1,page:0});return s.data},retry:1,enabled:!!n&&!!e&&!!i,staleTime:0,cacheTime:0}),QT=()=>Wn({mutationFn:async e=>{const{data:n}=await at.post("/runner/update",e);return n.data}}),IT=()=>Wn({mutationFn:async e=>{const{data:n}=await at.post("/runner/insert",e);return n.data}}),Rp=e=>E.useMemo(()=>{var n,i,l;if(e)return e instanceof N4?(n=e.response)!=null&&n.data.error?e.response.data.error:(l=(i=e.response)==null?void 0:i.data)!=null&&l.message?e.response.data.message:e.message:e instanceof Error?e.message:"Undefined error"},[e]),VT=({data:e})=>{const[n,{change:i,touched:l}]=uo({}),{mutateAsync:s,error:o}=IT(),u=Rp(o),{data:f}=Oa(e.dataSourceId),[d,h]=E.useState(""),m=E.useMemo(()=>f==null?void 0:f.find(v=>v.tableName===e.table),[f,e.table]),g=E.useMemo(()=>{if(!m)return[];if(!d)return m.columns.map(w=>({...w,label:Mi(w.name)}));const v=d.toLowerCase();return m.columns.filter(w=>w.name.toLowerCase().includes(v)).map(w=>({...w,label:Mi(w.name)}))},[d,m]),x=()=>{const v=[];for(const w of l)v.push({value:n[w],column:w});s({datasourceId:e.dataSourceId,table:e.table,values:v}).then(MT)};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:zs.header,children:[b.jsxs("p",{className:"text-lg font-semibold",children:["Insert new row in ",b.jsx("span",{className:"underline",children:e.table})]}),u&&b.jsx(gn,{variant:"danger",children:b.jsx("p",{children:u})})]}),b.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:b.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),b.jsx("div",{className:zs.container,children:b.jsx("div",{className:zs.fieldsContainer,children:g.map(v=>b.jsxs("label",{className:zs.fieldLabel,children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs("p",{children:[v.isPrimary?"🔐":"🏷️"," ",v.label]}),b.jsxs("p",{className:"text-blue-800 text-sm",children:["[",v.name,": ",v.type,"]"]})]}),b.jsx("input",{className:"input w-full",value:pl(n[v.name]),onChange:i(v.name),placeholder:v.name})]},v.name))})}),b.jsxs("div",{className:zs.actions,children:[b.jsxs("label",{children:[b.jsx("span",{className:"mr-2",children:"🔎"}),b.jsx("input",{className:"input bg-white!",value:d,onChange:v=>h(v.target.value),placeholder:"Filter columns"})]}),b.jsx("span",{className:"flex-1"}),b.jsx("button",{disabled:!l.length,className:"button primary",onClick:x,children:"Run insert"})]})]})},$T=()=>{const e=DT(),[n,i]=E.useState(void 0);E.useEffect(()=>{e&&i(e)},[e]);const l=()=>Np(void 0);return b.jsxs(tn,{isVisible:e!=null,onClose:l,onClosed:()=>i(void 0),noPadding:!0,children:[b.jsx(er,{onClick:l}),n&&b.jsx(VT,{data:n})]})},[YT,Op]=Un(void 0),KT=()=>Op(void 0),GT="_container_5fnkl_2",XT="_header_5fnkl_2",ZT="_key_5fnkl_2",JT="_fields-container_5fnkl_2",WT="_field-label_5fnkl_2",ek="_actions_5fnkl_2",sa={container:GT,header:XT,key:ZT,fieldsContainer:JT,fieldLabel:WT,actions:ek},tk=({data:e})=>{const[n,{change:i,set:l,reset:s,touched:o}]=uo({}),[u,f]=E.useState(""),{data:d,isLoading:h}=PT(e.dataSourceId,e.tableName,e.entityId),{mutateAsync:m,error:g}=QT(),x=Rp(g),v=Da(sn.EDITOR),{data:w}=Oa(e.dataSourceId),{data:A}=Ac(e.dataSourceId),_=E.useMemo(()=>w==null?void 0:w.find(M=>M.tableName===e.tableName),[e.tableName,w]),k=E.useMemo(()=>{if(!_)return[];if(!u)return _.columns.map(D=>({...D,label:Mi(D.name)}));const M=u.toLowerCase();return _.columns.filter(D=>D.name.toLowerCase().includes(M)).map(D=>({...D,label:Mi(D.name)}))},[u,_]);E.useEffect(()=>{const M=d==null?void 0:d.rows[0];if(s(),M&&(d!=null&&d.columns))for(let D=0;D<d.columns.length;D++){const $=d.columns[D];l($.column,pl(M[D]))}},[d,l,s]);const O=()=>{const M=[];for(const D of o)M.push({value:n[D],column:D});m({datasourceId:e.dataSourceId,table:e.tableName,filters:e.entityId.map(D=>({value:[{value:D[1]}],column:D[0],connector:"AND",operator:"="})),values:M}).then(KT)},R=e.entityId.map(([M,D])=>`${M} = ${D}`).join(", ")||"",q=!(A!=null&&A.allowUpdate)||!v;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:sa.header,children:[b.jsxs("p",{className:"text-lg font-semibold",children:[q?"View":"Edit"," row in ",b.jsx("span",{className:"underline",children:e==null?void 0:e.tableName})]}),b.jsx("span",{className:sa.key,children:R}),x&&b.jsx(gn,{variant:"danger",children:b.jsx("p",{children:x})})]}),!q&&b.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:b.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),b.jsx("div",{className:sa.container,children:b.jsx("div",{className:sa.fieldsContainer,children:k.map(M=>b.jsxs("label",{className:sa.fieldLabel,children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs("p",{children:[M.isPrimary?"🔐":"🏷️"," ",M.label]}),b.jsxs("p",{className:"text-blue-800 text-sm",children:["[",M.name,": ",M.type,"]"]})]}),b.jsx("input",{disabled:M.isPrimary||h||q,className:"input w-full",value:pl(n[M.name]),onChange:i(M.name),placeholder:M.name})]},M.name))})}),b.jsxs("div",{className:sa.actions,children:[b.jsxs("label",{children:[b.jsx("span",{className:"mr-2",children:"🔎"}),b.jsx("input",{className:"input bg-white!",value:u,onChange:M=>f(M.target.value),placeholder:"Filter columns"})]}),b.jsx("span",{className:"flex-1"}),!q&&b.jsx("button",{disabled:!o.length,className:"button primary",onClick:O,children:"Run update"})]})]})},nk=()=>{const e=YT(),[n,i]=E.useState(void 0);E.useEffect(()=>{e&&i(e)},[e]);const l=()=>Op(void 0);return b.jsxs(tn,{isVisible:e!=null,onClose:l,onClosed:()=>i(void 0),noPadding:!0,children:[b.jsx(er,{onClick:l}),n&&b.jsx(tk,{data:n})]})},[rk,lh]=Un(void 0),rx=async e=>new Promise(n=>{lh({message:e,onCancel:()=>{n(!1),lh(void 0)},onConfirm:()=>{n(!0),lh(void 0)}})}),ik=({confirm:e})=>b.jsxs("div",{children:[b.jsx("p",{children:e.message}),b.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[b.jsx("button",{className:"button tertiary",onClick:e.onCancel,children:"Cancel"}),b.jsx("button",{className:"button primary",onClick:e.onConfirm,children:"Confirm"})]})]}),lk=()=>{const e=rk(),[n,i]=E.useState(void 0);return E.useEffect(()=>{e&&i(e)},[e]),b.jsx(tn,{isVisible:!!e,onClose:()=>e==null?void 0:e.onCancel(),onClosed:()=>i(void 0),children:n&&b.jsx(ik,{confirm:n})})},[ak,$u]=Un(void 0),Bi=async(e,n,i)=>new Promise(l=>{$u({message:e,defaultValue:n,alert:i,onCancel:()=>{$u(void 0),l(void 0)},onConfirm:s=>{$u(void 0),l(s)}})}),sk="_root_12mtw_1",ok={root:sk},uk=({data:e})=>{const[n,i]=E.useState("");E.useEffect(()=>{e.defaultValue&&i(e.defaultValue)},[e]);const l=o=>{i(o.target.value)},s=o=>{o.key==="Enter"&&(o.preventDefault(),e.onConfirm(n)),o.key==="Escape"&&(o.preventDefault(),e.onCancel())};return b.jsxs("div",{className:ok.root,children:[b.jsx("h2",{className:"text-xl font-semibold",children:e.message}),e.alert&&b.jsx(gn,{variant:e.alert.type,className:"mt-2",children:e.alert.message}),b.jsx("input",{autoFocus:!0,className:"w-full input my-2",value:n,onChange:l,onKeyDown:s}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx("button",{className:"button tertiary",onClick:e.onCancel,children:"Cancel"}),b.jsx("button",{className:"button primary",onClick:()=>e.onConfirm(n),children:"Confirm"})]})]})},ck=()=>{const e=ak(),[n,i]=E.useState(void 0);return E.useEffect(()=>{e&&i(e)},[e]),b.jsx(tn,{isVisible:!!e,onClose:()=>$u(void 0),onClosed:()=>i(void 0),children:n&&b.jsx(uk,{data:n})})},[fk,dk]=Un(void 0),ix=e=>{dk(e)},hk="_textarea_71ktt_2",pk={textarea:hk},mk=()=>{const e=fk(),n=()=>{e&&(navigator.clipboard.writeText(e.toString()),un.success("Copied!"))},i=()=>ix(void 0);return b.jsxs(tn,{isVisible:!!e,onClose:i,backdropClose:!0,children:[b.jsx("textarea",{className:pk.textarea,readOnly:!0,defaultValue:e==null?void 0:e.toString()}),b.jsxs("div",{className:"mt-2 flex gap-1 justify-end",children:[b.jsx("button",{className:"button primary",onClick:n,children:"Copy"}),b.jsx("button",{className:"button tertiary",onClick:i,children:"Close"})]})]})},yk="_tabs_d0uea_2",gk="_tab_d0uea_2",bk="_active_d0uea_2",vk="_close-button_d0uea_2",xk="_active-tab_d0uea_2",wk="_tooltip-label_d0uea_2",Sk="_tooltip-info-entry_d0uea_2",Ck="_mobile-button_d0uea_2",jn={tabs:yk,tab:gk,active:bk,closeButton:vk,activeTab:xk,tooltipLabel:wk,tooltipInfoEntry:Sk,mobileButton:Ck},Ek="_table_1lw0m_2",Ak="_semi-transparent_1lw0m_2",Tk="_table-loading_1lw0m_2",kk="_table-empty_1lw0m_2",_k="_table-row-cells_1lw0m_2",Nk="_header-cell_1lw0m_2",Rk="_header-actions_1lw0m_2",Ok="_cell_1lw0m_2",jk="_cell-actions_1lw0m_2",Dk="_table-config_1lw0m_2",Mk="_table-action_1lw0m_2",Lk="_blue_1lw0m_2",zk="_red_1lw0m_2",Uk="_options-container_1lw0m_2",Bk="_underlying-rows-btn_1lw0m_2",qk="_option-item_1lw0m_2",Fe={table:Ek,semiTransparent:Ak,tableLoading:Tk,tableEmpty:kk,tableRowCells:_k,headerCell:Nk,headerActions:Rk,cell:Ok,cellActions:jk,tableConfig:Dk,tableAction:Mk,blue:Lk,red:zk,optionsContainer:Uk,underlyingRowsBtn:Bk,optionItem:qk},ti=E.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),Rt=E.createContext({state:ga({}),setState:()=>{}}),ni=E.createContext({}),lx=()=>{const[e,n]=E.useState();return E.useMemo(()=>({show:!!e,position:e,open:l=>{l.preventDefault(),n({x:l.clientX-1,y:l.clientY-1})},close:()=>{n(void 0)}}),[e])},Hk=e=>{if(e==="ASC")return"DESC";if(e!=="DESC")return"ASC"},Fk=()=>{const{state:e,setState:n}=E.useContext(Rt),i=E.useCallback(l=>{n(s=>{const o=s.orderBy[0];if(o&&o.column===l){const u=Hk(o.direction);return u?{...s,orderBy:[{column:l,direction:u}]}:{...s,orderBy:[]}}return{...s,orderBy:[{column:l,direction:"ASC"}]}})},[n]);return{orderBy:e.orderBy,updateOrderBy:i}};function Pk(e,n){if(!e&&!n)return!0;if(!e||!n||e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==n[i])return!1;return!0}const ax=()=>{const{state:e,setState:n}=E.useContext(Rt),i=E.useCallback(s=>{n(o=>({...o,filters:[...o.filters,s]}))},[n]),l=E.useCallback(s=>{n(o=>({...o,filters:o.filters.filter(u=>!(s.column===u.column&&s.operator===u.operator&&Pk(s.value,u.value)))}))},[n]);return{filters:e.filters,addFilter:i,removeFilter:l}},Qk="_drop-container_neysc_2",Ik="_item_neysc_2",A1={dropContainer:Qk,item:Ik},$h=({dataSourceId:e,focusId:n,placeholder:i="Column",onChange:l,value:s,autoFocus:o,allowTables:u})=>{const{data:f}=Oa(e),d=E.useRef(null),h=E.useMemo(()=>{if(!f)return[];let k=f;return u&&(k=f.filter(O=>u.includes(O.tableName))),k.flatMap(O=>O.columns.map(R=>{const q=`${O.tableName}.${R.name}`;return{value:q,label:R.name,table:O.tableName,searchValue:q.toLowerCase()}}))},[f,u]),m=E.useMemo(()=>{const k=s.toLowerCase()||"",O=[];for(let R=0;R<h.length&&O.length<10;R++)h[R].searchValue.includes(k)&&O.push(h[R]);return O},[h,s]),[g,x]=E.useState(!1),[v,w]=E.useState(0),A=k=>{var O;if(k.key==="ArrowDown")k.preventDefault(),w(R=>(R+1)%m.length);else if(k.key==="ArrowUp")k.preventDefault(),w(R=>(R-1+m.length)%m.length);else if(k.key==="Enter"&&v>=0&&v<m.length){k.preventDefault();const R=m[v].value;x(!1);const q=h.findIndex(M=>M.value===R)>-1;l(((O=m[v])==null?void 0:O.value)||R,q,!0)}};E.useEffect(()=>{var O;const k=(O=d.current)==null?void 0:O.querySelector('[data-is-active="true"]');k&&k.scrollIntoView({behavior:"smooth",block:"nearest"})},[v]);const _=k=>{const O=k.currentTarget.value,R=h.findIndex(q=>q.value===O)>-1;l(O,R,!1)};return b.jsxs("div",{className:"relative",onFocus:()=>x(!0),onBlur:()=>x(!1),children:[b.jsx("input",{autoFocus:o,onKeyDown:A,value:s,onChange:_,className:Ae("input w-full"),placeholder:i,"data-focus":n}),g&&m.length>0&&b.jsx("div",{className:A1.dropContainer,ref:d,tabIndex:-1,children:m.map((k,O)=>b.jsxs("div",{className:A1.item,"data-is-active":v===O,onMouseDownCapture:R=>{R.preventDefault(),x(!1),l(k.value,!0,!0)},children:[b.jsx("span",{className:"text-xs font-semibold truncate",children:k.table}),b.jsx("p",{className:"truncate text-sm",children:k.label})]},O))})]})},Vk="_drop-container_5qe2d_2",$k="_item_5qe2d_2",T1={dropContainer:Vk,item:$k};function Yk(e){return Jv.includes(e)?BA:FA.includes(e)?UA:PA.includes(e)?qA:Ap}const Kk=({value:e,onChange:n,autoFocus:i,focusId:l,colType:s})=>{const o=E.useMemo(()=>{const x=e.toLowerCase()||"";return Yk(s||"").filter(v=>v.label.includes(x))},[e,s]),u=E.useRef(null),[f,d]=E.useState(!1),[h,m]=E.useState(0),g=x=>{var v;x.key==="ArrowDown"?(x.preventDefault(),m(w=>(w+1)%o.length)):x.key==="ArrowUp"?(x.preventDefault(),m(w=>(w-1+o.length)%o.length)):x.key==="Enter"&&(h>=0&&h<o.length?(x.preventDefault(),d(!1),n(((v=o[h])==null?void 0:v.label)||"",!0)):n(e,!0))};return E.useEffect(()=>{var v;const x=(v=u.current)==null?void 0:v.querySelector('[data-is-active="true"]');x&&x.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),b.jsxs("div",{className:"relative",children:[b.jsx("input",{onKeyDown:g,value:e,onChange:x=>n(x.target.value,!1),className:Ae("input w-full"),placeholder:"Operator",autoFocus:i,onFocus:()=>d(!0),onBlur:()=>d(!1),"data-focus":l}),f&&o.length>0&&b.jsx("ul",{className:T1.dropContainer,ref:u,tabIndex:-1,children:o.map((x,v)=>b.jsx("li",{className:T1.item,"data-is-active":h===v,onMouseDownCapture:w=>{w.preventDefault(),d(!1),n(x.label,!0)},children:x.label},v))})]})},Gk="_form-container_1kvss_2",Xk={formContainer:Gk},Zk=e=>e instanceof HTMLElement,Jk=()=>{const e=E.useRef(null),n=E.useCallback((i,l=30)=>{setTimeout(()=>{var o;const s=(o=e.current)==null?void 0:o.querySelector(`[data-focus="${i}"]`);Zk(s)&&s.focus()},l)},[]);return{containerRef:e,focus:n}},sx=({onClose:e,selectColumn:n="",selectedOperation:i="",focusOn:l})=>{const{addFilter:s}=ax(),{state:o}=E.useContext(Rt),{data:u}=Oa(o.dataSourceId),f=E.useMemo(()=>[o.table,...o.joins.map($=>$.table)],[o.table,o.joins]),[d,h]=E.useState({column:n,operator:i,value:"",isMatched:!1}),[m,g]=E.useState(!1),{containerRef:x,focus:v}=Jk(),w=E.useMemo(()=>{if(!u)return"";let $=null;for(const ee of u)for(const ie of ee.columns)ee.tableName+"."+ie.name===d.column&&($=ie);return $!=null&&$.type?$.type:""},[d.column,u]);E.useEffect(()=>{l&&v(l)},[v,l]);const A=$=>{const ee=$||d,[ie]=ee.column.split("."),z=w1[ee.operator];if(!ee.column.includes(".")||!ie){un.error("Invalid column value: "+ee.column);return}if(!z){un.error("Invalid operator: "+ee.operator);return}s({connector:"AND",operator:z,column:ee.column,value:ee.isMatched?[{value:ee.value,isColumn:ee.isMatched}]:HA(z,ee.value)}),e()},_=$=>{$.key==="Enter"&&A()},k=($,ee,ie)=>{h(z=>({...z,column:$,operator:""})),ie&&v("operator")},O=($,ee)=>{h(ie=>({...ie,operator:$})),g(!1),ee&&v("value")},R=($,ee,ie)=>{ie?A({...d,value:$,isMatched:ee}):h(z=>({...z,value:$,isMatched:ee}))},q=$=>{g($.target.checked),$.target.checked||h(ee=>({...ee,isMatched:!1})),v("value")},M=d.operator.includes("list"),D=d.operator.includes("equal");return b.jsxs(tn,{isVisible:!0,onClose:e,backdropClose:!0,portal:!0,children:[b.jsx(er,{onClick:e}),b.jsx("h2",{className:"text-lg font-semibold",children:"Filter"}),b.jsxs("div",{className:Xk.formContainer,ref:x,children:[b.jsxs("label",{className:"z-3 w-full",children:[b.jsx("p",{className:"font-semibold text-xs",children:"Column"}),b.jsx($h,{dataSourceId:o.dataSourceId,onChange:k,value:d.column,allowTables:f,focusId:"column"})]}),b.jsxs("label",{className:"z-2 w-full",children:[b.jsxs("p",{className:"font-semibold text-xs",children:["Operator ",b.jsxs("span",{className:"text-sm text-blue-800",children:["[for ",w,"]"]})]}),b.jsx(Kk,{onChange:O,focusId:"operator",colType:w,value:d.operator})]}),Zv(w1[d.operator])&&b.jsxs("label",{className:"z-1 w-full",children:[b.jsx("p",{className:"font-semibold text-xs",children:"Value"}),M||!m||!D?b.jsx("input",{className:"input w-full",placeholder:"Filter value",value:d.value,onKeyPress:_,onChange:$=>R($.currentTarget.value,!1,!1),"data-focus":"value"}):b.jsx($h,{dataSourceId:o.dataSourceId,onChange:R,value:d.value,allowTables:f,focusId:"value",placeholder:"Insert value or column"})]}),D&&b.jsxs("label",{className:"w-full flex items-center gap-2",children:[b.jsx("input",{type:"checkbox",checked:m,onChange:q}),b.jsx("span",{children:"Value is another column"})]})]}),b.jsx("div",{className:"flex justify-end gap-2 items-center mt-2",children:b.jsx("button",{className:"button primary",onClick:()=>A(),children:"Apply filter"})})]})};function Wk(e){var i;const n=(i=e.target)==null?void 0:i.dataset;if(n){if(n.copyCol&&n.copyRow)return{col:parseInt(n.copyCol),row:parseInt(n.copyRow),action:"copy"};if(n.showCol&&n.showRow)return{col:parseInt(n.showCol),row:parseInt(n.showRow),action:"show"};if(n.filterCol&&n.filterRow)return{col:parseInt(n.filterCol),row:parseInt(n.filterRow),action:"filter"}}}function ah(e,n,i){var o,u,f;const l=(u=(o=e==null?void 0:e.rows)==null?void 0:o[n])==null?void 0:u[i],s=(f=e==null?void 0:e.columns)==null?void 0:f[i];return{value:l,column:s}}const e_=()=>{const{data:e}=E.useContext(ni),{getColumnType:n}=E.useContext(ti),{setState:i}=E.useContext(Rt),l=f=>{const{value:d,column:h}=ah(e,f.row,f.col);if(h){const m=pl(d,n(h.full));navigator.clipboard.writeText(m),un.success("Copied!")}},s=f=>{const{value:d,column:h}=ah(e,f.row,f.col);if(h){const m=pl(d,n(h.full));ix(m)}},o=f=>{const{value:d,column:h}=ah(e,f.row,f.col);let m=(h==null?void 0:h.full)||"",g;if((h==null?void 0:h.table)===""){un.error("Filtering on aggregated column is not supported yet");return}if(m){let x;if(d==null)x={column:m,connector:"AND",operator:"IS NULL"};else{const v=pl(d,n(m));x={column:m,connector:"AND",operator:"=",fn:g,value:[{value:v}]}}i(v=>({...v,filters:[...v.filters,x]})),un.success(`Added new filter on column ${h==null?void 0:h.alias}`)}};return f=>{const d=Wk(f);d&&(d.action==="copy"?l(d):d.action==="show"?s(d):d.action==="filter"&&o(d))}},[t_,jp]=Un(void 0),k1=(e,n)=>{jp({label:e,type:"explorer",id:Date.now().toString(36),options:ga(n)})},Yh=()=>jp(void 0),n_="_container_uzc2v_2",r_="_content_uzc2v_2",i_="_backdrop_uzc2v_2",sh={container:n_,content:r_,backdrop:i_},ox=({children:e,handler:n})=>{const i=E.useRef(n.close);i.current=n.close;const l=E.useMemo(()=>{if(!n.position)return;const s={};if(typeof window<"u"){const o=n.position.y>window.innerHeight/2,u=n.position.x>window.innerWidth/2;o?s.bottom=window.innerHeight-n.position.y:s.top=n.position.y,u?s.right=window.innerWidth-n.position.x:s.left=n.position.x}return s},[n]);return E.useEffect(()=>{const s=o=>{o.code==="Escape"&&i.current()};return window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}},[]),l?b.jsxs("div",{className:sh.container,children:[b.jsx("div",{className:sh.backdrop,onClick:s=>{s.stopPropagation(),s.preventDefault(),n.close()}}),b.jsx("div",{className:sh.content,style:l,children:e})]}):null},l_="_table_bgjgk_2",a_="_root_bgjgk_2",s_="_content_bgjgk_2",o_="_sub_bgjgk_2",Ru={table:l_,root:a_,content:s_,sub:o_},ux=({hook:e,onClick:n})=>b.jsxs("button",{className:Ru.root,onClick:n,title:e.where,children:[b.jsx("span",{children:"📄"}),b.jsxs("div",{className:Ru.content,children:[b.jsxs("p",{className:Ru.table,children:[" ",e.on.toTable]}),b.jsxs("span",{className:Ru.sub,children:[e.on.toColumn," = ",e.on.fromTable,".",e.on.fromColumn]})]})]},e.where),u_=({handler:e,rowIndex:n})=>{const{hooks:i,entities:l,dataSourceId:s,getEntityKey:o,getValue:u}=E.useContext(ti),{state:f}=E.useContext(Rt),{data:d}=E.useContext(ni),[h,m]=E.useState(""),[g,x]=E.useState(""),v=E.useMemo(()=>d==null?void 0:d.rows[n],[d,n]),w=()=>{v&&(k1("⬇️ "+f.table,{joins:f.joins,table:f.table,dataSourceId:f.dataSourceId,filters:[...f.filters,...f.groupBy.map(q=>({connector:"AND",column:q.value,operator:"=",value:[{value:u(v,q)}]}))]}),e.close())},A=q=>{if(!v)return;const M=u(v,{value:`${q.on.fromTable}.${q.on.fromColumn}`});k1(`${q.on.toColumn} equals ${M}`,{table:q.on.toTable,dataSourceId:s,filters:[{column:q.on.toTable+"."+q.on.toColumn,operator:M==null?"IS NULL":"=",connector:"AND",value:M!=null?[{value:M,isColumn:!1}]:void 0}]}),e.close()},_=q=>{if(!v)return;const M=o(q,v);e.close(),Op({tableName:q,dataSourceId:s,entityId:M}),e.close()},k=E.useMemo(()=>h?l.filter(q=>q.includes(h)):l,[l,h]),O=E.useMemo(()=>{if(!d)return[];const q=g.toLowerCase();return i.filter(M=>d.columns.some($=>$.column===M.on.fromColumn&&$.table===M.on.fromTable)?M.on.toTable.toLowerCase().includes(q):!1)},[g,i,d]),R=f.groupBy.length>0;return b.jsxs(ox,{handler:e,children:[l.length>0&&b.jsxs("div",{className:Fe.optionsContainer,children:[b.jsxs("label",{className:"flex justify-between items-center gap-2 sticky left-0 top-0 input",children:[b.jsx("span",{className:"font-semibold",children:"📝"}),b.jsx("input",{className:"flex-1 outline-0",placeholder:"Edit/View row",value:h,onChange:q=>m(q.target.value)})]}),b.jsx("div",{className:"flex flex-col",children:Nc(k.length,0)?k.map(q=>b.jsx("button",{className:Ae(Fe.optionItem,"font-semibold"),onClick:()=>_(q),children:b.jsxs("span",{children:["📄 ",q]})},q)):b.jsx("p",{className:"text-center text-gray-800",children:"Empty"})})]}),i.length>0&&b.jsxs("div",{className:Fe.optionsContainer,children:[b.jsxs("label",{className:"flex justify-between items-center gap-2 sticky left-0 top-0 p-1 input",children:[b.jsx("span",{className:"font-semibold",children:"↗️"}),b.jsx("input",{className:"flex-1 outline-0",placeholder:"Connected tables",value:g,onChange:q=>x(q.target.value)})]}),b.jsx("div",{className:"flex flex-col",children:O.length>0?O.map(q=>b.jsx(ux,{hook:q,onClick:()=>A(q)},q.where)):b.jsx("p",{className:"text-center text-gray-800",children:"Empty"})})]}),R&&b.jsx("button",{onClick:w,className:Fe.underlyingRowsBtn,children:"🎯 Underlying rows"})]})},c_={ASC:"⬆️",DESC:"⬇️"};function f_(e,n){const i=n(e.full);return i&&Jv.includes(i)?Is.LIKE:Is["="]}const d_=()=>{const{data:e}=E.useContext(ni),{getColumnType:n}=E.useContext(ti),{orderBy:i,updateOrderBy:l}=Fk(),s=(e==null?void 0:e.columns)||[],o=i[0],[u,f]=E.useState();return b.jsxs("thead",{children:[b.jsx("tr",{children:s.map(d=>b.jsxs("td",{className:Fe.headerCell,children:[b.jsxs("div",{className:"overflow-hidden",children:[b.jsx("p",{className:"text-xs truncate",children:d.table||"-"}),b.jsx("p",{className:"text-sm font-bold truncate",children:d.alias})]}),b.jsxs("div",{className:Fe.headerActions,children:[d.table&&b.jsx("button",{onClick:()=>{f(d)},children:"🔎"}),b.jsx("button",{onClick:()=>l(d.full),children:(o==null?void 0:o.column)===d.full?c_[o.direction]:"↕️"})]})]},d.full))}),u&&b.jsx(sx,{selectColumn:u.full,selectedOperation:f_(u,n),focusOn:"value",onClose:()=>f(void 0)})]})};function h_({value:e,row:n,col:i}){if(e==="")return b.jsx("span",{className:"pointer-events-none text-black/30 truncate",children:"<EMPTY STRING>"});if(e==null)return b.jsx("span",{className:"pointer-events-none text-black/30",children:"<NULL>"});const l=pl(e);return b.jsxs(b.Fragment,{children:[b.jsx("span",{"data-row":n,className:"truncate block pointer-events-none",children:l}),b.jsxs("div",{className:Fe.cellActions,children:[b.jsx("button",{"data-copy-col":i,"data-copy-row":n,children:"📋"}),b.jsx("button",{"data-show-col":i,"data-show-row":n,children:"👀"}),b.jsx("button",{"data-filter-col":i,"data-filter-row":n,children:"🔎"})]})]})}const p_=E.memo(({row:e,isLastRow:n,index:i})=>b.jsx("tr",{className:Ae(Fe.tableRowCells,n&&"rounded-b-lg"),children:e.map((l,s)=>b.jsx("td",{className:Fe.cell,"data-row":i,children:b.jsx(h_,{value:l,col:s,row:i})},s))})),m_=()=>{var m,g;const{data:e,error:n,isLoading:i,isFetching:l}=E.useContext(ni),s=Rp(n),o=e_(),u=lx(),[f,d]=E.useState(void 0),h=x=>{var A;const v=(A=x.target)==null?void 0:A.dataset,w=v==null?void 0:v.row;w!=null&&(d(parseInt(w)),u.open(x))};return b.jsxs(b.Fragment,{children:[f!=null&&u.show&&b.jsx(u_,{handler:u,rowIndex:f}),s&&b.jsx(gn,{className:"my-4",variant:"danger",children:s}),i&&b.jsx("div",{className:Fe.tableLoading,children:"Loading data"}),e&&b.jsxs("table",{className:Ae(Fe.table,l&&Fe.semiTransparent),onContextMenu:h,onClick:o,children:[b.jsx(d_,{}),b.jsxs("tbody",{children:[((m=e.rows)==null?void 0:m.length)<1&&b.jsx("tr",{className:Fe.tableEmpty,children:b.jsx("td",{colSpan:e.columns.length,children:"No data"})}),(g=e.rows)==null?void 0:g.map((x,v)=>b.jsx(p_,{index:v,row:x,isLastRow:v===e.rows.length-1},v))]})]})]})},y_="_root_ey5qy_2",g_="_root-show_ey5qy_2",b_="_content-desktop_ey5qy_2",v_="_content-mobile_ey5qy_2",x_="_card_ey5qy_2",w_="_cards-list_ey5qy_2",S_="_sub-text_ey5qy_2",C_="_text_ey5qy_2",E_="_section-title_ey5qy_2",A_="_sidebar-action_ey5qy_2",T_="_sidebar-add-action_ey5qy_2",k_="_join-modal_ey5qy_2",__="_section-container_ey5qy_2",N_="_close-button_ey5qy_2",R_="_expand_ey5qy_2",O_="_section-open-btn_ey5qy_2",j_="_show_ey5qy_2",me={root:y_,rootShow:g_,contentDesktop:b_,contentMobile:v_,card:x_,cardsList:w_,subText:S_,text:C_,sectionTitle:E_,sidebarAction:A_,sidebarAddAction:T_,joinModal:k_,sectionContainer:__,closeButton:N_,expand:R_,sectionOpenBtn:O_,show:j_},D_="_container_4tqb8_2",M_="_column-label_4tqb8_2",L_="_not-active_4tqb8_2",Yu={container:D_,columnLabel:M_,notActive:L_};function z_(e){return e.reduce((n,i)=>(n[i]=!0,n),{})}function U_(e){if(!e)return[];const n={};return e.forEach(i=>{n[i.table]?n[i.table].push({value:i.full,label:Mi(i.column),type:i.type}):n[i.table]=[{value:i.full,label:Mi(i.column),type:i.type}],QA[i.type]&&["YEAR","MONTH","DAY"].forEach(l=>{n[i.table].push({value:l+" "+i.full,label:l+" "+Mi(i.column),type:"number",nested:!0})})}),Object.entries(n).reduce((i,[l,s])=>(i.push({name:Mi(l),columns:s}),i),[])}function B_(e,n){const i=n.toLowerCase();return e.map(l=>{const s=l.columns.filter(o=>o.label.toLowerCase().includes(i)||o.value.toLowerCase().includes(i));return{...l,columns:s}}).filter(l=>l.columns.length>0)}const q_=({column:e,selected:n,onCheck:i})=>b.jsxs("label",{className:Ae(Yu.columnLabel,n?Yu.active:Yu.notActive,e.nested&&"pl-5!"),children:[b.jsx("input",{type:"checkbox",checked:n[e.value],name:e.value,onChange:i}),b.jsxs("p",{className:"flex justify-between w-full",children:[b.jsx("span",{"data-tooltip-content":e.value,"data-tooltip-id":"default",children:e.label}),b.jsx("span",{className:"text-blue-600",children:e.type})]})]},e.value),cx=({onCancel:e,mode:n})=>{const{allColumns:i}=E.useContext(ti),{state:l,setState:s}=E.useContext(Rt),[o,u]=E.useState(()=>z_(l[n].map(A=>A.fn?A.fn+" "+A.value:A.value))),[f,d]=E.useState(""),h=E.useMemo(()=>U_(i),[i]),m=E.useMemo(()=>f?B_(h,f):h,[f,h]),g=A=>{u(_=>({..._,[A.target.name]:A.target.checked}))},x=A=>{const _=A.target.checked;u(k=>{for(const O of i)k[O.full]=_;return{...k}})},v=()=>{const A=[];for(const[_,k]of Object.entries(o))if(k){const[O,R]=_.split(" ");A.push({value:R||O,fn:R?O:void 0})}s(_=>({..._,[n]:A})),e()},w=E.useMemo(()=>{for(const A of i)if(!o[A.full])return!1;return!0},[o,i]);return b.jsxs(tn,{isVisible:!0,onClose:e,portal:!0,children:[b.jsx(er,{onClick:e}),b.jsxs("div",{className:Yu.container,children:[b.jsx("h2",{className:"text-lg font-semibold",children:n==="groupBy"?"Group by":"Show columns"}),b.jsx("input",{autoFocus:!0,className:"input my-2",placeholder:"Filter",value:f,onChange:A=>d(A.target.value)}),b.jsx("div",{className:"overflow-y-auto",children:m.map(A=>b.jsxs("div",{className:"my-2",children:[b.jsxs("p",{className:"font-semibold sticky top-0 bg-white p-1 z-1",children:["📄 ",A.name]}),A.columns.map(_=>b.jsx(q_,{column:_,selected:o,onCheck:g},_.value))]},A.name))}),b.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[b.jsxs("label",{className:"button tertiary flex gap-2 items-center",children:[b.jsx("input",{type:"checkbox",checked:w,onChange:x}),b.jsx("span",{children:"Select all"})]}),b.jsx("span",{className:"flex-1"}),b.jsx("button",{className:"button tertiary",onClick:e,children:"Cancel"}),b.jsx("button",{className:"button primary",onClick:v,children:"Apply"})]})]})]})},H_="_options-container_1nmdu_2",F_={optionsContainer:H_},oh="COUNT all",P_=({onClose:e})=>{const{dataSourceId:n}=E.useContext(ti),{setState:i}=E.useContext(Rt),{data:l}=E.useContext(ni),[s,o]=E.useState({fn:"",col:""}),u=g=>o({...s,fn:g.currentTarget.value}),f=g=>o({...s,col:g}),d=()=>{const g=s.fn===oh?{value:"*",fn:"COUNT"}:{fn:s.fn,value:s.col,distinct:s.fn==="COUNT"};i(x=>({...x,aggregations:[...x.aggregations,g]})),e()},h=s.fn===oh,m=h?!1:!s.col||!s.fn;return b.jsxs(tn,{isVisible:!0,onClose:e,backdropClose:!0,portal:!0,children:[b.jsx(er,{onClick:e}),b.jsxs("div",{children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),b.jsxs("div",{className:F_.optionsContainer,children:[b.jsxs("label",{className:Ae(h&&"col-span-2"),children:[b.jsx("p",{className:"font-semibold text-xs",children:"Function"}),b.jsxs("select",{className:"input w-full",value:s.fn,onChange:u,autoFocus:!0,children:[b.jsx("option",{value:"",disabled:!0,children:"Select function"}),b.jsx("option",{value:oh,children:"Count all rows"}),b.jsx("option",{value:"COUNT",children:"Count"}),b.jsx("option",{value:"SUM",children:"Sum"}),b.jsx("option",{value:"MAX",children:"Max"}),b.jsx("option",{value:"MIN",children:"Min"}),b.jsx("option",{value:"AVG",children:"Avg"})]})]}),!h&&b.jsxs("label",{children:[b.jsx("p",{className:"font-semibold text-xs",children:"Column"}),b.jsx($h,{dataSourceId:n,allowTables:(l==null?void 0:l.tables)||[],onChange:f,value:s.col})]}),b.jsx("button",{className:"button primary",disabled:m,onClick:d,children:"Add"})]})]})]})},Q_=(e,n)=>e.type!==n.type||e.on!==n.on||e.table!==n.table,I_=(e,n)=>e.type===n.type&&e.on===n.on&&e.table===n.table,V_=()=>{const{state:e,setState:n}=E.useContext(Rt),i=E.useCallback(l=>{n(s=>{const o=s.joins;if(o.some(f=>I_(f,l))){const f=l.table+".";return{...s,joins:o.filter(d=>Q_(d,l)),columns:s.columns.filter(d=>!d.value.startsWith(f)),groupBy:s.groupBy.filter(d=>!d.value.startsWith(f)),orderBy:s.orderBy.filter(d=>!d.column.startsWith(f)),aggregations:s.aggregations.filter(d=>!d.value.startsWith(f)),filters:s.filters.filter(d=>!d.column.startsWith(f))}}return{...s,joins:[...o,l]}})},[n]);return{joins:e.joins,toggle:i}},fx=()=>Wn({mutationFn:async e=>{const{data:n}=await at.post("/queries",e);return n.data},onSuccess:()=>{mt.invalidateQueries(["queries"]),oo()}}),$_=()=>Wn({mutationFn:async({id:e,payload:n})=>{const{data:i}=await at.patch("/queries/"+e,n);return i.data},onSuccess:e=>{mt.invalidateQueries(["query",e.id]),oo(),AA(),e.isTrash}});function dx(e,n){const i={};return Object.entries(e).forEach(([l,s])=>{n.includes(l)||(i[l]=s)}),i}const hx=e=>E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...e},E.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M184 112l144 144-144 144"})),da=new Map,Y_=e=>{const n=[];return e.ctrlKey&&n.push("CTRL"),e.altKey&&n.push("ALT"),e.shiftKey&&n.push("SHIFT"),e.metaKey&&n.push("META"),n.push(e.key.toLowerCase()),n.join("+")},K_=e=>{var l,s,o;const n=(s=(l=e.target)==null?void 0:l.tagName)==null?void 0:s.toLowerCase();if(e.ctrlKey||e.altKey||e.metaKey||["input","textarea","select"].includes(n)||(o=e.target)!=null&&o.isContentEditable)return;const i=da.get(Y_(e));i&&i.length>0&&i[i.length-1].callback()},G_=(e,n,i="")=>{const l=e.toLowerCase(),s=da.get(e);return s?da.set(e,[...s,{callback:n,label:i}]):da.set(l,[{callback:n,label:i}]),()=>{const o=e.toLowerCase(),u=da.get(o);u&&da.set(o,u.filter(f=>f.callback!==n))}};window.addEventListener("keyup",K_);function Sr(e,n,i){const l=E.useRef({callback:n,label:i});l.current.callback=n,E.useEffect(()=>G_(e,()=>{l.current.callback()},l.current.label),[e])}const X_=()=>{const e=_p("Hotkey"),n=Tr(),i=Ln(),{data:l}=kr();Sr("n",()=>{l&&e()},"📖 New query"),Sr("w",()=>{if(!l)return;_c.get().length<1?e():i.pathname!==pt.workbench.path&&n(pt.workbench.path)},"🛠️ Open Workbench"),Sr("h",()=>{i.pathname!==pt.home.path&&n(pt.home.path)},"🏠 Go home")},co={tablet:"(min-width: 640px)",laptop:"(min-width: 1024px)"},Z_=()=>window.matchMedia(co.laptop).matches,[J_,W_]=Un(Z_()),Ku=()=>W_(e=>!e),_1=e=>window.matchMedia(e).matches;function Rc(e,{defaultValue:n=!1,initializeWithValue:i=!0}={}){const[l,s]=E.useState(()=>i?_1(e):n);return E.useLayoutEffect(()=>{const o=window.matchMedia(e);function u(){s(()=>_1(e))}return u(),o.addListener?o.addListener(u):o.addEventListener("change",u),()=>{o.removeListener?o.removeListener(u):o.removeEventListener("change",u)}},[e]),l}const eN="_sidebar_1na7z_2",tN="_sidebar-visible_1na7z_2",nN="_sidebar-container_1na7z_2",rN="_sidebar-invisible_1na7z_2",iN="_backdrop_1na7z_2",Us={sidebar:eN,sidebarVisible:tN,sidebarContainer:nN,sidebarInvisible:rN,backdrop:iN},px=({children:e,backdropClose:n,isVisible:i,onClose:l,onClosed:s,contentClassName:o})=>{const[u,f]=E.useState(!1),d=()=>{n&&l()},h=m=>{i||getComputedStyle(m.currentTarget).opacity==="0"&&(f(!1),s&&s())};return E.useEffect(()=>{i&&f(!0)},[i]),b.jsxs("div",{onTransitionEnd:h,className:Ae(Us.sidebar,i?Us.sidebarVisible:Us.sidebarInvisible),children:[b.jsx("div",{onClick:d,className:Us.backdrop}),b.jsx("div",{className:Ae(Us.sidebarContainer,o),children:u&&e})]})},lN=()=>{const e=J_(),n=Rc(co.laptop);return Sr("o",Ku),n?b.jsxs("div",{className:Ae(me.root,e&&me.rootShow),children:[b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Customize query [Hotkey O]",className:me.expand,onClick:Ku,children:"⚙️"}),b.jsxs("div",{className:me.contentDesktop,children:[b.jsx(R1,{}),b.jsx(N1,{}),b.jsx(z1,{}),b.jsx(L1,{}),b.jsx(M1,{}),b.jsx(j1,{}),b.jsx(D1,{}),b.jsx(O1,{})]})]}):b.jsx(px,{isVisible:e,onClose:Ku,backdropClose:!0,children:b.jsxs("div",{className:me.contentMobile,children:[b.jsx(R1,{}),b.jsx(N1,{}),b.jsx(z1,{}),b.jsx(L1,{}),b.jsx(M1,{}),b.jsx(j1,{}),b.jsx(D1,{}),b.jsx(O1,{})]})})};function fo({onShow:e,show:n,title:i,items:l}){return b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("p",{className:me.sectionTitle,children:i}),l>0&&b.jsxs("button",{className:Ae(me.sectionOpenBtn,n&&me.show),onClick:e,children:[b.jsx("span",{children:l}),b.jsx(hx,{width:16,height:16})]})]})}function N1(){const{state:e}=E.useContext(Rt),{name:n,tabId:i}=E.useContext(ti),{data:l}=E.useContext(ni),s=fx(),o=Da(sn.EDITOR),u=()=>{i&&Bi("New tab name",n).then(h=>{h&&kp(i,h)})},f=()=>{l!=null&&l.query&&(navigator.clipboard.writeText(l==null?void 0:l.query),un.success("Query copied to clipboard"))},d=async()=>{const h=dx(e,["size","page"]),m=await Bi("Query name",n);m&&s.mutate({name:m,dataSourceId:e.dataSourceId,opts:h})};return b.jsxs("div",{className:"grid lg:grid-cols-3 gap-1 px-2 mb-4",children:[b.jsx("button",{className:me.sidebarAction,onClick:u,children:b.jsx("span",{children:"✏️ Rename tab"})}),b.jsx("button",{className:me.sidebarAction,onClick:f,children:b.jsx("span",{children:"🖋️ Copy SQL"})}),o&&b.jsx("button",{className:me.sidebarAction,onClick:d,children:b.jsx("span",{children:"💾 Save"})})]})}function R1(){const{state:e}=E.useContext(Rt),{data:n}=Ac(e.dataSourceId);return b.jsxs("div",{className:me.sectionContainer,children:[b.jsx("div",{className:me.card,children:b.jsxs("div",{children:[b.jsx("p",{className:me.subText,children:"📄 Table"}),b.jsx("p",{className:Ae(me.text,"text-blue-600"),children:e.table})]})}),b.jsx("div",{className:Ae(me.card,"mt-2"),children:b.jsxs("div",{children:[b.jsx("p",{className:me.subText,children:"📦 Data source"}),b.jsx("p",{className:Ae(me.text,"text-blue-600"),children:n==null?void 0:n.name})]})})]})}function O1(){const{state:e,setState:n}=E.useContext(Rt),[i,l]=E.useState(!1),[s,o]=E.useState(!0),u=f=>{n(d=>({...d,groupBy:d.groupBy.filter(h=>zi(h)!==f)}))};return Sr("g",()=>{l(f=>!f)},"Group by"),b.jsxs("div",{className:me.sectionContainer,children:[b.jsx(fo,{title:"📚 Group by",show:s,onShow:()=>o(!s),items:e.groupBy.length}),s&&e.groupBy.length>0&&b.jsx("div",{className:me.cardsList,children:e.groupBy.map(f=>b.jsxs("div",{className:me.card,children:[b.jsx("span",{className:me.text,children:zi(f)}),b.jsx("button",{className:me.closeButton,onClick:()=>u(zi(f)),children:b.jsx(Fi,{width:20,height:20})})]}))}),b.jsxs("button",{className:me.sidebarAddAction,onClick:()=>l(!0),children:[b.jsx("span",{className:"hotkey",children:"G"}),b.jsx("span",{children:"Add group by"})]}),i&&b.jsx(cx,{mode:"groupBy",onCancel:()=>l(!1)})]})}function j1(){const{state:e,setState:n}=E.useContext(Rt),[i,l]=E.useState(!1),[s,o]=E.useState(!1),u=d=>{n(h=>({...h,columns:h.columns.filter(m=>zi(m)!==d)}))},f=e.aggregations.length>0||e.groupBy.length>0;return Sr("c",()=>{f?un.error("Columns are ignored when there is at least one aggregation or group by"):l(d=>!d)},"Show/hide columns"),b.jsxs("div",{className:me.sectionContainer,children:[b.jsx(fo,{title:"👀 Columns",show:s,onShow:()=>o(!s),items:f?0:e.columns.length}),f&&b.jsx(gn,{variant:"warning",className:"border border-yellow-800 my-2",children:b.jsx("span",{className:me.text,children:"Columns are ignored when there is at least one aggregation or group by"})}),!f&&s&&e.columns.length>0&&b.jsx("div",{className:me.cardsList,children:e.columns.map(d=>b.jsxs("div",{className:me.card,children:[b.jsx("span",{className:me.text,children:zi(d)}),b.jsx("button",{className:me.closeButton,onClick:()=>u(zi(d)),children:b.jsx(Fi,{width:20,height:20})})]}))}),!f&&b.jsxs("button",{className:me.sidebarAddAction,onClick:()=>l(!0),children:[b.jsx("span",{className:"hotkey",children:"C"}),b.jsx("span",{children:"Show/Hide columns"})]}),i&&b.jsx(cx,{mode:"columns",onCancel:()=>l(!1)})]})}function D1(){const{state:e,setState:n}=E.useContext(Rt),[i,l]=E.useState(!1),[s,o]=E.useState(!0),u=f=>{const d=zi(f);n(h=>({...h,aggregations:h.aggregations.filter(m=>m.fn!==f.fn||m.value!==f.value),orderBy:h.orderBy.filter(m=>m.column!==d)}))};return Sr("a",()=>{l(f=>!f)},"Aggregate data"),b.jsxs("div",{className:me.sectionContainer,children:[b.jsx(fo,{title:"🔢 Aggregations",show:s,onShow:()=>o(!s),items:e.aggregations.length}),s&&e.aggregations.length>0&&b.jsx("div",{className:me.cardsList,children:e.aggregations.map(f=>b.jsxs("div",{className:me.card,children:[b.jsxs("span",{className:me.text,children:[f.fn," ",f.value]}),b.jsx("button",{className:me.closeButton,onClick:()=>u(f),children:b.jsx(Fi,{width:20,height:20})})]}))}),b.jsxs("button",{className:me.sidebarAddAction,onClick:()=>l(!0),children:[b.jsx("span",{className:"hotkey",children:"A"}),b.jsx("span",{children:"Aggregate data"})]}),i&&b.jsx(P_,{onClose:()=>l(!1)})]})}const aN=e=>(e==null?void 0:e.map(n=>n.value).join(", "))||"";function M1(){const{state:e}=E.useContext(Rt),{removeFilter:n}=ax(),[i,l]=E.useState(!1),[s,o]=E.useState(!0);return Sr("f",()=>{l(u=>!u)},"Add new filter"),b.jsxs("div",{className:me.sectionContainer,children:[b.jsx(fo,{title:"🎚️ Filters",show:s,onShow:()=>o(!s),items:e.filters.length}),s&&e.filters.length>0&&b.jsx("div",{className:me.cardsList,children:e.filters.map((u,f)=>b.jsxs("div",{className:me.card,children:[b.jsxs("div",{className:"overflow-hidden",children:[b.jsx("p",{className:Ae(me.subText,"truncate"),children:u.column}),b.jsxs("p",{className:Ae(me.text,"truncate"),children:[Is[u.operator]," ",aN(u.value)]})]}),b.jsx("button",{className:me.closeButton,onClick:()=>n(u),children:b.jsx(Fi,{width:20,height:20})})]},f))}),b.jsxs("button",{className:me.sidebarAddAction,onClick:()=>l(!0),children:[b.jsx("span",{className:"hotkey",children:"F"}),b.jsx("span",{children:"Add filter"})]}),i&&b.jsx(sx,{onClose:()=>l(!1),focusOn:"column"})]})}function L1(){const{toggle:e}=V_(),{availableJoins:n}=E.useContext(ti),{state:i}=E.useContext(Rt),[l,s]=E.useState(""),[o,u]=E.useState(!0),[f,d]=E.useState(!1),h=E.useMemo(()=>{const g=l.toLowerCase();return n.filter(x=>x.on.toTable.toLowerCase().includes(g))},[n,l]),m=()=>{d(!1),s("")};return Sr("j",()=>{n.length>0?d(g=>!g):un.error("No available tables to join")},"Add new join"),b.jsxs("div",{className:me.sectionContainer,children:[b.jsx(fo,{title:"📄 Joins",show:o,onShow:()=>u(!o),items:i.joins.length}),o&&i.joins.length>0&&b.jsx("div",{className:me.cardsList,children:i.joins.map((g,x)=>b.jsxs("div",{className:me.card,children:[b.jsxs("div",{className:"overflow-hidden",children:[b.jsxs("p",{className:Ae(me.subText,"truncate"),children:["on ",g.on]}),b.jsx("p",{className:me.text,children:g.table})]}),x===i.joins.length-1&&b.jsx("button",{className:me.closeButton,onClick:()=>e(g),children:b.jsx(Fi,{width:20,height:20})})]},g.table+g.on))}),n.length>0&&b.jsxs("button",{onClick:()=>d(!0),className:me.sidebarAddAction,children:[b.jsx("span",{className:"hotkey",children:"J"}),b.jsx("span",{children:"Add table"})]}),b.jsxs(tn,{isVisible:f,onClose:m,portal:!0,children:[b.jsx(er,{onClick:m}),b.jsxs("div",{className:me.joinModal,children:[b.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),b.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:g=>s(g.target.value),value:l}),b.jsx("div",{className:"flex flex-col mt-2 overflow-y-auto",children:h.map(g=>b.jsx(ux,{hook:g,onClick:()=>{e({table:g.on.toTable,type:"LEFT",on:g.where}),d(!1)}},g.where))})]})]})]})}function z1(){const{state:e,setState:n}=E.useContext(Rt);if(!e.orderBy.length)return null;const i=l=>{n(s=>({...s,orderBy:s.orderBy.filter(o=>o.column!==l.column&&o.direction!==l.direction)}))};return b.jsxs("div",{className:me.sectionContainer,children:[b.jsx("p",{className:me.sectionTitle,children:"Order by"}),b.jsx("div",{className:me.cardsList,children:e.orderBy.map((l,s)=>b.jsxs("div",{className:me.card,children:[b.jsxs("div",{className:"overflow-hidden",children:[b.jsx("p",{className:Ae(me.subText,"truncate"),children:l.direction}),b.jsx("p",{className:me.text,children:l.column})]}),b.jsx("button",{className:me.closeButton,onClick:()=>i(l),children:b.jsx(Fi,{width:20,height:20})})]},s))})]})}const mx=()=>{const{state:e,setState:n}=E.useContext(Rt),i=E.useCallback(s=>{n(o=>({...o,page:s}))},[n]),l=E.useCallback(s=>{n(o=>({...o,size:s}))},[n]);return{page:e.page,size:e.size,setSize:l,setPage:i}};function sN(){const e=Rc(co.tablet);return b.jsxs("div",{className:"py-2 flex justify-center gap-2 sticky top-0 left-0",children:[b.jsx(oN,{}),b.jsx(uN,{}),e&&b.jsx(cN,{}),b.jsx(fN,{})]})}function oN(){const{dataSourceId:e,name:n}=E.useContext(ti),{data:i}=Ac(e),{state:l}=E.useContext(Rt),{refetch:s,data:o}=E.useContext(ni),u=Da(sn.EDITOR),f=fx(),d=()=>{var g,x;(g=o==null?void 0:o.columns)!=null&&g[0].table&&Np({table:(x=o==null?void 0:o.columns)==null?void 0:x[0].table,dataSourceId:e})},h=()=>{Xs(n,l,!0),Yh()},m=async()=>{const g=dx(l,["size","page"]),x=await Bi("Query name",n);x&&f.mutate({name:x,dataSourceId:e,opts:g})};return b.jsxs("div",{className:Fe.tableConfig,children:[b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Refresh data",onClick:()=>s(),className:Ae(Fe.tableAction,Fe.blue),children:"🔄"}),u&&b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Save query",onClick:m,className:Ae(Fe.tableAction,Fe.blue),children:"💾"}),u&&(i==null?void 0:i.allowInsert)===!0&&b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Insert new row",onClick:d,className:Ae(Fe.tableAction,Fe.blue),children:"📝"}),b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Open in a new tab",onClick:h,className:Ae(Fe.tableAction,Fe.blue),children:"↗️"})]})}function uN(){const{page:e,size:n,setPage:i}=mx(),{data:l}=E.useContext(ni),s=(l==null?void 0:l.rows.length)===n;return b.jsxs("div",{className:Fe.tableConfig,children:[b.jsx("button",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",disabled:e<=0,className:Ae(Fe.tableAction,Fe.blue),onClick:()=>i(e-1),children:"⬅️"}),b.jsx("span",{children:e+1}),b.jsx("button",{"data-tooltip-content":"Next page","data-tooltip-id":"default",disabled:!s,className:Ae(Fe.tableAction,Fe.blue),onClick:()=>i(e+1),children:"➡️"})]})}function cN(){const{size:e,setSize:n}=mx();return b.jsx("div",{className:Fe.tableConfig,children:b.jsxs("label",{className:Fe.tableAction,"data-tooltip-content":"Size","data-tooltip-id":"default",children:["📏",b.jsxs("select",{style:{height:"20px"},value:e,onChange:i=>n(parseInt(i.target.value,10)),children:[b.jsx("option",{value:5,children:"5"}),b.jsx("option",{value:10,children:"10"}),b.jsx("option",{value:20,children:"20"}),b.jsx("option",{value:50,children:"50"}),b.jsx("option",{value:100,children:"100"}),b.jsx("option",{value:200,children:"200"})]})]})})}function fN(){const{state:e,setState:n}=E.useContext(Rt),i=()=>{n(s=>({...s,searchAll:void 0}))},l=()=>{Bi("Search all text values for","",{type:"info",message:"This will search all text values using LIKE operator (numbers, dates and other non string values are not searched)."}).then(s=>{s&&n(o=>({...o,searchAll:s}))})};return b.jsx("div",{className:Fe.tableConfig,children:e.searchAll?b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Remove search all filter",onClick:i,className:Ae(Fe.tableAction,Fe.red),children:b.jsxs("span",{className:"truncate px-1",children:["❌ ",e.searchAll]})}):b.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Search text in all columns",onClick:l,className:Ae(Fe.tableAction,Fe.blue),children:"🔎"})})}function dN(e,n,i){const l=[];return n.length>0||i.length>0?l.push(...n,...i):e.length>0&&l.push(...e),l}const yx=({options:e,updater:n,name:i,className:l,tabId:s})=>{const o=$A(e,n),{state:u}=o,f=FT({datasourceId:e.dataSourceId,table:e.table,filters:u.filters,joins:u.joins,page:u.page,size:u.size,orderBy:u.orderBy,columns:dN(u.columns,u.groupBy,u.aggregations),groupBy:u.groupBy,searchAll:u.searchAll}),d=VA(f.data,e.dataSourceId,i,s);return b.jsx("div",{className:Ae("flex flex-1 gap-1 overflow-hidden",l),children:b.jsx(ti,{value:d,children:b.jsx(Rt,{value:o,children:b.jsxs(ni,{value:f,children:[b.jsxs("div",{className:"m-1 flex-1 overflow-auto relative",children:[b.jsx(sN,{}),b.jsx(m_,{})]}),b.jsx(lN,{})]})})})})},va=Math.min,ml=Math.max,sc=Math.round,Ou=Math.floor,Cr=e=>({x:e,y:e}),hN={left:"right",right:"left",bottom:"top",top:"bottom"},pN={start:"end",end:"start"};function Kh(e,n,i){return ml(e,va(n,i))}function ho(e,n){return typeof e=="function"?e(n):e}function bl(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function gx(e){return e==="x"?"y":"x"}function Dp(e){return e==="y"?"height":"width"}function Li(e){return["top","bottom"].includes(bl(e))?"y":"x"}function Mp(e){return gx(Li(e))}function mN(e,n,i){i===void 0&&(i=!1);const l=po(e),s=Mp(e),o=Dp(s);let u=s==="x"?l===(i?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[o]>n.floating[o]&&(u=oc(u)),[u,oc(u)]}function yN(e){const n=oc(e);return[Gh(e),n,Gh(n)]}function Gh(e){return e.replace(/start|end/g,n=>pN[n])}function gN(e,n,i){const l=["left","right"],s=["right","left"],o=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return i?n?s:l:n?l:s;case"left":case"right":return n?o:u;default:return[]}}function bN(e,n,i,l){const s=po(e);let o=gN(bl(e),i==="start",l);return s&&(o=o.map(u=>u+"-"+s),n&&(o=o.concat(o.map(Gh)))),o}function oc(e){return e.replace(/left|right|bottom|top/g,n=>hN[n])}function vN(e){return{top:0,right:0,bottom:0,left:0,...e}}function bx(e){return typeof e!="number"?vN(e):{top:e,right:e,bottom:e,left:e}}function uc(e){const{x:n,y:i,width:l,height:s}=e;return{width:l,height:s,top:i,left:n,right:n+l,bottom:i+s,x:n,y:i}}function U1(e,n,i){let{reference:l,floating:s}=e;const o=Li(n),u=Mp(n),f=Dp(u),d=bl(n),h=o==="y",m=l.x+l.width/2-s.width/2,g=l.y+l.height/2-s.height/2,x=l[f]/2-s[f]/2;let v;switch(d){case"top":v={x:m,y:l.y-s.height};break;case"bottom":v={x:m,y:l.y+l.height};break;case"right":v={x:l.x+l.width,y:g};break;case"left":v={x:l.x-s.width,y:g};break;default:v={x:l.x,y:l.y}}switch(po(n)){case"start":v[u]-=x*(i&&h?-1:1);break;case"end":v[u]+=x*(i&&h?-1:1);break}return v}const xN=async(e,n,i)=>{const{placement:l="bottom",strategy:s="absolute",middleware:o=[],platform:u}=i,f=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(n));let h=await u.getElementRects({reference:e,floating:n,strategy:s}),{x:m,y:g}=U1(h,l,d),x=l,v={},w=0;for(let A=0;A<f.length;A++){const{name:_,fn:k}=f[A],{x:O,y:R,data:q,reset:M}=await k({x:m,y:g,initialPlacement:l,placement:x,strategy:s,middlewareData:v,rects:h,platform:u,elements:{reference:e,floating:n}});m=O??m,g=R??g,v={...v,[_]:{...v[_],...q}},M&&w<=50&&(w++,typeof M=="object"&&(M.placement&&(x=M.placement),M.rects&&(h=M.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:s}):M.rects),{x:m,y:g}=U1(h,x,d)),A=-1)}return{x:m,y:g,placement:x,strategy:s,middlewareData:v}};async function vx(e,n){var i;n===void 0&&(n={});const{x:l,y:s,platform:o,rects:u,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:x=!1,padding:v=0}=ho(n,e),w=bx(v),_=f[x?g==="floating"?"reference":"floating":g],k=uc(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(_)))==null||i?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),O=g==="floating"?{x:l,y:s,width:u.floating.width,height:u.floating.height}:u.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f.floating)),q=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},M=uc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:O,offsetParent:R,strategy:d}):O);return{top:(k.top-M.top+w.top)/q.y,bottom:(M.bottom-k.bottom+w.bottom)/q.y,left:(k.left-M.left+w.left)/q.x,right:(M.right-k.right+w.right)/q.x}}const wN=e=>({name:"arrow",options:e,async fn(n){const{x:i,y:l,placement:s,rects:o,platform:u,elements:f,middlewareData:d}=n,{element:h,padding:m=0}=ho(e,n)||{};if(h==null)return{};const g=bx(m),x={x:i,y:l},v=Mp(s),w=Dp(v),A=await u.getDimensions(h),_=v==="y",k=_?"top":"left",O=_?"bottom":"right",R=_?"clientHeight":"clientWidth",q=o.reference[w]+o.reference[v]-x[v]-o.floating[w],M=x[v]-o.reference[v],D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let $=D?D[R]:0;(!$||!await(u.isElement==null?void 0:u.isElement(D)))&&($=f.floating[R]||o.floating[w]);const ee=q/2-M/2,ie=$/2-A[w]/2-1,z=va(g[k],ie),ae=va(g[O],ie),te=z,ue=$-A[w]-ae,J=$/2-A[w]/2+ee,oe=Kh(te,J,ue),B=!d.arrow&&po(s)!=null&&J!==oe&&o.reference[w]/2-(J<te?z:ae)-A[w]/2<0,X=B?J<te?J-te:J-ue:0;return{[v]:x[v]+X,data:{[v]:oe,centerOffset:J-oe-X,...B&&{alignmentOffset:X}},reset:B}}}),SN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var i,l;const{placement:s,middlewareData:o,rects:u,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0,..._}=ho(e,n);if((i=o.arrow)!=null&&i.alignmentOffset)return{};const k=bl(s),O=Li(f),R=bl(f)===f,q=await(d.isRTL==null?void 0:d.isRTL(h.floating)),M=x||(R||!A?[oc(f)]:yN(f)),D=w!=="none";!x&&D&&M.push(...bN(f,A,w,q));const $=[f,...M],ee=await vx(n,_),ie=[];let z=((l=o.flip)==null?void 0:l.overflows)||[];if(m&&ie.push(ee[k]),g){const J=mN(s,u,q);ie.push(ee[J[0]],ee[J[1]])}if(z=[...z,{placement:s,overflows:ie}],!ie.every(J=>J<=0)){var ae,te;const J=(((ae=o.flip)==null?void 0:ae.index)||0)+1,oe=$[J];if(oe&&(!(g==="alignment"?O!==Li(oe):!1)||z.every(ne=>ne.overflows[0]>0&&Li(ne.placement)===O)))return{data:{index:J,overflows:z},reset:{placement:oe}};let B=(te=z.filter(X=>X.overflows[0]<=0).sort((X,ne)=>X.overflows[1]-ne.overflows[1])[0])==null?void 0:te.placement;if(!B)switch(v){case"bestFit":{var ue;const X=(ue=z.filter(ne=>{if(D){const pe=Li(ne.placement);return pe===O||pe==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(pe=>pe>0).reduce((pe,C)=>pe+C,0)]).sort((ne,pe)=>ne[1]-pe[1])[0])==null?void 0:ue[0];X&&(B=X);break}case"initialPlacement":B=f;break}if(s!==B)return{reset:{placement:B}}}return{}}}};async function CN(e,n){const{placement:i,platform:l,elements:s}=e,o=await(l.isRTL==null?void 0:l.isRTL(s.floating)),u=bl(i),f=po(i),d=Li(i)==="y",h=["left","top"].includes(u)?-1:1,m=o&&d?-1:1,g=ho(n,e);let{mainAxis:x,crossAxis:v,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(v=f==="end"?w*-1:w),d?{x:v*m,y:x*h}:{x:x*h,y:v*m}}const EN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var i,l;const{x:s,y:o,placement:u,middlewareData:f}=n,d=await CN(n,e);return u===((i=f.offset)==null?void 0:i.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:u}}}}},AN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:i,y:l,placement:s}=n,{mainAxis:o=!0,crossAxis:u=!1,limiter:f={fn:_=>{let{x:k,y:O}=_;return{x:k,y:O}}},...d}=ho(e,n),h={x:i,y:l},m=await vx(n,d),g=Li(bl(s)),x=gx(g);let v=h[x],w=h[g];if(o){const _=x==="y"?"top":"left",k=x==="y"?"bottom":"right",O=v+m[_],R=v-m[k];v=Kh(O,v,R)}if(u){const _=g==="y"?"top":"left",k=g==="y"?"bottom":"right",O=w+m[_],R=w-m[k];w=Kh(O,w,R)}const A=f.fn({...n,[x]:v,[g]:w});return{...A,data:{x:A.x-i,y:A.y-l,enabled:{[x]:o,[g]:u}}}}}};function Oc(){return typeof window<"u"}function Ma(e){return xx(e)?(e.nodeName||"").toLowerCase():"#document"}function Dn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function _r(e){var n;return(n=(xx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function xx(e){return Oc()?e instanceof Node||e instanceof Dn(e).Node:!1}function or(e){return Oc()?e instanceof Element||e instanceof Dn(e).Element:!1}function Er(e){return Oc()?e instanceof HTMLElement||e instanceof Dn(e).HTMLElement:!1}function B1(e){return!Oc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dn(e).ShadowRoot}function mo(e){const{overflow:n,overflowX:i,overflowY:l,display:s}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(n+l+i)&&!["inline","contents"].includes(s)}function TN(e){return["table","td","th"].includes(Ma(e))}function jc(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch{return!1}})}function Lp(e){const n=zp(),i=or(e)?ur(e):e;return["transform","translate","scale","rotate","perspective"].some(l=>i[l]?i[l]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!n&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!n&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(l=>(i.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(i.contain||"").includes(l))}function kN(e){let n=qi(e);for(;Er(n)&&!xa(n);){if(Lp(n))return n;if(jc(n))return null;n=qi(n)}return null}function zp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xa(e){return["html","body","#document"].includes(Ma(e))}function ur(e){return Dn(e).getComputedStyle(e)}function Dc(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qi(e){if(Ma(e)==="html")return e;const n=e.assignedSlot||e.parentNode||B1(e)&&e.host||_r(e);return B1(n)?n.host:n}function wx(e){const n=qi(e);return xa(n)?e.ownerDocument?e.ownerDocument.body:e.body:Er(n)&&mo(n)?n:wx(n)}function Js(e,n,i){var l;n===void 0&&(n=[]),i===void 0&&(i=!0);const s=wx(e),o=s===((l=e.ownerDocument)==null?void 0:l.body),u=Dn(s);if(o){const f=Xh(u);return n.concat(u,u.visualViewport||[],mo(s)?s:[],f&&i?Js(f):[])}return n.concat(s,Js(s,[],i))}function Xh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sx(e){const n=ur(e);let i=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const s=Er(e),o=s?e.offsetWidth:i,u=s?e.offsetHeight:l,f=sc(i)!==o||sc(l)!==u;return f&&(i=o,l=u),{width:i,height:l,$:f}}function Up(e){return or(e)?e:e.contextElement}function ma(e){const n=Up(e);if(!Er(n))return Cr(1);const i=n.getBoundingClientRect(),{width:l,height:s,$:o}=Sx(n);let u=(o?sc(i.width):i.width)/l,f=(o?sc(i.height):i.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const _N=Cr(0);function Cx(e){const n=Dn(e);return!zp()||!n.visualViewport?_N:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function NN(e,n,i){return n===void 0&&(n=!1),!i||n&&i!==Dn(e)?!1:n}function vl(e,n,i,l){n===void 0&&(n=!1),i===void 0&&(i=!1);const s=e.getBoundingClientRect(),o=Up(e);let u=Cr(1);n&&(l?or(l)&&(u=ma(l)):u=ma(e));const f=NN(o,i,l)?Cx(o):Cr(0);let d=(s.left+f.x)/u.x,h=(s.top+f.y)/u.y,m=s.width/u.x,g=s.height/u.y;if(o){const x=Dn(o),v=l&&or(l)?Dn(l):l;let w=x,A=Xh(w);for(;A&&l&&v!==w;){const _=ma(A),k=A.getBoundingClientRect(),O=ur(A),R=k.left+(A.clientLeft+parseFloat(O.paddingLeft))*_.x,q=k.top+(A.clientTop+parseFloat(O.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,g*=_.y,d+=R,h+=q,w=Dn(A),A=Xh(w)}}return uc({width:m,height:g,x:d,y:h})}function Bp(e,n){const i=Dc(e).scrollLeft;return n?n.left+i:vl(_r(e)).left+i}function Ex(e,n,i){i===void 0&&(i=!1);const l=e.getBoundingClientRect(),s=l.left+n.scrollLeft-(i?0:Bp(e,l)),o=l.top+n.scrollTop;return{x:s,y:o}}function RN(e){let{elements:n,rect:i,offsetParent:l,strategy:s}=e;const o=s==="fixed",u=_r(l),f=n?jc(n.floating):!1;if(l===u||f&&o)return i;let d={scrollLeft:0,scrollTop:0},h=Cr(1);const m=Cr(0),g=Er(l);if((g||!g&&!o)&&((Ma(l)!=="body"||mo(u))&&(d=Dc(l)),Er(l))){const v=vl(l);h=ma(l),m.x=v.x+l.clientLeft,m.y=v.y+l.clientTop}const x=u&&!g&&!o?Ex(u,d,!0):Cr(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-d.scrollLeft*h.x+m.x+x.x,y:i.y*h.y-d.scrollTop*h.y+m.y+x.y}}function ON(e){return Array.from(e.getClientRects())}function jN(e){const n=_r(e),i=Dc(e),l=e.ownerDocument.body,s=ml(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),o=ml(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let u=-i.scrollLeft+Bp(e);const f=-i.scrollTop;return ur(l).direction==="rtl"&&(u+=ml(n.clientWidth,l.clientWidth)-s),{width:s,height:o,x:u,y:f}}function DN(e,n){const i=Dn(e),l=_r(e),s=i.visualViewport;let o=l.clientWidth,u=l.clientHeight,f=0,d=0;if(s){o=s.width,u=s.height;const h=zp();(!h||h&&n==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:o,height:u,x:f,y:d}}function MN(e,n){const i=vl(e,!0,n==="fixed"),l=i.top+e.clientTop,s=i.left+e.clientLeft,o=Er(e)?ma(e):Cr(1),u=e.clientWidth*o.x,f=e.clientHeight*o.y,d=s*o.x,h=l*o.y;return{width:u,height:f,x:d,y:h}}function q1(e,n,i){let l;if(n==="viewport")l=DN(e,i);else if(n==="document")l=jN(_r(e));else if(or(n))l=MN(n,i);else{const s=Cx(e);l={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return uc(l)}function Ax(e,n){const i=qi(e);return i===n||!or(i)||xa(i)?!1:ur(i).position==="fixed"||Ax(i,n)}function LN(e,n){const i=n.get(e);if(i)return i;let l=Js(e,[],!1).filter(f=>or(f)&&Ma(f)!=="body"),s=null;const o=ur(e).position==="fixed";let u=o?qi(e):e;for(;or(u)&&!xa(u);){const f=ur(u),d=Lp(u);!d&&f.position==="fixed"&&(s=null),(o?!d&&!s:!d&&f.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||mo(u)&&!d&&Ax(e,u))?l=l.filter(m=>m!==u):s=f,u=qi(u)}return n.set(e,l),l}function zN(e){let{element:n,boundary:i,rootBoundary:l,strategy:s}=e;const u=[...i==="clippingAncestors"?jc(n)?[]:LN(n,this._c):[].concat(i),l],f=u[0],d=u.reduce((h,m)=>{const g=q1(n,m,s);return h.top=ml(g.top,h.top),h.right=va(g.right,h.right),h.bottom=va(g.bottom,h.bottom),h.left=ml(g.left,h.left),h},q1(n,f,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function UN(e){const{width:n,height:i}=Sx(e);return{width:n,height:i}}function BN(e,n,i){const l=Er(n),s=_r(n),o=i==="fixed",u=vl(e,!0,o,n);let f={scrollLeft:0,scrollTop:0};const d=Cr(0);function h(){d.x=Bp(s)}if(l||!l&&!o)if((Ma(n)!=="body"||mo(s))&&(f=Dc(n)),l){const v=vl(n,!0,o,n);d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}else s&&h();o&&!l&&s&&h();const m=s&&!l&&!o?Ex(s,f):Cr(0),g=u.left+f.scrollLeft-d.x-m.x,x=u.top+f.scrollTop-d.y-m.y;return{x:g,y:x,width:u.width,height:u.height}}function uh(e){return ur(e).position==="static"}function H1(e,n){if(!Er(e)||ur(e).position==="fixed")return null;if(n)return n(e);let i=e.offsetParent;return _r(e)===i&&(i=i.ownerDocument.body),i}function Tx(e,n){const i=Dn(e);if(jc(e))return i;if(!Er(e)){let s=qi(e);for(;s&&!xa(s);){if(or(s)&&!uh(s))return s;s=qi(s)}return i}let l=H1(e,n);for(;l&&TN(l)&&uh(l);)l=H1(l,n);return l&&xa(l)&&uh(l)&&!Lp(l)?i:l||kN(e)||i}const qN=async function(e){const n=this.getOffsetParent||Tx,i=this.getDimensions,l=await i(e.floating);return{reference:BN(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function HN(e){return ur(e).direction==="rtl"}const FN={convertOffsetParentRelativeRectToViewportRelativeRect:RN,getDocumentElement:_r,getClippingRect:zN,getOffsetParent:Tx,getElementRects:qN,getClientRects:ON,getDimensions:UN,getScale:ma,isElement:or,isRTL:HN};function kx(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function PN(e,n){let i=null,l;const s=_r(e);function o(){var f;clearTimeout(l),(f=i)==null||f.disconnect(),i=null}function u(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:m,top:g,width:x,height:v}=h;if(f||n(),!x||!v)return;const w=Ou(g),A=Ou(s.clientWidth-(m+x)),_=Ou(s.clientHeight-(g+v)),k=Ou(m),R={rootMargin:-w+"px "+-A+"px "+-_+"px "+-k+"px",threshold:ml(0,va(1,d))||1};let q=!0;function M(D){const $=D[0].intersectionRatio;if($!==d){if(!q)return u();$?u(!1,$):l=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!kx(h,e.getBoundingClientRect())&&u(),q=!1}try{i=new IntersectionObserver(M,{...R,root:s.ownerDocument})}catch{i=new IntersectionObserver(M,R)}i.observe(e)}return u(!0),o}function QN(e,n,i,l){l===void 0&&(l={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,h=Up(e),m=s||o?[...h?Js(h):[],...Js(n)]:[];m.forEach(k=>{s&&k.addEventListener("scroll",i,{passive:!0}),o&&k.addEventListener("resize",i)});const g=h&&f?PN(h,i):null;let x=-1,v=null;u&&(v=new ResizeObserver(k=>{let[O]=k;O&&O.target===h&&v&&(v.unobserve(n),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(n)})),i()}),h&&!d&&v.observe(h),v.observe(n));let w,A=d?vl(e):null;d&&_();function _(){const k=vl(e);A&&!kx(A,k)&&i(),A=k,w=requestAnimationFrame(_)}return i(),()=>{var k;m.forEach(O=>{s&&O.removeEventListener("scroll",i),o&&O.removeEventListener("resize",i)}),g==null||g(),(k=v)==null||k.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const IN=EN,VN=AN,$N=SN,YN=wN,F1=(e,n,i)=>{const l=new Map,s={platform:FN,...i},o={...s.platform,_c:l};return xN(e,n,{...s,platform:o})};var ch={exports:{}};/*!
233
- Copyright (c) 2018 Jed Watson.
234
- Licensed under the MIT License (MIT), see
235
- http://jedwatson.github.io/classnames
236
- */var P1;function KN(){return P1||(P1=1,function(e){(function(){var n={}.hasOwnProperty;function i(){for(var o="",u=0;u<arguments.length;u++){var f=arguments[u];f&&(o=s(o,l(f)))}return o}function l(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return i.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var u="";for(var f in o)n.call(o,f)&&o[f]&&(u=s(u,f));return u}function s(o,u){return u?o?o+" "+u:o+u:o}e.exports?(i.default=i,e.exports=i):window.classNames=i})()}(ch)),ch.exports}var GN=KN();const Zh=Ca(GN);var Q1={};const XN="react-tooltip-core-styles",ZN="react-tooltip-base-styles",I1={core:!1,base:!1};function V1({css:e,id:n=ZN,type:i="base",ref:l}){var s,o;if(!e||typeof document>"u"||I1[i]||i==="core"&&typeof process<"u"&&(!((s=process==null?void 0:Q1)===null||s===void 0)&&s.REACT_TOOLTIP_DISABLE_CORE_STYLES)||i!=="base"&&typeof process<"u"&&(!((o=process==null?void 0:Q1)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;i==="core"&&(n=XN),l||(l={});const{insertAt:u}=l;if(document.getElementById(n))return;const f=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=n,d.type="text/css",u==="top"&&f.firstChild?f.insertBefore(d,f.firstChild):f.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),I1[i]=!0}const $1=async({elementReference:e=null,tooltipReference:n=null,tooltipArrowReference:i=null,place:l="top",offset:s=10,strategy:o="absolute",middlewares:u=[IN(Number(s)),$N({fallbackAxisSideDirection:"start"}),VN({padding:5})],border:f,arrowSize:d=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};if(n===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};const h=u;return i?(h.push(YN({element:i,padding:5})),F1(e,n,{placement:l,strategy:o,middleware:h}).then(({x:m,y:g,placement:x,middlewareData:v})=>{var w,A;const _={left:`${m}px`,top:`${g}px`,border:f},{x:k,y:O}=(w=v.arrow)!==null&&w!==void 0?w:{x:0,y:0},R=(A={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]])!==null&&A!==void 0?A:"bottom",q=f&&{borderBottom:f,borderRight:f};let M=0;if(f){const D=`${f}`.match(/(\d+)px/);M=D!=null&&D[1]?Number(D[1]):1}return{tooltipStyles:_,tooltipArrowStyles:{left:k!=null?`${k}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",...q,[R]:`-${d/2+M}px`},place:x}})):F1(e,n,{placement:"bottom",strategy:o,middleware:h}).then(({x:m,y:g,placement:x})=>({tooltipStyles:{left:`${m}px`,top:`${g}px`},tooltipArrowStyles:{},place:x}))},Y1=(e,n)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,n),K1=(e,n,i)=>{let l=null;const s=function(...o){const u=()=>{l=null};!l&&(e.apply(this,o),l=setTimeout(u,n))};return s.cancel=()=>{l&&(clearTimeout(l),l=null)},s},G1=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",Jh=(e,n)=>{if(e===n)return!0;if(Array.isArray(e)&&Array.isArray(n))return e.length===n.length&&e.every((s,o)=>Jh(s,n[o]));if(Array.isArray(e)!==Array.isArray(n))return!1;if(!G1(e)||!G1(n))return e===n;const i=Object.keys(e),l=Object.keys(n);return i.length===l.length&&i.every(s=>Jh(e[s],n[s]))},JN=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const n=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(i=>{const l=n.getPropertyValue(i);return l==="auto"||l==="scroll"})},X1=e=>{if(!e)return null;let n=e.parentElement;for(;n;){if(JN(n))return n;n=n.parentElement}return document.scrollingElement||document.documentElement},WN=typeof window<"u"?E.useLayoutEffect:E.useEffect,Zn=e=>{e.current&&(clearTimeout(e.current),e.current=null)},eR="DEFAULT_TOOLTIP_ID",tR={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},nR=E.createContext({getTooltipData:()=>tR});function _x(e=eR){return E.useContext(nR).getTooltipData(e)}var oa={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},fh={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const rR=({forwardRef:e,id:n,className:i,classNameArrow:l,variant:s="dark",anchorId:o,anchorSelect:u,place:f="top",offset:d=10,events:h=["hover"],openOnClick:m=!1,positionStrategy:g="absolute",middlewares:x,wrapper:v,delayShow:w=0,delayHide:A=0,float:_=!1,hidden:k=!1,noArrow:O=!1,clickable:R=!1,closeOnEsc:q=!1,closeOnScroll:M=!1,closeOnResize:D=!1,openEvents:$,closeEvents:ee,globalCloseEvents:ie,imperativeModeOnly:z,style:ae,position:te,afterShow:ue,afterHide:J,disableTooltip:oe,content:B,contentWrapperRef:X,isOpen:ne,defaultIsOpen:pe=!1,setIsOpen:C,activeAnchor:I,setActiveAnchor:se,border:N,opacity:fe,arrowColor:Te,arrowSize:ce=8,role:ct="tooltip"})=>{var Re;const Ie=E.useRef(null),Ft=E.useRef(null),wt=E.useRef(null),cn=E.useRef(null),tr=E.useRef(null),[fn,ii]=E.useState({tooltipStyles:{},tooltipArrowStyles:{},place:f}),[Dt,Mt]=E.useState(!1),[nr,wn]=E.useState(!1),[Ke,Bn]=E.useState(null),Rr=E.useRef(!1),dr=E.useRef(null),{anchorRefs:Or,setActiveAnchor:li}=_x(n),Y=E.useRef(!1),[W,ye]=E.useState([]),ge=E.useRef(!1),Be=m||h.includes("click"),Pt=Be||($==null?void 0:$.click)||($==null?void 0:$.dblclick)||($==null?void 0:$.mousedown),Yt=$?{...$}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!$&&Be&&Object.assign(Yt,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const yt=ee?{...ee}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!ee&&Be&&Object.assign(yt,{mouseleave:!1,blur:!1,mouseout:!1});const gt=ie?{...ie}:{escape:q||!1,scroll:M||!1,resize:D||!1,clickOutsideAnchor:Pt||!1};z&&(Object.assign(Yt,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(yt,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(gt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),WN(()=>(ge.current=!0,()=>{ge.current=!1}),[]);const qe=le=>{ge.current&&(le&&wn(!0),setTimeout(()=>{ge.current&&(C==null||C(le),ne===void 0&&Mt(le))},10))};E.useEffect(()=>{if(ne===void 0)return()=>null;ne&&wn(!0);const le=setTimeout(()=>{Mt(ne)},10);return()=>{clearTimeout(le)}},[ne]),E.useEffect(()=>{if(Dt!==Rr.current)if(Zn(tr),Rr.current=Dt,Dt)ue==null||ue();else{const le=(he=>{const Se=he.match(/^([\d.]+)(ms|s)$/);if(!Se)return 0;const[,dt,Ut]=Se;return Number(dt)*(Ut==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));tr.current=setTimeout(()=>{wn(!1),Bn(null),J==null||J()},le+25)}},[Dt]);const ft=le=>{ii(he=>Jh(he,le)?he:le)},Lt=(le=w)=>{Zn(wt),nr?qe(!0):wt.current=setTimeout(()=>{qe(!0)},le)},zt=(le=A)=>{Zn(cn),cn.current=setTimeout(()=>{Y.current||qe(!1)},le)},ai=le=>{var he;if(!le)return;const Se=(he=le.currentTarget)!==null&&he!==void 0?he:le.target;if(!(Se!=null&&Se.isConnected))return se(null),void li({current:null});w?Lt():qe(!0),se(Se),li({current:Se}),Zn(cn)},jr=()=>{R?zt(A||100):A?zt():qe(!1),Zn(wt)},hr=({x:le,y:he})=>{var Se;const dt={getBoundingClientRect:()=>({x:le,y:he,width:0,height:0,top:he,left:le,right:le,bottom:he})};$1({place:(Se=Ke==null?void 0:Ke.place)!==null&&Se!==void 0?Se:f,offset:d,elementReference:dt,tooltipReference:Ie.current,tooltipArrowReference:Ft.current,strategy:g,middlewares:x,border:N,arrowSize:ce}).then(Ut=>{ft(Ut)})},qn=le=>{if(!le)return;const he=le,Se={x:he.clientX,y:he.clientY};hr(Se),dr.current=Se},Qi=le=>{var he;if(!Dt)return;const Se=le.target;Se.isConnected&&(!((he=Ie.current)===null||he===void 0)&&he.contains(Se)||[document.querySelector(`[id='${o}']`),...W].some(dt=>dt==null?void 0:dt.contains(Se))||(qe(!1),Zn(wt)))},Ii=K1(ai,50),St=K1(jr,50),Kt=le=>{St.cancel(),Ii(le)},ve=()=>{Ii.cancel(),St()},Me=E.useCallback(()=>{var le,he;const Se=(le=Ke==null?void 0:Ke.position)!==null&&le!==void 0?le:te;Se?hr(Se):_?dr.current&&hr(dr.current):I!=null&&I.isConnected&&$1({place:(he=Ke==null?void 0:Ke.place)!==null&&he!==void 0?he:f,offset:d,elementReference:I,tooltipReference:Ie.current,tooltipArrowReference:Ft.current,strategy:g,middlewares:x,border:N,arrowSize:ce}).then(dt=>{ge.current&&ft(dt)})},[Dt,I,B,ae,f,Ke==null?void 0:Ke.place,d,g,te,Ke==null?void 0:Ke.position,_,ce]);E.useEffect(()=>{var le,he;const Se=new Set(Or);W.forEach($e=>{oe!=null&&oe($e)||Se.add({current:$e})});const dt=document.querySelector(`[id='${o}']`);dt&&!(oe!=null&&oe(dt))&&Se.add({current:dt});const Ut=()=>{qe(!1)},Hn=X1(I),Sn=X1(Ie.current);gt.scroll&&(window.addEventListener("scroll",Ut),Hn==null||Hn.addEventListener("scroll",Ut),Sn==null||Sn.addEventListener("scroll",Ut));let Ct=null;gt.resize?window.addEventListener("resize",Ut):I&&Ie.current&&(Ct=QN(I,Ie.current,Me,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Xt=$e=>{$e.key==="Escape"&&qe(!1)};gt.escape&&window.addEventListener("keydown",Xt),gt.clickOutsideAnchor&&window.addEventListener("click",Qi);const Ve=[],Cn=$e=>!!($e!=null&&$e.target&&(I!=null&&I.contains($e.target))),Vi=$e=>{Dt&&Cn($e)||ai($e)},si=$e=>{Dt&&Cn($e)&&jr()},Et=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],Ua=["click","dblclick","mousedown","mouseup"];Object.entries(Yt).forEach(([$e,Fn])=>{Fn&&(Et.includes($e)?Ve.push({event:$e,listener:Kt}):Ua.includes($e)&&Ve.push({event:$e,listener:Vi}))}),Object.entries(yt).forEach(([$e,Fn])=>{Fn&&(Et.includes($e)?Ve.push({event:$e,listener:ve}):Ua.includes($e)&&Ve.push({event:$e,listener:si}))}),_&&Ve.push({event:"pointermove",listener:qn});const Ba=()=>{Y.current=!0},pr=()=>{Y.current=!1,jr()},Dr=R&&(yt.mouseout||yt.mouseleave);return Dr&&((le=Ie.current)===null||le===void 0||le.addEventListener("mouseover",Ba),(he=Ie.current)===null||he===void 0||he.addEventListener("mouseout",pr)),Ve.forEach(({event:$e,listener:Fn})=>{Se.forEach(Cl=>{var $i;($i=Cl.current)===null||$i===void 0||$i.addEventListener($e,Fn)})}),()=>{var $e,Fn;gt.scroll&&(window.removeEventListener("scroll",Ut),Hn==null||Hn.removeEventListener("scroll",Ut),Sn==null||Sn.removeEventListener("scroll",Ut)),gt.resize?window.removeEventListener("resize",Ut):Ct==null||Ct(),gt.clickOutsideAnchor&&window.removeEventListener("click",Qi),gt.escape&&window.removeEventListener("keydown",Xt),Dr&&(($e=Ie.current)===null||$e===void 0||$e.removeEventListener("mouseover",Ba),(Fn=Ie.current)===null||Fn===void 0||Fn.removeEventListener("mouseout",pr)),Ve.forEach(({event:Cl,listener:$i})=>{Se.forEach(El=>{var oi;(oi=El.current)===null||oi===void 0||oi.removeEventListener(Cl,$i)})})}},[I,Me,nr,Or,W,$,ee,ie,Be,w,A]),E.useEffect(()=>{var le,he;let Se=(he=(le=Ke==null?void 0:Ke.anchorSelect)!==null&&le!==void 0?le:u)!==null&&he!==void 0?he:"";!Se&&n&&(Se=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`);const dt=new MutationObserver(Ut=>{const Hn=[],Sn=[];Ut.forEach(Ct=>{if(Ct.type==="attributes"&&Ct.attributeName==="data-tooltip-id"&&(Ct.target.getAttribute("data-tooltip-id")===n?Hn.push(Ct.target):Ct.oldValue===n&&Sn.push(Ct.target)),Ct.type==="childList"){if(I){const Xt=[...Ct.removedNodes].filter(Ve=>Ve.nodeType===1);if(Se)try{Sn.push(...Xt.filter(Ve=>Ve.matches(Se))),Sn.push(...Xt.flatMap(Ve=>[...Ve.querySelectorAll(Se)]))}catch{}Xt.some(Ve=>{var Cn;return!!(!((Cn=Ve==null?void 0:Ve.contains)===null||Cn===void 0)&&Cn.call(Ve,I))&&(wn(!1),qe(!1),se(null),Zn(wt),Zn(cn),!0)})}if(Se)try{const Xt=[...Ct.addedNodes].filter(Ve=>Ve.nodeType===1);Hn.push(...Xt.filter(Ve=>Ve.matches(Se))),Hn.push(...Xt.flatMap(Ve=>[...Ve.querySelectorAll(Se)]))}catch{}}}),(Hn.length||Sn.length)&&ye(Ct=>[...Ct.filter(Xt=>!Sn.includes(Xt)),...Hn])});return dt.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{dt.disconnect()}},[n,u,Ke==null?void 0:Ke.anchorSelect,I]),E.useEffect(()=>{Me()},[Me]),E.useEffect(()=>{if(!(X!=null&&X.current))return()=>null;const le=new ResizeObserver(()=>{setTimeout(()=>Me())});return le.observe(X.current),()=>{le.disconnect()}},[B,X==null?void 0:X.current]),E.useEffect(()=>{var le;const he=document.querySelector(`[id='${o}']`),Se=[...W,he];I&&Se.includes(I)||se((le=W[0])!==null&&le!==void 0?le:he)},[o,W,I]),E.useEffect(()=>(pe&&qe(!0),()=>{Zn(wt),Zn(cn)}),[]),E.useEffect(()=>{var le;let he=(le=Ke==null?void 0:Ke.anchorSelect)!==null&&le!==void 0?le:u;if(!he&&n&&(he=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),he)try{const Se=Array.from(document.querySelectorAll(he));ye(Se)}catch{ye([])}},[n,u,Ke==null?void 0:Ke.anchorSelect]),E.useEffect(()=>{wt.current&&(Zn(wt),Lt(w))},[w]);const rn=(Re=Ke==null?void 0:Ke.content)!==null&&Re!==void 0?Re:B,Gt=Dt&&Object.keys(fn.tooltipStyles).length>0;return E.useImperativeHandle(e,()=>({open:le=>{if(le!=null&&le.anchorSelect)try{document.querySelector(le.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${le.anchorSelect}" is not a valid CSS selector`)}Bn(le??null),le!=null&&le.delay?Lt(le.delay):qe(!0)},close:le=>{le!=null&&le.delay?zt(le.delay):qe(!1)},activeAnchor:I,place:fn.place,isOpen:!!(nr&&!k&&rn&&Gt)})),nr&&!k&&rn?nt.createElement(v,{id:n,role:ct,className:Zh("react-tooltip",oa.tooltip,fh.tooltip,fh[s],i,`react-tooltip__place-${fn.place}`,oa[Gt?"show":"closing"],Gt?"react-tooltip__show":"react-tooltip__closing",g==="fixed"&&oa.fixed,R&&oa.clickable),onTransitionEnd:le=>{Zn(tr),Dt||le.propertyName!=="opacity"||(wn(!1),Bn(null),J==null||J())},style:{...ae,...fn.tooltipStyles,opacity:fe!==void 0&&Gt?fe:void 0},ref:Ie},rn,nt.createElement(v,{className:Zh("react-tooltip-arrow",oa.arrow,fh.arrow,l,O&&oa.noArrow),style:{...fn.tooltipArrowStyles,background:Te?`linear-gradient(to right bottom, transparent 50%, ${Te} 50%)`:void 0,"--rt-arrow-size":`${ce}px`},ref:Ft})):null},iR=({content:e})=>nt.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Nx=nt.forwardRef(({id:e,anchorId:n,anchorSelect:i,content:l,html:s,render:o,className:u,classNameArrow:f,variant:d="dark",place:h="top",offset:m=10,wrapper:g="div",children:x=null,events:v=["hover"],openOnClick:w=!1,positionStrategy:A="absolute",middlewares:_,delayShow:k=0,delayHide:O=0,float:R=!1,hidden:q=!1,noArrow:M=!1,clickable:D=!1,closeOnEsc:$=!1,closeOnScroll:ee=!1,closeOnResize:ie=!1,openEvents:z,closeEvents:ae,globalCloseEvents:te,imperativeModeOnly:ue=!1,style:J,position:oe,isOpen:B,defaultIsOpen:X=!1,disableStyleInjection:ne=!1,border:pe,opacity:C,arrowColor:I,arrowSize:se,setIsOpen:N,afterShow:fe,afterHide:Te,disableTooltip:ce,role:ct="tooltip"},Re)=>{const[Ie,Ft]=E.useState(l),[wt,cn]=E.useState(s),[tr,fn]=E.useState(h),[ii,Dt]=E.useState(d),[Mt,nr]=E.useState(m),[wn,Ke]=E.useState(k),[Bn,Rr]=E.useState(O),[dr,Or]=E.useState(R),[li,Y]=E.useState(q),[W,ye]=E.useState(g),[ge,Be]=E.useState(v),[Pt,Yt]=E.useState(A),[yt,gt]=E.useState(null),[qe,ft]=E.useState(null),Lt=E.useRef(ne),{anchorRefs:zt,activeAnchor:ai}=_x(e),jr=St=>St==null?void 0:St.getAttributeNames().reduce((Kt,ve)=>{var Me;return ve.startsWith("data-tooltip-")&&(Kt[ve.replace(/^data-tooltip-/,"")]=(Me=St==null?void 0:St.getAttribute(ve))!==null&&Me!==void 0?Me:null),Kt},{}),hr=St=>{const Kt={place:ve=>{var Me;fn((Me=ve)!==null&&Me!==void 0?Me:h)},content:ve=>{Ft(ve??l)},html:ve=>{cn(ve??s)},variant:ve=>{var Me;Dt((Me=ve)!==null&&Me!==void 0?Me:d)},offset:ve=>{nr(ve===null?m:Number(ve))},wrapper:ve=>{var Me;ye((Me=ve)!==null&&Me!==void 0?Me:g)},events:ve=>{const Me=ve==null?void 0:ve.split(" ");Be(Me??v)},"position-strategy":ve=>{var Me;Yt((Me=ve)!==null&&Me!==void 0?Me:A)},"delay-show":ve=>{Ke(ve===null?k:Number(ve))},"delay-hide":ve=>{Rr(ve===null?O:Number(ve))},float:ve=>{Or(ve===null?R:ve==="true")},hidden:ve=>{Y(ve===null?q:ve==="true")},"class-name":ve=>{gt(ve)}};Object.values(Kt).forEach(ve=>ve(null)),Object.entries(St).forEach(([ve,Me])=>{var rn;(rn=Kt[ve])===null||rn===void 0||rn.call(Kt,Me)})};E.useEffect(()=>{Ft(l)},[l]),E.useEffect(()=>{cn(s)},[s]),E.useEffect(()=>{fn(h)},[h]),E.useEffect(()=>{Dt(d)},[d]),E.useEffect(()=>{nr(m)},[m]),E.useEffect(()=>{Ke(k)},[k]),E.useEffect(()=>{Rr(O)},[O]),E.useEffect(()=>{Or(R)},[R]),E.useEffect(()=>{Y(q)},[q]),E.useEffect(()=>{Yt(A)},[A]),E.useEffect(()=>{Lt.current!==ne&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[ne]),E.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:ne==="core",disableBase:ne}}))},[]),E.useEffect(()=>{var St;const Kt=new Set(zt);let ve=i;if(!ve&&e&&(ve=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),ve)try{document.querySelectorAll(ve).forEach(he=>{Kt.add({current:he})})}catch{console.warn(`[react-tooltip] "${ve}" is not a valid CSS selector`)}const Me=document.querySelector(`[id='${n}']`);if(Me&&Kt.add({current:Me}),!Kt.size)return()=>null;const rn=(St=qe??Me)!==null&&St!==void 0?St:ai.current,Gt=new MutationObserver(he=>{he.forEach(Se=>{var dt;if(!rn||Se.type!=="attributes"||!(!((dt=Se.attributeName)===null||dt===void 0)&&dt.startsWith("data-tooltip-")))return;const Ut=jr(rn);hr(Ut)})}),le={attributes:!0,childList:!1,subtree:!1};if(rn){const he=jr(rn);hr(he),Gt.observe(rn,le)}return()=>{Gt.disconnect()}},[zt,ai,qe,n,i]),E.useEffect(()=>{J!=null&&J.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),pe&&!Y1("border",`${pe}`)&&console.warn(`[react-tooltip] "${pe}" is not a valid \`border\`.`),J!=null&&J.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),C&&!Y1("opacity",`${C}`)&&console.warn(`[react-tooltip] "${C}" is not a valid \`opacity\`.`)},[]);let qn=x;const Qi=E.useRef(null);if(o){const St=o({content:(qe==null?void 0:qe.getAttribute("data-tooltip-content"))||Ie||null,activeAnchor:qe});qn=St?nt.createElement("div",{ref:Qi,className:"react-tooltip-content-wrapper"},St):null}else Ie&&(qn=Ie);wt&&(qn=nt.createElement(iR,{content:wt}));const Ii={forwardRef:Re,id:e,anchorId:n,anchorSelect:i,className:Zh(u,yt),classNameArrow:f,content:qn,contentWrapperRef:Qi,place:tr,variant:ii,offset:Mt,wrapper:W,events:ge,openOnClick:w,positionStrategy:Pt,middlewares:_,delayShow:wn,delayHide:Bn,float:dr,hidden:li,noArrow:M,clickable:D,closeOnEsc:$,closeOnScroll:ee,closeOnResize:ie,openEvents:z,closeEvents:ae,globalCloseEvents:te,imperativeModeOnly:ue,style:J,position:oe,isOpen:B,defaultIsOpen:X,border:pe,opacity:C,arrowColor:I,arrowSize:se,setIsOpen:N,afterShow:fe,afterHide:Te,disableTooltip:ce,activeAnchor:qe,setActiveAnchor:St=>ft(St),role:ct};return nt.createElement(rR,{...Ii})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||V1({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||V1({css:`
237
- .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const lR=e=>{if(!e)return;const n=mt.getQueryData([gl]);if(!n)return;const i=mt.getQueryData([ei,n.teamId]);return i==null?void 0:i.find(l=>l.id===e)},[aR,qp]=Un(!1),sR=()=>qp(e=>!e),Wh=()=>qp(!1),oR=({content:e,activeAnchor:n})=>{if(!n)return null;const i=n.getAttribute("data-tab-id"),l=_c.get().find(u=>u.id===i),s=lR(l==null?void 0:l.options.dataSourceId);if(!l)return e;const o=()=>{Bi("New tab name",l.label).then(u=>{u&&kp(l.id,u)})};return b.jsxs("div",{children:[b.jsxs("button",{className:jn.tooltipLabel,onClick:o,children:[b.jsxs("div",{className:"overflow-hidden",children:[b.jsx("p",{className:"text-xs",children:"label"}),b.jsx("p",{className:"truncate font-semibold",children:l.label})]}),b.jsx("span",{children:"✏️"})]}),b.jsxs("div",{className:jn.tooltipInfoEntry,children:[b.jsx("p",{className:"text-sm",children:"table"}),b.jsx("p",{className:"truncate font-semibold",children:l.options.table})]}),s&&b.jsxs("div",{className:jn.tooltipInfoEntry,children:[b.jsxs("p",{className:"text-sm",children:["data source [",s.dbType,"]"]}),b.jsx("p",{className:"truncate font-semibold",children:s.name})]}),l.options.joins.length>0&&b.jsxs("div",{className:jn.tooltipInfoEntry,children:[b.jsx("p",{className:"text-sm",children:"joins"}),b.jsx("p",{className:"font-semibold",children:l.options.joins.map(u=>u.table).join(", ")})]}),l.options.filters.length>0&&b.jsxs("div",{className:jn.tooltipInfoEntry,children:[b.jsx("p",{className:"text-sm",children:"filters"}),l.options.filters.map(u=>b.jsx("p",{className:"truncate font-semibold",children:LT(u)}))]})]})},uR=()=>{const e=KA(),n=Tc(),i=Rc(co.laptop),l=E.useMemo(()=>{if(!n)return;const d=n.find(h=>h.id===e);return d||n[0]},[e,n]),s=d=>C1(d),o=d=>{d.button===1&&C1(d.currentTarget.dataset.tabId)},u=d=>{const h=n.find(m=>m.id===d);Bi("New tab name",h==null?void 0:h.label).then(m=>{m&&kp(d,m)})},f=E.useCallback(d=>{kc(h=>h.map(m=>m.id!==l.id?m:{...m,options:d(m.options)}))},[l]);return n.length<1?b.jsx(PC,{to:"/"}):b.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[i&&b.jsx(Nx,{id:"tab",render:oR,className:"z-10 shadow-md border border-blue-400 p-0!",offset:-4,noArrow:!0,opacity:1,variant:"light",clickable:!0,delayShow:500}),b.jsx("div",{className:jn.tabs,children:n==null?void 0:n.map(d=>b.jsxs("div",{className:Ae(jn.tab,d.id===(l==null?void 0:l.id)&&jn.active),"data-tab-id":d.id,"data-tooltip-id":"tab","data-tooltip-content":d.label,onAuxClick:o,onContextMenu:h=>{h.preventDefault(),u(d.id)},children:[b.jsxs("button",{className:"cursor-pointer truncate w-full",onClick:()=>Tp(d.id),children:["📄 ",d.label]}),b.jsx("button",{className:jn.closeButton,onClick:()=>s(d.id),children:b.jsx(Fi,{width:20,height:20})}),d.id===(l==null?void 0:l.id)&&b.jsx("span",{className:jn.activeTab})]},d.id))}),l&&b.jsx(yx,{updater:f,options:l.options,name:l.label,tabId:l.id}),!i&&b.jsxs("div",{className:"fixed bottom-0 left-0 right-0 p-2 flex justify-end gap-2",children:[b.jsx(vp,{to:"/",children:b.jsx("button",{className:jn.mobileButton,children:"🏠"})}),b.jsx("button",{onClick:Ku,className:jn.mobileButton,children:"✏️"}),b.jsx("button",{onClick:sR,className:jn.mobileButton,children:"☰"})]})]})},cR=()=>{const e=t_(),n=E.useCallback(i=>{jp(l=>l?{...l,options:i(l.options)}:(un.error("Something went wrong."),l))},[]);return e?b.jsxs(tn,{isVisible:!0,onClose:Yh,children:[b.jsx(er,{onClick:Yh}),b.jsx(yx,{className:"border border-gray-200 bg-(--bg)",name:e.label,options:e.options,updater:n})]}):null},fR="_root_1fdc5_2",dR="_down_1fdc5_2",hR="_chevron_1fdc5_2",pR="_table-name-container_1fdc5_2",mR="_link_1fdc5_2",yR="_table-name_1fdc5_2",gR="_ul_1fdc5_2",bR="_column-type_1fdc5_2",Xr={root:fR,down:dR,chevron:hR,tableNameContainer:pR,link:mR,tableName:yR,ul:gR,columnType:bR},vR=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"});function xR(e,n){if(n&&e.toLowerCase().includes(n))return"bg-yellow-200"}const wR=({insp:e,filter:n,expanded:i})=>{const l=E.useMemo(()=>i||n.length<1?e.columns:e.columns.filter(s=>s.name.toLowerCase().includes(n)),[e,n,i]);return b.jsx("ul",{className:Xr.ul,children:l.map(s=>b.jsx(b.Fragment,{children:b.jsxs("li",{children:[s.isPrimary?"🔐":"🏷️"," ",b.jsx("span",{className:xR(s.name,n),children:s.name})," ",b.jsxs("span",{className:Xr.columnType,children:["[",s.type,"]"]}),s.ref&&b.jsxs("span",{children:[" ➡️ ",b.jsx("span",{className:Xr.columnType,children:s.ref.table}),".",s.ref.field]})]},s.name+s.type)}))},e.id)};function SR({id:e}){const{data:n}=Ac(e),{data:i}=Oa(e),l=Tr(),{pathname:s}=Ln(),o=OA(),u=Gv(),f=jA(),d=E.useMemo(()=>n!=null&&n.lastInspected?vR.format(new Date(n.lastInspected)):"--",[n]),[h,m]=E.useState({}),[g,x]=E.useState(""),v=Da(sn.EDITOR),w=g.toLowerCase(),A=E.useMemo(()=>{if(!w||!i)return i||[];const M=[];for(const D of i){if(D.tableName.toLowerCase().includes(w)){M.push(D);continue}D.columns.findIndex($=>$.name.toLowerCase().includes(w))>=0&&M.push(D)}return M},[w,i]),_=M=>{m(D=>({...D,[M]:!D[M]}))},k=M=>{Xs(M,{table:M,dataSourceId:e},!0),ba(void 0),Wh(),s!==pt.workbench.path&&l(pt.workbench.path)},O=()=>{u.mutate(e)},R=async()=>{const M=await Bi("Enter name",n==null?void 0:n.name);M&&o.mutate({id:e,dataSource:{name:M}})},q=async()=>{await rx("Are you sure you want to delete this data source?")&&(f.mutate(e),ba(void 0))};return b.jsxs("div",{className:Xr.root,children:[b.jsxs("h3",{className:"page-head flex gap-2 items-center",children:[n&&b.jsx(Zs,{size:32,type:n.dbType}),b.jsx("span",{className:"truncate",children:n==null?void 0:n.name})]}),b.jsx("p",{className:"mt-1 text-sm font-semibold",children:d}),v&&b.jsxs("div",{className:"mt-2 flex gap-2",children:[b.jsx("button",{disabled:u.isLoading,onClick:O,className:"button tertiary flex items-center gap-1",children:"Refresh schema"}),b.jsx("button",{disabled:u.isLoading,onClick:R,className:"button tertiary",children:"Rename"}),b.jsx("button",{disabled:u.isLoading,onClick:q,className:"button tertiary",children:"Delete"})]}),b.jsx("input",{className:"input w-full mb-2 mt-4 bg-gray-50",placeholder:"Search table/column",value:g,onChange:M=>x(M.target.value),autoFocus:!0}),b.jsx("div",{className:"overflow-y-auto",children:A==null?void 0:A.map(M=>b.jsxs("div",{children:[b.jsxs("div",{className:Xr.tableNameContainer,children:[b.jsx("button",{className:Ae(Xr.chevron,h[M.id]&&Xr.down),onClick:()=>_(M.id),children:b.jsx(hx,{width:16,height:16})}),b.jsx("button",{className:Ae(Xr.tableName,"flex-1"),onClick:()=>_(M.id),children:M.tableName}),b.jsx("button",{className:Xr.link,onClick:()=>k(M.tableName),children:"↗️"})]}),(h[M.id]||g.length>0)&&b.jsx(wR,{insp:M,filter:w,expanded:h[M.id]})]},M.id))})]})}const CR=()=>{const e=kT(),[n,i]=E.useState(void 0);E.useEffect(()=>{e&&i(e)},[e]);const l=()=>ba(void 0);return b.jsxs(tn,{isVisible:e!=null,onClose:l,onClosed:()=>i(void 0),backdropClose:!0,children:[b.jsx(er,{onClick:l}),n&&b.jsx(SR,{id:n})]})},ER="_root_114y7_1",AR={root:ER};function TR(e,n=500){const[i,l]=E.useState(e);return E.useEffect(()=>{const s=setTimeout(()=>l(e),n);return()=>clearTimeout(s)},[e,n]),i}const kR="_search_1h6mg_2",_R="_entry_1h6mg_2",Z1={search:kR,entry:_R},NR={table:"📄",query:"📖"},RR=({onTable:e,onQuery:n,autoFocus:i})=>{const[l,s]=E.useState(""),[o,u]=E.useState(-1),f=TR(l),{data:d}=kr(),{data:h}=TA(f,d==null?void 0:d.teamId),m=v=>{v.type==="table"?e(v.name,v.dataSourceId):v.type==="query"&&n(v.id,v.dataSourceId)},g=v=>{var w;h&&(v.key==="ArrowDown"?(v.preventDefault(),u(A=>(A+1)%h.length)):v.key==="ArrowUp"?(v.preventDefault(),u(A=>(A-1+h.length)%h.length)):v.key==="Enter"&&o>=0&&(w=h[o])!=null&&w.name&&(v.preventDefault(),m(h[o])))},x=v=>{const w=v.currentTarget.dataset.tableId,A=h==null?void 0:h.find(_=>_.id===w);A&&m(A)};return b.jsxs(b.Fragment,{children:[b.jsx("input",{className:Z1.search,placeholder:"Search table or saved query to start from",value:l,onChange:v=>s(v.target.value),onKeyDown:g,autoFocus:i}),Nc(h==null?void 0:h.length,0)&&b.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:h.map((v,w)=>b.jsxs("button",{className:Z1.entry,"data-is-active":o===w,"data-table-id":v.id,onClick:x,children:[b.jsxs("p",{className:"font-semibold",children:[NR[v.type]," ",v.name]}),b.jsxs("p",{className:"text-xs text-blue-600",children:["📦 ",v.dataSourceName]})]},v.id))})]})},OR=()=>{const e=iT(),n=(s,o)=>{e==null||e.onConfirm("table",s,o)},i=(s,o)=>{e==null||e.onConfirm("query",s,o)},l=()=>{e==null||e.onCancel()};return b.jsxs(tn,{isVisible:!!e,onClose:l,children:[b.jsx(er,{onClick:l}),b.jsx("div",{className:AR.root,children:b.jsx(RR,{autoFocus:!0,onTable:n,onQuery:i})})]})},jR=()=>{const e=Ln();E.useEffect(()=>{},[e.pathname])},J1={active:!1,version:""};async function DR(){try{const{data:e}=await Ec.get("/status",{timeout:500,validateStatus:()=>!0});return(e==null?void 0:e.data)||J1}catch{return J1}}function MR(){const e=mt.getQueryState([gl]);(e==null?void 0:e.status)==="error"&&mt.invalidateQueries({queryKey:[gl]})}function LR(){const e=mt.getQueryState([gl]);(e==null?void 0:e.status)==="success"&&mt.resetQueries({queryKey:[gl]})}const zR=()=>zn({queryKey:["server-status"],queryFn:DR,onSuccess:({active:e})=>{e?MR():LR()},refetchOnWindowFocus:!0,refetchInterval:(e,n)=>{var i,l;return(l=(i=n==null?void 0:n.state)==null?void 0:i.data)!=null&&l.active?2e4:4e3},retry:!1}),W1=e=>{const[n]=e.split("-");return n.split(".").map(Number)},UR=(e,n)=>{const i=W1(e),l=W1(n);for(let s=0;s<3;s++){const o=i[s]||0,u=l[s]||0;if(o>u)return 1;if(o<u)return-1}return 0};function eb(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,s=i.indexOf(n);for(;s!==-1;)l++,s=i.indexOf(n,s+n.length);return l}const on=Pi(/[A-Za-z]/),en=Pi(/[\dA-Za-z]/),BR=Pi(/[#-'*+\--9=?A-Z^-~]/);function cc(e){return e!==null&&(e<32||e===127)}const ep=Pi(/\d/),qR=Pi(/[\dA-Fa-f]/),HR=Pi(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function rt(e){return e!==null&&(e<0||e===32)}function Ue(e){return e===-2||e===-1||e===32}const Mc=Pi(new RegExp("\\p{P}|\\p{S}","u")),xl=Pi(/\s/);function Pi(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function FR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Lc=function(e){if(e==null)return VR;if(typeof e=="function")return zc(e);if(typeof e=="object")return Array.isArray(e)?PR(e):QR(e);if(typeof e=="string")return IR(e);throw new Error("Expected function, string, or object as test")};function PR(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=Lc(e[i]);return zc(l);function l(...s){let o=-1;for(;++o<n.length;)if(n[o].apply(this,s))return!0;return!1}}function QR(e){const n=e;return zc(i);function i(l){const s=l;let o;for(o in e)if(s[o]!==n[o])return!1;return!0}}function IR(e){return zc(n);function n(i){return i&&i.type===e}}function zc(e){return n;function n(i,l,s){return!!($R(i)&&e.call(this,i,typeof l=="number"?l:void 0,s||void 0))}}function VR(){return!0}function $R(e){return e!==null&&typeof e=="object"&&"type"in e}const Rx=[],YR=!0,tp=!1,KR="skip";function Ox(e,n,i,l){let s;typeof n=="function"&&typeof i!="function"?(l=i,i=n):s=n;const o=Lc(s),u=l?-1:1;f(e,void 0,[])();function f(d,h,m){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=Rx,w,A,_;if((!n||o(d,h,m[m.length-1]||void 0))&&(v=GR(i(d,m)),v[0]===tp))return v;if("children"in d&&d.children){const k=d;if(k.children&&v[0]!==KR)for(A=(l?k.children.length:-1)+u,_=m.concat(k);A>-1&&A<k.children.length;){const O=k.children[A];if(w=f(O,A,_)(),w[0]===tp)return w;A=typeof w[1]=="number"?w[1]:A+u}}return v}}}function GR(e){return Array.isArray(e)?e:typeof e=="number"?[YR,e]:e==null?Rx:[e]}function XR(e,n,i){const s=Lc((i||{}).ignore||[]),o=ZR(n);let u=-1;for(;++u<o.length;)Ox(e,"text",f);function f(h,m){let g=-1,x;for(;++g<m.length;){const v=m[g],w=x?x.children:void 0;if(s(v,w?w.indexOf(v):void 0,x))return;x=v}if(x)return d(h,m)}function d(h,m){const g=m[m.length-1],x=o[u][0],v=o[u][1];let w=0;const _=g.children.indexOf(h);let k=!1,O=[];x.lastIndex=0;let R=x.exec(h.value);for(;R;){const q=R.index,M={index:R.index,input:R.input,stack:[...m,h]};let D=v(...R,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=q+1:(w!==q&&O.push({type:"text",value:h.value.slice(w,q)}),Array.isArray(D)?O.push(...D):D&&O.push(D),w=q+R[0].length,k=!0),!x.global)break;R=x.exec(h.value)}return k?(w<h.value.length&&O.push({type:"text",value:h.value.slice(w)}),g.children.splice(_,1,...O)):O=[h],_+O.length}}function ZR(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const s=i[l];n.push([JR(s[0]),WR(s[1])])}return n}function JR(e){return typeof e=="string"?new RegExp(FR(e),"g"):e}function WR(e){return typeof e=="function"?e:function(){return e}}const dh="phrasing",hh=["autolink","link","image","label"];function eO(){return{transforms:[sO],enter:{literalAutolink:nO,literalAutolinkEmail:ph,literalAutolinkHttp:ph,literalAutolinkWww:ph},exit:{literalAutolink:aO,literalAutolinkEmail:lO,literalAutolinkHttp:rO,literalAutolinkWww:iO}}}function tO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:hh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:hh},{character:":",before:"[ps]",after:"\\/",inConstruct:dh,notInConstruct:hh}]}}function nO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ph(e){this.config.enter.autolinkProtocol.call(this,e)}function rO(e){this.config.exit.autolinkProtocol.call(this,e)}function iO(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function lO(e){this.config.exit.autolinkEmail.call(this,e)}function aO(e){this.exit(e)}function sO(e){XR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uO]],{ignore:["link","linkReference"]})}function oO(e,n,i,l,s){let o="";if(!jx(s)||(/^w/i.test(n)&&(i=n+i,n="",o="http://"),!cO(i)))return!1;const u=fO(i+l);if(!u[0])return!1;const f={type:"link",title:null,url:o+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function uO(e,n,i,l){return!jx(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function cO(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function fO(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const s=eb(e,"(");let o=eb(e,")");for(;l!==-1&&s>o;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),o++;return[e,i]}function jx(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||xl(i)||Mc(i))&&(!n||i!==47)}function ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Dx.peek=xO;function dO(){this.buffer()}function hO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pO(){this.buffer()}function mO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function yO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=ar(this.sliceSerialize(e)).toLowerCase(),i.label=n}function gO(e){this.exit(e)}function bO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=ar(this.sliceSerialize(e)).toLowerCase(),i.label=n}function vO(e){this.exit(e)}function xO(){return"["}function Dx(e,n,i,l){const s=i.createTracker(l);let o=s.move("[^");const u=i.enter("footnoteReference"),f=i.enter("reference");return o+=s.move(i.safe(i.associationId(e),{after:"]",before:o})),f(),u(),o+=s.move("]"),o}function wO(){return{enter:{gfmFootnoteCallString:dO,gfmFootnoteCall:hO,gfmFootnoteDefinitionLabelString:pO,gfmFootnoteDefinition:mO},exit:{gfmFootnoteCallString:yO,gfmFootnoteCall:gO,gfmFootnoteDefinitionLabelString:bO,gfmFootnoteDefinition:vO}}}function SO(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:Dx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,s,o,u){const f=o.createTracker(u);let d=f.move("[^");const h=o.enter("footnoteDefinition"),m=o.enter("label");return d+=f.move(o.safe(o.associationId(l),{before:d,after:"]"})),m(),d+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),d+=f.move((n?`
238
- `:" ")+o.indentLines(o.containerFlow(l,f.current()),n?Mx:CO))),h(),d}}function CO(e,n,i){return n===0?e:Mx(e,n,i)}function Mx(e,n,i){return(i?"":" ")+e}const EO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lx.peek=NO;function AO(){return{canContainEols:["delete"],enter:{strikethrough:kO},exit:{strikethrough:_O}}}function TO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:EO}],handlers:{delete:Lx}}}function kO(e){this.enter({type:"delete",children:[]},e)}function _O(e){this.exit(e)}function Lx(e,n,i,l){const s=i.createTracker(l),o=i.enter("strikethrough");let u=s.move("~~");return u+=i.containerPhrasing(e,{...s.current(),before:u,after:"~"}),u+=s.move("~~"),o(),u}function NO(){return"~"}function RO(e){return e.length}function OO(e,n){const i=n||{},l=(i.align||[]).concat(),s=i.stringLength||RO,o=[],u=[],f=[],d=[];let h=0,m=-1;for(;++m<e.length;){const A=[],_=[];let k=-1;for(e[m].length>h&&(h=e[m].length);++k<e[m].length;){const O=jO(e[m][k]);if(i.alignDelimiters!==!1){const R=s(O);_[k]=R,(d[k]===void 0||R>d[k])&&(d[k]=R)}A.push(O)}u[m]=A,f[m]=_}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<h;)o[g]=tb(l[g]);else{const A=tb(l);for(;++g<h;)o[g]=A}g=-1;const x=[],v=[];for(;++g<h;){const A=o[g];let _="",k="";A===99?(_=":",k=":"):A===108?_=":":A===114&&(k=":");let O=i.alignDelimiters===!1?1:Math.max(1,d[g]-_.length-k.length);const R=_+"-".repeat(O)+k;i.alignDelimiters!==!1&&(O=_.length+O+k.length,O>d[g]&&(d[g]=O),v[g]=O),x[g]=R}u.splice(1,0,x),f.splice(1,0,v),m=-1;const w=[];for(;++m<u.length;){const A=u[m],_=f[m];g=-1;const k=[];for(;++g<h;){const O=A[g]||"";let R="",q="";if(i.alignDelimiters!==!1){const M=d[g]-(_[g]||0),D=o[g];D===114?R=" ".repeat(M):D===99?M%2?(R=" ".repeat(M/2+.5),q=" ".repeat(M/2-.5)):(R=" ".repeat(M/2),q=R):q=" ".repeat(M)}i.delimiterStart!==!1&&!g&&k.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&O==="")&&(i.delimiterStart!==!1||g)&&k.push(" "),i.alignDelimiters!==!1&&k.push(R),k.push(O),i.alignDelimiters!==!1&&k.push(q),i.padding!==!1&&k.push(" "),(i.delimiterEnd!==!1||g!==h-1)&&k.push("|")}w.push(i.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return w.join(`
239
- `)}function jO(e){return e==null?"":String(e)}function tb(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function DO(e,n,i,l){const s=i.enter("blockquote"),o=i.createTracker(l);o.move("> "),o.shift(2);const u=i.indentLines(i.containerFlow(e,o.current()),MO);return s(),u}function MO(e,n,i){return">"+(i?"":" ")+e}function LO(e,n){return nb(e,n.inConstruct,!0)&&!nb(e,n.notInConstruct,!1)}function nb(e,n,i){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return i;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function rb(e,n,i,l){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
240
- `&&LO(i.stack,i.unsafe[s]))return/[ \t]/.test(l.before)?"":" ";return`\\
241
- `}function zO(e,n){const i=String(e);let l=i.indexOf(n),s=l,o=0,u=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===s?++o>u&&(u=o):o=1,s=l+n.length,l=i.indexOf(n,s);return u}function UO(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function BO(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function qO(e,n,i,l){const s=BO(i),o=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(UO(e,i)){const g=i.enter("codeIndented"),x=i.indentLines(o,HO);return g(),x}const f=i.createTracker(l),d=s.repeat(Math.max(zO(o,s)+1,3)),h=i.enter("codeFenced");let m=f.move(d);if(e.lang){const g=i.enter(`codeFencedLang${u}`);m+=f.move(i.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${u}`);m+=f.move(" "),m+=f.move(i.safe(e.meta,{before:m,after:`
242
- `,encode:["`"],...f.current()})),g()}return m+=f.move(`
243
- `),o&&(m+=f.move(o+`
244
- `)),m+=f.move(d),h(),m}function HO(e,n,i){return(i?"":" ")+e}function Hp(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function FO(e,n,i,l){const s=Hp(i),o=s==='"'?"Quote":"Apostrophe",u=i.enter("definition");let f=i.enter("label");const d=i.createTracker(l);let h=d.move("[");return h+=d.move(i.safe(i.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":`
245
- `,...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(i.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),u(),h}function PO(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Ws(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wa(e){if(e===null||rt(e)||xl(e))return 1;if(Mc(e))return 2}function fc(e,n,i){const l=wa(e),s=wa(n);return l===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zx.peek=QO;function zx(e,n,i,l){const s=PO(i),o=i.enter("emphasis"),u=i.createTracker(l),f=u.move(s);let d=u.move(i.containerPhrasing(e,{after:s,before:f,...u.current()}));const h=d.charCodeAt(0),m=fc(l.before.charCodeAt(l.before.length-1),h,s);m.inside&&(d=Ws(h)+d.slice(1));const g=d.charCodeAt(d.length-1),x=fc(l.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+Ws(g));const v=u.move(s);return o(),i.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},f+d+v}function QO(e,n,i){return i.options.emphasis||"*"}function Fp(e,n,i,l){let s,o,u;typeof n=="function"?(o=void 0,u=n,s=i):(o=n,u=i,s=l),Ox(e,o,f,s);function f(d,h){const m=h[h.length-1],g=m?m.children.indexOf(d):void 0;return u(d,g,m)}}const IO={};function Pp(e,n){const i=IO,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Ux(e,l,s)}function Ux(e,n,i){if(VO(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ib(e.children,n,i)}return Array.isArray(e)?ib(e,n,i):""}function ib(e,n,i){const l=[];let s=-1;for(;++s<e.length;)l[s]=Ux(e[s],n,i);return l.join("")}function VO(e){return!!(e&&typeof e=="object")}function $O(e,n){let i=!1;return Fp(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return i=!0,tp}),!!((!e.depth||e.depth<3)&&Pp(e)&&(n.options.setext||i))}function YO(e,n,i,l){const s=Math.max(Math.min(6,e.depth||1),1),o=i.createTracker(l);if($O(e,i)){const m=i.enter("headingSetext"),g=i.enter("phrasing"),x=i.containerPhrasing(e,{...o.current(),before:`
246
- `,after:`
247
- `});return g(),m(),x+`
248
- `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
249
- `))+1))}const u="#".repeat(s),f=i.enter("headingAtx"),d=i.enter("phrasing");o.move(u+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
250
- `,...o.current()});return/^[\t ]/.test(h)&&(h=Ws(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,i.options.closeAtx&&(h+=" "+u),d(),f(),h}Bx.peek=KO;function Bx(e){return e.value||""}function KO(){return"<"}qx.peek=GO;function qx(e,n,i,l){const s=Hp(i),o=s==='"'?"Quote":"Apostrophe",u=i.enter("image");let f=i.enter("label");const d=i.createTracker(l);let h=d.move("![");return h+=d.move(i.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(i.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),h+=d.move(")"),u(),h}function GO(){return"!"}Hx.peek=XO;function Hx(e,n,i,l){const s=e.referenceType,o=i.enter("imageReference");let u=i.enter("label");const f=i.createTracker(l);let d=f.move("![");const h=i.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),u();const m=i.stack;i.stack=[],u=i.enter("reference");const g=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return u(),i.stack=m,o(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function XO(){return"!"}Fx.peek=ZO;function Fx(e,n,i){let l=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(l);)s+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++o<i.unsafe.length;){const u=i.unsafe[o],f=i.compilePattern(u);let d;if(u.atBreak)for(;d=f.exec(l);){let h=d.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(d.index+1)}}return s+l+s}function ZO(){return"`"}function Px(e,n){const i=Pp(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Qx.peek=JO;function Qx(e,n,i,l){const s=Hp(i),o=s==='"'?"Quote":"Apostrophe",u=i.createTracker(l);let f,d;if(Px(e,i)){const m=i.stack;i.stack=[],f=i.enter("autolink");let g=u.move("<");return g+=u.move(i.containerPhrasing(e,{before:g,after:">",...u.current()})),g+=u.move(">"),f(),i.stack=m,g}f=i.enter("link"),d=i.enter("label");let h=u.move("[");return h+=u.move(i.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=i.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(i.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(d=i.enter("destinationRaw"),h+=u.move(i.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),d(),e.title&&(d=i.enter(`title${o}`),h+=u.move(" "+s),h+=u.move(i.safe(e.title,{before:h,after:s,...u.current()})),h+=u.move(s),d()),h+=u.move(")"),f(),h}function JO(e,n,i){return Px(e,i)?"<":"["}Ix.peek=WO;function Ix(e,n,i,l){const s=e.referenceType,o=i.enter("linkReference");let u=i.enter("label");const f=i.createTracker(l);let d=f.move("[");const h=i.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),u();const m=i.stack;i.stack=[],u=i.enter("reference");const g=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return u(),i.stack=m,o(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function WO(){return"["}function Qp(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function ej(e){const n=Qp(e),i=e.options.bulletOther;if(!i)return n==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+i+"`) to be different");return i}function tj(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Vx(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function nj(e,n,i,l){const s=i.enter("list"),o=i.bulletCurrent;let u=e.ordered?tj(i):Qp(i);const f=e.ordered?u==="."?")":".":ej(i);let d=n&&i.bulletLastUsed?u===i.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(d=!0),Vx(i)===u&&m){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=f),i.bulletCurrent=u;const h=i.containerFlow(e,l);return i.bulletLastUsed=u,i.bulletCurrent=o,s(),h}function rj(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function ij(e,n,i,l){const s=rj(i);let o=i.bulletCurrent||Qp(i);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(i.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let u=o.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=i.createTracker(l);f.move(o+" ".repeat(u-o.length)),f.shift(u);const d=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),m);return d(),h;function m(g,x,v){return x?(v?"":" ".repeat(u))+g:(v?o:o+" ".repeat(u-o.length))+g}}function lj(e,n,i,l){const s=i.enter("paragraph"),o=i.enter("phrasing"),u=i.containerPhrasing(e,l);return o(),s(),u}const aj=Lc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sj(e,n,i,l){return(e.children.some(function(u){return aj(u)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function oj(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}$x.peek=uj;function $x(e,n,i,l){const s=oj(i),o=i.enter("strong"),u=i.createTracker(l),f=u.move(s+s);let d=u.move(i.containerPhrasing(e,{after:s,before:f,...u.current()}));const h=d.charCodeAt(0),m=fc(l.before.charCodeAt(l.before.length-1),h,s);m.inside&&(d=Ws(h)+d.slice(1));const g=d.charCodeAt(d.length-1),x=fc(l.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+Ws(g));const v=u.move(s+s);return o(),i.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},f+d+v}function uj(e,n,i){return i.options.strong||"*"}function cj(e,n,i,l){return i.safe(e.value,l)}function fj(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function dj(e,n,i){const l=(Vx(i)+(i.options.ruleSpaces?" ":"")).repeat(fj(i));return i.options.ruleSpaces?l.slice(0,-1):l}const Yx={blockquote:DO,break:rb,code:qO,definition:FO,emphasis:zx,hardBreak:rb,heading:YO,html:Bx,image:qx,imageReference:Hx,inlineCode:Fx,link:Qx,linkReference:Ix,list:nj,listItem:ij,paragraph:lj,root:sj,strong:$x,text:cj,thematicBreak:dj},lb=document.createElement("i");function Ip(e){const n="&"+e+";";lb.innerHTML=n;const i=lb.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function Kx(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}const hj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pj(e){return e.replace(hj,mj)}function mj(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),o=s===120||s===88;return Kx(i.slice(o?2:1),o?16:10)}return Ip(i)||e}function yj(){return{enter:{table:gj,tableData:ab,tableHeader:ab,tableRow:vj},exit:{codeText:xj,table:bj,tableData:mh,tableHeader:mh,tableRow:mh}}}function gj(e){const n=e._align;this.enter({type:"table",align:n.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function bj(e){this.exit(e),this.data.inTable=void 0}function vj(e){this.enter({type:"tableRow",children:[]},e)}function mh(e){this.exit(e)}function ab(e){this.enter({type:"tableCell",children:[]},e)}function xj(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,wj));const i=this.stack[this.stack.length-1];i.type,i.value=n,this.exit(e)}function wj(e,n){return n==="|"?n:e}function Sj(e){const n=e||{},i=n.tableCellPadding,l=n.tablePipeAlign,s=n.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
251
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:d,tableRow:f}};function u(v,w,A,_){return h(m(v,A,_),v.align)}function f(v,w,A,_){const k=g(v,A,_),O=h([k]);return O.slice(0,O.indexOf(`
252
- `))}function d(v,w,A,_){const k=A.enter("tableCell"),O=A.enter("phrasing"),R=A.containerPhrasing(v,{..._,before:o,after:o});return O(),k(),R}function h(v,w){return OO(v,{align:w,alignDelimiters:l,padding:i,stringLength:s})}function m(v,w,A){const _=v.children;let k=-1;const O=[],R=w.enter("table");for(;++k<_.length;)O[k]=g(_[k],w,A);return R(),O}function g(v,w,A){const _=v.children;let k=-1;const O=[],R=w.enter("tableRow");for(;++k<_.length;)O[k]=d(_[k],v,w,A);return R(),O}function x(v,w,A){let _=Yx.inlineCode(v,w,A);return A.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function Cj(){return{exit:{taskListCheckValueChecked:sb,taskListCheckValueUnchecked:sb,paragraph:Aj}}}function Ej(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Tj}}}function sb(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Aj(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const s=n.children;let o=-1,u;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){u=f;break}}u===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function Tj(e,n,i,l){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=i.createTracker(l);o&&f.move(u);let d=Yx.listItem(e,n,i,{...l,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+u}}function kj(){return[eO(),wO(),AO(),yj(),Cj()]}function _j(e){return{extensions:[tO(),SO(e),TO(),Sj(e),Ej()]}}function Mn(e,n,i,l){const s=e.length;let o=0,u;if(n<0?n=-n>s?0:s+n:n=n>s?s:n,i=i>0?i:0,l.length<1e4)u=Array.from(l),u.unshift(n,i),e.splice(...u);else for(i&&e.splice(n,i);o<l.length;)u=l.slice(o,o+1e4),u.unshift(n,0),e.splice(...u),o+=1e4,n+=1e4}function Jn(e,n){return e.length>0?(Mn(e,e.length,0,n),e):n}const ob={}.hasOwnProperty;function Gx(e){const n={};let i=-1;for(;++i<e.length;)Nj(n,e[i]);return n}function Nj(e,n){let i;for(i in n){const s=(ob.call(e,i)?e[i]:void 0)||(e[i]={}),o=n[i];let u;if(o)for(u in o){ob.call(s,u)||(s[u]=[]);const f=o[u];Rj(s[u],Array.isArray(f)?f:f?[f]:[])}}}function Rj(e,n){let i=-1;const l=[];for(;++i<n.length;)(n[i].add==="after"?e:l).push(n[i]);Mn(e,0,0,l)}const Oj={tokenize:Uj,partial:!0},Xx={tokenize:Bj,partial:!0},Zx={tokenize:qj,partial:!0},Jx={tokenize:Hj,partial:!0},jj={tokenize:Fj,partial:!0},Wx={name:"wwwAutolink",tokenize:Lj,previous:tw},ew={name:"protocolAutolink",tokenize:zj,previous:nw},ri={name:"emailAutolink",tokenize:Mj,previous:rw},Nr={};function Dj(){return{text:Nr}}let ul=48;for(;ul<123;)Nr[ul]=ri,ul++,ul===58?ul=65:ul===91&&(ul=97);Nr[43]=ri;Nr[45]=ri;Nr[46]=ri;Nr[95]=ri;Nr[72]=[ri,ew];Nr[104]=[ri,ew];Nr[87]=[ri,Wx];Nr[119]=[ri,Wx];function Mj(e,n,i){const l=this;let s,o;return u;function u(g){return!np(g)||!rw.call(l,l.previous)||Vp(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return np(g)?(e.consume(g),f):g===64?(e.consume(g),d):i(g)}function d(g){return g===46?e.check(jj,m,h)(g):g===45||g===95||en(g)?(o=!0,e.consume(g),d):m(g)}function h(g){return e.consume(g),s=!0,d}function m(g){return o&&s&&on(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):i(g)}}function Lj(e,n,i){const l=this;return s;function s(u){return u!==87&&u!==119||!tw.call(l,l.previous)||Vp(l.events)?i(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Oj,e.attempt(Xx,e.attempt(Zx,o),i),i)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function zj(e,n,i){const l=this;let s="",o=!1;return u;function u(g){return(g===72||g===104)&&nw.call(l,l.previous)&&!Vp(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(on(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(g),d}return i(g)}function d(g){return g===47?(e.consume(g),o?h:(o=!0,d)):i(g)}function h(g){return g===null||cc(g)||rt(g)||xl(g)||Mc(g)?i(g):e.attempt(Xx,e.attempt(Zx,m),i)(g)}function m(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function Uj(e,n,i){let l=0;return s;function s(u){return(u===87||u===119)&&l<3?(l++,e.consume(u),s):u===46&&l===3?(e.consume(u),o):i(u)}function o(u){return u===null?i(u):n(u)}}function Bj(e,n,i){let l,s,o;return u;function u(h){return h===46||h===95?e.check(Jx,d,f)(h):h===null||rt(h)||xl(h)||h!==45&&Mc(h)?d(h):(o=!0,e.consume(h),u)}function f(h){return h===95?l=!0:(s=l,l=void 0),e.consume(h),u}function d(h){return s||l||!o?i(h):n(h)}}function qj(e,n){let i=0,l=0;return s;function s(u){return u===40?(i++,e.consume(u),s):u===41&&l<i?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Jx,n,o)(u):u===null||rt(u)||xl(u)?n(u):(e.consume(u),s)}function o(u){return u===41&&l++,e.consume(u),s}}function Hj(e,n,i){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||rt(f)||xl(f)?n(f):i(f)}function s(f){return f===null||f===40||f===91||rt(f)||xl(f)?n(f):l(f)}function o(f){return on(f)?u(f):i(f)}function u(f){return f===59?(e.consume(f),l):on(f)?(e.consume(f),u):i(f)}}function Fj(e,n,i){return l;function l(o){return e.consume(o),s}function s(o){return en(o)?i(o):n(o)}}function tw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||rt(e)}function nw(e){return!on(e)}function rw(e){return!(e===47||np(e))}function np(e){return e===43||e===45||e===46||e===95||en(e)}function Vp(e){let n=e.length,i=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}function La(e){const n=[];let i=-1,l=0,s=0;for(;++i<e.length;){const o=e.charCodeAt(i);let u="";if(o===37&&en(e.charCodeAt(i+1))&&en(e.charCodeAt(i+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(i+1);o<56320&&f>56319&&f<57344?(u=String.fromCharCode(o,f),s=1):u="�"}else u=String.fromCharCode(o);u&&(n.push(e.slice(l,i),encodeURIComponent(u)),l=i+s+1,u=""),s&&(i+=s,s=0)}return n.join("")+e.slice(l)}function Uc(e,n,i){const l=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!l.includes(o)&&(n=o(n,i),l.push(o))}return n}const rp={name:"attention",resolveAll:Pj,tokenize:Qj};function Pj(e,n){let i=-1,l,s,o,u,f,d,h,m;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},x={...e[i][1].start};ub(g,-d),ub(x,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},s={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[l][1].end={...u.start},e[i][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=Jn(h,[["enter",e[l][1],n],["exit",e[l][1],n]])),h=Jn(h,[["enter",s,n],["enter",u,n],["exit",u,n],["enter",o,n]]),h=Jn(h,Uc(n.parser.constructs.insideSpan.null,e.slice(l+1,i),n)),h=Jn(h,[["exit",o,n],["enter",f,n],["exit",f,n],["exit",s,n]]),e[i][1].end.offset-e[i][1].start.offset?(m=2,h=Jn(h,[["enter",e[i][1],n],["exit",e[i][1],n]])):m=0,Mn(e,l-1,i-l+3,h),i=l+h.length-m-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function Qj(e,n){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,s=wa(l);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const h=e.exit("attentionSequence"),m=wa(d),g=!m||m===2&&s||i.includes(d),x=!s||s===2&&m||i.includes(l);return h._open=!!(o===42?g:g&&(s||!x)),h._close=!!(o===42?x:x&&(m||!g)),n(d)}}function ub(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Ij={name:"autolink",tokenize:Vj};function Vj(e,n,i){let l=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return on(v)?(e.consume(v),u):v===64?i(v):h(v)}function u(v){return v===43||v===45||v===46||en(v)?(l=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),l=0,d):(v===43||v===45||v===46||en(v))&&l++<32?(e.consume(v),f):(l=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):v===null||v===32||v===60||cc(v)?i(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),m):BR(v)?(e.consume(v),h):i(v)}function m(v){return en(v)?g(v):i(v)}function g(v){return v===46?(e.consume(v),l=0,m):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):x(v)}function x(v){if((v===45||en(v))&&l++<63){const w=v===45?x:g;return e.consume(v),w}return i(v)}}function Pe(e,n,i,l){const s=l?l-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return Ue(d)?(e.enter(i),f(d)):n(d)}function f(d){return Ue(d)&&o++<s?(e.consume(d),f):(e.exit(i),n(d))}}const yo={partial:!0,tokenize:$j};function $j(e,n,i){return l;function l(o){return Ue(o)?Pe(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||xe(o)?n(o):i(o)}}const iw={continuation:{tokenize:Kj},exit:Gj,name:"blockQuote",tokenize:Yj};function Yj(e,n,i){const l=this;return s;function s(u){if(u===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return i(u)}function o(u){return Ue(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(u))}}function Kj(e,n,i){const l=this;return s;function s(u){return Ue(u)?Pe(e,o,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(iw,n,i)(u)}}function Gj(e){e.exit("blockQuote")}const lw={name:"characterEscape",tokenize:Xj};function Xj(e,n,i){return l;function l(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return HR(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(o)}}const aw={name:"characterReference",tokenize:Zj};function Zj(e,n,i){const l=this;let s=0,o,u;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=en,m(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=qR,m):(e.enter("characterReferenceValue"),o=7,u=ep,m(g))}function m(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return u===en&&!Ip(l.sliceSerialize(x))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return u(g)&&s++<o?(e.consume(g),m):i(g)}}const cb={partial:!0,tokenize:Wj},fb={concrete:!0,name:"codeFenced",tokenize:Jj};function Jj(e,n,i){const l=this,s={partial:!0,tokenize:M};let o=0,u=0,f;return d;function d(D){return h(D)}function h(D){const $=l.events[l.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===f?(u++,e.consume(D),m):u<3?i(D):(e.exit("codeFencedFenceSequence"),Ue(D)?Pe(e,g,"whitespace")(D):g(D))}function g(D){return D===null||xe(D)?(e.exit("codeFencedFence"),l.interrupt?n(D):e.check(cb,A,q)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||xe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Ue(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,v,"whitespace")(D)):D===96&&D===f?i(D):(e.consume(D),x)}function v(D){return D===null||xe(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(D))}function w(D){return D===null||xe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===f?i(D):(e.consume(D),w)}function A(D){return e.attempt(s,q,_)(D)}function _(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),k}function k(D){return o>0&&Ue(D)?Pe(e,O,"linePrefix",o+1)(D):O(D)}function O(D){return D===null||xe(D)?e.check(cb,A,q)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||xe(D)?(e.exit("codeFlowValue"),O(D)):(e.consume(D),R)}function q(D){return e.exit("codeFenced"),n(D)}function M(D,$,ee){let ie=0;return z;function z(oe){return D.enter("lineEnding"),D.consume(oe),D.exit("lineEnding"),ae}function ae(oe){return D.enter("codeFencedFence"),Ue(oe)?Pe(D,te,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):te(oe)}function te(oe){return oe===f?(D.enter("codeFencedFenceSequence"),ue(oe)):ee(oe)}function ue(oe){return oe===f?(ie++,D.consume(oe),ue):ie>=u?(D.exit("codeFencedFenceSequence"),Ue(oe)?Pe(D,J,"whitespace")(oe):J(oe)):ee(oe)}function J(oe){return oe===null||xe(oe)?(D.exit("codeFencedFence"),$(oe)):ee(oe)}}}function Wj(e,n,i){const l=this;return s;function s(u){return u===null?i(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return l.parser.lazy[l.now().line]?i(u):n(u)}}const yh={name:"codeIndented",tokenize:t6},e6={partial:!0,tokenize:n6};function t6(e,n,i){const l=this;return s;function s(h){return e.enter("codeIndented"),Pe(e,o,"linePrefix",5)(h)}function o(h){const m=l.events[l.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):i(h)}function u(h){return h===null?d(h):xe(h)?e.attempt(e6,u,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||xe(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function n6(e,n,i){const l=this;return s;function s(u){return l.parser.lazy[l.now().line]?i(u):xe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Pe(e,o,"linePrefix",5)(u)}function o(u){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(u):xe(u)?s(u):i(u)}}const r6={name:"codeText",previous:l6,resolve:i6,tokenize:a6};function i6(e){let n=e.length-4,i=3,l,s;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=i;++l<n;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(l=i-1,n++;++l<=n;)s===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(s=l):(l===n||e[l][1].type==="lineEnding")&&(e[s][1].type="codeTextData",l!==s+2&&(e[s][1].end=e[l-1][1].end,e.splice(s+2,l-s-2),n-=l-s-2,l=s+2),s=void 0);return e}function l6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function a6(e,n,i){let l=0,s,o;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(o=e.enter("codeTextSequence"),s=0,m(g)):xe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||xe(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function m(g){return g===96?(e.consume(g),s++,m):s===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(o.type="codeTextData",h(g))}}class s6{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,i,l){const s=i||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&Bs(this.left,l),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Bs(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Bs(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);Bs(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Bs(this.left,i.reverse())}}}function Bs(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function sw(e){const n={};let i=-1,l,s,o,u,f,d,h;const m=new s6(e);for(;++i<m.length;){for(;i in n;)i=n[i];if(l=m.get(i),i&&l[1].type==="chunkFlow"&&m.get(i-1)[1].type==="listItemPrefix"&&(d=l[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,o6(m,i)),i=n[i],h=!0);else if(l[1]._container){for(o=i,s=void 0;o--;)if(u=m.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(l[1].end={...m.get(s)[1].start},f=m.slice(s,i),f.unshift(l),m.splice(s,i-s+1,f))}}return Mn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function o6(e,n){const i=e.get(n)[1],l=e.get(n)[2];let s=n-1;const o=[];let u=i._tokenizer;u||(u=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],h={};let m,g,x=-1,v=i,w=0,A=0;const _=[A];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(m=l.sliceStream(v),v.next||m.push(null),g&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=i;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(A=x+1,_.push(A),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),x=_.length;x--;){const k=f.slice(_[x],_[x+1]),O=o.pop();d.push([O,O+k.length-1]),e.splice(O,2,k)}for(d.reverse(),x=-1;++x<d.length;)h[w+d[x][0]]=w+d[x][1],w+=d[x][1]-d[x][0]-1;return h}const u6={resolve:f6,tokenize:d6},c6={partial:!0,tokenize:h6};function f6(e){return sw(e),e}function d6(e,n){let i;return l;function l(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):xe(f)?e.check(c6,u,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function u(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function h6(e,n,i){const l=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Pe(e,o,"linePrefix")}function o(u){if(u===null||xe(u))return i(u);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(u):e.interrupt(l.parser.constructs.flow,i,n)(u)}}function ow(e,n,i,l,s,o,u,f,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return g;function g(k){return k===60?(e.enter(l),e.enter(s),e.enter(o),e.consume(k),e.exit(o),x):k===null||k===32||k===41||cc(k)?i(k):(e.enter(l),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),A(k))}function x(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(s),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===62?(e.exit("chunkString"),e.exit(f),x(k)):k===null||k===60||xe(k)?i(k):(e.consume(k),k===92?w:v)}function w(k){return k===60||k===62||k===92?(e.consume(k),v):v(k)}function A(k){return!m&&(k===null||k===41||rt(k))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(l),n(k)):m<h&&k===40?(e.consume(k),m++,A):k===41?(e.consume(k),m--,A):k===null||k===32||k===40||cc(k)?i(k):(e.consume(k),k===92?_:A)}function _(k){return k===40||k===41||k===92?(e.consume(k),A):A(k)}}function uw(e,n,i,l,s,o){const u=this;let f=0,d;return h;function h(v){return e.enter(l),e.enter(s),e.consume(v),e.exit(s),e.enter(o),m}function m(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?i(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(l),n):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||xe(v)||f++>999?(e.exit("chunkString"),m(v)):(e.consume(v),d||(d=!Ue(v)),v===92?x:g)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function cw(e,n,i,l,s,o){let u;return f;function f(x){return x===34||x===39||x===40?(e.enter(l),e.enter(s),e.consume(x),e.exit(s),u=x===40?41:x,d):i(x)}function d(x){return x===u?(e.enter(s),e.consume(x),e.exit(s),e.exit(l),n):(e.enter(o),h(x))}function h(x){return x===u?(e.exit(o),d(u)):x===null?i(x):xe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Pe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===u||x===null||xe(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?g:m)}function g(x){return x===u||x===92?(e.consume(x),m):m(x)}}function Vs(e,n){let i;return l;function l(s){return xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,l):Ue(s)?Pe(e,l,i?"linePrefix":"lineSuffix")(s):n(s)}}const p6={name:"definition",tokenize:y6},m6={partial:!0,tokenize:g6};function y6(e,n,i){const l=this;let s;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return uw.call(l,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=ar(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):i(v)}function d(v){return rt(v)?Vs(e,h)(v):h(v)}function h(v){return ow(e,m,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return e.attempt(m6,g,g)(v)}function g(v){return Ue(v)?Pe(e,x,"whitespace")(v):x(v)}function x(v){return v===null||xe(v)?(e.exit("definition"),l.parser.defined.push(s),n(v)):i(v)}}function g6(e,n,i){return l;function l(f){return rt(f)?Vs(e,s)(f):i(f)}function s(f){return cw(e,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ue(f)?Pe(e,u,"whitespace")(f):u(f)}function u(f){return f===null||xe(f)?n(f):i(f)}}const b6={name:"hardBreakEscape",tokenize:v6};function v6(e,n,i){return l;function l(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return xe(o)?(e.exit("hardBreakEscape"),n(o)):i(o)}}const x6={name:"headingAtx",resolve:w6,tokenize:S6};function w6(e,n){let i=e.length-2,l=3,s,o;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(s={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},o={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},Mn(e,l,i-l+1,[["enter",s,n],["enter",o,n],["exit",o,n],["exit",s,n]])),e}function S6(e,n,i){let l=0;return s;function s(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&l++<6?(e.consume(m),u):m===null||rt(m)?(e.exit("atxHeadingSequence"),f(m)):i(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||xe(m)?(e.exit("atxHeading"),n(m)):Ue(m)?Pe(e,f,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function h(m){return m===null||m===35||rt(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),h)}}const C6=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],db=["pre","script","style","textarea"],E6={concrete:!0,name:"htmlFlow",resolveTo:k6,tokenize:_6},A6={partial:!0,tokenize:R6},T6={partial:!0,tokenize:N6};function k6(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function _6(e,n,i){const l=this;let s,o,u,f,d;return h;function h(N){return m(N)}function m(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),x):N===47?(e.consume(N),o=!0,A):N===63?(e.consume(N),s=3,l.interrupt?n:C):on(N)?(e.consume(N),u=String.fromCharCode(N),_):i(N)}function x(N){return N===45?(e.consume(N),s=2,v):N===91?(e.consume(N),s=5,f=0,w):on(N)?(e.consume(N),s=4,l.interrupt?n:C):i(N)}function v(N){return N===45?(e.consume(N),l.interrupt?n:C):i(N)}function w(N){const fe="CDATA[";return N===fe.charCodeAt(f++)?(e.consume(N),f===fe.length?l.interrupt?n:te:w):i(N)}function A(N){return on(N)?(e.consume(N),u=String.fromCharCode(N),_):i(N)}function _(N){if(N===null||N===47||N===62||rt(N)){const fe=N===47,Te=u.toLowerCase();return!fe&&!o&&db.includes(Te)?(s=1,l.interrupt?n(N):te(N)):C6.includes(u.toLowerCase())?(s=6,fe?(e.consume(N),k):l.interrupt?n(N):te(N)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(N):o?O(N):R(N))}return N===45||en(N)?(e.consume(N),u+=String.fromCharCode(N),_):i(N)}function k(N){return N===62?(e.consume(N),l.interrupt?n:te):i(N)}function O(N){return Ue(N)?(e.consume(N),O):z(N)}function R(N){return N===47?(e.consume(N),z):N===58||N===95||on(N)?(e.consume(N),q):Ue(N)?(e.consume(N),R):z(N)}function q(N){return N===45||N===46||N===58||N===95||en(N)?(e.consume(N),q):M(N)}function M(N){return N===61?(e.consume(N),D):Ue(N)?(e.consume(N),M):R(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?i(N):N===34||N===39?(e.consume(N),d=N,$):Ue(N)?(e.consume(N),D):ee(N)}function $(N){return N===d?(e.consume(N),d=null,ie):N===null||xe(N)?i(N):(e.consume(N),$)}function ee(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||rt(N)?M(N):(e.consume(N),ee)}function ie(N){return N===47||N===62||Ue(N)?R(N):i(N)}function z(N){return N===62?(e.consume(N),ae):i(N)}function ae(N){return N===null||xe(N)?te(N):Ue(N)?(e.consume(N),ae):i(N)}function te(N){return N===45&&s===2?(e.consume(N),B):N===60&&s===1?(e.consume(N),X):N===62&&s===4?(e.consume(N),I):N===63&&s===3?(e.consume(N),C):N===93&&s===5?(e.consume(N),pe):xe(N)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(A6,se,ue)(N)):N===null||xe(N)?(e.exit("htmlFlowData"),ue(N)):(e.consume(N),te)}function ue(N){return e.check(T6,J,se)(N)}function J(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),oe}function oe(N){return N===null||xe(N)?ue(N):(e.enter("htmlFlowData"),te(N))}function B(N){return N===45?(e.consume(N),C):te(N)}function X(N){return N===47?(e.consume(N),u="",ne):te(N)}function ne(N){if(N===62){const fe=u.toLowerCase();return db.includes(fe)?(e.consume(N),I):te(N)}return on(N)&&u.length<8?(e.consume(N),u+=String.fromCharCode(N),ne):te(N)}function pe(N){return N===93?(e.consume(N),C):te(N)}function C(N){return N===62?(e.consume(N),I):N===45&&s===2?(e.consume(N),C):te(N)}function I(N){return N===null||xe(N)?(e.exit("htmlFlowData"),se(N)):(e.consume(N),I)}function se(N){return e.exit("htmlFlow"),n(N)}}function N6(e,n,i){const l=this;return s;function s(u){return xe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):i(u)}function o(u){return l.parser.lazy[l.now().line]?i(u):n(u)}}function R6(e,n,i){return l;function l(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(yo,n,i)}}const O6={name:"htmlText",tokenize:j6};function j6(e,n,i){const l=this;let s,o,u;return f;function f(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),M):C===63?(e.consume(C),R):on(C)?(e.consume(C),ee):i(C)}function h(C){return C===45?(e.consume(C),m):C===91?(e.consume(C),o=0,w):on(C)?(e.consume(C),O):i(C)}function m(C){return C===45?(e.consume(C),v):i(C)}function g(C){return C===null?i(C):C===45?(e.consume(C),x):xe(C)?(u=g,X(C)):(e.consume(C),g)}function x(C){return C===45?(e.consume(C),v):g(C)}function v(C){return C===62?B(C):C===45?x(C):g(C)}function w(C){const I="CDATA[";return C===I.charCodeAt(o++)?(e.consume(C),o===I.length?A:w):i(C)}function A(C){return C===null?i(C):C===93?(e.consume(C),_):xe(C)?(u=A,X(C)):(e.consume(C),A)}function _(C){return C===93?(e.consume(C),k):A(C)}function k(C){return C===62?B(C):C===93?(e.consume(C),k):A(C)}function O(C){return C===null||C===62?B(C):xe(C)?(u=O,X(C)):(e.consume(C),O)}function R(C){return C===null?i(C):C===63?(e.consume(C),q):xe(C)?(u=R,X(C)):(e.consume(C),R)}function q(C){return C===62?B(C):R(C)}function M(C){return on(C)?(e.consume(C),D):i(C)}function D(C){return C===45||en(C)?(e.consume(C),D):$(C)}function $(C){return xe(C)?(u=$,X(C)):Ue(C)?(e.consume(C),$):B(C)}function ee(C){return C===45||en(C)?(e.consume(C),ee):C===47||C===62||rt(C)?ie(C):i(C)}function ie(C){return C===47?(e.consume(C),B):C===58||C===95||on(C)?(e.consume(C),z):xe(C)?(u=ie,X(C)):Ue(C)?(e.consume(C),ie):B(C)}function z(C){return C===45||C===46||C===58||C===95||en(C)?(e.consume(C),z):ae(C)}function ae(C){return C===61?(e.consume(C),te):xe(C)?(u=ae,X(C)):Ue(C)?(e.consume(C),ae):ie(C)}function te(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),s=C,ue):xe(C)?(u=te,X(C)):Ue(C)?(e.consume(C),te):(e.consume(C),J)}function ue(C){return C===s?(e.consume(C),s=void 0,oe):C===null?i(C):xe(C)?(u=ue,X(C)):(e.consume(C),ue)}function J(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||rt(C)?ie(C):(e.consume(C),J)}function oe(C){return C===47||C===62||rt(C)?ie(C):i(C)}function B(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),n):i(C)}function X(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),ne}function ne(C){return Ue(C)?Pe(e,pe,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):pe(C)}function pe(C){return e.enter("htmlTextData"),u(C)}}const $p={name:"labelEnd",resolveAll:z6,resolveTo:U6,tokenize:B6},D6={tokenize:q6},M6={tokenize:H6},L6={tokenize:F6};function z6(e){let n=-1;const i=[];for(;++n<e.length;){const l=e[n][1];if(i.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",n+=s}}return e.length!==i.length&&Mn(e,0,e.length,i),e}function U6(e,n){let i=e.length,l=0,s,o,u,f;for(;i--;)if(s=e[i][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=i,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(u=i);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},m={type:"labelText",start:{...e[o+l+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=Jn(f,e.slice(o+1,o+l+3)),f=Jn(f,[["enter",m,n]]),f=Jn(f,Uc(n.parser.constructs.insideSpan.null,e.slice(o+l+4,u-3),n)),f=Jn(f,[["exit",m,n],e[u-2],e[u-1],["exit",h,n]]),f=Jn(f,e.slice(u+1)),f=Jn(f,[["exit",d,n]]),Mn(e,o,e.length,f),e}function B6(e,n,i){const l=this;let s=l.events.length,o,u;for(;s--;)if((l.events[s][1].type==="labelImage"||l.events[s][1].type==="labelLink")&&!l.events[s][1]._balanced){o=l.events[s][1];break}return f;function f(x){return o?o._inactive?g(x):(u=l.parser.defined.includes(ar(l.sliceSerialize({start:o.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):i(x)}function d(x){return x===40?e.attempt(D6,m,u?m:g)(x):x===91?e.attempt(M6,m,u?h:g)(x):u?m(x):g(x)}function h(x){return e.attempt(L6,m,g)(x)}function m(x){return n(x)}function g(x){return o._balanced=!0,i(x)}}function q6(e,n,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return rt(g)?Vs(e,o)(g):o(g)}function o(g){return g===41?m(g):ow(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return rt(g)?Vs(e,d)(g):m(g)}function f(g){return i(g)}function d(g){return g===34||g===39||g===40?cw(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):m(g)}function h(g){return rt(g)?Vs(e,m)(g):m(g)}function m(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):i(g)}}function H6(e,n,i){const l=this;return s;function s(f){return uw.call(l,e,o,u,"reference","referenceMarker","referenceString")(f)}function o(f){return l.parser.defined.includes(ar(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function u(f){return i(f)}}function F6(e,n,i){return l;function l(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):i(o)}}const P6={name:"labelStartImage",resolveAll:$p.resolveAll,tokenize:Q6};function Q6(e,n,i){const l=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):i(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):n(f)}}const I6={name:"labelStartLink",resolveAll:$p.resolveAll,tokenize:V6};function V6(e,n,i){const l=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(u):n(u)}}const gh={name:"lineEnding",tokenize:$6};function $6(e,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Pe(e,n,"linePrefix")}}const Gu={name:"thematicBreak",tokenize:Y6};function Y6(e,n,i){let l=0,s;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):l>=3&&(h===null||xe(h))?(e.exit("thematicBreak"),n(h)):i(h)}function d(h){return h===s?(e.consume(h),l++,d):(e.exit("thematicBreakSequence"),Ue(h)?Pe(e,f,"whitespace")(h):f(h))}}const yn={continuation:{tokenize:Z6},exit:W6,name:"list",tokenize:X6},K6={partial:!0,tokenize:e5},G6={partial:!0,tokenize:J6};function X6(e,n,i){const l=this,s=l.events[l.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return f;function f(v){const w=l.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||v===l.containerState.marker:ep(v)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Gu,i,h)(v):h(v);if(!l.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return i(v)}function d(v){return ep(v)&&++u<10?(e.consume(v),d):(!l.interrupt||u<2)&&(l.containerState.marker?v===l.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):i(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||v,e.check(yo,l.interrupt?i:m,e.attempt(K6,x,g))}function m(v){return l.containerState.initialBlankLine=!0,o++,x(v)}function g(v){return Ue(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):i(v)}function x(v){return l.containerState.size=o+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function Z6(e,n,i){const l=this;return l.containerState._closeFlow=void 0,e.check(yo,s,o);function s(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Pe(e,n,"listItemIndent",l.containerState.size+1)(f)}function o(f){return l.containerState.furtherBlankLines||!Ue(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(G6,n,u)(f))}function u(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Pe(e,e.attempt(yn,n,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function J6(e,n,i){const l=this;return Pe(e,s,"listItemIndent",l.containerState.size+1);function s(o){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?n(o):i(o)}}function W6(e){e.exit(this.containerState.type)}function e5(e,n,i){const l=this;return Pe(e,s,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const u=l.events[l.events.length-1];return!Ue(o)&&u&&u[1].type==="listItemPrefixWhitespace"?n(o):i(o)}}const hb={name:"setextUnderline",resolveTo:t5,tokenize:n5};function t5(e,n){let i=e.length,l,s,o;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(s=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const u={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",u,n]),e.splice(o+1,0,["exit",e[l][1],n]),e[l][1].end={...e[o][1].end}):e[l][1]=u,e.push(["exit",u,n]),e}function n5(e,n,i){const l=this;let s;return o;function o(h){let m=l.events.length,g;for(;m--;)if(l.events[m][1].type!=="lineEnding"&&l.events[m][1].type!=="linePrefix"&&l.events[m][1].type!=="content"){g=l.events[m][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),s=h,u(h)):i(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ue(h)?Pe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||xe(h)?(e.exit("setextHeadingLine"),n(h)):i(h)}}const r5={tokenize:f5,partial:!0};function i5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:o5,continuation:{tokenize:u5},exit:c5}},text:{91:{name:"gfmFootnoteCall",tokenize:s5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:l5,resolveTo:a5}}}}function l5(e,n,i){const l=this;let s=l.events.length;const o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;s--;){const d=l.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!u||!u._balanced)return i(d);const h=ar(l.sliceSerialize({start:u.end,end:l.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?i(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function a5(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[i+1],e[i+2],["enter",l,n],e[i+3],e[i+4],["enter",s,n],["exit",s,n],["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(i,e.length-i+1,...f),e}function s5(e,n,i){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o=0,u;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!u||g===null||g===91||rt(g))return i(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(ar(l.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(g)}return rt(g)||(u=!0),o++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function o5(e,n,i){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o,u=0,f;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):i(w)}function m(w){if(u>999||w===93&&!f||w===null||w===91||rt(w))return i(w);if(w===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return o=ar(l.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return rt(w)||(f=!0),u++,e.consume(w),w===92?g:m}function g(w){return w===91||w===92||w===93?(e.consume(w),u++,m):m(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(o)||s.push(o),Pe(e,v,"gfmFootnoteDefinitionWhitespace")):i(w)}function v(w){return n(w)}}function u5(e,n,i){return e.check(yo,n,e.attempt(r5,n,i))}function c5(e){e.exit("gfmFootnoteDefinition")}function f5(e,n,i){const l=this;return Pe(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(o):i(o)}}function d5(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:o,resolveAll:s};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function s(u,f){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},x=[["enter",m,f],["enter",u[h][1],f],["exit",u[h][1],f],["enter",g,f]],v=f.parser.constructs.insideSpan.null;v&&Mn(x,x.length,0,Uc(v,u.slice(h+1,d),f)),Mn(x,x.length,0,[["exit",g,f],["enter",u[d][1],f],["exit",u[d][1],f],["exit",m,f]]),Mn(u,h-1,d-h+3,x),d=h+x.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function o(u,f,d){const h=this.previous,m=this.events;let g=0;return x;function x(w){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const A=wa(h);if(w===126)return g>1?d(w):(u.consume(w),g++,v);if(g<2&&!i)return d(w);const _=u.exit("strikethroughSequenceTemporary"),k=wa(w);return _._open=!k||k===2&&!!A,_._close=!A||A===2&&!!k,f(w)}}}class h5{constructor(){this.map=[]}add(n,i,l){p5(this,n,i,l)}consume(n){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];l.push(n.slice()),n.length=0;let s=l.pop();for(;s;){for(const o of s)n.push(o);s=l.pop()}this.map.length=0}}function p5(e,n,i,l){let s=0;if(!(i===0&&l.length===0)){for(;s<e.map.length;){if(e.map[s][0]===n){e.map[s][1]+=i,e.map[s][2].push(...l);return}s+=1}e.map.push([n,i,l])}}function m5(e,n){let i=!1;const l=[];for(;n<e.length;){const s=e[n];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=l.length-1;l[o]=l[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return l}function y5(){return{flow:{null:{name:"table",tokenize:g5,resolveAll:b5}}}}function g5(e,n,i){const l=this;let s=0,o=0,u;return f;function f(z){let ae=l.events.length-1;for(;ae>-1;){const J=l.events[ae][1].type;if(J==="lineEnding"||J==="linePrefix")ae--;else break}const te=ae>-1?l.events[ae][1].type:null,ue=te==="tableHead"||te==="tableRow"?D:d;return ue===D&&l.parser.lazy[l.now().line]?i(z):ue(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,o+=1),m(z)}function m(z){return z===null?i(z):xe(z)?o>1?(o=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),v):i(z):Ue(z)?Pe(e,m,"whitespace")(z):(o+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||rt(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?x:g)}function x(z){return z===92||z===124?(e.consume(z),g):g(z)}function v(z){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(z):(e.enter("tableDelimiterRow"),u=!1,Ue(z)?Pe(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?_(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),A):M(z)}function A(z){return Ue(z)?Pe(e,_,"whitespace")(z):_(z)}function _(z){return z===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),k):z===45?(o+=1,k(z)):z===null||xe(z)?q(z):M(z)}function k(z){return z===45?(e.enter("tableDelimiterFiller"),O(z)):M(z)}function O(z){return z===45?(e.consume(z),O):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ue(z)?Pe(e,q,"whitespace")(z):q(z)}function q(z){return z===124?w(z):z===null||xe(z)?!u||s!==o?M(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(z)):M(z)}function M(z){return i(z)}function D(z){return e.enter("tableRow"),$(z)}function $(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),$):z===null||xe(z)?(e.exit("tableRow"),n(z)):Ue(z)?Pe(e,$,"whitespace")(z):(e.enter("data"),ee(z))}function ee(z){return z===null||z===124||rt(z)?(e.exit("data"),$(z)):(e.consume(z),z===92?ie:ee)}function ie(z){return z===92||z===124?(e.consume(z),ee):ee(z)}}function b5(e,n){let i=-1,l=!0,s=0,o=[0,0,0,0],u=[0,0,0,0],f=!1,d=0,h,m,g;const x=new h5;for(;++i<e.length;){const v=e[i],w=v[1];v[0]==="enter"?w.type==="tableHead"?(f=!1,d!==0&&(pb(x,n,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",h,n]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,g=void 0,o=[0,0,0,0],u=[0,i+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",m,n]])),s=w.type==="tableDelimiterRow"?2:m?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],g=ju(x,n,o,s,void 0,g),o=[0,0,0,0]),u[2]=i)):w.type==="tableCellDivider"&&(l?l=!1:(o[1]!==0&&(u[0]=u[1],g=ju(x,n,o,s,void 0,g)),o=u,u=[o[1],i,0,0])):w.type==="tableHead"?(f=!0,d=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=i,o[1]!==0?(u[0]=u[1],g=ju(x,n,o,s,i,g)):u[1]!==0&&(g=ju(x,n,u,s,i,g)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=i)}for(d!==0&&pb(x,n,d,h,m),x.consume(n.events),i=-1;++i<n.events.length;){const v=n.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=m5(n.events,i))}return e}function ju(e,n,i,l,s,o){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(o.end=Object.assign({},ha(n.events,i[0])),e.add(i[0],0,[["exit",o,n]]));const d=ha(n.events,i[1]);if(o={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(i[1],0,[["enter",o,n]]),i[2]!==0){const h=ha(n.events,i[2]),m=ha(n.events,i[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(i[2],0,[["enter",g,n]]),l!==2){const x=n.events[i[2]],v=n.events[i[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const w=i[2]+1,A=i[3]-i[2]-1;e.add(w,A,[])}}e.add(i[3]+1,0,[["exit",g,n]])}return s!==void 0&&(o.end=Object.assign({},ha(n.events,s)),e.add(s,0,[["exit",o,n]]),o=void 0),o}function pb(e,n,i,l,s){const o=[],u=ha(n.events,i);s&&(s.end=Object.assign({},u),o.push(["exit",s,n])),l.end=Object.assign({},u),o.push(["exit",l,n]),e.add(i+1,0,o)}function ha(e,n){const i=e[n],l=i[0]==="enter"?"start":"end";return i[1][l]}const v5={name:"tasklistCheck",tokenize:w5};function x5(){return{text:{91:v5}}}function w5(e,n,i){const l=this;return s;function s(d){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return rt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):i(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(d)}function f(d){return xe(d)?n(d):Ue(d)?e.check({tokenize:S5},n,i)(d):i(d)}}function S5(e,n,i){return Pe(e,l,"whitespace");function l(s){return s===null?i(s):n(s)}}function C5(e){return Gx([Dj(),i5(),d5(e),y5(),x5()])}const E5={};function A5(e){const n=this,i=e||E5,l=n.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push(C5(i)),o.push(kj()),u.push(_j(i))}function T5(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const k5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N5={};function mb(e,n){return(N5.jsx?_5:k5).test(e)}const R5=/[ \t\n\f\r]/g;function O5(e){return typeof e=="object"?e.type==="text"?yb(e.value):!1:yb(e)}function yb(e){return e.replace(R5,"")===""}class go{constructor(n,i,l){this.normal=i,this.property=n,l&&(this.space=l)}}go.prototype.normal={};go.prototype.property={};go.prototype.space=void 0;function fw(e,n){const i={},l={};for(const s of e)Object.assign(i,s.property),Object.assign(l,s.normal);return new go(i,l,n)}function ip(e){return e.toLowerCase()}class xn{constructor(n,i){this.attribute=i,this.property=n}}xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let j5=0;const Ne=Sl(),Nt=Sl(),lp=Sl(),re=Sl(),lt=Sl(),ya=Sl(),On=Sl();function Sl(){return 2**++j5}const ap=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:Nt,commaOrSpaceSeparated:On,commaSeparated:ya,number:re,overloadedBoolean:lp,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),bh=Object.keys(ap);class Yp extends xn{constructor(n,i,l,s){let o=-1;if(super(n,i),gb(this,"space",s),typeof l=="number")for(;++o<bh.length;){const u=bh[o];gb(this,bh[o],(l&ap[u])===ap[u])}}}Yp.prototype.defined=!0;function gb(e,n,i){i&&(e[n]=i)}function za(e){const n={},i={};for(const[l,s]of Object.entries(e.properties)){const o=new Yp(l,e.transform(e.attributes||{},l),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(o.mustUseProperty=!0),n[l]=o,i[ip(l)]=l,i[ip(o.attribute)]=l}return new go(n,i,e.space)}const dw=za({properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:lt,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:re,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:lt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Nt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function hw(e,n){return n in e?e[n]:n}function pw(e,n){return hw(e,n.toLowerCase())}const D5=za({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ya,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:lt,autoFocus:Ne,autoPlay:Ne,blocking:lt,capture:null,charSet:null,checked:Ne,cite:null,className:lt,cols:re,colSpan:null,content:null,contentEditable:Nt,controls:Ne,controlsList:lt,coords:re|ya,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:lp,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:lt,height:re,hidden:lp,high:re,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ne,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ne,optimum:re,pattern:null,ping:lt,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:lt,required:Ne,reversed:Ne,rows:re,rowSpan:re,sandbox:lt,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:Nt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:pw}),M5=za({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:On,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ya,g2:ya,glyphName:ya,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:On,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:On,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:On,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:On,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hw}),mw=za({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),yw=za({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pw}),gw=za({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),L5={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},z5=/[A-Z]/g,bb=/-[a-z]/g,U5=/^data[-\w.:]+$/i;function B5(e,n){const i=ip(n);let l=n,s=xn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&U5.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(bb,H5);l="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!bb.test(o)){let u=o.replace(z5,q5);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}s=Yp}return new s(l,n)}function q5(e){return"-"+e.toLowerCase()}function H5(e){return e.charAt(1).toUpperCase()}const F5=fw([dw,D5,mw,yw,gw],"html"),Kp=fw([dw,M5,mw,yw,gw],"svg");function P5(e){return e.join(" ").trim()}var ua={},vh,vb;function Q5(){if(vb)return vh;vb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
253
- `,h="/",m="*",g="",x="comment",v="declaration";vh=function(A,_){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];_=_||{};var k=1,O=1;function R(ue){var J=ue.match(n);J&&(k+=J.length);var oe=ue.lastIndexOf(d);O=~oe?ue.length-oe:O+ue.length}function q(){var ue={line:k,column:O};return function(J){return J.position=new M(ue),ee(),J}}function M(ue){this.start=ue,this.end={line:k,column:O},this.source=_.source}M.prototype.content=A;function D(ue){var J=new Error(_.source+":"+k+":"+O+": "+ue);if(J.reason=ue,J.filename=_.source,J.line=k,J.column=O,J.source=A,!_.silent)throw J}function $(ue){var J=ue.exec(A);if(J){var oe=J[0];return R(oe),A=A.slice(oe.length),J}}function ee(){$(i)}function ie(ue){var J;for(ue=ue||[];J=z();)J!==!1&&ue.push(J);return ue}function z(){var ue=q();if(!(h!=A.charAt(0)||m!=A.charAt(1))){for(var J=2;g!=A.charAt(J)&&(m!=A.charAt(J)||h!=A.charAt(J+1));)++J;if(J+=2,g===A.charAt(J-1))return D("End of comment missing");var oe=A.slice(2,J-2);return O+=2,R(oe),A=A.slice(J),O+=2,ue({type:x,comment:oe})}}function ae(){var ue=q(),J=$(l);if(J){if(z(),!$(s))return D("property missing ':'");var oe=$(o),B=ue({type:v,property:w(J[0].replace(e,g)),value:oe?w(oe[0].replace(e,g)):g});return $(u),B}}function te(){var ue=[];ie(ue);for(var J;J=ae();)J!==!1&&(ue.push(J),ie(ue));return ue}return ee(),te()};function w(A){return A?A.replace(f,g):g}return vh}var xb;function I5(){if(xb)return ua;xb=1;var e=ua&&ua.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=i;var n=e(Q5());function i(l,s){var o=null;if(!l||typeof l!="string")return o;var u=(0,n.default)(l),f=typeof s=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;f?s(h,m,d):m&&(o=o||{},o[h]=m)}}),o}return ua}var qs={},wb;function V5(){if(wb)return qs;wb=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||i.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},f=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),o(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,f):h=h.replace(l,f),h.replace(n,u))};return qs.camelCase=d,qs}var Hs,Sb;function $5(){if(Sb)return Hs;Sb=1;var e=Hs&&Hs.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(I5()),i=V5();function l(s,o){var u={};return!s||typeof s!="string"||(0,n.default)(s,function(f,d){f&&d&&(u[(0,i.camelCase)(f,o)]=d)}),u}return l.default=l,Hs=l,Hs}var Y5=$5();const K5=Ca(Y5),bw=vw("end"),Gp=vw("start");function vw(e){return n;function n(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function G5(e){const n=Gp(e),i=bw(e);if(n&&i)return{start:n,end:i}}function $s(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cb(e.position):"start"in e||"end"in e?Cb(e):"line"in e||"column"in e?sp(e):""}function sp(e){return Eb(e&&e.line)+":"+Eb(e&&e.column)}function Cb(e){return sp(e&&e.start)+"-"+sp(e&&e.end)}function Eb(e){return e&&typeof e=="number"?e:1}class nn extends Error{constructor(n,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let s="",o={},u=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof n=="string"?s=n:!o.cause&&n&&(u=!0,s=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof l=="string"){const d=l.indexOf(":");d===-1?o.ruleId=l:(o.source=l.slice(0,d),o.ruleId=l.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=f?f.line:void 0,this.name=$s(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const Xp={}.hasOwnProperty,X5=new Map,Z5=/[A-Z]/g,J5=new Set(["table","tbody","thead","tfoot","tr"]),W5=new Set(["td","th"]),xw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eD(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=oD(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=sD(i,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Kp:F5,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=ww(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function ww(e,n,i){if(n.type==="element")return tD(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return nD(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return iD(e,n,i);if(n.type==="mdxjsEsm")return rD(e,n);if(n.type==="root")return lD(e,n,i);if(n.type==="text")return aD(e,n)}function tD(e,n,i){const l=e.schema;let s=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=Kp,e.schema=s),e.ancestors.push(n);const o=Cw(e,n.tagName,!1),u=uD(e,n);let f=Jp(e,n);return J5.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!O5(d):!0})),Sw(e,u,o,n),Zp(u,f),e.ancestors.pop(),e.schema=l,e.create(n,o,u,i)}function nD(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}eo(e,n.position)}function rD(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);eo(e,n.position)}function iD(e,n,i){const l=e.schema;let s=l;n.name==="svg"&&l.space==="html"&&(s=Kp,e.schema=s),e.ancestors.push(n);const o=n.name===null?e.Fragment:Cw(e,n.name,!0),u=cD(e,n),f=Jp(e,n);return Sw(e,u,o,n),Zp(u,f),e.ancestors.pop(),e.schema=l,e.create(n,o,u,i)}function lD(e,n,i){const l={};return Zp(l,Jp(e,n)),e.create(n,e.Fragment,l,i)}function aD(e,n){return n.value}function Sw(e,n,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=l)}function Zp(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function sD(e,n,i){return l;function l(s,o,u,f){const h=Array.isArray(u.children)?i:n;return f?h(o,u,f):h(o,u)}}function oD(e,n){return i;function i(l,s,o,u){const f=Array.isArray(o.children),d=Gp(l);return n(s,o,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function uD(e,n){const i={};let l,s;for(s in n.properties)if(s!=="children"&&Xp.call(n.properties,s)){const o=fD(e,s,n.properties[s]);if(o){const[u,f]=o;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&W5.has(n.tagName)?l=f:i[u]=f}}if(l){const o=i.style||(i.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function cD(e,n){const i={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const o=l.data.estree.body[0];o.type;const u=o.expression;u.type;const f=u.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else eo(e,n.position);else{const s=l.name;let o;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else eo(e,n.position);else o=l.value===null?!0:l.value;i[s]=o}return i}function Jp(e,n){const i=[];let l=-1;const s=e.passKeys?new Map:X5;for(;++l<n.children.length;){const o=n.children[l];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=s.get(d)||0;u=d+"-"+h,s.set(d,h+1)}}const f=ww(e,o,u);f!==void 0&&i.push(f)}return i}function fD(e,n,i){const l=B5(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?T5(i):P5(i)),l.property==="style"){let s=typeof i=="object"?i:dD(e,String(i));return e.stylePropertyNameCase==="css"&&(s=hD(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&l.space?L5[l.property]||l.property:l.attribute,i]}}function dD(e,n){try{return K5(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,s=new nn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=xw+"#cannot-parse-style-attribute",s}}function Cw(e,n,i){let l;if(!i)l={type:"Literal",value:n};else if(n.includes(".")){const s=n.split(".");let o=-1,u;for(;++o<s.length;){const f=mb(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}l=u}else l=mb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const s=l.value;return Xp.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(l);eo(e)}function eo(e,n){const i=new nn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=xw+"#cannot-handle-mdx-estrees-without-createevaluater",i}function hD(e){const n={};let i;for(i in e)Xp.call(e,i)&&(n[pD(i)]=e[i]);return n}function pD(e){let n=e.replace(Z5,mD);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function mD(e){return"-"+e.toLowerCase()}const xh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},yD={tokenize:gD};function gD(e){const n=e.attempt(this.parser.constructs.contentInitial,l,s);let i;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Pe(e,n,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return xe(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),u)}}const bD={tokenize:vD},Ab={tokenize:xD};function vD(e){const n=this,i=[];let l=0,s,o,u;return f;function f(R){if(l<i.length){const q=i[l];return n.containerState=q[1],e.attempt(q[0].continuation,d,h)(R)}return h(R)}function d(R){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,s&&O();const q=n.events.length;let M=q,D;for(;M--;)if(n.events[M][0]==="exit"&&n.events[M][1].type==="chunkFlow"){D=n.events[M][1].end;break}k(l);let $=q;for(;$<n.events.length;)n.events[$][1].end={...D},$++;return Mn(n.events,M+1,0,n.events.slice(q)),n.events.length=$,h(R)}return f(R)}function h(R){if(l===i.length){if(!s)return x(R);if(s.currentConstruct&&s.currentConstruct.concrete)return w(R);n.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Ab,m,g)(R)}function m(R){return s&&O(),k(l),x(R)}function g(R){return n.parser.lazy[n.now().line]=l!==i.length,u=n.now().offset,w(R)}function x(R){return n.containerState={},e.attempt(Ab,v,w)(R)}function v(R){return l++,i.push([n.currentConstruct,n.containerState]),x(R)}function w(R){if(R===null){s&&O(),k(0),e.consume(R);return}return s=s||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),A(R)}function A(R){if(R===null){_(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return xe(R)?(e.consume(R),_(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(R),A)}function _(R,q){const M=n.sliceStream(R);if(q&&M.push(null),R.previous=o,o&&(o.next=R),o=R,s.defineSkip(R.start),s.write(M),n.parser.lazy[R.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const $=n.events.length;let ee=$,ie,z;for(;ee--;)if(n.events[ee][0]==="exit"&&n.events[ee][1].type==="chunkFlow"){if(ie){z=n.events[ee][1].end;break}ie=!0}for(k(l),D=$;D<n.events.length;)n.events[D][1].end={...z},D++;Mn(n.events,ee+1,0,n.events.slice($)),n.events.length=D}}function k(R){let q=i.length;for(;q-- >R;){const M=i[q];n.containerState=M[1],M[0].exit.call(n,e)}i.length=R}function O(){s.write([null]),o=void 0,s=void 0,n.containerState._closeFlow=void 0}}function xD(e,n,i){return Pe(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const wD={tokenize:SD};function SD(e){const n=this,i=e.attempt(yo,l,e.attempt(this.parser.constructs.flowInitial,s,Pe(e,e.attempt(this.parser.constructs.flow,s,e.attempt(u6,s)),"linePrefix")));return i;function l(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const CD={resolveAll:Aw()},ED=Ew("string"),AD=Ew("text");function Ew(e){return{resolveAll:Aw(e==="text"?TD:void 0),tokenize:n};function n(i){const l=this,s=this.parser.constructs[e],o=i.attempt(s,u,f);return u;function u(m){return h(m)?o(m):f(m)}function f(m){if(m===null){i.consume(m);return}return i.enter("data"),i.consume(m),d}function d(m){return h(m)?(i.exit("data"),o(m)):(i.consume(m),d)}function h(m){if(m===null)return!0;const g=s[m];let x=-1;if(g)for(;++x<g.length;){const v=g[x];if(!v.previous||v.previous.call(l,l.previous))return!0}return!1}}}function Aw(e){return n;function n(i,l){let s=-1,o;for(;++s<=i.length;)o===void 0?i[s]&&i[s][1].type==="data"&&(o=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==o+2&&(i[o][1].end=i[s-1][1].end,i.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(i,l):i}}function TD(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],s=n.sliceStream(l);let o=s.length,u=-1,f=0,d;for(;o--;){const h=s[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:l.start._bufferIndex+u,_index:l.start._index+o,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(i,0,["enter",h,n],["exit",h,n]),i+=2)}i++}return e}const kD={42:yn,43:yn,45:yn,48:yn,49:yn,50:yn,51:yn,52:yn,53:yn,54:yn,55:yn,56:yn,57:yn,62:iw},_D={91:p6},ND={[-2]:yh,[-1]:yh,32:yh},RD={35:x6,42:Gu,45:[hb,Gu],60:E6,61:hb,95:Gu,96:fb,126:fb},OD={38:aw,92:lw},jD={[-5]:gh,[-4]:gh,[-3]:gh,33:P6,38:aw,42:rp,60:[Ij,O6],91:I6,92:[b6,lw],93:$p,95:rp,96:r6},DD={null:[rp,CD]},MD={null:[42,95]},LD={null:[]},zD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MD,contentInitial:_D,disable:LD,document:kD,flow:RD,flowInitial:ND,insideSpan:DD,string:OD,text:jD},Symbol.toStringTag,{value:"Module"}));function UD(e,n,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},o=[];let u=[],f=[];const d={attempt:$(M),check:$(D),consume:O,enter:R,exit:q,interrupt:$(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:A,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let m=n.tokenize.call(h,d);return n.resolveAll&&o.push(n),h;function g(ae){return u=Jn(u,ae),_(),u[u.length-1]!==null?[]:(ee(n,0),h.events=Uc(o,h.events,h),h.events)}function x(ae,te){return qD(v(ae),te)}function v(ae){return BD(u,ae)}function w(){const{_bufferIndex:ae,_index:te,line:ue,column:J,offset:oe}=l;return{_bufferIndex:ae,_index:te,line:ue,column:J,offset:oe}}function A(ae){s[ae.line]=ae.column,z()}function _(){let ae;for(;l._index<u.length;){const te=u[l._index];if(typeof te=="string")for(ae=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===ae&&l._bufferIndex<te.length;)k(te.charCodeAt(l._bufferIndex));else k(te)}}function k(ae){m=m(ae)}function O(ae){xe(ae)?(l.line++,l.column=1,l.offset+=ae===-3?2:1,z()):ae!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=ae}function R(ae,te){const ue=te||{};return ue.type=ae,ue.start=w(),h.events.push(["enter",ue,h]),f.push(ue),ue}function q(ae){const te=f.pop();return te.end=w(),h.events.push(["exit",te,h]),te}function M(ae,te){ee(ae,te.from)}function D(ae,te){te.restore()}function $(ae,te){return ue;function ue(J,oe,B){let X,ne,pe,C;return Array.isArray(J)?se(J):"tokenize"in J?se([J]):I(J);function I(ce){return ct;function ct(Re){const Ie=Re!==null&&ce[Re],Ft=Re!==null&&ce.null,wt=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(Ft)?Ft:Ft?[Ft]:[]];return se(wt)(Re)}}function se(ce){return X=ce,ne=0,ce.length===0?B:N(ce[ne])}function N(ce){return ct;function ct(Re){return C=ie(),pe=ce,ce.partial||(h.currentConstruct=ce),ce.name&&h.parser.constructs.disable.null.includes(ce.name)?Te():ce.tokenize.call(te?Object.assign(Object.create(h),te):h,d,fe,Te)(Re)}}function fe(ce){return ae(pe,C),oe}function Te(ce){return C.restore(),++ne<X.length?N(X[ne]):B}}}function ee(ae,te){ae.resolveAll&&!o.includes(ae)&&o.push(ae),ae.resolve&&Mn(h.events,te,h.events.length-te,ae.resolve(h.events.slice(te),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function ie(){const ae=w(),te=h.previous,ue=h.currentConstruct,J=h.events.length,oe=Array.from(f);return{from:J,restore:B};function B(){l=ae,h.previous=te,h.currentConstruct=ue,h.events.length=J,f=oe,z()}}function z(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function BD(e,n){const i=n.start._index,l=n.start._bufferIndex,s=n.end._index,o=n.end._bufferIndex;let u;if(i===s)u=[e[i].slice(l,o)];else{if(u=e.slice(i,s),l>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(l):u.shift()}o>0&&u.push(e[s].slice(0,o))}return u}function qD(e,n){let i=-1;const l=[];let s;for(;++i<e.length;){const o=e[i];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
254
- `;break}case-3:{u=`\r
255
- `;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&s)continue;u=" ";break}default:u=String.fromCharCode(o)}s=o===-2,l.push(u)}return l.join("")}function HD(e){const l={constructs:Gx([zD,...(e||{}).extensions||[]]),content:s(yD),defined:[],document:s(bD),flow:s(wD),lazy:{},string:s(ED),text:s(AD)};return l;function s(o){return u;function u(f){return UD(l,o,f)}}}function FD(e){for(;!sw(e););return e}const Tb=/[\0\t\n\r]/g;function PD(){let e=1,n="",i=!0,l;return s;function s(o,u,f){const d=[];let h,m,g,x,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),g=0,n="",i&&(o.charCodeAt(0)===65279&&g++,i=void 0);g<o.length;){if(Tb.lastIndex=g,h=Tb.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){n=o.slice(g);break}if(v===10&&g===x&&l)d.push(-3),l=void 0;else switch(l&&(d.push(-5),l=void 0),g<x&&(d.push(o.slice(g,x)),e+=x-g),v){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:l=!0,e=1}g=x+1}return f&&(l&&d.push(-5),n&&d.push(n),d.push(null)),d}}const Tw={}.hasOwnProperty;function QD(e,n,i){return typeof n!="string"&&(i=n,n=void 0),ID(i)(FD(HD(i).document().write(PD()(e,n,!0))))}function ID(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wn),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(ii),blockQuote:o(Ft),characterEscape:ie,characterReference:ie,codeFenced:o(wt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(wt,u),codeText:o(cn,u),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(tr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(fn),hardBreakEscape:o(Dt),hardBreakTrailing:o(Dt),htmlFlow:o(Mt,u),htmlFlowData:ie,htmlText:o(Mt,u),htmlTextData:ie,image:o(nr),label:u,link:o(wn),listItem:o(Bn),listItemValue:x,listOrdered:o(Ke,g),listUnordered:o(Ke),paragraph:o(Rr),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(ii),strong:o(dr),thematicBreak:o(li)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:Ie,autolinkProtocol:Re,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ce,characterReference:ct,codeFenced:d(_),codeFencedFence:A,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:d(k),codeText:d(oe),codeTextData:z,data:z,definition:d(),definitionDestinationString:q,definitionLabelString:O,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(ue),htmlFlowData:z,htmlText:d(J),htmlTextData:z,image:d(X),label:pe,labelText:ne,lineEnding:ae,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:fe,resourceDestinationString:C,resourceTitleString:I,resource:se,setextHeading:d(ee),setextHeadingLineSequence:$,setextHeadingText:D,strong:d(),thematicBreak:d()}};kw(n,(e||{}).mdastExtensions||[]);const i={};return l;function l(Y){let W={type:"root",children:[]};const ye={stack:[W],tokenStack:[],config:n,enter:f,exit:h,buffer:u,resume:m,data:i},ge=[];let Be=-1;for(;++Be<Y.length;)if(Y[Be][1].type==="listOrdered"||Y[Be][1].type==="listUnordered")if(Y[Be][0]==="enter")ge.push(Be);else{const Pt=ge.pop();Be=s(Y,Pt,Be)}for(Be=-1;++Be<Y.length;){const Pt=n[Y[Be][0]];Tw.call(Pt,Y[Be][1].type)&&Pt[Y[Be][1].type].call(Object.assign({sliceSerialize:Y[Be][2].sliceSerialize},ye),Y[Be][1])}if(ye.tokenStack.length>0){const Pt=ye.tokenStack[ye.tokenStack.length-1];(Pt[1]||kb).call(ye,void 0,Pt[0])}for(W.position={start:Oi(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:Oi(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<n.transforms.length;)W=n.transforms[Be](W)||W;return W}function s(Y,W,ye){let ge=W-1,Be=-1,Pt=!1,Yt,yt,gt,qe;for(;++ge<=ye;){const ft=Y[ge];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?Be++:Be--,qe=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(Yt&&!qe&&!Be&&!gt&&(gt=ge),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!Be&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||Be===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(Yt){let Lt=ge;for(yt=void 0;Lt--;){const zt=Y[Lt];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;yt&&(Y[yt][1].type="lineEndingBlank",Pt=!0),zt[1].type="lineEnding",yt=Lt}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}gt&&(!yt||gt<yt)&&(Yt._spread=!0),Yt.end=Object.assign({},yt?Y[yt][1].start:ft[1].end),Y.splice(yt||ge,0,["exit",Yt,ft[2]]),ge++,ye++}if(ft[1].type==="listItemPrefix"){const Lt={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};Yt=Lt,Y.splice(ge,0,["enter",Lt,ft[2]]),ge++,ye++,gt=void 0,qe=!0}}}return Y[W][1]._spread=Pt,ye}function o(Y,W){return ye;function ye(ge){f.call(this,Y(ge),ge),W&&W.call(this,ge)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(Y,W,ye){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([W,ye||void 0]),Y.position={start:Oi(W.start),end:void 0}}function d(Y){return W;function W(ye){Y&&Y.call(this,ye),h.call(this,ye)}}function h(Y,W){const ye=this.stack.pop(),ge=this.tokenStack.pop();if(ge)ge[0].type!==Y.type&&(W?W.call(this,Y,ge[0]):(ge[1]||kb).call(this,Y,ge[0]));else throw new Error("Cannot close `"+Y.type+"` ("+$s({start:Y.start,end:Y.end})+"): it’s not open");ye.position.end=Oi(Y.end)}function m(){return Pp(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(Y){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.lang=Y}function w(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.meta=Y}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.value=Y.replace(/(\r?\n|\r)$/g,"")}function O(Y){const W=this.resume(),ye=this.stack[this.stack.length-1];ye.label=W,ye.identifier=ar(this.sliceSerialize(Y)).toLowerCase()}function R(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.title=Y}function q(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.url=Y}function M(Y){const W=this.stack[this.stack.length-1];if(!W.depth){const ye=this.sliceSerialize(Y).length;W.depth=ye}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function $(Y){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(Y){const ye=this.stack[this.stack.length-1].children;let ge=ye[ye.length-1];(!ge||ge.type!=="text")&&(ge=Or(),ge.position={start:Oi(Y.start),end:void 0},ye.push(ge)),this.stack.push(ge)}function z(Y){const W=this.stack.pop();W.value+=this.sliceSerialize(Y),W.position.end=Oi(Y.end)}function ae(Y){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=W.children[W.children.length-1];ye.position.end=Oi(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(W.type)&&(ie.call(this,Y),z.call(this,Y))}function te(){this.data.atHardBreak=!0}function ue(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.value=Y}function J(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.value=Y}function oe(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.value=Y}function B(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=W,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function X(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=W,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function ne(Y){const W=this.sliceSerialize(Y),ye=this.stack[this.stack.length-2];ye.label=pj(W),ye.identifier=ar(W).toLowerCase()}function pe(){const Y=this.stack[this.stack.length-1],W=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ge=Y.children;ye.children=ge}else ye.alt=W}function C(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.url=Y}function I(){const Y=this.resume(),W=this.stack[this.stack.length-1];W.title=Y}function se(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function fe(Y){const W=this.resume(),ye=this.stack[this.stack.length-1];ye.label=W,ye.identifier=ar(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function Te(Y){this.data.characterReferenceType=Y.type}function ce(Y){const W=this.sliceSerialize(Y),ye=this.data.characterReferenceType;let ge;ye?(ge=Kx(W,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=Ip(W);const Be=this.stack[this.stack.length-1];Be.value+=ge}function ct(Y){const W=this.stack.pop();W.position.end=Oi(Y.end)}function Re(Y){z.call(this,Y);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(Y)}function Ie(Y){z.call(this,Y);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(Y)}function Ft(){return{type:"blockquote",children:[]}}function wt(){return{type:"code",lang:null,meta:null,value:""}}function cn(){return{type:"inlineCode",value:""}}function tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fn(){return{type:"emphasis",children:[]}}function ii(){return{type:"heading",depth:0,children:[]}}function Dt(){return{type:"break"}}function Mt(){return{type:"html",value:""}}function nr(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function Ke(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Bn(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function Rr(){return{type:"paragraph",children:[]}}function dr(){return{type:"strong",children:[]}}function Or(){return{type:"text",value:""}}function li(){return{type:"thematicBreak"}}}function Oi(e){return{line:e.line,column:e.column,offset:e.offset}}function kw(e,n){let i=-1;for(;++i<n.length;){const l=n[i];Array.isArray(l)?kw(e,l):VD(e,l)}}function VD(e,n){let i;for(i in n)if(Tw.call(n,i))switch(i){case"canContainEols":{const l=n[i];l&&e[i].push(...l);break}case"transforms":{const l=n[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=n[i];l&&Object.assign(e[i],l);break}}}function kb(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+$s({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+$s({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+$s({start:n.start,end:n.end})+") is still open")}function $D(e){const n=this;n.parser=i;function i(l){return QD(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function YD(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function KD(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
256
- `}]}function GD(e,n){const i=n.value?n.value+`
257
- `:"",l={};n.lang&&(l.className=["language-"+n.lang]);let s={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function XD(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function ZD(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function JD(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),s=La(l.toLowerCase()),o=e.footnoteOrder.indexOf(l);let u,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),u=e.footnoteOrder.length):u=o+1,f+=1,e.footnoteCounts.set(l,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(n,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,h),e.applyData(n,h)}function WD(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function e8(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function _w(e,n){const i=n.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const s=e.all(n),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=l:s.push({type:"text",value:l}),s}function t8(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return _w(e,n);const s={src:La(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(s.title=l.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,o),e.applyData(n,o)}function n8(e,n){const i={src:La(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function r8(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,l),e.applyData(n,l)}function i8(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return _w(e,n);const s={href:La(l.url||"")};l.title!==null&&l.title!==void 0&&(s.title=l.title);const o={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function l8(e,n){const i={href:La(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function a8(e,n,i){const l=e.all(n),s=i?s8(i):Nw(n),o={},u=[];if(typeof n.checked=="boolean"){const m=l[0];let g;m&&m.type==="element"&&m.tagName==="p"?g=m:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const m=l[f];(s||f!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
258
- `}),m.type==="element"&&m.tagName==="p"&&!s?u.push(...m.children):u.push(m)}const d=l[l.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
259
- `});const h={type:"element",tagName:"li",properties:o,children:u};return e.patch(n,h),e.applyData(n,h)}function s8(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let l=-1;for(;!n&&++l<i.length;)n=Nw(i[l])}return n}function Nw(e){const n=e.spread;return n??e.children.length>1}function o8(e,n){const i={},l=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++s<l.length;){const u=l[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(n,o),e.applyData(n,o)}function u8(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function c8(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function f8(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function d8(e,n){const i=e.all(n),l=i.shift(),s=[];if(l){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],u),s.push(u)}if(i.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Gp(n.children[1]),d=bw(n.children[n.children.length-1]);f&&d&&(u.position={start:f,end:d}),s.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,o),e.applyData(n,o)}function h8(e,n,i){const l=i?i.children:void 0,o=(l?l.indexOf(n):1)===0?"th":"td",u=i&&i.type==="table"?i.align:void 0,f=u?u.length:n.children.length;let d=-1;const h=[];for(;++d<f;){const g=n.children[d],x={},v=u?u[d]:void 0;v&&(x.align=v);let w={type:"element",tagName:o,properties:x,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),h.push(w)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,m),e.applyData(n,m)}function p8(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const _b=9,Nb=32;function m8(e){const n=String(e),i=/\r?\n|\r/g;let l=i.exec(n),s=0;const o=[];for(;l;)o.push(Rb(n.slice(s,l.index),s>0,!0),l[0]),s=l.index+l[0].length,l=i.exec(n);return o.push(Rb(n.slice(s),s>0,!1)),o.join("")}function Rb(e,n,i){let l=0,s=e.length;if(n){let o=e.codePointAt(l);for(;o===_b||o===Nb;)l++,o=e.codePointAt(l)}if(i){let o=e.codePointAt(s-1);for(;o===_b||o===Nb;)s--,o=e.codePointAt(s-1)}return s>l?e.slice(l,s):""}function y8(e,n){const i={type:"text",value:m8(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function g8(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const b8={blockquote:YD,break:KD,code:GD,delete:XD,emphasis:ZD,footnoteReference:JD,heading:WD,html:e8,imageReference:t8,image:n8,inlineCode:r8,linkReference:i8,link:l8,listItem:a8,list:o8,paragraph:u8,root:c8,strong:f8,table:d8,tableCell:p8,tableRow:h8,text:y8,thematicBreak:g8,toml:Du,yaml:Du,definition:Du,footnoteDefinition:Du};function Du(){}const Rw=-1,Bc=0,Ys=1,dc=2,Wp=3,em=4,tm=5,nm=6,Ow=7,jw=8,Ob=typeof self=="object"?self:globalThis,v8=(e,n)=>{const i=(s,o)=>(e.set(o,s),s),l=s=>{if(e.has(s))return e.get(s);const[o,u]=n[s];switch(o){case Bc:case Rw:return i(u,s);case Ys:{const f=i([],s);for(const d of u)f.push(l(d));return f}case dc:{const f=i({},s);for(const[d,h]of u)f[l(d)]=l(h);return f}case Wp:return i(new Date(u),s);case em:{const{source:f,flags:d}=u;return i(new RegExp(f,d),s)}case tm:{const f=i(new Map,s);for(const[d,h]of u)f.set(l(d),l(h));return f}case nm:{const f=i(new Set,s);for(const d of u)f.add(l(d));return f}case Ow:{const{name:f,message:d}=u;return i(new Ob[f](d),s)}case jw:return i(BigInt(u),s);case"BigInt":return i(Object(BigInt(u)),s);case"ArrayBuffer":return i(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return i(new DataView(f),u)}}return i(new Ob[o](u),s)};return l},jb=e=>v8(new Map,e)(0),ca="",{toString:x8}={},{keys:w8}=Object,Fs=e=>{const n=typeof e;if(n!=="object"||!e)return[Bc,n];const i=x8.call(e).slice(8,-1);switch(i){case"Array":return[Ys,ca];case"Object":return[dc,ca];case"Date":return[Wp,ca];case"RegExp":return[em,ca];case"Map":return[tm,ca];case"Set":return[nm,ca];case"DataView":return[Ys,i]}return i.includes("Array")?[Ys,i]:i.includes("Error")?[Ow,i]:[dc,i]},Mu=([e,n])=>e===Bc&&(n==="function"||n==="symbol"),S8=(e,n,i,l)=>{const s=(u,f)=>{const d=l.push(u)-1;return i.set(f,d),d},o=u=>{if(i.has(u))return i.get(u);let[f,d]=Fs(u);switch(f){case Bc:{let m=u;switch(d){case"bigint":f=jw,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([Rw],u)}return s([f,m],u)}case Ys:{if(d){let x=u;return d==="DataView"?x=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(u)),s([d,[...x]],u)}const m=[],g=s([f,m],u);for(const x of u)m.push(o(x));return g}case dc:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(n&&"toJSON"in u)return o(u.toJSON());const m=[],g=s([f,m],u);for(const x of w8(u))(e||!Mu(Fs(u[x])))&&m.push([o(x),o(u[x])]);return g}case Wp:return s([f,u.toISOString()],u);case em:{const{source:m,flags:g}=u;return s([f,{source:m,flags:g}],u)}case tm:{const m=[],g=s([f,m],u);for(const[x,v]of u)(e||!(Mu(Fs(x))||Mu(Fs(v))))&&m.push([o(x),o(v)]);return g}case nm:{const m=[],g=s([f,m],u);for(const x of u)(e||!Mu(Fs(x)))&&m.push(o(x));return g}}const{message:h}=u;return s([f,{name:d,message:h}],u)};return o},Db=(e,{json:n,lossy:i}={})=>{const l=[];return S8(!(n||i),!!n,new Map,l)(e),l},hc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?jb(Db(e,n)):structuredClone(e):(e,n)=>jb(Db(e,n));function C8(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function E8(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function A8(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||C8,l=e.options.footnoteBackLabel||E8,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),g=String(h.identifier).toUpperCase(),x=La(g.toLowerCase());let v=0;const w=[],A=e.footnoteCounts.get(g);for(;A!==void 0&&++v<=A;){w.length>0&&w.push({type:"text",value:" "});let O=typeof i=="string"?i:i(d,v);typeof O=="string"&&(O={type:"text",value:O}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(d,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const _=m[m.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const O=_.children[_.children.length-1];O&&O.type==="text"?O.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...w)}else m.push(...w);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(m,!0)};e.patch(h,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...hc(u),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
260
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
261
- `}]}}const op={}.hasOwnProperty,T8={};function k8(e,n){const i=n||T8,l=new Map,s=new Map,o=new Map,u={...b8,...i.handlers},f={all:h,applyData:N8,definitionById:l,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:u,one:d,options:i,patch:_8,wrap:O8};return Fp(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const g=m.type==="definition"?l:s,x=String(m.identifier).toUpperCase();g.has(x)||g.set(x,m)}}),f;function d(m,g){const x=m.type,v=f.handlers[x];if(op.call(f.handlers,x)&&v)return v(f,m,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in m){const{children:A,..._}=m,k=hc(_);return k.children=f.all(m),k}return hc(m)}return(f.options.unknownHandler||R8)(f,m,g)}function h(m){const g=[];if("children"in m){const x=m.children;let v=-1;for(;++v<x.length;){const w=f.one(x[v],m);if(w){if(v&&x[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Mb(w.value)),!Array.isArray(w)&&w.type==="element")){const A=w.children[0];A&&A.type==="text"&&(A.value=Mb(A.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function _8(e,n){e.position&&(n.position=G5(e))}function N8(e,n){let i=n;if(e&&e.data){const l=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const u="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:u}}i.type==="element"&&o&&Object.assign(i.properties,hc(o)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function R8(e,n){const i=n.data||{},l="value"in n&&!(op.call(i,"hProperties")||op.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function O8(e,n){const i=[];let l=-1;for(n&&i.push({type:"text",value:`
262
- `});++l<e.length;)l&&i.push({type:"text",value:`
263
- `}),i.push(e[l]);return n&&e.length>0&&i.push({type:"text",value:`
264
- `}),i}function Mb(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function Lb(e,n){const i=k8(e,n),l=i.one(e,void 0),s=A8(i),o=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
265
- `},s),o}function j8(e,n){return e&&"run"in e?async function(i,l){const s=Lb(i,{file:l,...n});await e.run(s,l)}:function(i,l){return Lb(i,{file:l,...e||n})}}function zb(e){if(e)throw e}var wh,Ub;function D8(){if(Ub)return wh;Ub=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},o=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!g)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},u=function(h,m){i&&m.name==="__proto__"?i(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},f=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(l)return l(h,m).value}else return;return h[m]};return wh=function d(){var h,m,g,x,v,w,A=arguments[0],_=1,k=arguments.length,O=!1;for(typeof A=="boolean"&&(O=A,A=arguments[1]||{},_=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});_<k;++_)if(h=arguments[_],h!=null)for(m in h)g=f(A,m),x=f(h,m),A!==x&&(O&&x&&(o(x)||(v=s(x)))?(v?(v=!1,w=g&&s(g)?g:[]):w=g&&o(g)?g:{},u(A,{name:m,newValue:d(O,w,x)})):typeof x<"u"&&u(A,{name:m,newValue:x}));return A},wh}var M8=D8();const Sh=Ca(M8);function up(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function L8(){const e=[],n={run:i,use:l};return n;function i(...s){let o=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...s);function f(d,...h){const m=e[++o];let g=-1;if(d){u(d);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,m?z8(m,f)(...h):u(null,...h)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),n}}function z8(e,n){let i;return l;function l(...u){const f=e.length>u.length;let d;f&&u.push(s);try{d=e.apply(this,u)}catch(h){const m=h;if(f&&i)throw m;return s(m)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(u,...f){i||(i=!0,n(u,...f))}function o(u){s(null,u)}}const wr={basename:U8,dirname:B8,extname:q8,join:H8,sep:"/"};function U8(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');bo(e);let i=0,l=-1,s=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){i=s+1;break}}else l<0&&(o=!0,l=s+1);return l<0?"":e.slice(i,l)}if(n===e)return"";let u=-1,f=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){i=s+1;break}}else u<0&&(o=!0,u=s+1),f>-1&&(e.codePointAt(s)===n.codePointAt(f--)?f<0&&(l=s):(f=-1,l=u));return i===l?l=u:l<0&&(l=e.length),e.slice(i,l)}function B8(e){if(bo(e),e.length===0)return".";let n=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){n=i;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function q8(e){bo(e);let n=e.length,i=-1,l=0,s=-1,o=0,u;for(;n--;){const f=e.codePointAt(n);if(f===47){if(u){l=n+1;break}continue}i<0&&(u=!0,i=n+1),f===46?s<0?s=n:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||i<0||o===0||o===1&&s===i-1&&s===l+1?"":e.slice(s,i)}function H8(...e){let n=-1,i;for(;++n<e.length;)bo(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":F8(i)}function F8(e){bo(e);const n=e.codePointAt(0)===47;let i=P8(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function P8(e,n){let i="",l=0,s=-1,o=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(s===u-1||o===1))if(s!==u-1&&o===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",l=0):(i=i.slice(0,d),l=i.length-1-i.lastIndexOf("/")),s=u,o=0;continue}}else if(i.length>0){i="",l=0,s=u,o=0;continue}}n&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(s+1,u):i=e.slice(s+1,u),l=u-s-1;s=u,o=0}else f===46&&o>-1?o++:o=-1}return i}function bo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Q8={cwd:I8};function I8(){return"/"}function cp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function V8(e){if(typeof e=="string")e=new URL(e);else if(!cp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return $8(e)}function $8(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const l=n.codePointAt(i+2);if(l===70||l===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(n)}const Ch=["history","path","basename","stem","extname","dirname"];class Dw{constructor(n){let i;n?cp(n)?i={path:n}:typeof n=="string"||Y8(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":Q8.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Ch.length;){const o=Ch[l];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let s;for(s in i)Ch.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(n){Ah(n,"basename"),Eh(n,"basename"),this.path=wr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(n){Bb(this.basename,"dirname"),this.path=wr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(n){if(Eh(n,"extname"),Bb(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){cp(n)&&(n=V8(n)),Ah(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(n){Ah(n,"stem"),Eh(n,"stem"),this.path=wr.join(this.dirname||"",n+(this.extname||""))}fail(n,i,l){const s=this.message(n,i,l);throw s.fatal=!0,s}info(n,i,l){const s=this.message(n,i,l);return s.fatal=void 0,s}message(n,i,l){const s=new nn(n,i,l);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Eh(e,n){if(e&&e.includes(wr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+wr.sep+"`")}function Ah(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Bb(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Y8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const K8=function(e){const l=this.constructor.prototype,s=l[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,l),o},G8={}.hasOwnProperty;class rm extends K8{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=L8()}copy(){const n=new rm;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];n.use(...l)}return n.data(Sh(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(_h("data",this.frozen),this.namespace[n]=i,this):G8.call(this.namespace,n)&&this.namespace[n]||void 0:n?(_h("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=i.call(n,...l);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=Lu(n),l=this.parser||this.Parser;return Th("parse",l),l(String(i),i)}process(n,i){const l=this;return this.freeze(),Th("process",this.parser||this.Parser),kh("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(o,u){const f=Lu(n),d=l.parse(f);l.run(d,f,function(m,g,x){if(m||!g||!x)return h(m);const v=g,w=l.stringify(v,x);J8(w)?x.value=w:x.result=w,h(m,x)});function h(m,g){m||!g?u(m):o?o(g):i(void 0,g)}}}processSync(n){let i=!1,l;return this.freeze(),Th("processSync",this.parser||this.Parser),kh("processSync",this.compiler||this.Compiler),this.process(n,s),Hb("processSync","process",i),l;function s(o,u){i=!0,zb(o),l=u}}run(n,i,l){qb(n),this.freeze();const s=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?o(void 0,l):new Promise(o);function o(u,f){const d=Lu(i);s.run(n,d,h);function h(m,g,x){const v=g||n;m?f(m):u?u(v):l(void 0,v,x)}}}runSync(n,i){let l=!1,s;return this.run(n,i,o),Hb("runSync","run",l),s;function o(u,f){zb(u),s=f,l=!0}}stringify(n,i){this.freeze();const l=Lu(i),s=this.compiler||this.Compiler;return kh("stringify",s),qb(n),s(n,l)}use(n,...i){const l=this.attachers,s=this.namespace;if(_h("use",this.frozen),n!=null)if(typeof n=="function")d(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):u(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...g]=h;d(m,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=Sh(!0,s.settings,h.settings))}function f(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const g=h[m];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let g=-1,x=-1;for(;++g<l.length;)if(l[g][0]===h){x=g;break}if(x===-1)l.push([h,...m]);else if(m.length>0){let[v,...w]=m;const A=l[x][1];up(A)&&up(v)&&(v=Sh(!0,A,v)),l[x]=[h,v,...w]}}}}const X8=new rm().freeze();function Th(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _h(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qb(e){if(!up(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Hb(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Lu(e){return Z8(e)?e:new Dw(e)}function Z8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J8(e){return typeof e=="string"||W8(e)}function W8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const eM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fb=[],Pb={allowDangerousHtml:!0},tM=/^(https?|ircs?|mailto|xmpp)$/i,nM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function rM(e){const n=iM(e),i=lM(e);return aM(n.runSync(n.parse(i),i),e)}function iM(e){const n=e.rehypePlugins||Fb,i=e.remarkPlugins||Fb,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pb}:Pb;return X8().use($D).use(i).use(j8,l).use(n)}function lM(e){const n=e.children||"",i=new Dw;return typeof n=="string"&&(i.value=n),i}function aM(e,n){const i=n.allowedElements,l=n.allowElement,s=n.components,o=n.disallowedElements,u=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||sM;for(const m of nM)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+eM+m.id,void 0);return Fp(e,h),eD(e,{Fragment:b.Fragment,components:s,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function h(m,g,x){if(m.type==="raw"&&x&&typeof g=="number")return u?x.children.splice(g,1):x.children[g]={type:"text",value:m.value},g;if(m.type==="element"){let v;for(v in xh)if(Object.hasOwn(xh,v)&&Object.hasOwn(m.properties,v)){const w=m.properties[v],A=xh[v];(A===null||A.includes(m.tagName))&&(m.properties[v]=d(String(w||""),v,m))}}if(m.type==="element"){let v=i?!i.includes(m.tagName):o?o.includes(m.tagName):!1;if(!v&&l&&typeof g=="number"&&(v=!l(m,g,x)),v&&x&&typeof g=="number")return f&&m.children?x.children.splice(g,1,...m.children):x.children.splice(g,1),g}}}function sM(e){const n=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||i!==-1&&n>i||l!==-1&&n>l||tM.test(e.slice(0,n))?e:""}const oM=({children:e,...n})=>b.jsx("code",{className:"bg-gray-100 text-gray-600 px-1.5 py-0.5 rounded text-sm font-mono",...n,children:e}),uM=e=>Array.isArray(e)&&typeof e[0]=="string"?e[0]:typeof e=="string"?e:"",cM=({getText:e})=>{const n=async()=>{await navigator.clipboard.writeText(e()),un.success("Copied!")};return b.jsx("button",{onClick:n,className:"text-xs text-white px-2 py-1 rounded hover:bg-gray-600 cursor-pointer",children:"📋"})},fM=({children:e,className:n,...i})=>{const l=(n==null?void 0:n.replace("language-",""))||"";return b.jsxs("div",{className:"mb-4 not-prose",children:[l&&b.jsxs("div",{className:"bg-gray-800 text-gray-300 px-4 py-2 text-sm font-mono rounded-t-md flex justify-between items-center",children:[b.jsx("span",{children:l}),b.jsx(cM,{getText:()=>uM(e).trim()})]}),b.jsx("pre",{className:`bg-gray-900 text-gray-100 p-4 overflow-x-auto ${l?"rounded-b-md":"rounded-md"}`,...i,children:b.jsx("code",{className:"font-mono text-sm",children:e})})]})},dM={code:({className:e,children:n,...i})=>e?b.jsx(fM,{className:e,...i,children:n}):b.jsx(oM,{...i,children:n}),pre:({children:e})=>b.jsx(b.Fragment,{children:e})},hM=({content:e})=>b.jsx("div",{className:"prose max-w-none",children:b.jsx(rM,{remarkPlugins:[A5],components:dM,children:e})}),pM=`### ⚠️ You are running an outdated local server version.
266
-
267
- Please update your local server version to **0.0.67**
268
-
269
- ### 🔧 Update Command
270
-
271
- Update \`@dataramen/cli\` library:
272
-
273
- \`\`\`bash
274
- npm i -g @dataramen/cli
275
- \`\`\`
276
-
277
- After the update, re-run your local server:
278
-
279
- \`\`\`bash
280
- dataramen start
281
- \`\`\`
282
-
283
- Once done, click on the "Check again" button below or refresh the page.
284
- `,mM=()=>{const{data:e,refetch:n}=zR();return!(e!=null&&e.active)||UR(e.version,"0.0.67")===0?null:b.jsx(tn,{isVisible:!0,onClose:()=>null,children:b.jsxs("div",{children:[b.jsx(hM,{content:pM}),b.jsx("div",{className:"flex justify-end mt-2",children:b.jsx("button",{className:"button primary",onClick:()=>n(),children:"Check again"})})]})})},[yM,Mw]=Un(!1),Nh=()=>Mw(!1),gM=()=>Mw(!0),bM=({repeatPassword:e,password:n})=>n.length<1?null:n.length<8?b.jsx(gn,{variant:"warning",children:"New password should be at least 8 characters long"}):n!==e?b.jsx(gn,{variant:"warning",children:"Repeat password should match new password"}):null,vM=()=>{const e=yM(),{data:n}=kr(),{mutateAsync:i,isLoading:l}=DA(),s=Tr(),[{password:o,repeatPassword:u},{change:f,touched:d,reset:h}]=uo({password:"",repeatPassword:""}),m=()=>{s("/"),so.logout().then(()=>{Nh()})},g=()=>{i({password:o}).then(()=>{h(),un.success("Password successfully updated!")})},x=o.length<8||o!==u||l,v=d.includes("password");return b.jsxs(tn,{isVisible:e,onClose:Nh,children:[b.jsx(er,{onClick:Nh}),b.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[b.jsx(nx,{children:"Account settings"}),b.jsxs("label",{children:[b.jsx("p",{className:"text-xs font-semibold mb-1",children:"Username"}),b.jsx("input",{className:"input w-full",readOnly:!0,disabled:!0,value:n==null?void 0:n.username})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[b.jsxs("label",{children:[b.jsx("p",{className:"text-xs font-semibold mb-1",children:"Change password"}),b.jsx("input",{className:"input w-full",type:"password",name:"newPassword",autoComplete:"new-password",value:o,onChange:f("password")})]}),b.jsxs("label",{children:[b.jsx("p",{className:"text-xs font-semibold mb-1",children:"Repeat password"}),b.jsx("input",{className:"input w-full",type:"password",value:u,onChange:f("repeatPassword")})]})]}),v&&b.jsx(bM,{password:o,repeatPassword:u}),b.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[b.jsx("button",{className:"button tertiary",disabled:x,onClick:g,children:"Update password"}),b.jsx("button",{className:"button danger",onClick:m,children:"Log out"})]})]})]})},[xM,Lw]=Un(!1),wM=()=>Lw(!0),Qb=()=>Lw(!1),SM=e=>zn({queryKey:["team-users"],queryFn:async()=>{const{data:n}=await at.get("/teams/"+e+"/users");return n.data},enabled:!!e}),CM=()=>Wn({mutationFn:async({role:e,teamId:n,userId:i})=>(await at.patch("/teams/"+n+"/user-role",{role:e,userId:i}),!0),onSuccess:()=>{mt.invalidateQueries({queryKey:["team-users"]})}}),EM=()=>Wn({mutationFn:async({teamId:e,userId:n})=>(await at.delete("/teams/"+e,{params:{userId:n}}),!0),onSuccess:()=>{mt.invalidateQueries({queryKey:["team-users"]})}}),AM="_user-entry_1wpsb_2",TM={userEntry:AM},kM=()=>{const e=xM(),{data:n}=kr(),{data:i}=SM(n==null?void 0:n.teamId),{mutate:l,isLoading:s}=MA(),{mutate:o,isLoading:u}=CM(),{mutate:f,isLoading:d}=EM(),[h,{change:m,reset:g}]=uo({password:"",username:""}),x=()=>{l({username:h.username,password:h.password,teamId:(n==null?void 0:n.teamId)||""}),g()},v=(k,O)=>{o({teamId:n.teamId,role:O,userId:k})},w=k=>{rx("Are you sure you want to remove this user?").then(O=>{O&&f({userId:k,teamId:n.teamId})})},A=Da(sn.ADMIN),_=s||u||d;return b.jsxs(tn,{isVisible:e,onClose:Qb,backdropClose:!0,children:[b.jsx(er,{onClick:Qb}),b.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[b.jsx(nx,{children:"Manage users"}),Nc(i==null?void 0:i.length,0)&&b.jsx("div",{className:"mt-4 overflow-y-auto flex-1",children:i.map(k=>b.jsxs("div",{className:TM.userEntry,children:[b.jsxs("select",{className:"input",value:k.role,disabled:!A||_,onChange:O=>v(k.id,O.currentTarget.value),children:[b.jsx("option",{value:sn.OWNER,children:"Owner"}),b.jsx("option",{value:sn.ADMIN,children:"Admin"}),b.jsx("option",{value:sn.EDITOR,children:"Editor"}),b.jsx("option",{value:sn.READ_ONLY,children:"Reader"})]}),b.jsx("p",{className:"flex-1 mx-2",children:k.name}),A&&b.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>w(k.id),children:"❌"})]},k.id))}),A&&b.jsxs("div",{className:"mt-4",children:[b.jsx("p",{className:"font-semibold",children:"Create new user"}),b.jsxs("div",{className:"flex flex-col lg:flex-row gap-2 lg:items-center mt-2",children:[b.jsx("input",{className:"input flex-1",onChange:m("username"),value:h.username,placeholder:"Username",disabled:_}),b.jsx("input",{className:"input",onChange:m("password"),value:h.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:_}),b.jsx("button",{className:"button primary",onClick:x,disabled:_,children:"Create user"})]}),b.jsx("p",{className:"text-xs mt-1 text-gray-600",children:"You should create default password for the new account. The user should change it after the first login."})]})]})]})},_M=()=>{const[e,n]=E.useState(""),[i,l]=E.useState(""),[s,o]=E.useState(),[u,f]=E.useState(!1),d=Tr(),h=m=>{m.preventDefault(),o(void 0),so.login({password:i,username:e}).then(()=>{d("/",{replace:!0})}).catch(o)};return b.jsx("div",{className:"page-container bg-(--bg) h-screen",children:b.jsx("div",{className:"page-content items-center",children:b.jsxs("form",{className:"flex flex-col gap-2 w-full lg:w-lg",onSubmit:h,children:[b.jsx("p",{className:"font-semibold text-xl min-w-md",children:"Login"}),s&&b.jsx(gn,{variant:"danger",children:"Failed to login. Please verify your credentials"}),b.jsx("input",{value:e,onChange:m=>n(m.currentTarget.value),className:"input",placeholder:"User name"}),b.jsx("input",{value:i,onChange:m=>l(m.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),b.jsx("button",{type:"submit",className:"button primary",children:"Login"}),u?b.jsxs(gn,{className:"w-full border border-blue-500",children:[b.jsx("p",{children:"If this is your first login, the default credentials are:"}),b.jsxs("ul",{className:"mt-2",children:[b.jsxs("li",{children:["Username: ",b.jsx("strong",{children:"admin"})]}),b.jsxs("li",{children:["Password: ",b.jsx("strong",{children:"admin"})]})]}),b.jsx("p",{className:"mt-2",children:"Please make sure to change the default password to a secure one."})]}):b.jsx("button",{className:"button tertiary",onClick:()=>f(!0),children:"First login?"})]})})})},NM=()=>{const e=Tr(),{pathname:n}=Ln(),{data:i,isLoading:l}=Xv();E.useEffect(()=>{!i&&!l&&n!==pt.login.path&&e(pt.login.path)},[i,l,e,n])};function RM(){return X_(),jR(),NM(),b.jsxs(b.Fragment,{children:[b.jsxs(IC,{children:[b.jsx(zu,{path:pt.home.path,element:b.jsx(jT,{})}),b.jsx(zu,{path:pt.workbench.path,element:b.jsx(uR,{})}),b.jsx(zu,{path:pt.login.path,element:b.jsx(_M,{})})]}),b.jsx(cR,{}),b.jsx($T,{}),b.jsx(nk,{}),b.jsx(mk,{}),b.jsx(CR,{}),b.jsx(OR,{}),b.jsx(mM,{}),b.jsx(vM,{}),b.jsx(kM,{}),b.jsx(ck,{}),b.jsx(lk,{})]})}const OM="_desktop-layout_6apim_2",jM="_mobile-layout_6apim_2",DM="_nav_6apim_2",MM="_main_6apim_2",LM="_footer_6apim_2",Sa={desktopLayout:OM,mobileLayout:jM,nav:DM,main:MM,footer:LM},zM="_container_1lygg_2",UM="_file_1lygg_2",BM="_menu_1lygg_2",pa={container:zM,file:UM,menu:BM},qM=({name:e,id:n,onRename:i,onDelete:l,onOpen:s})=>{const o=lx();return b.jsxs("button",{className:pa.file,onContextMenu:o.open,onClick:()=>s(n),children:[b.jsx(ox,{handler:o,children:b.jsxs("div",{className:"context-menu-container",children:[b.jsx("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),o.close(),i(n)},className:"context-menu-item",children:"✏️ Rename"}),b.jsx("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),o.close(),l(n)},className:"context-menu-item",children:"🗑️ Delete"})]})}),b.jsxs("span",{children:["📖 ",e]})]})},HM=({dataSource:e,index:n})=>{const i=()=>{ba(e.id)};return Sr(n.toString(),()=>{ba(l=>{if(l!==e.id)return e.id})},e.name),b.jsxs("button",{className:pa.menu,onClick:i,children:[b.jsx(Zs,{size:20,type:e.dbType}),b.jsx("p",{className:"truncate flex-1 text-left mx-1.5",children:e.name}),b.jsx("span",{className:"hotkey",children:n})]})},FM=()=>{const e=Tc(w=>w.length>0),n=Tr(),i=Ln(),l=_p("Sidebar"),{data:s}=kr(),{data:o}=CA(s==null?void 0:s.teamId),{data:u}=EA(s==null?void 0:s.teamId),f=$_(),d=w=>{tx(w).then(A=>{Xs(A.name,ga(A.opts),!0),i.pathname!==pt.workbench.path&&n(pt.workbench.path)})},h=async w=>{const A=u==null?void 0:u.find(k=>k.id===w),_=await Bi("New name?",A==null?void 0:A.name);_&&f.mutate({id:w,payload:{name:_}})},m=w=>{f.mutate({id:w,payload:{isTrash:!0}})},g=()=>{e?i.pathname!==pt.workbench.path&&n(pt.workbench.path):l()},x=()=>{Wh(),l()},v=()=>{Wh(),n(pt.home.path)};return b.jsxs("div",{className:pa.container,children:[b.jsxs("div",{className:"mb-4",children:[b.jsxs("button",{onClick:v,className:pa.menu,children:[b.jsx("span",{children:pt.home.name}),b.jsx("span",{className:"hotkey",children:"H"})]}),b.jsxs("button",{disabled:!s,onClick:x,className:pa.menu,children:[b.jsx("span",{children:"🔎 Start new query"}),b.jsx("span",{className:"hotkey",children:"N"})]}),b.jsxs("button",{disabled:!s,onClick:g,className:pa.menu,children:[b.jsx("span",{children:"🛠️ Workbench"}),b.jsx("span",{className:"hotkey",children:"W"})]})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto",children:[o==null?void 0:o.map((w,A)=>b.jsx(HM,{dataSource:w,index:A+1},w.id)),u==null?void 0:u.map(w=>b.jsx(qM,{onDelete:m,onRename:h,onOpen:d,name:w.name,id:w.id},w.id))]})]})},PM=({resizeDirection:e,onSizeChange:n})=>{const i=E.useRef(null),l=E.useRef(null);return E.useEffect(()=>{var o;function s(u){const f=i.current.getBoundingClientRect(),d={x:u.pageX,y:u.pageY};function h(g){{let x;x=g.pageX-d.x,i.current.style.width=`${f.width+x}px`}n&&i.current&&n(i.current)}function m(){document.body.removeEventListener("mousemove",h),document.body.removeEventListener("mouseleave",h)}document.body.addEventListener("mousemove",h),document.body.addEventListener("mouseup",m),document.body.addEventListener("mouseleave",m)}(o=l==null?void 0:l.current)==null||o.addEventListener("mousedown",s),n&&i.current&&n(i.current)}),{elementRef:i,handleRef:l}},zw=()=>{const{elementRef:e,handleRef:n}=PM({resizeDirection:"horizontal-r"}),{data:i}=kr();return b.jsxs("nav",{className:Sa.nav,ref:e,children:[b.jsx("div",{ref:n,className:"hr-slide"}),b.jsx(FM,{}),i&&b.jsxs("div",{className:Sa.footer,children:[b.jsxs("button",{onClick:gM,children:["🪪 ",i.username]}),b.jsx("button",{onClick:wM,children:"👥 Manage users"})]})]})},QM=({children:e})=>b.jsxs("div",{className:Sa.desktopLayout,children:[b.jsx(Nx,{id:"default",className:"z-100"}),b.jsx(zw,{}),b.jsx("main",{className:Sa.main,children:e})]}),IM=({children:e})=>{const n=aR(),i=()=>qp(!1);return b.jsxs("div",{className:Sa.mobileLayout,children:[b.jsx(px,{isVisible:n,onClose:i,backdropClose:!0,contentClassName:"flex",children:b.jsx(zw,{})}),b.jsx("main",{className:Sa.main,children:e})]})},VM=({children:e})=>Rc(co.laptop)?b.jsx(QM,{children:e}):b.jsx(IM,{children:e});J2.createRoot(document.getElementById("root")).render(b.jsxs(nt.StrictMode,{children:[b.jsx(xA,{}),b.jsx(KE,{client:mt,children:b.jsx(pE,{children:b.jsx(VM,{children:b.jsx(RM,{})})})})]}));